/*
 * Зимнее оформление сайта — включается вместе с «Праздничным эффектом» (/admin/settings/snow).
 * Класс html.au-winter ставит общий шаблон; без него этот файл даже не подключается.
 * Всё нарисовано встроенными SVG: никаких лишних запросов, анимируется только прозрачность огоньков.
 */
:root {
    --auw-icicles: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='24' viewBox='0 0 160 24'%3E %3Cdefs%3E%3ClinearGradient id='i' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%23ffffff'/%3E%3Cstop offset='.55' stop-color='%23eef6fc'/%3E%3Cstop offset='1' stop-color='%23cfe6f7'/%3E%3C/linearGradient%3E%3C/defs%3E %3Cpath d='M0 0H160V5C154 7 149 6 145 7L142.5 19L139.5 7C131 8.5 124 6 117 7.5L115.5 13L113.5 7.5C104 9 96 5.5 87 7L84.5 22L81.5 7C73 8.5 65 6 57 7.5L55.5 12L53.5 7.5C45 9 38 6 30 7L27.5 17L25 7C17 8.5 9 5.5 0 6.5Z' fill='url(%23i)' stroke='rgba(120,160,196,.55)' stroke-width='.8'/%3E %3Cpath d='M0 2.6C30 4.5 60 1.8 90 3.6C120 5 140 2.4 160 3.2' stroke='%23ffffff' stroke-width='1.4' fill='none' opacity='.9'/%3E %3C/svg%3E");
    --auw-garland: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='30' viewBox='0 0 120 30'%3E %3Cpath d='M0 4Q30 18 60 4Q90 18 120 4' fill='none' stroke='%231e293b' stroke-width='1.4' opacity='.85'/%3E%3Crect x='13' y='9.3' width='4' height='3.2' rx='.8' fill='%23334155'/%3E%3Cellipse cx='15' cy='17.3' rx='3.5' ry='4.8' fill='%23ef4444'/%3E%3Cellipse cx='13.9' cy='15.5' rx='1' ry='1.7' fill='%23ffffff' opacity='.75'/%3E%3Crect x='43' y='9.3' width='4' height='3.2' rx='.8' fill='%23334155'/%3E%3Cellipse cx='45' cy='17.3' rx='3.5' ry='4.8' fill='%23facc15'/%3E%3Cellipse cx='43.9' cy='15.5' rx='1' ry='1.7' fill='%23ffffff' opacity='.75'/%3E%3Crect x='73' y='9.3' width='4' height='3.2' rx='.8' fill='%23334155'/%3E%3Cellipse cx='75' cy='17.3' rx='3.5' ry='4.8' fill='%2338bdf8'/%3E%3Cellipse cx='73.9' cy='15.5' rx='1' ry='1.7' fill='%23ffffff' opacity='.75'/%3E%3Crect x='103' y='9.3' width='4' height='3.2' rx='.8' fill='%23334155'/%3E%3Cellipse cx='105' cy='17.3' rx='3.5' ry='4.8' fill='%2322c55e'/%3E%3Cellipse cx='103.9' cy='15.5' rx='1' ry='1.7' fill='%23ffffff' opacity='.75'/%3E%3C/svg%3E");
    --auw-glow-a: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='30' viewBox='0 0 120 30'%3E%3Cdefs%3E%3CradialGradient id='g0'%3E%3Cstop offset='0' stop-color='%23ef4444' stop-opacity='.95'/%3E%3Cstop offset='.35' stop-color='%23ef4444' stop-opacity='.45'/%3E%3Cstop offset='1' stop-color='%23ef4444' stop-opacity='0'/%3E%3C/radialGradient%3E%3CradialGradient id='g2'%3E%3Cstop offset='0' stop-color='%2338bdf8' stop-opacity='.95'/%3E%3Cstop offset='.35' stop-color='%2338bdf8' stop-opacity='.45'/%3E%3Cstop offset='1' stop-color='%2338bdf8' stop-opacity='0'/%3E%3C/radialGradient%3E%3C/defs%3E%3Ccircle cx='15' cy='17.3' r='11' fill='url(%23g0)'/%3E%3Ccircle cx='75' cy='17.3' r='11' fill='url(%23g2)'/%3E%3C/svg%3E");
    --auw-glow-b: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='30' viewBox='0 0 120 30'%3E%3Cdefs%3E%3CradialGradient id='g1'%3E%3Cstop offset='0' stop-color='%23facc15' stop-opacity='.95'/%3E%3Cstop offset='.35' stop-color='%23facc15' stop-opacity='.45'/%3E%3Cstop offset='1' stop-color='%23facc15' stop-opacity='0'/%3E%3C/radialGradient%3E%3CradialGradient id='g3'%3E%3Cstop offset='0' stop-color='%2322c55e' stop-opacity='.95'/%3E%3Cstop offset='.35' stop-color='%2322c55e' stop-opacity='.45'/%3E%3Cstop offset='1' stop-color='%2322c55e' stop-opacity='0'/%3E%3C/radialGradient%3E%3C/defs%3E%3Ccircle cx='45' cy='17.3' r='11' fill='url(%23g1)'/%3E%3Ccircle cx='105' cy='17.3' r='11' fill='url(%23g3)'/%3E%3C/svg%3E");
    --auw-cap: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 14' preserveAspectRatio='none'%3E %3Cdefs%3E%3ClinearGradient id='c' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%23ffffff'/%3E%3Cstop offset='1' stop-color='%23dbeaf6'/%3E%3C/linearGradient%3E%3C/defs%3E %3Cpath d='M1 12C0 6 5 3 11 4C15 0 24 1 29 3.5C35 0 45 1 51 3C57 0 66 0.5 72 3C79 0 89 1 92 4.5C97 4 100 8 99 12C80 14.5 20 14.5 1 12Z' fill='url(%23c)' stroke='rgba(120,160,196,.6)' stroke-width='.6'/%3E%3C/svg%3E");
    --auw-cardcap: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 12' preserveAspectRatio='none'%3E %3Cdefs%3E%3ClinearGradient id='k' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%23ffffff'/%3E%3Cstop offset='1' stop-color='%23e7f1f9'/%3E%3C/linearGradient%3E%3C/defs%3E %3Cpath d='M0 0H100V5C95 7 91 4.5 86 6.5C82 10.5 78 10 76 6.5C70 4.5 64 7.5 58 6C52 4.5 47 8 41 6.5C37 9.5 33 9 31 6C25 4.5 18 7.5 12 6C7 5 4 7 0 6Z' fill='url(%23k)'/%3E%3C/svg%3E");
    --auw-drift: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 100' preserveAspectRatio='none'%3E %3Cdefs%3E%3ClinearGradient id='d1' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%23ffffff' stop-opacity='.75'/%3E%3Cstop offset='1' stop-color='%23dbe8f2' stop-opacity='.9'/%3E%3C/linearGradient%3E %3ClinearGradient id='d2' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%23ffffff'/%3E%3Cstop offset='.6' stop-color='%23f6faf7'/%3E%3Cstop offset='1' stop-color='%23f6faf7'/%3E%3C/linearGradient%3E%3C/defs%3E %3Cpath d='M0 54C140 30 300 62 470 44C650 25 820 66 1000 46C1170 28 1320 50 1440 38V100H0Z' fill='url(%23d1)'/%3E %3Cpath d='M0 76C170 54 330 86 530 70C730 54 890 88 1090 72C1250 60 1360 78 1440 68V100H0Z' fill='url(%23d2)'/%3E %3Cpath d='M0 76C170 54 330 86 530 70C730 54 890 88 1090 72C1250 60 1360 78 1440 68' fill='none' stroke='rgba(150,185,214,.55)' stroke-width='1.5'/%3E%3C/svg%3E");
    --auw-hills: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 70' preserveAspectRatio='none'%3E %3Cdefs%3E%3ClinearGradient id='h' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%23ffffff'/%3E%3Cstop offset='1' stop-color='%23e3eef7'/%3E%3C/linearGradient%3E%3C/defs%3E %3Cpath d='M0 42C160 14 330 48 520 30C700 13 880 50 1070 30C1240 12 1360 34 1440 24V70H0Z' fill='url(%23h)'/%3E %3Cpath d='M0 42C160 14 330 48 520 30C700 13 880 50 1070 30C1240 12 1360 34 1440 24' fill='none' stroke='rgba(120,160,196,.55)' stroke-width='1.6'/%3E%3C/svg%3E");
    --auw-scallop: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='10' viewBox='0 0 64 10'%3E %3Cpath d='M0 10V5C6 1 12 2 17 4C22 1 30 0.5 35 3.5C41 0.5 49 1 54 4C58 2 62 2.5 64 5V10Z' fill='%23ffffff' stroke='rgba(120,160,196,.5)' stroke-width='.6'/%3E%3C/svg%3E");
}

