/* ===== Основные настройки ===== */
body {
    font-family: 'Segoe UI', Arial, sans-serif;
    margin: 0;
    background-color: #ffffff;
    color: #003366;
    line-height: 1.6;
}

/* ===== Контейнер для всего контента ===== */
.content-wrapper {
    max-width: 900px;  /* ограничиваем ширину текста */
    margin: 0 auto;    /* центрируем */
    padding: 0 15px;   /* отступы слева и справа */
}

/* ===== Кнопка мобильного меню ===== */
.menu-toggle {
    display: none;
    position: fixed;
    top: 10px;
    left: 10px;
    z-index: 2000;
    background: #0056B3;
    color: white;
    border: none;
    padding: 10px 14px;
    font-size: 22px;
    border-radius: 6px;
    cursor: pointer;
}

/* ===== Навигация (ПК) ===== */
nav {
    display: flex;
    justify-content: center;
    background: #0056B3;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    flex-wrap: wrap;
}

nav a {
    color: white;
    text-decoration: none;
    padding: 12px 20px;
    display: block;
}

nav a:hover {
    background-color: #003366;
}

/* ===== Хедер ===== */
header {
    background-color: #e6f0ff;
    border-bottom: 2px solid #0056B3;
    padding: 20px 40px;
    text-align: center;
    margin-top: 60px; /* высота меню на ПК */
}

header h1 {
    margin: 0;
    font-size: 2rem;
}

/* ===== Основной контент ===== */
main {
    margin: 40px 0;
}

/* ===== Секции ===== */
section {
    margin-bottom: 50px;
}

h2 {
    border-bottom: 2px solid #0056B3;
    padding-bottom: 5px;
    margin-top: 30px;
}

h3 {
    margin-top: 25px;
}

/* ===== Списки ===== */
ul {
    padding-left: 20px;
    margin-bottom: 20px;
}

li {
    margin-bottom: 10px;
}

/* ===== Тесты ===== */
.test-question {
    margin-bottom: 25px;
}

.test-question button {
    margin-top: 10px;
    background: #0056B3;
    color: white;
    border: none;
    padding: 8px 16px;
    cursor: pointer;
    border-radius: 5px;
}

.test-question button:hover {
    background: #003366;
}

.result {
    font-weight: bold;
    color: green;
    margin-top: 10px;
}

/* ===== Текст + картинка справа ===== */
.text-with-right-image {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    flex-wrap: wrap; /* чтобы картинки не вылазили на мобильных */
}

.text-with-right-image .text-block {
    flex: 1;
    padding-right: 20px;
}

.text-with-right-image .image-block {
    width: 300px;
    flex-shrink: 0;
}

.text-with-right-image figure figcaption {
    font-size: 0.85em;
    text-align: center;
    margin-top: 5px;
}

/* ===== Футер ===== */
footer {
    background-color: #e6f0ff;
    color: #0056B3;
    text-align: center;
    padding: 20px;
    border-top: 2px solid #0056B3;
}

/* ===== МОБИЛЬНАЯ ВЕРСИЯ ===== */
@media (max-width: 768px) {

    nav {
        display: none !important;
        flex-direction: column;
        position: fixed;
        top: 50px;
        left: 0;
        width: 100%;
        background: #0056B3;
        z-index: 1500;
    }

    nav.show {
        display: flex !important;
    }

    nav a {
        padding: 15px;
        text-align: center;
        border-top: 1px solid rgba(255,255,255,0.2);
    }

    .menu-toggle {
        display: block;
    }

    header {
        margin-top: 70px;
        padding: 15px;
    }

    .content-wrapper {
        padding: 0 10px; /* чуть меньше отступов на мобильных */
    }

    .text-with-right-image {
        flex-direction: column;
    }

    .text-with-right-image .text-block {
        padding-right: 0;
        margin-bottom: 15px;
    }

    .text-with-right-image .image-block {
        width: 100%;
        max-width: 300px;
    }
}


