/* ============================================================
   ГЛОБАЛЬНЫЙ СБРОС И ПЕРЕМЕННЫЕ
   Цветовая гамма: Вариант 5 «Умная радуга»
   ============================================================ */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    /* ===== Основные цвета (фон) ===== */
    --color-bg: #FDFBF7;            /* Тёплый белый — как хорошая бумага */
    --color-bg-light: #F5F1E6;      /* Светло-бежевый — карточки и блоки */

    /* ===== Акценты ===== */
    --color-accent: #FF6B6B;        /* Коралловый — кнопки, CTA, мотивирующие элементы */
    --color-secondary: #4ECDC4;     /* Мятный — подложки, иконки, свежесть */

    /* ===== Вспомогательные ===== */
    --color-text: #2C3E50;          /* Тёмно-синий — основной текст (доверие родителей) */
    --color-text-light: #5D6D7E;    /* Светлый синий — второстепенный текст */
    --color-highlight: #FFE66D;     /* Жёлтый пастель — бейджи «новинка/популярно» */
    --color-border: #E8E0D5;        /* Светлый бежевый — рамки, разделители */
    --color-success: #27AE60;       /* Изумрудный — для галочек и успешных действий */

    /* ===== Базовые цвета ===== */
    --color-white: #FFFFFF;
    --color-dark: #1A2A3A;

    /* ===== Тени ===== */
    --shadow-sm: 0 2px 8px rgba(255, 107, 107, 0.12);
    --shadow-md: 0 8px 30px rgba(255, 107, 107, 0.18);
    --shadow-lg: 0 12px 40px rgba(255, 107, 107, 0.22);

    /* ===== Скругления ===== */
    --radius: 16px;
    --radius-sm: 8px;
    --radius-lg: 24px;

    /* ===== Шрифты ===== */
    --font-family: 'Nunito Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-family-heading: 'Baloo 2', 'Nunito Sans', sans-serif;
}

/* ===== Базовые стили ===== */
html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

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

a {
    color: var(--color-accent);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: #d35400;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.container--narrow {
    max-width: 820px;
}

.container--form {
    max-width: 860px;
}

/* ============================================================
   КНОПКИ (ЕДИНЫЙ ЦВЕТ #D35400)
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 32px;
    border: none;
    border-radius: 50px;
    font-family: var(--font-family);
    font-weight: 700;
    font-size: 16px;
    line-height: 1.2;
    cursor: pointer;
    transition: all 0.25s ease;
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
}

.btn--primary {
    background-color: #D35400;
    color: #ffffff;
}

.btn--primary:hover {
    background-color: #A04000;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn--accent {
    background-color: #D35400;
    color: #ffffff;
}

.btn--accent:hover {
    background-color: #A04000;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn--secondary {
    background-color: transparent;
    color: var(--color-text);
    border: 2px solid var(--color-border);
}

.btn--secondary:hover {
    border-color: #D35400;
    color: #D35400;
    background-color: rgba(211, 84, 0, 0.05);
}

.btn--block {
    width: 100%;
    justify-content: center;
}

.btn--small {
    padding: 10px 24px;
    font-size: 14px;
}

.btn--sm {
    padding: 10px 20px;
    font-size: 14px;
}

.btn svg {
    flex-shrink: 0;
}

/* ============================================================
   ШАПКА (HEADER)
   ============================================================ */
.header {
    background-color: var(--color-white);
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header__top {
    background-color: var(--color-dark);
    color: var(--color-white);
    padding: 8px 0;
}

.header__top-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px 20px;
    font-size: 14px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--color-white);
    font-weight: 700;
    font-size: 20px;
}

.logo img {
    height: 36px;
    width: auto;
}

.header__contacts {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.header__phone {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--color-white);
    font-weight: 600;
    font-size: 16px;
}

.header__phone:hover {
    color: var(--color-accent);
}

.header__address {
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0.8;
    font-size: 14px;
}

.header__right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header__schedule {
    font-size: 14px;
    opacity: 0.8;
}

.header__social {
    color: var(--color-white);
    transition: opacity 0.2s ease;
    display: flex;
    align-items: center;
}

.header__social:hover {
    opacity: 0.7;
    color: var(--color-white);
}

.header__bottom {
    background-color: var(--color-white);
    padding: 4px 0;
}

.header__bottom-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.nav__list {
    display: flex;
    align-items: center;
    list-style: none;
    gap: 0;
    margin: 0;
    padding: 0;
}

.nav__list>li {
    position: relative;
}

.nav__list>li>a {
    display: block;
    padding: 12px 18px;
    color: var(--color-text);
    font-weight: 600;
    font-size: 15px;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
    white-space: nowrap;
}

