/* =====================================
1. VARIABLES Y RESET
===================================== */
:root {
    --azul-undac: #0038BB;
    --gris: #f2f2f2;
}

/* RESET GENERAL */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Segoe UI", Arial, sans-serif;
}


/* =====================================
2. TOPBAR (BARRA SUPERIOR)
===================================== */
.topbar {
    background: linear-gradient(to left, #0038BB, #0066ff, #0038BB);
    padding: 5px 0;
}

.topbar-container {
    max-width: 1400px; /* MÁS ESPACIO */
    margin: auto;
    padding: 0 20px; /* MENOS padding lateral */
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* AGRUPAR LINKS + BUSCADOR */
.top-links {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: nowrap; /* EVITA QUE BAJE */
}

.topbar a {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    margin-left: 25px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
}

.top-btn {
    font-weight: 600;
}


/* =====================================
3. IDENTIDAD (LOGO + NOMBRE)
===================================== */
.identity {
    background: #fff;
    padding: 15px 0;
}

.identity-container {
    max-width: 1200px;
    margin: auto;
    padding: 0 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* LOGO + TEXTO */
.identity-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.identity-left img {
    height: 72px;
}

.identity-text .uni {
    font-size: 1.2rem;
    color: #555;
    display: block;
    line-height: 1.1;
    margin-bottom: -5px; 
}

/* NOMBRE PRINCIPAL */
.identity-main {
    display: flex;
    align-items: center;
    gap: 14px;
}

.identity-main h1 {
    font-size: 1.5rem;
    letter-spacing: 0.1px;
    line-height: 1.1; /* 👈 MÁS COMPACTO */
}
/* BARRA VERTICAL */
.vertical-divider {
    width: 3px;
    height: 42px;
    background: #000;
}

.virtual {
    font-size: 1rem;
    color: #444;
}

/* LINKS DERECHA */
.identity-links {
    font-size: 0.95rem;
}

.identity-links a {
    color: #000;
    text-decoration: none;
    font-weight: normal;
    position: relative;
    padding: 5px 6px;
    transition: color 0.3s ease;
}

.identity-links span {
    margin: 0 8px;
    color: #999;
}

/* EFECTO HOVER */
.identity-links a::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -4px;
    width: 0;
    height: 2px;
    background: #0066ff;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.identity-links a:hover {
    color: #0066ff;
}

.identity-links a:hover::after {
    width: 100%;
}


/* =====================================
4. SLIDER PRINCIPAL
===================================== */
.slider {
    position: relative;
    width: 100%;
    height: 60vh;
    overflow: hidden;
    background: #fff;
}

/* SLIDES */
.slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 1s ease;
}

.slide.active {
    opacity: 1;
}

/* IMÁGENES */
.slide img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 5s linear;
}

.slide.active img {
    transform: scale(1.05);
}

/* ZONAS DE CONTROL */
.slider-hover {
    position: absolute;
    top: 0;
    width: 15%;
    height: 100%;
    z-index: 20;
    cursor: pointer;
}

.slider-hover.left {
    left: 0;
}

.slider-hover.right {
    right: 0;
}

/* FLECHAS */
.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 4rem;
    color: rgba(0,0,0,0.6);
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
    user-select: none;
}

.slider-hover.left .slider-arrow {
    left: 30px;
}

.slider-hover.right .slider-arrow {
    right: 30px;
}

.slider-hover:hover .slider-arrow {
    opacity: 1;
    transform: translateY(-50%) scale(1.1);
}

/* PROGRESO */
.progress-bar {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 4px;
    background: rgba(0,0,0,0.15);
    z-index: 30;
}

.progress {
    height: 100%;
    width: 0;
    background: #39ff14;
}

/* ANIMACIÓN */
@keyframes progress {
    from { width: 0; }
    to { width: 100%; }
}


/* =====================================
5. AFICHES (AVISOS)
===================================== */
.afiches-section {
    background: var(--gris);
    padding: 90px 40px;
    display: flex;
    justify-content: center;
    gap: 80px;
}