/* ── Гирлянда с сосульками под шапкой ──────────────────────────────── */
.au-winter-garland {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    height: 40px;
    pointer-events: none;
    z-index: 3;
    background: var(--auw-icicles) left top / 160px 24px repeat-x;
    transition: opacity .25s ease;
}
.au-winter-garland.is-away { opacity: 0; }
.au-winter-garland::before,
.au-winter-garland::after,
.au-winter-garland > i {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 6px;
    height: 30px;
    background-repeat: repeat-x;
    background-size: 120px 30px;
    background-position: 22px 0;
}
.au-winter-garland::before { background-image: var(--auw-garland); }
.au-winter-garland::after { background-image: var(--auw-glow-a); animation: auw-twinkle 2.6s ease-in-out infinite; }
.au-winter-garland > i { background-image: var(--auw-glow-b); animation: auw-twinkle 2.6s ease-in-out 1.3s infinite; opacity: 0; }

@keyframes auw-twinkle {
    0%, 100% { opacity: .15; }
    50% { opacity: 1; }
}

/* ── Главная: сугроб внизу видео ───────────────────────────────────── */
html.au-winter .au-hero::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 96px;
    z-index: 2;
    pointer-events: none;
    background: var(--auw-drift) center bottom / 100% 100% no-repeat;
}
/* Лёгкий морозный узор по углам видео */
html.au-winter .au-hero__overlay {
    box-shadow: inset 0 0 140px rgba(214, 236, 255, .22);
}

