@font-face {
    font-family: 'GolosText';
    src: url('fonts/GolosText-Regular.woff') format('woff');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'GolosText';
    src: url('fonts/GolosText-Bold.woff') format('woff');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

:root {
    --gorizontal-field: 4em;
    --vertical-field: 2em;
    --page-border-color: hsl(0, 0%, 80%);
    --accent: #001b71;
    --accent-2: #0070c0;
    --accent-3: #ffae00;
    --bg-soft: #f5f7fb;
}

@media (max-width: 721px) {
    :root {
        --gorizontal-field: 1.5em;
        --vertical-field: 1em;
    }
}

body.aviavuc {
    background: #fafafa;
    margin: 0;
    font-family: 'GolosText', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    color: #111;
    font-weight: normal;
    overflow-x: hidden;
    font-size: calc(0.3vw + 12px);
}

/* Фон-узор страницы отдельным слоем — НЕ на body (иначе ломает backdrop-filter шапки) */
body.aviavuc .bg-layer {
    position: fixed;
    inset: 100px 0 0 0;
    background-image: url('../imgs/bg1.svg');
    background-repeat: no-repeat;
    background-position: center top;
    background-size: calc( max( 100%, 2000px ) ) auto;
    z-index: -1;
    pointer-events: none;
}

html, body {
    margin: 0;
    padding: 0;
}

h1, h2, h3 {
    font-family: inherit;
}

/* ВАЖНО: НЕ ставить position:relative + z-index на прямых детей body —
   это создаёт stacking context, который ЛОМАЕТ backdrop-filter в шапке.
   Достаточно того, что .shapka имеет position:fixed + z-index:100. */

/* Единый базовый размер шрифта — наследуется всеми элементами через body */
div {
    font-size: inherit;
}

.action {
    cursor: pointer;
}

.shapka {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
    width: 100%;
    height: 3em;
    background-color: rgba(255, 255, 255, 0.72);
    color: #111;
    border-bottom: 1px solid rgba(0, 27, 113, 0.12);
    box-shadow: 0 2px 12px rgba(0, 27, 113, 0.06);
    backdrop-filter: saturate(180%) blur(16px);
    -webkit-backdrop-filter: saturate(180%) blur(16px);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header .header-inner {
    flex-grow: 1;
    flex-basis: 0;
    height: 100%;
}

header nav.pc {
    display: flex;
    flex-grow: 0;
    height: 100%;
    gap: 4em;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: center;
}

header nav.pc a {
    color: #001b71;
    font-weight: 700;
    font-size: 1em;
    letter-spacing: 0.02em;
}

header .logos {
    display: flex;
    gap: 1em;
    justify-content: flex-end;
    align-items: center;
    padding-right: 3.5em;
    padding-left: 2em;
    padding-block: 0.25em;
}

header .logo-outer {
    height: calc(100% - 0.4em);
    max-width: 64px;
    display: flex;
    align-items: center;
}

header .logo-outer img {
    max-height: 80%;
    width: auto;
}

header .burger {
    display: none;
    width: 50px;
    height: 50px;
    overflow: hidden;
    cursor: pointer;
    position: relative;
    background-color: #d9d9d6;
    color: black;
}

.burger div {
    position: absolute;
    height: 3px;
    background-color: #000000;
    border-radius: 3px;
    transition: all 0.5s;
    z-index: 2;
}

.burger.clicked div {
    width: 15px;
    height: 5px;
}

.burger:not(.clicked) div:nth-child(1) { width: 30px; left: 10px; top: 12px; }
.burger:not(.clicked) div:nth-child(2) { width: 25px; left: 10px; top: 19px; }
.burger:not(.clicked) div:nth-child(3) { width: 28px; left: 10px; top: 26px; }
.burger:not(.clicked) div:nth-child(4) { width: 25px; left: 10px; top: 33px; }

.burger.clicked div:nth-child(4) { left: 15px; top: 20px; transform: rotate( 45deg); }
.burger.clicked div:nth-child(3) { left: 19px; top: 20px; transform: rotate(-45deg); }
.burger.clicked div:nth-child(2) { left: 15px; top: 24px; transform: rotate(-45deg); }
.burger.clicked div:nth-child(1) { left: 19px; top: 24px; transform: rotate( 45deg); }

header nav.mobile {
    position: absolute;
    top: 0;
    left: 0;
    width: 60%;
    height: fit-content;
    overflow: hidden;
    background-color: #d9d9d6;
    color: black;
    padding-top: 3.3em;
    z-index: -1;
    transform: translateY(calc(-100% - 3.3em));
    transition: transform 0.35s ease-in-out;
}

header .shapka:has(.burger.clicked) nav.mobile {
    display: block;
    transform: translateY(0);
}

header nav.mobile ul {
    font-size: 1.5em;
    list-style: none;
    margin: 0;
    padding: 1.5em;
    display: flex;
    flex-direction: column;
    gap: 0.5em;
}

header nav.mobile a {
    color: #001b71;
    font-weight: 700;
}

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

header nav a:hover {
    color: inherit;
    text-decoration: underline;
}

header nav a:focus-visible {
    outline: unset;
}

header nav a.active {
    text-decoration: underline;
}

.header-block {
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    align-items: stretch;
    gap: 0;
    min-height: 70vh;
    background: var(--accent);
    border-radius: 1.2em;
    overflow: hidden;
    position: relative;
    box-shadow: 0 12px 40px rgba(0, 27, 113, 0.18);
    margin-top: calc(3em + var(--vertical-field));
    padding: 0;
}

.header-image {
    position: relative;
    overflow: hidden;
    margin: 0;
    background: #000;
}

.header-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 50%;
}

.header-image .corner-tag {
    position: absolute;
    top: 1.5em;
    left: 1.5em;
    z-index: 2;
    background: var(--accent-3);
    color: #111;
    padding: 0.4em 0.9em;
    font-size: 0.85em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 4px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.25);
}

