/* ==========================================================================
   cg-season.css — Decoración de temporada (navidad) del sitio público moderno.
   Solo presentación. Se carga si fe_season() === 'navidad' (config frontend_season).
   Piezas: nieve en toda la página (canvas fijo), árbol y regalos en el hero,
   lazo en la factura del hero, gorro y muérdago en el logo del navbar.
   Con prefers-reduced-motion queda solo lo estático (sin nieve ni destellos).
   ========================================================================== */

/* ---------- nieve: canvas fijo sobre toda la página ---------- */
.cg-season-snow {
    position: fixed; inset: 0; width: 100vw; height: 100vh;
    pointer-events: none; z-index: 5; display: block;
}

/* ---------- capa del hero: recortada a su forma ---------- */
.cg-modern .hero-modern .cg-season-layer {
    position: absolute; inset: 0;
    border-radius: inherit; overflow: hidden;
    pointer-events: none; z-index: 0;
}
.cg-modern .hero-modern > .container { position: relative; z-index: 1; }

/* ---------- árbol + regalos (entre el texto y la factura) ---------- */
.cg-modern .hero-modern { --sc-l: 46%; --sc-b: 46px; --sc-w: 430px; }
.cg-modern .cg-season-scene {
    position: absolute; left: var(--sc-l); bottom: var(--sc-b); width: var(--sc-w); height: auto;
    transform: translateX(-50%);
    overflow: visible;
    filter: drop-shadow(0 10px 14px rgba(0, 30, 15, .3));
    transition: filter .5s ease;
}
.cg-modern .cg-season-scene .lg { animation: cg-season-light 3.6s ease-in-out infinite; }
.cg-modern .cg-season-scene .lg-b { animation-delay: -1.2s; }
.cg-modern .cg-season-scene .lg-c { animation-delay: -2.4s; }
@keyframes cg-season-light {
    0%, 100% { opacity: .12; }
    18%, 42% { opacity: 1; }
    62%      { opacity: .12; }
}
.cg-modern .cg-season-scene .tw { animation: cg-season-twinkle 3.4s ease-in-out infinite; }
.cg-modern .cg-season-scene .tw:nth-of-type(2n)  { animation-delay: -1.2s; }
.cg-modern .cg-season-scene .tw:nth-of-type(3n)  { animation-delay: -2.1s; animation-duration: 4.2s; }
.cg-modern .cg-season-scene .tw:nth-of-type(5n)  { animation-delay: -.5s; }

@keyframes cg-season-twinkle {
    0%, 100% { opacity: 1; }
    50%      { opacity: .35; }
}
@media (max-width: 1279.98px) {
    .cg-modern .cg-season-scene { display: none; }
    .cg-modern .cg-season-stars { display: none; }
}

/* ---------- factura forrada como regalo: cintas en cruz + lazo al centro ---------- */

/* ---------- destellos dorados (estrellitas de 4 puntas) ---------- */
.cg-modern .cg-season-spark {
    position: absolute; width: var(--s, 16px); height: var(--s, 16px);
    fill: #F4DD95; filter: drop-shadow(0 0 5px rgba(244, 221, 149, .85));
    opacity: .2; animation: cg-season-glint 3.8s ease-in-out infinite;
}
@keyframes cg-season-glint {
    0%, 100% { opacity: .15; transform: scale(.55) rotate(0deg); }
    50%      { opacity: .95; transform: scale(1)   rotate(18deg); }
}

/* ---------- guirnalda de estrellitas colgando bajo el navbar (hero) ---------- */
.cg-modern .cg-season-stars {
    position: absolute; left: 0; right: 0; top: 124px; height: 70px; opacity: .85;
    background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='260' height='70' viewBox='0 0 260 70'><path d='M0 6 Q130 30 260 6' fill='none' stroke='rgba(255,255,255,.35)' stroke-width='1.3'/><g fill='%23F4DD95'><path transform='translate(52 38) scale(1)' d='M0 -8 C1.2 -2.6 2.6 -1.2 8 0 C2.6 1.2 1.2 2.6 0 8 C-1.2 2.6 -2.6 1.2 -8 0 C-2.6 -1.2 -1.2 -2.6 0 -8Z'/><path transform='translate(130 46) scale(1.25)' d='M0 -8 C1.2 -2.6 2.6 -1.2 8 0 C2.6 1.2 1.2 2.6 0 8 C-1.2 2.6 -2.6 1.2 -8 0 C-2.6 -1.2 -1.2 -2.6 0 -8Z'/><path transform='translate(208 32) scale(.85)' d='M0 -8 C1.2 -2.6 2.6 -1.2 8 0 C2.6 1.2 1.2 2.6 0 8 C-1.2 2.6 -2.6 1.2 -8 0 C-2.6 -1.2 -1.2 -2.6 0 -8Z'/></g><g stroke='rgba(255,255,255,.4)' stroke-width='1'><path d='M52 17 V30'/><path d='M130 24 V38'/><path d='M208 16 V25'/></g></svg>") repeat-x 0 0 / 260px 70px;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
            mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
    animation: cg-season-sway 6s ease-in-out infinite alternate;
}
@keyframes cg-season-sway { from { background-position-x: 0; } to { background-position-x: 6px; } }

