/* ==========================================
   1. VARIABLES Y RESETEO BASE - DISEÑO ÉPICO Y APPLE
   ========================================== */
:root {
    --primary: #0052cc;
    --primary-light: #0066ff;
    --primary-dark: #003380;
    --text-main: #1d1d1f;
    --text-muted: #6e6e73;
    --border-light: rgba(0, 0, 0, 0.08);
    --bg-white: #ffffff;
    --bg-offwhite: #fbfbfd;
    --apple-shadow: 0 8px 30px rgba(0, 0, 0, 0.05);
    --apple-shadow-hover: 0 20px 50px rgba(0, 50, 150, 0.15);
    --radius-lg: 24px;
    --radius-md: 16px;

    /* 4 TIPOGRAFÍAS PROFESIONALES (CERO ROMANTICISMO) */
    --font-body: 'Inter', sans-serif;
    --font-heading: 'Montserrat', sans-serif;
    --font-epic: 'Oswald', sans-serif;
    --font-badge: 'Roboto', sans-serif;
    --font-handwriting: 'Montserrat', sans-serif; /* Eliminado Caveat */
    --font-elegant: 'Inter', sans-serif; /* Eliminado Cormorant */
    --font-classic: 'Montserrat', sans-serif; /* Eliminado Cinzel */
}

html { scroll-behavior: smooth; scroll-padding-top: 80px; }
* { margin: 0; padding: 0; box-sizing: border-box; }

body { 
    font-family: var(--font-body);
    background-color: var(--bg-offwhite); 
    color: var(--text-main); 
    line-height: 1.6; 
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 { font-family: var(--font-heading); color: var(--text-main); font-weight: 700; }
a { text-decoration: none; color: var(--primary); transition: all 0.4s ease; }
a:hover { color: var(--primary-dark); }
.container { width: 95%; max-width: 1600px; margin: 0 auto; position: relative; z-index: 2; }

/* ==========================================
   2. HEADER Y NAVEGACIÓN
   ========================================== */
.header { 
    background-color: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(25px) saturate(200%);
    -webkit-backdrop-filter: blur(25px) saturate(200%);
    border-bottom: 1px solid rgba(255,255,255,0.4);
    position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
    transition: all 0.5s ease;
}
.navbar { display: flex; justify-content: space-between; align-items: center; height: 80px; }
.logo-container { display: flex; align-items: center; gap: 12px; }
.logo-container img { height: 45px; border-radius: 10px; box-shadow: var(--apple-shadow); }
.logo-container h1 { font-family: var(--font-epic); font-size: 1.5rem; color: var(--primary-dark); margin: 0; letter-spacing: -0.02em; }
.nav-links { display: flex; gap: 32px; list-style: none; }
.nav-links a { font-size: 1rem; font-weight: 500; color: var(--text-main); }
.nav-links a:hover { color: var(--primary); }
.menu-toggle { display: none; font-size: 1.8rem; cursor: pointer; color: var(--text-main); }

/* ==========================================
   3. HERO SECTION (PREMIUM)
   ========================================== */
.hero {
    position: relative; padding: 160px 0 100px; text-align: left;
    background-image: url('../img/hero_premium_blue.jpg');
    background-size: cover; background-position: center;
    background-attachment: fixed;
    overflow: hidden;
}
.hero-overlay {
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(135deg, rgba(0, 34, 102, 0.85) 0%, rgba(0, 119, 237, 0.5) 100%);
    backdrop-filter: blur(2px); z-index: 1;
}
.hero-layout { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: flex-start; }
.hero-text { max-width: 900px; animation: fadeInUp 1s ease-out; }
.hero h2 { font-family: var(--font-epic); font-size: 5.5rem; font-weight: 800; color: #fff; line-height: 1.1; margin-bottom: 24px; text-shadow: 0 15px 40px rgba(0,0,0,0.4); }
.hero p { font-family: var(--font-elegant); font-size: 1.8rem; color: rgba(255, 255, 255, 0.95); max-width: 700px; margin: 0; text-shadow: 0 4px 15px rgba(0,0,0,0.3);  }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: translateY(0); } }