.afiche-box {
    width: 360px;
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0,0,0,0.12);
}

.afiche-title {
    background: linear-gradient(to right, #004cff, #0066ff);
    color: #fff;
    text-align: center;
    padding: 14px;
    font-weight: 600;
}

.afiche-box img {
    width: 100%;
    cursor: pointer;
    transition: transform 0.4s ease;
}

.afiche-box img:hover {
    transform: scale(1.08);
}


/* =====================================
6. MODAL (IMAGEN GRANDE)
===================================== */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.35);
    justify-content: center;
    align-items: center;
    z-index: 999;
}

.modal img {
    max-width: 92%;
    max-height: 92%;
    border-radius: 10px;
}


/* =====================================
7. ACCESOS PRINCIPALES
===================================== */
/* =====================================
sECCIÓN AULA VIRTUAL ULTRA PRO
===================================== */

.access-main {
    padding: 80px 20px;
    background: linear-gradient(180deg, #3f72b4, #f4f6fa);
}

/* CONTENEDOR CENTRAL */
.access-container {
    max-width: 1100px;
    margin: auto;
    background: rgba(255,255,255,0.7);
    backdrop-filter: blur(12px);
    border-radius: 25px;
    padding: 60px 40px;
    box-shadow: 0 25px 70px rgba(0,0,0,0.12);
    text-align: center;
}

/* TITULO */
.access-title {
    font-size: 2.5rem;
    color: #002d9c;
    font-weight: 700;
    margin-bottom: 10px;
}

/* SUBTITULO */
.access-subtitle {
    color: #555;
    margin-bottom: 50px;
}

/* FILA */
.access-row {
    display: flex;
    justify-content: center;
    gap: 50px;
    flex-wrap: wrap;
}

/* TEXTO ARRIBA */
.access-info {
    display: block;
    margin-bottom: 15px;
    color: #666;
    font-size: 0.95rem;
}

/* TARJETAS */
.access-card {
    width: 260px;
    height: 150px;
    background: #fff;
    border-radius: 20px;
    text-decoration: none;
    color: #000;

    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 10px;

    font-weight: 600;

    box-shadow: 0 20px 50px rgba(0,0,0,0.15);
    transition: all 0.35s ease;
    position: relative;
    overflow: hidden;
}

/* ICONO */
.access-card i {
    font-size: 2.2rem;
}

/* TEXTO */
.access-card span {
    font-size: 1rem;
}

/* HOVER PRO */
.access-card:hover {
    transform: translateY(-10px) scale(1.03);
    box-shadow: 0 35px 70px rgba(0,0,0,0.25);
}

/* EFECTO BRILLO */
.access-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255,255,255,0.6), transparent);
    transition: 0.5s;
}

.access-card:hover::before {
    left: 100%;
}

/* COLORES SUPERIORES */
.pregrado {
    border-top: 6px solid #00c853;
}

.posgrado {
    border-top: 6px solid #6a1b9a;
}
/* =====================================
BOTONES AULA VIRTUAL
===================================== */
.access-card {
    position: relative;
    width: 280px;
    height: 140px;
    background: #fff;
    color: #111;
    border-radius: 18px;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 600;
    text-align: center;
    padding: 20px;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
    transition: all 0.35s ease;
}

/* LÍNEA SUPERIOR */
.access-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
}

/* BRILLO */
.access-card::after {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255,255,255,0.7), transparent);
    transition: 0.6s;
}

/* HOVER */
.access-card:hover {
    transform: translateY(-10px) scale(1.03);
    box-shadow: 0 30px 60px rgba(0,0,0,0.25);
}

.access-card:hover::after {
    left: 100%;
}

/* ICONO FLECHA */
.access-card span {
    display: block;
}

.access-card i {
    display: block;
    margin-top: 10px;
    font-size: 1.4rem;
    transition: transform 0.3s;
}

.access-card:hover i {
    transform: translateX(6px);
}

/* PREGRADO */
.pregrado::before {
    background: #00c853;
}

/* POSGRADO */
.posgrado::before {
    background: #7b1fa2;
}