/* ---------- nieve acumulada sobre el formulario y las tarjetas destacadas ----------
   Dos juegos de colores (claro / oscuro): en oscuro el blanco puro deslumbra, así que se usa un blanco azulado. */
:root {
    --cg-snow-above:  url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='32' viewBox='0 0 140 32'><defs><linearGradient id='g' x1='0' y1='0' x2='0' y2='1'><stop offset='0' stop-color='%23FFFFFF'/><stop offset='1' stop-color='%23D9EDE2'/></linearGradient></defs><path d='M0 18 L0 14 C6 4 18 2 26 10 C32 4 46 0 56 8 C64 1 80 2 88 9 C96 3 110 3 118 10 C126 4 136 6 140 12 L140 18 C138 24 132 24 130 19 C128 16 124 17 122 22 C120 30 112 30 110 22 C108 17 100 17 98 20 C94 27 86 27 84 20 C82 16 70 16 68 21 C66 30 58 31 56 22 C54 17 46 17 44 19 C40 26 32 26 30 19 C28 15 20 15 18 21 C16 29 8 29 6 21 C4 18 2 18 0 18 Z' fill='url(%23g)'/><path d='M10 9 C14 6 18 6 21 8 M60 6 C64 4 69 4 73 6 M104 7 C108 5 112 6 115 8' stroke='white' stroke-width='1.4' stroke-linecap='round' fill='none' opacity='.9'/></svg>");
    --cg-snow-inside: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='24' viewBox='0 0 120 24'><defs><linearGradient id='g' x1='0' y1='0' x2='0' y2='1'><stop offset='0' stop-color='%23FFFFFF'/><stop offset='1' stop-color='%23DCEEE4'/></linearGradient></defs><path d='M0 0 H120 V9 C118 15 113 15 111 10 C109 7 104 8 102 12 C100 21 91 21 90 12 C89 8 82 7 80 11 C77 17 70 17 69 11 C67 6 60 7 58 12 C56 22 47 22 46 12 C45 8 38 8 36 11 C33 17 26 17 25 10 C23 6 16 7 14 12 C12 19 5 19 4 11 C3 8 1 8 0 9 Z' fill='url(%23g)'/></svg>");
    --cg-snow-shadow: rgba(0, 70, 40, .28);
}
:root[data-theme="dark"] {
    --cg-snow-above:  url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='32' viewBox='0 0 140 32'><defs><linearGradient id='g' x1='0' y1='0' x2='0' y2='1'><stop offset='0' stop-color='%23F4FAF7'/><stop offset='1' stop-color='%23C5DCCF'/></linearGradient></defs><path d='M0 18 L0 14 C6 4 18 2 26 10 C32 4 46 0 56 8 C64 1 80 2 88 9 C96 3 110 3 118 10 C126 4 136 6 140 12 L140 18 C138 24 132 24 130 19 C128 16 124 17 122 22 C120 30 112 30 110 22 C108 17 100 17 98 20 C94 27 86 27 84 20 C82 16 70 16 68 21 C66 30 58 31 56 22 C54 17 46 17 44 19 C40 26 32 26 30 19 C28 15 20 15 18 21 C16 29 8 29 6 21 C4 18 2 18 0 18 Z' fill='url(%23g)'/><path d='M10 9 C14 6 18 6 21 8 M60 6 C64 4 69 4 73 6 M104 7 C108 5 112 6 115 8' stroke='white' stroke-width='1.4' stroke-linecap='round' fill='none' opacity='.9'/></svg>");
    --cg-snow-inside: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='24' viewBox='0 0 120 24'><defs><linearGradient id='g' x1='0' y1='0' x2='0' y2='1'><stop offset='0' stop-color='%23F4FAF7'/><stop offset='1' stop-color='%23C9DFD3'/></linearGradient></defs><path d='M0 0 H120 V9 C118 15 113 15 111 10 C109 7 104 8 102 12 C100 21 91 21 90 12 C89 8 82 7 80 11 C77 17 70 17 69 11 C67 6 60 7 58 12 C56 22 47 22 46 12 C45 8 38 8 36 11 C33 17 26 17 25 10 C23 6 16 7 14 12 C12 19 5 19 4 11 C3 8 1 8 0 9 Z' fill='url(%23g)'/></svg>");
    --cg-snow-shadow: rgba(0, 0, 0, .5);
}
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --cg-snow-above:  url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='32' viewBox='0 0 140 32'><defs><linearGradient id='g' x1='0' y1='0' x2='0' y2='1'><stop offset='0' stop-color='%23F4FAF7'/><stop offset='1' stop-color='%23C5DCCF'/></linearGradient></defs><path d='M0 18 L0 14 C6 4 18 2 26 10 C32 4 46 0 56 8 C64 1 80 2 88 9 C96 3 110 3 118 10 C126 4 136 6 140 12 L140 18 C138 24 132 24 130 19 C128 16 124 17 122 22 C120 30 112 30 110 22 C108 17 100 17 98 20 C94 27 86 27 84 20 C82 16 70 16 68 21 C66 30 58 31 56 22 C54 17 46 17 44 19 C40 26 32 26 30 19 C28 15 20 15 18 21 C16 29 8 29 6 21 C4 18 2 18 0 18 Z' fill='url(%23g)'/><path d='M10 9 C14 6 18 6 21 8 M60 6 C64 4 69 4 73 6 M104 7 C108 5 112 6 115 8' stroke='white' stroke-width='1.4' stroke-linecap='round' fill='none' opacity='.9'/></svg>");
        --cg-snow-inside: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='24' viewBox='0 0 120 24'><defs><linearGradient id='g' x1='0' y1='0' x2='0' y2='1'><stop offset='0' stop-color='%23F4FAF7'/><stop offset='1' stop-color='%23C9DFD3'/></linearGradient></defs><path d='M0 0 H120 V9 C118 15 113 15 111 10 C109 7 104 8 102 12 C100 21 91 21 90 12 C89 8 82 7 80 11 C77 17 70 17 69 11 C67 6 60 7 58 12 C56 22 47 22 46 12 C45 8 38 8 36 11 C33 17 26 17 25 10 C23 6 16 7 14 12 C12 19 5 19 4 11 C3 8 1 8 0 9 Z' fill='url(%23g)'/></svg>");
        --cg-snow-shadow: rgba(0, 0, 0, .5);
    }
}
.cg-modern .price-card.featured { border-top-width: 0; }   /* sin el filo de borde sobre la nieve */
.cg-modern .appointment-bar::before,
.cg-modern .price-card.featured::before {
    content: ""; position: absolute; pointer-events: none; z-index: 2;
    filter: drop-shadow(0 2px 2px var(--cg-snow-shadow));
}
/* formulario: la nieve se acumula sobre el borde y cae un poco por delante */
.cg-modern .appointment-bar::before {
    top: -15px; left: 20px; right: 20px; height: 32px;
    background: var(--cg-snow-above) repeat-x 0 0 / 140px 32px;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
            mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
}
/* tarjeta destacada: la nieve cubre el borde superior y sigue sus esquinas redondeadas */
.cg-modern .price-card.featured::before {
    top: 0; left: 0; right: 0; height: 24px; border-radius: 22px 22px 0 0;
    background: var(--cg-snow-inside) repeat-x 0 0 / 120px 24px;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
            mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}

