/*
Theme Name: SChPCA Theme
Theme URI: https://www.schpca.cl
Author: Dr. Manuel Oses Oyaneder
Author URI: https://www.schpca.cl
Description: Tema desarrollado a medida, limpio, rápido y sin dependencias de terceros para la Sociedad Chilena de Patología Clínica Animal.
Version: 2.1.2
License: GNU General Public License v2 or later
Text Domain: Tema SchPCA - 2026
*/

/* ==========================================================================
   1. VARIABLES GLOBALES (Basadas en Infinite Canvas)
   ========================================================================== */
:root {
    --color-mono-1: #020617; /* Texto oscuro */
    --color-mono-2: #64748B; /* ¡FALTABA! Gris azulado para párrafos */
    --color-mono-3: #E2E8F0; /* ¡FALTABA! Gris claro para bordes */
    --color-mono-4: #F3F4F6; /* Fondo gris claro cápsula */
    --color-primary: #0EA5E9; /* Azul de acento para hover */
    --font-primary: 'Source Sans 3', sans-serif;
    --content-width: 1200px;
    --color-featured: #071922; /* Fondo azul oscuro del footer superior */
    --color-contrast-light: #FFFFFF; /* Texto blanco */
}

/* ==========================================================================
   2. RESET BÁSICO Y TIPOGRAFÍA
   ========================================================================== */
body {
    font-family: var(--font-primary);
    color: var(--color-mono-1);
    margin: 0;
    padding: 0;
    background-color: #FFFFFF;
    
    /* Lógica para empujar el footer al fondo */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.site-main {
    flex: 1;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ==========================================================================
   3. ENCABEZADO Y CÁPSULA
   ========================================================================== */
.site-header {
    padding: 20px 20px 10px 20px;
    display: flex;
    justify-content: center;
}

.header-container {
    width: 100%;
    max-width: var(--content-width);
    background-color: var(--color-mono-4);
    border-radius: 100px; /* Efecto píldora/cápsula */
    padding: 14px 25px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-sizing: border-box;
}

/* ==========================================================================
   4. LOGO (33%)
   ========================================================================== */
.site-branding {
    flex: 0 0 33.33%;
}

.site-branding img.custom-logo {
    max-height: 64px;
    width: auto;
}

/* Por si no hay logo cargado aún */
.site-branding h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
}

.site-branding a {
    text-decoration: none;
    color: var(--color-mono-1);
}

/* ==========================================================================
   5. NAVEGACIÓN (66%)
   ========================================================================== */
.site-navigation-wrapper {
    flex: 0 0 66.67%;
    display: flex;
    justify-content: flex-end;
}

.nav-menu-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 30px; /* Espacio entre los enlaces */
    align-items: center;
}

.nav-menu-list li a {
    color: var(--color-mono-1);
    text-decoration: none;
    font-weight: 600; /* Letra ultra negrita como tu diseño */
    font-size: 16px;
    transition: color 0.3s ease;
}

.nav-menu-list li a:hover,
.nav-menu-list li.current-menu-item a {
    color: var(--color-primary); /* Cambia a azul al pasar el mouse o estar en la página */
}

/* Botón menú móvil (oculto en PC) */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-mono-1);
    padding: 5px;
}

/* ==========================================================================
   6. RESPONSIVO (Tablets y Celulares)
   ========================================================================== */
@media (max-width: 781px) {
    .header-container {
        border-radius: 30px; /* Menos curvo en pantallas pequeñas */
        padding: 15px 20px;
    }

    .site-branding {
        flex: 1; /* Permite que el logo ocupe más espacio */
    }

    .site-navigation-wrapper {
        flex: initial;
    }

    /* Ocultamos los enlaces horizontales */
    .main-navigation {
        display: none; 
    }

    /* Mostramos el icono de hamburguesa */
    .mobile-menu-toggle {
        display: block;
    }
}



/* ==========================================================================
   7. PIE DE PÁGINA (FOOTER)
   ========================================================================== */
.site-footer {
    background-color: var(--color-featured); /* El fondo azul oscuro cubre TODO el footer (#071922) */
    width: 100%;
    margin-top: 0;
}

/* Área superior */
.footer-top {
    padding: 60px 25px 25px 25px;
}

.footer-container {
    width: 100%; /* ¡Esta línea evita que se comprima al centro! */
    max-width: var(--content-width);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 40px;
}

.footer-branding {
    display: flex;
    align-items: center;
    gap: 25px;
}

.footer-branding img.custom-logo,
.footer-branding .custom-logo-link img {
    max-width: 46px;
    height: auto;
}

.footer-title {
    color: var(--color-contrast-light);
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

.footer-socials {
    display: flex;
    gap: 25px;
}

.footer-socials a {
    color: var(--color-contrast-light);
    display: inline-flex;
    transition: transform 0.2s ease;
}

.footer-socials a:hover {
    transform: scale(1.1);
}

/* Contenedor inferior para centrar y aislar la cápsula */
.footer-bottom-wrapper {
    width: 100%; /* ¡Esta también! */
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 0 30px 40px 30px;
    box-sizing: border-box;
}

/* La barra oscura flotante idéntica a tu diseño original */
.footer-copyright-capsule {
    background-color: var(--color-mono-1); /* Color negro/azul ultra oscuro de tu paleta (#020617) */
    border-radius: 8px; /* Bordes redondeados sutiles de la píldora */
    padding: 20px;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
}

.footer-copyright-capsule p {
    color: var(--color-contrast-light);
    font-size: 15px;
    font-weight: 500;
    margin: 0;
    letter-spacing: 0.5px;
}

/* Responsivo */
@media (max-width: 781px) {
    .footer-container {
        flex-direction: column;
        text-align: center;
    }
    .footer-branding {
        flex-direction: column;
        gap: 10px;
    }
    .footer-socials {
        justify-content: center;
    }
}

/* ==========================================================================
   8. BOTONES GLOBALES
   ========================================================================== */
.btn {
    display: inline-block;
    padding: 14px 28px;
    border-radius: 100px;
    font-weight: 600;
    font-size: 17px;
    text-decoration: none;
    transition: all 0.3s ease;
    text-align: center;
    cursor: pointer;
}

.btn-primary {
    background-color: var(--color-primary);
    color: var(--color-contrast-light);
    border: 2px solid var(--color-primary);
}

.btn-primary:hover {
    background-color: #0284C7; /* Azul más oscuro al pasar el mouse */
    border-color: #0284C7;
    color: var(--color-contrast-light);
}

.btn-outline {
    background-color: transparent;
    border: 1px solid #E2E8F0; /* Gris muy clarito del borde */
    color: var(--color-mono-1);
}

.btn-outline:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

/* ==========================================================================
   9. PÁGINA DE INICIO - HERO SECTION
   ========================================================================== */
.hero-section {
    max-width: var(--content-width);
    margin: 60px auto 40px auto;
    padding: 0 20px;
    text-align: center;
}

.hero-content h1 {
    color: #071922; /* El color "featured" oscuro de tu diseño */
    font-size: clamp(35px, 5vw, 64px); /* Se achica solo en celulares */
    font-weight: 600;
    line-height: 1.1;
    margin: 0 0 20px 0;
}

.hero-content p {
    color: #64748B; /* El color gris azulado "mono-2" */
    font-size: 18px;
    max-width: 800px;
    margin: 0 auto 30px auto;
    line-height: 1.5;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 60px;
}

.hero-image img {
    width: 100%;
    height: auto;
    border-radius: 20px; /* Suavizamos los bordes de la imagen principal */
}

/* Responsivo para celulares */
@media (max-width: 600px) {
    .hero-buttons {
        flex-direction: column;
        padding: 0 20px;
    }
}

/* ==========================================================================
   10. ICONOS DE ESPECIES
   ========================================================================== */
.species-icons-section {
    max-width: var(--content-width);
    margin: 40px auto 80px auto;
    padding: 0 20px;
}

.species-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap; /* Permite que bajen de línea en móviles */
    gap: 20px;
}

.species-container img {
    width: 160px;
    height: auto;
    opacity: 0.9;
    /* EL TRUCO MAGICO PARA EL RECORTE */
    padding: 15px; 
    box-sizing: content-box; /* Evita que el padding encoja la imagen */
    /* Agregamos transform y filter a la transición para que el zoom y brillo sean suaves al entrar y salir */
    transition: opacity 0.3s ease, transform 0.3s ease, filter 0.3s ease;
}

.species-container img:hover {
    opacity: 1;
    transform: scale(1.15); /* Hace un zoom exacto del 15% */
    /* Crea un brillo suave usando tu color primary (azul). 
       Si prefieres un brillo blanco, cambia el rgba a rgba(255, 255, 255, 0.8) */
    filter: drop-shadow(0px 0px 10px rgba(14, 165, 233, 0.6)); 
}

/* ==========================================================================
   11. SECCIÓN: MEDICINA DE LABORATORIO
   ========================================================================== */
.features-section {
    max-width: var(--content-width);
    margin: 0 auto 80px auto;
    padding: 0 20px;
}

.features-header {
    text-align: center;
    margin-bottom: 50px;
}

.features-header .subtitle {
    color: var(--color-primary);
    font-size: 16px;
    font-weight: 600;
    text-transform: none;
    margin: 0 0 5px 0;
}

