/* Базовые стили и сброс */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    background-color: #292929;
    color: #ffffff;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

h1, h2, h3 {
    font-family: 'Georgia', serif;
    line-height: 1.3;
}

/* --- Шапка сайта --- */
.main-header {
    background-color: #ffe100;
    color: #0d0d0d;
    /*position: sticky;*/
    top: 0;
    z-index: 1000;
}

/* Верхняя часть шапки */
.header-top {
    padding: 15px 0;
    border-bottom: 1px solid #e0c800;
}

.header-top-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.social-icons,
.header-contacts,
.logo {
    flex: 1;
}

.social-icons {
    display: flex;
    gap: 15px;
    justify-content: flex-start;
}

.social-icons a {
    display: block;
}

.logo {
    text-align: center;
}

.logo img {
    width: 150px;
    display: inline-block;
}

.header-contacts {
    text-align: right;
    font-weight: 700;
    font-size: 1rem;
    line-height: 1.4;
}

.header-contacts a {
    color: inherit;
    text-decoration: none;
}

.header-contacts a:hover {
    text-decoration: underline;
}

/* Нижняя часть шапки (Навигация) */
.main-nav ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px 25px;
    padding: 15px 0;
}

.main-nav a {
    color: #000000;
    text-decoration: none;
    font-weight: 900;
    text-transform: uppercase;
    font-size: 15px;
    padding: 5px;
    display: block;
    transition: color 0.2s ease-in-out;
}

.main-nav a:hover {
    color: #555;
}

.nav-toggle {
    display: none;
}

/* --- Основное содержимое --- */
.hero {
    min-height: 80vh;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    padding: 40px 0;
}

.hero-text {
    max-width: 55%;
    background: rgba(0, 0, 0, 0.6);
    padding: 2rem;
    border-radius: 10px;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
}

.content-section {
    padding: 60px 0;
}

.content-container {
    display: flex;
    align-items: center;
    gap: 40px;
}

.content-image,
.content-text {
    flex: 1;
}

.content-image img {
    border-radius: 15px;
}

.content-text h2 {
    font-size: 2.2rem;
    margin-bottom: 0.5rem;
}

.content-text h3 {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    color: #ffe100;
}

.content-text ul {
    list-style-type: '✓  ';
    padding-left: 20px;
}

.content-text ul li {
    margin-bottom: 0.5rem;
}

.content-container.reverse {
    flex-direction: row-reverse;
}

/* Общие стили для информационных секций */
.info-section {
    padding: 80px 0;
    text-align: center;
}

.section-title {
    font-size: 2.2rem;
    margin-bottom: 20px;
    font-weight: normal;
}

.section-subtitle {
    max-width: 800px;
    margin: 0 auto 60px;
    font-size: 1.2rem;
    line-height: 1.7;
}

/* --- Секция "Важность диагностики" --- */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    text-align: center;
}

.step-item h3 {
    font-size: 1.3rem;
    margin: 20px 0 10px;
    font-weight: normal;
}

.step-item p {
    font-size: 1rem;
    color: #ccc;
}

.step-circle {
    width: 60px;
    height: 60px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-family: 'Georgia', serif;
}

/* --- Секция "Почему выбирают нас" --- */
.features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px 60px;
    text-align: left;
    max-width: 1000px;
    margin: 0 auto;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.feature-icon {
    flex-shrink: 0;
    margin-top: 5px;
}

.feature-text h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.feature-text p {
    color: #ccc;
}

/* --- Секция FAQ --- */
.faq-container {
    max-width: 800px;
    margin: 0 auto;
    text-align: left;
}

.faq-item {
    border-top: 1px solid #a9a270;
}

.faq-item:last-child {
    border-bottom: 1px solid #a9a270;
}

.faq-item summary {
    font-size: 1.3rem;
    font-weight: normal;
    padding: 25px 0;
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: color 0.2s;
}

.faq-item summary:hover {
    color: #ddd;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: '+';
    width: 30px;
    height: 30px;
    background-color: #f5914f;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 300;
    line-height: 30px;
    color: white;
    transition: transform 0.3s ease;
    flex-shrink: 0;
    margin-left: 20px;
}

.faq-item[open]>summary::after {
    content: '−';
    transform: rotate(180deg);
}

.faq-content {
    padding-bottom: 25px;
    color: #ccc;
    font-size: 1rem;
}

/* --- Секция Тарифы --- */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    justify-content: center;
}

.price-card {
    background: #ffe100;
    color: #0d0d0d;
    padding: 30px;
    border: 1px solid #a9a270;
    border-radius: 9px;
    display: flex;
    flex-direction: column;
    text-align: center;
}

.price-card-title {
    font-size: 1.5rem;
    font-weight: bold;
    min-height: 3em; /* для выравнивания высоты заголовков */
}

.price-description {
    margin: 20px 0;
    font-size: 0.9rem;
    flex-grow: 1; /* чтобы цена всегда была внизу */
    line-height: 1.8;
}

.price {
    font-size: 2rem;
    font-weight: bold;
}


/* --- Подвал --- */
footer {
    padding: 80px 0;
    text-align: center;
}

.footer-title {
    font-size: 3rem;
    font-weight: bold;
    margin-bottom: 20px;
}

.footer-phone {
    font-size: 1.5rem;
    margin-bottom: 10px;
    font-weight: bold;
}

