/* =====================================================================
   Дизайн-система сайта учебного центра
   Ориентир: морская/учебная тематика (моряки), строгий и
   в меру официальный характер — по референсу «Морской Институт Флагман»
   с элементами академической сдержанности МГУ/АГТУ.
   ===================================================================== */

/* Inter — самохостинг (без обращений к fonts.googleapis.com / fonts.gstatic.com:
   передача IP посетителя за рубеж нежелательна по 152-ФЗ) */
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url('../fonts/inter-cyrillic-ext.woff2') format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url('../fonts/inter-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url('../fonts/inter-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url('../fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
    /* Цвет */
    --navy-deep:   #0A2440;   /* глубокий морской синий — шапка, подвал */
    --navy-mid:    #123A5C;   /* второй уровень шапки, карточки-акценты */
    --brass:       #B8863A;  /* латунь/такелаж — акцентные элементы */
    --signal-red:  #9E2B25;  /* сигнальный/пожарный акцент, только точечно */
    --paper:       #F4F1E8;  /* тёплый бумажный фон */
    --paper-dim:   #EAE5D6;
    --ink:         #16222E;
    --ink-soft:    #4B5A68;
    --line:        #D8D2C0;
    --white:       #FFFFFF;

    /* Типографика */
    --font-display: 'Inter', 'Segoe UI', Arial, sans-serif;
    --font-body: 'Inter', 'Segoe UI', Arial, sans-serif;

    --radius: 4px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; scroll-padding-top: 96px; }

body {
    font-family: var(--font-body);
    color: var(--ink);
    background: var(--paper);
    line-height: 1.55;
    font-synthesis: none;
    text-rendering: optimizeLegibility;
    min-height: 100vh;
}

a { color: inherit; text-decoration: none; }

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

h1, h2, h3 {
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: 0.2px;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(18px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

@keyframes spinArrow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.eyebrow {
    display: inline-block;
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--brass);
    margin-bottom: 10px;
}

.container {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ===================== Верхняя служебная полоса ===================== */
.utility-bar {
    background: var(--navy-deep);
    color: rgba(255,255,255,0.75);
    font-size: 13px;
}

.utility-bar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 8px;
    padding-bottom: 8px;
    gap: 16px;
    flex-wrap: wrap;
}

.utility-bar a { color: rgba(255,255,255,0.85); }
.utility-bar a:hover { color: var(--brass); }

.utility-left, .utility-right {
    display: flex;
    gap: 20px;
    align-items: center;
    flex-wrap: wrap;
}

.utility-bar a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.ui-icon {
    width: 15px;
    height: 15px;
    fill: var(--brass);
    flex-shrink: 0;
}

/* ===================== Пагинация ===================== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 32px;
}

.page-link {
    min-width: 44px;
    height: 44px;
    padding: 0 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--white);
    color: var(--navy-deep);
    font-weight: 700;
    font-size: 15px;
    transition: border-color .2s ease, background .2s ease, color .2s ease;
}

a.page-link:hover,
a.page-link:focus-visible {
    border-color: var(--brass);
    color: var(--brass);
}

.page-link.current {
    background: var(--navy-deep);
    border-color: var(--navy-deep);
    color: #fff;
}

.page-gap { color: var(--ink-soft); padding: 0 2px; }

.pagination-info {
    text-align: center;
    margin-top: 12px;
    font-size: 13px;
    color: var(--ink-soft);
}

@media (max-width: 480px) {
    .pagination { gap: 6px; }
    .page-link { min-width: 40px; height: 44px; padding: 0 10px; }
    .page-arrow-text { display: none; }
}

/* ===================== Основная шапка ===================== */
.site-header {
    background: var(--navy-mid);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0,0,0,0.18);
    animation: fadeInUp .7s ease both;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    gap: 24px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--white);
    line-height: 1.15;
}

.logo-icon {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    display: block;
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-mark {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 700;
}

.logo-sub {
    font-size: 11px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--brass);
}

.logo--full-name .logo-icon {
    width: 56px;
    height: 56px;
}

.logo--full-name .logo-mark {
    font-size: 20px;
    font-weight: 700;
    line-height: 1.3;
    max-width: 420px;
    letter-spacing: 0.3px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 4px;
}

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 30px;
}

.main-nav a {
    color: rgba(255,255,255,0.88);
    font-size: 15px;
    font-weight: 600;
    padding: 6px 0;
    border-bottom: 2px solid transparent;
    transition: border-color .15s ease, color .15s ease;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--white);
    border-bottom-color: var(--brass);
}

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

.burger span {
    width: 26px;
    height: 2px;
    background: var(--white);
}

/* ===================== Секция-разделитель (сигнатурный элемент) =====================
   Волнистая линия с узлами — отсылка к тросу/такелажу, используется
   как повторяющийся разделитель между смысловыми блоками страницы. */
.rope-divider {
    width: 100%;
    height: 18px;
    display: block;
}

.rope-divider svg { width: 100%; height: 100%; display: block; }

/* ===================== Герой ===================== */
.hero {
    position: relative;
    overflow: hidden;
    color: var(--white);
    padding: 80px 0 64px;
}

.hero-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(0.85) contrast(1.1) brightness(0.55);
    z-index: 0;
}

.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(6, 20, 36, 0.88) 0%, rgba(6, 36, 64, 0.68) 55%, rgba(6, 36, 64, 0.42) 100%);
    z-index: 0;
}

.hero .container {
    position: relative;
    z-index: 1;
    max-width: 820px;
}

.hero .eyebrow,
.hero h1,
.hero p {
    text-shadow: 0 2px 0 rgba(0, 0, 0, 0.45), 0 0 1px rgba(0, 0, 0, 0.7);
    -webkit-text-stroke: 0.35px rgba(0, 0, 0, 0.35);
}

.hero h1 {
    font-size: clamp(30px, 4vw, 46px);
    line-height: 1.2;
    margin-bottom: 18px;
    color: #ffffff;
}

.hero p {
    font-size: 17px;
    color: rgba(255,255,255,0.9);
    max-width: 560px;
    margin-bottom: 30px;
}

.hero-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 32px;
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid rgba(255,255,255,0.2);
}

