
/* ========================================= */
/* 1. Variables y Reset Global               */
/* PALETA: AZUL INSTITUCIONAL y DORADO    */
/* ========================================= */
:root {
    /* Altura aproximada del header para compensar contenido fijo */
    --header-height: 72px;
    /* Paleta UNACH (Azul y Dorado) */
    --color-unach-blue: #003366; /* Nuevo Primario Azul */
    --color-unach-dark: #001f3f; /* Nuevo Azul Oscuro para fondo */
    --color-accent-gold: #FFC72C; /* Nuevo Acento Dorado/CTA */
    --color-accent-gold-hover: #e5b428; /* Dorado para hover */
    
    /* Neutros */
    --color-white: #ffffff;
    --color-off-white: #f9f9f9;
    --color-gray-dark: #333333;
    --color-gray-medium: #666666;

    /* Tipografía - Plus Jakarta Sans (Estilo Startup/Tecnológico) */
    --font-primary: 'Plus Jakarta Sans', sans-serif;
    --font-secondary: 'Plus Jakarta Sans', sans-serif;
    
    /* Espaciado */
    --spacing-section: 8vw;
    --spacing-xl: 4rem;
    --spacing-lg: 2rem;
    --spacing-md: 1.5rem;
    --spacing-sm: 1rem;
    
    scroll-behavior: smooth;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-primary);
    color: var(--color-gray-dark);
    background-color: var(--color-off-white);
    line-height: 1.6;
    /* Evita que el contenido inicial quede oculto bajo el header fijo */
    padding-top: var(--header-height);
}

a {
    text-decoration: none;
    color: var(--color-accent-gold);
    transition: color 0.3s ease;
}

a:hover {
    color: var(--color-accent-gold-hover);
}

/* Contenedor principal de contenido */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* Títulos de sección */
.section-heading {
    font-size: clamp(1.8rem, 5vw, 3rem);
    font-weight: 800;
    margin-bottom: var(--spacing-lg);
    text-align: center;
    line-height: 1.1;
    font-family: var(--font-primary); /* Usando Inter */
}

/* Botón CTA general */
.cta-button {
    display: inline-block;
    padding: 0.8rem 2rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    /* Usando Dorado para CTAs */
    border: 2px solid var(--color-accent-gold);
    background-color: var(--color-accent-gold);
    color: var(--color-unach-dark); /* Texto oscuro sobre dorado */
    box-shadow: 0 6px 15px rgba(255, 199, 44, 0.5);
}

.cta-button:hover {
    transform: translateY(-3px) scale(1.02);
    background-color: var(--color-accent-gold-hover);
    border-color: var(--color-accent-gold-hover);
    color: var(--color-unach-dark); /* FIX: El texto NO cambia de color */
    box-shadow: 0 10px 20px rgba(255, 199, 44, 0.6);
}

/* Clase para todas las secciones */
.section-base {
    padding: var(--spacing-section) 0;
    overflow: hidden; /* Necesario para ocultar elementos fuera de vista */
}


/* ========================================= */
/* Modal Slide Out para Competencias (pantalla completa) */
/* ========================================= */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    display: none;
    z-index: 1500;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.modal-overlay.open {
    display: block;
    opacity: 1;
}