/* ---------- franja de nieve con pinitos sobre el footer ---------- */
.cg-modern .footer-section { position: relative; }
.cg-modern .cg-season-footer {
    position: absolute; left: 0; right: 0; bottom: 100%; height: 58px;
    pointer-events: none; overflow: hidden;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
            mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.cg-modern .cg-season-fpine {
    position: absolute; width: auto; transform: translateX(-50%);   /* bottom lo fija cada pino para apoyarse en la loma */
}
.cg-modern .cg-season-fpine path { fill: #1B8A52; stroke: rgba(255,255,255,.45); stroke-width: 1.2; stroke-linejoin: round; }
.cg-modern .cg-season-fpine path.sn { fill: #fff; stroke: none; }
.cg-modern .cg-season-fmound { position: absolute; left: 0; bottom: -1px; width: 100%; height: 24px; display: block; }
.cg-modern .cg-season-fmound path { fill: #fff; filter: drop-shadow(0 -1px 1px rgba(0, 60, 33, .2)); }
:root[data-theme="dark"] .cg-modern .cg-season-fmound path { fill: #E4F2EA; }
@media (max-width: 767.98px) {
    .cg-modern .cg-season-fpine:nth-child(even) { display: none; }
}

/* ---------- lazo de regalo (PNG) en la esquina del marco blanco de la factura ----------
   El PNG es una cinta de esquina (entra por arriba y sale por la derecha): va pegado a la esquina superior
   derecha del contenedor, completo, y la factura queda dentro. */
.cg-modern .hero-pdf-sheet { overflow: hidden; }
.cg-modern .hero-pdf-sheet .cg-season-bow {
    position: absolute; top: 0; right: 0; width: 54%; height: auto;
    pointer-events: none; z-index: 2;
}
.cg-modern .hero-pdf-sheet .hero-zoom-btn { z-index: 4; }

/* ---------- resplandor dorado al pasar el mouse (bosque y factura) ---------- */
.cg-modern .cg-season-scene .halo { opacity: 0; transition: opacity .6s ease; }
.cg-modern .cg-season-hit {              /* zona que detecta el mouse sobre el bosque (la capa de adorno no recibe eventos) */
    position: absolute; left: var(--sc-l); bottom: var(--sc-b); z-index: 2;
    width: calc(var(--sc-w) * .9); height: calc(var(--sc-w) * .66); transform: translateX(-50%);
    border-radius: 50% 50% 0 0 / 70% 70% 0 0;
}
.cg-modern .cg-season-hit:hover ~ .cg-season-layer .cg-season-scene .halo { opacity: 1; }
.cg-modern .cg-season-hit:hover ~ .cg-season-layer .cg-season-scene {
    filter: drop-shadow(0 0 16px rgba(255, 214, 102, .55)) drop-shadow(0 10px 14px rgba(0, 30, 15, .3));
}
.cg-modern .hero-pdf-sheet { transition: transform .3s ease, box-shadow .5s ease; }
.cg-modern .hero-pdf-sheet:hover {
    box-shadow: 0 25px 65px rgba(0, 30, 15, .42),
                0 0 0 1px rgba(255, 224, 138, .55),
                0 0 38px 6px rgba(255, 214, 102, .42),
                0 0 95px 22px rgba(255, 214, 102, .2);
}
@media (max-width: 1279.98px) { .cg-modern .cg-season-hit { display: none; } }

/* ---------- chip de temporada ---------- */
.cg-modern .cg-season-chip {
    display: inline-flex; align-items: center; gap: 6px;
    margin-top: 10px; padding: 5px 14px; border-radius: 999px;
    font-size: .82rem; font-weight: 600; color: #fff;
    background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .35);
}
.cg-modern .cg-season-chip .bi { color: #F4DD95; }

/* ---------- logo con gorro de Santa (solo en temporada; ya viene en blanco, sin el filtro) ---------- */
.cg-modern .main-nav .navbar-brand img.cg-season-logo { filter: none; height: 104px; }
.cg-modern .main-nav.scrolled .navbar-brand img.cg-season-logo { height: 80px; }
@media (max-width: 991.98px) { .cg-modern .main-nav .navbar-brand img.cg-season-logo { height: 76px; } }
@media (max-width: 575.98px) { .cg-modern .main-nav .navbar-brand img.cg-season-logo { height: 70px; } }

/* ---------- destello en los iconos de las tarjetas al pasar el mouse ---------- */
@media (hover: hover) {
    .cg-modern .feature-icon, .cg-modern .cg-service-ico { transition: box-shadow .35s ease; }
    .cg-modern .feature-item:hover .feature-icon,
    .cg-modern .cg-service-card:hover .cg-service-ico { box-shadow: 0 0 0 3px rgba(232, 198, 106, .45), 0 0 20px rgba(232, 198, 106, .45); }
}

/* ---------- responsive ---------- */
@media (max-width: 991.98px) {
    .cg-modern .cg-season-spark:nth-of-type(n+4) { display: none; }
}

/* ---------- accesibilidad: sin movimiento ---------- */
@media (prefers-reduced-motion: reduce) {
    .cg-season-snow { display: none; }
    .cg-modern .cg-season-scene .tw, .cg-modern .cg-season-scene .lg { animation: none; opacity: 1; }
    .cg-modern .cg-season-spark { animation: none; opacity: .6; }
    .cg-modern .cg-season-stars { animation: none; }
}