/* =====================================
8. ACCESOS RÁPIDOS
===================================== */
.quick-access {
    background: #f4f6fa;
    padding: 30px 40px;
    text-align: center;
}

.quick-access h2 {
    font-size: 2rem;
    color: #002d9c;
    margin-bottom: 45px;
}

.quick-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 35px;
    max-width: 1100px;
    margin: auto;
}

.quick-card {
    background: #fff;
    border-radius: 18px;
    padding: 40px 20px;
    text-decoration: none;
    color: #000;
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
    transition: transform 0.3s, box-shadow 0.3s;
}

.quick-card i {
    font-size: 2.5rem;
    color: #0038BB;
    margin-bottom: 15px;
}

.quick-card span {
    display: block;
    font-weight: 600;
    font-size: 1.05rem;
}

.quick-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 30px 50px rgba(0,0,0,0.25);
}


/* =====================================
FOOTER CLARO
===================================== */

.footer-main {
    background: linear-gradient(180deg, #535353, #dfe9ff);
    color: #333;
    padding: 90px 30px 60px;
    position: relative;
    z-index: 1;
    overflow: hidden;
}

/* EFECTO LUZ */
.footer-main::before {
    content: "";
    position: absolute;
    top: -60px;
    left: 50%;
    transform: translateX(-50%);
    width: 500px;
    height: 150px;
}

/* CONTENEDOR */
.footer-container {
    max-width: 1200px;
    margin: auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 50px;
}

/* BRAND */
.footer-brand img {
    width: 60px;
    margin-bottom: 10px;
}

.footer-brand h3 {
    color: #002d9c;
    margin-bottom: 10px;
}

.footer-brand p {
    font-size: 0.9rem;
    color: #555;
}

/* COLUMNAS */
.footer-col h4 {
    color: #002d9c;
    margin-bottom: 15px;
    position: relative;
}

/* LINEA */
.footer-col h4::after {
    content: "";
    width: 40px;
    height: 3px;
    background: #0066ff;
    display: block;
    margin-top: 6px;
    border-radius: 5px;
}

/* TEXTOS */
.footer-col p {
    font-size: 0.9rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* LINKS */
.footer-col a {
    display: block;
    text-decoration: none;
    color: #444;
    margin-bottom: 8px;
    font-size: 0.9rem;
    transition: 0.3s;
}

.footer-col a:hover {
    color: #0066ff;
    transform: translateX(6px);
}

/* STATUS */
.status span {
    width: 10px;
    height: 10px;
    background: #00c853;
    border-radius: 50%;
    box-shadow: 0 0 10px #00c853;
}

/* COPY */
.footer-copy {
    background: #e0e7ff;
    color: #002d9c;
    text-align: center;
    padding: 18px;
    font-size: 0.85rem;
    letter-spacing: 1px;
}


/* =====================================
BUSCADOR PRO TOPBAR
===================================== */
.search-box {
    position: relative;
    z-index: 1000;
    display: flex;
    align-items: center;
    background: rgba(255,255,255,0.15);
    border-radius: 30px;
    padding: 6px 12px;
    margin-left: 20px;
    backdrop-filter: blur(10px);
    transition: 0.3s;
}

/* ICONO */
.search-box i {
    color: #fff;
    font-size: 0.9rem;
    margin-right: 6px;
}

/* INPUT */
.search-box input {
    border: none;
    outline: none;
    background: transparent;
    color: #fff;
    width: 140px;
    transition: width 0.3s ease;
}

/* EXPANSIÓN */
.search-box input:focus {
    width: 220px;
}

/* PLACEHOLDER */
.search-box input::placeholder {
    color: rgba(255,255,255,0.7);
}

/* HOVER */
.search-box:hover {
    background: rgba(255,255,255,0.25);
}

/* ===============================
SUGERENCIAS BUSCADOR
=============================== */
.search-box {
    position: relative;
}

.search-suggestions {
    position: absolute;
    top: 110%;
    left: 0;
    width: 220px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.2);
    overflow: hidden;
    display: none;
    z-index: 999;
}

/* ITEM */
.search-suggestions div {
    padding: 10px 12px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: 0.2s;
}

/* HOVER */
.search-suggestions div:hover {
    background: #f0f4ff;
}

/* ===============================
PORTAL DEL ESTUDIANTE (NUEVO)
=============================== */
.portal {
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin-left: 5px;
}

/* TEXTO SUPERIOR */
.portal-top {
    font-size: 0.75rem;
    letter-spacing: 1px;
    color: #666;
}

/* TEXTO PRINCIPAL */
.portal-bottom {
    font-size: 1.05rem;
    font-weight: 700;
    color: #002d9c;
    margin-top: -2px; /* 👈 MÁS JUNTO */
}

/* =====================================
SLIDER PRO MEJORADO (NO ROMPE DISEÑO)
===================================== */

/* SUAVIZAR TRANSICIÓN */
.slide {
    transition: opacity 1s ease, transform 1s ease;
}

/* EFECTO ZOOM SUAVE SOLO ACTIVO */
.slide.active img {
    transform: scale(1.08);
}

/* OVERLAY OSCURO PRO */
.slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(0,0,0,0.5),
        rgba(0,0,0,0.2),
        transparent
    );
    pointer-events: none;
}