.modal {
    position: fixed;
    top: 0;
    right: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(135deg, var(--color-white) 0%, #f8f9fa 100%);
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    overflow-y: auto;
    padding: 0;
    display: flex;
    flex-direction: column;
    box-shadow: -10px 0 50px rgba(0,0,0,0.3);
}

.modal-overlay.open .modal {
    transform: translateX(0);
}

/* ========================================= */
/* Modal Original para Videos y Noticias (centrado) */
/* ========================================= */
#videoModal.modal-overlay,
.news-modal.modal-overlay {
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: none;
    place-items: center;
    opacity: 0;
    transition: opacity 0.4s ease;
}

#videoModal.modal-overlay.open,
.news-modal.modal-overlay.open {
    display: grid;
    opacity: 1;
}

#videoModal .modal,
.news-modal .modal {
    position: relative;
    width: min(720px, 90vw);
    max-height: min(80vh, 800px);
    overflow: auto;
    background: linear-gradient(145deg, var(--color-white), #f6f7f9);
    border: 1px solid #e9e9ee;
    border-radius: 14px;
    box-shadow: 0 30px 60px rgba(0,0,0,0.18);
    padding: var(--spacing-lg);
    color: var(--color-gray-dark);
    transform: translateY(6px) scale(0.96);
    opacity: 0;
    animation: modalPopIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
}

#videoModal.modal-overlay.open .modal,
.news-modal.modal-overlay.open .modal {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.modal::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at top right, rgba(255,199,44,0.1) 0%, transparent 50%),
                radial-gradient(ellipse at bottom left, rgba(0,51,102,0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: 1;
}

/* Header para modal de competencias (slide out) */
.modal-header {
    position: sticky;
    top: 0;
    background: linear-gradient(135deg, var(--color-white) 0%, #f8f9fa 100%);
    padding: 2rem 3rem 1rem;
    border-bottom: 2px solid rgba(0,51,102,0.1);
    display: flex;
    align-items: center;
    gap: 1rem;
    z-index: 10;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* Header para modales de video y noticias (centrado) */
#videoModal .modal-header,
.news-modal .modal-header {
    position: relative;
    padding: 0;
    border-bottom: none;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    margin-bottom: var(--spacing-sm);
}

.modal-icon { 
    font-size: 2.5rem; 
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

/* Título para modal de competencias (slide out) */
.modal-title {
    font-weight: 900;
    font-size: clamp(1.8rem, 4vw, 3rem);
    color: var(--color-unach-dark);
    line-height: 1.2;
    flex: 1;
}

/* Título para modales de video y noticias (centrado) */
#videoModal .modal-title,
.news-modal .modal-title {
    font-weight: 800;
    font-size: 1.2rem;
    color: var(--color-unach-dark);
}

/* Botón cerrar para modal de competencias (slide out) */
.modal-close {
    position: absolute;
    top: 2rem;
    right: 3rem;
    background: rgba(255,255,255,0.9);
    border: 2px solid var(--color-unach-blue);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    font-size: 2rem;
    cursor: pointer;
    color: var(--color-unach-blue);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    z-index: 11;
}

.modal-close:hover { 
    background: var(--color-unach-blue);
    color: white;
    transform: scale(1.1) rotate(90deg);
    box-shadow: 0 6px 25px rgba(0,51,102,0.3);
}

/* Botón cerrar para modales de video y noticias (centrado) */
#videoModal .modal-close,
.news-modal .modal-close {
    position: absolute;
    top: 10px;
    right: 12px;
    background: transparent;
    border: 0;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--color-gray-medium);
    transition: transform .2s ease, color .2s ease;
    width: auto;
    height: auto;
    border-radius: 0;
    box-shadow: none;
}

#videoModal .modal-close:hover,
.news-modal .modal-close:hover { 
    transform: rotate(90deg) scale(1.05); 
    color: var(--color-unach-blue);
    background: transparent;
}

/* Modal body para competencias (slide out) */
.modal-body {
    flex: 1;
    padding: 2rem 3rem 4rem;
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--color-gray-dark);
    position: relative;
    z-index: 2;
}

.modal-body p { 
    margin-bottom: 1.5rem; 
    text-align: justify;
}

.modal-body ul { 
    padding-left: 1.5rem; 
    margin-bottom: 1.5rem;
}

.modal-body li { 
    margin: 0.5rem 0; 
}

.modal-body img {
    width: 100%;
    max-width: 800px;
    height: auto;
    border-radius: 16px;
    margin: 2rem auto;
    display: block;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    object-fit: cover;
}

/* Modal body para videos y noticias (centrado) */
#videoModal .modal-body,
.news-modal .modal-body {
    flex: none;
    padding: 0;
    font-size: 1rem;
    line-height: 1.7;
}

#videoModal .modal-body p,
.news-modal .modal-body p { 
    margin-bottom: 0.5rem; 
    text-align: left;
}

#videoModal .modal-body ul,
.news-modal .modal-body ul { 
    padding-left: 1.1rem; 
    margin-bottom: 1rem;
}

#videoModal .modal-body li,
.news-modal .modal-body li { 
    margin: 0.25rem 0; 
}

#videoModal .modal-body img,
.news-modal .modal-body img {
    width: 100%;
    max-width: none;
    height: auto;
    border-radius: 10px;
    margin: 0.75rem 0;
    display: block;
    box-shadow: none;
    object-fit: cover;
}

/* Animaciones para modal de competencias (slide out) */
@keyframes slideInFromRight {
    from { 
        opacity: 0; 
        transform: translateX(100%); 
    }
    to { 
        opacity: 1; 
        transform: translateX(0); 
    }
}

@keyframes slideOutToRight {
    from { 
        opacity: 1; 
        transform: translateX(0); 
    }
    to { 
        opacity: 0; 
        transform: translateX(100%); 
    }
}

/* Animaciones originales para modales de video y noticias */
@keyframes modalPopIn {
    from { opacity: 0; transform: translateY(10px) scale(0.96); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes modalPopOut {
    from { opacity: 1; transform: translateY(0) scale(1); }
    to   { opacity: 0; transform: translateY(10px) scale(0.96); }
}

@keyframes modalFadeIn { 
    from { opacity: 0; } 
    to { opacity: 1; } 
}

@keyframes modalFadeOut { 
    from { opacity: 1; } 
    to { opacity: 0; } 
}

body.modal-open { 
    overflow: hidden; 
    padding-right: 0; /* Evita el scroll jump */
}

/* Responsive para móviles */
@media (max-width: 768px) {
    .modal-header {
        padding: 1.5rem 1.5rem 1rem;
    }
    
    .modal-title {
        font-size: 1.6rem;
    }
    
    .modal-close {
        top: 1.5rem;
        right: 1.5rem;
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
    
    .modal-body {
        padding: 1.5rem 1.5rem 3rem;
        font-size: 1rem;
    }
    
    .modal-icon {
        font-size: 2rem;
    }
}

/* Scrollbar personalizada para el modal */
.modal::-webkit-scrollbar {
    width: 8px;
}

.modal::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.05);
}

.modal::-webkit-scrollbar-thumb {
    background: var(--color-unach-blue);
    border-radius: 4px;
}

.modal::-webkit-scrollbar-thumb:hover {
    background: var(--color-unach-dark);
}


/* ========================================= */
/* 2. Header y Navegación                    */
/* ========================================= */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: linear-gradient(145deg, #0a2540 0%, #001e3c 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 1rem 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Header con efecto glassmorphism al hacer scroll */
.header.scrolled {
    background: linear-gradient(145deg, rgba(10, 37, 64, 0.85) 0%, rgba(0, 30, 60, 0.85) 100%);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    padding: 0.75rem 0;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        0 0 0 1px rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.header .container {
    padding: 0; /* Eliminar el padding para que el logo esté más a la izquierda */
}



.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-left: max(1.25rem, calc(5vw + env(safe-area-inset-left))); /* Mínimo 20px en móvil */
    padding-right: max(1.25rem, calc(5vw + env(safe-area-inset-right)));
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.05em;
    transition: all 0.4s ease;
    display: flex;
    align-items: center;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

@keyframes fadeInLogo {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.logo img {
    max-height: 40px;
    transition: all 0.4s ease;
    animation: fadeInLogo 0.8s ease-out;
    filter: brightness(1.1);
}

.header.scrolled .logo img {
    max-height: 35px;
}

.nav-menu {
    /* Mobile-first: menú off-canvas por defecto */
    position: fixed;
    top: 0;
    right: 0;
    width: 75%;
    max-width: 320px;
    height: 100vh;
    background-color: var(--color-unach-dark);
    list-style: none;
    display: flex;
    flex-direction: column;
    padding-top: 5rem;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.77, 0, 0.175, 1);
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.2);
}

.nav-menu a {
    color: var(--color-white);
    font-weight: 300; /* Tipografía más ligera */
    padding: 1rem 1.5rem;
    position: relative;
    display: block;
    transition: color 0.3s ease, padding 0.4s ease;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--color-accent-gold);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.nav-menu a:hover::after,
.nav-menu a.active::after {
    transform: scaleX(1);
}

/* Menú Hamburguesa - visible en móvil por defecto */
.hamburger {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
    width: 26px;
    height: 20px;
    position: relative;
    z-index: 1100;
    margin-right: 8px;
}

.hamburger span {
    display: block;
    width: 100%;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    transition: all 0.3s ease-in-out;
    transform-origin: center;
}

/* Animación Menú Abierto */
.hamburger.nav-open span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.hamburger.nav-open span:nth-child(2) {
    opacity: 0;
}

.hamburger.nav-open span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

.news-card:hover {
        box-shadow: 0 12px 32px rgba(0,0,0,0.18);
        transform: translateY(-4px) scale(1.025);
        border-color: var(--color-accent-gold);
        z-index: 2;
    }
    .news-card .news-card-image, .news-card .news-cover {
        border-top-left-radius: 1.5rem;
        border-top-right-radius: 1.5rem;
        object-fit: cover;
        height: 200px; /* Altura fija para la imagen */
        width: 100%;
        flex-shrink: 0;
    }
    .news-card-content {
        font-size: 1.08rem;
        line-height: 1.6;
        letter-spacing: 0.01em;
        font-family: 'Segoe UI', 'Inter', Arial, sans-serif;
        padding: var(--spacing-md);
        position: relative;
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }
    .news-card-content h4, .news-card .news-title {
        font-size: 1.25rem;
        font-weight: 700;
        margin: 0.35rem 1.2rem 0.2rem 1.2rem;
        color: #101010;
        letter-spacing: 0.01em;
    }
    .news-card-content p, .news-card .news-summary {
        margin: 0 1.2rem 1.1rem 1.2rem;
        color: #444;
        font-size: 1.01rem;
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
        line-height: 1.4;
        min-height: 4.2rem; /* 3 lines * 1.4 line-height */
    }
    .news-date {
        margin: 0 1.2rem 0.35rem 1.2rem;
        color: #6b6b6b;
        font-size: 0.82rem;
        font-weight: 600;
        letter-spacing: 0.02em;
    }
    .news-category {
        margin: 0 1.2rem 0.45rem 1.2rem;
        color: #7a7a7a;
        font-size: 0.74rem;
        text-transform: uppercase;
        letter-spacing: 0.08em;
        font-weight: 600;
    }
    .news-summary {
        margin: 0 1.2rem 1rem 1.2rem;
        color: #5a5a5a;
        font-size: 0.96rem;
        line-height: 1.35;
    }
    .news-more {
        margin: auto 1.2rem 0.85rem 1.2rem;
        font-size: 0.9rem;
        font-weight: 700;
        color: #003366;
        text-align: right;
        letter-spacing: 0.01em;
        background: rgba(0, 51, 102, 0.06);
        padding: 4px 8px;
        border-radius: 4px;
        display: inline-block;
    }
    .news-card:hover .news-more {
        text-decoration: underline;
    }
    .news-card .news-date, .news-card .news-date-badge {
        margin: 0 1.2rem 0.7rem 1.2rem;
        color: #888;
        font-size: 0.98rem;
    }


/* Estado abierto del menú en móvil */
.nav-menu.nav-open {
    transform: translateX(0);
}

/* Desktop: restablecer menú horizontal */
@media (min-width: 900px) {
    .nav-menu {
        position: static;
        width: auto;
        max-width: none;
        height: auto;
        background-color: transparent;
        box-shadow: none;
        transform: none;
        padding-top: 0;
        flex-direction: row;
        gap: 0;
    }

    .nav-menu li {
        width: auto;
        border-bottom: none;
    }

    .nav-menu a {
        padding: 0.5rem 1rem;
        display: inline-block;
    }

    .nav-menu a::after {
        height: 2px;
        transform: scaleX(0);
        transform-origin: center;
    }

    .hamburger {
        display: none;
    }
}


/* ========================================= */
/* 3. Sección Hero (Inicio) - ACTUALIZADA    */
/* ========================================= */
#inicio {
    /* Imagen de fondo profesional */
    background-image: url('https://images.unsplash.com/photo-1522202176988-66273c2fd55f?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3w0NTUyMzh8MHwxfHNlYXJjaHwxfHxzdHVkZW50JTIwZW50cmVwcmVuZXVyc3xlbnwwfHx8fDE3MjU0Nzg2NjR8MA&ixlib=rb-4.0.3&q=80&w=1080');
    background-size: cover;
    background-position: center;
    color: var(--color-white);
    min-height: 85vh;
    display: flex;
    /* Alinea los items al inicio (izquierda) en el eje transversal */
    align-items: center; 
    /* Flex-start para alinear el contenido a la izquierda */
    text-align: left; 
    position: relative;
    padding-top: 4rem; 
    padding-bottom: 2rem;
}

/* Overlay con color #002855 y transparencia para mantener visible la imagen de fondo */
#inicio::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Color #002855 con transparencia (RGB: 0, 40, 85) */
    background: rgba(0, 40, 85, 0.92); /* #002855 con 92% de opacidad */
    z-index: 1;
}

#inicio .container {
    position: relative;
    z-index: 3;
    /* Mobile-first: ocupa más ancho en pantallas pequeñas */
    max-width: 90vw;
    margin-right: auto;
    margin-left: 5vw;
    padding-left: var(--spacing-md);
}

@media (min-width: 900px) {
    #inicio .container {
        /* En escritorio, limitar ancho para no invadir el área de la imagen */
        max-width: 600px;
    }
}

.hero-title {
    font-size: clamp(2.5rem, 8vw, 5rem);
    font-weight: 900;
    margin-bottom: 1rem;
    line-height: 1.1;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    font-family: var(--font-primary); /* Usando Inter */
}

.hero-idea-gradient {
    font-size: 0.7em;
    display: block;
    background: linear-gradient(90deg, 
        #4A90E2 0%, 
        #5B9BD5 40%,
        #20B2AA 60%,
        #40E0D0 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
    line-height: 1.4;
    padding-bottom: 0.1em;
    overflow: visible;
    cursor: pointer;
    transition: all 0.3s ease;
}

.hero-idea-gradient:hover {
    filter: brightness(1.4) drop-shadow(0 0 15px rgba(64, 224, 208, 0.8));
    transform: scale(1.02);
}

.hero-subtitle {
    font-size: clamp(1rem, 3vw, 1.5rem);
    font-weight: 300;
    margin-bottom: var(--spacing-xl);
    max-width: 600px; /* Limita el ancho del subtítulo también */
    /* Removidas las propiedades margin-left y margin-right para centrar, ahora es left-aligned */
    margin-left: 0; 
    margin-right: auto; 
    font-family: var(--font-primary); /* Usando Inter */
}

/* Mobile-first: ocultar imagen decorativa en pantallas pequeñas */
.hero-image {
    display: none;
}

@media (min-width: 900px) {
    .hero-image {
        display: block;
        position: absolute;
        bottom: 0;
        right: 5vw;
        width: 600px;
        opacity: 0;
        transform: translateX(100%);
        transition: opacity 0.8s ease-out, transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
        z-index: 2; /* Debajo del texto del contenedor (z-index:3) */
    }
}

.hero-image.visible {
    opacity: 1;
    transform: translateX(0); /* Vuelve a su posición original */
}


/* ========================================= */
/* 4. Animación al Scroll (Intersection Observer) */
/* ========================================= */
/* FIX: White text for blue sections */
/* ========================================= */
#sobre-club[style*="background: var(--color-unach-dark)"] .sobre-text p {
    color: var(--color-white) !important;
}

.sobre-text p {
    text-align: justify;
}

/* Clase inicial de ocultación */
.reveal-item {
    opacity: 0;
    transform: translateY(40px) scale(0.95);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
    will-change: opacity, transform;
}

/* Clase activa (añadida por JS) */
.reveal-item.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Retraso en la animación para elementos secuenciales */
.reveal-item:nth-child(2) { transition-delay: 0.1s; }
.reveal-item:nth-child(3) { transition-delay: 0.2s; }
.reveal-item:nth-child(4) { transition-delay: 0.3s; }

/* Aplicar retraso dentro de contenedores */
.card-grid .reveal-item { transition-delay: 0s; }
.card-grid .reveal-item:nth-child(2) { transition-delay: 0.2s; }
.card-grid .reveal-item:nth-child(3) { transition-delay: 0.4s; }

/* Retrasos específicos para la sección de sedes afiliadas */
.acordeon-container .acordeon-item { 
    opacity: 0; 
    transform: translateY(20px); 
    transition: opacity 0.6s ease, transform 0.6s ease; 
}

.acordeon-container .acordeon-item:nth-child(1) { transition-delay: 0.1s; }
.acordeon-container .acordeon-item:nth-child(2) { transition-delay: 0.15s; }
.acordeon-container .acordeon-item:nth-child(3) { transition-delay: 0.2s; }
.acordeon-container .acordeon-item:nth-child(4) { transition-delay: 0.25s; }
.acordeon-container .acordeon-item:nth-child(5) { transition-delay: 0.3s; }
.acordeon-container .acordeon-item:nth-child(6) { transition-delay: 0.35s; }
.acordeon-container .acordeon-item:nth-child(7) { transition-delay: 0.4s; }
.acordeon-container .acordeon-item:nth-child(8) { transition-delay: 0.45s; }
.acordeon-container .acordeon-item:nth-child(9) { transition-delay: 0.5s; }
.acordeon-container .acordeon-item:nth-child(10) { transition-delay: 0.55s; }
.acordeon-container .acordeon-item:nth-child(11) { transition-delay: 0.6s; }
.acordeon-container .acordeon-item:nth-child(12) { transition-delay: 0.65s; }
.acordeon-container .acordeon-item:nth-child(13) { transition-delay: 0.7s; }
.acordeon-container .acordeon-item:nth-child(14) { transition-delay: 0.75s; }
.acordeon-container .acordeon-item:nth-child(15) { transition-delay: 0.8s; }
.acordeon-container .acordeon-item:nth-child(16) { transition-delay: 0.85s; }
.acordeon-container .acordeon-item:nth-child(17) { transition-delay: 0.9s; }
.acordeon-container .acordeon-item:nth-child(18) { transition-delay: 0.95s; }
.acordeon-container .acordeon-item:nth-child(19) { transition-delay: 1s; }
.acordeon-container .acordeon-item:nth-child(20) { transition-delay: 1.05s; }
.acordeon-container .acordeon-item:nth-child(21) { transition-delay: 1.1s; }
.acordeon-container .acordeon-item:nth-child(22) { transition-delay: 1.15s; }

/* Cuando el contenedor es visible, mostrar los elementos del acordeón */
.acordeon-container.visible .acordeon-item {
    opacity: 1;
    transform: translateY(0);
}


/* ========================================= */
/* 5. Sección ¿Quiénes somos?                */
/* ========================================= */
#quienes-somos {
    background-color: var(--color-off-white);
}

.vision-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-xl);
    text-align: center;
    margin-top: var(--spacing-xl);
}