.hero-stat-value {
    display: block;
    font-family: var(--font-display);
    font-size: clamp(26px, 3vw, 36px);
    font-weight: 800;
    color: var(--white);
    text-shadow: 0 2px 0 rgba(0, 0, 0, 0.45), 0 0 1px rgba(0, 0, 0, 0.7);
}

.hero-stat-label {
    display: block;
    font-size: 13px;
    color: rgba(255,255,255,0.8);
    margin-top: 2px;
}

@media (max-width: 640px) {
    .hero-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 24px; margin-top: 32px; padding-top: 20px; }
}

.btn {
    display: inline-block;
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 15px;
    padding: 14px 30px;
    border-radius: var(--radius);
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform .28s cubic-bezier(.22,.72,.49,1.01), background .2s ease, box-shadow .2s ease;
    will-change: transform, box-shadow;
    position: relative;
    overflow: hidden;
}

.btn:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 18px 36px rgba(10, 36, 64, 0.16);
}

.btn-primary {
    background: var(--brass);
    color: var(--navy-deep);
}

.btn-primary:hover { background: #C79A4F; }

.btn-secondary {
    background: transparent;
    border-color: rgba(10, 36, 64, 0.25);
    color: var(--navy-deep);
}

.btn-secondary:hover {
    background: rgba(10, 36, 64, 0.04);
    box-shadow: none;
}

.btn-outline {
    background: transparent;
    color: var(--white);
    border-color: rgba(255,255,255,0.4);
}

.btn-outline:hover { border-color: var(--white); }

/* ===================== Полоса преимуществ ===================== */
.features {
    background: var(--paper);
    padding: 56px 0;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 28px;
}

.feature-card {
    text-align: left;
    background: rgba(255,255,255,0.9);
    border-radius: calc(var(--radius) * 1.2);
    padding: 24px;
    transition: transform .35s cubic-bezier(.22,.72,.49,1.01), box-shadow .35s ease, border-color .35s ease, background .35s ease;
    will-change: transform, box-shadow;
}


.feature-icon {
    width: 44px;
    height: 44px;
    margin-bottom: 14px;
    color: var(--brass);
}

.spin-icon {
    animation: spinArrow 6s linear infinite;
    transform-origin: center center;
}

.feature-card:hover .spin-icon {
    animation-duration: 2.4s;
}

.checkmark-icon {
    width: 44px;
    height: 44px;
    color: var(--brass);
}

.checkmark-base {
    stroke-dasharray: 40;
    stroke-dashoffset: 0;
    stroke-opacity: 1;
}

.checkmark-overlay {
    stroke-dasharray: 40;
    stroke-dashoffset: 40;
    opacity: 0;
    transition: opacity .2s ease;
}

.feature-card:hover .checkmark-overlay {
    opacity: 1;
    animation: drawCheck 0.7s ease forwards, pulseCheck 1.1s ease-in-out infinite;
}

@keyframes drawCheck {
    to { stroke-dashoffset: 0; }
}

@keyframes pulseCheck {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.06); opacity: 0.95; }
}

.feature-card h3 {
    font-size: 17px;
    margin-bottom: 6px;
    color: var(--navy-deep);
}

.feature-card p {
    font-size: 14px;
    color: var(--ink-soft);
}

/* ===================== Направления обучения ===================== */
.categories {
    padding: 60px 0;
    background: var(--paper-dim);
}

.section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 32px;
    flex-wrap: wrap;
    gap: 12px;
}

.section-head h2 {
    font-size: 28px;
    color: var(--navy-deep);
}

.link-more {
    font-weight: 700;
    font-size: 14px;
    color: var(--navy-deep);
    border-bottom: 2px solid var(--brass);
    padding-bottom: 2px;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.category-card-link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.category-card {
    background: var(--white);
    border: 1px solid var(--line);
    border-left: 4px solid var(--brass);
    border-radius: var(--radius);
    padding: 22px 22px;
    transition: transform .32s cubic-bezier(.22,.72,.49,1.01), box-shadow .32s ease, border-color .32s ease, background .32s ease;
    will-change: transform, box-shadow;
}

.category-card:hover,
.category-card-link:hover .category-card {
    transform: translateY(-5px) scale(1.005);
    box-shadow: 0 24px 48px rgba(10, 36, 64, 0.12);
    border-color: rgba(184, 134, 58, 0.85);
    background: #FEFEFE;
}

.category-card h3 {
    font-size: 17px;
    color: var(--navy-deep);
    margin-bottom: 6px;
}

.category-card p {
    font-size: 14px;
    color: var(--ink-soft);
}

/* ===================== Промо-баннер ===================== */
.promo {
    background: var(--navy-deep);
    color: var(--white);
    padding: 48px 0;
}

.promo .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}

.promo h2 {
    font-size: 24px;
    margin-bottom: 8px;
}

.promo p { color: rgba(255,255,255,0.75); max-width: 480px; }

/* ===================== Модальное окно заявки ===================== */
body.modal-open {
    overflow: hidden;
}

.application-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .25s ease, visibility .25s ease;
}

.application-modal.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.application-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(4, 17, 29, 0.35);
}

.application-modal__dialog {
    position: relative;
    width: min(1100px, calc(100vw - 48px));
    min-height: 560px;
    border-radius: 32px;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(8, 35, 54, 0.98) 0%, rgba(16, 64, 93, 0.96) 52%, rgba(18, 88, 122, 0.92) 100%);
    box-shadow: 0 30px 80px rgba(5, 18, 30, 0.45);
    border: 1px solid rgba(184, 134, 58, 0.35);
}

.application-modal__dialog::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 12% 8%, rgba(255,255,255,0.18), transparent 25%),
        radial-gradient(circle at 76% 24%, rgba(255,255,255,0.10), transparent 16%),
        linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02));
}

.application-modal__dialog::after {
    content: "";
    position: absolute;
    right: -130px;
    top: -30px;
    width: 72%;
    height: 150%;
    background: linear-gradient(90deg, rgba(255,255,255,0.18), rgba(255,255,255,0.06), transparent 90%);
    transform: rotate(15deg);
    opacity: 0.65;
}

.application-modal__content {
    position: relative;
    z-index: 1;
    padding: 42px 42px 30px;
}

