/* ==========================================================================
   ESTILOS INDEPENDIENTES: FOOTER Y UTILIDADES DE PIE
   ========================================================================== */

/* 1. CONTENEDOR PRINCIPAL */
.site-footer {
    background-color: var(--brand-lime); 
    padding: 60px 20px 40px;
    position: relative;
    color: var(--footer-text-light);
    margin-top: auto;
}

/* 2. TÍTULO DE LLAMADA A LA ACCIÓN (CTA) */
.footer-cta-title { 
    text-align: left; 
    max-width: 1200px; 
    margin: 0 auto 40px; 
}

.footer-cta-title h2 { 
    font-family: var(--font-titles);
    font-size: 2.5rem; 
    line-height: 1.05; 
    color: var(--footer-card-bg); 
    font-weight: 700; 
}

/* 3. TARJETA PRINCIPAL DEL FOOTER */
.footer-card {
    background-color: var(--footer-card-bg);
    border-radius: 24px;
    padding: 40px;
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    position: relative;
    overflow: hidden;
}

.footer-card__content { 
    position: relative; 
    z-index: 2;
}

/* Formulario de Suscripción */
.subscribe-form { 
    display: flex; 
    margin-bottom: 15px; 
    max-width: 400px; 
    background: #FFFBEB; 
    border-radius: 12px; 
    padding: 5px; 
}

.subscribe-form input { 
    background: transparent; 
    border: none; 
    padding: 10px 15px; 
    flex: 1; 
    color: #333; 
    outline: none; 
    font-family: var(--font-body);
}

.subscribe-form button { 
    background: #D4E750; 
    border: none; 
    border-radius: 8px; 
    width: 40px; 
    height: 40px; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    cursor: pointer; 
    color: #000; 
    transition: background 0.2s;
}
.subscribe-form button:hover { background: #cce030; }

/* Texto de Ayuda */
.footer-help-text { 
    font-size: 0.85rem; 
    margin-bottom: 20px; 
    color: rgba(255,255,255,0.7); 
}
.footer-help-text a { 
    color: #fff; 
    text-decoration: underline; 
    font-weight: 600;
}

/* Redes Sociales Footer */
.footer-socials { display: flex; gap: 15px; }
.footer-socials a { 
    color: rgba(255,255,255,0.7); 
    transition: color 0.2s, transform 0.2s; 
}
.footer-socials a:hover { 
    color: #fff; 
    transform: translateY(-2px);
}

/* Enlaces del Footer */
.footer-links ul { 
    list-style: none; 
    padding: 0; 
    margin: 30px 0 0; 
}
.footer-links li { margin-bottom: 10px; }
.footer-links a { 
    color: rgba(255,255,255,0.8); 
    font-size: 0.95rem; 
    text-decoration: none; 
    font-weight: 500; 
    transition: color 0.2s;
}
.footer-links a:hover { color: #fff; }

/* Elemento Visual (Icono grande) */
.footer-card__visual { 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    min-height: 200px; 
    position: relative;
    z-index: 1;
}

.footer-icon-placeholder svg { 
    width: 150px; 
    height: auto;
    opacity: 0.9; 
    fill: #db6957;
    transition: transform 0.3s ease; 
}

/* Marca de Agua */
.footer-brand-watermark { 
    font-family: var(--font-titles); 
    font-weight: 900; 
    position: absolute; 
    bottom: -20px; 
    left: 50%; 
    transform: translateX(-50%); 
    font-size: 3rem; 
    color: rgba(255,255,255,0.1); 
    white-space: nowrap; 
    z-index: 0; 
    pointer-events: none;
}

/* 4. COPYRIGHT */
.footer-copyright { 
    text-align: center; 
    margin-top: 30px; 
    font-size: 0.85rem; 
    color: var(--footer-card-bg); 
    font-weight: 500;
}

/* 5. BOTÓN VOLVER ARRIBA */
.scroll-to-top-btn { 
    position: fixed; 
    bottom: 30px; 
    right: 30px; 
    width: 45px; 
    height: 45px; 
    background-color: var(--text-main); 
    color: #fff; 
    border: none; 
    border-radius: 50%; 
    cursor: pointer; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    z-index: 990; 
    opacity: 0; 
    visibility: hidden; 
    transition: all 0.3s ease; 
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.scroll-to-top-btn.show { 
    opacity: 1; 
    visibility: visible; 
}
.scroll-to-top-btn:hover {
    background-color: #000;
    transform: translateY(-3px);
}

/* RESPONSIVE DESKTOP */
@media (min-width: 992px) {
    .footer-cta-title h2 { 
        font-size: 3.5rem; 
        width: 60%; 
    }
    .footer-card { 
        grid-template-columns: 1fr 1fr; 
        padding: 60px; 
        align-items: center; 
    }
    .footer-brand-watermark { 
        font-size: 6rem; 
        bottom: -30px; 
    }
    .footer-links ul { 
        margin-top: 0; 
        margin-left: 40px; 
    }
    .footer-card__content { 
        display: flex; 
        justify-content: space-between; 
        align-items: flex-start;
        z-index: 2;
    }
    .footer-links {
        margin-left: auto;
    }
}

/* ==========================================================================
   6. MODALES GLOBALES (VIDEO E IMAGEN) - ESTILOS UNIFICADOS
   ========================================================================== */

/* Fondos oscuros de ambos modales */
.video-modal-overlay,
.legend-modal {
    display: none; /* Oculto por defecto */
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.95);
    z-index: 999999;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
}

/* Forzar mostrado cuando JS inyecta el estilo en línea */
.video-modal-overlay[style*="display: flex"],
.legend-modal[style*="display: flex"] {
    display: flex !important;
}

/* Cajas de contenido base */
.video-modal-content,
.legend-modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90vh;
    box-shadow: 0 0 50px rgba(0,0,0,0.5);
    border-radius: 8px;
    overflow: hidden;
}

/* Específicos del Modal de Imagen */
.legend-modal-content {
    background: #fff;
    padding: 10px;
    object-fit: contain;
}

/* Específicos del Modal de Video */
.video-modal-content {
    background: #000;
    width: 90%; 
    max-width: 900px;
    aspect-ratio: 16/9;
}
.video-modal-content.is-short {
    max-width: 400px; 
    aspect-ratio: 9/16;
}
.video-modal-content iframe { 
    width: 100%; 
    height: 100%; 
    border: none;
    display: block;
}

/* Botones de Cierre (X) */
.video-modal-close,
.legend-close {
    position: absolute;
    top: 20px; right: 30px;
    background: none; border: none;
    color: #fff;
    font-size: 40px;
    cursor: pointer;
    z-index: 100000;
    line-height: 1;
    transition: color 0.2s;
    font-weight: bold;
}
.video-modal-close:hover,
.legend-close:hover {
    color: var(--brand-lime, #EF6E59);
}

/* Controles de Navegación (Solo para Imágenes) */
.modal-nav {
    position: absolute; top: 50%; transform: translateY(-50%);
    background: rgba(255,255,255,0.1); color: #fff;
    border: none; cursor: pointer; font-size: 24px;
    z-index: 100000; transition: background 0.3s; border-radius: 50%;
    width: 60px; height: 60px; display: none; /* Oculto por defecto */
    align-items: center; justify-content: center;
}
.modal-nav.active { display: flex; }
.modal-nav:hover { background: rgba(255,255,255,0.3); }
.modal-prev { left: 20px; }
.modal-next { right: 20px; }