.vision-card {
    position: relative;
    height: 320px;
    perspective: 1500px;
    cursor: pointer;
    transition: all 0.4s ease;
}

.vision-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
}

.vision-card:hover .vision-card-inner {
    transform: rotateY(180deg);
}

.vision-card-front,
.vision-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    border-radius: 20px;
    overflow: hidden;
}

.vision-card-front {
    background: linear-gradient(145deg, #0a2540 0%, #001e3c 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    text-align: center;
}

.vision-card-back {
    background: linear-gradient(145deg, #001e3c 0%, #0a2540 100%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 
        0 15px 40px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    transform: rotateY(180deg);
    padding: 2rem;
    overflow-y: auto;
}

.vision-content-scroll {
    height: 100%;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.vision-content-scroll::-webkit-scrollbar {
    width: 4px;
}

.vision-content-scroll::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 2px;
}

.vision-content-scroll::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
}

.vision-content-scroll::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

.vision-card-bg {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.05) 0%, transparent 70%);
    opacity: 0;
    transition: all 0.6s ease;
    pointer-events: none;
    z-index: 0;
}

.vision-card:hover .vision-card-bg {
    opacity: 1;
    animation: rotateGlow 6s linear infinite;
}

.vision-icon-wrapper {
    width: 110px;
    height: 110px;
    margin: 0 auto 1.5rem;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vision-icon-wrapper::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,0.15) 0%, transparent 70%);
    transition: all 0.4s ease;
}

.vision-card:hover .vision-icon-wrapper::before {
    transform: scale(1.4);
    opacity: 0.6;
}

.vision-icon {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, rgba(255,255,255,0.15) 0%, rgba(255,255,255,0.05) 100%);
    border-radius: 50%;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    transition: all 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    position: relative;
    z-index: 2;
    box-shadow: 
        0 10px 25px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.vision-icon svg {
    width: 56px;
    height: 56px;
    transition: all 0.6s ease;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.3));
}

.vision-card:hover .vision-icon {
    transform: scale(1.15) rotate(360deg);
}

.vision-card-1:hover .vision-icon {
    background: linear-gradient(145deg, rgba(66,165,245,0.25) 0%, rgba(100,181,246,0.15) 100%);
    border-color: rgba(66,165,245,0.6);
    box-shadow: 
        0 15px 35px rgba(66,165,245,0.5),
        inset 0 2px 0 rgba(66,165,245,0.4);
}

.vision-card-2:hover .vision-icon {
    background: linear-gradient(145deg, rgba(255,202,40,0.25) 0%, rgba(255,213,79,0.15) 100%);
    border-color: rgba(255,202,40,0.6);
    box-shadow: 
        0 15px 35px rgba(255,202,40,0.5),
        inset 0 2px 0 rgba(255,202,40,0.4);
}

.vision-card-3:hover .vision-icon {
    background: linear-gradient(145deg, rgba(102,187,106,0.25) 0%, rgba(129,199,132,0.15) 100%);
    border-color: rgba(102,187,106,0.6);
    box-shadow: 
        0 15px 35px rgba(102,187,106,0.5),
        inset 0 2px 0 rgba(102,187,106,0.4);
}

.vision-card-front h3 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
}

        .news-card-content::after {
            opacity: 1 !important;
            font-size: 0.7rem;
            padding: 3px 6px;
        }
.vision-hint {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    font-style: italic;
    margin-top: 0.5rem;
}

.vision-card-back p,
.valores-list {
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.7;
    font-size: 0.95rem;
    text-align: left;
}

.valores-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.valores-list li {
    margin-bottom: 1rem;
    padding-left: 1.2rem;
    position: relative;
}

.valores-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #81C784;
    font-weight: bold;
    font-size: 1.1rem;
}

.valores-list strong {
    color: #81C784;
    display: block;
    margin-bottom: 0.3rem;
}

/* Color blanco para los títulos "Valores" */
.vision-card-front h3,
.vision-card-back h3 {
    color: #ffffff !important;
}

@media (max-width: 768px) {
    .vision-card {
        height: 280px;
    }
    
    .vision-icon-wrapper {
        width: 90px;
        height: 90px;
    }
    
    .vision-icon {
        width: 70px;
        height: 70px;
    }
    
    .vision-icon svg {
        width: 48px;
        height: 48px;
    }
    
    .vision-card-front h3 {
        font-size: 1.5rem;
    }
    
    .vision-card-back h3 {
        font-size: 1.3rem;
    }
}


/* ========================================= */
/* 6. Sección Competencias                   */
/* ========================================= */
#competencias {
    background-color: var(--color-white);
    color: var(--color-gray-dark);
}

#competencias .section-heading {
    color: var(--color-unach-dark);
}

#competencias > .container > p {
    color: var(--color-gray-dark);
}

.competencias-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-lg);
    margin-top: var(--spacing-xl);
}

.competencia-card {
    background: var(--color-white);
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.08),
        0 1px 3px rgba(0, 0, 0, 0.05);
    padding: 0;
    border-radius: 24px;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    cursor: pointer;
    color: var(--color-gray-dark);
    transform-style: preserve-3d;
}

.competencia-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.5), rgba(255,255,255,0));
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: 1;
    pointer-events: none;
}

.competencia-card:hover {
    transform: translateY(-12px) scale(1.02) rotateX(2deg);
    box-shadow: 
        0 30px 60px rgba(0, 0, 0, 0.15),
        0 5px 15px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.competencia-card:hover::before {
    opacity: 1;
}

/* Estilo portfolio: imagen + caption */
.portfolio-card .card-image { 
    display: block; 
    width: 100%; 
    height: 320px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative; 
    overflow: hidden; 
}

.portfolio-card .card-image img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    display: block; 
    transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    filter: brightness(0.95) contrast(1.05);
}

.portfolio-card .card-overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 30% 30%, rgba(255,255,255,0.2), transparent 50%),
        linear-gradient(135deg, rgba(0,51,102,0.4), rgba(0,102,204,0.6));
    opacity: 0;
    transform: scale(1.1);
    transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    backdrop-filter: blur(0px);
}

.portfolio-card:hover .card-overlay,
.portfolio-card:focus-within .card-overlay { 
    opacity: 1; 
    transform: scale(1); 
    backdrop-filter: blur(4px);
}

.portfolio-card:hover .card-image img,
.portfolio-card:focus-within .card-image img { 
    transform: scale(1.08) rotate(1deg);
    filter: brightness(1.1) contrast(1.1);
}

/* Badge moderno en la esquina */
.card-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    color: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    z-index: 2;
    backdrop-filter: blur(10px);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    animation: badgePulse 3s ease-in-out infinite;
}

@keyframes badgePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.portfolio-card .card-caption { 
    padding: 1.8rem 1.5rem; 
    text-align: center; 
    border-top: none;
    background: linear-gradient(to bottom, #ffffff, #fafbfc);
    position: relative;
}

.portfolio-card .card-caption::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--color-unach-blue), transparent);
    border-radius: 2px;
}

.portfolio-card .card-caption .card-sub { 
    color: var(--color-gray-medium); 
    font-style: italic; 
    font-size: 0.95rem; 
}

.competencia-card h4 {
    color: var(--color-unach-blue);
    font-size: 1.3rem;
    font-weight: 800;
    margin-bottom: 0.25rem;
    transition: all 0.4s ease;
    position: relative;
    display: inline-block;
}

/* Títulos con gradientes animados */
.gradient-title {
    background: linear-gradient(135deg, var(--color-unach-blue), #42A5F5);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 200% 200%;
    animation: gradientFlow 4s ease infinite;
    position: relative;
    display: inline-block;
}

.gradient-title[data-gradient="gold"] {
    color: #FFA726;
}

.gradient-title[data-gradient="blue"] {
    color: #42A5F5;
}

.gradient-title[data-gradient="green"] {
    color: #66BB6A;
}

.gradient-title[data-gradient="orange"] {
    color: #FF5722;
}

.gradient-title[data-gradient="purple"] {
    color: #9C27B0;
}

.gradient-title[data-gradient="teal"] {
    color: #26A69A;
}

@keyframes gradientFlow {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.competencia-card:hover .gradient-title {
    animation: gradientFlow 2s ease infinite, titleFloat 0.6s ease forwards;
}

@keyframes titleFloat {
    0% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
    100% { transform: translateY(0); }
}

/* Efecto de brillo en hover */
.gradient-title::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.8), transparent);
    transition: left 0.6s ease;
}

.competencia-card:hover .gradient-title::after {
    left: 100%;
}

.competencia-card p {
    color: var(--color-gray-dark);
    font-weight: 300;
}

/* Efecto sutil en click/focus */
.competencia-card:active { 
    transform: translateY(-3px) scale(0.99); 
}

.competencia-card:focus { 
    outline: 3px solid rgba(255,199,44,0.45); 
    outline-offset: 3px; 
}

/* ========================================= */
/* 7. Sección Conecta y Encuentra (Perfiles) */
/* ========================================= */
.connect-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-xl);
    align-items: center;
    margin-bottom: var(--spacing-xl);
}

@media (min-width: 900px) {
    .connect-grid {
        grid-template-columns: 1.1fr 1fr; /* imagen ligeramente dominante */
        gap: calc(var(--spacing-xl) + 0.5rem);
    }
}

.connect-image { margin: 0; border-radius: 16px; overflow: hidden; box-shadow: 0 20px 40px rgba(0,0,0,0.08); }
.connect-image img { width: 100%; height: auto; display: block; object-fit: cover; }
.connect-text p { text-align: justify; margin-bottom: var(--spacing-sm); }

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: var(--spacing-lg);
    margin-top: var(--spacing-xl);
}

.video-card {
    display: block;
    background: #fff;
    border: 1px solid #e9e9ee;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 24px rgba(0,0,0,0.06);
    transition: transform .25s ease, box-shadow .25s ease;
    /* Asegurar que el overlay absoluto se posicione dentro de la tarjeta */
    position: relative;
    cursor: pointer;
}
.video-card:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(0,0,0,0.12); }

.video-thumb {
    width: 100%;
    aspect-ratio: 16/9;
    background-size: cover;
    background-position: center;
    position: relative;
}
.video-overlay { position: absolute; inset: 0; display:flex; align-items:center; justify-content:center; background: linear-gradient(to bottom, rgba(0,0,0,0.05), rgba(0,0,0,0.35)); opacity: 0; transition: opacity .25s ease; }
.video-card:hover .video-overlay { opacity: 1; }
.play { width: 54px; height: 54px; border-radius: 50%; background: rgba(255,255,255,0.9); display:inline-block; position: relative; box-shadow: 0 6px 16px rgba(0,0,0,0.2); }
.video-overlay { z-index: 2; }
.play { z-index: 3; }
.play::after { content:''; position:absolute; top:50%; left:50%; transform: translate(-40%, -50%); border-left: 14px solid var(--color-unach-blue); border-top: 9px solid transparent; border-bottom: 9px solid transparent; }