.application-modal__content h2 {
    margin: 0 0 26px;
    font-size: clamp(28px, 3vw, 44px);
    line-height: 1.08;
    color: var(--white);
    font-weight: 800;
    letter-spacing: -0.04em;
    text-shadow: 0 2px 0 rgba(0,0,0,0.35);
}

.application-modal__content h2 span {
    color: #dfeeff;
    opacity: 0.9;
}

.application-modal__form-shell {
    background: rgba(248, 245, 240, 0.98);
    border-radius: 18px;
    padding: 34px 32px 24px;
    border: 1px solid rgba(255,255,255,0.25);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.45);
}

.application-modal__form-shell h3 {
    font-size: clamp(20px, 1.8vw, 30px);
    line-height: 1.3;
    color: var(--navy-deep);
    margin-bottom: 24px;
    max-width: 780px;
    font-weight: 700;
}

.application-modal__form {
    display: grid;
    grid-template-columns: repeat(3, minmax(180px, 1fr)) auto;
    gap: 18px;
    align-items: end;
}

.application-modal__field {
    display: flex;
}

.application-modal__field input {
    width: 100%;
    height: 56px;
    padding: 0 18px;
    background: rgba(255,255,255,0.9);
    border: 1px solid rgba(22, 34, 46, 0.28);
    border-radius: 10px;
    font-size: 18px;
    color: var(--ink);
    outline: none;
    transition: border-color .2s ease, box-shadow .2s ease;
}

.application-modal__field input:focus {
    border-color: rgba(42, 95, 144, 0.7);
    box-shadow: 0 0 0 3px rgba(117, 173, 216, 0.2);
}

.application-modal__submit {
    border: none;
    border-radius: 10px;
    background: linear-gradient(180deg, #c8903d 0%, #b37e2e 100%);
    color: #0a2440;
    font-size: 18px;
    font-weight: 800;
    height: 56px;
    padding: 0 28px;
    cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease;
    box-shadow: 0 10px 18px rgba(184, 134, 58, 0.22);
}

.application-modal__submit:hover {
    transform: translateY(-1px);
}

.application-modal__consent {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 22px;
    color: #425b73;
    font-size: 14px;
    line-height: 1.5;
}

.application-modal__consent input {
    width: 16px;
    height: 16px;
    accent-color: var(--brass);
    flex-shrink: 0;
}

.application-modal__consent a {
    font-weight: 700;
    color: var(--navy-deep);
    text-decoration: none;
    border-bottom: 2px solid var(--brass);
    padding-bottom: 1px;
    transition: color .2s ease;
}

.application-modal__consent a:hover,
.application-modal__consent a:focus-visible { color: var(--brass); }

.application-modal__close {
    position: absolute;
    top: 18px;
    right: 20px;
    width: 42px;
    height: 42px;
    border: none;
    border-radius: 50%;
    background: rgba(255,255,255,0.12);
    color: var(--white);
    font-size: 34px;
    line-height: 1;
    cursor: pointer;
    z-index: 2;
}

@media (max-width: 900px) {
    .application-modal__dialog {
        width: min(92vw, 720px);
        min-height: auto;
    }

    .application-modal__content {
        padding: 28px 18px 22px;
    }

    .application-modal__form {
        grid-template-columns: 1fr;
    }

    .application-modal__form-shell {
        padding: 22px 18px 20px;
    }
}

/* ===================== Заглушки внутренних страниц ===================== */
.page-hero {
    background-image: linear-gradient(180deg, var(--navy-deep) 0%, var(--navy-mid) 100%);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: var(--white);
    padding: 56px 0 44px;
}

.page-hero .eyebrow { color: var(--brass); }

.page-hero h1 { font-size: clamp(26px, 3.5vw, 38px); }

.page-body {
    padding: 48px 0 72px;
}

.page-stub {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 32px;
    max-width: 760px;
}

.page-stub p { color: var(--ink-soft); }

.mt-16 { margin-top: 16px; }

.page-hero-lead {
    margin-top: 14px;
    font-size: 17px;
    color: rgba(255,255,255,0.8);
    max-width: 720px;
}

.course-intro {
    margin-bottom: 28px;
    max-width: 760px;
}

.course-intro p {
    font-size: 16px;
    color: var(--ink-soft);
}

.card-meta {
    display: inline-block;
    margin-top: 12px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    color: var(--brass);
}

.course-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) 280px;
    gap: 28px;
    align-items: start;
}

.course-main .lead {
    font-size: 17px;
    color: var(--ink-soft);
    margin-bottom: 28px;
    max-width: 760px;
}

.course-main h2 {
    font-size: 24px;
    color: var(--navy-deep);
    margin-bottom: 16px;
}

.program-list {
    display: grid;
    gap: 14px;
}

.program-card-link {
    display: block;
    color: inherit;
    text-decoration: none;
    cursor: pointer;
}

.program-card {
    background: var(--white);
    border: 1px solid var(--line);
    border-left: 4px solid var(--brass);
    border-radius: var(--radius);
    padding: 20px 22px;
    transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.program-card:hover,
.program-card:focus-within {
    transform: translateY(-2px);
    box-shadow: 0 18px 32px rgba(10, 36, 64, 0.08);
    border-color: rgba(184, 134, 58, 0.7);
}

.program-card-select {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px dashed var(--line);
    font-size: 13px;
    color: var(--ink-soft);
    cursor: pointer;
}

.program-card-select input[type="checkbox"] {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    cursor: pointer;
    accent-color: var(--brass);
}

/* ===================== Плавающий бейдж «корзины» заявки ===================== */
.course-cart-badge[hidden] {
    display: none;
}

.course-cart-badge {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 18px;
    background: var(--navy-deep);
    color: var(--white);
    border-radius: 999px;
    box-shadow: 0 12px 28px rgba(10, 36, 64, 0.35);
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
    transition: transform .18s ease, box-shadow .18s ease;
}

.course-cart-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 34px rgba(10, 36, 64, 0.42);
}

