/* ============================================================
   Academy — единый стиль редизайна (идентичен макету)
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Inter', sans-serif;
    color: #0d1a3a;
    background: linear-gradient(155deg, #eaf3ff 0%, #d4e8ff 50%, #bcd5ff 100%);
    background-attachment: fixed;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
img { max-width: 100%; }
a { color: inherit; }
main { flex: 1 0 auto; }

/* ===================== PAGE TRANSITIONS (появление при прокрутке) ===================== */
/* Блоки скрыты заранее (класс js-on ставится скриптом до отрисовки) и плавно
   появляются, когда попадают во вьюпорт при прокрутке. */
html.js-on .container-rd > * {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
html.js-on .container-rd > *.is-visible {
    opacity: 1;
    transform: none;
}
@media (prefers-reduced-motion: reduce) {
    html.js-on .container-rd > * { opacity: 1; transform: none; transition: none; }
}

@media (max-width: 600px) {
    html.js-on .container-rd > * {
        transform: translateY(16px);
        transition-duration: 0.55s;
    }
}

::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: rgba(0,0,0,0.04); }
::-webkit-scrollbar-thumb { background: rgba(26,86,219,0.35); border-radius: 4px; }

@keyframes heroGlow { 0%,100% { opacity: 0.35; } 50% { opacity: 0.65; } }
@keyframes floatY  { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes fadeUp  { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

.font-mont { font-family: 'Montserrat', sans-serif; }
.container-rd { max-width: 1240px; margin: 0 auto; padding: 24px 28px 60px; }

/* ===================== HEADER ===================== */
.site-header {
    position: sticky; top: 0; z-index: 100;
    background: rgba(255,255,255,0.93);
    backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid rgba(190,215,255,0.55);
    box-shadow: 0 1px 24px rgba(10,30,100,0.06);
}
.site-header__inner {
    max-width: 1240px; margin: 0 auto; padding: 0 28px; height: 70px;
    display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; flex-shrink: 0; cursor: pointer; }
.brand__logo {
    width: 54px; height: 54px; background: #fff; border-radius: 14px;
    box-shadow: 0 2px 14px rgba(26,86,219,0.14), 0 0 0 1.5px rgba(26,86,219,0.08);
    padding: 5px; display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.brand__logo img { width: 100%; height: 100%; object-fit: contain; display: block; }
.brand__name { font-family: 'Montserrat', sans-serif; font-weight: 800; font-size: 18px; color: #0d1a3a; line-height: 1.15; }
.brand__sub { font-size: 10px; color: #7a98c0; letter-spacing: 0.1em; text-transform: uppercase; font-weight: 500; }
.brand__code { display: flex; flex-direction: column; font-family: 'Montserrat', sans-serif; font-weight: 800; line-height: 1.04; letter-spacing: -0.01em; }
.brand__l1 { font-size: 18px; color: #1a56db; }
.brand__l2 { font-size: 18px; color: #0d1a3a; }
.brand__code .brand__br { color: #1a56db; }

.main-nav { display: flex; align-items: center; gap: 4px; }
.nav-link-rd {
    padding: 8px 16px; border-radius: 10px; font-size: 14px; font-family: 'Inter', sans-serif;
    text-decoration: none; transition: all 0.2s; white-space: nowrap; color: #2d3a55; font-weight: 500;
}
.nav-link-rd:hover { background: rgba(26,86,219,0.07); color: #1a56db; }
.nav-link-rd.active { color: #1a56db; background: rgba(26,86,219,0.08); font-weight: 600; }

.header-phone { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.header-phone__icon { width: 40px; height: 40px; background: rgba(26,86,219,0.08); border-radius: 10px; display: flex; align-items: center; justify-content: center; }
.header-phone__label { font-size: 10px; color: #7a98c0; font-weight: 500; }
.header-phone__num { font-family: 'Montserrat', sans-serif; font-weight: 700; font-size: 14px; color: #0d1a3a; text-decoration: none; }
.header-phone__num:hover { color: #1a56db; }

.nav-toggle { display: none; background: rgba(26,86,219,0.08); border: none; border-radius: 10px; width: 42px; height: 42px; cursor: pointer; align-items: center; justify-content: center; color: #1a56db; }

/* ===================== PANELS / SECTIONS ===================== */
.panel { background: #fff; border-radius: 28px; padding: 40px; box-shadow: 0 2px 28px rgba(10,25,100,0.08); margin-bottom: 24px; }
.panel:last-child { margin-bottom: 0; }
.section-eyebrow { font-size: 11px; font-weight: 700; color: #1a56db; text-transform: uppercase; letter-spacing: 0.12em; margin-bottom: 6px; font-family: 'Montserrat', sans-serif; }
.section-title { font-family: 'Montserrat', sans-serif; font-weight: 800; font-size: 28px; color: #0d1a3a; margin: 0; }
.section-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 32px; gap: 16px; flex-wrap: wrap; }

/* ===================== HERO (dark) ===================== */
.hero-dark {
    background: linear-gradient(140deg, #051b3f 0%, #0a2860 50%, #103888 100%);
    border-radius: 28px; position: relative; overflow: hidden; margin-bottom: 24px; padding: 56px;
}
.hero-dark--home { padding: 72px 56px 64px; }
.hero-glow { position: absolute; top: -120px; right: -80px; width: 600px; height: 600px;
    background: radial-gradient(circle, rgba(26,86,219,0.2) 0%, transparent 65%); pointer-events: none; animation: heroGlow 4s ease-in-out infinite; }
.hero-glow--sm { top: -80px; right: -60px; width: 400px; height: 400px; background: radial-gradient(circle, rgba(26,86,219,0.2) 0%, transparent 70%); animation: none; }
.hero-inner { position: relative; z-index: 1; }
.hero-center { display: flex; flex-direction: column; align-items: center; text-align: center; max-width: 860px; margin: 0 auto; }
.hero-split { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 48px; align-items: center; }
.hero-copy { min-width: 0; }
.hero-split .hero-sub { max-width: 540px; margin-bottom: 36px; }
.hero-split .hero-actions { justify-content: flex-start; }
.hero-diagram { display: flex; align-items: center; justify-content: center; }
.hero-diagram svg, .hero-diagram img { width: 100%; max-width: 460px; height: auto; display: block; }
.hero-diagram img { pointer-events: none; user-select: none; -webkit-user-drag: none; }
.vibra-promo { padding: 44px 56px; }
/* Текст и картинка выравниваются по верхней кромке, а не по центру: иначе
   заголовок «проваливался» к середине блока.
   Высоту картинки при этом держим под потолком в 220px (см. ниже) — примерно
   высота текстовой колонки, чтобы блок не вытягивался по вертикали. */
.vibra-promo .hero-split { align-items: stretch; grid-template-columns: 1.2fr 0.8fr; }
/* Кнопка «Подробнее» идёт сразу за подписью, а не прижимается к низу
   колонки: подпись короткая, и при прижатии под ней оставался пустой зазор. */
/* Значок фестиваля стоит в колонке между подписью и кнопкой «Подробнее».
   Колонку расширили (1.2fr/0.8fr вместо стандартных 1.05/0.95), а подпись
   уменьшили и убрали межбуквенный интервал — так строка с названием
   фестиваля и датами помещается в одну линию без переноса.
   Селектор из двух классов обязателен: правила .hero-badge объявлены ниже
   по файлу и при равной специфичности перебивали бы эти. */
.vibra-promo .hero-badge { align-items: center; max-width: 100%; margin-bottom: 34px; padding: 10px 18px; }
.vibra-promo .hero-badge__dot { margin-top: 0; }
.vibra-promo .hero-badge__txt { line-height: 1.5; font-size: 9px; letter-spacing: normal; white-space: nowrap; }
.vibra-promo__title { font-size: clamp(34px, 4.4vw, 58px); margin-bottom: 22px; }
.vibra-promo .hero-sub { margin-bottom: 24px; line-height: 1.85; }
.vibra-promo__visual { display: flex; justify-content: center; align-items: center; min-height: 0; }
.vibra-promo__visual img {
    width: auto;
    max-width: min(100%, 460px);
    /* Потолок по высоте держит картинку вровень с текстовой колонкой. */
    max-height: 220px;
    height: auto;
    /* Сильное размытие: картинка работает мягким цветным пятном, а не
       самостоятельным изображением — как аура на странице виброизображения. */
    filter: blur(9px) saturate(1.15) drop-shadow(0 22px 54px rgba(77,132,255,0.3));
    opacity: 0.94;
}
@media (max-width: 900px) {
    .hero-split { grid-template-columns: 1fr; gap: 32px; }
    .hero-diagram { order: -1; }
    .hero-diagram svg, .hero-diagram img { max-width: 340px; }
    .vibra-promo__visual { order: -1; min-height: 220px; }
    .vibra-promo__visual img { max-width: 320px; }
}
/* На узких ноутбучных ширинах (901-1150px) колонка с бейджем (1.2fr) уже
   недостаточно широкая для строки без переноса, и текст с white-space:nowrap
   вылезал бы поверх картинки-ауры. Переводим промо-блок в одну колонку раньше,
   чем основной hero, — тогда бейджу хватает полной ширины блока. */
@media (max-width: 1150px) {
    .vibra-promo .hero-split { grid-template-columns: 1fr; gap: 24px; }
    .vibra-promo__visual { order: -1; min-height: 160px; }
    .vibra-promo__visual img { max-width: 320px; max-height: 170px; }
}
.hero-badge { display: inline-flex; align-items: center; gap: 8px; background: rgba(26,86,219,0.18); border: 1px solid rgba(100,160,255,0.3); padding: 6px 16px; border-radius: 20px; margin-bottom: 28px; }
.hero-badge__dot { width: 6px; height: 6px; background: #60a5fa; border-radius: 50%; flex-shrink: 0; }
.hero-badge__txt { font-size: 11px; font-weight: 700; color: #93c5fd; letter-spacing: 0.12em; text-transform: uppercase; font-family: 'Montserrat', sans-serif; }
.hero-h1 { font-family: 'Montserrat', sans-serif; font-weight: 900; color: #fff; line-height: 1.05; margin-bottom: 14px; letter-spacing: -0.02em; font-size: 44px; }
.hero-h1--home { font-size: clamp(38px, 5vw, 72px); line-height: 0.97; margin-bottom: 22px; letter-spacing: -0.03em; }
.hero-h1 .accent { color: #60a5fa; }
.hero-sub { font-size: 16px; color: rgba(148,190,255,0.88); line-height: 1.75; }
/* Тот же цвет, что в верхнем блоке главной («Основными целями нашей
   организации…»), чтобы подписи на странице не различались оттенком. */
.hero-dark--home .hero-sub, .vibra-promo .hero-sub { color: #e4eeff; }
.hero-center .hero-sub { max-width: 520px; margin-bottom: 40px; }
.hero-actions { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; justify-content: center; }

/* ===================== BUTTONS ===================== */
.btn-rd { display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; text-decoration: none; font-family: 'Montserrat', sans-serif; transition: all 0.2s; border: none; }
.btn-primary-rd { background: linear-gradient(135deg, #1a56db, #1040b8); color: #fff; padding: 15px 36px; border-radius: 12px; font-weight: 700; font-size: 15px; box-shadow: 0 6px 24px rgba(26,86,219,0.45); }
.btn-primary-rd:hover { transform: translateY(-2px); box-shadow: 0 10px 36px rgba(26,86,219,0.6); }
.btn-ghost-rd { background: transparent; color: rgba(255,255,255,0.88); border: 1.5px solid rgba(255,255,255,0.25); padding: 15px 36px; border-radius: 12px; font-weight: 600; font-size: 15px; }
.btn-ghost-rd:hover { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.5); }
.btn-soft-rd { background: rgba(26,86,219,0.07); color: #1a56db; border: 1.5px solid rgba(26,86,219,0.2); padding: 10px 22px; border-radius: 10px; font-weight: 600; font-size: 13px; white-space: nowrap; }
.btn-soft-rd:hover { background: #1a56db; color: #fff; border-color: #1a56db; }
.btn-blue-rd { background: #1a56db; color: #fff; padding: 8px 18px; border-radius: 8px; font-weight: 600; font-size: 13px; }
.btn-blue-rd:hover { background: #0f3ebf; }

/* ===================== GRIDS ===================== */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

/* ===================== COURSE CARD ===================== */
.course-card { border-radius: 20px; overflow: hidden; border: 1.5px solid #e8f0ff; transition: all 0.25s; background: #fff; display: flex; flex-direction: column; text-decoration: none; color: inherit; }
.course-card:hover { transform: translateY(-5px); box-shadow: 0 12px 40px rgba(10,25,100,0.14); border-color: #c0d4ff; }
/* Заглушка «курсы в разработке» — подставляется, когда программ меньше трёх.
   Занимает все свободные ячейки сетки (--soon-span задаётся в шаблоне),
   чтобы в ряду не оставалось пустого места. Пунктир и приглушённые цвета
   отличают её от настоящих карточек. */
.soon-card {
    grid-column: span var(--soon-span, 1);
    border-radius: 20px;
    border: 1.5px dashed #ccdcf5;
    background: #f7faff;
    padding: 32px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 220px;
    color: #5a7299;
}
.soon-card__icon { color: #8fb0e0; margin-bottom: 12px; }
.soon-card__title { font-family: 'Montserrat', sans-serif; font-weight: 700; font-size: 16px; color: #47597a; margin-bottom: 8px; }
.soon-card__text { font-size: 14px; line-height: 1.6; max-width: 320px; }
/* На узких экранах сетка и так в одну колонку — растягивать нечего. */
@media (max-width: 900px) {
    .soon-card { grid-column: span 1; }
}

.course-card__head { height: 120px; display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden; }
.course-card__icon { font-size: 46px; line-height: 1; user-select: none; }
.course-card__code { font-family: 'Montserrat', sans-serif; font-weight: 800; font-size: 70px; line-height: 1; letter-spacing: 0.02em; color: rgba(255,255,255,0.22); user-select: none; }
.course-card__body { padding: 20px; background: #fff; flex: 1; display: flex; flex-direction: column; }
.course-card__eyebrow { font-family: 'Montserrat', sans-serif; font-weight: 700; font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: #8a98ad; margin-bottom: 8px; }
.course-card__title { font-family: 'Montserrat', sans-serif; font-weight: 700; font-size: 16px; color: #0d1a3a; margin-bottom: 10px; line-height: 1.35; }
.course-card__desc { font-size: 13px; color: #5a7299; line-height: 1.65; margin-bottom: 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.chip { font-size: 11px; padding: 3px 10px; border-radius: 6px; background: #eef3ff; color: #1a56db; font-weight: 600; font-family: 'Montserrat', sans-serif; }
.course-card__foot { display: flex; justify-content: space-between; align-items: center; margin-top: auto; }
.course-card__dur { font-size: 12px; color: #7a98c0; display: flex; align-items: center; gap: 4px; }

/* ===================== FEATURE CARDS (why us) ===================== */
.feature-card { border-radius: 20px; padding: 28px; }
.feature-card__icon { width: 52px; height: 52px; border-radius: 14px; display: flex; align-items: center; justify-content: center; margin-bottom: 20px; }
.feature-card h4 { font-family: 'Montserrat', sans-serif; font-weight: 700; font-size: 16px; color: #0d1a3a; margin-bottom: 10px; }
.feature-card p { font-size: 14px; color: #5a7299; line-height: 1.65; }

/* ===================== TAG FILTER ===================== */
.tag-pill { padding: 7px 18px; border-radius: 20px; font-size: 13px; font-family: 'Inter', sans-serif; font-weight: 500; cursor: pointer; transition: all 0.2s; background: transparent; color: #1a56db; border: 1.5px solid rgba(26,86,219,0.3); }
.tag-pill:hover { opacity: 0.8; }
.tag-pill.active { background: #1a56db; color: #fff; border-color: #1a56db; font-weight: 600; }
.btn-reset { background: transparent; border: 1px solid #dce8ff; color: #5a7299; padding: 6px 14px; border-radius: 8px; font-size: 13px; cursor: pointer; transition: all 0.2s; font-family: 'Inter', sans-serif; }
.btn-reset:hover { border-color: #1a56db; color: #1a56db; }

/* ===================== TEACHER CARD ===================== */
.teacher-card { border-radius: 20px; overflow: hidden; border: 1.5px solid #e8f0ff; transition: all 0.25s; background: #fff; }
.teacher-card:hover { transform: translateY(-5px); box-shadow: 0 14px 40px rgba(10,25,100,0.14); border-color: #c0d4ff; }
.teacher-card__photo { height: 190px; display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden; }
.teacher-card__photo img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.teacher-ph { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; height: 100%; position: relative; z-index: 1; }
.teacher-ph__circle { width: 70px; height: 70px; border-radius: 50%; border: 3px solid rgba(255,255,255,0.35); display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,0.12); }
.teacher-ph__ini { font-family: 'Montserrat', sans-serif; font-weight: 900; font-size: 28px; color: rgba(255,255,255,0.9); line-height: 1; letter-spacing: -0.02em; margin-top: 2px; }
.teacher-ph__note { font-size: 9px; color: rgba(255,255,255,0.45); font-family: 'Montserrat', sans-serif; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; margin-top: 2px; }
.teacher-card__body { padding: 16px 18px 20px; text-align: center; }
.teacher-card__name { font-family: 'Montserrat', sans-serif; font-weight: 700; font-size: 13px; color: #0d1a3a; margin-bottom: 4px; line-height: 1.35; }
.teacher-card__pos { font-size: 12px; color: #1a56db; font-weight: 600; margin-bottom: 8px; line-height: 1.3; }
.teacher-card__area { font-size: 12px; color: #5a7299; line-height: 1.5; margin-bottom: 12px; }
.teacher-card__exp { font-size: 11px; color: #7a98c0; background: #f0f5ff; padding: 4px 10px; border-radius: 8px; display: inline-block; font-family: 'Montserrat', sans-serif; font-weight: 600; }

/* ===================== NEWS CARD ===================== */
.news-card { border-radius: 20px; overflow: hidden; border: 1.5px solid #e8f0ff; transition: all 0.25s; background: #fff; }
.news-card:hover { transform: translateY(-5px); box-shadow: 0 12px 40px rgba(10,25,100,0.14); border-color: #c0d4ff; }
.news-card__bar { height: 6px; }
.news-card__body { padding: 24px; }
.news-card__tag { padding: 3px 10px; border-radius: 12px; font-size: 11px; font-weight: 600; font-family: 'Montserrat', sans-serif; text-transform: uppercase; letter-spacing: 0.06em; display: inline-block; margin-bottom: 14px; }
.news-card__title { font-family: 'Montserrat', sans-serif; font-weight: 700; font-size: 16px; color: #0d1a3a; margin-bottom: 10px; line-height: 1.4; }
.news-card__desc { font-size: 14px; color: #5a7299; line-height: 1.65; margin-bottom: 16px; }
.news-card__foot { display: flex; justify-content: space-between; align-items: center; }
.news-card__date { font-size: 12px; color: #7a98c0; }
.link-arrow { font-size: 13px; color: #1a56db; font-weight: 600; text-decoration: none; }
.link-arrow:hover { text-decoration: underline; }

/* ===================== DOCUMENT CARD ===================== */
.doc-card { border-radius: 20px; border: 1.5px solid #e8f0ff; overflow: hidden; transition: all 0.25s; background: #fff; }
.doc-card:hover { transform: translateY(-4px); box-shadow: 0 12px 36px rgba(10,25,100,0.12); border-color: #c0d4ff; }
.doc-card__head { height: 120px; display: flex; align-items: center; justify-content: center; }
.doc-card__head-inner { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; }
.doc-card__type { font-family: 'Montserrat', sans-serif; font-weight: 800; font-size: 14px; color: rgba(255,255,255,0.9); letter-spacing: 0.08em; }
.doc-card__body { padding: 20px; background: #fff; }
.doc-card__cat { display: inline-block; padding: 3px 10px; border-radius: 10px; font-size: 11px; font-weight: 700; font-family: 'Montserrat', sans-serif; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 10px; }
.doc-card__title { font-family: 'Montserrat', sans-serif; font-weight: 700; font-size: 14px; color: #0d1a3a; line-height: 1.4; margin-bottom: 16px; }
.doc-card__foot { display: flex; justify-content: space-between; align-items: center; }
.doc-card__date { font-size: 12px; color: #7a98c0; }
.btn-download { display: inline-flex; align-items: center; gap: 6px; background: #1a56db; color: #fff; padding: 8px 16px; border-radius: 8px; font-family: 'Montserrat', sans-serif; font-weight: 600; font-size: 13px; text-decoration: none; transition: all 0.2s; }
.btn-download:hover { background: #0f3ebf; }

/* ===================== COURSE DETAIL ===================== */
.cd-back { background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2); color: rgba(255,255,255,0.8); padding: 8px 18px; border-radius: 8px; font-size: 13px; cursor: pointer; margin-bottom: 32px; transition: all 0.2s; display: inline-flex; align-items: center; gap: 6px; font-family: 'Montserrat', sans-serif; position: relative; z-index: 1; text-decoration: none; }
.cd-back:hover { background: rgba(255,255,255,0.18); }
.cd-grid { display: grid; grid-template-columns: 1fr 280px; gap: 48px; align-items: center; position: relative; z-index: 1; }
.cd-eyebrow { font-size: 11px; font-weight: 700; color: #93c5fd; text-transform: uppercase; letter-spacing: 0.12em; margin-bottom: 12px; font-family: 'Montserrat', sans-serif; }
.cd-title { font-family: 'Montserrat', sans-serif; font-weight: 900; font-size: clamp(28px, 4vw, 48px); color: #fff; line-height: 1.05; margin-bottom: 14px; letter-spacing: -0.02em; }
.cd-desc { font-size: 16px; color: rgba(148,190,255,0.9); line-height: 1.75; max-width: 500px; margin-bottom: 24px; }
.cd-metachips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.cd-metachip { display: inline-flex; align-items: center; gap: 6px; background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.12); border-radius: 30px; padding: 7px 14px; font-size: 13px; color: #cdd9e5; }
.cd-metachip__dot { width: 5px; height: 5px; border-radius: 50%; background: #60a5fa; flex: none; }
.cd-facts { background: rgba(255,255,255,0.07); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border: 1px solid rgba(255,255,255,0.1); border-radius: 20px; padding: 12px 20px; }
.cd-fact { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid rgba(255,255,255,0.08); }
.cd-fact:last-child { border-bottom: none; }
.cd-fact__ic { flex: none; width: 40px; height: 40px; border-radius: 11px; background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.1); display: flex; align-items: center; justify-content: center; color: #93c5fd; }
.cd-fact__k { font-size: 10px; color: rgba(148,190,255,0.6); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 3px; font-family: 'Montserrat', sans-serif; }
.cd-fact__v { font-family: 'Montserrat', sans-serif; font-weight: 700; font-size: 15px; color: #fff; line-height: 1.25; }

.cd-tabs { display: flex; gap: 8px; padding: 10px; }
.cd-tab { flex: 1; border: none; cursor: pointer; background: none; font-size: 15px; font-weight: 600; padding: 16px 20px; border-radius: 12px; transition: all 0.2s; color: #7a98c0; text-align: center; font-family: 'Inter', sans-serif; }
.cd-tab:hover { color: #1a56db; background: #f0f5ff; }
.cd-tab.active { color: #1a56db; background: #e2ecff; font-weight: 700; }
.panel--flush { padding: 0; overflow: hidden; }

/* Аккордеон «Содержание курса» */
.cd-acc { display: flex; flex-direction: column; gap: 12px; }
.cd-acc__item { background: #e9f1fd; border: 1px solid #dae6fb; border-radius: 14px; overflow: hidden; transition: background 0.2s; }
.cd-acc__item.open { background: #e2ecfb; }
.cd-acc__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%; text-align: left; background: none; border: none; cursor: pointer; padding: 18px 22px; font-family: 'Inter', sans-serif; }
.cd-acc__title { font-size: 15px; color: #0d1a3a; font-weight: 400; }
.cd-acc__title strong { font-weight: 700; }
.cd-acc__chev { flex: none; color: #5a7299; transition: transform 0.25s ease; }
.cd-acc__item.open .cd-acc__chev { transform: rotate(180deg); }
.cd-acc__body { max-height: 0; overflow: hidden; opacity: 0; transition: max-height 0.32s ease, opacity 0.28s ease; }
.cd-acc__item.open .cd-acc__body { max-height: 200px; opacity: 1; }
.cd-acc__body-inner { padding: 0 22px 18px; font-size: 14px; color: #38465e; line-height: 1.6; }

.cd-num { font-family: 'Montserrat', sans-serif; font-size: 11px; font-weight: 700; color: #1a56db; text-transform: uppercase; letter-spacing: 0.12em; margin-bottom: 10px; }
.cd-h2 { font-family: 'Montserrat', sans-serif; font-weight: 800; font-size: 22px; color: #0d1a3a; margin-bottom: 12px; }
.cd-prose { font-size: 15px; color: #38465e; line-height: 1.7; }
.cd-prose p { margin-bottom: 12px; }
.cd-prose ul, .cd-prose ol { padding-left: 22px; margin-bottom: 12px; }
.cd-prose li { margin-bottom: 8px; padding-left: 4px; }
.cd-prose li::marker { color: #1a56db; font-weight: 700; }
.cd-two { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; margin-bottom: 40px; }

/* Блоки «Подробнее о курсе», «Для кого этот курс», «Что вы будете уметь».
   В светлой теме оформления нет вообще — это обычный текст, поэтому здесь
   не задаём ни фон, ни рамку, ни внутренние отступы (иначе текст съехал бы
   относительно заголовков, которые стоят снаружи блока).
   Всё оформление живёт только в тёмной теме — см. html.dark ниже. */
.cd-soft-block { border-radius: 16px; }

/* CTA */
.cta-dark { background: linear-gradient(140deg, #051b3f 0%, #0a2860 50%, #103888 100%); border-radius: 28px; padding: 52px; display: flex; align-items: center; justify-content: space-between; gap: 36px; flex-wrap: wrap; position: relative; overflow: hidden; }
.cta-glow { position: absolute; top: -80px; right: -40px; width: 300px; height: 300px; border-radius: 50%; background: radial-gradient(circle, rgba(26,86,219,0.25), transparent 65%); pointer-events: none; }
.cta-actions { position: relative; display: flex; flex-direction: column; gap: 12px; min-width: 220px; }

/* ===================== CONTACTS / ABOUT ===================== */
.split-2 { display: grid; grid-template-columns: 1fr 1fr; }
.info-row { background: #f5f8ff; border-radius: 16px; padding: 20px; transition: background 0.2s; }
.info-row:hover { background: #eef4ff; }
.info-row__head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.info-row__ic { width: 40px; height: 40px; background: rgba(26,86,219,0.1); border-radius: 10px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.info-row__label { font-family: 'Montserrat', sans-serif; font-weight: 700; font-size: 14px; color: #0d1a3a; }
.map-box { background: linear-gradient(135deg, #f0f5ff, #e8eeff); border-radius: 20px; border: 2px dashed rgba(26,86,219,0.15); position: relative; overflow: hidden; }

/* ===================== FEEDBACK FORM ===================== */
.feedback-wrap { max-width: 640px; margin: 0 auto; }
#enroll { scroll-margin-top: 112px; }
.fb-form input[type="text"],
.fb-form input[type="email"],
.fb-form input[type="tel"],
.fb-form textarea {
    width: 100%; padding: 13px 16px; border: 1.5px solid #e0ecff; border-radius: 10px;
    font-size: 14px; font-family: 'Inter', sans-serif; outline: none; background: #fafcff;
    transition: border 0.2s; display: block;
}
.fb-form input:focus, .fb-form textarea:focus { border-color: #1a56db; box-shadow: 0 0 0 3px rgba(26,86,219,0.1); }
.fb-form textarea { resize: vertical; min-height: 110px; }
.fb-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.fb-field { margin-bottom: 12px; }
.fb-consent { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; }
.fb-consent input { width: 16px; height: 16px; cursor: pointer; accent-color: #1a56db; flex-shrink: 0; }
.fb-consent label { font-size: 13px; color: #5a7299; cursor: pointer; line-height: 1.5; }
.fb-consent a { color: #1a56db; text-decoration: none; }
.fb-consent a:hover { text-decoration: underline; }
.fb-submit { width: 100%; padding: 14px; border: none; border-radius: 12px; background: linear-gradient(135deg, #1a56db, #1040b8); color: #fff; font-family: 'Montserrat', sans-serif; font-weight: 700; font-size: 15px; cursor: pointer; transition: all 0.2s; }
.fb-submit:hover { transform: translateY(-2px); }
.fb-submit:disabled { background: #c8d8ef; cursor: not-allowed; opacity: 0.75; transform: none; }
.fb-submit .fb-spinner { display: none; width: 1rem; height: 1rem; border: 2px solid rgba(255,255,255,0.5); border-top-color: #fff; border-radius: 50%; animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.fb-error { display: none; color: #dc2626; font-size: 12px; margin-top: 4px; }
.fb-success { display: none; margin-top: 16px; background: linear-gradient(135deg, #f0fff8, #e8fff4); border: 1.5px solid rgba(6,95,70,0.2); border-radius: 16px; padding: 24px; text-align: center; color: #065f46; font-weight: 600; }

/* ===================== МОДАЛКА «ВЫШЛЕМ ПРОГРАММУ» =====================
   Открывается по «Подробнее» на карточке курса (страницы «Программы» и
   главная) вместо перехода на страницу курса. Фон только затемняется,
   без размытия — содержимое страницы под окном остаётся читаемым. */
.pr-modal {
    position: fixed; inset: 0; z-index: 1000;
    display: flex; align-items: center; justify-content: center;
    padding: 20px; overflow-y: auto;
    background: rgba(8, 15, 35, 0.6);
    /* Открытие/закрытие анимируется классом .is-open: hidden снимается сразу,
       класс — следующим кадром, чтобы переход успел стартовать (program_request.js). */
    opacity: 0;
    transition: opacity 0.28s ease;
}
/* display:flex перебил бы атрибут hidden — гасим окно явно. */
.pr-modal[hidden] { display: none; }
/* Пока окно гаснет, hidden ещё не выставлен — гасим и клики по нему. */
.pr-modal:not(.is-open) { pointer-events: none; }
.pr-modal.is-open { opacity: 1; }
.pr-modal__box {
    position: relative; width: 100%; max-width: 640px; margin: auto;
    opacity: 0;
    transform: translateY(24px) scale(0.97);
    transition: opacity 0.28s ease,
                transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}
.pr-modal.is-open .pr-modal__box { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
    .pr-modal, .pr-modal__box { transition: none; }
    .pr-modal__box { transform: none; }
}
.pr-modal__box .panel { margin-bottom: 0; }
.pr-modal__close {
    position: absolute; top: 16px; right: 16px; z-index: 1;
    width: 38px; height: 38px; border: none; border-radius: 50%;
    background: rgba(10,25,100,0.07); color: #5a7299;
    font-size: 24px; line-height: 1; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.2s, color 0.2s;
}
.pr-modal__close:hover { background: rgba(10,25,100,0.14); color: #0d1a3a; }
html.dark .pr-modal__close { background: rgba(255,255,255,0.08); color: #93a5bd; }
html.dark .pr-modal__close:hover { background: rgba(255,255,255,0.18); color: #fff; }

/* ===================== FOOTER ===================== */
.site-footer { background: #07122a; padding: 60px 0 32px; margin-top: auto; }
.site-footer__inner { max-width: 1240px; margin: 0 auto; padding: 0 28px; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 48px; margin-bottom: 48px; }
.footer-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.footer-brand__logo { width: 54px; height: 54px; background: #0a2860; border-radius: 14px; padding: 9px; display: flex; align-items: center; justify-content: center; }
.footer-brand__logo img { width: 100%; height: 100%; object-fit: contain; display: block; }
.footer-brand__name { font-family: 'Montserrat', sans-serif; font-weight: 800; font-size: 18px; color: #fff; line-height: 1.1; }
.footer-brand__sub { font-size: 10px; color: #fff; letter-spacing: 0.1em; text-transform: uppercase; }
.footer-about { font-size: 14px; color: #fff; line-height: 1.75; max-width: 280px; margin-bottom: 24px; }
.footer-socials { display: flex; gap: 10px; }
.footer-socials a { width: 36px; height: 36px; background: rgba(255,255,255,0.07); border-radius: 9px; display: flex; align-items: center; justify-content: center; color: rgba(148,190,255,0.7); text-decoration: none; transition: all 0.2s; }
.footer-socials a:hover { background: rgba(26,86,219,0.4); color: #fff; }
.footer-col h4 { font-family: 'Montserrat', sans-serif; font-weight: 700; font-size: 13px; color: #fff; margin-bottom: 18px; padding-bottom: 12px; border-bottom: 1px solid rgba(255,255,255,0.07); text-transform: uppercase; letter-spacing: 0.06em; }
.footer-col__list { display: flex; flex-direction: column; gap: 10px; }
.footer-col__list a, .footer-col__list div { font-size: 13px; color: #fff; text-decoration: none; transition: color 0.2s; }
.footer-col__list a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.06); padding-top: 24px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }
.footer-copy { font-size: 12px; color: #fff; }
.footer-legal { display: flex; gap: 20px; }
.footer-legal a { font-size: 12px; color: #fff; text-decoration: none; transition: color 0.2s; }
.footer-legal a:hover { color: rgba(148,190,255,0.85); }

/* ===================== SCROLLER ===================== */
#scroller { position: fixed; right: 24px; bottom: 24px; z-index: 90; opacity: 0; pointer-events: none; transition: opacity 0.3s; }
#scroller.visible { opacity: 1; pointer-events: auto; }
#scroller a { color: #1a56db; display: block; filter: drop-shadow(0 4px 12px rgba(26,86,219,0.3)); }

/* ===================== RESPONSIVE ===================== */
@media (max-width: 1024px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .cd-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
    .main-nav, .header-phone { display: none; }
    .site-header__inner {
        justify-content: flex-start;
        gap: 10px;
    }
    .site-header__inner .brand {
        margin-right: auto;
    }
    .theme-toggle,
    .nav-toggle {
        width: 42px;
        height: 42px;
        flex: 0 0 42px;
    }
    .nav-toggle { display: flex; }
    .site-header .main-nav {
        display: flex;
        position: absolute;
        top: 70px;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        background: rgba(255,255,255,0.98);
        padding: 12px;
        box-shadow: 0 12px 24px rgba(10,30,100,0.12);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transform: translateY(-14px);
        transition:
            opacity 0.24s ease,
            transform 0.28s cubic-bezier(0.22, 1, 0.36, 1),
            visibility 0s linear 0.28s;
    }
    .site-header.nav-open .main-nav {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translateY(0);
        transition-delay: 0s;
    }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .split-2, .cd-two { grid-template-columns: 1fr; gap: 24px; }
    .panel { padding: 28px; }
    .hero-dark { padding: 40px 28px; }
}
@media (max-width: 600px) {
    .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .fb-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; gap: 28px; }
    .container-rd { padding: 16px 16px 40px; }
    .hero-dark--home .hero-actions {
        flex-direction: column;
        align-items: center;
        width: 100%;
    }
    .hero-dark--home .hero-actions .btn-rd {
        width: min(100%, 290px);
        min-height: 62px;
        text-align: center;
        justify-content: center;
        padding-left: 24px;
        padding-right: 24px;
    }
    .hero-dark--home .hero-diagram img {
        max-width: 240px;
        max-height: 240px;
        width: 72%;
    }
    .panel--flush {
        overflow: hidden;
    }
    .panel.panel--flush {
        padding: 10px 8px;
        border-radius: 28px;
    }
    .cd-tabs {
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        gap: 4px;
        padding: 4px;
        scroll-snap-type: x proximity;
    }
    .cd-tabs::-webkit-scrollbar {
        display: none;
    }
    .cd-tab {
        flex: 1 0 auto;
        min-width: 130px;
        padding: 10px 14px;
        border-radius: 10px;
        font-size: 14px;
        line-height: 1.2;
        text-align: center;
        scroll-snap-align: center;
        white-space: nowrap;
    }
    .contacts-grid {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }
    .contacts-grid .map-box {
        min-height: 280px;
        height: 320px !important;
    }
    #enroll { scroll-margin-top: 88px; }
    .feedback-wrap,
    .feedback-wrap .section-eyebrow,
    .feedback-wrap .section-title,
    .feedback-wrap p,
    .feedback-wrap .fb-form {
        text-align: left !important;
    }
    .feedback-wrap .section-title {
        max-width: 100%;
    }
    .fb-consent {
        align-items: flex-start;
    }
}

/* ===================== THEME TOGGLE BUTTON ===================== */
.theme-toggle {
    background: rgba(26,86,219,0.08); border: none; border-radius: 10px;
    width: 40px; height: 40px; cursor: pointer; flex-shrink: 0;
    display: inline-flex; align-items: center; justify-content: center;
    color: #1a56db; transition: background 0.2s, color 0.2s;
}
.theme-toggle:hover { background: rgba(26,86,219,0.16); }
.theme-toggle__sun { display: none; }

/* ===================== DARK THEME ===================== */
/* Палитра вдохновлена референсом: глубокий почти-чёрный сине-навигационный
   почти-чёрный фон (#06070e / #0e1d33) + светло-синий акцент (#4d84ff / #2f6bf0). */
html.dark { color-scheme: dark; }
html.dark body { background: linear-gradient(160deg, #0a1526 0%, #0c1b31 55%, #102547 100%); color: #e6eef5; }
html.dark ::-webkit-scrollbar-track { background: rgba(255,255,255,0.05); }
html.dark ::-webkit-scrollbar-thumb { background: rgba(77,132,255,0.4); }

/* Header */
html.dark .site-header { background: rgba(11,22,40,0.85); border-bottom-color: rgba(255,255,255,0.07); box-shadow: 0 1px 24px rgba(0,0,0,0.5); }
html.dark .brand__l1, html.dark .brand__code .brand__br { color: #4d84ff; }
html.dark .brand__l2, html.dark .brand__name { color: #e6eef5; }
html.dark .brand__sub { color: #72869f; }
html.dark .nav-link-rd { color: #b2c1d8; }
html.dark .nav-link-rd:hover, html.dark .nav-link-rd.active { color: #4d84ff; background: rgba(77,132,255,0.12); }
html.dark .header-phone__icon { background: rgba(77,132,255,0.14); }
html.dark .header-phone__label { color: #72869f; }
html.dark .header-phone__num { color: #e6eef5; }
html.dark .header-phone__num:hover { color: #4d84ff; }
html.dark .nav-toggle { background: rgba(77,132,255,0.14); color: #4d84ff; }
html.dark .site-header.nav-open .main-nav { background: rgba(13,24,43,0.98); box-shadow: 0 12px 24px rgba(0,0,0,0.55); }

/* Theme toggle (dark) */
html.dark .theme-toggle { background: rgba(77,132,255,0.14); color: #ffd479; }
html.dark .theme-toggle:hover { background: rgba(77,132,255,0.22); }
html.dark .theme-toggle__moon { display: none; }
html.dark .theme-toggle__sun { display: block; }

/* Hero / CTA (в тёмной теме — самый глубокий фон + циановый акцент) */
html.dark .hero-dark, html.dark .cta-dark { background: linear-gradient(140deg, #0a1730 0%, #0e2246 52%, #143a70 100%); }
html.dark .hero-glow, html.dark .hero-glow--sm { background: radial-gradient(circle, rgba(77,132,255,0.18) 0%, transparent 68%); }
html.dark .hero-badge { background: rgba(77,132,255,0.16); border-color: rgba(77,132,255,0.32); }
html.dark .hero-badge__dot { background: #4d84ff; }
html.dark .hero-badge__txt { color: #9db9ff; }
html.dark .hero-h1 .accent { color: #4d84ff; }
html.dark .cd-metachip__dot { background: #4d84ff; }

/* Panels & headings */
html.dark .panel { background: #0e1d33; box-shadow: 0 2px 28px rgba(0,0,0,0.4); border: 1px solid rgba(255,255,255,0.05); }
html.dark .section-title { color: #e6eef5; }
html.dark .section-eyebrow, html.dark .cd-num { color: #4d84ff; }

/* Cards */
html.dark .course-card, html.dark .teacher-card, html.dark .news-card, html.dark .doc-card { background: #132c52; border-color: rgba(255,255,255,0.07); }
html.dark .course-card__body, html.dark .doc-card__body { background: #132c52; }
html.dark .course-card:hover, html.dark .teacher-card:hover, html.dark .news-card:hover, html.dark .doc-card:hover { border-color: rgba(77,132,255,0.45); box-shadow: 0 14px 40px rgba(0,0,0,0.55); }
html.dark .course-card__title, html.dark .teacher-card__name, html.dark .news-card__title, html.dark .doc-card__title { color: #e6eef5; }
html.dark .course-card__desc, html.dark .news-card__desc, html.dark .teacher-card__area { color: #93a5bd; }
html.dark .course-card__eyebrow { color: #7c8ca3; }
html.dark .course-card__dur, html.dark .news-card__date, html.dark .doc-card__date { color: #72869f; }
html.dark .teacher-card__pos { color: #4d84ff; }
html.dark .teacher-card__exp { background: #173562; color: #72869f; }
html.dark .chip { background: #173562; color: #4d84ff; }

/* Feature cards (переопределяем светлый инлайн-фон) */
html.dark .feature-card { background: #132c52 !important; border-color: rgba(255,255,255,0.07) !important; }
html.dark .feature-card h4 { color: #e6eef5; }
html.dark .feature-card p { color: #93a5bd; }

/* Accent buttons & links */
html.dark .btn-primary-rd { background: linear-gradient(135deg, #3f7bf5, #2456d8); box-shadow: 0 6px 24px rgba(63,123,245,0.4); }
html.dark .btn-primary-rd:hover { box-shadow: 0 10px 36px rgba(63,123,245,0.55); }
html.dark .btn-blue-rd { background: #2f6bf0; }
html.dark .btn-blue-rd:hover { background: #1e49c0; }
html.dark .btn-download { background: #2f6bf0; }
html.dark .btn-download:hover { background: #1e49c0; }
html.dark .fb-submit { background: linear-gradient(135deg, #3f7bf5, #2456d8); }
html.dark .link-arrow { color: #4d84ff; }

/* Tag filter & soft buttons */
html.dark .tag-pill { color: #4d84ff; border-color: rgba(77,132,255,0.35); }
html.dark .tag-pill.active { background: #2f6bf0; color: #fff; border-color: #2f6bf0; }
html.dark .btn-reset { border-color: rgba(255,255,255,0.12); color: #93a5bd; }
html.dark .btn-reset:hover { border-color: #4d84ff; color: #4d84ff; }
html.dark .btn-soft-rd { background: rgba(77,132,255,0.12); color: #4d84ff; border-color: rgba(77,132,255,0.3); }
html.dark .btn-soft-rd:hover { background: #2f6bf0; color: #fff; border-color: #2f6bf0; }

/* Course detail */
html.dark .cd-tab { color: #72869f; }
html.dark .cd-tab:hover { color: #4d84ff; background: rgba(77,132,255,0.08); }
html.dark .cd-tab.active { color: #4d84ff; background: rgba(77,132,255,0.16); }
html.dark .cd-h2 { color: #e6eef5; }
html.dark .cd-prose { color: #93a5bd; }
html.dark .cd-prose li::marker { color: #4d84ff; }
/* Всё оформление акцентных блоков — только для тёмной темы: заливка,
   светлая рамка и внутренние отступы (в светлой теме их нет вовсе). */
html.dark .cd-soft-block {
    /* Тот же полупрозрачный синий и та же прозрачность, что у активной
       кнопки «Информация» (.cd-tab.active) — единый акцентный цвет вместо
       отдельного (более насыщенного, с белой рамкой) варианта. */
    background: rgba(77, 132, 255, 0.16);
    border: none;
    padding: 24px;
}
/* На тёмной заливке текст делаем светлее обычного, иначе контраста мало. */
html.dark .cd-soft-block.cd-prose { color: #c8d4e6; }
html.dark .cd-soft-block strong, html.dark .cd-soft-block b { color: #ffffff; }
html.dark .cd-soft-block a { color: #9dc2ff; }
html.dark .cd-soft-block li::marker { color: #7aa9ff; }
html.dark .soon-card { background: #0e1d33; border-color: rgba(255,255,255,0.12); color: #93a5bd; }
html.dark .soon-card__icon { color: #4d84ff; }
html.dark .soon-card__title { color: #c8d4e6; }
html.dark .cd-acc__item { background: #0e1d33; border-color: rgba(255,255,255,0.07); }
html.dark .cd-acc__item.open { background: #153058; }
html.dark .cd-acc__title { color: #e6eef5; }
html.dark .cd-acc__chev { color: #72869f; }
html.dark .cd-acc__body-inner { color: #93a5bd; }

/* Contacts / about shared */
html.dark .info-row { background: #0e1d33; }
html.dark .info-row:hover { background: #132c52; }
html.dark .info-row__ic { background: rgba(77,132,255,0.14); }
html.dark .info-row__label { color: #e6eef5; }
html.dark .map-box { background: linear-gradient(135deg, #0e1d33, #153058); border-color: rgba(77,132,255,0.18); }

/* Feedback form */
html.dark .fb-form input[type="text"],
html.dark .fb-form input[type="email"],
html.dark .fb-form input[type="tel"],
html.dark .fb-form textarea { background: #0e1d33; border-color: rgba(255,255,255,0.1); color: #e6eef5; }
html.dark .fb-form input::placeholder, html.dark .fb-form textarea::placeholder { color: #6b7e9e; }
html.dark .fb-form input:focus, html.dark .fb-form textarea:focus { border-color: #4d84ff; box-shadow: 0 0 0 3px rgba(77,132,255,0.15); }
html.dark .fb-consent label { color: #93a5bd; }
html.dark .fb-consent a { color: #4d84ff; }
html.dark .fb-consent input { accent-color: #2f6bf0; }
html.dark .fb-submit:disabled { background: #1a2c48; }
/* Светло-зелёная плашка из светлой темы на тёмной панели читалась белым
   пятном — здесь та же полупрозрачная заливка по цвету текста, что и у
   остальных акцентных блоков тёмной темы (ср. .cd-soft-block). */
html.dark .fb-success {
    background: rgba(52, 199, 143, 0.12);
    border-color: rgba(52, 199, 143, 0.28);
    color: #7ee2b8;
}

/* Инлайн-цвета текста на светлых панелях */
html.dark [style*="color:#0d1a3a"] { color: #e6eef5 !important; }
html.dark [style*="color:#5a7299"] { color: #93a5bd !important; }
html.dark [style*="color:#7a98c0"] { color: #72869f !important; }
html.dark [style*="color:#3d5a8a"] { color: #93a5bd !important; }

/* Mobile VibraImage promo: keep the long labels inside the card. */
@media (max-width: 600px) {
    .vibra-promo__title {
        max-width: 100%;
        font-size: clamp(19px, 6.5vw, 30px);
        letter-spacing: -0.035em;
        white-space: nowrap;
    }
    .vibra-promo .hero-badge {
        max-width: 100%;
        gap: 6px;
        padding-inline: 10px;
        align-items: flex-start;
    }
    /* На телефоне строка с названием фестиваля и датами в одну линию
       физически не помещается — разрешаем перенос, иначе вылезет за экран. */
    .vibra-promo__badge .hero-badge__txt,
    .vibra-promo .hero-badge__txt {
        font-size: clamp(8px, 2.6vw, 11px);
        letter-spacing: 0.06em;
        white-space: normal;
        line-height: 1.5;
    }
}

/* Mobile header controls and VibraImage promo layout. */
.mobile-call,
.mobile-theme-link { display: none; }
.vibra-promo__date { display: inline; }

@media (max-width: 900px) {
    .site-header .theme-toggle { display: none; }
    .site-header .mobile-call {
        width: 42px;
        height: 42px;
        flex: 0 0 42px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 10px;
        background: rgba(26,86,219,0.08);
        color: #1a56db;
        text-decoration: none;
    }
    .site-header .main-nav .mobile-theme-link {
        width: 100%;
        display: block;
        padding: 8px 16px;
        border: 0;
        border-radius: 10px;
        background: transparent;
        color: #2d3a55;
        font: 500 14px 'Inter', sans-serif;
        text-align: left;
        cursor: pointer;
    }
    .site-header .main-nav .mobile-theme-link:hover {
        background: rgba(26,86,219,0.07);
        color: #1a56db;
    }
    html.dark .site-header .mobile-call {
        background: rgba(77,132,255,0.14);
        color: #4d84ff;
    }
    html.dark .site-header .main-nav .mobile-theme-link { color: #b2c1d8; }
    html.dark .site-header .main-nav .mobile-theme-link:hover {
        color: #4d84ff;
        background: rgba(77,132,255,0.12);
    }
}

@media (max-width: 600px) {
    .vibra-promo { isolation: isolate; padding-block: 32px; }
    .vibra-promo .hero-sub { line-height: 1.7; margin-bottom: 22px; }
    .vibra-promo .hero-inner { display: block; }
    .vibra-promo .hero-inner::before {
        position: absolute;
        inset: -40px -28px;
        z-index: 1;
        background: linear-gradient(180deg, rgba(5,27,63,.2), rgba(5,27,63,.56));
        content: "";
        pointer-events: none;
    }
    .vibra-promo .hero-copy { position: relative; z-index: 2; }
    .vibra-promo__visual {
        position: absolute;
        inset: -40px -28px;
        z-index: 0;
        min-height: 0;
        opacity: .82;
        pointer-events: none;
    }
    .vibra-promo__visual img {
        width: 90%;
        max-width: none;
        height: 100%;
        object-fit: contain;
        object-position: center;
    }
}