.video-caption { text-align:center; padding: .75rem 1rem; font-weight: 700; color: var(--color-unach-dark); }
.profile-card {
    background-color: var(--color-white);
    padding: var(--spacing-lg);
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.profile-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.profile-img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 0.75rem;
    /* Borde Dorado para destacar */
    border: 3px solid var(--color-accent-gold); 
    box-shadow: 0 0 0 5px rgba(255, 199, 44, 0.1); 
}

.profile-card h4 {
    color: var(--color-unach-dark);
    margin-bottom: 0.25rem;
    font-weight: 700;
}

/* ========================================= */
/* 8. Sección Noticias                       */
/* ========================================= */
.news-card {
    background-color: var(--color-white);
    color: var(--color-gray-dark);
    padding: 0;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    border: 2px solid transparent;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.news-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
    border-color: var(--color-accent-gold);
}

.news-card:active {
    transform: translateY(-4px);
    transition: transform 0.1s ease;
}

/* Indicador visual de que es clickeable */
.news-card::after {
    content: "Click para ver más";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: white;
    padding: 20px var(--spacing-md) var(--spacing-md);
    font-size: 0.8rem;
    font-weight: 500;
    opacity: 0;
    transition: opacity 0.3s ease;
    text-align: center;
}

/* News Card Date Badge */
.news-card .news-date-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: transparent;
    color: var(--color-white);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 2;
    backdrop-filter: none;
    border: none;
    box-shadow: none;
    transition: all 0.3s ease;
}

.news-card .news-date-badge::before {
    content: "📅";
    margin-right: 4px;
}

.news-card:hover .news-date-badge {
    background: transparent;
    transform: scale(1.05);
}

/* Carrusel Noticias */
.news-carousel { 
    position: relative; 
    padding: 0 70px;
    max-width: 1400px;
    overflow: hidden;
    margin: 0 auto;
}
.news-track { 
    display: flex; 
    gap: 24px; 
    transition: transform 0.4s ease;
    padding: 1.5rem 0;
    overflow: hidden;
    align-items: stretch;
    width: 100%;
}
.news-track > article { 
    flex: 0 0 260px; /* Ancho fijo de tarjetas - ajustado para 4 caber */
    min-width: 260px;
    max-width: 260px;
}
.news-arrow { 
    position: absolute; 
    top: 50%; 
    transform: translateY(-50%); 
    width: 48px; 
    height: 48px; 
    border-radius: 50%; 
    border: 0; 
    background: rgba(255,255,255,0.95); 
    color: var(--color-unach-dark); 
    box-shadow: 0 8px 20px rgba(0,0,0,0.2); 
    cursor: pointer; 
    display: flex; 
    align-items: center; 
    justify-content: center;
    font-size: 1.25rem;
    font-weight: bold;
    transition: all 0.3s ease;
    z-index: 10;
}
.news-arrow:hover { 
    background: var(--color-accent-gold); 
    color: var(--color-unach-dark); 
    transform: translateY(-50%) scale(1.1);
}
.news-arrow.prev { left: 8px; }
.news-arrow.next { right: 8px; }

/* Responsive para móviles */
@media (max-width: 768px) {
    .news-carousel {
        padding: 0 50px;
    }
    .news-arrow {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    .news-arrow.prev { left: 4px; }
    .news-arrow.next { right: 4px; }
    .news-track > article {
        flex: 0 0 260px; /* Tarjetas más pequeñas en móvil */
        min-width: 260px;
    }
}

/* Pagination indicators */
.news-indicators {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 1rem;
    }
    .news-indicator {
        width: 18px;
        height: 18px;
        border-radius: 50%;
        background: linear-gradient(135deg, #e0e7ff 0%, #b6c6f5 100%);
        box-shadow: 0 2px 8px rgba(0,0,0,0.08);
        transition: background 0.25s, transform 0.22s;
        cursor: pointer;
        border: 2.5px solid #fff;
    }
    .news-indicator.active {
        background: linear-gradient(135deg, #0078d4 0%, #4f8cff 100%);
        transform: scale(1.35);
        box-shadow: 0 4px 16px rgba(0,120,212,0.13);
    }
/* Botones de navegación del carrusel */
.news-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.95);
    border: none;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    width: 50px;
    height: 50px;
    font-size: 1.6rem;
    color: #0078d4;
    cursor: pointer;
    z-index: 20;
    transition: all 0.2s ease;
    opacity: 1;
    font-weight: bold;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}
.news-nav-btn:hover {
    background: #0078d4;
    color: white;
    box-shadow: 0 6px 20px rgba(0,120,212,0.3);
    transform: translateY(-50%) scale(1.1);
}
#newsPrevBtn {
    left: 10px;
}
#newsNextBtn {
    right: 10px;
}
@media (max-width: 768px) {
    .news-carousel {
        padding: 0 60px;
    }
    .news-nav-btn {
        width: 40px;
        height: 40px;
        font-size: 1.3rem;
    }
    #newsPrevBtn { left: 5px; }
    #newsNextBtn { right: 5px; }
}

/* Modal noticia pantalla completa */
.news-modal .modal { 
    width: 100vw; 
    height: 100vh; 
    max-width: none; 
    max-height: none; 
    border-radius: 0; 
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.news-modal .modal-header {
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--color-unach-light);
    padding-bottom: 1rem;
    max-width: 100%;
}

.news-modal .modal-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    max-width: 100%;
}

.news-modal .modal-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--color-unach-dark);
    line-height: 1.2;
    margin-bottom: 1rem;
    max-width: 100%;
}

/* Botón de cerrar más grande y visible */
.news-modal .modal-close {
    font-size: 2rem;
    width: 50px;
    height: 50px;
    top: 1rem;
    right: 1rem;
    background: rgba(255,255,255,0.9);
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* Estilos del contenido del modal */
.news-modal #newsDate {
    font-size: 1.1rem;
    color: var(--color-gray-medium);
    margin-bottom: 2rem;
    font-weight: 500;
}

.news-modal #newsBodyText {
    font-size: 1.2rem;
    line-height: 1.8;
    margin-bottom: 3rem;
    text-align: justify;
    color: var(--color-gray-dark);
    max-width: 100%;
}

/* Nueva galería con navegación */
.news-gallery-container {
    position: relative;
    margin-top: auto;
    padding-top: 2rem;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
}

.news-gallery-container h4 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: var(--color-unach-dark);
    font-weight: 600;
    text-align: center;
}

.news-gallery {
    position: relative;
    width: 100%;
    max-width: 600px;
    height: 350px;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    margin: 0 auto;
    padding: 0;
    background-color: #f5f5f5;
}

.news-gallery img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    opacity: 0;
    transition: opacity 0.4s ease;
    display: block;
    border-radius: 12px;
}

.news-gallery img.active {
    opacity: 1;
}

/* Forzar que las imágenes mantengan el tamaño moderado */
.news-modal .news-gallery img {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    border-radius: 12px !important;
}

.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.95);
    color: var(--color-unach-dark);
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 20px rgba(0,0,0,0.25);
    transition: all 0.3s ease;
    z-index: 10;
}

.gallery-nav:hover {
    background: var(--color-accent-gold);
    transform: translateY(-50%) scale(1.15);
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}

.gallery-prev {
    left: 20px;
}

.gallery-next {
    right: 20px;
}

.gallery-counter {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 12px 18px;
    border-radius: 25px;
    font-size: 1.1rem;
    font-weight: 600;
    backdrop-filter: blur(10px);
}

/* Media query para pantallas grandes */
@media (min-width: 1200px) {
    .news-gallery-container {
        max-width: 100%;
    }
    
    .news-gallery {
        max-width: 700px;
        height: 400px;
    }
    
    .news-gallery img {
        object-fit: cover !important;
        object-position: center !important;
        width: 100% !important;
        height: 100% !important;
        border-radius: 12px !important;
    }
    
    .news-gallery-container h4 {
        font-size: 1.6rem;
        margin-bottom: 1.5rem;
    }
    
    .gallery-nav {
        width: 50px;
        height: 50px;
        font-size: 1.8rem;
    }
    
    .gallery-counter {
        font-size: 1rem;
        padding: 10px 16px;
    }
}

/* Media query para pantallas ultra anchas (1920x1080 y superiores) */
@media (min-width: 1800px) {
    .news-gallery-container {
        max-width: 100%;
    }
    
    .news-gallery {
        max-width: 800px;
        height: 450px;
    }
    
    .news-gallery img {
        object-fit: cover !important;
        object-position: center !important;
        width: 100% !important;
        height: 100% !important;
        border-radius: 12px !important;
    }
    
    .news-gallery-container h4 {
        font-size: 1.8rem;
        margin-bottom: 1.5rem;
    }
    
    .gallery-nav {
        width: 55px;
        height: 55px;
        font-size: 2rem;
    }
}

/* Responsive para móviles */
@media (max-width: 768px) {
    .news-modal .modal {
        padding: 1rem;
    }
    
    .news-modal .modal-title {
        font-size: 1.8rem;
    }
    
    .news-modal #newsDate {
        font-size: 1rem;
    }
    
    .news-modal #newsBodyText {
        font-size: 1rem;
        line-height: 1.6;
    }
    
    .news-gallery-container {
        max-width: 100%;
        padding-top: 1.5rem;
    }
    
    .news-gallery-container h4 {
        font-size: 1.6rem;
    }
    
    .news-gallery {
        max-width: 100%;
        height: 250px;
    }
    
    .news-gallery img {
        object-fit: cover !important;
        object-position: center !important;
        width: 100% !important;
        height: 100% !important;
        border-radius: 8px !important;
    }
    
    .gallery-nav {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
    
    .gallery-prev {
        left: 16px;
    }
    
    .gallery-next {
        right: 16px;
    }
    
    .gallery-counter {
        bottom: 16px;
        right: 16px;
        padding: 8px 14px;
        font-size: 0.9rem;
    }
    
    .news-modal .modal-close {
        font-size: 1.5rem;
        width: 40px;
        height: 40px;
        top: 0.5rem;
        right: 0.5rem;
    }
    
    /* En móviles, mostrar siempre el indicador */
    .news-card::after {
        opacity: 1;
        background: linear-gradient(transparent, rgba(0,0,0,0.9));
        font-size: 0.75rem;
        padding: 15px var(--spacing-md) var(--spacing-sm);
    }
    
    .news-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
    }
    
    /* Badge de fecha en móviles */
    .news-card .news-date-badge {
        top: 8px;
        right: 8px;
        padding: 4px 8px;
        font-size: 0.7rem;
    }
}

/* ========================================= */
/* 9. Sección CTA (Forma parte del Club)     */
/* ========================================= */
#forma-parte {
    background-color: var(--color-off-white);
    text-align: center;
}