.course-cart-badge svg {
    width: 18px;
    height: 18px;
    stroke: var(--brass);
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

@media (max-width: 640px) {
    .course-cart-badge {
        right: 16px;
        bottom: 16px;
        padding: 10px 14px;
        font-size: 13px;
    }
}

.program-card h3 {
    font-size: 17px;
    color: var(--navy-deep);
    margin-bottom: 6px;
}

.program-card p {
    font-size: 14px;
    color: var(--ink-soft);
}

.program-card .link-more {
    display: inline-block;
    margin-top: 14px;
}

.program-card .btn {
    margin-top: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 150px;
    height: 40px;
    padding: 0 16px;
    font-size: 13px;
}

.program-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    list-style: none;
    margin-top: 12px;
    font-size: 13px;
    font-weight: 600;
    color: var(--navy-mid);
}

.course-detail-hero {
    padding-bottom: 28px;
}

.course-hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 20px;
}

.course-hero-meta span {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
}

.course-detail-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) 300px;
    gap: 28px;
    align-items: start;
}

.detail-section {
    background: var(--white);
    border: 1px solid var(--line);
    border-left: 4px solid var(--brass);
    border-radius: var(--radius);
    padding: 20px 22px;
    margin-bottom: 16px;
}

.detail-section--wide {
    padding-bottom: 12px;
}

.section-header-inline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.section-header-inline h3 {
    margin: 0;
}

.section-header-inline span {
    font-size: 11px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--brass);
    font-weight: 700;
}

.detail-section h2,
.detail-section h3 {
    font-size: 20px;
    color: var(--navy-deep);
    margin-bottom: 10px;
}

.detail-list {
    list-style: disc;
    padding-left: 18px;
    color: var(--ink-soft);
    font-size: 14px;
}

.detail-list li {
    margin-bottom: 6px;
}

.detail-grid {
    display: grid;
    gap: 14px;
}

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

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

.detail-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 12px 12px 10px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(244, 241, 232, 0.7), rgba(255, 255, 255, 0.96));
}

.detail-number {
    display: inline-flex;
    width: 34px;
    height: 34px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--navy-mid);
    color: var(--white);
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
}

.detail-item p,
.info-tile p {
    color: var(--ink-soft);
    font-size: 14px;
    line-height: 1.5;
}

.info-tile {
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 16px 14px;
    min-height: 110px;
}

.info-tile svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: var(--brass);
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.mini-stat-list {
    display: grid;
    gap: 10px;
}

.mini-stat {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 12px 14px;
}

.mini-stat-label {
    display: block;
    font-size: 11px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--brass);
    font-weight: 700;
    margin-bottom: 4px;
}

.mini-stat strong {
    font-size: 14px;
    color: var(--navy-deep);
}

.aside-card--highlight {
    border-color: rgba(184, 134, 58, 0.7);
    box-shadow: 0 16px 32px rgba(10, 36, 64, 0.07);
}

.course-actions {
    display: grid;
    gap: 10px;
    margin-top: 18px;
}

.course-actions .btn,
.course-actions .link-more {
    width: 100%;
    text-align: center;
}

.course-aside {
    display: grid;
    gap: 16px;
}

.aside-card {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 20px;
}

.aside-card h3 {
    font-size: 16px;
    color: var(--navy-deep);
    margin-bottom: 10px;
}

.aside-card p,
.aside-card li {
    font-size: 14px;
    color: var(--ink-soft);
}

.aside-card ul {
    list-style: disc;
    padding-left: 18px;
}

.aside-card li { margin-bottom: 6px; }

.aside-card .btn {
    display: block;
    text-align: center;
    margin-top: 16px;
}

.aside-card .link-more {
    display: inline-block;
    margin-top: 14px;
}

@media (max-width: 900px) {
    .course-layout { grid-template-columns: 1fr; }
    .course-detail-shell { grid-template-columns: 1fr; }
    .detail-grid.two-columns,
    .detail-grid.three-columns { grid-template-columns: 1fr; }
}

/* ===================== Подвал ===================== */
.site-footer {
    background: var(--navy-deep);
    color: rgba(255,255,255,0.75);
    padding: 56px 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
    gap: 32px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255,255,255,0.12);
}

.footer-col h4 {
    color: var(--white);
    font-size: 14px;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.footer-col ul { list-style: none; }

.footer-col li { margin-bottom: 10px; font-size: 14px; }

.footer-col a:hover { color: var(--brass); }

.footer-brand .logo-mark { color: var(--white); }

.footer-brand p {
    font-size: 14px;
    margin-top: 10px;
    color: rgba(255,255,255,0.6);
    max-width: 280px;
}

.footer-social {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

.footer-social a {
    width: 34px;
    height: 34px;
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
}

.footer-social a:hover { border-color: var(--brass); color: var(--brass); }

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 0;
    font-size: 13px;
    color: rgba(255,255,255,0.5);
    flex-wrap: wrap;
    gap: 8px;
}

/* ===================== Адаптив ===================== */
@media (max-width: 900px) {
    .features-grid { grid-template-columns: repeat(2, 1fr); }
    .categories-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    /* На телефоне полоса остаётся, но только иконками: звонок, почта, портал */
    .utility-bar .container { flex-wrap: nowrap; padding-top: 6px; padding-bottom: 6px; }
    .utility-left, .utility-right { gap: 8px; flex-wrap: nowrap; }
    .utility-bar a { width: 40px; height: 36px; justify-content: center; border-radius: 8px; background: rgba(255,255,255,0.06); }
    .utility-bar .util-text { display: none; }
    .utility-bar .ui-icon { width: 18px; height: 18px; }

    .main-nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--navy-mid);
        display: none;
        flex-direction: column;
    }

    .main-nav.open { display: flex; }

    .main-nav ul {
        flex-direction: column;
        padding: 6px 24px 18px;
        gap: 0;
    }

    .main-nav li { border-top: 1px solid rgba(255,255,255,0.12); }

    .main-nav a {
        display: block;
        padding: 14px 0;
        border-bottom: none;
    }

    .burger { display: flex; }

    .logo--full-name .logo-icon {
        width: 40px;
        height: 40px;
    }

    .logo--full-name .logo-mark {
        font-size: 15px;
        max-width: 240px;
    }

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

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

    .promo .container { flex-direction: column; align-items: flex-start; }
}

/* =====================================================================
   Контентные страницы: Абитуриентам, О центре, Контакты, Политика
   ===================================================================== */

.section-title {
    font-size: 26px;
    color: var(--navy-deep);
    margin-bottom: 16px;
}

.section-block { margin-bottom: 48px; }
.section-block:last-child { margin-bottom: 0; }