/* ==========================================
   4. SECCIONES COMUNES
   ========================================== */
section { padding: 80px 0; position: relative; }
.section-header { text-align: left; margin-bottom: 50px; position: relative; z-index: 2; }
.section-header h3 { font-family: var(--font-epic); font-size: 3.5rem; font-weight: 800; color: var(--primary-dark); }
.section-subtitle { font-family: var(--font-elegant); font-size: 1.5rem; color: var(--text-muted); margin-top: 16px; max-width: 800px; }

/* ==========================================
   5. TARJETAS (COMUNICADOS - TIPO ENGRAPADOR)
   ========================================== */
.comunicados {
    background-image: url('https://images.unsplash.com/photo-1586281380349-632531db7ed4?auto=format&fit=crop&q=80&w=2000');
    background-size: cover; background-attachment: fixed; background-position: center;
}
.comunicados::before { content: ''; position: absolute; inset: 0; background: rgba(245,247,250,0.9); backdrop-filter: blur(10px); }
.news-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(400px, 1fr)); gap: 40px; position: relative; z-index: 2; }

/* El Clip/Engrapador */
.news-item {
    position: relative;
    background: #fff;
    border-radius: 8px 8px 24px 24px;
    padding: 50px 40px 40px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.06);
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
    border: 1px solid rgba(0,0,0,0.03);
}
.news-item::before {
    content: ''; position: absolute; top: -15px; left: 50%; transform: translateX(-50%);
    width: 60px; height: 30px; background: linear-gradient(180deg, #e5e7eb, #d1d5db);
    border-radius: 20px; box-shadow: inset 0 -3px 5px rgba(0,0,0,0.1), 0 5px 10px rgba(0,0,0,0.1);
    z-index: 10;
}
.news-item::after {
    content: ''; position: absolute; top: -8px; left: 50%; transform: translateX(-50%);
    width: 40px; height: 12px; background: #9ca3af; border-radius: 6px; z-index: 11;
}
.news-item:hover { transform: translateY(-10px) rotate(-1deg); box-shadow: 0 25px 50px rgba(0, 102, 204, 0.15); }

.news-item { overflow: hidden; }
.news-image { width: 100%; border-radius: 12px; overflow: hidden; margin: 20px 0; }
.news-image img { width: 100%; height: 200px; object-fit: cover; display: block; }

.news-date { font-family: var(--font-badge); color: var(--primary); font-size: 0.85rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.1em; display: block; margin-bottom: 12px; }
.news-content h4 { font-family: var(--font-handwriting); font-size: 2.2rem; color: var(--text-main); line-height: 1.1; margin-bottom: 16px;  }
.news-content p { color: var(--text-muted); font-size: 1.05rem; line-height: 1.7; }

/* ==========================================
   6. MICROREDES (SWIPER - CINEMÁTICO ÉPICO)
   ========================================== */
.microredes-section {
    background-image: url('https://images.unsplash.com/photo-1542224566-6e85f2e6772f?auto=format&fit=crop&q=80&w=2000');
    background-size: cover; background-attachment: fixed; background-position: center;
    overflow: hidden;
}
.microredes-section::before { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,10,30,0.9) 0%, rgba(0,50,150,0.7) 100%); backdrop-filter: blur(5px); }
.microredes-section .section-header h3 { color: #fff; }
.microredes-section .section-subtitle { color: rgba(255,255,255,0.8); }
.swiper { width: 100%; padding: 30px 0 80px 0; }

.nodo {
    position: relative; width: 380px; height: 500px;
    border-radius: 32px; background: #000; padding: 0;
    cursor: pointer; overflow: hidden;
    box-shadow: 0 20px 50px rgba(0,0,0,0.4);
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.6s ease;
}
.nodo:hover { transform: translateY(-15px); box-shadow: 0 30px 60px rgba(0, 102, 204, 0.4); }
.nodo-img { width: 100%; height: 100%; object-fit: cover; opacity: 0.6; transition: all 1s cubic-bezier(0.16, 1, 0.3, 1); }
.nodo:hover .nodo-img { transform: scale(1.15); opacity: 0.9; }
.nodo-info {
    position: absolute; bottom: 0; left: 0; right: 0; padding: 50px 30px 30px;
    background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.6) 50%, transparent 100%);
    text-align: left;
}
.nodo-info h5 { font-family: var(--font-epic); font-size: 2.2rem; color: #fff; margin-bottom: 8px; }
.badge-wao { font-family: var(--font-badge); display: inline-block; padding: 6px 14px; background: var(--primary); color: #fff; border-radius: 20px; font-size: 0.75rem; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; }

/* ==========================================
   7. MODAL ÉPICO
   ========================================== */
.modal { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.8); backdrop-filter: blur(15px); z-index: 2000; align-items: center; justify-content: center; opacity: 0; transition: opacity 0.4s ease; display: none; }
.modal.show { display: flex; opacity: 1; }
.modal-content { background: var(--bg-white); border-radius: 32px; width: 90%; max-width: 650px; position: relative; transform: scale(0.9) translateY(20px); transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1); box-shadow: 0 30px 80px rgba(0,0,0,0.3); overflow: hidden; }
.modal.show .modal-content { transform: scale(1) translateY(0); }
.close-modal { position: absolute; top: 20px; right: 20px; width: 40px; height: 40px; border-radius: 20px; background: rgba(0,0,0,0.2); backdrop-filter: blur(5px); border: none; font-size: 1.5rem; color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.3s; z-index: 10; }
.close-modal:hover { background: var(--primary); transform: rotate(90deg); }
.modal-header { position: relative; }
.modal-header img { width: 100%; height: 300px; object-fit: cover; }
.modal-header::after { content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 150px; background: linear-gradient(to top, rgba(255,255,255,1), transparent); }
.modal-header-info { position: absolute; bottom: 0; left: 0; padding: 30px; z-index: 2; }
.modal-header h3 { font-family: var(--font-epic); font-size: 2.5rem; font-weight: 800; color: var(--text-main); margin-bottom: 8px; }
.modal-body { padding: 0 30px 40px; }
.modal-body p { font-family: var(--font-elegant); font-size: 1.25rem; color: var(--text-muted); margin-bottom: 30px;  line-height: 1.7; }
.modal-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.stat-box { background: var(--bg-offwhite); padding: 24px; border-radius: 20px; display: flex; flex-direction: column; border: 1px solid var(--border-light); transition: transform 0.3s; }
.stat-box:hover { transform: translateY(-5px); border-color: var(--primary-light); }
.stat-box strong { font-family: var(--font-badge); font-size: 0.8rem; color: var(--primary); text-transform: uppercase; margin-bottom: 8px; letter-spacing: 0.05em; }
.stat-box span { font-size: 1.2rem; font-weight: 700; color: var(--text-main); }

