﻿/* Рождественское оформление (Models/ChristmasTheme.cs, js/christmas.js). Подключается в _Layout, только когда включено в appsettings.
   Еловая гирлянда с венками под меню (качаются волной), сани Санты по синей линии, снег, бант на кнопке профиля,
   праздничная лента с бантом на подвале, открытка с венком в профиле. */

:root {
    --xmas-red: #c8283c;
    --xmas-red-dark: #a3192b;
    --xmas-gold: #e2b24a;
    --xmas-cream: #fffaf2;
}

/* === Еловая гирлянда с венками: висит под синей линией меню === */
.navbar-second {
    position: relative;
}

    .navbar-second > .container {
        position: relative;
        z-index: 2;
    }

.xmas-wreaths {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% - 7px);       /* ветка лежит на нижнем крае синей линии */
    height: 40px;
    overflow: hidden;
    pointer-events: none;
    z-index: 5;
}

    /* Еловая ветка дугами между венками (шаг 120px; венки — в верхних точках, их расставляет js) */
    .xmas-wreaths::before {
        content: "";
        position: absolute;
        left: 0;
        right: 0;
        top: 0;
        height: 32px;
        background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='32'%3E%3Cg fill='none' stroke-linecap='round'%3E%3Cpath d='M0 9Q60 31 120 9' stroke='%23174a31' stroke-width='6'/%3E%3Cg stroke-width='1.6'%3E%3Cpath d='M0.0 9.0L1.9 5.6' stroke='%234cae74'/%3E%3Cpath d='M0.8 9.3L-1.2 12.4' stroke='%23174a31'/%3E%3Cpath d='M1.6 9.6L2.0 13.8' stroke='%2338985f'/%3E%3Cpath d='M2.4 9.9L1.5 15.9' stroke='%231f6340'/%3E%3Cpath d='M3.2 10.1L7.5 7.4' stroke='%23174a31'/%3E%3Cpath d='M4.0 10.4L2.2 4.3' stroke='%23174a31'/%3E%3Cpath d='M4.8 10.7L0.4 14.7' stroke='%232a7d50'/%3E%3Cpath d='M5.6 11.0L2.6 16.5' stroke='%2338985f'/%3E%3Cpath d='M6.4 11.2L5.6 17.1' stroke='%2338985f'/%3E%3Cpath d='M7.2 11.5L10.4 9.4' stroke='%231f6340'/%3E%3Cpath d='M8.0 11.7L9.3 18.0' stroke='%2338985f'/%3E%3Cpath d='M8.8 12.0L7.8 17.9' stroke='%234cae74'/%3E%3Cpath d='M9.6 12.2L7.9 16.7' stroke='%231f6340'/%3E%3Cpath d='M10.4 12.5L6.7 17.6' stroke='%232a7d50'/%3E%3Cpath d='M11.2 12.7L13.9 9.2' stroke='%234cae74'/%3E%3Cpath d='M12.0 13.0L14.6 9.7' stroke='%234cae74'/%3E%3Cpath d='M12.8 13.2L13.2 16.9' stroke='%2338985f'/%3E%3Cpath d='M13.6 13.4L13.6 9.7' stroke='%231f6340'/%3E%3Cpath d='M14.4 13.6L13.8 7.9' stroke='%23174a31'/%3E%3Cpath d='M15.2 13.9L17.7 8.7' stroke='%2338985f'/%3E%3Cpath d='M16.0 14.1L13.8 20.0' stroke='%232a7d50'/%3E%3Cpath d='M16.8 14.3L20.9 12.5' stroke='%23174a31'/%3E%3Cpath d='M17.6 14.5L19.1 11.2' stroke='%231f6340'/%3E%3Cpath d='M18.4 14.7L18.9 19.0' stroke='%23174a31'/%3E%3Cpath d='M19.2 14.9L19.8 21.3' stroke='%2338985f'/%3E%3Cpath d='M20.0 15.1L19.2 20.1' stroke='%234cae74'/%3E%3Cpath d='M20.8 15.3L23.6 9.6' stroke='%234cae74'/%3E%3Cpath d='M21.6 15.5L21.0 21.1' stroke='%231f6340'/%3E%3Cpath d='M22.4 15.7L21.9 19.9' stroke='%232a7d50'/%3E%3Cpath d='M23.2 15.9L26.1 19.6' stroke='%234cae74'/%3E%3Cpath d='M24.0 16.0L27.2 20.3' stroke='%231f6340'/%3E%3Cpath d='M24.8 16.2L26.8 12.2' stroke='%232a7d50'/%3E%3Cpath d='M25.6 16.4L23.9 20.4' stroke='%2338985f'/%3E%3Cpath d='M26.4 16.6L28.7 10.6' stroke='%23174a31'/%3E%3Cpath d='M27.2 16.7L28.4 21.4' stroke='%234cae74'/%3E%3Cpath d='M28.0 16.9L29.5 20.6' stroke='%232a7d50'/%3E%3Cpath d='M28.8 17.0L29.6 21.6' stroke='%23174a31'/%3E%3Cpath d='M29.6 17.2L28.9 13.1' stroke='%232a7d50'/%3E%3Cpath d='M30.4 17.3L29.7 11.8' stroke='%23174a31'/%3E%3Cpath d='M31.2 17.5L33.4 11.5' stroke='%231f6340'/%3E%3Cpath d='M32.0 17.6L27.8 22.4' stroke='%23174a31'/%3E%3Cpath d='M32.8 17.7L30.5 21.2' stroke='%234cae74'/%3E%3Cpath d='M33.6 17.9L35.1 23.5' stroke='%23174a31'/%3E%3Cpath d='M34.4 18.0L33.3 12.1' stroke='%234cae74'/%3E%3Cpath d='M35.2 18.1L38.5 15.0' stroke='%23174a31'/%3E%3Cpath d='M36.0 18.2L34.6 22.8' stroke='%234cae74'/%3E%3Cpath d='M36.8 18.4L36.4 23.7' stroke='%232a7d50'/%3E%3Cpath d='M37.6 18.5L36.7 22.0' stroke='%2338985f'/%3E%3Cpath d='M38.4 18.6L36.4 14.1' stroke='%234cae74'/%3E%3Cpath d='M39.2 18.7L37.7 25.0' stroke='%231f6340'/%3E%3Cpath d='M40.0 18.8L43.2 13.7' stroke='%234cae74'/%3E%3Cpath d='M40.8 18.9L39.6 24.9' stroke='%23174a31'/%3E%3Cpath d='M41.6 19.0L43.9 22.5' stroke='%23174a31'/%3E%3Cpath d='M42.4 19.1L46.9 14.8' stroke='%234cae74'/%3E%3Cpath d='M43.2 19.1L39.2 15.0' stroke='%231f6340'/%3E%3Cpath d='M44.0 19.2L45.3 22.5' stroke='%234cae74'/%3E%3Cpath d='M44.8 19.3L48.9 24.0' stroke='%23174a31'/%3E%3Cpath d='M45.6 19.4L49.2 24.7' stroke='%234cae74'/%3E%3Cpath d='M46.4 19.4L44.2 22.4' stroke='%231f6340'/%3E%3Cpath d='M47.2 19.5L43.7 14.4' stroke='%23174a31'/%3E%3Cpath d='M48.0 19.6L46.3 15.6' stroke='%231f6340'/%3E%3Cpath d='M48.8 19.6L49.0 14.4' stroke='%2338985f'/%3E%3Cpath d='M49.6 19.7L51.7 16.0' stroke='%234cae74'/%3E%3Cpath d='M50.4 19.7L53.4 23.0' stroke='%23174a31'/%3E%3Cpath d='M51.2 19.8L53.1 16.7' stroke='%23174a31'/%3E%3Cpath d='M52.0 19.8L52.1 16.2' stroke='%23174a31'/%3E%3Cpath d='M52.8 19.8L54.1 24.1' stroke='%232a7d50'/%3E%3Cpath d='M53.6 19.9L52.0 24.9' stroke='%232a7d50'/%3E%3Cpath d='M54.4 19.9L56.6 23.8' stroke='%23174a31'/%3E%3Cpath d='M55.2 19.9L55.9 14.3' stroke='%2338985f'/%3E%3Cpath d='M56.0 20.0L56.5 16.4' stroke='%2338985f'/%3E%3Cpath d='M56.8 20.0L55.8 23.5' stroke='%2338985f'/%3E%3Cpath d='M57.6 20.0L56.5 15.1' stroke='%232a7d50'/%3E%3Cpath d='M58.4 20.0L54.9 23.2' stroke='%23174a31'/%3E%3Cpath d='M59.2 20.0L57.1 16.2' stroke='%234cae74'/%3E%3Cpath d='M60.0 20.0L62.2 16.4' stroke='%231f6340'/%3E%3Cpath d='M60.8 20.0L64.1 16.7' stroke='%234cae74'/%3E%3Cpath d='M61.6 20.0L65.2 24.3' stroke='%234cae74'/%3E%3Cpath d='M62.4 20.0L60.8 25.5' stroke='%234cae74'/%3E%3Cpath d='M63.2 20.0L66.1 15.1' stroke='%2338985f'/%3E%3Cpath d='M64.0 20.0L61.8 15.9' stroke='%234cae74'/%3E%3Cpath d='M64.8 19.9L65.3 14.5' stroke='%2338985f'/%3E%3Cpath d='M65.6 19.9L67.9 16.0' stroke='%23174a31'/%3E%3Cpath d='M66.4 19.9L69.4 15.3' stroke='%232a7d50'/%3E%3Cpath d='M67.2 19.8L65.5 23.0' stroke='%234cae74'/%3E%3Cpath d='M68.0 19.8L64.1 15.6' stroke='%234cae74'/%3E%3Cpath d='M68.8 19.8L69.0 13.7' stroke='%231f6340'/%3E%3Cpath d='M69.6 19.7L67.6 16.2' stroke='%231f6340'/%3E%3Cpath d='M70.4 19.7L69.6 25.4' stroke='%2338985f'/%3E%3Cpath d='M71.2 19.6L72.6 24.1' stroke='%232a7d50'/%3E%3Cpath d='M72.0 19.6L68.8 22.9' stroke='%231f6340'/%3E%3Cpath d='M72.8 19.5L69.5 25.0' stroke='%2338985f'/%3E%3Cpath d='M73.6 19.4L76.6 23.0' stroke='%231f6340'/%3E%3Cpath d='M74.4 19.4L70.2 15.4' stroke='%234cae74'/%3E%3Cpath d='M75.2 19.3L74.8 25.4' stroke='%231f6340'/%3E%3Cpath d='M76.0 19.2L74.6 22.9' stroke='%234cae74'/%3E%3Cpath d='M76.8 19.1L73.0 23.8' stroke='%234cae74'/%3E%3Cpath d='M77.6 19.1L76.4 25.0' stroke='%234cae74'/%3E%3Cpath d='M78.4 19.0L75.9 22.6' stroke='%232a7d50'/%3E%3Cpath d='M79.2 18.9L77.5 22.6' stroke='%234cae74'/%3E%3Cpath d='M80.0 18.8L82.8 22.9' stroke='%231f6340'/%3E%3Cpath d='M80.8 18.7L77.4 22.3' stroke='%234cae74'/%3E%3Cpath d='M81.6 18.6L80.5 12.7' stroke='%234cae74'/%3E%3Cpath d='M82.4 18.5L81.4 12.9' stroke='%2338985f'/%3E%3Cpath d='M83.2 18.4L82.4 14.2' stroke='%231f6340'/%3E%3Cpath d='M84.0 18.2L87.8 13.5' stroke='%231f6340'/%3E%3Cpath d='M84.8 18.1L86.1 14.4' stroke='%234cae74'/%3E%3Cpath d='M85.6 18.0L87.9 14.4' stroke='%23174a31'/%3E%3Cpath d='M86.4 17.9L88.9 20.7' stroke='%23174a31'/%3E%3Cpath d='M87.2 17.7L82.5 14.0' stroke='%232a7d50'/%3E%3Cpath d='M88.0 17.6L85.8 12.8' stroke='%232a7d50'/%3E%3Cpath d='M88.8 17.5L85.0 15.1' stroke='%2338985f'/%3E%3Cpath d='M89.6 17.3L94.0 20.5' stroke='%2338985f'/%3E%3Cpath d='M90.4 17.2L93.8 20.1' stroke='%232a7d50'/%3E%3Cpath d='M91.2 17.0L91.6 13.2' stroke='%234cae74'/%3E%3Cpath d='M92.0 16.9L97.0 20.7' stroke='%232a7d50'/%3E%3Cpath d='M92.8 16.7L91.6 20.9' stroke='%232a7d50'/%3E%3Cpath d='M93.6 16.6L95.2 10.4' stroke='%234cae74'/%3E%3Cpath d='M94.4 16.4L94.9 11.4' stroke='%23174a31'/%3E%3Cpath d='M95.2 16.2L94.6 21.4' stroke='%231f6340'/%3E%3Cpath d='M96.0 16.0L91.6 11.7' stroke='%2338985f'/%3E%3Cpath d='M96.8 15.9L92.7 12.8' stroke='%232a7d50'/%3E%3Cpath d='M97.6 15.7L98.3 21.1' stroke='%2338985f'/%3E%3Cpath d='M98.4 15.5L100.6 18.9' stroke='%23174a31'/%3E%3Cpath d='M99.2 15.3L100.1 9.6' stroke='%234cae74'/%3E%3Cpath d='M100.0 15.1L102.0 18.9' stroke='%2338985f'/%3E%3Cpath d='M100.8 14.9L102.3 11.6' stroke='%234cae74'/%3E%3Cpath d='M101.6 14.7L105.4 19.1' stroke='%232a7d50'/%3E%3Cpath d='M102.4 14.5L99.9 18.6' stroke='%23174a31'/%3E%3Cpath d='M103.2 14.3L104.9 20.6' stroke='%231f6340'/%3E%3Cpath d='M104.0 14.1L104.6 19.6' stroke='%234cae74'/%3E%3Cpath d='M104.8 13.9L101.8 11.1' stroke='%2338985f'/%3E%3Cpath d='M105.6 13.6L103.9 19.1' stroke='%234cae74'/%3E%3Cpath d='M106.4 13.4L108.5 7.9' stroke='%234cae74'/%3E%3Cpath d='M107.2 13.2L106.6 9.1' stroke='%232a7d50'/%3E%3Cpath d='M108.0 13.0L107.2 16.5' stroke='%2338985f'/%3E%3Cpath d='M108.8 12.7L106.5 16.8' stroke='%234cae74'/%3E%3Cpath d='M109.6 12.5L109.9 18.9' stroke='%232a7d50'/%3E%3Cpath d='M110.4 12.2L114.1 13.9' stroke='%23174a31'/%3E%3Cpath d='M111.2 12.0L112.2 6.6' stroke='%2338985f'/%3E%3Cpath d='M112.0 11.7L110.7 7.0' stroke='%231f6340'/%3E%3Cpath d='M112.8 11.5L108.2 9.4' stroke='%2338985f'/%3E%3Cpath d='M113.6 11.2L112.3 5.0' stroke='%231f6340'/%3E%3Cpath d='M114.4 11.0L113.0 7.5' stroke='%23174a31'/%3E%3Cpath d='M115.2 10.7L112.9 7.2' stroke='%23174a31'/%3E%3Cpath d='M116.0 10.4L117.6 16.5' stroke='%232a7d50'/%3E%3Cpath d='M116.8 10.1L115.0 15.4' stroke='%231f6340'/%3E%3Cpath d='M117.6 9.9L119.2 4.8' stroke='%23174a31'/%3E%3Cpath d='M118.4 9.6L118.8 5.1' stroke='%231f6340'/%3E%3Cpath d='M119.2 9.3L120.6 4.7' stroke='%231f6340'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E") repeat-x 60px 0 / 120px 32px;
        filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .2));
    }