.section-lead {
    font-size: 17px;
    color: var(--ink-soft);
    max-width: 820px;
    margin-bottom: 24px;
}

.text-block p {
    font-size: 15px;
    color: var(--ink-soft);
    line-height: 1.7;
    margin-bottom: 12px;
    max-width: 820px;
}

.text-block p:last-child { margin-bottom: 0; }

/* Маркер «данные предоставит заказчик» */
.data-pending {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 999px;
    background: rgba(184, 134, 58, 0.12);
    border: 1px dashed rgba(184, 134, 58, 0.6);
    color: #8A6526;
    font-size: 12px;
    font-weight: 700;
}

.pending-block {
    border: 1px dashed rgba(184, 134, 58, 0.55);
    background: rgba(184, 134, 58, 0.06);
    border-radius: var(--radius);
    padding: 18px 20px;
}

.pending-block p {
    font-size: 14px;
    color: var(--ink-soft);
    line-height: 1.6;
}

.pending-block p + p { margin-top: 8px; }

/* Чек-лист документов */
.checklist {
    list-style: none;
    display: grid;
    gap: 12px;
    max-width: 820px;
}

.checklist li {
    position: relative;
    padding-left: 32px;
    font-size: 15px;
    color: var(--ink-soft);
    line-height: 1.6;
}

.checklist li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 2px;
    width: 19px;
    height: 19px;
    border: 1.5px solid var(--brass);
    border-radius: 4px;
    background: rgba(184, 134, 58, 0.08);
}

.checklist li::after {
    content: "";
    position: absolute;
    left: 7px;
    top: 6px;
    width: 5px;
    height: 10px;
    border: solid var(--brass);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checklist strong { color: var(--navy-deep); }

/* FAQ */
.faq-list { display: grid; gap: 10px; }

.faq-item {
    background: var(--white);
    border: 1px solid var(--line);
    border-left: 4px solid var(--brass);
    border-radius: var(--radius);
}

.faq-item summary {
    cursor: pointer;
    padding: 16px 48px 16px 18px;
    font-size: 15px;
    font-weight: 700;
    color: var(--navy-deep);
    list-style: none;
    position: relative;
}

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

.faq-item summary::after {
    content: "";
    position: absolute;
    right: 20px;
    top: 50%;
    margin-top: -7px;
    width: 9px;
    height: 9px;
    border: solid var(--brass);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    transition: transform .2s ease;
}

.faq-item[open] summary::after {
    transform: rotate(-135deg);
    margin-top: -3px;
}

.faq-item summary:hover { color: var(--navy-mid); }

.faq-item p {
    padding: 0 18px 16px;
    font-size: 14px;
    color: var(--ink-soft);
    line-height: 1.65;
}

/* Хронология */
.timeline { max-width: 820px; }

.timeline-item {
    position: relative;
    padding: 0 0 26px 30px;
    border-left: 2px solid var(--line);
}

.timeline-item:last-child { padding-bottom: 0; border-left-color: transparent; }

.timeline-item::before {
    content: "";
    position: absolute;
    left: -7px;
    top: 2px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--brass);
    border: 2px solid var(--paper);
}

.timeline-year {
    display: block;
    font-size: 12px;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--brass);
    margin-bottom: 4px;
}

.timeline-item h3 {
    font-size: 16px;
    color: var(--navy-deep);
    margin-bottom: 4px;
}

.timeline-item p {
    font-size: 14px;
    color: var(--ink-soft);
    line-height: 1.6;
}

/* Показатели */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.stat-card {
    background: var(--white);
    border: 1px solid var(--line);
    border-top: 3px solid var(--brass);
    border-radius: var(--radius);
    padding: 22px 18px;
    text-align: center;
}

.stat-value {
    display: block;
    font-family: var(--font-display);
    font-size: 30px;
    font-weight: 700;
    color: var(--navy-deep);
    line-height: 1.1;
}

.stat-label {
    display: block;
    margin-top: 8px;
    font-size: 13px;
    color: var(--ink-soft);
}

/* Галерея */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}

.gallery-tile {
    aspect-ratio: 4 / 3;
    border: 1px dashed rgba(10, 36, 64, 0.2);
    border-radius: var(--radius);
    background: linear-gradient(135deg, var(--paper-dim), var(--white));
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: rgba(10, 36, 64, 0.3);
    font-size: 12px;
    text-align: center;
    padding: 0;
    overflow: hidden;
    cursor: pointer;
    appearance: none;
    font-family: inherit;
    transition: transform .2s ease;
}

.gallery-tile:hover,
.gallery-tile:focus-visible {
    transform: scale(1.02);
    outline: 2px solid var(--brass);
    outline-offset: 2px;
}

.gallery-tile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: calc(var(--radius) - 1px);
}

/* ===================== Лайтбокс галереи ===================== */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .25s ease, visibility .25s ease;
    background: rgba(4, 17, 29, 0.9);
}

.lightbox.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.lightbox__backdrop {
    position: absolute;
    inset: 0;
}