.cta-box {
    /* Degradado azul de la UNACH */
    background: linear-gradient(135deg, 
                rgba(0, 51, 102, 1) 0%, /* Azul UNACH oscuro */
                rgba(0, 71, 142, 1) 35%, /* Azul UNACH medio */
                rgba(0, 91, 182, 1) 100%); /* Azul UNACH claro */
    padding: var(--spacing-xl) var(--spacing-lg);
    border-radius: 20px;
    color: var(--color-white); /* Cambiado a texto blanco para mejor contraste */
    box-shadow: 0 15px 30px rgba(0, 51, 102, 0.4);
}

.cta-box h2 {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    margin-bottom: 0.5rem;
    font-weight: 800;
}

.cta-box p {
    font-size: 1.1rem;
    margin-bottom: var(--spacing-lg);
    font-weight: 400;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.cta-box .cta-button {
    /* Botón CTA sobre fondo azul: Dorado */
    background-color: var(--color-accent-gold);
    border-color: var(--color-accent-gold);
    color: var(--color-unach-dark);
    box-shadow: 0 6px 15px rgba(255, 199, 44, 0.3);
}

.cta-box .cta-button:hover {
     background-color: var(--color-accent-gold-hover);
     border-color: var(--color-accent-gold-hover);
     color: var(--color-unach-dark);
}

/* Estilo para el ícono de las cards - usando un emoji como fallback/ejemplo */
.icon-symbol {
    font-size: 2.2rem;
    margin-bottom: 0.75rem;
    display: block;
}


/* ========================================= */
/* 10. Footer                                 */
/* ========================================= */
.footer {
    background: linear-gradient(135deg, #0a2540 0%, #001e3c 100%);
    color: var(--color-off-white);
    padding: var(--spacing-lg) 0;
    font-size: 0.9rem;
    text-align: center;
    /* Línea divisoria Dorada */
    border-top: 5px solid var(--color-accent-gold);
}

.footer p {
    margin: 0.5rem 0;
}

/* ========================================= */
/* 11. Modern Transitions & Animations       */
/* ========================================= */

body {
    animation: fadeInAnimation ease 1s;
    animation-iteration-count: 1;
    animation-fill-mode: forwards;
}

@keyframes fadeInAnimation {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

/* ========================================= */
/* 12. "What We Do" Section                  */
/* ========================================= */
#what-we-do {
    background-color: var(--color-white);
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-lg);
    margin-top: var(--spacing-xl);
}

.feature-card {
    text-align: center;
    padding: 3rem 2rem;
    border-radius: 20px;
    position: relative;
    overflow: hidden;
    background: linear-gradient(145deg, #0a2540 0%, #001e3c 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
}

/* Fondo animado con efecto de luz */
.feature-card-bg {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.05) 0%, transparent 70%);
    opacity: 0;
    transition: all 0.6s ease;
    pointer-events: none;
}

.feature-card:hover .feature-card-bg {
    opacity: 1;
    animation: rotateGlow 8s linear infinite;
}

@keyframes rotateGlow {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Gradiente de borde animado */
.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 20px;
    padding: 2px;
    background: linear-gradient(45deg, transparent, transparent);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.feature-card-1::before {
    background: linear-gradient(45deg, #42A5F5, #64B5F6, #42A5F5);
}

.feature-card-2::before {
    background: linear-gradient(45deg, #FFCA28, #FFD54F, #FFCA28);
}

.feature-card-3::before {
    background: linear-gradient(45deg, #66BB6A, #81C784, #66BB6A);
}

.feature-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 
        0 20px 50px rgba(0, 0, 0, 0.4),
        0 0 30px rgba(255, 255, 255, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.2);
}

.feature-card:hover::before {
    opacity: 1;
}

/* Wrapper del icono con efecto de orbe */
.feature-icon-wrapper {
    width: 100px;
    height: 100px;
    margin: 0 auto 2rem;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feature-icon-wrapper::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,0.15) 0%, transparent 70%);
    transition: all 0.4s ease;
}

.feature-card:hover .feature-icon-wrapper::before {
    transform: scale(1.3);
    opacity: 0.8;
}

.feature-icon {
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.05) 100%);
    border-radius: 50%;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    position: relative;
    z-index: 2;
    box-shadow: 
        0 8px 20px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.feature-icon svg {
    width: 48px;
    height: 48px;
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

.feature-card:hover .feature-icon {
    transform: scale(1.1) rotate(360deg);
    box-shadow: 
        0 12px 30px rgba(0, 0, 0, 0.4),
        inset 0 2px 0 rgba(255, 255, 255, 0.4);
}

.feature-card-1:hover .feature-icon {
    background: linear-gradient(145deg, rgba(66,165,245,0.2) 0%, rgba(100,181,246,0.1) 100%);
    border-color: rgba(66,165,245,0.5);
    box-shadow: 
        0 12px 30px rgba(66,165,245,0.4),
        inset 0 2px 0 rgba(66,165,245,0.3);
}

.feature-card-2:hover .feature-icon {
    background: linear-gradient(145deg, rgba(255,202,40,0.2) 0%, rgba(255,213,79,0.1) 100%);
    border-color: rgba(255,202,40,0.5);
    box-shadow: 
        0 12px 30px rgba(255,202,40,0.4),
        inset 0 2px 0 rgba(255,202,40,0.3);
}

.feature-card-3:hover .feature-icon {
    background: linear-gradient(145deg, rgba(102,187,106,0.2) 0%, rgba(129,199,132,0.1) 100%);
    border-color: rgba(102,187,106,0.5);
    box-shadow: 
        0 12px 30px rgba(102,187,106,0.4),
        inset 0 2px 0 rgba(102,187,106,0.3);
}

.feature-card:hover .feature-icon svg {
    transform: scale(1.15);
}

.feature-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
}

.feature-card:hover h3 {
    transform: translateY(-3px);
}

.feature-card-1:hover h3 {
    color: #64B5F6;
    text-shadow: 0 0 20px rgba(100,181,246,0.5);
}

.feature-card-2:hover h3 {
    color: #FFD54F;
    text-shadow: 0 0 20px rgba(255,213,79,0.5);
}

.feature-card-3:hover h3 {
    color: #81C784;
    text-shadow: 0 0 20px rgba(129,199,132,0.5);
}

.feature-card p {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
    font-size: 1rem;
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
}

.feature-card:hover p {
    color: rgba(255, 255, 255, 0.95);
}

/* ========================================= */
/* 13. "Featured Events" Section             */
/* ========================================= */
#events {
    background-color: var(--color-unach-dark);
    color: var(--color-white);
}

#events .section-heading {
    color: var(--color-white);
}

/* ─── Events Section: Subtitle & Lead ─── */
.events-subtitle {
    text-align: center;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--color-accent-gold);
    margin-bottom: 0.5rem;
}

.events-lead {
    text-align: center;
    max-width: 640px;
    margin: 0 auto var(--spacing-xl);
    font-size: 1.1rem;
    line-height: 1.7;
    color: rgba(255,255,255,0.6);
}

/* ─── Filter Buttons ─── */
.events-filters {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 3rem;
}

.events-filter-btn {
    padding: 0.55rem 1.6rem;
    border-radius: 50px;
    border: none;
    font-family: var(--font-primary);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(255,255,255,0.07);
    color: rgba(255,255,255,0.6);
    text-transform: capitalize;
}

.events-filter-btn:hover {
    background: rgba(255,255,255,0.12);
    color: #fff;
}

.events-filter-btn.active {
    background: linear-gradient(135deg, #FFD54F, #FFA726);
    color: var(--color-unach-dark);
    box-shadow: 0 4px 20px rgba(255,167,38,0.35);
}

/* ─── Events Grid ─── */
.events-grid {
    display: grid;
    gap: 2rem;
    grid-template-columns: 1fr;
}

@media (min-width: 640px) {
    .events-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
    .events-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ─── Event Card ─── */
.ev-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: rgba(255,255,255,0.05);
    backdrop-filter: blur(16px);
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.08);
    transition: all 0.45s cubic-bezier(0.4,0,0.2,1);
    box-shadow: 0 8px 32px rgba(0,0,0,0.25);
    height: 100%;
    max-width: 400px;
    width: 100%;
}

.ev-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 60px rgba(255,215,0,0.15), 0 0 30px rgba(255,215,0,0.08);
    border-color: rgba(255,215,0,0.25);
}

/* Hidden by filter */
.ev-card.ev-hidden {
    display: none;
}

/* Loading spinner */
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Badge */
.ev-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 5;
    padding: 5px 14px;
    border-radius: 50px;
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 1px;
    color: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.25);
}

.ev-badge--blue   { background: #3B82F6; }
.ev-badge--orange { background: #F97316; }
.ev-badge--purple { background: #9333EA; }
.ev-badge--green  { background: #10B981; }

/* Image Area (top visual block) */
.ev-icon-area {
    position: relative;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-unach-dark);
    overflow: hidden;
}

.ev-icon-area--clickable {
    cursor: zoom-in;
}

.ev-img-zoom-hint {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.65));
    color: #fff;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 5px;
    padding: 10px 12px 8px;
    opacity: 0;
    transition: opacity 0.25s ease;
    pointer-events: none;
}

.ev-icon-area--clickable:hover .ev-img-zoom-hint {
    opacity: 1;
}

.ev-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease, filter 0.5s ease;
    filter: brightness(0.7);
}

.ev-card:hover .ev-img {
    transform: scale(1.08);
    filter: brightness(0.85);
}

/* Floating date chip */
.ev-float-date {
    position: absolute;
    bottom: 14px;
    left: 14px;
    z-index: 3;
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(8px);
    padding: 6px 14px;
    border-radius: 14px;
    text-align: center;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
    line-height: 1;
}

.ev-float-month {
    display: block;
    font-size: 0.6rem;
    font-weight: 800;
    color: var(--color-accent-gold);
    letter-spacing: 1px;
    text-transform: uppercase;
}

.ev-float-day {
    display: block;
    font-size: 1.2rem;
    font-weight: 900;
    color: var(--color-unach-dark);
    margin-top: 1px;
}

/* Card body */
.ev-body {
    padding: 1.5rem 1.5rem 1.8rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.ev-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.6rem;
    transition: color 0.3s ease;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 2.76rem;
}

.ev-card:hover .ev-title {
    color: var(--color-accent-gold);
}

.ev-desc {
    font-size: 0.88rem;
    line-height: 1.6;
    color: rgba(255,255,255,0.55);
    margin-bottom: 1.2rem;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Meta items */
.ev-meta {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    margin-bottom: 1.4rem;
    margin-top: auto;
}

.ev-meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.6);
}

.ev-meta-item svg {
    flex-shrink: 0;
    color: var(--color-accent-gold);
}

/* CTA button inside card */
.ev-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    align-self: flex-end;
    padding: 0.4rem 0.85rem;
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 600;
    text-decoration: none;
    color: #fff;
    background: var(--color-unach-dark);
    border: 1px solid rgba(255,255,255,0.1);
    transition: all 0.35s ease;
}