/* DOTS (INDICADORES) */
.slider-dots {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 50;
}

.slider-dots span {
    width: 10px;
    height: 10px;
    background: #fff;
    opacity: 0.4;
    border-radius: 50%;
    cursor: pointer;
    transition: 0.3s;
}

.slider-dots span.active {
    opacity: 1;
    background: #39ff14;
}

/* =====================================
SLIDER NIVEL DIOS
===================================== */

/* TRANSICIÓN SUAVE REAL */
.slide {
    opacity: 0;
    transform: scale(1.05);
    transition: opacity 1s ease, transform 6s ease;
}

.slide.active {
    opacity: 1;
    transform: scale(1);
    z-index: 2;
}

/* IMAGEN MÁS FLUIDA */
.slide img {
    transition: transform 6s ease;
}

/* ZOOM CINEMÁTICO */
.slide.active img {
    transform: scale(1.1);
}
/* =====================================
🔥 AVISOS NIVEL DIOS (MEJORADO)
===================================== */

.afiches-section {
    background: linear-gradient(180deg, #fbf4f5, #eef2f8);
    padding: 110px 40px;
}

/* HEADER */
.afiches-header {
    text-align: center;
    margin-bottom: 65px;
}

.afiches-header h2 {
    font-size: 2.4rem;
    color: #002d9c;
    margin-bottom: 12px;
    letter-spacing: 0.5px;
}

/* 🔥 TEXTO PROFESIONAL */
.afiches-header p {
    color: #444;
    font-size: 1.05rem;
    max-width: 750px;
    margin: auto;
    line-height: 1.6;
}

/* 🔴 ALERTA FECHA */
.alerta-fecha {
    display: inline-block;
    margin-top: 10px;
    font-weight: 700;
    color: #b00020;
    background: #ffe5e5;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.95rem;
}

/* GRID MÁS GRANDE */
.afiches-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* 🔥 SIEMPRE 4 EN FILA */
    gap: 30px;
    max-width: 1300px;
    margin: auto;
}

/* CARD */
.afiche-card {
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.12);
    transition: all 0.35s ease;
    position: relative;
}

/* HOVER PRO */
.afiche-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 35px 80px rgba(0,0,0,0.18);
}

/* IMAGEN CONTENEDOR */
.afiche-img {
    width: 100%;
    height: 200px; /* MÁS GRANDE */
    overflow: hidden;
}

/* IMAGEN AJUSTADA */
.afiche-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    cursor: pointer;
}

.afiche-card:hover img {
    transform: scale(1.1);
}

/* CONTENIDO */
.afiche-content {
    padding: 22px;
}

.afiche-content h3 {
    font-size: 1.3rem;
    color: #002d9c;
    margin-bottom: 10px;
}

.afiche-content p {
    font-size: 1rem;
    color: #555;
}

