/* =====================================================
   Tema navideño SMITCO
   Se activa vía FestivityHelper.GetCurrentFestivity() == "Navidad"
   (auto: todo diciembre). Solo capas decorativas — no altera la estructura.
   ===================================================== */

:root {
    --xmas-green: #51a121;
    --xmas-green-dk: #3d7114;
    --xmas-red: #d93b3b;
    --xmas-gold: #e9b949;

    /* Copito de nieve vectorial (6 brazos) — máscara del copo que cae */
    --xmas-copo: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cg stroke='%23fff' stroke-width='2' stroke-linecap='round' fill='none'%3E%3Cg id='a'%3E%3Cpath d='M16 16 L16 2.4 M16 6.8 L12.6 3.4 M16 6.8 L19.4 3.4 M16 10.6 L13.5 8.1 M16 10.6 L18.5 8.1'/%3E%3C/g%3E%3Cuse href='%23a' transform='rotate(60 16 16)'/%3E%3Cuse href='%23a' transform='rotate(120 16 16)'/%3E%3Cuse href='%23a' transform='rotate(180 16 16)'/%3E%3Cuse href='%23a' transform='rotate(240 16 16)'/%3E%3Cuse href='%23a' transform='rotate(300 16 16)'/%3E%3C/g%3E%3C/svg%3E");

    /* Lazo rojo — SVG propio (sin dependencias externas) */
    --xmas-lazo: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 44'%3E%3Cdefs%3E%3ClinearGradient id='r' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%23ee5a60'/%3E%3Cstop offset='1' stop-color='%23b52a30'/%3E%3C/linearGradient%3E%3ClinearGradient id='rd' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%23c9343a'/%3E%3Cstop offset='1' stop-color='%238b1f24'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath fill='url(%23rd)' d='M21 18c-2 7-3.5 11-8 20l4.5-4 3.5 5c1.2-9 2.2-14 3-21z'/%3E%3Cpath fill='url(%23rd)' d='M27 18c2 7 3.5 11 8 20l-4.5-4-3.5 5c-1.2-9-2.2-14-3-21z'/%3E%3Cpath fill='url(%23r)' d='M24 17C15 6 6 6 4 13c-2 6 4 11 12 9 3-.8 6-2.5 8-5z'/%3E%3Cpath fill='url(%23r)' d='M24 17C33 6 42 6 44 13c2 6-4 11-12 9-3-.8-6-2.5-8-5z'/%3E%3Cpath fill='%23ffffff' opacity='.18' d='M24 17C17 8 9 7 6 11c5-1 12 1 18 6z'/%3E%3Crect x='19.5' y='11' width='9' height='11' rx='3.5' fill='url(%23rd)'/%3E%3Crect x='21' y='12.5' width='2.4' height='8' rx='1.2' fill='%23fff' opacity='.22'/%3E%3C/svg%3E");

    /* Gorro de Santa — SVG propio (sin dependencias externas) */
    --xmas-hat: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 44 34'%3E%3Cdefs%3E%3ClinearGradient id='r' x1='0.2' y1='0.1' x2='0.85' y2='0.95'%3E%3Cstop offset='0' stop-color='%23ee555b'/%3E%3Cstop offset='1' stop-color='%23ad2529'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath fill='url(%23r)' d='M7 25.5C6.5 13 13.5 3.5 25.5 4c7.2.3 12.5 4.5 11.4 9.6-.8 3.7-5.4 5.2-10 4 3.4 3.6.8 8.7-6.8 7.9-7-.7-13.1 0-13.1 0Z'/%3E%3Cpath fill='%23f4f4f4' d='M6.5 24.2h26.8c3.2 0 5.7 2 5.7 4.5s-2.5 4.5-5.7 4.5H6.5c-3.7 0-6.7-2-6.7-4.5s3-4.5 6.7-4.5Z'/%3E%3Ccircle cx='35.5' cy='10.5' r='5' fill='%23f4f4f4'/%3E%3C/svg%3E");
}