.ev-card:hover .ev-cta {
    background: linear-gradient(135deg, #FFD54F, #FFA726);
    color: var(--color-unach-dark);
    box-shadow: 0 6px 20px rgba(255,167,38,0.35);
}

.ev-cta svg {
    transition: transform 0.3s ease;
}

.ev-card:hover .ev-cta svg {
    transform: translateX(4px);
    stroke: var(--color-unach-dark);
}


/* ─── 4th card on large screens: span trick ─── */
@media (min-width: 1024px) {
    /* When exactly 4 cards visible, let the 4th center itself */
    .events-grid {
        justify-items: center;
    }
}

/* Old event card styles (backup) */
.event-card {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
    background-color: var(--color-unach-blue);
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: var(--spacing-lg);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.event-card:hover {
    transform: scale(1.02);
    box-shadow: 0 15px 30px rgba(0,0,0,0.3);
}

@media (min-width: 768px) {
    .event-card {
        flex-direction: row;
    }
}

.event-content {
    padding: var(--spacing-lg);
}

.event-date {
    font-weight: 700;
    color: var(--color-accent-gold);
    margin-bottom: var(--spacing-sm);
}

.event-content h3 {
    font-size: 1.5rem;
    margin-bottom: var(--spacing-sm);
}

/* ========================================= */
/* 14. "Testimonials" Section                */
/* ========================================= */
#testimonials {
    background-color: var(--color-off-white);
}

/* ========================================= */
/* 15. Utilidades de Responsividad            */
/* ========================================= */
img, picture, video, canvas, svg {
    max-width: 100%;
    height: auto;
}


.testimonial-card {
    background: var(--color-white);
    padding: var(--spacing-xl);
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
    max-width: 700px;
    margin: 0 auto;
}

.testimonial-quote {
    font-size: 1.2rem;
    font-style: italic;
    color: var(--color-gray-medium);
    margin-bottom: var(--spacing-md);
}

.testimonial-author {
    font-weight: 700;
    color: var(--color-unach-blue);
}

/* ========================================= */
/* 16. Sección Sobre el Club (restaurada)     */
/* ========================================= */
.sobre-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-xl);
    align-items: center;
}

@media (min-width: 900px) {
    .sobre-grid {
        grid-template-columns: 1.1fr 1fr; /* imagen ligeramente dominante */
        gap: calc(var(--spacing-xl) + 0.5rem);
    }
}

.sobre-image {
    margin: 0;
    position: relative;
    border-radius: 16px;
    overflow: hidden; /* recorta el zoom dentro del contenedor */
}

.sobre-image img {
    display: block;
    width: 100%;
    border-radius: 16px;
    object-fit: cover;
    /* efecto sutil de profundidad */
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
    filter: saturate(1.05) contrast(1.02);
    transform: scale(1);
    transform-origin: center;
    transition: transform 400ms ease, filter 400ms ease;
}

.sobre-image:hover img,
.sobre-image:focus-within img {
    transform: scale(1.04);
    filter: saturate(1.08) contrast(1.05);
}

@media (prefers-reduced-motion: reduce) {
    .sobre-image img {
        transition: none;
    }
    .sobre-image:hover img,
    .sobre-image:focus-within img {
        transform: none;
    }
}

.sobre-image::after {
    content: '';
    position: absolute;
    inset: -10px -10px -20px -10px;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(255,199,44,0.25), rgba(0,51,102,0.15));
    z-index: -1;
        /* Badge de fecha más sutil */
        .news-card .news-date-badge {
            position: absolute;
            top: 12px;
            right: 12px;
            background: rgba(255, 199, 44, 0.13); /* dorado muy suave */
            color: #333;
            padding: 6px 12px;
            border-radius: 20px;
            font-size: 0.75rem;
            font-weight: 600;
            z-index: 2;
            border: 1px solid #ffe9a7;
            box-shadow: 0 2px 8px rgba(0,0,0,0.10);
            transition: all 0.3s ease;
            backdrop-filter: blur(4px);
        }
        .news-card:hover .news-date-badge {
            background: rgba(255, 199, 44, 0.22);
            color: #111;
            transform: scale(1.05);
        }
    color: var(--color-off-white);
}

.sobre-list {
    margin-top: var(--spacing-sm);
    padding-left: 0;
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

/* Viñetas modernas con Glassmorphism y gradientes animados */
.glass-item {
    margin: 0;
    position: relative;
    overflow: visible;
    border-radius: 20px;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    transform-style: preserve-3d;
}

.glass-content {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem 2rem;
    position: relative;
    z-index: 1;
    /* Advanced Glassmorphism + Neomorphism */
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.05) 100%);
    backdrop-filter: blur(30px) saturate(180%);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
    border: 2px solid rgba(255, 255, 255, 0.25);
    border-radius: 20px;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.3),
        inset 0 -1px 0 rgba(0, 0, 0, 0.1);
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Gradiente animado con efectos 3D */
.glass-item::before {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    background-size: 400% 400%;
    animation: gradientShift 10s ease infinite;
    border-radius: 24px;
    z-index: -1;
    opacity: 0;
    filter: blur(15px);
    transition: all 0.5s ease;
}

/* Capacitaciones - Púrpura moderno */
.glass-item-1::before {
    background: linear-gradient(45deg, 
        #667eea 0%,
        #764ba2 25%,
        #667eea 50%,
        #764ba2 75%,
        #667eea 100%);
}

/* Asesorías - Verde turquesa */
.glass-item-2::before {
    background: linear-gradient(45deg, 
        #11998e 0%,
        #38ef7d 25%,
        #11998e 50%,
        #38ef7d 75%,
        #11998e 100%);
}

/* Mentorías - Dorado brillante */
.glass-item-3::before {
    background: linear-gradient(45deg, 
        #f7971e 0%,
        #ffd200 25%,
        #f7971e 50%,
        #ffd200 75%,
        #f7971e 100%);
}

/* Networking - Azul cielo */
.glass-item-4::before {
    background: linear-gradient(45deg, 
        #00d2ff 0%,
        #3a7bd5 25%,
        #00d2ff 50%,
        #3a7bd5 75%,
        #00d2ff 100%);
}

/* Incubación - Pastel moderno */
.glass-item-5::before {
    background: linear-gradient(45deg, 
        #a8edea 0%,
        #fed6e3 25%,
        #a8edea 50%,
        #fed6e3 75%,
        #a8edea 100%);
}

.glass-item:hover::before {
    opacity: 0.6;
    filter: blur(20px);
}

/* Animación del gradiente */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Iconos modernos con efectos 3D */
.glass-icon {
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    transform-style: preserve-3d;
}

.glass-icon svg {
    width: 100%;
    height: 100%;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    z-index: 2;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
}

.glass-icon svg path,
.glass-icon svg circle {
    transition: all 0.5s ease;
}

/* Efectos de sombra 3D para cada icono */
.glass-item-1 .glass-icon svg {
    filter: drop-shadow(0 4px 12px rgba(102, 126, 234, 0.5));
}

.glass-item-2 .glass-icon svg {
    filter: drop-shadow(0 4px 12px rgba(17, 153, 142, 0.5));
}

.glass-item-3 .glass-icon svg {
    filter: drop-shadow(0 4px 12px rgba(247, 151, 30, 0.5));
}

.glass-item-4 .glass-icon svg {
    filter: drop-shadow(0 4px 12px rgba(0, 210, 255, 0.5));
}

.glass-item-5 .glass-icon svg {
    filter: drop-shadow(0 4px 12px rgba(168, 237, 234, 0.5));
}

.glass-text {
    font-weight: 600;
    color: var(--color-gray-dark);
    font-size: 1rem;
    transition: color 0.3s ease;
}

/* Ajustar color del texto de viñetas para fondo oscuro */
#sobre-club .glass-text {
    color: var(--color-off-white);
}

/* Micro-interacciones 3D al hover */
.glass-item:hover {
    transform: translateY(-8px) scale(1.03) rotateX(5deg);
    z-index: 10;
}

/* Hover effects con glassmorphism mejorado */
.glass-item-1:hover .glass-content,
.glass-item-2:hover .glass-content,
.glass-item-3:hover .glass-content,
.glass-item-4:hover .glass-content,
.glass-item-5:hover .glass-content {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.25) 0%, rgba(255, 255, 255, 0.1) 100%);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.25),
        inset 0 2px 0 rgba(255, 255, 255, 0.4),
        inset 0 -2px 0 rgba(0, 0, 0, 0.15),
        0 0 30px rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(40px) saturate(200%);
}

.glass-item:hover .glass-icon {
    transform: scale(1.25) rotate(360deg);
    z-index: 10;
}

.glass-item:hover .glass-icon svg {
    opacity: 1;
    transform: scale(1.15);
}

/* Efectos especiales en hover por color */
.glass-item-1:hover .glass-icon svg {
    filter: drop-shadow(0 8px 20px rgba(102, 126, 234, 0.8));
}

.glass-item-2:hover .glass-icon svg {
    filter: drop-shadow(0 8px 20px rgba(17, 153, 142, 0.8));
}

.glass-item-3:hover .glass-icon svg {
    filter: drop-shadow(0 8px 20px rgba(247, 151, 30, 0.8));
}

.glass-item-4:hover .glass-icon svg {
    filter: drop-shadow(0 8px 20px rgba(0, 210, 255, 0.8));
}

.glass-item-5:hover .glass-icon svg {
    filter: drop-shadow(0 8px 20px rgba(168, 237, 234, 0.8));
}

.glass-item:hover .glass-icon svg path,
.glass-item:hover .glass-icon svg circle {
    opacity: 1;
}

/* Colores de texto al hover - todos en azul UNACH */
.glass-item-1:hover .glass-text,
.glass-item-2:hover .glass-text,
.glass-item-3:hover .glass-text,
.glass-item-4:hover .glass-text,
.glass-item-5:hover .glass-text {
    color: #003366;
    font-weight: 700;
}

/* Efecto de brillo sutil al hacer clic */
.glass-item:active {
    transform: translateY(-2px) scale(0.98);
}

.glass-item:active .glass-content {
    box-shadow: 0 4px 20px rgba(0, 51, 102, 0.15);
}

/* Efecto ripple para micro-interacción */
.ripple-effect {
    position: absolute;
    border-radius: 50%;
    transform: scale(0);
    animation: ripple 0.6s ease-out;
    pointer-events: none;
    z-index: 2;
}

@keyframes ripple {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .sobre-list {
        grid-template-columns: 1fr;
    }
    
    .glass-content {
        padding: 1rem 1.25rem;
    }
    
    .glass-item:hover {
        transform: translateY(-2px) scale(1.01);
    }
}

/* ========================================= */
/* 17. Acordeón de Sedes Afiliadas           */
/* ========================================= */
.acordeon-container {
    max-width: 900px;
    margin: 0 auto;
}

.acordeon-item {
    background: var(--color-white);
    border-radius: 12px;
    margin-bottom: 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 51, 102, 0.1);
}

.acordeon-item:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.acordeon-header {
    width: 100%;
    background: transparent;
    border: none;
    padding: 1.5rem 2rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    position: relative;
}

.acordeon-header:hover {
    background: rgba(0, 51, 102, 0.02);
}

.acordeon-header[aria-expanded="true"] {
    background: rgba(0, 51, 102, 0.05);
}

.acordeon-number {
    background: linear-gradient(135deg, var(--color-unach-blue), var(--color-unach-dark));
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 51, 102, 0.3);
}

.acordeon-info {
    flex: 1;
}

.acordeon-info h3 {
    color: var(--color-unach-dark);
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    line-height: 1.3;
}

.acordeon-location {
    color: var(--color-gray-medium);
    font-size: 0.9rem;
    font-weight: 500;
    margin: 0;
}