/* ── Снежные шапки на главных кнопках ─────────────────────────────── */
html.au-winter .au-btn--primary,
html.au-winter .au-lead-btn--primary,
html.au-winter .au-winter-cap {
    position: relative;
}
html.au-winter .au-btn--primary::before,
html.au-winter .au-lead-btn--primary::before,
html.au-winter .au-winter-cap::before {
    content: "";
    position: absolute;
    left: 7px;
    right: 7px;
    top: -7px;
    height: 13px;
    pointer-events: none;
    background: var(--auw-cap) center / 100% 100% no-repeat;
    filter: drop-shadow(0 1px 1px rgba(30, 64, 100, .18));
}

/* ── Снег на карточках новостей ───────────────────────────────────── */
html.au-winter .au-news-card::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 13px;
    z-index: 4;
    pointer-events: none;
    background: var(--auw-cardcap) center top / 100% 100% no-repeat;
    filter: drop-shadow(0 2px 2px rgba(30, 64, 100, .14));
}

/* ── Заголовки разделов: снежинка у линии ─────────────────────────── */
html.au-winter .au-accent-line {
    position: relative;
    background: linear-gradient(90deg, #187d35, #38bdf8) !important;
}
html.au-winter .au-accent-line::after {
    content: "❄";
    position: absolute;
    right: -20px;
    top: 50%;
    transform: translateY(-52%);
    font-size: 15px;
    line-height: 1;
    color: #38bdf8;
}

/* ── Подвал: заснеженные холмы по верхнему краю и снег на карточке «Поступайте» ── */
html.au-winter footer.premium-footer::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: -42px;
    height: 68px;
    pointer-events: none;
    background: var(--auw-hills) center bottom / 100% 100% no-repeat;
}
html.au-winter .auf-cta::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 16px;
    z-index: 2;
    pointer-events: none;
    background: var(--auw-cardcap) center top / 100% 100% no-repeat;
    filter: drop-shadow(0 2px 2px rgba(4, 30, 14, .25));
}

/* ── Телефон: снег на нижнем меню ─────────────────────────────────── */
html.au-winter .m-bottom-nav::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: -8px;
    height: 10px;
    pointer-events: none;
    z-index: 1;
    background: var(--auw-scallop) left bottom / 64px 10px repeat-x;
}

@media (max-width: 768px) {
    .au-winter-garland { right: auto; width: 125%; transform: scale(.8); transform-origin: top left; }
    html.au-winter .au-hero::after { height: 56px; }
    html.au-winter footer.premium-footer::before { top: -28px; height: 44px; }
    html.au-winter .au-accent-line::after { font-size: 13px; right: -18px; }
}

/* ── Доступность и печать ─────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    .au-winter-garland::after, .au-winter-garland > i { animation: none; opacity: .6; }
}
html.a11y-pause-media .au-winter-garland::after,
html.a11y-pause-media .au-winter-garland > i { animation: none; opacity: .6; }
html.a11y-cb-high-contrast .au-winter-garland,
html.a11y-cb-high-contrast.au-winter footer.premium-footer::before,
html.a11y-cb-high-contrast.au-winter .auf-cta::before,
html.a11y-cb-high-contrast.au-winter .au-hero::after,
html.a11y-cb-high-contrast.au-winter .au-news-card::after,
html.a11y-cb-high-contrast.au-winter .m-bottom-nav::before,
html.a11y-cb-high-contrast.au-winter .au-btn--primary::before,
html.a11y-cb-high-contrast.au-winter .au-lead-btn--primary::before { display: none !important; }
@media print {
    .au-winter-garland { display: none !important; }
}