.nav__list>li>a:hover,
.nav__list>li>a.active {
    color: var(--color-accent);
    background-color: rgba(255, 107, 107, 0.08);
}

.dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: var(--color-white);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    padding: 8px 0;
    list-style: none;
    border: 1px solid var(--color-border);
}

.nav__item--dropdown:hover .dropdown {
    display: block;
}

.dropdown li a {
    display: block;
    padding: 8px 20px;
    color: var(--color-text);
    font-size: 14px;
    transition: all 0.15s ease;
}

.dropdown li a:hover {
    background-color: var(--color-bg);
    color: var(--color-accent);
}

.dropdown--wide {
    min-width: 480px;
    column-count: 2;
    column-gap: 0;
}

.dropdown--wide li {
    break-inside: avoid;
}

.burger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
}

.burger span {
    display: block;
    width: 28px;
    height: 3px;
    background: var(--color-text);
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* ============================================================
   СЕКЦИИ И КОМПОНЕНТЫ
   ============================================================ */
.section {
    padding: 60px 0;
}

.section--muted {
    background-color: var(--color-bg-light);
}

.section--primary {
    background-color: var(--color-accent);
    color: var(--color-white);
}

.section--primary .section__title {
    color: var(--color-white);
}

.section--primary .section__subtitle {
    color: rgba(255, 255, 255, 0.9);
}

.section--primary .btn--accent {
    background-color: var(--color-white);
    color: var(--color-accent);
}

.section--primary .btn--accent:hover {
    background-color: var(--color-bg);
    color: #d35400;
}

.section__head {
    text-align: center;
    margin-bottom: 40px;
}

.section__title {
    font-family: var(--font-family-heading);
    font-size: 38px;
    font-weight: 700;
    color: var(--color-dark);
    margin-bottom: 12px;
}

.section__subtitle {
    font-size: 18px;
    color: var(--color-text-light);
    max-width: 640px;
    margin: 0 auto;
}

.section__cta {
    text-align: center;
    margin-top: 40px;
}

/* ============================================================
   ГЕРОЙ (HOMEPAGE)
   ============================================================ */
.hero {
    padding: 40px 0 60px;
    background: var(--color-white);
}

.hero__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.hero__content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--color-bg);
    padding: 6px 16px 6px 10px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text);
    width: fit-content;
}

.badge__dot {
    width: 8px;
    height: 8px;
    background: var(--color-accent);
    border-radius: 50%;
    display: inline-block;
}

.hero__title {
    font-family: var(--font-family-heading);
    font-size: 48px;
    font-weight: 700;
    color: var(--color-dark);
    line-height: 1.15;
}

.hero__lead {
    font-size: 18px;
    color: var(--color-text-light);
    max-width: 520px;
}

.hero__actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.hero__media {
    position: relative;
}

.hero__image-wrap {
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--color-border);
}

.hero__image-wrap img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

.hero__badge-float {
    position: absolute;
    bottom: -20px;
    right: -20px;
    background: var(--color-white);
    border-radius: var(--radius);
    padding: 20px 24px;
    box-shadow: var(--shadow-md);
    text-align: center;
    border: 1px solid var(--color-border);
}

.hero__badge-num {
    font-family: var(--font-family-heading);
    font-size: 32px;
    font-weight: 800;
    color: var(--color-accent);
    line-height: 1;
}

.hero__badge-text {
    font-size: 14px;
    color: var(--color-text-light);
    margin-top: 4px;
}

/* ============================================================
   СЕТКИ И КАРТОЧКИ
   ============================================================ */
.grid {
    display: grid;
    gap: 24px;
}

.grid--2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid--3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid--4 {
    grid-template-columns: repeat(4, 1fr);
}