.acordeon-icon {
    font-size: 1.5rem;
    color: var(--color-unach-blue);
    font-weight: 300;
    transition: transform 0.3s ease;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.acordeon-header[aria-expanded="true"] .acordeon-icon {
    transform: rotate(45deg);
}

.acordeon-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
    background: rgba(255, 199, 44, 0.05);
}

.acordeon-header[aria-expanded="true"] + .acordeon-content {
    max-height: 300px;
    padding: 0 2rem 1.5rem;
}

.acordeon-contact h4 {
    color: var(--color-unach-dark);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--color-accent-gold);
    display: inline-block;
}

.acordeon-contact h4:not(:first-child) {
    margin-top: 1.5rem;
}

.contact-details {
    background: var(--color-white);
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    margin-bottom: 0.5rem;
}

.contact-details p {
    margin: 0.5rem 0;
    font-size: 0.95rem;
    line-height: 1.5;
}

.contact-details a {
    color: var(--color-unach-blue);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.contact-details a:hover {
    color: var(--color-unach-dark);
    text-decoration: underline;
}

/* Responsive para móviles */
@media (max-width: 768px) {
    .acordeon-header {
        padding: 1.25rem 1.5rem;
        gap: 1rem;
    }
    
    .acordeon-number {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
    
    .acordeon-info h3 {
        font-size: 1rem;
    }
    
    .acordeon-location {
        font-size: 0.85rem;
    }
    
    .acordeon-header[aria-expanded="true"] + .acordeon-content {
        padding: 0 1.5rem 1.25rem;
    }
    
    .contact-details {
        padding: 0.75rem;
    }
    
    .contact-details p {
        font-size: 0.9rem;
    }
}

/* ========================================= */
/* 18. Nuestro Equipo (quienes-somos)        */
/* ========================================= */
.equipo-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e8eaf6 100%);
    position: relative;
    overflow: hidden;
}

/* Patrón moderno con clip-path y formas geométricas */
.equipo-section::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    width: 700px;
    height: 700px;
    transform: translateY(-50%);
    z-index: 0;
    pointer-events: none;
    background: 
        radial-gradient(circle at 30% 30%, #64B5F6 0%, transparent 50%),
        radial-gradient(circle at 70% 70%, #42A5F5 0%, transparent 50%);
    opacity: 0.35;
    clip-path: polygon(0 0, 60% 0, 40% 100%, 0% 100%);
}

.equipo-section::after {
    content: '';
    position: absolute;
    top: 20%;
    left: -120px;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(100, 181, 246, 0.4) 0%, rgba(66, 165, 245, 0.15) 70%, transparent 100%);
    z-index: 0;
    pointer-events: none;
    animation: floatCircle 20s ease-in-out infinite;
}

@keyframes floatCircle {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    50% {
        transform: translate(50px, -30px) scale(1.1);
    }
}

.equipo-background-pattern {
    display: none;
}

@keyframes patternFloat {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    33% {
        transform: translate(30px, -20px) scale(1.05);
    }
    66% {
        transform: translate(-20px, 30px) scale(0.95);
    }
}

.equipo-section .container {
    position: relative;
    z-index: 1;
}

/* ========================================= */
/* Conecta con la Comunidad - Mismo estilo  */
/* ========================================= */
.conecta-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e8eaf6 100%);
    position: relative;
    overflow: hidden;
}

.conecta-section::after {
    content: '';
    position: absolute;
    top: 20%;
    left: -120px;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(100, 181, 246, 0.4) 0%, rgba(66, 165, 245, 0.15) 70%, transparent 100%);
    z-index: 0;
    pointer-events: none;
    animation: floatCircle 20s ease-in-out infinite;
}

.conecta-section .container {
    position: relative;
    z-index: 1;
}

/* ========================================= */
/* Sedes Afiliadas - Fondo azul oscuro      */
/* ========================================= */
.sedes-section {
    background: linear-gradient(135deg, #0a2540 0%, #001e3c 100%);
    position: relative;
    overflow: hidden;
}

.sedes-section .container {
    position: relative;
    z-index: 1;
}

/* ========================================= */
/* Mapa Leaflet - Mejoras Modernas          */
/* ========================================= */

/* Tooltips modernos para marcadores */
.leaflet-tooltip.sede-tooltip {
    background: linear-gradient(135deg, rgba(10, 37, 64, 0.98) 0%, rgba(0, 30, 60, 0.98) 100%) !important;
    border: 1px solid rgba(100, 181, 246, 0.3) !important;
    border-radius: 12px !important;
    padding: 10px 16px !important;
    font-family: 'Inter', sans-serif !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #fff !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3) !important;
    backdrop-filter: blur(10px) !important;
    letter-spacing: -0.2px !important;
}

.leaflet-tooltip.sede-tooltip::before {
    border-top-color: rgba(10, 37, 64, 0.98) !important;
}

/* Popup moderno mejorado */
.leaflet-popup-modern .leaflet-popup-content-wrapper {
    padding: 0 !important;
    border-radius: 20px !important;
    overflow: hidden !important;
}

.leaflet-popup-modern .leaflet-popup-content {
    margin: 0 !important;
}

.leaflet-popup-modern .leaflet-popup-tip {
    display: none !important;
}

/* Mejoras en marcadores hover */
.custom-div-icon {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    cursor: pointer !important;
}

.custom-div-icon:hover {
    filter: brightness(1.15) drop-shadow(0 8px 16px rgba(0,0,0,0.3)) !important;
}

.equipo-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-xl);
    align-items: center;
}

@media (min-width: 900px) {
    .equipo-grid {
        grid-template-columns: 1.1fr 1fr; /* imagen ligeramente dominante */
        gap: calc(var(--spacing-xl) + 0.5rem);
    }
}

.equipo-image {
    margin: 0;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,0.12);
}

.equipo-image img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
    transform: scale(1);
    transition: transform 400ms ease;
}

.equipo-image:hover img { transform: scale(1.03); }

.slide-h { opacity: 0; transform: translateX(-40px); transition: opacity 700ms ease, transform 700ms ease; }
.slide-h.visible { opacity: 1; transform: translateX(0); }

@media (prefers-reduced-motion: reduce) {
    .slide-h { transition: none; transform: none; opacity: 1; }
}

/* ========================================= */
/* 19. ¿Cómo funciona? - Tema Espacial      */
/* ========================================= */
.como-funciona-section {
    background: linear-gradient(180deg, #0a2540 0%, #001e3c 50%, #0d1b2a 100%);
    position: relative;
    overflow: hidden;
    padding: var(--spacing-xl) 0 calc(var(--spacing-xl) + 2rem) 0;
}

/* Efecto de estrellas/partículas flotantes */
.space-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(2px 2px at 20% 30%, white, transparent),
        radial-gradient(2px 2px at 60% 70%, white, transparent),
        radial-gradient(1px 1px at 50% 50%, white, transparent),
        radial-gradient(1px 1px at 80% 10%, white, transparent),
        radial-gradient(2px 2px at 90% 60%, white, transparent),
        radial-gradient(1px 1px at 33% 80%, white, transparent),
        radial-gradient(1px 1px at 15% 60%, white, transparent);
    background-size: 200% 200%;
    background-position: 0% 0%;
    animation: particlesFloat 60s ease-in-out infinite;
    opacity: 0.6;
    z-index: 0;
}

@keyframes particlesFloat {
    0%, 100% { background-position: 0% 0%; }
    25% { background-position: 100% 50%; }
    50% { background-position: 50% 100%; }
    75% { background-position: 0% 50%; }
}

.como-funciona-section .container {
    position: relative;
    z-index: 1;
}

.como-funciona-intro {
    text-align: center;
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.9);
    max-width: 800px;
    margin: 0 auto 3rem auto;
    line-height: 1.8;
}

.funciona-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem;
    margin-top: 3rem;
}

.funciona-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 3rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.funciona-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 0%, rgba(100, 181, 246, 0.1), transparent 70%);
    opacity: 0;
    transition: opacity 0.5s ease;
}

.funciona-card:hover {
    transform: translateY(-15px) scale(1.02);
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(100, 181, 246, 0.4);
    box-shadow: 
        0 30px 60px rgba(0, 0, 0, 0.3),
        0 0 40px rgba(100, 181, 246, 0.2),
        inset 0 0 20px rgba(100, 181, 246, 0.05);
}

.funciona-card:hover::before {
    opacity: 1;
}

.funciona-icon-wrapper {
    width: 120px;
    height: 120px;
    margin: 0 auto 2rem;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.funciona-icon {
    width: 80px;
    height: 80px;
    filter: drop-shadow(0 0 20px currentColor);
    animation: iconFloat 4s ease-in-out infinite;
}

.funciona-card:nth-child(2) .funciona-icon {
    animation-delay: 1.3s;
}

.funciona-card:nth-child(3) .funciona-icon {
    animation-delay: 2.6s;
}

@keyframes iconFloat {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-15px) rotate(5deg);
    }
}

/* Animación de órbita para los círculos */
.orbit-ring {
    transform-origin: center;
    animation: orbitRotate 20s linear infinite;
}

@keyframes orbitRotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.funciona-card h3 {
    color: white;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
}

.funciona-card p {
    color: rgba(255, 255, 255, 0.85);
    font-size: 1.05rem;
    line-height: 1.7;
}

.funciona-list {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: left;
}

.funciona-list li {
    color: rgba(255, 255, 255, 0.85);
    font-size: 1.05rem;
    line-height: 1.8;
    padding-left: 2rem;
    position: relative;
    margin-bottom: 1rem;
}

.funciona-list li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: #64B5F6;
    font-weight: bold;
    font-size: 1.3rem;
    animation: arrowPulse 2s ease-in-out infinite;
}

.funciona-list li:nth-child(2)::before {
    animation-delay: 0.3s;
}

.funciona-list li:nth-child(3)::before {
    animation-delay: 0.6s;
}

@keyframes arrowPulse {
    0%, 100% {
        transform: translateX(0);
        opacity: 1;
    }
    50% {
        transform: translateX(5px);
        opacity: 0.6;
    }
}

@media (max-width: 768px) {
    .funciona-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .funciona-card {
        padding: 2.5rem 1.5rem;
    }
}
/* ========================================= */
/* Forma Parte Hero - Diseño Moderno        */
/* ========================================= */

.forma-parte-hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0a2540 0%, #001e3c 50%, #0a1929 100%);
    position: relative;
    overflow: hidden;
    padding: 120px 0 80px;
}

.hero-background {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.floating-particle {
    position: absolute;
    background: radial-gradient(circle, rgba(100, 181, 246, 0.4) 0%, transparent 70%);
    border-radius: 50%;
    animation: floatParticle 20s infinite ease-in-out;
}

.particle-1 {
    width: 300px;
    height: 300px;
    top: -100px;
    left: -100px;
    animation-delay: 0s;
}

.particle-2 {
    width: 200px;
    height: 200px;
    top: 50%;
    right: -50px;
    animation-delay: -7s;
}

.particle-3 {
    width: 250px;
    height: 250px;
    bottom: -80px;
    left: 30%;
    animation-delay: -14s;
}

.floating-circle {
    position: absolute;
    border: 3px solid rgba(100, 181, 246, 0.6);
    border-radius: 50%;
    animation: floatInSpace 25s ease-in-out infinite;
}

.circle-1 {
    width: 400px;
    height: 400px;
    top: 10%;
    right: 10%;
    animation: floatInSpace 25s ease-in-out infinite;
}

.circle-2 {
    width: 300px;
    height: 300px;
    bottom: 15%;
    left: 5%;
    animation: floatInSpace 30s ease-in-out infinite reverse;
}

@keyframes floatParticle {
    0%, 100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.3;
    }
    50% {
        transform: translate(50px, -50px) scale(1.1);
        opacity: 0.6;
    }
}