.lightbox__figure {
    position: relative;
    z-index: 1;
    max-width: min(1200px, 92vw);
    max-height: 88vh;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox__image {
    max-width: 100%;
    max-height: 78vh;
    border-radius: var(--radius);
    box-shadow: 0 30px 80px rgba(5, 18, 30, 0.5);
}

.lightbox__caption {
    margin-top: 14px;
    color: rgba(255,255,255,0.85);
    font-size: 14px;
    text-align: center;
}

.lightbox__close,
.lightbox__nav {
    position: absolute;
    border: none;
    border-radius: 50%;
    background: rgba(255,255,255,0.12);
    color: var(--white);
    cursor: pointer;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s ease;
}

.lightbox__close:hover,
.lightbox__nav:hover {
    background: rgba(255,255,255,0.24);
}

.lightbox__close {
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    font-size: 30px;
    line-height: 1;
}

.lightbox__nav {
    top: 50%;
    transform: translateY(-50%);
    width: 52px;
    height: 52px;
    font-size: 30px;
    line-height: 1;
}

.lightbox__nav--prev { left: 20px; }
.lightbox__nav--next { right: 20px; }

@media (max-width: 640px) {
    .lightbox__nav { width: 42px; height: 42px; font-size: 24px; }
    .lightbox__nav--prev { left: 8px; }
    .lightbox__nav--next { right: 8px; }
    .lightbox__close { top: 10px; right: 10px; }
}

.gallery-tile svg {
    width: 32px;
    height: 32px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.4;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Таблица данных (реквизиты, режим работы) */
.table-scroll { overflow-x: auto; }

.data-table {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    font-size: 14px;
}

.data-table th,
.data-table td {
    text-align: left;
    padding: 12px 16px;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
    overflow-wrap: break-word;
    word-break: break-word;
}

.data-table tr:last-child th,
.data-table tr:last-child td { border-bottom: none; }

.data-table th {
    width: 38%;
    background: var(--paper);
    color: var(--navy-deep);
    font-weight: 700;
}

.data-table td { color: var(--ink-soft); }

.data-table td.is-weekend { color: var(--signal-red); }

/* Способы связи и карточки контактов */
.contact-methods {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 14px;
}

.contact-method {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px 12px;
    text-align: center;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    color: var(--navy-deep);
    font-size: 14px;
    font-weight: 700;
    transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}

a.contact-method:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 30px rgba(10, 36, 64, 0.1);
    border-color: rgba(184, 134, 58, 0.7);
}

.contact-method svg {
    width: 26px;
    height: 26px;
    stroke: var(--brass);
    fill: none;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.contact-method span {
    font-size: 12px;
    font-weight: 500;
    color: var(--ink-soft);
}

.contact-method--pending {
    opacity: 0.65;
    border-style: dashed;
}

.contact-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.contact-cards .aside-card p { margin-bottom: 6px; }
.contact-cards .aside-card a:hover { color: var(--navy-mid); }

/* Карта */
.map-embed {
    width: 100%;
    height: 420px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--paper-dim);
}

.map-embed iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

/* Формы */
.form-card {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 28px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

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

.form-field--full { grid-column: 1 / -1; }

.form-field label {
    font-size: 13px;
    font-weight: 700;
    color: var(--navy-deep);
}

.form-field .req { color: var(--signal-red); }

.form-field input,
.form-field select,
.form-field textarea {
    width: 100%;
    padding: 12px 14px;
    font-family: var(--font-body);
    font-size: 15px;
    color: var(--ink);
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 8px;
    outline: none;
    transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.form-field textarea {
    min-height: 130px;
    resize: vertical;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
    background: var(--white);
    border-color: rgba(184, 134, 58, 0.8);
    box-shadow: 0 0 0 3px rgba(184, 134, 58, 0.16);
}

.form-field input[type="file"] {
    padding: 9px 12px;
    background: var(--white);
}

.field-hint {
    font-size: 12px;
    color: var(--ink-soft);
}

.form-consent {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin-top: 18px;
    font-size: 13px;
    color: var(--ink-soft);
    line-height: 1.55;
}

.form-consent input {
    width: 17px;
    height: 17px;
    margin-top: 1px;
    accent-color: var(--brass);
    flex-shrink: 0;
}

.form-consent a {
    color: var(--navy-mid);
    border-bottom: 1px solid var(--brass);
}

.form-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
    margin-top: 20px;
}

.form-status {
    margin-top: 14px;
    font-size: 14px;
    font-weight: 600;
    color: var(--navy-mid);
}

/* Плашка «форма-заглушка» — удаляется при подключении реальной отправки */
.course-pin {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 22px;
    padding: 14px 18px;
    background: var(--white);
    border: 1px solid var(--line);
    border-left: 4px solid var(--brass);
    border-radius: var(--radius);
    font-size: 14px;
}

.course-pin__clear {
    flex-shrink: 0;
    background: none;
    border: 1px solid rgba(10, 36, 64, 0.25);
    border-radius: var(--radius);
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 600;
    color: var(--ink-soft);
    cursor: pointer;
}

.course-pin__clear:hover {
    background: rgba(10, 36, 64, 0.04);
}

.form-note {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin-bottom: 22px;
    padding: 14px 16px;
    background: rgba(184, 134, 58, 0.09);
    border: 1px dashed rgba(184, 134, 58, 0.6);
    border-radius: var(--radius);
    font-size: 13px;
    color: #7D5C22;
    line-height: 1.55;
}

.form-note svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.8;
    stroke-linecap: round;
}

.form-note a { color: inherit; font-weight: 700; border-bottom: 1px solid currentColor; }

/* Юридический документ */
.legal-doc {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 36px 40px;
    max-width: 920px;
}

.legal-meta {
    font-size: 13px;
    color: var(--ink-soft);
    padding-bottom: 18px;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--line);
}

.legal-toc {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 18px 22px 18px 40px;
    margin-bottom: 30px;
}

.legal-toc li {
    font-size: 14px;
    color: var(--ink-soft);
    margin-bottom: 6px;
}

.legal-toc a:hover { color: var(--navy-mid); }

.legal-doc h2 {
    font-size: 20px;
    color: var(--navy-deep);
    margin: 32px 0 12px;
    scroll-margin-top: 90px;
}

.legal-doc h3 {
    font-size: 16px;
    color: var(--navy-deep);
    margin: 20px 0 8px;
}

.legal-doc p,
.legal-doc li {
    font-size: 15px;
    color: var(--ink-soft);
    line-height: 1.7;
}

.legal-doc p { margin-bottom: 12px; }

.legal-doc ul,
.legal-doc ol {
    margin: 0 0 14px 22px;
}

.legal-doc li { margin-bottom: 8px; }

.legal-doc strong { color: var(--navy-deep); }

@media (max-width: 900px) {
    .stat-grid { grid-template-columns: repeat(2, 1fr); }
    .gallery-grid { grid-template-columns: repeat(3, 1fr); }
    .contact-methods { grid-template-columns: repeat(3, 1fr); }
    .contact-cards { grid-template-columns: repeat(2, 1fr); }
    .legal-doc { padding: 26px 22px; }
}