/* ==========================================
   8. FAQ DINÁMICO (ABSTRACTO)
   ========================================== */
.faq-section { background-image: url('https://images.unsplash.com/photo-1551076805-e1869033e561?auto=format&fit=crop&q=80&w=2000'); background-attachment: fixed; background-size: cover; background-position: center; padding: 60px 0; }
.faq-section::before { content: ''; position: absolute; inset: 0; background: rgba(255,255,255,0.85); backdrop-filter: blur(20px); }
.faq-container { max-width: 800px; margin: 0 auto; background: rgba(255,255,255,0.9); padding: 50px; border-radius: 32px; box-shadow: var(--apple-shadow-hover); position: relative; z-index: 2; }
.faq-item { border-bottom: 1px solid rgba(0,0,0,0.05); }
.faq-item:last-child { border-bottom: none; }
.faq-question { width: 100%; background: none; border: none; padding: 28px 0; display: flex; justify-content: space-between; align-items: center; font-family: var(--font-heading); font-size: 1.25rem; font-weight: 600; color: var(--text-main); cursor: pointer; text-align: left; transition: all 0.3s; }
.faq-question:hover { color: var(--primary); padding-left: 10px; }
.faq-icon { color: var(--primary); transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1); background: var(--bg-offwhite); padding: 8px; border-radius: 50%; }
.faq-item.active .faq-icon { transform: rotate(180deg); background: var(--primary); color: #fff; }
.faq-answer-wrapper { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.4s cubic-bezier(0.16, 1, 0.3, 1); }
.faq-item.active .faq-answer-wrapper { grid-template-rows: 1fr; }
.faq-answer { overflow: hidden; }
.faq-answer p { padding-bottom: 28px; font-family: var(--font-elegant); color: var(--text-muted); font-size: 1.2rem; line-height: 1.7; }

/* ==========================================
   9. CONTACTO
   ========================================== */
.contacto { background-image: url('../img/contact_bg.jpg'); background-size: cover; background-position: center; padding: 60px 0; }
.contacto::before { content: ''; position: absolute; inset: 0; background: rgba(255,255,255,0.7); backdrop-filter: blur(12px); }
.contacto-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; background: rgba(255,255,255,0.85); backdrop-filter: blur(30px); border: 1px solid rgba(255,255,255,0.9); padding: 80px; border-radius: 40px; box-shadow: var(--apple-shadow-hover); position: relative; z-index: 2; }
.contacto-info h3, .contacto-horario h4 { font-family: var(--font-epic); font-size: 2.2rem; color: var(--primary-dark); margin-bottom: 20px; }
.contacto-info p, .contacto-horario p { font-family: var(--font-elegant); color: var(--text-muted); font-size: 1.3rem; margin-bottom: 30px;  }
.lista-contacto { list-style: none; display: flex; flex-direction: column; gap: 20px; }
.lista-contacto li { display: flex; align-items: center; gap: 20px; font-size: 1.1rem; color: var(--text-main); font-weight: 500; }
.lista-contacto svg { color: var(--primary); padding: 10px; background: var(--bg-offwhite); border-radius: 12px; width: 44px; height: 44px; }