.xmas-wreath-hang {
    position: absolute;
    top: 3px;
    width: 32px;
    height: 35px;
    margin-left: -16px;
    transform-origin: 50% 4px;
    animation: xmas-wave 3.4s ease-in-out var(--delay, 0s) infinite;
}

    .xmas-wreath-hang svg,
    .xmas-wreath svg {
        display: block;
        width: 100%;
        height: 100%;
    }

/* Сдвиг задержки от венка к венку — по гирлянде бежит волна */
@keyframes xmas-wave {
    0%, 100% { transform: rotate(-7deg); }
    50% { transform: rotate(7deg); }
}

/* === Сани Санты: изредка пролетают по синей линии (js/christmas.js) === */
.xmas-sky {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.xmas-sleigh {
    position: absolute;
    left: 0;
    top: 50%;
    width: 190px;
    height: 36px;
    margin-top: -20px;
    transform: translateX(-220px);
    opacity: 0;
}

    .xmas-sleigh.fly {
        animation: xmas-fly 15s linear forwards;
    }

    .xmas-sleigh svg {
        display: block;
        width: 100%;
        height: 100%;
        animation: xmas-bob 1.3s ease-in-out infinite alternate;
    }

    /* Золотой след из искорок */
    .xmas-sleigh::before {
        content: "";
        position: absolute;
        right: 100%;
        top: 40%;
        width: 120px;
        height: 14px;
        background-image: radial-gradient(1.5px 1.5px at 10% 40%, rgba(255, 224, 143, .2), transparent), radial-gradient(2px 2px at 30% 70%, rgba(255, 224, 143, .35), transparent), radial-gradient(1.5px 1.5px at 50% 25%, rgba(255, 224, 143, .5), transparent), radial-gradient(2px 2px at 70% 60%, rgba(255, 224, 143, .7), transparent), radial-gradient(2.5px 2.5px at 90% 45%, rgba(255, 240, 190, .95), transparent);
        animation: xmas-trail .6s steps(2) infinite;
    }

@keyframes xmas-fly {
    0% { transform: translateX(-220px) translateY(6px); opacity: 0; }
    6% { opacity: 1; }
    50% { transform: translateX(50vw) translateY(-3px); }
    94% { opacity: 1; }
    100% { transform: translateX(calc(100vw + 40px)) translateY(4px); opacity: 0; }
}

@keyframes xmas-bob {
    from { transform: translateY(0); }
    to { transform: translateY(-3px); }
}

@keyframes xmas-trail {
    from { opacity: .6; }
    to { opacity: 1; }
}

/* === Бант на кнопке профиля === */
.xmas-profile-btn {
    position: relative;
}

.xmas-btn-bow {
    position: absolute;
    top: -9px;
    right: -10px;
    width: 26px;
    height: 18px;
    transform: rotate(16deg);
    filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .25));
    pointer-events: none;
}