@media (max-width: 768px) {
    .form-grid { grid-template-columns: 1fr; }
    .form-card { padding: 20px 18px; }
    .gallery-grid { grid-template-columns: repeat(2, 1fr); }
    .contact-methods { grid-template-columns: repeat(2, 1fr); }
    .contact-cards { grid-template-columns: 1fr; }
    .data-table, .data-table tbody, .data-table tr { display: block; }
    .data-table tr {
        padding: 12px 16px;
        border-bottom: 1px solid var(--line);
    }
    .data-table tr:last-child { border-bottom: none; }
    .data-table th,
    .data-table td {
        display: block;
        width: 100%;
        padding: 0;
        border-bottom: none;
    }
    .data-table th { padding-bottom: 4px; }
    .map-embed { height: 320px; }
    .section-title { font-size: 22px; }
}


/* =====================================================================
   Анимации (ветка SomeTest)
   Появление при скролле включается только когда JS добавил .js-anim на <html>,
   поэтому без JS и при prefers-reduced-motion весь контент виден сразу.
   ===================================================================== */

@keyframes revealUp {
    from { opacity: 0; transform: translateY(28px); }
    to   { opacity: 1; transform: none; }
}

@keyframes heroIn {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: none; }
}

@keyframes badgePop {
    0%   { transform: scale(1); }
    40%  { transform: scale(1.2); }
    100% { transform: scale(1); }
}

@keyframes faqOpen {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: none; }
}

/* Появление блоков при прокрутке: fill-mode backwards, чтобы после анимации
   не перебивать hover-transform карточек */
.js-anim .reveal:not(.in-view) { opacity: 0; }

.js-anim .reveal.in-view {
    animation: revealUp .7s cubic-bezier(.22,.72,.49,1.01) var(--reveal-delay, 0s) backwards;
}

/* Вход заголовочных блоков страниц и hero главной */
.page-hero .container > *,
.hero .container > .eyebrow,
.hero .container > h1,
.hero .container > p,
.hero .container > .btn {
    animation: heroIn .75s cubic-bezier(.22,.72,.49,1.01) backwards;
}

.page-hero .container > :nth-child(2),
.hero .container > h1 { animation-delay: .1s; }
.page-hero .container > :nth-child(3),
.hero .container > p { animation-delay: .2s; }
.hero .container > .btn { animation-delay: .3s; }
.hero .container > .btn + .btn { animation-delay: .38s; }

.hero .hero-stats { animation: heroIn .8s cubic-bezier(.22,.72,.49,1.01) .5s backwards; }

/* Шапка: тень усиливается после начала прокрутки */
.site-header { transition: box-shadow .3s ease; }
.site-header.scrolled { box-shadow: 0 8px 26px rgba(0, 0, 0, 0.38); }

/* Логотип: щит чуть поворачивается при наведении */
.logo-icon { transition: transform .45s cubic-bezier(.22,.72,.49,1.01); }
.logo:hover .logo-icon { transform: rotate(-10deg) scale(1.07); }

/* Пункты меню: линия растёт слева направо */
@media (min-width: 769px) {
    .main-nav a {
        border-bottom-color: transparent !important;
        background: linear-gradient(var(--brass), var(--brass)) no-repeat left bottom / 0 2px;
        transition: background-size .3s ease, color .15s ease;
    }

    .main-nav a:hover,
    .main-nav a.active { background-size: 100% 2px; }
}

/* Кнопки: блик и нажатие */
.btn:active { transform: translateY(0) scale(.97); box-shadow: none; }

.btn-primary::after {
    content: "";
    position: absolute;
    top: 0;
    left: -80%;
    width: 50%;
    height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transform: skewX(-20deg);
    transition: left .7s ease;
    pointer-events: none;
}

.btn-primary:hover::after { left: 130%; }

/* Попап заявки: плавный выезд окна */
.application-modal__dialog {
    transform: translateY(28px) scale(.96);
    transition: transform .4s cubic-bezier(.22,.72,.49,1.01);
}

.application-modal.open .application-modal__dialog { transform: none; }

/* Бейдж корзины курсов: «подпрыгивает» при добавлении */
.course-cart-badge.pop { animation: badgePop .45s ease; }

/* Пагинация */
.page-link { transition: transform .2s ease, border-color .2s ease, background .2s ease, color .2s ease; }
a.page-link:hover { transform: translateY(-2px); }
a.page-link:active { transform: translateY(0) scale(.95); }

/* FAQ: плавное раскрытие ответа */
.faq-item[open] > *:not(summary) { animation: faqOpen .35s ease; }

/* Индикатор прокрутки страницы (создаётся в site.js) */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    z-index: 2100;
    background: var(--brass);
    transform: scaleX(0);
    transform-origin: left;
    pointer-events: none;
}

/* Уважаем системную настройку «уменьшить движение» */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-delay: 0s !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
        scroll-behavior: auto !important;
    }

    .scroll-progress { display: none; }
}


/* =====================================================================
   Версия для слабовидящих (панель настроек + режимы на <html>, см. a11y.js)
   ===================================================================== */

.utility-bar .a11y-toggle {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: none;
    border: 0;
    padding: 0;
    color: rgba(255,255,255,0.85);
    font: inherit;
    cursor: pointer;
}

.utility-bar .a11y-toggle:hover,
.utility-bar .a11y-toggle[aria-expanded="true"] { color: var(--brass); }

.utility-right { gap: 20px; }

.a11y-panel {
    position: fixed;
    top: 12px;
    right: 12px;
    z-index: 2200;
    width: min(380px, calc(100vw - 24px));
    max-height: calc(100vh - 24px);
    overflow-y: auto;
    background: var(--white);
    color: var(--navy-deep);
    border: 2px solid var(--navy-deep);
    border-radius: 14px;
    padding: 18px 20px 20px;
    box-shadow: 0 24px 60px rgba(5, 18, 30, 0.45);
}

.a11y-panel[hidden] { display: none; }

.a11y-panel__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
    font-size: 16px;
}

.a11y-panel__close {
    width: 40px;
    height: 40px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--white);
    color: inherit;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}

.a11y-group { margin-bottom: 14px; }

.a11y-label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 700;
    color: var(--ink-soft);
}

.a11y-row { display: flex; flex-wrap: wrap; gap: 8px; }