/* ==========================================
   10. FOOTER ÉPICO
   ========================================== */
.footer { padding-top: 60px;
    background-image: url('https://images.unsplash.com/photo-1579684385127-1ef15d508118?auto=format&fit=crop&q=80&w=2000');
    background-size: cover; background-position: center; position: relative; color: #fff; 
}
.footer::before { content: ''; position: absolute; inset: 0; background: linear-gradient(135deg, rgba(0,15,40,0.95), rgba(0,50,150,0.85)); }
.footer .container { position: relative; z-index: 2; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 80px; margin-bottom: 80px; }
.footer-logo { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
.footer-logo img { width: 48px; border-radius: 12px; box-shadow: 0 4px 15px rgba(0,0,0,0.3); }
.footer-logo span { font-family: var(--font-classic); font-weight: 700; font-size: 1.4rem; letter-spacing: 0.05em; }
.footer-desc { font-family: var(--font-elegant); color: rgba(255,255,255,0.7); font-size: 1.1rem; max-width: 350px;  }
.footer-links h5 { font-family: var(--font-badge); font-size: 0.9rem; color: #fff; margin-bottom: 24px; text-transform: uppercase; letter-spacing: 0.1em; }
.footer-links ul { list-style: none; }
.footer-links li { margin-bottom: 16px; }
.footer-links a { color: rgba(255,255,255,0.6); font-size: 1rem; transition: color 0.3s; }
.footer-links a:hover { color: #fff; text-shadow: 0 0 10px rgba(255,255,255,0.5); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 30px; display: flex; justify-content: space-between; color: rgba(255,255,255,0.5); font-family: var(--font-badge); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; }

/* TOAST */
.toast-container { position: fixed; top: 100px; right: 40px; z-index: 9999; display: flex; flex-direction: column; gap: 15px; }
.toast { background: rgba(29, 29, 31, 0.9); backdrop-filter: blur(10px); color: white; padding: 16px 20px; border-radius: 16px; display: flex; align-items: center; gap: 16px; box-shadow: var(--apple-shadow-hover); max-width: 350px; animation: slideInTop 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
.toast.fade-out { animation: fadeOut 0.4s ease forwards; }
@keyframes slideInTop { from { transform: translateY(-100%); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes fadeOut { to { opacity: 0; transform: translateY(-20px); } }

/* RESPONSIVE */
@media (max-width: 992px) {
    .hero h2 { font-size: 4rem; }
    .contacto-grid { grid-template-columns: 1fr; padding: 40px; }
    .footer-grid { grid-template-columns: 1fr; gap: 60px; }
}
@media (max-width: 768px) {
    .menu-toggle { display: block; }
    .nav-links { position: absolute; top: 80px; left: 0; width: 100%; background: rgba(255,255,255,0.95); backdrop-filter: blur(20px); flex-direction: column; padding: 20px 0; border-bottom: 1px solid var(--border-light); display: none; }
    .nav-links.active { display: flex; }
    .nav-links a { margin: 15px 0; font-size: 1.2rem; }
    .hero { padding: 160px 0 80px; }
    .hero h2 { font-size: 3rem; }
    .contacto-grid { padding: 30px; border-radius: 24px; }
    .faq-container { padding: 30px; border-radius: 20px; }
}

/* ==========================================
   8.5 ACCESOS RAPIDOS
   ========================================== */
.accesos-section { background: var(--bg-white); }
.accesos-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 24px; position: relative; z-index: 2; }
.acceso-card { background: var(--bg-offwhite); border-radius: 20px; padding: 24px; display: flex; align-items: center; gap: 20px; border: 1px solid rgba(0,0,0,0.05); transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1); cursor: pointer; box-shadow: var(--apple-shadow); text-decoration: none; }
.acceso-card:hover { transform: translateY(-8px) scale(1.02); box-shadow: var(--apple-shadow-hover); background: #fff; border-color: var(--primary-light); }
.acceso-icon { font-size: 2.5rem; background: rgba(0,82,204,0.05); width: 60px; height: 60px; border-radius: 16px; display: flex; justify-content: center; align-items: center; }
.acceso-info h4 { font-family: var(--font-heading); font-size: 1.15rem; color: var(--text-main); margin-bottom: 4px; }
.acceso-info p { font-size: 0.9rem; color: var(--text-muted); font-family: var(--font-body); }

/* Sobrescribir contenedor FAQ para el layout dividido */
.faq-container { max-width: 100%; margin: 0; }
.faq-split-layout { display: grid; grid-template-columns: 1fr 1.2fr; gap: 60px; align-items: center; position: relative; z-index: 2; }
.faq-image-side { position: relative; display: flex; justify-content: center; align-items: center; }
.image-backdrop { position: absolute; width: 350px; height: 350px; background: radial-gradient(circle, rgba(0,82,204,0.15) 0%, rgba(0,82,204,0) 70%); border-radius: 50%; z-index: 1; top: 50%; left: 50%; transform: translate(-50%, -50%); filter: blur(20px); }
.faq-girl { position: relative; z-index: 2; width: 100%; max-width: 450px; filter: drop-shadow(0 20px 40px rgba(0,0,0,0.15)); transition: transform 0.4s ease; }
.faq-girl:hover { transform: scale(1.02); }

@media (max-width: 992px) {
    .faq-split-layout { grid-template-columns: 1fr; }
    .faq-girl { max-width: 350px; margin: 0 auto; display: block; }
}

/* ==========================================
   5.5 REDES SOCIALES (LAYOUT)
   ========================================== */
.comunicados-layout {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 60px;
    align-items: flex-start;
}
.sidebar-title {
    font-family: var(--font-epic);
    font-size: 1.8rem;
    color: var(--primary-dark);
    margin-bottom: 24px;
    text-align: center;
}
.social-sidebar {
    background: rgba(255, 255, 255, 0.7);
    padding: 30px 20px;
    border-radius: 20px;
    box-shadow: var(--apple-shadow);
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    align-items: center;
}
@media (max-width: 1024px) {
    .comunicados-layout { grid-template-columns: 1fr; }
    .social-sidebar { margin-top: 50px; display: flex; flex-direction: column; align-items: center; }
}

.swiper-button-next::after, .swiper-button-prev::after { font-size: 1.2rem !important; font-weight: bold; }
.swiper-button-next:hover, .swiper-button-prev:hover { background: var(--primary) !important; transform: scale(1.1); transition: all 0.3s; }
.microredes-section { padding-bottom: 40px !important; }