/* BORDE PRO */
.afiche-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 20px;
    padding: 1px;
    background: linear-gradient(120deg, transparent, #0066ff, transparent);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: destination-out;
    opacity: 0;
    transition: 0.4s;
}

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

@media (max-width: 1024px) {
    .afiches-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .afiches-grid {
        grid-template-columns: 1fr;
    }
}
/* 🔥 TEXTO INSTITUCIONAL PRO */
.afiches-header p {
    color: #444;
    font-size: 1.05rem;
    max-width: 750px;
    margin: auto;
    line-height: 1.6;
}

/* DESTACADO DE FECHA */
.alerta-fecha {
    display: inline-block;
    margin-top: 10px;
    font-weight: 700;
    color: #b00020;
    background: #ffe5e5;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.95rem;
}
.afiches-header h2 {
    white-space: nowrap;
}

/* =====================================
🔥 DROPDOWN DOCENTE NIVEL PRO
===================================== */

.docente-dropdown {
    padding: 0;
    overflow: hidden;
    position: relative;
}

/* HEADER */
.docente-header {
    padding: 40px 20px;
    cursor: pointer;
    text-align: center;
    position: relative;
}

/* ICONO PRINCIPAL */
.docente-header i:first-child {
    font-size: 2.5rem;
    color: #0038BB;
    margin-bottom: 10px;
    display: block;
}

/* TEXTO */
.docente-header span {
    display: block;
    font-weight: 600;
}

/* FLECHA */
.arrow {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 0.9rem;
    transition: transform 0.3s ease;
}

/* ROTACIÓN */
.docente-dropdown.active .arrow {
    transform: rotate(180deg);
}

/* SUBMENU */
.docente-submenu {
    max-height: 0;
    overflow: hidden;
    background: #f5f7ff;
    display: flex;
    flex-direction: column;
    transition: max-height 0.35s ease;
}

/* LINKS */
.docente-submenu a {
    padding: 14px;
    text-decoration: none;
    color: #0038BB;
    font-weight: 500;
    border-top: 1px solid #e0e6ff;
    transition: all 0.25s ease;
}

/* HOVER PRO */
.docente-submenu a:hover {
    background: #e8edff;
    transform: translateX(6px);
}

/* ACTIVO */
.docente-dropdown.active .docente-submenu {
    max-height: 220px;
}

/* =====================================
FIX DROPDOWN DOCENTE (AISLADO)
===================================== */

/* SOLO ESTE CARD SE COMPORTA DIFERENTE */
.docente-dropdown {
    position: relative;
    overflow: visible !important; /* 🔥 clave */
}

/* SUBMENU FLOTANTE (NO EMPUJA A LOS DEMÁS) */
.docente-submenu {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #f5f7ff;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);

    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;

    transition: all 0.3s ease;

    z-index: 9999; /* 🔥 CLAVE */
}
.quick-access {
    position: relative;
    z-index: 5;
}
/* ACTIVO */
.docente-dropdown.active .docente-submenu {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}
/* =====================================
🔥 BOTÓN SOPORTE FLOTANTE PRO
===================================== */

.support-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
}

/* BOTÓN PRINCIPAL */
.support-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #0038BB, #0066ff);
    color: #fff;
    font-size: 1.6rem;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    transition: 0.3s;
}

.support-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 15px 40px rgba(0,0,0,0.4);
}

/* MENÚ */
.support-menu {
    position: absolute;
    bottom: 70px;
    right: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px);
    transition: 0.3s;
}

/* ACTIVO */
.support-menu.active {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

/* OPCIONES */
.support-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    border-radius: 12px;
    color: #fff;
    text-decoration: none;
    font-size: 0.95rem;
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
    transition: 0.3s;
}