.header-block .h1-outer {
    box-sizing: border-box;
    padding: calc(var(--vertical-field) * 1.6) calc(var(--gorizontal-field) * 0.9);
    color: #fff;
    margin: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    z-index: 2;
}

h1 {
    font-size: calc( 2.2vw + 1em );
    width: 100%;
    font-weight: 700;
    text-transform: uppercase;
    line-height: 1em;
    margin-bottom: 0.5em;
    margin-top: 0;
    letter-spacing: -0.015em;
}

h1 b {
    font-weight: 700;
}

header .up-h {
    font-size: 0.85em;
    color: var(--accent-3);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-weight: 700;
    margin-bottom: 0.6em;
    display: inline-block;
    padding-bottom: 0.4em;
    border-bottom: 2px solid var(--accent-3);
    width: fit-content;
}

header .h1-outer .sub-h {
    font-size: 1em;
    display: block;
    max-width: 90%;
    margin-bottom: 1.8em;
    color: #ffffffd0;
    line-height: 1.4em;
    font-weight: 400;
}

.hero-cta {
    align-self: flex-start;
    margin-top: 0.5em;
    font-size: 1.05em;
    padding: 0.95em 2.4em;
    background: var(--accent-3);
    color: #111;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 6px;
    text-decoration: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.hero-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 174, 0, 0.4);
    background: #ffc233;
    color: #111;
    text-decoration: none;
}

h2 {
    color: var(--accent);
    font-size: 2em;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    margin-bottom: 0.5em;
}

section#about h2,
section#schedule h2 {
    color: var(--accent);
}

section#contacts h2 {
    color: #fff;
}

section {
    scroll-margin-top: 3em;
}

section#about {
    padding-inline: var(--gorizontal-field);
}

.up,
.img-right {
    display: none;
}

section#schedule {
    padding-inline: var(--gorizontal-field);
    padding-block: var(--vertical-field);
}

/* === Formats (Онлайн / Очно) — две карточки на белом фоне с тонкой рамкой === */
.formats {
    margin-top: 1.2em;
}

.formats-lead {
    margin: 0 0 0.8em;
}

.formats-cols {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5em;
}

.format-block {
    background: #ffffff;
    border: 1px solid var(--page-border-color);
    border-radius: 10px;
    padding: 1em 1.2em;
}

.format-block h3 {
    margin: 0 0 0.4em;
    font-size: 0.95em;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent);
    font-weight: 700;
}