/* === Снег === */
.xmas-snow {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1040;            /* под окнами Bootstrap (1050+) и чатом */
}

.xmas-snow-toggle {
    position: fixed;
    left: 18px;
    bottom: 18px;
    z-index: 1041;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #dbe6fb;
    border-radius: 50%;
    background: rgba(255, 255, 255, .9);
    color: #5b8fd6;
    font-size: 18px;
    box-shadow: 0 2px 8px rgba(13, 110, 253, .12);
    opacity: .75;
    cursor: pointer;
    transition: opacity .2s, transform .2s;
}

    .xmas-snow-toggle:hover {
        opacity: 1;
        transform: scale(1.06);
    }

    .xmas-snow-toggle.off {
        color: #adb5bd;
    }

        .xmas-snow-toggle.off::after {
            content: "";
            position: absolute;
            width: 22px;
            height: 1.5px;
            background: #adb5bd;
            transform: rotate(-45deg);
        }

/* === Подвал: красная лента с золотой каймой и бант посередине, как на подарке === */
.site-footer {
    position: relative;
    padding-top: 32px;
}

    .site-footer::before {
        content: "";
        position: absolute;
        left: 0;
        right: 0;
        top: 0;
        height: 11px;
        background: linear-gradient(var(--xmas-gold) 0 1.5px, var(--xmas-red) 1.5px 9.5px, var(--xmas-gold) 9.5px);
        box-shadow: 0 2px 4px rgba(0, 0, 0, .15);
        pointer-events: none;
    }