.features-header h2 {
    color: var(--color-mono-1);
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 600;
    margin: 0 0 15px 0;
}

.features-header p {
    color: #64748B;
    font-size: 16px;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Cuadrícula de Tarjetas */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.feature-card {
    background-color: var(--color-mono-4); /* Fondo gris de la tarjeta */
    padding: 40px 30px;
    border-radius: 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.feature-card img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    /* 1. Aumentamos el lienzo de seguridad a 25px */
    padding: 25px; 
    box-sizing: content-box;
    /* 2. Le decimos explícitamente al navegador que no corte lo que sobresale */
    overflow: visible; 
    /* 3. Ajustamos el margen inferior para que el título no quede tan separado */
    margin-bottom: -10px; 
    transition: transform 0.3s ease, filter 0.3s ease;
}

.feature-card img:hover {
    transform: scale(1.15); /* Zoom del 15% */
    filter: drop-shadow(0px 0px 10px rgba(14, 165, 233, 0.6)); /* Brillo silueteado */
}

.feature-card h4 {
    color: var(--color-mono-1);
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 15px 0;
    line-height: 1.3;
}

.feature-card p {
    color: #64748B;
    font-size: 14px;
    margin: 0;
    line-height: 1.6;
    font-style: italic; /* Como en tu diseño original */
}

/* Responsivo para móviles y tablets */
@media (max-width: 900px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 columnas en tablet */
    }
    
    .species-container {
        justify-content: center;
    }
}

@media (max-width: 600px) {
    .features-grid {
        grid-template-columns: 1fr; /* 1 columna en celulares */
    }
}

/* ==========================================================================
   12. SECCIONES DIVIDIDAS (TEXTO E IMAGEN)
   ========================================================================== */
.split-section {
    padding: 80px 20px;
}

.bg-gray {
    background-color: var(--color-mono-4);
}

.split-container {
    max-width: var(--content-width);
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 60px;
}

/* Invierte el orden de los elementos (Imagen Izquierda, Texto Derecha) */
.reverse-desktop {
    flex-direction: row-reverse;
}

.split-content {
    flex: 1; /* Ocupa la mitad del espacio */
}

/* ==========================================================================
   EFECTO ZOOM PARA SPLIT MEDIA (Imágenes intercaladas)
   ========================================================================== */
.split-media {
    flex: 1;
    overflow: hidden; /* El candado mágico: recorta lo que crezca por fuera */
    border-radius: 8px; /* Movemos el borde redondeado al marco, no a la imagen */
}

.split-media img {
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
    transition: transform 1.8s ease; /* 0.8 segundos lo hace lento y elegante */
}

/* Al pasar el cursor por el contenedor, la imagen crece 40% (escala 1.4) */
.split-media:hover img {
    transform: scale(1.4);
}

.split-content h2 {
    color: var(--color-mono-1);
    font-size: clamp(32px, 4vw, 42px);
    font-weight: 600;
    line-height: 1.2;
    margin: 0 0 20px 0;
}

.split-content p {
    color: #64748B;
    font-size: 18px;
    line-height: 1.6;
    text-align: justify; /* Justificado como en tu código original */
    margin: 0 0 30px 0;
}

.split-content strong {
    color: inherit; /* Hereda el gris del párrafo, no cambia a negro */
    font-weight: 600;
}

.split-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.split-media img {
    width: 100%;
    height: auto;
    border-radius: 8px; /* Borde redondeado sutil original */
    object-fit: cover;
}

/* Responsivo para celulares y tablets */
@media (max-width: 900px) {
    .split-container,
    .reverse-desktop {
        flex-direction: column-reverse; /* En móvil, imagen siempre arriba del texto */
        gap: 40px;
    }
}

/* ==========================================================================
   13. ACADEMIA Y COMUNIDAD CIENTÍFICA
   ========================================================================== */
.academy-section {
    padding: 80px 20px;
}

.academy-header {
    text-align: center;
    margin-bottom: 60px;
}

.academy-header .subtitle {
    color: var(--color-primary);
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 5px 0;
}

.academy-header h2 {
    color: var(--color-mono-1);
    font-size: clamp(32px, 4vw, 42px);
    font-weight: 600;
    margin: 0 0 15px 0;
}

.academy-header p {
    color: #64748B;
    font-size: 16px;
    line-height: 1.6;
}

/* Grilla de 3 columnas verticales */
.academy-grid {
    max-width: var(--content-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.academy-card {
    display: flex;
    flex-direction: column;
}

/* ==========================================================================
   EFECTO ZOOM PARA TARJETAS DE ACADEMIA (Imágenes verticales)
   ========================================================================== */
.academy-img-wrapper {
    width: 100%;
    height: 350px;
    overflow: hidden; /* El candado mágico para las tarjetas */
    border-radius: 8px;
    margin-bottom: 20px;
}

.academy-img-wrapper img {
    width: 100%;
    height: 100%; /* Ocupa todo el alto del wrapper */
    object-fit: cover;
    display: block;
    transition: transform 1.8s ease; /* Transición lenta */
}

/* Al pasar el cursor por la tarjeta completa, la imagen crece */
.academy-card:hover .academy-img-wrapper img {
    transform: scale(1.4);
}

.academy-card-content h3 {
    color: var(--color-mono-1);
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 15px 0;
}

.academy-card-content p {
    color: #64748B;
    font-size: 14px;
    line-height: 1.6;
    text-align: justify;
    margin: 0;
}

/* ==========================================================================
   14. CALL TO ACTION FINAL (Miembros)
   ========================================================================== */
.cta-section {
    padding: 100px 20px;
    background-size: cover;
    background-position: center;
    background-attachment: fixed; /* Efecto Parallax sutil */
    display: flex;
    justify-content: center;
    align-items: center;
}

.cta-card {
    background-color: rgba(255, 255, 255, 0.9); /* Fondo blanco semi-transparente */
    padding: 60px 40px;
    border-radius: 24px;
    max-width: 680px;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.cta-card .subtitle {
    color: var(--color-primary);
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 5px 0;
}

.cta-card h2 {
    color: var(--color-mono-1);
    font-size: clamp(32px, 4vw, 42px);
    font-weight: 600;
    margin: 0 0 20px 0;
}

.cta-card p {
    color: #64748B;
    font-size: 16px;
    line-height: 1.6;
    margin: 0 auto 30px auto;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

/* Botón especial blanco para el CTA */
.btn-outline-white {
    background-color: transparent;
    border: 2px solid var(--color-mono-1);
    color: var(--color-mono-1);
}

.btn-outline-white:hover {
    background-color: var(--color-mono-1);
    color: #FFFFFF;
}

/* Responsivo final */
@media (max-width: 900px) {
    .academy-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .academy-grid {
        grid-template-columns: 1fr;
    }
    .cta-card {
        padding: 40px 20px;
    }
}

/* ==========================================================================
   15. PÁGINA NOSOTROS - DIRECTORIO DE EQUIPO
   ========================================================================== */
.team-section {
    padding: 60px 20px;
    max-width: var(--content-width);
    margin: 0 auto;
}

.team-header {
    text-align: center;
    margin-bottom: 50px;
}

.team-header h2 {
    color: var(--color-mono-1);
    font-size: clamp(28px, 4vw, 38px);
    font-weight: 800;
    margin: 0 0 15px 0;
}

/* La cuadrícula inteligente */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
}

/* La tarjeta individual */
.team-card {
    background: #FFFFFF;
    border: 1px solid var(--color-mono-3); /* Borde gris muy sutil */
    border-radius: 16px;
    overflow: hidden;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

/* Interacción al pasar el cursor por toda la tarjeta */
.team-card:hover {
    transform: translateY(-10px); /* La tarjeta "levita" hacia arriba */
    box-shadow: 0 20px 25px rgba(0, 0, 0, 0.1); /* Sombra más profunda */
}

/* El marco de la foto con el candado de recorte */
.team-photo-wrapper {
    width: 100%;
    height: 320px; /* Altura uniforme para todos */
    overflow: hidden;
    background-color: var(--color-mono-4); /* Fondo gris claro para los que no tienen foto */
    display: flex;
    align-items: center;
    justify-content: center;
}

.team-photo-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

/* El efecto Ken Burns (zoom) en la foto al hacer hover en la tarjeta */
.team-card:hover .team-photo-wrapper img {
    transform: scale(1.1);
}

/* Información del miembro */
.team-info {
    padding: 30px 20px;
}

/* Etiqueta del cargo (Badge) */
.team-role {
    display: inline-block;
    background-color: var(--color-primary);
    color: #FFFFFF;
    font-size: 13px;
    font-weight: 600;
    padding: 6px 16px;
    border-radius: 100px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 15px;
}

.team-info h3 {
    color: var(--color-mono-1);
    font-size: 20px;
    font-weight: 800;
    margin: 0 0 10px 0;
}

.team-credentials {
    color: var(--color-mono-2);
    font-size: 14px;
    line-height: 1.6;
    margin: 0;
    font-style: italic;
}

/* ==========================================================================
   16. CITA INSTITUCIONAL (NOSOTROS) - BLINDADA
   ========================================================================== */
#schpca-quote-section {
    display: block !important;
    width: 100% !important;
    max-width: 900px !important;
    margin: 80px auto !important;
    padding: 0 20px !important;
    box-sizing: border-box !important;
    clear: both !important;
}

#schpca-quote-section blockquote {
    display: block !important;
    background-color: #F3F4F6 !important; /* Gris claro cápsula */
    border-left: 5px solid #E2E8F0 !important; /* Borde gris */
    padding: 40px 50px !important;
    margin: 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
    border-radius: 0 20px 20px 0 !important;
    transition: all 0.5s ease !important;
}

#schpca-quote-section blockquote p {
    color: #64748B !important; /* Texto gris azulado */
    font-size: clamp(18px, 2vw, 22px) !important;
    line-height: 1.6 !important;
    font-style: italic !important;
    margin: 0 0 20px 0 !important;
    transition: color 0.5s ease !important;
}

#schpca-quote-section blockquote cite {
    display: block !important;
    color: #020617 !important; /* Texto muy oscuro */
    font-weight: 800 !important;
    font-size: 16px !important;
    font-style: normal !important;
    text-align: right !important;
}