.a11y-opt {
    min-height: 44px;
    padding: 8px 14px;
    border: 2px solid var(--line);
    border-radius: 10px;
    background: var(--white);
    color: var(--navy-deep);
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.a11y-opt:hover { border-color: var(--brass); }

.a11y-opt[aria-pressed="true"] {
    border-color: var(--navy-deep);
    background: var(--navy-deep);
    color: #fff;
}

.a11y-opt--bw { background: #fff; color: #000; border-color: #000; }
.a11y-opt--wb { background: #000; color: #fff; border-color: #000; }
.a11y-opt--blue { background: #9dd1ff; color: #063462; border-color: #063462; }
.a11y-opt--bw[aria-pressed="true"],
.a11y-opt--wb[aria-pressed="true"],
.a11y-opt--blue[aria-pressed="true"] { outline: 3px solid var(--brass); outline-offset: 2px; }
.a11y-opt--bw[aria-pressed="true"] { background: #fff; color: #000; }
.a11y-opt--wb[aria-pressed="true"] { background: #000; color: #fff; }
.a11y-opt--blue[aria-pressed="true"] { background: #9dd1ff; color: #063462; }

.a11y-panel__foot {
    display: grid;
    gap: 10px;
    margin-top: 6px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
    font-size: 14px;
}

.a11y-panel__foot a { color: var(--navy-deep); text-decoration: underline; }

.a11y-reset {
    min-height: 44px;
    border: 2px solid var(--brass);
    border-radius: 10px;
    background: var(--white);
    color: var(--navy-deep);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

/* Размер шрифта: масштабирует всю страницу (CSS zoom: layout перестраивается под ширину) */
html.a11y-size-1 body { zoom: 1.2; }
html.a11y-size-2 body { zoom: 1.4; }

/* Панель не масштабируем вместе со страницей — она и так крупная */
html.a11y-size-1 .a11y-panel { zoom: calc(1 / 1.2); }
html.a11y-size-2 .a11y-panel { zoom: calc(1 / 1.4); }

html.a11y-spacing-1 body { letter-spacing: 0.06em; word-spacing: 0.1em; }
html.a11y-spacing-2 body { letter-spacing: 0.12em; word-spacing: 0.2em; }

/* Изображения выключены: прячем фото, видео и декоративные картинки, логотип оставляем */
html.a11y-no-images .hero-video,
html.a11y-no-images .gallery-tile img,
html.a11y-no-images main img { display: none !important; }

html.a11y-no-images .hero::after { display: none; }

/* Контрастные схемы (классические «ч/б», «б/ч», «тёмно-синее на голубом») */
html[class*="a11y-scheme-"] *,
html[class*="a11y-scheme-"] *::before,
html[class*="a11y-scheme-"] *::after {
    background-image: none !important;
    box-shadow: none !important;
    text-shadow: none !important;
    animation: none !important;
}

html[class*="a11y-scheme-"] .hero-video { display: none !important; }

html.a11y-scheme-bw,
html.a11y-scheme-bw * { background-color: #fff !important; color: #000 !important; border-color: #000 !important; }
html.a11y-scheme-bw a, html.a11y-scheme-bw a * { color: #0000b3 !important; text-decoration: underline !important; }

html.a11y-scheme-wb,
html.a11y-scheme-wb * { background-color: #000 !important; color: #fff !important; border-color: #fff !important; }
html.a11y-scheme-wb a, html.a11y-scheme-wb a * { color: #ffe14d !important; text-decoration: underline !important; }

html.a11y-scheme-blue,
html.a11y-scheme-blue * { background-color: #9dd1ff !important; color: #063462 !important; border-color: #063462 !important; }
html.a11y-scheme-blue a, html.a11y-scheme-blue a * { color: #0a2a8a !important; text-decoration: underline !important; }

html[class*="a11y-scheme-"] svg,
html[class*="a11y-scheme-"] svg * { fill: currentColor !important; }

html[class*="a11y-scheme-"] .btn,
html[class*="a11y-scheme-"] .page-link,
html[class*="a11y-scheme-"] .a11y-opt { border: 2px solid currentColor !important; }

html[class*="a11y-scheme-"] .a11y-opt[aria-pressed="true"] { outline: 4px solid currentColor !important; }
html[class*="a11y-scheme-"] .scroll-progress { background: currentColor !important; }

html[class*="a11y-scheme-"] :focus-visible { outline: 3px solid currentColor !important; outline-offset: 2px; }

@media (max-width: 768px) {
    .a11y-toggle .util-text { display: none; }
    .utility-bar .a11y-toggle { width: 40px; height: 36px; justify-content: center; border-radius: 8px; background: rgba(255,255,255,0.06); }
    .utility-bar .a11y-toggle .ui-icon { width: 18px; height: 18px; }
}

/* Правки режимов доступности: «бургер» остаётся видимым, пункты меню не рвутся */
html[class*="a11y-scheme-"] .burger span { background-color: currentColor !important; }
html[class*="a11y-scheme-"] .burger { border-color: currentColor !important; }
html.a11y-on .main-nav a { white-space: nowrap; }

/* Форма «Сообщить о недоступности элементов сайта» внутри панели доступности */
.a11y-report-toggle {
    min-height: 44px;
    padding: 0;
    border: 0;
    background: none;
    color: var(--navy-deep);
    font: inherit;
    font-size: 14px;
    text-align: left;
    text-decoration: underline;
    cursor: pointer;
}

.a11y-report { display: grid; gap: 10px; }
.a11y-report[hidden], .a11y-consent[hidden] { display: none; }

.a11y-field { display: grid; gap: 4px; font-size: 13px; font-weight: 700; color: var(--ink-soft); }

.a11y-field textarea,
.a11y-field input {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid var(--line);
    border-radius: 10px;
    background: var(--white);
    color: var(--navy-deep);
    font: inherit;
    font-size: 14px;
    font-weight: 400;
}

.a11y-field textarea { resize: vertical; min-height: 90px; }
.a11y-field textarea:focus, .a11y-field input:focus { outline: 2px solid var(--brass); outline-offset: 1px; }

.a11y-consent { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; line-height: 1.4; }
.a11y-consent input { width: 18px; height: 18px; margin-top: 1px; flex-shrink: 0; accent-color: var(--brass); }

.a11y-submit {
    min-height: 44px;
    border: 0;
    border-radius: 10px;
    background: var(--brass);
    color: var(--navy-deep);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.a11y-submit:disabled { opacity: .6; cursor: wait; }
.a11y-status { min-height: 1.2em; margin: 0; font-size: 13px; font-weight: 700; }