.grid--directions {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.card {
    background: var(--color-white);
    border-radius: var(--radius);
    padding: 24px 20px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border);
    transition: all 0.25s ease;
    text-align: center;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.card__icon {
    font-size: 40px;
    margin-bottom: 12px;
    display: block;
    background: var(--color-bg-light);
    width: 64px;
    height: 64px;
    line-height: 64px;
    border-radius: 50%;
    margin-left: auto;
    margin-right: auto;
}

.card__title {
    font-family: var(--font-family-heading);
    font-size: 20px;
    font-weight: 700;
    color: var(--color-dark);
    margin-bottom: 4px;
}

.card__subtitle {
    font-size: 15px;
    color: var(--color-accent);
    font-weight: 700;
    margin-bottom: 8px;
}

.card__desc {
    font-size: 15px;
    color: var(--color-text-light);
    line-height: 1.5;
}

/* ===== Карточка возраста ===== */
.age-card .card__icon {
    font-size: 36px;
    background: var(--color-bg-light);
    width: 72px;
    height: 72px;
    line-height: 72px;
    border-radius: 50%;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 14px;
    color: var(--color-accent);
}

.age-card .card__title {
    font-size: 22px;
    font-weight: 700;
    color: var(--color-dark);
}

.age-card .card__subtitle {
    font-size: 16px;
    font-weight: 600;
    color: var(--color-accent);
    background: var(--color-bg-light);
    display: inline-block;
    padding: 2px 16px;
    border-radius: 20px;
    margin-top: 4px;
}

/* ===== Шаги ===== */
.step {
    background: var(--color-white);
    border-radius: var(--radius);
    padding: 30px 20px;
    text-align: center;
    border: 1px solid var(--color-border);
}

.step__number {
    font-family: var(--font-family-heading);
    font-size: 40px;
    font-weight: 800;
    color: var(--color-accent);
    opacity: 0.3;
    display: block;
    margin-bottom: 8px;
}

.step__title {
    font-family: var(--font-family-heading);
    font-size: 20px;
    font-weight: 700;
    color: var(--color-dark);
    margin-bottom: 6px;
}

.step__desc {
    font-size: 15px;
    color: var(--color-text-light);
}

/* ===== Популярные направления ===== */
.popular-card {
    background: var(--color-white);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--color-border);
    transition: all 0.25s ease;
}

.popular-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.popular-card__image {
    width: 100%;
    height: 240px;
    object-fit: cover;
    object-position: center;
    border-radius: var(--radius) var(--radius) 0 0;
    background-color: var(--color-border);
}

.popular-card__body {
    padding: 16px 20px 20px;
}

.popular-card__tag {
    display: inline-block;
    font-size: 13px;
    font-weight: 700;
    color: var(--color-white);
    background: var(--color-accent);
    padding: 4px 16px;
    border-radius: 20px;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.popular-card__title {
    font-family: var(--font-family-heading);
    font-size: 20px;
    font-weight: 700;
    color: var(--color-dark);
    margin-bottom: 4px;
}

.popular-card__desc {
    font-size: 15px;
    color: var(--color-text-light);
}

/* ============================================================
   FAQ
   ============================================================ */
.faq {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.faq__item {
    background: var(--color-white);
    border-radius: var(--radius-sm);
    border: 1px solid var(--color-border);
    overflow: hidden;
}

.faq__question {
    width: 100%;
    padding: 18px 24px;
    background: none;
    border: none;
    font-family: var(--font-family);
    font-size: 17px;
    font-weight: 700;
    color: var(--color-dark);
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    text-align: left;
    transition: background 0.2s ease;
}

.faq__question:hover {
    background: var(--color-bg);
}

.faq__icon {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    position: relative;
    transition: transform 0.3s ease;
    background: var(--color-bg-light);
    border-radius: 50%;
}

.faq__icon::before,
.faq__icon::after {
    content: '';
    position: absolute;
    background: var(--color-accent);
    border-radius: 2px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.faq__icon::before {
    width: 14px;
    height: 2px;
}

.faq__icon::after {
    width: 2px;
    height: 14px;
}

.faq__item.open .faq__icon {
    transform: rotate(45deg);
}

.faq__answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.3s ease;
    padding: 0 24px;
}

.faq__item.open .faq__answer {
    max-height: 300px;
    padding: 0 24px 20px;
}

.faq__answer p {
    font-size: 16px;
    color: var(--color-text-light);
    margin: 0;
}

/* ============================================================
   ФОРМА
   ============================================================ */
.contact-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    background: var(--color-white);
    border-radius: var(--radius);
    padding: 40px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--color-border);
}

.contact-card__title {
    font-family: var(--font-family-heading);
    font-size: 28px;
    font-weight: 700;
    color: var(--color-dark);
    margin-bottom: 12px;
}

.contact-card__text {
    font-size: 16px;
    color: var(--color-text-light);
    margin-bottom: 20px;
}

.contact-card__list {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.contact-card__list li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 16px;
    color: var(--color-text);
}

.contact-card__list li::before {
    content: '✓';
    color: var(--color-white);
    background: var(--color-accent);
    font-weight: 700;
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 14px;
    flex-shrink: 0;
}

.form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.field label {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text);
}

.field input,
.field select,
.field textarea {
    padding: 12px 16px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-family: var(--font-family);
    font-size: 15px;
    background: var(--color-white);
    transition: border-color 0.2s ease;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.15);
}

.field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.field--checkbox {
    margin-top: 4px;
}

.checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 14px;
    color: var(--color-text);
    cursor: pointer;
}

.checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    margin-top: 2px;
    accent-color: var(--color-accent);
    cursor: pointer;
}

.checkbox a {
    color: var(--color-accent);
    text-decoration: underline;
    font-weight: 600;
}

.checkbox a:hover {
    color: #d35400;
}

.form__note {
    font-size: 13px;
    color: var(--color-text-light);
    text-align: center;
}

.form-success {
    text-align: center;
    padding: 20px 0;
}

.form-success svg {
    color: var(--color-accent);
    margin-bottom: 12px;
}

.form-success h3 {
    font-family: var(--font-family-heading);
    font-size: 24px;
    color: var(--color-dark);
    margin-bottom: 8px;
}

.form-success p {
    color: var(--color-text-light);
}

/* ============================================================
   ПОДВАЛ (FOOTER)
   ============================================================ */
.footer {
    background: var(--color-dark);
    color: rgba(255, 255, 255, 0.8);
    padding: 40px 0 20px;
    margin-top: 40px;
}

.footer__grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand__mark {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--color-accent);
    border-radius: 10px;
    color: var(--color-white);
}

.brand__name {
    font-family: var(--font-family-heading);
    font-size: 22px;
    font-weight: 700;
    color: var(--color-white);
}

.footer__about {
    font-size: 14px;
    opacity: 0.7;
    margin-top: 12px;
    max-width: 260px;
}

.footer__heading {
    font-size: 16px;
    font-weight: 700;
    color: var(--color-white);
    margin-bottom: 12px;
}

.footer__links,
.footer__contacts {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.footer__links a,
.footer__contacts a {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
}

.footer__links a:hover,
.footer__contacts a:hover {
    color: var(--color-accent);
}

.footer__contacts li {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
}

.footer__cta {
    margin-top: 12px;
}

.footer__bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    text-align: center;
    font-size: 14px;
    opacity: 0.6;
}

/* ============================================================
   АДАПТИВНОСТЬ
   ============================================================ */
@media (max-width: 1024px) {
    .dropdown--wide {
        min-width: 300px;
        column-count: 1;
    }

    .header__top-inner {
        justify-content: center;
        text-align: center;
    }

    .header__contacts {
        justify-content: center;
    }

    .header__right {
        justify-content: center;
        flex-wrap: wrap;
    }

    .hero__grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero__content {
        align-items: center;
    }

    .hero__lead {
        max-width: 100%;
    }

    .hero__actions {
        justify-content: center;
    }

    .hero__badge-float {
        position: relative;
        bottom: 0;
        right: 0;
        margin-top: -20px;
    }

    .grid--4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .contact-card {
        grid-template-columns: 1fr;
        padding: 24px;
    }

    .footer__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer__about {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .header__top-inner {
        flex-direction: column;
        gap: 6px;
        padding: 4px 0;
    }

    .header__contacts {
        flex-direction: column;
        gap: 4px;
    }

    .header__phone {
        font-size: 15px;
    }

    .header__address {
        font-size: 13px;
    }

    .header__schedule {
        font-size: 13px;
    }

    .nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--color-white);
        padding: 16px;
        box-shadow: var(--shadow-lg);
        border-top: 1px solid var(--color-border);
        z-index: 999;
    }

    .nav.open {
        display: block;
    }

    .nav__list {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
    }

    .nav__list>li>a {
        padding: 12px 16px;
        border-bottom: 1px solid var(--color-border);
        white-space: normal;
    }

    .dropdown {
        position: static;
        box-shadow: none;
        border: none;
        border-radius: 0;
        padding-left: 20px;
        background: var(--color-bg);
        min-width: auto;
    }

    .dropdown--wide {
        min-width: auto;
        column-count: 1;
    }

    .nav__item--dropdown:hover .dropdown {
        display: none;
    }

    .nav__item--dropdown.open .dropdown {
        display: block;
    }

    .burger {
        display: flex;
    }

    .header__bottom-inner {
        flex-wrap: wrap;
        position: relative;
    }

    .btn--small {
        margin-left: auto;
    }

    .section {
        padding: 40px 0;
    }

    .section__title {
        font-size: 30px;
    }

    .hero__title {
        font-size: 32px;
    }

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

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

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

    .field-row {
        grid-template-columns: 1fr;
    }

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

    .contact-card {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .logo__text {
        display: none;
    }

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

    .hero__title {
        font-size: 28px;
    }

    .hero__badge-float {
        padding: 14px 18px;
    }

    .hero__badge-num {
        font-size: 24px;
    }

    .btn {
        padding: 12px 24px;
        font-size: 14px;
        width: 100%;
        justify-content: center;
    }

    .hero__actions {
        flex-direction: column;
        width: 100%;
    }
}