/* La animación al pasar el cursor */
#schpca-quote-section blockquote:hover {
    border-left-color: #0EA5E9 !important; /* Borde azul SChPCA */
    background-color: #FFFFFF !important;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.04) !important;
    transform: translateX(8px) !important;
}

#schpca-quote-section blockquote:hover p {
    color: #020617 !important; /* Texto se oscurece */
}

@media (max-width: 600px) {
    #schpca-quote-section blockquote {
        padding: 30px 20px !important;
    }
}

/* ==========================================================================
   18. HUB PRINCIPAL DE MIEMBROS e ID DE CITA BLINDADA
   ========================================================================== */

#schpca-members-hub {
    width: 100% !important;
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 20px 0 !important;
}

#schpca-members-hub .hub-lead p {
    font-size: 18px !important;
    color: #64748B !important;
    line-height: 1.6 !important;
    text-align: center !important;
    max-width: 800px !important;
    margin: 0 auto 50px auto !important;
}

/* Rejilla adaptativa: 4 columnas en PC, 2 en Tablet, 1 en celular */
#schpca-members-hub .schpca-category-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)) !important;
    gap: 30px !important;
    margin-bottom: 60px !important;
}

/* Tarjetas de Categoría que actúan como enlaces completos */
#schpca-members-hub .category-card {
    background: #FFFFFF !important;
    border: 1px solid #E2E8F0 !important;
    border-radius: 14px !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    text-decoration: none !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02) !important;
    transition: all 0.3s ease !important;
}

#schpca-members-hub .category-card:hover {
    transform: translateY(-6px) !important;
    box-shadow: 0 15px 35px rgba(14, 165, 233, 0.1) !important;
    border-color: #0EA5E9 !important;
}

#schpca-members-hub .category-image {
    width: 100% !important;
    aspect-ratio: 4 / 3 !important; /* Mantiene proporciones idénticas en las 4 miniaturas */
    overflow: hidden !important;
    background-color: #F8FAFC !important;
}

#schpca-members-hub .category-image img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important; /* Asegura que la imagen llene el espacio sin deformarse */
    transition: transform 0.5s ease !important;
}

#schpca-members-hub .category-card:hover .category-image img {
    transform: scale(1.06) !important; /* Efecto sutil de zoom al pasar el mouse */
}

#schpca-members-hub .category-body {
    padding: 25px 20px !important;
    text-align: center !important;
    display: flex !important;
    flex-direction: column !important;
    flex-grow: 1 !important;
}

#schpca-members-hub .category-body h2 {
    font-size: 20px !important;
    font-weight: 800 !important;
    color: #020617 !important;
    margin: 0 0 10px 0 !important;
}

#schpca-members-hub .category-body p {
    font-size: 14px !important;
    color: #64748B !important;
    line-height: 1.4 !important;
    margin: 0 0 20px 0 !important;
    flex-grow: 1 !important; /* Empuja el botón al fondo si los textos varían en longitud */
}

#schpca-members-hub .category-btn {
    display: inline-block !important;
    background-color: #0EA5E9 !important;
    color: #FFFFFF !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    padding: 10px 20px !important;
    border-radius: 50px !important;
    transition: background-color 0.2s ease !important;
}

#schpca-members-hub .category-card:hover .category-btn {
    background-color: #0284C7 !important;
}

/* Separador horizontal intermedio */
#schpca-members-hub .hub-separator {
    height: 1px !important;
    background: linear-gradient(to right, transparent, #E2E8F0, transparent) !important;
    margin: 40px 0 60px 0 !important;
}

/* CITA DEFINITIVA CON ID CONTROLADO */
#schpca-wittwer-quote {
    max-width: 800px !important;
    margin: 0 auto !important;
    text-align: center !important;
    padding: 0 20px !important;
    position: relative !important;
}

#schpca-wittwer-quote .quote-icon {
    font-family: Georgia, serif !important;
    font-size: 80px !important;
    color: #0EA5E9 !important;
    opacity: 0.15 !important;
    line-height: 1 !important;
    height: 30px !important;
    margin-bottom: -10px !important;
}

#schpca-wittwer-quote blockquote {
    font-size: 19px !important;
    font-style: italic !important;
    color: #334155 !important;
    line-height: 1.6 !important;
    margin: 0 0 15px 0 !important;
    border: none !important; /* Quita barras laterales que a veces pone WP */
    padding: 0 !important;
}

#schpca-wittwer-quote cite {
    font-size: 15px !important;
    font-weight: 600 !important;
    color: #020617 !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    display: block !important;
}

/* ==========================================================================
   19. DIRECTORIO SChPCA: TARJETAS (15% MÁS GRANDES) Y MODAL
   ========================================================================== */

#schpca-directory-wrapper {
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 30px 20px !important;
}

/* BARRA SUPERIOR */
.dir-toolbar {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-bottom: 40px !important;
    flex-wrap: wrap !important;
    gap: 20px !important;
}

.dir-btn-back {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    background: #fff !important;
    border: 1px solid #CBD5E1 !important;
    padding: 12px 24px !important;
    border-radius: 50px !important;
    color: #334155 !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    text-decoration: none !important;
    transition: all 0.2s !important;
}

.dir-btn-back:hover {
    background: #F8FAFC !important;
    border-color: #0EA5E9 !important;
    color: #0EA5E9 !important;
}

.dir-search {
    position: relative !important;
    flex-grow: 1 !important;
    max-width: 450px !important;
}

.dir-search input {
    width: 100% !important;
    padding: 14px 20px 14px 45px !important;
    border: 1px solid #CBD5E1 !important;
    border-radius: 50px !important;
    font-size: 16px !important;
    outline: none !important;
}

.dir-search svg {
    position: absolute !important;
    left: 15px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    color: #94A3B8 !important;
}

/* REJILLA Y TARJETAS (+15% TAMAÑO) */
.dir-grid {
    display: grid !important;
    /* Aumentado de 180px a 220px para tarjetas más robustas */
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)) !important;
    gap: 25px !important;
}

.dir-card {
    background: #fff !important;
    border-radius: 12px !important;
    padding: 25px 20px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    cursor: pointer !important;
    border: 1px solid #E2E8F0 !important;
    border-top-width: 5px !important;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02) !important;
    transition: transform 0.2s, box-shadow 0.2s !important;
}

.dir-card:hover {
    transform: translateY(-5px) !important;
    box-shadow: 0 12px 30px rgba(0,0,0,0.08) !important;
}