.xmas-footer-bow {
    position: absolute;
    left: 50%;
    top: -17px;
    width: 80px;
    height: 54px;
    margin-left: -40px;
    filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .25));
    pointer-events: none;
    z-index: 1;
}

/* === Профиль: открытка с венком === */
.xmas-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 1.6rem;
    margin-bottom: 1.5rem;
    padding: 1.4rem 1.9rem;
    border: 1px solid #ecd9b0;
    border-radius: 14px;
    background: radial-gradient(circle at 92% 18%, rgba(226, 178, 74, .14), transparent 30%), radial-gradient(circle at 75% 85%, rgba(200, 40, 60, .06), transparent 35%), var(--xmas-cream);
    box-shadow: inset 0 0 0 5px var(--xmas-cream), inset 0 0 0 6px #f1e2c2, 0 4px 16px rgba(120, 90, 30, .08);
}

.xmas-card-wreath {
    flex: 0 0 auto;
    width: 92px;
    height: 101px;
}

.xmas-card-text p {
    margin: .2rem 0 0;
    color: #5f5a52;
}

.xmas-card-title {
    font-family: Georgia, 'Times New Roman', serif;
    font-style: italic;
    font-size: 1.65rem;
    line-height: 1.2;
    color: var(--xmas-red);
}

.xmas-card-sign {
    margin-top: .5rem;
    font-family: Georgia, 'Times New Roman', serif;
    font-style: italic;
    font-size: .95rem;
    color: #a07a32;
}

    .xmas-card-sign::before {
        content: "";
        display: inline-block;
        width: 28px;
        height: 1px;
        margin-right: .5rem;
        vertical-align: middle;
        background: var(--xmas-gold);
    }

@media (max-width: 576px) {
    .xmas-card {
        flex-direction: column;
        text-align: center;
        gap: .8rem;
        padding: 1.2rem 1rem;
    }

    .xmas-card-wreath {
        width: 72px;
        height: 79px;
    }

    .xmas-card-title {
        font-size: 1.35rem;
    }

    .xmas-snow-toggle {
        left: 12px;
        bottom: 12px;
        width: 34px;
        height: 34px;
        font-size: 16px;
    }
}

/* Без анимаций для тех, кто их отключил в системе */
@media (prefers-reduced-motion: reduce) {
    .xmas-wreath-hang, .xmas-sleigh svg, .xmas-sleigh::before {
        animation: none;
    }
}