.footer-address {
    font-size: 1rem;
    color: #ccc;
    margin-bottom: 30px;
}

.footer-address a {
    color: inherit; /* Наследует цвет текста от родителя */
    text-decoration: none; /* Убирает подчеркивание */
}
.footer-address a:hover {
    text-decoration: underline; /* Добавляет подчеркивание при наведении */
}

.social-links-footer {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.social-links-footer a {
    width: 48px;
    height: 48px;
    background-color: #ffe100;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s;
}

.social-links-footer a:hover {
    opacity: 0.8;
}

.social-links-footer svg {
    width: 24px;
    height: 24px;
}


/* --- Адаптивность --- */
@media (max-width: 1024px) {

    /* --- ФИНАЛЬНОЕ РЕШЕНИЕ (ЛОГО В ЦЕНТРЕ, ГАМБУРГЕР СПРАВА) --- */

    /* Заставляем flexbox менять порядок блоков */
    .main-header {
        display: flex;
        flex-direction: column;
    }

    /* 1. Блок с Лого и Гамбургером - СТАНОВИТСЯ ПЕРВЫМ */
    .header-bottom {
        order: 1; /* Этот блок теперь наверху */
        position: relative;
    }
    .header-bottom .container {
        display: flex;
        justify-content: center; /* Центрируем содержимое */
        align-items: center;
        padding: 10px 15px;
        position: relative; /* Точка отсчета для гамбургера */
        min-height: 65px; /* Задаем минимальную высоту, чтобы лого поместился */
    }

    /* 2. Блок с контактами - СТАНОВИТСЯ ВТОРЫМ (под шапкой) */
    .header-top {
        order: 2; /* Этот блок теперь внизу */
        padding: 20px 0;
        border-top: 1px solid #e0c800;
    }
    .header-top-container {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }
    .header-contacts {
        text-align: center;
    }
    /* Клонируем логотип из верхнего блока и помещаем его в центр нижнего */
    .header-top .logo {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 150px; /* Ваш нормальный размер лого */
    }

    /* 3. Выпадающее меню и его кнопка */
    .nav-toggle {
        display: block;
        font-size: 2.5rem;
        line-height: 1;
        background: none;
        border: none;
        color: #000;
        cursor: pointer;

        /* Позиционируем кнопку справа */
        position: absolute;
        right: 15px; /* отступ от правого края */
        top: 50%;
        transform: translateY(-50%);
    }

    .main-nav {
        position: static;
    }
    .main-nav ul {
        display: none;
        position: absolute;
        top: 100%;
        left: 0; right: 0;
        background-color: #ffe100;
        flex-direction: column;
        padding: 0; gap: 0;
        border-top: 1px solid #e0c800;
        box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    }
    .main-nav ul.active { display: flex; }
    .main-nav li { width: 100%; text-align: center; }
    .main-nav li a { padding: 15px; border-bottom: 1px solid #e0c800; }
    .main-nav li:last-child a { border-bottom: none; }
    .header-top .logo {
        display: none;
    }
}

@media (max-width: 768px) {
    h1,
    .hero h1 {
        font-size: 2rem;
    }

    h2,
    .content-text h2,
    .section-title {
        font-size: 1.8rem;
    }

    .hero-text {
        max-width: 100%;
    }

    .content-container,
    .content-container.reverse {
        flex-direction: column;
    }

    .steps-grid {
        grid-template-columns: 1fr;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .section-subtitle {
        margin-bottom: 40px;
    }

    /* =============================================== */
    /* == ФИНАЛЬНЫЕ ПРАВКИ ДЛЯ МОБИЛЬНОЙ ВЕРСИИ v2  == */
    /* =============================================== */

    /* --- 1. Решение проблемы позиционирования мобильного меню (остается без изменений) --- */

    @media (max-width: 1024px) {
        /* Делаем нижнюю часть шапки точкой отсчета для выпадающего меню */
        .header-bottom {
            position: relative;
        }

        /* Убираем лишний отступ у контейнера в шапке, чтобы меню было по всей ширине */
        .header-bottom .container {
            padding: 0;
        }

        /* Выравниваем лого и кнопку меню по краям */
        .header-bottom .logo, .main-nav {
            padding: 10px 15px; /* Добавляем внутренние отступы вместо внешних */
        }
    }


    /* --- 2. Решение проблемы горизонтального скроллинга через уменьшение шрифтов --- */

    @media (max-width: 768px) {
        /* Уменьшаем шрифты для планшетов и больших телефонов */
        .hero h1 {
            font-size: 1.8rem; /* Немного уменьшаем h1 */
        }

        .footer-title {
            font-size: 2.5rem; /* Немного уменьшаем заголовок в подвале */
        }
    }

    @media (max-width: 480px) {
        /* Значительно уменьшаем шрифты для маленьких экранов телефонов */
        .hero h1 {
            font-size: 1.5rem; /* Делаем h1 еще меньше */
            line-height: 1.4;  /* Слегка увеличиваем межстрочный интервал для читаемости */
        }

        .content-text h2 {
            font-size: 1.6rem; /* Уменьшаем заголовки секций */
        }

        .footer-title {
            font-size: 2rem; /* Значительно уменьшаем заголовок в подвале */
        }

        .footer-phone {
            font-size: 1.2rem;
        }
    }
}