/* COLORES DE CATEGORÍA */
.border-epca { border-top-color: #0EA5E9 !important; }
.border-regular { border-top-color: #94A3B8 !important; }
.border-honorary { border-top-color: #F59E0B !important; }
.border-memoriam { border-top-color: #1E293B !important; }

.border-memoriam .dir-avatar img { filter: grayscale(100%) !important; }

/* AVATAR AUMENTADO (De 90px a 105px) */
.dir-avatar {
    width: 105px !important;
    height: 105px !important;
    border-radius: 50% !important;
    margin-bottom: 18px !important;
    overflow: hidden !important;
    position: relative !important;
    background: #F1F5F9 !important;
}

.dir-avatar img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}

.dir-ribbon {
    position: absolute !important;
    bottom: 0 !important;
    right: 0 !important;
    width: 40px !important;
    height: 40px !important;
    background: linear-gradient(135deg, transparent 50%, #1E293B 50%) !important;
}

.dir-info { text-align: center !important; }
.dir-info h4 { font-size: 16px !important; font-weight: 700 !important; color: #0F172A !important; margin: 0 0 6px 0 !important; }
.dir-info p { font-size: 13px !important; color: #0EA5E9 !important; margin: 0 !important; font-weight: 600 !important; }
.border-memoriam .dir-info p { color: #64748B !important; }

/* MODAL BLINDADO */
.dir-modal-overlay {
    display: none; /* Oculto por defecto, JS lo cambia a flex */
    position: fixed !important;
    top: 0 !important; left: 0 !important;
    width: 100vw !important; height: 100vh !important;
    background: rgba(15, 23, 42, 0.7) !important;
    backdrop-filter: blur(5px) !important;
    z-index: 9999999 !important; /* Prioridad máxima */
    align-items: center !important;
    justify-content: center !important;
}

.dir-modal-box {
    background: #fff !important;
    width: 90% !important;
    max-width: 450px !important;
    border-radius: 16px !important;
    position: relative !important;
    text-align: center !important;
    overflow: hidden !important;
}

.dir-modal-header { height: 100px !important; background: #F8FAFC !important; }

.dir-close {
    position: absolute !important;
    top: 15px !important; right: 20px !important;
    font-size: 30px !important; color: #64748B !important;
    cursor: pointer !important; line-height: 1 !important;
}

.dir-modal-content { padding: 0 30px 40px 30px !important; margin-top: -50px !important; }

.dir-modal-photo {
    width: 110px !important; height: 110px !important;
    border-radius: 50% !important; border: 4px solid #fff !important;
    margin: 0 auto 15px auto !important; overflow: hidden !important;
    background: #fff !important;
}

.dir-modal-photo img { width: 100% !important; height: 100% !important; object-fit: cover !important; }

.dir-modal-content h3 { font-size: 24px !important; margin: 0 0 5px 0 !important; color: #0F172A !important; }
.dir-modal-title { font-size: 15px !important; color: #64748B !important; font-style: italic !important; margin: 0 0 20px 0 !important; }

.dir-modal-lab {
    display: inline-flex !important; align-items: center !important; gap: 8px !important;
    background: #F1F5F9 !important; padding: 10px 18px !important;
    border-radius: 8px !important; font-size: 14px !important;
    color: #334155 !important; font-weight: 600 !important; margin-bottom: 25px !important;
}
.dir-modal-lab svg { color: #0EA5E9 !important; }

.dir-socials { display: flex !important; justify-content: center !important; gap: 15px !important; }
.dir-socials a {
    display: flex !important; align-items: center !important; justify-content: center !important;
    width: 42px !important; height: 42px !important; border-radius: 50% !important;
    background: #F1F5F9 !important; color: #64748B !important; transition: 0.2s !important;
}
.dir-socials a:hover { transform: translateY(-3px) !important; color: #fff !important; }
.dir-socials a.lkd:hover { background: #0A66C2 !important; }
.dir-socials a.ig:hover { background: #E1306C !important; }

/* ==========================================================================
   20. HUB DE LABORATORIOS SChPCA (CON ÍCONOS PERSONALIZADOS)
   ========================================================================== */

#schpca-labs-hub {
    width: 100% !important;
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 20px 0 60px 0 !important;
}

.labs-intro {
    text-align: center !important;
    max-width: 800px !important;
    margin: 0 auto 50px auto !important;
    color: #64748B !important;
    font-size: 18px !important;
    line-height: 1.6 !important;
}

/* REJILLA DE ZONAS GEOGRÁFICAS */
.labs-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)) !important;
    gap: 30px !important;
    margin-bottom: 60px !important;
}

/* TARJETAS DE ENLACE */
.lab-card {
    background: #FFFFFF !important;
    border: 1px solid #E2E8F0 !important;
    border-radius: 16px !important;
    padding: 35px 30px !important;
    text-decoration: none !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02) !important;
    position: relative !important;
    overflow: hidden !important;
}

.lab-card:hover {
    transform: translateY(-8px) !important;
    box-shadow: 0 20px 40px rgba(14, 165, 233, 0.1) !important;
    border-color: #0EA5E9 !important;
}

.lab-card::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 4px !important;
    background: #E2E8F0 !important;
    transition: background 0.3s ease !important;
}

.lab-card:hover::before {
    background: #0EA5E9 !important;
}

/* CONTENEDOR DE IMAGEN/ÍCONO PERSONALIZADO */
.lab-icon-wrapper {
    width: 60px !important; /* Tamaño aumentado para acomodar mejor los png/svg */
    height: 60px !important;
    background: #F1F5F9 !important;
    border-radius: 14px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin-bottom: 20px !important;
    transition: all 0.3s ease !important;
}

.lab-icon-wrapper img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important; /* Asegura que la imagen no se deforme */
    padding: 12px !important; /* Espacio de respiración interior */
    transition: transform 0.3s ease !important;
}

/* Efecto hover específico para el ícono propio */
.lab-card:hover .lab-icon-wrapper {
    background: #E0F2FE !important; /* Fondo celeste tenue al pasar el mouse */
}

.lab-card:hover .lab-icon-wrapper img {
    transform: scale(1.1) !important; /* Pequeño zoom al ícono */
}

.lab-card h3 {
    font-size: 22px !important;
    font-weight: 700 !important;
    color: #0F172A !important;
    margin: 0 0 10px 0 !important;
}

.lab-card p {
    font-size: 14px !important;
    color: #64748B !important;
    line-height: 1.5 !important;
    margin: 0 0 25px 0 !important;
    flex-grow: 1 !important;
}

.lab-card-footer {
    display: flex !important;
    align-items: center !important;
    color: #0EA5E9 !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    margin-top: auto !important;
}

.lab-card-footer svg {
    margin-left: 8px !important;
    transition: transform 0.3s ease !important;
}

.lab-card:hover .lab-card-footer svg {
    transform: translateX(5px) !important;
}

/* SECCIÓN DEL SELLO DE CALIDAD */
.lab-cert-section {
    background: linear-gradient(135deg, #F8FAFC, #F1F5F9) !important;
    border-radius: 24px !important;
    border: 1px dashed #CBD5E1 !important;
    padding: 50px 30px !important;
    text-align: center !important;
    max-width: 900px !important;
    margin: 0 auto !important;
}

.lab-cert-section img {
    max-width: 250px !important;
    height: auto !important;
    margin-bottom: 25px !important;
    mix-blend-mode: multiply !important;
}

.lab-cert-section h4 {
    font-size: 24px !important;
    color: #0F172A !important;
    margin: 0 0 15px 0 !important;
    font-weight: 700 !important;
}

.lab-cert-section p {
    font-size: 16px !important;
    color: #475569 !important;
    max-width: 600px !important;
    margin: 0 auto !important;
    line-height: 1.6 !important;
}

/* ==========================================================================
   SUBPÁGINA ZONAS (EJ: ZONA NORTE) - FILTROS, TARJETAS Y MODAL
   ========================================================================== */

#schpca-zona-container {
    width: 100% !important;
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 20px 0 60px 0 !important;
    font-family: var(--wp--preset--font-family--fontprimary), sans-serif !important;
}

/* BARRA DE HERRAMIENTAS Y FILTROS */
.zona-toolbar {
    background: #FFFFFF !important;
    border: 1px solid #E2E8F0 !important;
    border-radius: 16px !important;
    padding: 20px !important;
    margin-bottom: 40px !important;
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 15px !important;
    align-items: center !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03) !important;
}

.zona-btn-back {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    background: #F8FAFC !important;
    border: 1px solid #CBD5E1 !important;
    padding: 12px 20px !important;
    border-radius: 50px !important;
    color: #334155 !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.2s !important;
}

.zona-btn-back:hover {
    background: #E0F2FE !important;
    color: #0EA5E9 !important;
    border-color: #BAE6FD !important;
}

.zona-filter-group {
    display: flex !important;
    flex-grow: 1 !important;
    gap: 15px !important;
    flex-wrap: wrap !important;
}

.zona-select, .zona-search {
    flex: 1 !important;
    min-width: 200px !important;
    padding: 12px 15px !important;
    border: 1px solid #CBD5E1 !important;
    border-radius: 8px !important;
    font-size: 15px !important;
    color: #334155 !important;
    outline: none !important;
    background-color: #F8FAFC !important;
    transition: border-color 0.2s !important;
}

.zona-select:focus, .zona-search:focus {
    border-color: #0EA5E9 !important;
    background-color: #FFFFFF !important;
    box-shadow: 0 0 0 3px rgba(14,165,233,0.1) !important;
}

/* TARJETAS DE LABORATORIOS */
.zona-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)) !important;
    gap: 25px !important;
}

.lab-item {
    background: #FFFFFF !important;
    border: 1px solid #E2E8F0 !important;
    border-radius: 16px !important;
    padding: 25px 20px !important;
    text-align: center !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
}

.lab-item:hover {
    transform: translateY(-5px) !important;
    box-shadow: 0 15px 30px rgba(14, 165, 233, 0.1) !important;
    border-color: #0EA5E9 !important;
}

.lab-item-logo {
    width: 120px !important;
    height: 120px !important;
    border-radius: 50% !important;
    margin-bottom: 20px !important;
    background: #FFFFFF !important;
    border: 4px solid #F1F5F9 !important;
    padding: 0 !important; /* Eliminamos el padding para que la imagen toque los bordes */
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important; /* Esencial para que la imagen se recorte en círculo */
    box-shadow: 0 4px 10px rgba(0,0,0,0.08) !important;
}

.lab-item-logo img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important; /* RELLENA el círculo completamente */
    object-position: center !important; /* Centra la imagen */
}

.lab-item h3 {
    font-size: 18px !important;
    color: #0F172A !important;
    margin: 0 0 10px 0 !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;
}

.lab-item p.lab-director {
    font-size: 13px !important;
    color: #64748B !important;
    margin: 0 !important;
}

/* MODAL AVANZADO DE LABORATORIO */
.lab-modal-overlay {
    display: none; /* Oculto por defecto, se inyecta JS */
    position: fixed !important;
    top: 0 !important; left: 0 !important;
    width: 100vw !important; height: 100vh !important;
    background: rgba(15, 23, 42, 0.8) !important;
    backdrop-filter: blur(8px) !important;
    z-index: 9999999 !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 20px !important;
}

.lab-modal-box {
    background: #FFFFFF !important;
    width: 100% !important;
    max-width: 550px !important;
    border-radius: 20px !important;
    position: relative !important;
    overflow: hidden !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5) !important;
}

.lab-modal-header {
    background: linear-gradient(135deg, #0EA5E9 0%, #0284C7 100%) !important; /* Franja azul */
    height: 100px !important;
    position: relative !important;
    z-index: 1 !important; /* Capa base del modal */
}

.lab-modal-close {
    position: absolute !important;
    top: 15px !important; right: 20px !important;
    font-size: 30px !important; color: #64748B !important;
    cursor: pointer !important; line-height: 1 !important;
    background: #FFFFFF !important; border-radius: 50% !important;
    width: 35px !important; height: 35px !important;
    display: flex !important; align-items: center !important; justify-content: center !important;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1) !important;
}

.lab-modal-close:hover { color: #0F172A !important; background: #F1F5F9 !important; }

.lab-modal-body {
    padding: 0 40px 40px 40px !important;
    text-align: center !important;
    margin-top: -70px !important; /* Sube el logo hacia la franja azul */
    position: relative !important;
    z-index: 2 !important; /* Asegura que el contenido del cuerpo esté sobre el header */
}

.lab-modal-body .lab-item-logo {
    width: 140px !important;
    height: 140px !important;
    margin: 0 auto 15px auto !important;
    border: 6px solid #FFFFFF !important; /* Borde blanco grueso para resaltar sobre el azul */
    background: #FFFFFF !important;
    position: relative !important;
    z-index: 10 !important; /* EL SECRETO: Fuerza al logo a estar por encima de la franja azul */
    box-shadow: 0 8px 20px rgba(0,0,0,0.15) !important;
}

.lab-modal-body h2 { font-size: 24px !important; color: #0F172A !important; margin: 0 0 5px 0 !important; }
.lab-modal-body .director-tag { font-size: 15px !important; color: #0EA5E9 !important; font-weight: 600 !important; margin: 0 0 25px 0 !important; }

/* REDES SOCIALES Y CONTACTO */
.lab-social-grid {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 12px !important;
    margin-top: 20px !important;
    padding-top: 25px !important;
    border-top: 1px solid #E2E8F0 !important;
}

.social-btn {
    display: flex !important; align-items: center !important; justify-content: center !important;
    width: 45px !important; height: 45px !important;
    border-radius: 12px !important;
    color: #FFFFFF !important;
    text-decoration: none !important;
    transition: transform 0.2s, box-shadow 0.2s !important;
}

.social-btn:hover { transform: translateY(-3px) !important; box-shadow: 0 5px 15px rgba(0,0,0,0.2) !important; }
.social-btn svg { width: 22px !important; height: 22px !important; fill: currentColor; }

/* Colores corporativos reales */
.bg-phone { background: #334155 !important; }
.bg-whatsapp { background: #25D366 !important; }
.bg-linkedin { background: #0A66C2 !important; }
.bg-facebook { background: #1877F2 !important; }
.bg-instagram { background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%) !important; }
.bg-tiktok { background: #000000 !important; }
.bg-x { background: #0F1419 !important; }
.bg-web { background: #0EA5E9 !important; }
.bg-maps { background: #EA4335 !important; }

/* ==========================================================================
   NUEVO DISEÑO "BENTO BOX" & PREMIUM PARA NOVEDADES SChPCA
   ========================================================================== */
#schpca-premium-news {
    width: 100% !important;
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 40px 20px 80px 20px !important;
    font-family: var(--wp--preset--font-family--fontprimary), sans-serif !important;
}

/* --- FILTROS ESTILO "PÍLDORAS" --- */
.news-filters-wrapper {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 20px !important;
    margin-bottom: 40px !important;
    background: #FFFFFF !important;
    padding: 15px 25px !important;
    border-radius: 100px !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.03) !important;
    border: 1px solid #E2E8F0 !important;
}

.news-pills {
    display: flex !important;
    gap: 10px !important;
    flex-wrap: wrap !important;
}

.filter-pill {
    background: transparent !important;
    border: none !important;
    padding: 10px 20px !important;
    border-radius: 50px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #64748B !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
}

.filter-pill:hover { color: #0F172A !important; background: #F1F5F9 !important; }
.filter-pill.active { background: #0EA5E9 !important; color: #FFFFFF !important; box-shadow: 0 4px 10px rgba(14,165,233,0.3) !important; }

.premium-search {
    border: none !important;
    background: #F1F5F9 !important;
    padding: 12px 20px !important;
    border-radius: 50px !important;
    font-size: 14px !important;
    width: 280px !important;
    color: #334155 !important;
    outline: none !important;
    transition: all 0.3s ease !important;
}

.premium-search:focus { width: 320px !important; box-shadow: 0 0 0 2px rgba(14,165,233,0.2) !important; background: #FFFFFF !important; }

/* --- BENTO GRID (Cuadrícula Dinámica) --- */
.bento-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)) !important;
    gap: 25px !important;
    grid-auto-flow: dense !important;
}

/* La magia del Bento: El primer elemento es gigante en PC */
@media (min-width: 900px) {
    .bento-card:first-child { grid-column: span 2 !important; grid-row: span 2 !important; min-height: 500px !important; }
    .bento-card:first-child .bento-title { font-size: 32px !important; }
    .bento-card:first-child .bento-excerpt { display: block !important; font-size: 16px !important; }
}

/* --- TARJETAS ESTILO GLASSMORFISMO --- */
.bento-card {
    position: relative !important; /* CRUCIAL para evitar que la etiqueta se escape */
    border-radius: 24px !important;
    overflow: hidden !important;
    min-height: 350px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-end !important;
    text-decoration: none !important;
    box-shadow: 0 10px 20px rgba(0,0,0,0.05) !important;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.4s !important;
}

.bento-card:hover { transform: translateY(-8px) !important; box-shadow: 0 20px 40px rgba(0,0,0,0.15) !important; }

.bento-img {
    position: absolute !important; top: 0 !important; left: 0 !important;
    width: 100% !important; height: 100% !important;
    object-fit: cover !important;
    transition: transform 0.6s ease !important;
    z-index: 1 !important;
}

.bento-card:hover .bento-img { transform: scale(1.05) !important; }

/* El degradado oscuro sobre la imagen para que el texto resalte siempre */
.bento-overlay {
    position: absolute !important; inset: 0 !important;
    background: linear-gradient(to top, rgba(15,23,42,0.95) 0%, rgba(15,23,42,0.4) 50%, transparent 100%) !important;
    z-index: 2 !important;
}

/* Contenido de texto */
.bento-content {
    position: relative !important;
    z-index: 3 !important;
    padding: 30px !important;
}

/* CORRECCIÓN DE LA ETIQUETA BUGUEADA */
.bento-badge {
    position: absolute !important;
    top: 25px !important; left: 25px !important;
    background: #0EA5E9 !important; color: #FFFFFF !important;
    padding: 6px 16px !important; border-radius: 50px !important;
    font-size: 11px !important; font-weight: 800 !important;
    text-transform: uppercase !important; letter-spacing: 1px !important;
    z-index: 20 !important; /* Inamovible, siempre al frente */
    box-shadow: 0 4px 15px rgba(0,0,0,0.2) !important;
}

.bento-title { color: #FFFFFF !important; font-size: 22px !important; font-weight: 700 !important; margin: 0 0 10px 0 !important; line-height: 1.2 !important; }
.bento-excerpt { color: #CBD5E1 !important; font-size: 14px !important; line-height: 1.5 !important; margin: 0 0 15px 0 !important; display: none !important; /* Solo visible en la tarjeta grande o en móviles */ }

.bento-meta {
    display: flex !important; justify-content: space-between !important; align-items: center !important;
    color: #94A3B8 !important; font-size: 12px !important; font-weight: 600 !important;
    border-top: 1px solid rgba(255,255,255,0.1) !important; padding-top: 15px !important;
}
.bento-author { color: #E2E8F0 !important; }

/* Animación de filtrado */
.fade-in { animation: fadeIn 0.5s ease-in forwards; }
@keyframes fadeIn { from { opacity: 0; transform: scale(0.95); } to { opacity: 1; transform: scale(1); } }

@media (max-width: 768px) {
    .news-filters-wrapper { flex-direction: column !important; border-radius: 20px !important; padding: 20px !important; }
    .premium-search { width: 100% !important; }
    .bento-excerpt { display: block !important; }
}

/* ==========================================================================
   DISEÑO ENTRADA INDIVIDUAL - VERSIÓN MEJORADA (ANCHO + CRISTAL NATIVO)
   ========================================================================== */

.schpca-single-wrapper {
    width: 100% !important;
    padding: 60px 20px 80px 20px !important;
    background-color: #F1F5F9 !important;
}

/* --- 1. AJUSTE DE ANCHURA DE LA ENTRADA --- */
.schpca-article {
    max-width: 1050px !important; /* Aumentado de 850px a 1050px para mayor amplitud */
    margin: 0 auto !important;
    background: #FFFFFF !important;
    border-radius: 24px !important;
    overflow: hidden !important; 
    box-shadow: 0 20px 40px rgba(0,0,0,0.06) !important;
}

/* --- 2. EFECTO CRISTAL INTERACTIVO E INFALIBLE --- */
.schpca-article-header { 
    position: relative !important;
    background-image: var(--bg-img) !important;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    background-color: #FFFFFF !important; /* Fondo blanco de respaldo para la transparencia */
    padding: 0 !important;
    overflow: hidden !important;
}

/* Contenedor de cristal esmerilado (Frosted Glass) */
.header-content-inner {
    position: relative !important;
    z-index: 2 !important;
    padding: 90px 60px 60px 60px !important; 
    backdrop-filter: blur(15px) saturate(1.2) !important; /* Bajamos un poco la saturación nativa */
    -webkit-backdrop-filter: blur(25px) saturate(1.2) !important;
    
    /* El truco: Iniciamos con un 50% de opacidad blanca arriba (atenuando la foto al 50%) 
       y bajamos de forma fluida hasta el blanco sólido en la base */
    background: linear-gradient(
        to bottom, 
        rgba(255, 255, 255, 0.50) 0%, 
        rgba(255, 255, 255, 0.75) 80%,
        rgba(255, 255, 255, 0.90) 90%, 
        rgba(255, 255, 255, 1.00) 100%
    ) !important;
}

.article-category { 
    display: inline-block !important; 
    background: #0EA5E9 !important; 
    color: #FFFFFF !important; 
    padding: 6px 16px !important; 
    border-radius: 50px !important; 
    font-size: 12px !important; 
    font-weight: 800 !important; 
    text-transform: uppercase !important; 
    letter-spacing: 1px !important; 
    margin-bottom: 25px !important; 
    box-shadow: 0 4px 10px rgba(14,165,233,0.3) !important;
}

.article-title { 
    font-size: 44px !important; 
    color: #0F172A !important; 
    font-weight: 800 !important; 
    line-height: 1.2 !important; 
    margin: 0 0 20px 0 !important;
    /* Crea un halo blanco difuminado alrededor del título para maximizar el contraste */
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.9), 0 0 8px rgba(255, 255, 255, 0.6) !important;
}

.article-meta { 
    color: #334155 !important; /* Oscurecemos un tono el texto para mejorar lectura */
    font-size: 15px !important; 
    font-weight: 700 !important; 
    /* Halo blanco sutil para la fecha y tiempo de lectura */
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.9) !important;
}

.meta-separator { margin: 0 10px !important; opacity: 0.5 !important; }

/* --- 3. CUERPO DEL TEXTO (MÁS AMPLIO Y LLEGIBLE) --- */
.schpca-article-content {
    padding: 40px 60px 0 60px !important; /* Relleno optimizado para el ancho de 1050px */
    font-size: 19px !important;
    line-height: 1.8 !important;
    color: #334155 !important;
}
.schpca-article-content p { margin-bottom: 25px !important; }
.schpca-article-content h2 { font-size: 28px !important; color: #0F172A !important; margin: 50px 0 20px 0 !important; border-bottom: 2px solid #F1F5F9 !important; padding-bottom: 10px !important; }
.schpca-article-content h3 { font-size: 22px !important; color: #1E293B !important; margin: 30px 0 15px 0 !important; }

/* Imágenes Clickables */
.schpca-article-content img { border-radius: 12px !important; cursor: zoom-in !important; transition: transform 0.3s ease, box-shadow 0.3s ease !important; }
.schpca-article-content img:hover { transform: translateY(-3px) !important; box-shadow: 0 15px 30px rgba(0,0,0,0.1) !important; }

/* Videos Embeds */
.wp-block-embed-youtube { position: relative !important; cursor: pointer !important; border-radius: 16px !important; overflow: hidden !important; box-shadow: 0 10px 30px rgba(0,0,0,0.1) !important; }
.video-click-overlay { position: absolute !important; inset: 0 !important; z-index: 10 !important; background: rgba(15,23,42,0.2) !important; display: flex !important; align-items: center !important; justify-content: center !important; transition: background 0.3s !important; }
.video-click-overlay:hover { background: rgba(15,23,42,0.4) !important; }
.play-btn-icon { width: 70px !important; height: 70px !important; background: #E11D48 !important; border-radius: 50% !important; display: flex !important; align-items: center !important; justify-content: center !important; box-shadow: 0 10px 20px rgba(225,29,72,0.4) !important; }
.play-btn-icon::after { content: ''; display: block !important; border-top: 12px solid transparent !important; border-bottom: 12px solid transparent !important; border-left: 20px solid white !important; margin-left: 6px !important; }

/* Modal Lightbox */
.media-modal-overlay { display: none; position: fixed !important; z-index: 9999999 !important; padding-top: 60px !important; left: 0 !important; top: 0 !important; width: 100% !important; height: 100% !important; background-color: rgba(15, 23, 42, 0.95) !important; backdrop-filter: blur(10px) !important; }
.media-modal-content { margin: auto !important; display: block !important; max-width: 90vw !important; max-height: 80vh !important; text-align: center !important; }
.media-modal-content img, .media-modal-content iframe { border-radius: 12px !important; max-width: 100% !important; max-height: 80vh !important; box-shadow: 0 25px 50px rgba(0,0,0,0.5) !important; }
.media-modal-content iframe { width: 900px !important; height: 500px !important; border: none !important; }
.media-modal-caption { margin: auto !important; display: block !important; width: 80% !important; max-width: 700px !important; text-align: center !important; color: #E2E8F0 !important; padding: 20px 0 !important; font-size: 18px !important; font-weight: 300 !important; font-style: italic !important; }
.media-modal-close { position: absolute !important; top: 20px !important; right: 35px !important; color: #F1F5F9 !important; font-size: 50px !important; font-weight: 300 !important; cursor: pointer !important; transition: 0.3s !important; line-height: 1 !important; }
.media-modal-close:hover { color: #0EA5E9 !important; }

/* Cajas de Descarga */
.schpca-download-card { display: flex !important; align-items: center !important; background: #F8FAFC !important; border: 1px solid #E2E8F0 !important; border-radius: 16px !important; padding: 20px 25px !important; margin: 30px 0 !important; text-decoration: none !important; transition: all 0.3s ease !important; }
.schpca-download-card:hover { transform: translateY(-3px) !important; box-shadow: 0 15px 30px rgba(14,165,233,0.1) !important; border-color: #BAE6FD !important; }
.dl-icon { width: 50px !important; height: 50px !important; border-radius: 12px !important; display: flex !important; align-items: center !important; justify-content: center !important; margin-right: 20px !important; flex-shrink: 0 !important; }
.dl-pdf { background: #FEE2E2 !important; color: #EF4444 !important; }
.dl-doc { background: #DBEAFE !important; color: #3B82F6 !important; }
.dl-info { flex-grow: 1 !important; }
.dl-title { font-size: 18px !important; font-weight: 700 !important; color: #0F172A !important; margin: 0 0 5px 0 !important; line-height: 1.2 !important; }
.dl-meta { font-size: 13px !important; color: #64748B !important; margin: 0 !important; }
.dl-btn { background: #0EA5E9 !important; color: white !important; padding: 10px 20px !important; border-radius: 50px !important; font-size: 14px !important; font-weight: 600 !important; display: flex !important; align-items: center !important; gap: 8px !important; transition: 0.3s !important; }
.schpca-download-card:hover .dl-btn { background: #0284C7 !important; }

/* Tarjeta de Autor */
.schpca-article-footer { padding: 40px 60px 60px 60px !important; margin-top: 40px !important; border-top: 2px dashed #E2E8F0 !important; }
.author-signature-card { display: flex !important; align-items: center !important; gap: 30px !important; background: linear-gradient(135deg, #FFFFFF 0%, #F8FAFC 100%) !important; border: 1px solid #E2E8F0 !important; border-left: 6px solid #0EA5E9 !important; border-radius: 20px !important; padding: 30px !important; box-shadow: 0 10px 30px rgba(0,0,0,0.03) !important; }
.author-avatar img { width: 100px !important; height: 100px !important; border-radius: 50% !important; object-fit: cover !important; border: 4px solid #FFFFFF !important; box-shadow: 0 5px 15px rgba(0,0,0,0.1) !important; }
.author-info { flex-grow: 1 !important; }
.author-name { font-size: 22px !important; font-weight: 800 !important; color: #0F172A !important; margin: 0 0 5px 0 !important; }
.author-degrees { font-size: 15px !important; color: #475569 !important; margin: 0 0 15px 0 !important; line-height: 1.4 !important; }
.author-badge { display: inline-flex !important; align-items: center !important; gap: 6px !important; font-size: 12px !important; font-weight: 700 !important; color: #10B981 !important; background: #D1FAE5 !important; padding: 4px 12px !important; border-radius: 50px !important; letter-spacing: 0.5px !important; }

@media (max-width: 768px) {
    .header-content-inner { padding: 60px 20px 40px 20px !important; }
    .schpca-article-content, .schpca-article-footer { padding-left: 20px !important; padding-right: 20px !important; }
    .article-title { font-size: 32px !important; }
    .author-signature-card { flex-direction: column !important; text-align: center !important; gap: 15px !important; }
}

/* ==========================================================================
   HUB DE PUBLICACIONES SChPCA (DISEÑO PREMIUM)
   ========================================================================== */

.schpca-pubs-wrapper {
    width: 100% !important; max-width: 1200px !important; margin: 0 auto !important;
    padding: 60px 20px 100px 20px !important; font-family: var(--wp--preset--font-family--fontprimary), sans-serif !important;
}

/* Cabecera */
.pubs-header { text-align: center !important; margin-bottom: 70px !important; }
.pubs-main-title { font-size: 48px !important; color: #0F172A !important; font-weight: 800 !important; margin-bottom: 15px !important; text-shadow: 0 4px 20px rgba(0,0,0,0.05) !important;}
.pubs-subtitle { font-size: 18px !important; color: #64748B !important; max-width: 700px !important; margin: 0 auto !important; line-height: 1.6 !important; }

/* Títulos de Sección */
.pubs-section { margin-bottom: 80px !important; }
.section-title-wrap { display: flex !important; align-items: center !important; gap: 20px !important; margin-bottom: 40px !important; }
.section-title { font-size: 28px !important; font-weight: 700 !important; color: #1E293B !important; margin: 0 !important; white-space: nowrap !important; }
.title-line { height: 2px !important; width: 100% !important; background: linear-gradient(90deg, #E2E8F0 0%, rgba(226, 232, 240, 0) 100%) !important; }

/* ==========================================================================
   CARRUSEL DE REVISTAS (SCROLL HORIZONTAL PREMIUM)
   ========================================================================== */
.magazine-carousel-container { position: relative !important; width: 100% !important; padding: 20px 0 !important; }
.magazine-track { 
    display: flex !important; gap: 40px !important; overflow-x: auto !important; 
    scroll-snap-type: x mandatory !important; padding: 20px 40px !important; 
    scroll-behavior: smooth !important; -ms-overflow-style: none !important; scrollbar-width: none !important;
}
.magazine-track::-webkit-scrollbar { display: none !important; } /* Ocultar barra de scroll */

.mag-card { 
    flex: 0 0 280px !important; scroll-snap-align: center !important; 
    cursor: pointer !important; transition: all 0.4s ease !important;
}
.mag-cover-wrap { 
    position: relative !important; width: 100% !important; aspect-ratio: 1 / 1.4 !important; 
    border-radius: 12px !important; overflow: hidden !important; 
    box-shadow: 0 15px 35px rgba(0,0,0,0.1) !important; transition: transform 0.4s ease, box-shadow 0.4s ease !important;
}
.mag-cover { width: 100% !important; height: 100% !important; object-fit: cover !important; }

/* Efecto Hover sobre la Revista */
.mag-overlay { 
    position: absolute !important; inset: 0 !important; background: rgba(15,23,42,0.6) !important; 
    display: flex !important; align-items: center !important; justify-content: center !important; 
    opacity: 0 !important; backdrop-filter: blur(4px) !important; transition: opacity 0.3s ease !important;
}
.mag-card:hover .mag-cover-wrap { transform: translateY(-10px) scale(1.03) !important; box-shadow: 0 25px 50px rgba(14,165,233,0.2) !important; border: 2px solid #0EA5E9 !important;}
.mag-card:hover .mag-overlay { opacity: 1 !important; }
.read-btn { background: #0EA5E9 !important; color: white !important; padding: 10px 24px !important; border-radius: 50px !important; font-weight: 700 !important; font-size: 14px !important; box-shadow: 0 4px 15px rgba(0,0,0,0.3) !important; }
.mag-year { text-align: center !important; font-size: 18px !important; font-weight: 800 !important; color: #0F172A !important; margin-top: 20px !important; }

/* Botones de control */
.carousel-btn { 
    position: absolute !important; top: 45% !important; transform: translateY(-50%) !important; 
    width: 50px !important; height: 50px !important; border-radius: 50% !important; 
    background: #FFFFFF !important; border: 1px solid #E2E8F0 !important; box-shadow: 0 10px 20px rgba(0,0,0,0.1) !important;
    font-size: 20px !important; color: #0F172A !important; cursor: pointer !important; z-index: 10 !important; transition: 0.3s !important;
}
.carousel-btn:hover { background: #0EA5E9 !important; color: white !important; border-color: #0EA5E9 !important;}
.prev-btn { left: -20px !important; }
.next-btn { right: -20px !important; }

/* ==========================================================================
   BENTO GRID PARA PAPERS Y LIBROS
   ========================================================================== */
.pubs-bento-grid { 
    display: grid !important; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)) !important; gap: 30px !important; 
}
.pub-card { 
    background: #FFFFFF !important; border-radius: 20px !important; padding: 30px !important; 
    border: 1px solid #E2E8F0 !important; box-shadow: 0 10px 30px rgba(0,0,0,0.03) !important; 
    display: flex !important; flex-direction: column !important; transition: transform 0.3s, box-shadow 0.3s !important;
}
.pub-card:hover { transform: translateY(-5px) !important; box-shadow: 0 20px 40px rgba(0,0,0,0.08) !important; }

/* Variante Libro (Flex horizontal) */
.book-card { flex-direction: row !important; gap: 25px !important; grid-column: 1 / -1 !important; /* Ocupa toda la fila */ }
.book-cover-wrap { flex-shrink: 0 !important; width: 140px !important; }
.book-cover { width: 100% !important; border-radius: 8px !important; box-shadow: 0 10px 20px rgba(0,0,0,0.15) !important; }
.book-info { flex-grow: 1 !important; display: flex !important; flex-direction: column !important; justify-content: center !important; }
.book-review { font-size: 14px !important; color: #475569 !important; margin: 10px 0 !important; font-style: italic !important; }

/* Etiquetas y Contenido */
.pub-badge { display: inline-block !important; padding: 4px 12px !important; border-radius: 50px !important; font-size: 11px !important; font-weight: 800 !important; text-transform: uppercase !important; letter-spacing: 0.5px !important; margin-bottom: 15px !important; width: max-content !important;}
.oa-badge { background: #D1FAE5 !important; color: #059669 !important; }
.paywall-badge { background: #FEF3C7 !important; color: #D97706 !important; }
.book-badge { background: #E0F2FE !important; color: #0284C7 !important; }

.pub-journal-logo { margin-bottom: 20px !important; }
.journal-placeholder { font-family: serif !important; font-size: 20px !important; font-weight: bold !important; color: #334155 !important; border-bottom: 2px solid #CBD5E1 !important; padding-bottom: 5px !important;}

.pub-title { font-size: 20px !important; font-weight: 700 !important; color: #0F172A !important; line-height: 1.3 !important; margin: 0 0 10px 0 !important; }
.pub-authors { font-size: 14px !important; color: #0EA5E9 !important; font-weight: 600 !important; margin: 0 0 15px 0 !important; }
.pub-meta { font-size: 13px !important; color: #94A3B8 !important; border-top: 1px solid #F1F5F9 !important; padding-top: 15px !important; flex-grow: 1 !important; }

.pub-actions { display: flex !important; flex-wrap: wrap !important; align-items: center !important; gap: 15px !important; margin-top: 20px !important; }
.action-btn { display: flex !important; align-items: center !important; gap: 8px !important; padding: 10px 20px !important; border-radius: 50px !important; font-size: 14px !important; font-weight: 600 !important; text-decoration: none !important; cursor: pointer !important; transition: 0.3s !important; border: none !important; }
.read-action { background: #0EA5E9 !important; color: white !important; }
.read-action:hover { background: #0284C7 !important; }
.buy-action { background: #1E293B !important; color: white !important; }
.buy-action:hover { background: #0F172A !important; }
.store-action { background: #F59E0B !important; color: white !important; }
.action-link { font-size: 14px !important; color: #64748B !important; font-weight: 600 !important; text-decoration: none !important; transition: 0.3s !important; }
.action-link:hover { color: #0EA5E9 !important; }

/* ==========================================================================
   SISTEMA DE MODALES DE LECTURA (CINEMÁTICOS)
   ========================================================================== */
.reader-overlay { 
    display: none; position: fixed !important; inset: 0 !important; z-index: 9999999 !important; 
    background: #0F172A !important; flex-direction: column !important;
}
.reader-toolbar { 
    height: 60px !important; background: #1E293B !important; border-bottom: 1px solid #334155 !important;
    display: flex !important; align-items: center !important; justify-content: space-between !important; padding: 0 20px !important;
}
.reader-title { color: white !important; font-weight: 700 !important; font-size: 16px !important; }
.close-reader { background: none !important; border: none !important; color: #94A3B8 !important; font-size: 30px !important; cursor: pointer !important; transition: 0.3s !important; }
.close-reader:hover { color: white !important; }

.reader-content-area { flex-grow: 1 !important; position: relative !important; background: #334155 !important; }
.reader-content-area iframe { 
    width: 100% !important; 
    height: 100% !important; 
    border: none !important; 
    pointer-events: auto !important; 
}

/* ESTILOS ESPECÍFICOS DE SEGURIDAD PARA MODO PROTEGIDO */
.protected-mode .reader-warning { display: flex !important; align-items: center !important; gap: 8px !important; color: #FCD34D !important; font-size: 13px !important; font-weight: 600 !important; background: rgba(245, 158, 11, 0.1) !important; padding: 6px 15px !important; border-radius: 50px !important; }

/* Modo Público */
.public-actions { display: flex !important; gap: 15px !important; align-items: center !important; }
.download-btn { padding: 6px 16px !important; font-size: 13px !important; }

/* BLOQUEO DE IMPRESIÓN (SEGURIDAD CSS) */
@media print {
    body * { display: none !important; }
    body::after {
        content: "El contenido de la Revista SChPCA está protegido por derechos de autor y es exclusivo. No se permite su impresión ni descarga no autorizada." !important;
        display: block !important; font-size: 20px !important; text-align: center !important; margin-top: 20% !important;
    }
}

@media (max-width: 768px) {
    .book-card { flex-direction: column !important; }
    .book-cover-wrap { width: 100% !important; max-width: 200px !important; margin: 0 auto !important; }
    .reader-warning { display: none !important; /* Ocultar en móvil por espacio */ }
}

/* ==========================================================================
   ESTILOS PARA EL VISOR CINEMÁTICO (PDF.JS)
   ========================================================================== */
.custom-pdf-viewer {
    width: 100% !important;
    height: 100% !important;
    overflow-y: auto !important; /* Permite el scroll vertical */
    padding: 40px 20px !important;
    background-color: #0F172A !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    scroll-behavior: smooth !important;
}

.custom-pdf-viewer canvas {
    margin-bottom: 30px !important;
    max-width: 100% !important;
    height: auto !important; /* Mantiene la proporción en móviles */
    box-shadow: 0 20px 50px rgba(0,0,0,0.5) !important;
    border-radius: 4px !important;
    background: white !important; /* Por si el PDF tiene fondo transparente */
}

/* Spinner de carga elegante */
.pdf-loading-msg {
    color: #0EA5E9 !important;
    font-size: 18px !important;
    font-weight: 600 !important;
    margin-top: 20vh !important;
    animation: pulse 1.5s infinite ease-in-out !important;
}
@keyframes pulse { 0% {opacity: 0.5;} 50% {opacity: 1;} 100% {opacity: 0.5;} }

/* ==========================================================================
   SECCIÓN: PROPÓSITO Y MISIÓN SChPCA
   ========================================================================== */

.sp-mision-container {
    max-width: 1200px;
    margin: 0 auto;
    font-family: var(--wp--preset--font-family--fontprimary), sans-serif;
}

.sp-mision-header {
    text-align: center;
    margin-bottom: 60px;
}

.sp-intro {
    font-size: 18px;
    line-height: 1.7;
    color: #475569;
    max-width: 900px;
    margin: 0 auto 40px auto;
}

.sp-subtitle {
    font-size: 28px;
    color: #0F172A;
    font-weight: 700;
}

/* La Cuadrícula (Bento Grid) */
.sp-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

/* Tarjetas Individuales */
.sp-card {
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
    transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
    display: flex;
    flex-direction: column;
}

.sp-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 25px -5px rgba(14,165,233,0.1);
    border-color: #0EA5E9;
}

/* Contenedor de Imagen de la Tarjeta */
.sp-card-image {
    width: 100%;
    height: 220px;
    overflow: hidden;
}

.sp-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.sp-card:hover .sp-card-image img {
    transform: scale(1.05); /* Efecto zoom suave en la imagen al hacer hover */
}

/* Contenido de la Tarjeta */
.sp-card-content {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.sp-card-content h3 {
    font-size: 18px;
    color: #1E293B;
    margin-top: 0;
    margin-bottom: 12px;
    font-weight: 700;
    line-height: 1.3;
}

.sp-card-content p {
    font-size: 15px;
    color: #64748B;
    line-height: 1.6;
    margin: 0;
}

/* Clases para la animación de Scroll */
.hidden-reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease-out, transform 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.hidden-reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Botón de volver */
.sp-mision-footer {
    text-align: center;
    margin-top: 40px;
}

.sp-btn-back {
    display: inline-block;
    background-color: #0EA5E9;
    color: #FFFFFF;
    padding: 12px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.3s ease;
}

.sp-btn-back:hover {
    background-color: #0284C7;
    color: #FFFFFF;
}

/* ==========================================================================
   PÁGINA DE CONTACTO Y MODAL SChPCA
   ========================================================================== */
.sp-contact-container { max-width: 1200px; margin: 60px auto; padding: 0 20px; font-family: var(--wp--preset--font-family--fontprimary), sans-serif; }
.sp-contact-wrapper { display: flex; flex-wrap: wrap; gap: 50px; }

/* Columna Izquierda */
.sp-contact-info { flex: 1; min-width: 300px; }
.sp-contact-title { font-size: 42px; color: #0F172A; font-weight: 800; margin-bottom: 20px; line-height: 1.2; }
.sp-contact-intro { font-size: 18px; color: #475569; line-height: 1.6; margin-bottom: 30px; }
.sp-contact-image-box { border-radius: 20px; overflow: hidden; margin-bottom: 40px; box-shadow: 0 10px 30px rgba(0,0,0,0.08); }
.sp-contact-image-box img { width: 100%; height: 250px; object-fit: cover; transition: transform 0.5s; }
.sp-contact-image-box:hover img { transform: scale(1.05); }

.sp-contact-reasons h3 { font-size: 22px; color: #1E293B; margin-bottom: 20px; }
.sp-contact-reasons ul { list-style: none; padding: 0; margin: 0; }
.sp-contact-reasons li { font-size: 16px; color: #475569; margin-bottom: 15px; display: flex; align-items: flex-start; line-height: 1.5; }
.reason-icon { font-size: 20px; margin-right: 12px; }

/* Columna Derecha (Formulario) */
.sp-contact-form-box { flex: 1; min-width: 300px; }
.form-card { background: #FFFFFF; border: 1px solid #E2E8F0; border-radius: 24px; padding: 40px; box-shadow: 0 20px 40px rgba(15, 23, 42, 0.05); }
.form-card h2 { margin-top: 0; color: #0F172A; font-size: 28px; }
.form-card p { color: #64748B; margin-bottom: 30px; font-size: 15px; }

.sp-alert { padding: 15px 20px; border-radius: 8px; margin-bottom: 25px; font-size: 14px; font-weight: 600; }
.sp-alert.error { background: #FEE2E2; color: #991B1B; border: 1px solid #FECACA; }

/* Etiquetas Flotantes */
.sp-input-group { position: relative; margin-bottom: 25px; }
.sp-input-group input, .sp-input-group textarea {
    width: 100%; padding: 18px 20px 10px; background: #F8FAFC; border: 2px solid transparent;
    border-radius: 12px; font-size: 16px; color: #1E293B; transition: all 0.3s; font-family: inherit; box-sizing: border-box;
}
.sp-input-group input:focus, .sp-input-group textarea:focus { border-color: #0EA5E9; background: #FFFFFF; outline: none; }
.sp-input-group label { position: absolute; top: 16px; left: 20px; font-size: 16px; color: #94A3B8; pointer-events: none; transition: all 0.2s ease-out; }

.sp-input-group input:focus + label, .sp-input-group input:not(:placeholder-shown) + label,
.sp-input-group textarea:focus + label, .sp-input-group textarea:not(:placeholder-shown) + label {
    top: 6px; font-size: 11px; color: #0EA5E9; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px;
}

.sp-submit-btn { width: 100%; background: #0EA5E9; color: #FFFFFF; border: none; padding: 16px; border-radius: 12px; font-size: 16px; font-weight: 700; cursor: pointer; transition: all 0.3s; }
.sp-submit-btn:hover { background: #0284C7; transform: translateY(-2px); box-shadow: 0 10px 20px rgba(14, 165, 233, 0.2); }
.sp-submit-btn:disabled { background: #94A3B8; cursor: not-allowed; transform: none; box-shadow: none; }

/* --- DISEÑO DEL MODAL PREMIUM --- */
.sp-modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(15, 23, 42, 0.6); backdrop-filter: blur(8px);
    z-index: 99999; display: flex; align-items: center; justify-content: center;
    opacity: 0; visibility: hidden; transition: all 0.4s ease;
}
.sp-modal-overlay.active { opacity: 1; visibility: visible; }

.sp-modal-box {
    background: #FFFFFF; border-radius: 24px; padding: 40px; max-width: 480px; width: 90%;
    text-align: center; box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.3);
    transform: translateY(30px) scale(0.95); transition: all 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
}
.sp-modal-overlay.active .sp-modal-box { transform: translateY(0) scale(1); }

.sp-modal-icon {
    width: 80px; height: 80px; background: #DCFCE7; color: #16A34A;
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    margin: 0 auto 25px;
}
.sp-modal-icon svg { width: 40px; height: 40px; }
.sp-modal-box h2 { color: #0F172A; font-size: 26px; margin-bottom: 15px; font-weight: 800; }
.sp-modal-box p { color: #475569; font-size: 16px; line-height: 1.6; margin-bottom: 35px; }

.sp-modal-close-btn {
    background: #0EA5E9; color: #fff; border: none; padding: 15px 30px;
    border-radius: 12px; font-size: 16px; font-weight: 700; cursor: pointer;
    transition: background 0.3s; width: 100%;
}
.sp-modal-close-btn:hover { background: #0284C7; }

@media (max-width: 768px) { .sp-contact-wrapper { flex-direction: column; gap: 30px; } .form-card { padding: 25px; } }