.format-block ul {
    margin: 0;
    padding-left: 1.2em;
}

.format-block li {
    margin-bottom: 0.35em;
    line-height: 1.5em;
}

.format-block li:last-child {
    margin-bottom: 0;
}

/* === Schedule — компактный список вместо таблицы === */
.schedule-list {
    list-style: none;
    padding: 0;
    margin: 1em 0 0;
    display: flex;
    flex-direction: column;
    gap: 0.6em;
}

.schedule-row {
    display: grid;
    grid-template-columns: 56px 120px 1fr 90px;
    align-items: center;
    gap: 1em;
    background: #ffffff;
    border: 1px solid var(--page-border-color);
    border-radius: 8px;
    padding: 0.7em 1em;
}

.schedule-row--extra {
    background: #fff5dc;
    border-color: var(--accent-3);
}

.schedule-day {
    font-weight: 700;
    color: var(--accent);
    text-align: center;
    background: var(--bg-soft);
    border-radius: 6px;
    padding: 0.3em 0;
    font-size: 0.95em;
}

.schedule-time {
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    color: #111;
    font-size: 0.95em;
}

.schedule-subject {
    font-weight: 600;
    color: #111;
}

.schedule-format {
    justify-self: end;
    font-size: 0.78em;
    padding: 0.25em 0.7em;
    border-radius: 999px;
    background: var(--accent-2);
    color: #fff;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.schedule-format--once {
    background: var(--accent-3);
    color: #111;
}

.schedule-note {
    margin: 1.2em 0 0;
    color: #111;
}

.schedule-note b {
    color: var(--accent);
}

.schedule-footnote {
    margin-top: 0.8em;
    color: #555;
}

.btn-apply {
    display: inline-block;
    margin-top: 1.4em;
    padding: 0.95em 2.6em;
    background: var(--accent);
    color: #fff;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 6px;
    text-decoration: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-apply:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 27, 113, 0.3);
    color: #fff;
    text-decoration: none;
}

@media (max-width: 721px) {
    .schedule-row {
        grid-template-columns: 48px 1fr 80px;
    }
    .schedule-row .schedule-time {
        grid-column: 2 / 3;
    }
    .schedule-row .schedule-subject {
        grid-column: 2 / 4;
        grid-row: 2;
        color: #555;
    }
}

section#contacts {
    color: #fff;
    padding-inline: var(--gorizontal-field);
    padding-block: calc(var(--vertical-field) * 1.5);
    background: var(--accent);
    position: relative;
    overflow: hidden;
    margin: 0;
}

section#contacts > * {
    position: relative;
    z-index: 1;
}

section#contacts h2 {
    color: #fff;
    margin-bottom: 1em;
}

section#contacts .contacts-inner {
    display: flex;
    flex-direction: column;
    gap: 1em;
}

section#contacts p {
    margin: 0;
    line-height: 1.6em;
    color: #ffffff;
}

section#contacts a {
    color: var(--accent-3);
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 174, 0, 0.5);
    padding-bottom: 1px;
    transition: border-color 0.15s ease;
}

section#contacts a:hover {
    border-bottom-color: var(--accent-3);
}

.btn {
    display: inline-block;
    text-decoration: none;
    border-radius: 0.5em;
    padding: 0.7em 2em;
    font-weight: 600;
}

.btn-blue {
    background: #009;
    color: #fff;
}

.btn-blue:hover {
    background: #007;
}

@media (max-width: 1349px) {
    .img-right {
        display: none;
    }
}

@media (max-width: 721px) {
    .shapka {
        height: 3.3em;
        background-color: transparent;
    }
    header nav.pc {
        display: none;
    }
    header .header-inner {
        display: none;
    }
    header .burger {
        display: block;
    }
    .header-block {
        grid-template-columns: 1fr;
        min-height: auto;
        margin-left: var(--gorizontal-field);
        margin-right: var(--gorizontal-field);
    }
    .header-image {
        height: 50vw;
        min-height: 240px;
    }
    .header-block .h1-outer {
        padding: 1.4em calc(var(--gorizontal-field) * 0.6) 1.8em;
    }
}