/* COLORES */
.support-option.gmail {
    background: linear-gradient(135deg, #EA4335, #FBBC05);
}

.support-option.whatsapp {
    background: linear-gradient(135deg, #25D366, #128C7E);
}

/* HOVER */
.support-option:hover {
    transform: translateX(-5px) scale(1.05);
}

/* =====================================
🔥 FIX FINAL SIN ROMPER TU DISEÑO
===================================== */

/* 1. CORREGIR TEXTO QUE DESAPARECE */
.afiches-header h2 {
    white-space: normal !important;
    word-break: break-word;
}

/* 2. CONTROL DE TAMAÑOS (NO MÁS LETRAS GIGANTES) */
.afiches-header h2 {
    font-size: clamp(1.6rem, 4vw, 2.4rem);
}

.afiche-content h3 {
    font-size: clamp(1rem, 2vw, 1.3rem);
    line-height: 1.3;
}

.afiche-content p {
    font-size: clamp(0.9rem, 1.8vw, 1rem);
    line-height: 1.5;
}

/* 3. EVITAR QUE EL TEXTO SE CORTE */
.afiche-content {
    overflow: hidden;
}

/* 4. MEJORAR CELULAR SIN ROMPER GRID */
@media (max-width: 600px) {

    .afiches-section {
        padding: 70px 15px;
    }

    .afiches-header h2 {
        font-size: 1.5rem;
    }

    .afiches-header p {
        font-size: 0.95rem;
    }

    .alerta-fecha {
        font-size: 0.85rem;
    }

    /* 🔥 mantiene tu diseño pero lo hace usable */
    .afiches-grid {
        gap: 20px;
    }

    .afiche-img {
        height: 170px;
    }

}

/* =====================================
🔥 FIX REAL MOBILE (SIN ROMPER DISEÑO)
===================================== */

/* EVITA QUE TODO SE DESPLACE A LA IZQUIERDA */
body {
    overflow-x: hidden;
}

/* CONTENEDOR GENERAL */
.afiches-section {
    padding-left: 15px !important;
    padding-right: 15px !important;
}

/* 🔥 GRID RESPONSIVO REAL */
@media (max-width: 768px) {

    .afiches-grid {
        grid-template-columns: 1fr !important; /* 1 columna */
        gap: 20px;
    }

}

/* TABLET */
@media (max-width: 1024px) and (min-width: 601px) {

    .afiches-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

}

/* 🔥 CORREGIR TÍTULO CORTADO */
.afiches-header h2 {
    white-space: normal !important;
    padding: 0 10px;
}

/* 🔥 TEXTO BIEN CENTRADO */
.afiches-header p {
    padding: 0 10px;
}

/* 🔥 TARJETAS NO SE ESCONDAN */
.afiche-card {
    width: 100%;
}

/* =====================================
🔥 FIX GLOBAL RESPONSIVE PRO
===================================== */

/* 🛑 EVITA SCROLL HORIZONTAL REAL */
html, body {
    max-width: 100%;
    overflow-x: hidden;
}

/* TODOS LOS CONTENEDORES CONTROLADOS */
* {
    max-width: 100%;
}

/* =====================================
TOPBAR RESPONSIVE
===================================== */

@media (max-width: 768px) {

    .topbar-container {
        flex-wrap: wrap;
        gap: 10px;
        padding: 0 15px;
    }

    .topbar a {
        font-size: 0.85rem;
        margin-left: 10px;
    }

}

/* =====================================
IDENTITY (LOGO + TEXTO)
===================================== */

@media (max-width: 768px) {

    .identity-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        padding: 0 15px;
    }

    .identity-main {
        flex-wrap: wrap;
    }

}

/* =====================================
AFICHES (CORRECCIÓN FINAL)
===================================== */

@media (max-width: 768px) {

    .afiches-grid {
        grid-template-columns: 1fr !important;
    }

}

/* =====================================
QUICK ACCESS (TARJETAS)
===================================== */

@media (max-width: 768px) {

    .quick-grid {
        grid-template-columns: 1fr;
    }

}

/* =====================================
FOOTER RESPONSIVE
===================================== */

@media (max-width: 768px) {

    .footer-container {
        grid-template-columns: 1fr !important;
        text-align: center;
        gap: 30px;
    }

    .footer-col a {
        display: block;
        margin-bottom: 8px;
    }

}

/* =====================================
🔥 ANIMACIONES PRO SCROLL
===================================== */

.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}