@keyframes floatInSpace {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg) scale(1);
        opacity: 0.2;
    }
    25% {
        transform: translate(30px, -40px) rotate(90deg) scale(1.05);
        opacity: 0.3;
    }
    50% {
        transform: translate(-20px, -60px) rotate(180deg) scale(1.1);
        opacity: 0.25;
    }
    75% {
        transform: translate(-40px, -20px) rotate(270deg) scale(1.05);
        opacity: 0.2;
    }
}

/* Tarjeta Principal con Glassmorphism */
.hero-card {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding: 160px 50px 60px;
    text-align: center;
    z-index: 1;
}

.glass-card {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    border-radius: 32px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.card-glow {
    position: absolute;
    inset: -2px;
    background: linear-gradient(45deg, #64B5F6, #42A5F5, #1E88E5, #64B5F6);
    background-size: 300% 300%;
    border-radius: 32px;
    opacity: 0.5;
    filter: blur(20px);
    animation: glowRotate 6s linear infinite;
    z-index: -1;
}

@keyframes glowRotate {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Icono del Cohete */
.hero-icon {
    margin-bottom: 30px;
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    transition: all 1.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 100;
    pointer-events: none;
}

.rocket-icon {
    filter: drop-shadow(0 4px 12px rgba(255, 107, 107, 0.5));
}

/* Estado normal - cohete flotando */
.hero-icon {
    animation: floatIcon 3s ease-in-out infinite;
}

@keyframes floatIcon {
    0%, 100% {
        transform: translateX(-50%) translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateX(-50%) translateY(-15px) rotate(-3deg);
    }
}

/* Al hacer hover EN EL BOTÓN - cohete con giro gravitacional */
.cta-button-premium:hover ~ * .hero-icon,
.hero-card:has(.cta-button-premium:hover) .hero-icon {
    top: calc(100% - 200px);
    left: 15%;
    transform: translateX(0) translateY(0) rotate(-180deg);
    animation: rocketGravityShake 0.2s ease-in-out infinite;
}

@keyframes rocketGravityShake {
    0%, 100% {
        transform: translateX(0) translateY(0) rotate(-180deg);
    }
    25% {
        transform: translateX(-2px) translateY(1px) rotate(-182deg);
    }
    75% {
        transform: translateX(2px) translateY(-1px) rotate(-178deg);
    }
}

/* Animación de llamas */
.flames {
    animation: flameFlicker 0.15s ease-in-out infinite;
}

@keyframes flameFlicker {
    0%, 100% {
        opacity: 1;
        transform: translateY(0);
    }
    50% {
        opacity: 0.85;
        transform: translateY(2px);
    }
}

/* Animación del cohete en el botón */
.rocket-button-icon {
    display: inline-block;
    animation: rocketFloat 2s ease-in-out infinite;
    transition: all 0.3s ease;
}

@keyframes rocketFloat {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-4px);
    }
}

.cta-button-premium:hover .rocket-button-icon {
    animation: rocketLaunch 0.8s ease-out forwards;
}

@keyframes rocketLaunch {
    0% {
        transform: translateY(0) rotate(0deg);
    }
    30% {
        transform: translateY(-3px) rotate(-5deg);
    }
    60% {
        transform: translateY(-8px) rotate(5deg) scale(1.1);
    }
    100% {
        transform: translateY(-15px) rotate(0deg) scale(1.15);
    }
}

/* Título con Gradiente Animado */
.hero-title {
    font-size: 3rem;
    font-weight: 800;
    margin: 0 0 24px;
    background: linear-gradient(135deg, #ffffff 0%, #64B5F6 30%, #FFD54F 60%, #FF9800 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientShift 4s ease-in-out infinite;
    letter-spacing: -1px;
    line-height: 1.2;
    filter: brightness(1.3) contrast(1.2);
    text-shadow: 0 0 40px rgba(100, 181, 246, 0.5);
    position: relative;
}

.hero-title::before {
    content: attr(data-text);
    position: absolute;
    left: 0;
    top: 0;
    z-index: -1;
    background: linear-gradient(135deg, rgba(100, 181, 246, 0.4) 0%, rgba(255, 213, 79, 0.4) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    filter: blur(20px);
    animation: gradientShift 4s ease-in-out infinite;
}

@keyframes gradientShift {
    0%, 100% {
        background-position: 0% center;
    }
    50% {
        background-position: 100% center;
    }
}

/* Descripción */
.hero-description {
    font-size: 1.25rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 35px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-description strong {
    color: #FFD54F;
    font-weight: 700;
}

/* Badges de Características */
.hero-features {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 40px;
}

.feature-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.feature-badge:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(100, 181, 246, 0.3);
}

/* Botón Premium */
.cta-button-premium {
    position: relative;
    padding: 20px 50px;
    font-size: 1.2rem;
    font-weight: 700;
    color: #0a2540;
    background: linear-gradient(135deg, #FFD54F 0%, #FFA726 100%);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 10px 30px rgba(255, 213, 79, 0.4),
        0 0 0 3px rgba(255, 255, 255, 0.1);
}

.button-content {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 1;
}

.button-shine {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(255, 255, 255, 0.4) 50%,
        transparent 70%
    );
    transform: translateX(-100%) translateY(-100%) rotate(45deg);
    transition: transform 0.6s;
}

.cta-button-premium:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 
        0 20px 40px rgba(255, 213, 79, 0.5),
        0 0 0 5px rgba(255, 255, 255, 0.2),
        0 0 40px rgba(255, 213, 79, 0.6);
}

.cta-button-premium:hover .button-shine {
    transform: translateX(100%) translateY(100%) rotate(45deg);
}

.cta-button-premium:active {
    transform: translateY(-3px) scale(1.02);
}

/* Responsive */
@media (max-width: 768px) {
    .forma-parte-hero {
        padding: 100px 20px 60px;
    }
    
    .hero-card {
        padding: 40px 30px;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-description {
        font-size: 1.1rem;
    }
    
    .cta-button-premium {
        padding: 16px 40px;
        font-size: 1.1rem;
    }
    
    .hero-features {
        gap: 10px;
    }
    
    .feature-badge {
        padding: 10px 18px;
        font-size: 0.85rem;
    }
}

/* ========================================= */
/* SECCIÓN DE CURSOS                         */
/* ========================================= */
.cursos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.curso-card {
    background: var(--color-white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.curso-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

.curso-icon-container {
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.curso-icon-container::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, transparent 70%);
    animation: pulse-glow 3s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { transform: scale(0.8); opacity: 0.5; }
    50% { transform: scale(1.2); opacity: 0.8; }
}

.curso-icon {
    width: 80px;
    height: 80px;
    position: relative;
    z-index: 1;
    transition: transform 0.3s ease;
}

.curso-card:hover .curso-icon {
    transform: scale(1.1) rotate(5deg);
}

.curso-content {
    padding: 1.5rem;
}

.curso-badge {
    display: inline-block;
    padding: 0.35rem 0.9rem;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 50px;
    letter-spacing: 0.5px;
}

.curso-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0.8rem 0 0.6rem;
    color: var(--color-gray-dark);
    line-height: 1.3;
}

.curso-description {
    font-size: 0.95rem;
    color: var(--color-gray-medium);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.curso-meta {
    display: flex;
    align-items: center;
    font-size: 0.85rem;
    color: var(--color-gray-medium);
    margin-bottom: 1.2rem;
}

.curso-meta-icon {
    width: 16px;
    height: 16px;
    margin-right: 8px;
    opacity: 0.7;
}

.curso-button {
    display: block;
    width: 100%;
    padding: 0.9rem 1.5rem;
    text-align: center;
    color: var(--color-white);
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: 12px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.curso-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    color: var(--color-white);
    filter: brightness(1.1);
}

/* Responsive para cursos */
@media (max-width: 768px) {
    .cursos-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .curso-icon-container {
        height: 150px;
    }
    
    .curso-icon {
        width: 60px;
        height: 60px;
    }
    
    .curso-title {
        font-size: 1.2rem;
    }
}

/* ========================================= */
/* CURSOS DENTRO DEL MODAL                   */
/* ========================================= */
.cursos-grid-modal {
    display: flex;
    justify-content: flex-start;
    gap: 1.2rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.curso-card-modal {
    background: var(--color-white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    display: flex;
    flex-direction: column;
    width: 320px;
    max-width: 320px;
    flex-shrink: 0;
}

.curso-card-modal:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
}

.curso-icon-container-modal {
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.curso-icon-container-modal::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, transparent 70%);
    animation: pulse-glow 3s ease-in-out infinite;
}

.curso-icon-modal {
    width: 65px;
    height: 65px;
    position: relative;
    z-index: 1;
    transition: transform 0.3s ease;
    animation: icon-float 3s ease-in-out infinite, icon-glow 2s ease-in-out infinite alternate;
    filter: drop-shadow(0 0 8px rgba(0, 102, 204, 0.3));
}

@keyframes icon-float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-8px);
    }
}

@keyframes icon-glow {
    0% {
        filter: drop-shadow(0 0 5px rgba(0, 102, 204, 0.2));
    }
    100% {
        filter: drop-shadow(0 0 15px rgba(0, 102, 204, 0.5));
    }
}

.curso-card-modal:hover .curso-icon-modal {
    transform: scale(1.1) rotate(5deg);
    animation: none;
}

.curso-content-modal {
    padding: 1.3rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.curso-badge-modal {
    display: inline-block;
    padding: 0.4rem 0.9rem;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 50px;
    letter-spacing: 0.5px;
    width: fit-content;
}

.curso-title-modal {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0.7rem 0 0.5rem;
    color: var(--color-gray-dark);
    line-height: 1.3;
}

.curso-description-modal {
    font-size: 0.9rem;
    color: var(--color-gray-medium);
    line-height: 1.6;
    margin-bottom: 1rem;
    flex-grow: 1;
}

.curso-meta-modal {
    display: flex;
    align-items: center;
    font-size: 0.8rem;
    color: var(--color-gray-medium);
    margin-bottom: 1rem;
}

.curso-meta-icon-modal {
    width: 16px;
    height: 16px;
    margin-right: 6px;
    opacity: 0.7;
}

.curso-button-modal {
    display: block;
    width: 100%;
    padding: 0.85rem 1rem;
    text-align: center;
    color: var(--color-white);
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    margin-top: auto;
}

.curso-button-modal:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    color: var(--color-white);
    filter: brightness(1.1);
}

/* Responsive para cursos en modal */
@media (max-width: 768px) {
    .cursos-grid-modal {
        flex-direction: column;
        align-items: center;
    }
    
    .curso-card-modal {
        width: 100%;
        max-width: 300px;
    }
}