/* ===== Nieve cayendo ===== */
.XMAS_snow {
    position: fixed;
    inset: 0;
    z-index: 30;                 /* sobre el contenido, bajo el header (45) y los modales (50+) */
    overflow: hidden;
    pointer-events: none;
    -webkit-mask-image: linear-gradient(to bottom, transparent 0, transparent 60px, #000 116px);
    mask-image: linear-gradient(to bottom, transparent 0, transparent 60px, #000 116px);
}

    /* Escarcha muy tenue en las esquinas inferiores */
    .XMAS_snow::before {
        content: "";
        position: absolute;
        inset: 0;
        background:
            radial-gradient(220px 170px at 0% 100%, rgba(236, 245, 255, 0.4), transparent 72%),
            radial-gradient(220px 170px at 100% 100%, rgba(236, 245, 255, 0.4), transparent 72%);
    }

/* Copito de nieve: silueta vectorial azul-hielo, visible sobre blanco y sobre verde */
.XMAS_flake {
    position: absolute;
    top: -8%;
    background: linear-gradient(160deg, #dcecff 0%, #8fbfea 45%, #5f9fdd 100%);
    -webkit-mask: var(--xmas-copo) center / contain no-repeat;
            mask: var(--xmas-copo) center / contain no-repeat;
    filter: drop-shadow(0 1px 2px rgba(40, 84, 140, 0.5));
    will-change: transform, top;
    animation-name: xmasFall, xmasSway;
    animation-timing-function: linear, ease-in-out;
    animation-iteration-count: infinite, infinite;
    animation-direction: normal, alternate;
}

@keyframes xmasFall {
    from { top: -8%; }
    to   { top: 110%; }
}

/* deriva lateral + leve balanceo del copito */
@keyframes xmasSway {
    from { transform: translateX(-13px) rotate(-28deg); }
    to   { transform: translateX(13px) rotate(28deg); }
}

/* ===== Gorros de Santa (cards + botones) — balanceo suave compartido ===== */
/* --hat-rot = inclinación base de cada gorro; la animación oscila alrededor de ese ángulo */
@keyframes xmasHatSway {
    0%, 100% { transform: rotate(calc(var(--hat-rot, 9deg) - 4deg)) translateY(0); }
    50%      { transform: rotate(calc(var(--hat-rot, 9deg) + 3deg)) translateY(-2px); }
}

/* ===== Marca de agua navideña sutil en el fondo de las cards ===== */
.HOME_qa--xmas,
.HOME_jv--xmas {
    position: relative;
    overflow: hidden;
}

.HOME_qa--xmas::before,
.HOME_jv--xmas::before {
    content: "";
    position: absolute;
    pointer-events: none;
    z-index: 0;
}

/* Nuestros Servicios: copito de nieve azul muy tenue en la esquina inferior derecha */
.HOME_qa--xmas::before {
    width: 44px;
    height: 44px;
    right: -6px;
    bottom: -6px;
    background-color: #5f9fdd;
    -webkit-mask: var(--xmas-copo) center / contain no-repeat;
            mask: var(--xmas-copo) center / contain no-repeat;
    opacity: 0.16;
}

/* Joint Venture: copito de nieve azul grande y muy tenue como fondo */
.HOME_jv--xmas::before {
    width: 120px;
    height: 120px;
    right: -22px;
    bottom: -26px;
    background-color: #5f9fdd;
    -webkit-mask: var(--xmas-copo) center / contain no-repeat;
            mask: var(--xmas-copo) center / contain no-repeat;
    opacity: 0.09;
}

/* el contenido de las cards por encima de la marca de agua */
.HOME_qa--xmas > *,
.HOME_jv--xmas > * {
    position: relative;
    z-index: 1;
}

/* ===== Botones flotantes (WhatsApp / Instagram / LinkedIn) en Navidad ===== */
.XMAS_floats > div {
    position: relative;
}

    /* aro rojo + resplandor verde que laten suave alrededor de cada botón (no alteran el botón) */
    .XMAS_floats > div::after {
        content: "";
        position: absolute;
        inset: 0;
        border-radius: 10px;
        pointer-events: none;
        z-index: -1;
        animation: xmasFloatGlow 4s ease-in-out infinite;
    }

    .XMAS_floats > div:nth-child(2)::after { animation-delay: -1s; }
    .XMAS_floats > div:nth-child(3)::after { animation-delay: -2.1s; }
    .XMAS_floats > div:nth-child(4)::after { animation-delay: -3s; }

@keyframes xmasFloatGlow {
    0%, 100% { box-shadow: 0 0 0 1.5px rgba(217, 59, 59, 0.14), 0 0 7px 0 rgba(81, 161, 33, 0.16); }
    50%      { box-shadow: 0 0 0 2px rgba(217, 59, 59, 0.42), 0 0 15px 3px rgba(81, 161, 33, 0.4); }
}

/* gorrito calzado en la esquina superior derecha del botón de WhatsApp, cayendo hacia abajo */
.XMAS_floats #botonWhatsapp::before {
    content: "";
    position: absolute;
    width: 25px;
    height: 25px;
    top: -14px;
    right: -13px;
    background: var(--xmas-hat) center / contain no-repeat;
    --hat-rot: 24deg;
    transform-origin: center;
    transform: rotate(var(--hat-rot));
    pointer-events: none;
    z-index: 3;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
    animation: xmasHatSway 3.9s ease-in-out infinite -0.6s;
}

/* ===== Accesos rápidos del hero en Navidad: tinte dorado en tiles, iconos y texto ===== */
/* Selectores anclados a .PWEB_HH_accessInner--xmas para ganar al CSS base sin depender del orden de carga */
.PWEB_HH_accessInner--xmas {
    position: relative;
}

.PWEB_HH_accessInner--xmas .PWEB_HH_item {
    background: #ffffff;
    border-color: #ececec;
    /* franja roja tipo "cinta de regalo" dentro del borde superior + halo verde muy tenue */
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.28),
                0 0 0 1px rgba(61, 113, 20, 0.10),
                inset 0 3px 0 #d9463f,
                inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

    /* copito de nieve rojo tenue como marca de agua en la esquina de cada card */
    .PWEB_HH_accessInner--xmas .PWEB_HH_item::before {
        content: "";
        position: absolute;
        right: 5px;
        bottom: 4px;
        width: 42px;
        height: 42px;
        background-color: #d9463f;
        -webkit-mask: var(--xmas-copo) center / contain no-repeat;
                mask: var(--xmas-copo) center / contain no-repeat;
        opacity: 0.09;
        pointer-events: none;
    }

    .PWEB_HH_accessInner--xmas .PWEB_HH_item:hover {
        background: #fffdfa;
        border-color: #f0bcbc;
        box-shadow: 0 16px 34px rgba(0, 0, 0, 0.34),
                    0 0 0 1px rgba(211, 47, 47, 0.30),
                    inset 0 4px 0 #cf3b34,
                    inset 0 1px 0 rgba(255, 255, 255, 0.7);
    }

.PWEB_HH_accessInner--xmas .PWEB_HH_itemIcon {
    color: #d23b3b;
}

.PWEB_HH_accessInner--xmas .PWEB_HH_item:hover .PWEB_HH_itemIcon {
    color: #b02a2a;
}

.PWEB_HH_accessInner--xmas .PWEB_HH_itemText {
    color: #3a3f45;
    text-shadow: none;
}

/* Punto de la etiqueta "Accesos rápidos" en rojo, para combinar */
.PWEB_HH_accessInner--xmas .PWEB_HH_dot {
    background: #d9463f;
}

/* Tooltip que aparece encima de cada acceso: pasa del verde al tono navideño */
.PWEB_HH_accessInner--xmas .PWEB_HH_tipBar {
    background: linear-gradient(90deg, #b42a2a, #e66a63);
}

.PWEB_HH_accessInner--xmas .PWEB_HH_tipHead i {
    background: #fbeaea;
    color: #b02a2a;
}

.PWEB_HH_accessInner--xmas .PWEB_HH_tipCta {
    color: #c62828;
}

/* ===== Campana de Navidad colgada, centrada sobre los accesos (oculta en móvil) ===== */
/* Va absoluta sobre el borde superior de la grilla: NO empuja el layout,
   el título "Accesos rápidos" queda como si la campana no existiera. */
.PWEB_HH_gridHolder--xmas {
    position: relative;
}

.XMAS_topbow {
    position: absolute;
    left: 50%;
    margin-left: -22px;      /* centrado sin transform: la animación usa transform */
    top: -36px;              /* casi por completo por encima de las tarjetas */
    z-index: 6;
    width: 44px;
    height: 40px;
    background: var(--xmas-lazo) center / contain no-repeat;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.35));
    pointer-events: none;
    transform-origin: 50% 16%;
    animation: xmasBowSwing 3s ease-in-out infinite;
}

@keyframes xmasBowSwing {
    0%, 100% { transform: rotate(-7deg); }
    50%      { transform: rotate(7deg); }
}

@media (max-width: 559.98px) {
    .XMAS_topbow { display: none; }
}

/* ===== Accesibilidad: sin movimiento ===== */
@media (prefers-reduced-motion: reduce) {
    .XMAS_flake,
    .XMAS_topbow,
    .XMAS_floats #botonWhatsapp::before,
    .XMAS_floats > div::after {
        animation: none !important;
    }

    .XMAS_floats > div::after { box-shadow: none; }
    .XMAS_snow { display: none; }
}
