/* =========================================================================
   Modernized CSS for Fundación Educativa Isaías Duarte Cancino
   ========================================================================= */

:root {
    /* Refined Color Palette */
    --primary-blue: #09305A; /* Very dark, premium navy */
    --secondary-blue: #145091; /* Bright navy for gradients */
    --light-bg: #F4F7FB; /* Off-white for clean background */
    --text-dark: #1F2937;
    --text-light: #F9FAFB;
    --accent-color: #FBBF24; /* Vibrant yellow */
    --accent-glow: rgba(251, 191, 36, 0.4);
    --white: #FFFFFF;
    
    /* Shadows & Transitions */
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --transition-smooth: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--light-bg);
    color: var(--text-dark);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, .card-title, blockquote {
    font-family: 'Outfit', sans-serif;
}

/* ---------------- HEADER (Glassmorphism) ---------------- */
.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 15px;
    transition: all 0.4s ease;
}

.logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    color: var(--white);
    transition: all 0.4s ease;
}

.header-logo {
    height: 70px;
    width: auto;
    filter: drop-shadow(0px 4px 8px rgba(0,0,0,0.4));
    transition: all 0.3s ease;
}

.header-logo:hover {
    transform: scale(1.05);
}

.header-titles {
    transition: all 0.3s ease;
}

.header-titles h1 {
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.5px;
}

.header-titles h2 {
    font-size: 1rem;
    font-weight: 400;
    color: var(--accent-color);
}

.header-titles span {
    font-size: 0.75rem;
    font-weight: 300;
    opacity: 0.7;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ---------------- SCROLLED STATE ---------------- */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(9, 48, 90, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: var(--shadow-sm);
    padding: 15px 0;
    transition: padding 0.4s ease, background 0.4s ease;
}

.main-header.scrolled {
    padding: 5px 0;
    background: rgba(9, 48, 90, 0.98);
}

.main-header.scrolled .header-container {
    flex-direction: row;
    justify-content: space-between;
}

.main-header.scrolled .header-titles {
    display: none;
}

.main-header.scrolled .header-logo {
    height: 45px;
}

.main-header.scrolled .main-nav ul {
    gap: 10px;
}

.main-header.scrolled .main-nav ul li a {
    font-size: 0;
    padding: 10px;
    border-radius: 50%;
}

.main-header.scrolled .main-nav ul li a i {
    font-size: 1.2rem;
    margin: 0;
}

.main-header.scrolled .main-nav ul li.dropdown > a .small-icon {
    display: none;
}

/* ---------------- NAVIGATION ---------------- */
.main-nav ul {
    list-style: none;
    display: flex;
    gap: 25px;
    align-items: center;
}

.main-nav ul li {
    position: relative;
}

.main-nav ul li a {
    color: var(--text-light);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 6px;
}

.main-nav ul li a:hover, 
.main-nav ul li a.active {
    background: rgba(255, 255, 255, 0.1);
    color: var(--accent-color);
}

.search-btn {
    background: var(--accent-color);
    color: var(--primary-blue) !important;
    border-radius: 50% !important;
    padding: 10px 12px !important;
}

.search-btn:hover {
    background: #FFF;
    box-shadow: 0 0 15px var(--accent-glow);
    transform: translateY(-2px);
}

/* Dropdown */
.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    min-width: 240px;
    box-shadow: var(--shadow-lg);
    border-radius: 12px;
    border: 1px solid rgba(0,0,0,0.05);
    flex-direction: column;
    padding: 10px;
    z-index: 20;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.dropdown:hover .dropdown-menu {
    display: flex;
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(5px);
}

.dropdown-menu li a {
    color: var(--text-dark) !important;
    padding: 12px 15px;
    border-radius: 8px;
}

.dropdown-menu li a:hover {
    background: var(--light-bg);
    color: var(--primary-blue) !important;
    transform: translateX(5px);
}

/* Nested Dropdown */
.dropdown-submenu {
    position: relative;
}
.sub-menu {
    display: none;
    position: absolute;
    top: 0;
    left: 100%;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    min-width: 200px;
    box-shadow: var(--shadow-lg);
    border-radius: 12px;
    border: 1px solid rgba(0,0,0,0.05);
    flex-direction: column;
    padding: 10px;
    z-index: 30;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    margin-left: 10px;
}
.dropdown-submenu:hover .sub-menu {
    display: flex;
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}
.sub-menu li a {
    color: var(--text-dark) !important;
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 0.85rem;
}
.sub-menu li a:hover {
    background: var(--light-bg);
    color: var(--primary-blue) !important;
    transform: translateX(5px);
}

/* ---------------- HERO SECTION ---------------- */
.hero-section {
    position: relative;
    padding: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    background: linear-gradient(135deg, var(--white) 0%, #E2EAF4 100%);
    overflow: hidden;
}

.hero-content-wrapper {
    position: relative;
    padding: 60px 5% 150px;
    width: 100%;
    display: flex;
    justify-content: center;
}

/* Abstract Background Glows */
.glow-circle {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    z-index: 0;
    opacity: 0.6;
}
.top-left {
    top: -100px;
    left: -100px;
    width: 400px;
    height: 400px;
    background: rgba(20, 80, 145, 0.2);
}
.bottom-right {
    bottom: 50px;
    right: -50px;
    width: 500px;
    height: 500px;
    background: rgba(251, 191, 36, 0.15);
}

.hero-container {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1300px;
    gap: 60px;
    flex-wrap: wrap;
}

.hero-logo-box {
    display: flex;
    align-items: center;
    gap: 35px;
    flex: 1.2;
    min-width: 320px;
}

.hero-large-logo {
    height: 240px;
    width: auto;
    filter: drop-shadow(0 15px 25px rgba(0,0,0,0.15)) drop-shadow(0 5px 10px rgba(0,0,0,0.05));
    transition: var(--transition-smooth);
    animation: floatLogo 4s ease-in-out infinite;
}

.hero-large-logo:hover {
    transform: scale(1.05) rotate(2deg);
    filter: drop-shadow(0 20px 30px rgba(0,0,0,0.2));
}

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

.hero-logo-text h2 {
    font-size: 1.8rem;
    font-weight: 300;
    color: #E2EAF4;
    margin-bottom: -5px;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
}

.gradient-text {
    font-size: 2.8rem;
    font-weight: 800;
    background: linear-gradient(90deg, #60A5FA, #ffffff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.1;
    margin-bottom: 12px;
    filter: drop-shadow(0px 2px 4px rgba(0,0,0,0.4));
}

.subtitle-badge {
    display: inline-block;
    background: var(--primary-blue);
    color: var(--white);
    padding: 6px 16px;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 1px;
}

.hero-quote-box {
    flex: 1;
    min-width: 320px;
}

.hero-quote-box blockquote {
    font-size: 2.6rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.3;
    position: relative;
    text-shadow: 2px 2px 5px rgba(0,0,0,0.6);
}

.quote-mark {
    position: absolute;
    top: -40px;
    left: -30px;
    font-size: 6rem;
    color: var(--accent-color);
    opacity: 0.3;
    font-family: serif;
    z-index: -1;
}

.highlight-yellow {
    position: relative;
    display: inline-block;
}

.highlight-yellow::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 0;
    width: 100%;
    height: 12px;
    background: var(--accent-glow);
    z-index: -1;
    border-radius: 4px;
    transform: rotate(-1deg);
}


/* Hero Button */
.hero-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--accent-color);
    color: var(--primary-blue);
    padding: 12px 25px;
    border-radius: 30px;
    font-size: 1.1rem;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 10px 20px rgba(251, 191, 36, 0.3);
    transition: var(--transition-smooth);
}

.hero-btn:hover {
    background: var(--white);
    color: var(--primary-blue);
    transform: translateY(-5px);
    box-shadow: 0 15px 25px rgba(251, 191, 36, 0.4);
}

/* Hero Bottom Wave */
.hero-wave {
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
    transform: rotate(180deg);
}

.hero-wave svg {
    position: relative;
    display: block;
    width: calc(100% + 1.3px);
    height: 120px;
}

.hero-wave .shape-fill {
    fill: var(--light-bg);
}

/* ---------------- CONTENT SECTION (Overlapping Cards) ---------------- */
.content-section {
    position: relative;
    padding-bottom: 120px;
    z-index: 5;
}

.mission-vision-container {
    max-width: 1200px;
    margin: -80px auto 0; /* Negative margin to overlap the wave */
    display: flex;
    justify-content: center;
    gap: 40px;
    padding: 0 20px;
    flex-wrap: wrap;
}

.modern-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    padding: 50px 40px;
    border-radius: 24px;
    box-shadow: var(--shadow-lg);
    flex: 1;
    min-width: 320px;
    text-align: center;
    position: relative;
    transition: var(--transition-smooth);
    overflow: hidden;
}

.modern-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background: linear-gradient(90deg, var(--secondary-blue), var(--primary-blue));
    opacity: 0;
    transition: opacity 0.3s;
}

.modern-card:hover {
    transform: translateY(-12px);
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
}

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

.card-icon-wrapper {
    width: 70px;
    height: 70px;
    background: var(--light-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    color: var(--secondary-blue);
    font-size: 28px;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.06);
    transition: var(--transition-smooth);
}

.modern-card:hover .card-icon-wrapper {
    background: var(--secondary-blue);
    color: var(--white);
    transform: scale(1.1);
}

.card-title {
    color: var(--primary-blue);
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 15px;
}

.card-divider {
    width: 50px;
    height: 4px;
    background: var(--accent-color);
    margin: 0 auto 25px;
    border-radius: 2px;
}

.modern-card p {
    font-size: 1.1rem;
    line-height: 1.7;
    color: #4B5563;
}

/* ---------------- HISTORY SECTION ---------------- */
.history-section {
    padding: 20px 5% 100px;
    background-color: var(--light-bg);
}

.history-container {
    max-width: 1000px;
    margin: 0 auto;
    background: var(--white);
    padding: 60px 80px;
    border-radius: 24px;
    box-shadow: 0 15px 40px rgba(9, 48, 90, 0.08);
    border: 1px solid rgba(9, 48, 90, 0.05);
    border-top: 5px solid var(--primary-blue);
}

.history-header {
    text-align: center;
    margin-bottom: 40px;
}

.history-icon {
    font-size: 35px;
    color: var(--accent-color);
    margin-bottom: 15px;
}

.history-title {
    font-size: 2.2rem;
    color: var(--primary-blue);
    font-weight: 700;
}

.title-divider {
    width: 60px;
    height: 4px;
    background: var(--accent-color);
    margin: 20px auto 0;
    border-radius: 2px;
}

.history-content p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #4B5563;
    margin-bottom: 25px;
    text-align: justify;
}

.history-content p:last-child {
    margin-bottom: 0;
    font-weight: 500;
    color: var(--primary-blue);
    padding: 25px;
    background: #F4F7FB;
    border-left: 5px solid var(--accent-color);
    border-radius: 6px;
}

/* ---------------- COLEGIOS DIOCESANOS ---------------- */
.colegios-section {
    padding: 20px 5% 100px;
    background-color: var(--light-bg);
}

.colegios-container {
    max-width: 1300px;
    margin: 0 auto;
    text-align: center;
}

.colegios-title-box {
    background: var(--white);
    padding: 18px 40px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15); /* strong drop shadow based on image */
    display: inline-block;
    width: 85%;
    max-width: 900px;
    margin-bottom: 60px;
}

.colegios-title-box h2 {
    font-size: 1.6rem;
    color: #444;
    font-weight: 500;
    letter-spacing: 1.5px;
}

.colegios-grid {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 60px;
    flex-wrap: wrap;
}

.colegio-item {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.colegio-item:hover {
    transform: translateY(-8px) scale(1.08);
}

.colegio-logo {
    width: 150px;
    height: auto;
    max-height: 180px;
    object-fit: contain;
    filter: drop-shadow(0 6px 12px rgba(0,0,0,0.1));
}

@media (max-width: 768px) {
    .colegios-title-box h2 {
        font-size: 1.2rem;
    }
    .colegios-grid {
        gap: 40px;
    }
    .colegio-logo {
        width: 120px;
    }
}

/* ---------------- FOOTER ---------------- */
.main-footer {
    background-color: var(--primary-blue);
    color: var(--text-light);
    margin-top: 250px; /* Increased margin for the taller wave */
    position: relative;
    border-top: none;
}

.main-footer::before {
    content: '';
    position: absolute;
    top: -220px; /* Taller wave */
    left: 0;
    width: 100%;
    height: 221px; /* Taller wave */
    background-image: url('data:image/svg+xml;utf8,<svg viewBox="0 0 1440 320" preserveAspectRatio="none" xmlns="http://www.w3.org/2000/svg"><path fill="%2309305A" fill-opacity="0.3" d="M0,128L48,138.7C96,149,192,171,288,181.3C384,192,480,192,576,170.7C672,149,768,107,864,101.3C960,96,1056,128,1152,144C1248,160,1344,160,1392,160L1440,160L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path><path fill="%2309305A" fill-opacity="0.6" d="M0,224L48,229.3C96,235,192,245,288,218.7C384,192,480,128,576,133.3C672,139,768,213,864,229.3C960,245,1056,203,1152,181.3C1248,160,1344,160,1392,160L1440,160L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path><path fill="%2309305A" d="M0,288L48,272C96,256,192,224,288,218.7C384,213,480,235,576,234.7C672,235,768,213,864,197.3C960,181,1056,171,1152,181.3C1248,192,1344,224,1392,240L1440,256L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>');
    background-size: 100% 100%;
    background-repeat: no-repeat;
    background-position: bottom;
    z-index: 0;
    pointer-events: none;
}

.footer-container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 70px 5% 50px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 50px;
}

.footer-col h3 {
    font-size: 1.6rem;
    margin-bottom: 5px;
    color: var(--white);
}

.footer-col h4 {
    font-size: 1.3rem;
    color: var(--accent-color);
    margin-bottom: 30px;
    position: relative;
    display: inline-block;
}

.footer-col h4::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -10px;
    width: 45px;
    height: 3px;
    background-color: var(--accent-color);
    border-radius: 2px;
}

.footer-logo {
    height: 100px;
    margin-bottom: 25px;
    filter: drop-shadow(0 5px 8px rgba(0,0,0,0.4));
    transition: transform 0.3s ease;
}

.footer-logo:hover {
    transform: scale(1.05);
}

.footer-brand p {
    color: #93C5FD;
    font-size: 1rem;
    margin-bottom: 25px;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background: rgba(255,255,255,0.08);
    color: var(--white);
    border-radius: 50%;
    text-decoration: none;
    font-size: 1.2rem;
    transition: var(--transition-smooth);
    border: 1px solid rgba(255,255,255,0.1);
}

.social-links a:hover {
    background: var(--accent-color);
    color: var(--primary-blue);
    transform: translateY(-5px);
    box-shadow: 0 10px 15px rgba(0,0,0,0.2);
    border-color: var(--accent-color);
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    margin-bottom: 25px;
    font-size: 1rem;
    line-height: 1.6;
    color: #E2E8F0;
}

.footer-col ul li i {
    color: var(--accent-color);
    font-size: 1.3rem;
    margin-top: 5px;
}

.footer-col ul li a {
    color: #E2E8F0;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-col ul li a:hover, .mail-link:hover {
    color: var(--accent-color);
}

.mail-link {
    color: var(--accent-color);
    font-weight: 600;
}

.extensions {
    display: block;
    margin-top: 12px;
    padding-left: 15px;
    border-left: 2px solid rgba(255,255,255,0.2);
    font-size: 0.9rem;
    color: #CBD5E1;
}

.footer-bottom {
    background-color: #051C36;
    text-align: center;
    padding: 25px 20px;
    font-size: 0.95rem;
    color: #94A3B8;
}

/* ---------------- CONVOCATORIAS ---------------- */
.convocatorias-section {
    padding: 60px 5% 100px;
    background-color: var(--light-bg);
}

.convocatorias-container {
    max-width: 1300px;
    margin: 0 auto;
}

.convocatorias-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.modern-convocatoria-card {
    background: var(--white);
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    border: 1px solid rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.modern-convocatoria-card:has(.card-image-box) {
    padding: 0;
}

.modern-convocatoria-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
    border-color: var(--accent-color);
}

.card-meta {
    font-size: 0.85rem;
    color: #6B7280;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
}

.card-meta i {
    color: var(--primary-blue);
}

.card-title {
    font-size: 1.15rem;
    color: var(--primary-blue);
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 15px;
}

.card-divider-small {
    width: 40px;
    height: 3px;
    background: var(--accent-color);
    margin-bottom: 15px;
    border-radius: 2px;
}

.card-snippet {
    font-size: 0.95rem;
    color: #4B5563;
    line-height: 1.6;
    margin-bottom: 25px;
    flex-grow: 1; /* Pushes read more to bottom */
}

.read-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-blue);
    font-weight: 600;
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.3s ease;
    margin-top: auto;
}

.read-more:hover {
    color: var(--accent-color);
}

.card-image-box {
    width: 100%;
    height: 180px;
    overflow: hidden;
}

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

.modern-convocatoria-card:hover .card-image {
    transform: scale(1.05);
}

.card-content-wrapper {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

/* ---------------- CONTACTENOS (REDESIGN - EDUCATIONAL) ---------------- */
.contact-page {
    max-width: 1100px;
    margin: 50px auto 100px;
    padding: 0 5%;
}

.contact-hero {
    text-align: center;
    margin-bottom: 50px;
    background: #fdfbf7;
    padding: 40px 20px;
    border-radius: 20px;
    border: 2px dashed #e8dcc4;
}
.contact-title-main {
    color: var(--primary-blue, #2a5c8d);
    font-size: 2.8rem;
    font-weight: 800;
    margin-bottom: 10px;
    font-family: 'Outfit', sans-serif;
    letter-spacing: -0.5px;
}
.contact-subtitle {
    color: #555;
    font-size: 1.15rem;
    max-width: 600px;
    margin: 0 auto;
}

.contact-page-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 40px;
    align-items: start;
}
@media (max-width: 992px) {
    .contact-page-grid {
        grid-template-columns: 1fr;
    }
}

.contact-info-column {
    display: flex;
    flex-direction: column;
    gap: 25px;
}
.contact-info-block {
    background: #ffffff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(9, 48, 90, 0.08);
    border-top: 4px solid var(--accent-color, #f1a542);
    position: relative;
    overflow: hidden;
}
.contact-info-block::before {
    content: '\f19d'; /* Graduation cap icon as subtle watermark */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    right: -20px;
    bottom: -20px;
    font-size: 8rem;
    color: rgba(9, 48, 90, 0.03);
    z-index: 0;
    transform: rotate(-15deg);
}
.contact-info-block h3, .contact-info-block p, .contact-info-block .contact-map-mini {
    position: relative;
    z-index: 1;
}
.contact-info-block h3 {
    font-size: 1.3rem;
    color: var(--primary-blue, #2a5c8d);
    margin-bottom: 20px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #f0f4f8;
    padding-bottom: 10px;
}
.contact-info-block p {
    color: #4B5563;
    font-size: 1.05rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
}
.contact-info-block p i {
    color: var(--primary-blue, #09305A);
    background: #f0f7ff;
    padding: 10px;
    border-radius: 8px;
    font-size: 1.1rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.contact-map-mini {
    margin-top: 20px;
    height: 220px;
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid #e5e7eb;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.05);
}
.contact-map-mini iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.contact-form-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 45px;
    box-shadow: 0 10px 30px rgba(9, 48, 90, 0.08);
    border-top: 6px solid var(--primary-blue, #09305A);
}
.form-group {
    margin-bottom: 20px;
}
.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--primary-blue, #09305A);
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}
.form-control {
    width: 100%;
    padding: 15px 20px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    background: #f9fafb;
    color: #1f2937;
    transition: all 0.3s ease;
}
.form-control:focus {
    outline: none;
    border-color: var(--primary-blue, #09305A);
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(9, 48, 90, 0.1);
}
.form-row {
    display: flex;
    gap: 20px;
}
.form-row .half {
    flex: 1;
}
@media (max-width: 600px) {
    .form-row {
        flex-direction: column;
        gap: 0;
    }
}
.btn-submit-contact {
    background: var(--primary-blue, #09305A);
    color: white;
    width: 100%;
    padding: 18px;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 20px;
    letter-spacing: 1px;
    text-transform: uppercase;
}
.btn-submit-contact:hover {
    background: #145091;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(9, 48, 90, 0.25);
}

/* ---------------- GALERIA ---------------- */
.gallery-section {
    padding: 60px 5%;
    max-width: 1400px;
    margin: 40px auto 100px;
}
.gallery-grid-layout {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 40px;
}
@media (max-width: 992px) {
    .gallery-grid-layout {
        grid-template-columns: 1fr;
    }
}

.gallery-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.gallery-placeholder {
    background-color: #E5E7EB;
    height: 300px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9CA3AF;
    font-size: 2.5rem;
    box-shadow: inset 0 2px 10px rgba(0,0,0,0.05);
}
.gallery-btn {
    background: #3B82F6;
    color: white;
    padding: 18px;
    text-align: center;
    border-radius: 4px;
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    border: 2px solid #2563EB;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}
.gallery-btn:hover {
    background: #2563EB;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

.gallery-thumbnails {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}
.gallery-thumb-item {
    aspect-ratio: 4/3;
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}
.gallery-thumb-item::after {
    content: '\f0b2';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    inset: 0;
    background: rgba(9, 48, 90, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.gallery-thumb-item:hover::after {
    opacity: 1;
}
.gallery-thumb-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.gallery-thumb-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}
.gallery-thumb-item:hover img {
    transform: scale(1.1);
}

/* Modal Lightbox */
.gallery-modal {
    display: none;
    position: fixed;
    z-index: 99999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.9);
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}
.gallery-modal.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}
.gallery-modal-content {
    max-width: 90vw;
    max-height: 85vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}
.gallery-modal-content img {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    animation: zoomIn 0.3s ease;
}
.modal-close {
    position: absolute;
    top: -40px;
    right: 0px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
    line-height: 1;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}
.modal-close:hover {
    color: var(--accent-color);
}
.modal-prev, .modal-next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 30px;
    transition: 0.3s ease;
    background-color: rgba(255,255,255,0.1);
    border-radius: 50%;
    user-select: none;
}
.modal-prev {
    left: -80px;
}
.modal-next {
    right: -80px;
}
.modal-prev:hover, .modal-next:hover {
    background-color: rgba(255,255,255,0.3);
    color: var(--accent-color);
}
@media (max-width: 768px) {
    .modal-prev { left: 10px; }
    .modal-next { right: 10px; }
    .modal-close { top: -45px; right: 10px; }
}



/* ---------------- ANIMATIONS ---------------- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.delay-1 {
    animation-delay: 0.3s;
    opacity: 0; /* Keep hidden until animation starts */
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(37, 211, 102, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

/* ---------------- WHATSAPP BUTTON ---------------- */
.whatsapp-float {
    position: fixed;
    width: 65px;
    height: 65px;
    bottom: 40px;
    left: 40px;
    background-color: #25d366;
    color: #FFF;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 35px;
    z-index: 100;
    text-decoration: none;
    transition: var(--transition-smooth);
    animation: pulse 2s infinite;
}

.whatsapp-float:hover {
    transform: scale(1.15) rotate(-5deg);
    background-color: #1ebe57;
    animation: none;
}

.wa-tooltip {
    position: absolute;
    left: 80px;
    background: var(--white);
    color: var(--text-dark);
    padding: 10px 20px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: var(--shadow-md);
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transform: translateX(-15px);
    transition: var(--transition-smooth);
}

.whatsapp-float:hover .wa-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

.wa-tooltip::before {
    content: '';
    position: absolute;
    left: -6px;
    top: 50%;
    transform: translateY(-50%);
    border-width: 6px 6px 6px 0;
    border-style: solid;
    border-color: transparent var(--white) transparent transparent;
}

/* ---------------- FOOTER ---------------- */
.main-footer {
    background-color: var(--primary-blue);
    color: var(--white);
    padding: 60px 0 20px;
    font-family: 'Inter', sans-serif;
    margin-top: 250px;
    position: relative;
    border-top: none;
}
.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 5%;
}
.footer-col h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    color: var(--accent-color);
}
.footer-col h4 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: var(--accent-color);
    position: relative;
    padding-bottom: 10px;
}
.footer-col h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background-color: var(--accent-color);
    border-radius: 2px;
}
.footer-logo {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}
.footer-logo img {
    height: 60px;
    width: auto;
}
.footer-logo span {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.8);
}
.footer-col p {
    font-size: 0.95rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 25px;
}
.social-links {
    display: flex;
    gap: 15px;
}
.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--white);
    transition: var(--transition-smooth);
}
.social-links a:hover {
    background-color: var(--accent-color);
    color: var(--primary-blue);
    transform: translateY(-3px);
}
.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.footer-col ul li {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 20px;
    font-size: 0.95rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
}
.footer-col ul li i {
    color: var(--accent-color);
    font-size: 1.1rem;
    margin-top: 3px;
}
.footer-col ul li a {
    color: rgba(255, 255, 255, 0.9);
    transition: color 0.3s ease;
}
.footer-col ul li a:hover,
.mail-link:hover {
    color: var(--accent-color);
}
.extensions {
    display: block;
    font-size: 0.85rem;
    margin-top: 8px;
    color: rgba(255, 255, 255, 0.7);
    padding-left: 10px;
    border-left: 2px solid rgba(255, 255, 255, 0.2);
}
.footer-bottom {
    text-align: center;
    padding: 20px 5%;
    margin-top: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
}

/* ---------------- RESPONSIVE ---------------- */
@media (max-width: 1024px) {
    .header-container {
        flex-direction: column;
        gap: 15px;
    }
    .hero-container {
        flex-direction: column;
        text-align: center;
    }
    .hero-logo-box {
        flex-direction: column;
    }
    .hero-quote-box blockquote {
        font-size: 2.2rem;
    }
    .quote-mark {
        left: 50%;
        transform: translateX(-50%);
        top: -30px;
    }
    .history-container {
        padding: 40px 40px;
    }
}

@media (max-width: 768px) {
    .main-nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }
    .gradient-text {
        font-size: 2.2rem;
    }
    .mission-vision-container {
        margin-top: -40px;
    }
    .history-container {
        padding: 30px 20px;
        border-radius: 16px;
    }
    .whatsapp-float {
        bottom: 20px;
        left: 20px;
        width: 55px;
        height: 55px;
        font-size: 30px;
    }
    .wa-tooltip {
        display: none;
    }
    
    /* Contact Section Responsive */
    .contact-header-bar {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .contact-title-box {
        padding: 15px 20px;
        font-size: 1.1rem;
        width: 100%;
        max-width: 100%;
    }
    .btn-plataforma-google {
        width: 100%;
        text-align: center;
        padding: 15px 20px;
    }
    .contact-tables-section {
        padding: 20px 15px;
    }
    .modern-table {
        display: block;
        width: 100%;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
    }
}

/* ---------------- PERFIL DEL MAESTRO ---------------- */
.perfil-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}
.perfil-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 12px;
    padding: 35px 25px 25px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
}
.perfil-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    background: #ffffff;
}
.perfil-number {
    position: absolute;
    top: -15px;
    right: 5px;
    font-size: 6rem;
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    color: rgba(9, 48, 90, 0.04);
    z-index: 0;
    line-height: 1;
    pointer-events: none;
    transition: color 0.3s ease;
}
.perfil-card:hover .perfil-number {
    color: rgba(251, 191, 36, 0.15); /* turns faint yellow on hover */
}
.perfil-text {
    position: relative;
    z-index: 1;
    color: #4B5563;
    font-size: 0.95rem;
    line-height: 1.6;
    font-weight: 400;
}

/* ---------------- FORMATOS FEIDC ACCORDION ---------------- */
.formatos-section {
    padding: 60px 5% 100px;
    background-color: var(--light-bg);
}
.formatos-header {
    text-align: center;
    margin-bottom: 60px;
    position: relative;
    padding-bottom: 20px;
}
.formatos-header h1 {
    font-size: 3rem;
    color: #0A66C2; /* Vibrant modern blue */
    font-weight: 700;
    margin-bottom: 10px;
}
.formatos-wave-divider {
    width: 100%;
    height: 40px;
    background: url('data:image/svg+xml;utf8,<svg viewBox="0 0 1200 120" preserveAspectRatio="none" xmlns="http://www.w3.org/2000/svg"><path d="M0,0 C300,120 900,-60 1200,60 L1200,120 L0,120 Z" fill="%230A66C2" opacity="0.8"/></svg>') no-repeat center center;
    background-size: cover;
    margin: 0 auto;
}

.accordion-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    align-items: start;
}

.accordion-item {
    background: #0A66C2; /* Solid blue as requested */
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(10, 102, 194, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.accordion-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 25px rgba(10, 102, 194, 0.25);
}

.accordion-header {
    padding: 20px 25px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--white);
    background: #0A66C2;
    transition: background 0.3s ease;
}

.accordion-header:hover {
    background: #0855A3; /* Slightly darker on hover */
}

.accordion-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
    text-transform: uppercase;
}

.accordion-icon {
    font-size: 1.5rem;
    font-weight: 300;
    transition: transform 0.3s ease;
    width: 24px;
    height: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
}

.accordion-item.active .accordion-icon {
    transform: rotate(45deg); /* Turns + into x */
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
    background: #0855A3; /* Slightly darker than header to differentiate */
}

.accordion-body {
    padding: 20px 25px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    color: rgba(255,255,255,0.9);
}

.download-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--white);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    padding: 8px 0;
    transition: color 0.3s ease;
}

.download-link i {
    font-size: 1.2rem;
    color: var(--accent-color);
}

.download-link:hover {
    color: var(--accent-color);
}

@media (max-width: 768px) {
    .accordion-grid {
        grid-template-columns: 1fr;
    }
}

/* ---------------- SEARCH MODAL ---------------- */
.search-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    top: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(-20px) scale(0.95);
    width: 650px;
    max-width: 95%;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    opacity: 0;
    transition: all 0.3s ease;
    overflow: hidden;
}

.search-modal.show {
    display: block;
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1);
}

.search-modal-container {
    padding: 30px 40px;
    display: flex;
    flex-direction: column;
}

.search-modal-logo {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.search-modal-logo img {
    height: 60px;
    width: auto;
    object-fit: contain;
}

.search-modal-logo .logo-text {
    display: flex;
    flex-direction: column;
}

.search-modal-logo .logo-text h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
    line-height: 1.2;
    font-family: 'Outfit', sans-serif;
}

.search-modal-logo .logo-text h3 {
    font-size: 1.05rem;
    font-weight: 600;
    color: #334155;
    margin: 0;
    line-height: 1.2;
    font-family: 'Outfit', sans-serif;
}

.search-modal-logo .logo-text p {
    font-size: 0.85rem;
    color: #64748b;
    margin: 2px 0 0 0;
    line-height: 1.2;
    font-family: 'Inter', sans-serif;
}

.close-search {
    position: absolute;
    top: 15px;
    right: 20px;
    color: #9CA3AF;
    font-size: 24px;
    font-weight: 300;
    cursor: pointer;
    transition: transform 0.3s ease, color 0.3s ease;
    line-height: 1;
    z-index: 10;
}

.close-search:hover {
    color: #EF4444;
}

.search-input-wrapper {
    position: relative;
    width: 100%;
    margin-bottom: 25px;
}

#search-input {
    width: 100%;
    padding: 12px 20px 12px 50px;
    font-size: 1.1rem;
    color: #4B5563;
    background: #ffffff;
    border: 2px solid #0A66C2;
    border-radius: 8px;
    outline: none;
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    box-shadow: 0 2px 4px rgba(10, 102, 194, 0.1);
    transition: box-shadow 0.3s ease;
}

#search-input::placeholder {
    color: #9CA3AF;
}

#search-input:focus {
    box-shadow: 0 0 0 4px rgba(10, 102, 194, 0.2);
}

.search-icon-left {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #0A66C2;
    font-size: 1.2rem;
    pointer-events: none;
}

.quick-links-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.suggestions-title {
    margin: 0;
    color: #374151;
    font-size: 1.05rem;
    font-weight: 600;
    font-family: 'Outfit', sans-serif;
    display: flex;
    align-items: center;
    gap: 8px;
}

.suggestions-title i {
    color: #0A66C2;
}

.suggestion-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.suggestion-tag {
    background: #F3F4F6;
    color: #4B5563;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid #E5E7EB;
}

.suggestion-tag:hover {
    background: #0A66C2;
    color: #ffffff;
    border-color: #0A66C2;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(10, 102, 194, 0.2);
}

.search-results {
    width: 100%;
    max-height: 45vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 15px;
}

.search-result-item {
    padding: 12px 15px;
    background: #ffffff;
    border-radius: 8px;
    text-decoration: none;
    color: #4B5563;
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 1rem;
    transition: all 0.3s ease;
    border: 1px solid #F3F4F6;
}

.search-result-item:hover {
    background: #F9FAFB;
    transform: translateX(5px);
    border-color: #E5E7EB;
}

@media (max-width: 768px) {
    .search-modal {
        top: 20px;
        left: 5%;
        transform: none;
        width: 90%;
    }
    .search-modal.show {
        transform: none;
    }
    .quick-links-container {
        gap: 15px;
    }
}

/* ---------------- CAROUSEL HERO BACKGROUND ---------------- */
.hero-carousel {
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
}
.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1.5s ease-in-out, transform 10s linear;
    transform: scale(1.05); /* Slight zoom effect initially */
}
.carousel-slide.active {
    opacity: 1;
    transform: scale(1); /* Smooth zoom-out effect while active */
}
.carousel-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(9, 48, 90, 0.75); /* Dark blue overlay so text is readable */
    z-index: 1;
}

/* Removed dark overlay adjustments because text is now placed below the carousel */

/* ---------------- QUICK ACTIONS BAR ---------------- */
.quick-actions-bar {
    background-color: var(--light-bg, #F4F7FB);
    padding: 0px 5% 60px;
    display: flex;
    justify-content: center;
    position: relative;
    z-index: 10;
}
.actions-container {
    display: flex;
    gap: 25px;
    flex-wrap: wrap;
    justify-content: center;
    max-width: 1000px;
}
.action-card {
    background: var(--primary-blue, #09305A);
    color: #ffffff;
    padding: 18px 35px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 18px;
    text-decoration: none;
    font-size: 1.15rem;
    font-weight: 700;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(9, 48, 90, 0.15);
    border-bottom: 4px solid #051c36;
}
.action-card:hover {
    background: #145091;
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(9, 48, 90, 0.25);
    color: #ffffff;
    border-bottom-color: #09305A;
}
.action-card i {
    font-size: 1.6rem;
    color: var(--accent-color, #FBBF24); 
}

/* ---------------- GALERIA INSTITUCIONAL ---------------- */
.gallery-section {
    background-color: var(--light-bg);
}
.gallery-container {
    max-width: 1200px;
    margin: 0 auto;
}
.filter-btn {
    background: #ffffff;
    border: 2px solid var(--primary-blue);
    color: var(--primary-blue);
    padding: 10px 28px;
    border-radius: 30px;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}
.filter-btn:hover, .filter-btn.active {
    background: var(--primary-blue);
    border-color: var(--primary-blue);
    color: #fff;
    box-shadow: 0 6px 15px rgba(9, 48, 90, 0.3);
}
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    margin-top: 40px;
}
.gallery-item {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.4s ease;
    cursor: pointer;
}
.gallery-item:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}
.gallery-img-wrapper {
    position: relative;
    width: 100%;
    height: 240px;
    overflow: hidden;
}
.gallery-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.gallery-item:hover .gallery-img-wrapper img {
    transform: scale(1.1);
}
.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(9, 48, 90, 0.4);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.gallery-overlay i {
    color: #fff;
    font-size: 2.5rem;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}
.gallery-item:hover .gallery-overlay {
    opacity: 1;
}
.gallery-item:hover .gallery-overlay i {
    transform: translateY(0);
}
.gallery-info {
    padding: 20px;
    text-align: center;
}
.gallery-info h4 {
    color: var(--primary-blue);
    font-size: 1.25rem;
    margin-bottom: 8px;
    font-weight: 700;
}
.gallery-info p {
    color: #4B5563;
    font-size: 0.95rem;
}

/* Lightbox Modal */
.lightbox-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}
.lightbox-modal.active {
    opacity: 1;
    visibility: visible;
}
.lightbox-close {
    position: absolute;
    top: 30px;
    right: 40px;
    color: #fff;
    font-size: 3rem;
    cursor: pointer;
    transition: color 0.3s;
    z-index: 10000;
}
.lightbox-close:hover {
    color: var(--accent-color);
}
.lightbox-content-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 90%;
    max-width: 1000px;
    position: relative;
}
.lightbox-img-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 80%;
}
.lightbox-img-container img {
    max-height: 70vh;
    max-width: 100%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}
.lightbox-caption {
    margin-top: 20px;
    text-align: center;
    color: #fff;
}
.lightbox-caption h4 {
    font-size: 1.5rem;
    color: var(--accent-color);
    margin-bottom: 5px;
}
.lightbox-caption p {
    font-size: 1.1rem;
    color: #ccc;
}
.lightbox-nav {
    color: #fff;
    font-size: 3rem;
    cursor: pointer;
    padding: 20px;
    transition: color 0.3s;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
}
.lightbox-nav:hover {
    color: var(--accent-color);
}
.lightbox-prev {
    left: -40px;
}
.lightbox-next {
    right: -40px;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.filter-btn {
    background: #ffffff;
    border: 2px solid var(--primary-blue);
    color: var(--primary-blue);
    padding: 10px 28px;
    border-radius: 30px;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}
.filter-btn:hover, .filter-btn.active {
    background: var(--primary-blue);
    color: #fff;
    box-shadow: 0 6px 15px rgba(9, 48, 90, 0.3);
}
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    margin-top: 40px;
}
.gallery-item {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.4s ease;
    cursor: pointer;
}
.gallery-item:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}
.gallery-img-wrapper {
    position: relative;
    width: 100%;
    height: 240px;
    overflow: hidden;
}
.gallery-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.gallery-item:hover .gallery-img-wrapper img {
    transform: scale(1.1);
}
.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(9, 48, 90, 0.4);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.gallery-overlay i {
    color: #fff;
    font-size: 2.5rem;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}
.gallery-item:hover .gallery-overlay {
    opacity: 1;
}
.gallery-item:hover .gallery-overlay i {
    transform: translateY(0);
}
.gallery-info {
    padding: 20px;
    text-align: center;
}
.gallery-info h4 {
    color: var(--primary-blue);
    font-size: 1.25rem;
    margin-bottom: 8px;
    font-weight: 700;
}
.gallery-info p {
    color: #4B5563;
    font-size: 0.95rem;
}

/* Lightbox Modal */
.lightbox-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}
.lightbox-modal.active {
    opacity: 1;
    visibility: visible;
}
.lightbox-close {
    position: absolute;
    top: 30px;
    right: 40px;
    color: #fff;
    font-size: 3rem;
    cursor: pointer;
    transition: color 0.3s;
    z-index: 10000;
}
.lightbox-close:hover {
    color: var(--accent-color);
}
.lightbox-content-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 90%;
    max-width: 1000px;
    position: relative;
}
.lightbox-img-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 80%;
}
.lightbox-img-container img {
    max-height: 70vh;
    max-width: 100%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}
.lightbox-caption {
    margin-top: 20px;
    text-align: center;
    color: #fff;
}
.lightbox-caption h4 {
    font-size: 1.5rem;
    color: var(--accent-color);
    margin-bottom: 5px;
}
.lightbox-caption p {
    font-size: 1.1rem;
    color: #ccc;
}
.lightbox-nav {
    color: #fff;
    font-size: 3rem;
    cursor: pointer;
    padding: 20px;
    transition: color 0.3s;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
}
.lightbox-nav:hover {
    color: var(--accent-color);
}
.lightbox-prev {
    left: -40px;
}
.lightbox-next {
    right: -40px;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ---------------- COLEGIOS SECTION ---------------- */
.colegios-section {
    padding: 60px 5%;
    background-color: var(--light-bg);
}

.colegios-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.modern-colegio-card {
    background: #fff;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.modern-colegio-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
}

.colegio-logo-box {
    padding: 30px;
    background: #f8fafc;
    display: flex;
    justify-content: center;
    align-items: center;
    border-bottom: 1px solid #edf2f7;
    height: 200px;
}

.colegio-logo {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.modern-colegio-card:hover .colegio-logo {
    transform: scale(1.05);
}

.colegio-contact-info, .colegio-content {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* Modal styles for Trayectoria Block */
.trayectoria-bloque h4 {
    color: var(--primary-blue);
    font-size: 1.15rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.resena-text {
    color: #64748b;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 20px;
}

.datos-clave-bloque {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.dato-clave {
    flex: 1;
    min-width: 120px;
    background: #f1f5f9;
    padding: 12px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    border: 1px solid #e2e8f0;
}

.dato-clave i {
    font-size: 1.5rem;
    color: var(--accent-color);
    margin-bottom: 8px;
}

.dato-label {
    font-size: 0.8rem;
    color: #64748b;
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 5px;
}

.dato-valor {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-blue);
}

.colegio-title {
    color: var(--primary-blue);
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-align: center;
}

.colegio-location {
    color: #64748b;
    font-size: 0.9rem;
    margin-bottom: 15px;
    text-align: center;
}

.badge-municipio {
    align-self: center;
    background: #f1f5f9;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--primary-blue);
    font-weight: 600;
    margin-bottom: 15px;
}

.colegio-rector {
    font-size: 1rem;
    color: #334155;
    margin-bottom: 20px;
    text-align: center;
}

.colegio-meta {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 20px;
}

.colegio-meta p {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 0.95rem;
    color: #475569;
    margin-bottom: 10px;
}

.colegio-meta p:last-child {
    margin-bottom: 0;
}

.colegio-meta i {
    color: var(--primary-blue);
    width: 20px;
    text-align: center;
}

.card-divider-small {
    width: 40px;
    height: 3px;
    background: var(--accent-color, #fbb034);
    margin: 0 auto 15px auto;
    border-radius: 2px;
}

.btn-ver-detalles {
    width: 100%;
    background: var(--primary-blue);
    color: #fff;
    border: none;
    padding: 14px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: auto;
}

.btn-ver-detalles:hover {
    background: var(--secondary-blue);
}

/* ---------------- FILTROS & CABECERAS POR MUNICIPIO ---------------- */
.colegios-controls-bar {
    max-width: 1200px;
    margin: 0 auto 40px auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.search-input-wrapper {
    position: relative;
    max-width: 650px;
    margin: 0 auto;
    width: 100%;
}

.search-input-wrapper .search-icon {
    position: absolute;
    left: 22px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 1.2rem;
}

.search-input-wrapper input {
    width: 100%;
    padding: 16px 50px 16px 56px;
    border-radius: 50px;
    border: 2px solid #cbd5e1;
    font-size: 1.05rem;
    font-family: 'Outfit', sans-serif;
    color: #1e293b;
    background: #ffffff;
    box-shadow: 0 6px 25px rgba(9, 48, 90, 0.05);
    transition: all 0.3s ease;
}

.search-input-wrapper input:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 8px 30px rgba(9, 48, 90, 0.15);
}

.search-input-wrapper .clear-search {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    background: #f1f5f9;
    border: none;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    color: #64748b;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.search-input-wrapper .clear-search:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.muni-pills-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    padding: 5px 0;
}

.muni-pill {
    background: #fff;
    border: 1.5px solid #cbd5e1;
    color: #475569;
    padding: 9px 20px;
    border-radius: 30px;
    font-size: 0.95rem;
    font-weight: 500;
    font-family: 'Outfit', sans-serif;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 6px rgba(0,0,0,0.03);
}

.muni-pill i {
    color: #94a3b8;
    transition: color 0.25s;
}

.muni-pill:hover {
    border-color: var(--primary-blue);
    color: var(--primary-blue);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(9, 48, 90, 0.1);
}

.muni-pill.active {
    background: var(--primary-blue);
    border-color: var(--primary-blue);
    color: #ffffff;
    font-weight: 600;
    box-shadow: 0 6px 18px rgba(9, 48, 90, 0.25);
}

.muni-pill.active i {
    color: var(--accent-color, #fbb034);
}

.municipio-group {
    max-width: 1200px;
    margin: 0 auto 55px auto;
    transition: all 0.4s ease;
}

.municipio-header {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 28px;
    padding-bottom: 16px;
    border-bottom: 2px solid #e2e8f0;
}

.municipio-badge-icon {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-blue) 100%);
    color: #fff;
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    box-shadow: 0 6px 16px rgba(9, 48, 90, 0.2);
    flex-shrink: 0;
}

.municipio-header-text h3 {
    font-size: 1.9rem;
    color: var(--primary-blue);
    margin: 0 0 4px 0;
    font-weight: 700;
}

.municipio-header-text span {
    color: #64748b;
    font-size: 0.95rem;
    font-weight: 500;
    display: inline-block;
}

.badge-municipio {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary-blue);
    background: rgba(9, 48, 90, 0.08);
    padding: 5px 14px;
    border-radius: 20px;
    margin-bottom: 12px;
    width: fit-content;
}

.colegio-meta {
    margin-bottom: 20px;
    font-size: 0.9rem;
    color: #475569;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: #f8fafc;
    padding: 12px 16px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
}

.colegio-meta p {
    margin: 0;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    line-height: 1.4;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.colegio-meta span {
    flex: 1;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.colegio-meta i {
    width: 16px;
    text-align: center;
    margin-top: 3px;
    flex-shrink: 0;
}

/* ---------------- MODAL COLEGIOS ---------------- */
.modal-colegio-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(9, 48, 90, 0.85); /* Dark blue overlay */
    backdrop-filter: blur(5px);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-colegio-overlay.show {
    opacity: 1;
    visibility: visible;
}

.modal-colegio-content {
    background: #fff;
    width: 90%;
    max-width: 850px;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 25px 50px rgba(0,0,0,0.25);
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.close-modal-colegio {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    color: #fff;
    cursor: pointer;
    z-index: 10;
    transition: color 0.3s ease;
}

.close-modal-colegio:hover {
    color: var(--accent-color);
}

.modal-colegio-header {
    background: linear-gradient(135deg, var(--primary-blue), #145091);
    padding: 30px;
    display: flex;
    align-items: center;
    gap: 20px;
    color: #fff;
    position: relative;
}

.modal-logo-wrapper {
    background: #fff;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.modal-logo-wrapper img {
    max-width: 100%;
    max-height: 100%;
    border-radius: 50%;
}

.modal-title-wrapper h2 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 5px;
    line-height: 1.2;
}

.modal-title-wrapper p {
    color: #cbd5e1;
    font-size: 0.9rem;
}

.modal-colegio-body {
    padding: 30px;
    overflow-y: auto;
    overflow-x: hidden;
}

.info-bloque {
    margin-bottom: 25px;
}

.info-bloque h3 {
    color: var(--primary-blue);
    font-size: 1.1rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 8px;
}

.info-bloque ul {
    list-style: none;
}

.info-bloque ul li {
    padding: 12px 0;
    border-bottom: 1px solid #f1f5f9;
    color: #475569;
    font-size: 0.95rem;
    display: flex;
    align-items: flex-start;
}

.info-bloque ul li:last-child {
    border-bottom: none;
}

.info-bloque ul li strong {
    color: #1e293b;
    width: 120px;
    display: inline-block;
    font-weight: 700;
    flex-shrink: 0;
}

.sedes-bloque ul.sedes-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

@media(min-width: 500px) {
    .sedes-bloque ul.sedes-list {
        grid-template-columns: 1fr 1fr;
    }
}

/* ================== GALERÍA INSTITUCIONES & VISOR INTELIGENTE ================== */
.inst-gallery-card {
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease, border-color 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    cursor: pointer;
}

.inst-gallery-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(9, 48, 90, 0.12);
    border-color: #FBBF24;
}

.inst-img-wrapper {
    position: relative;
    height: 220px;
    width: 100%;
    background-color: #09305A;
    overflow: hidden;
}

.inst-cover-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.inst-gallery-card:hover .inst-cover-img {
    transform: scale(1.08);
}

.inst-badge-top {
    position: absolute;
    top: 14px;
    right: 14px;
    background: rgba(9, 48, 90, 0.88);
    backdrop-filter: blur(6px);
    color: #ffffff;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    z-index: 2;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.inst-img-wrapper .gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(9, 48, 90, 0.85) 0%, rgba(9, 48, 90, 0.2) 60%, transparent 100%);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.inst-gallery-card:hover .gallery-overlay {
    opacity: 1;
}

.overlay-text {
    color: #FBBF24;
    font-weight: 700;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.4);
}

.inst-card-body {
    padding: 22px 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex: 1;
    background: #ffffff;
}

.inst-shield-row {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.inst-card-shield {
    width: 60px;
    height: 60px;
    object-fit: contain;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.12));
    flex-shrink: 0;
}

.inst-card-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #09305A;
    margin: 0;
    line-height: 1.3;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.inst-sedes-meta {
    margin-top: 10px;
    margin-bottom: 20px;
}

.badge-sedes-active {
    display: block;
    background: #eff6ff;
    color: #1d4ed8;
    padding: 8px 12px;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    text-align: center;
    border: 1px solid #dbeafe;
    line-height: 1.3;
}

.badge-sedes-single {
    display: block;
    background: #f8fafc;
    color: #475569;
    padding: 8px 12px;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    text-align: center;
    border: 1px solid #e2e8f0;
    line-height: 1.3;
}

.btn-ver-visor {
    background: linear-gradient(135deg, #09305A 0%, #0A3D72 100%);
    color: #ffffff;
    border: none;
    padding: 13px 18px;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
    width: 100%;
    box-shadow: 0 4px 12px rgba(9, 48, 90, 0.15);
}

.btn-ver-visor:hover,
.inst-gallery-card:hover .btn-ver-visor {
    background: #FBBF24;
    color: #09305A;
    box-shadow: 0 6px 16px rgba(251, 191, 36, 0.35);
}

/* ---------------- MODAL VISOR INTELIGENTE ---------------- */
.modal-visor-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(9, 48, 90, 0.88);
    backdrop-filter: blur(8px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeInModal 0.3s ease;
}

.modal-visor-container {
    background: #ffffff;
    width: 100%;
    max-width: 1080px;
    max-height: 90vh;
    border-radius: 24px;
    overflow-y: auto;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.5);
    position: relative;
    display: flex;
    flex-direction: column;
    animation: zoomInModal 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.visor-close-btn {
    position: absolute;
    top: 25px;
    right: 30px;
    font-size: 2.2rem;
    color: #ffffff;
    cursor: pointer;
    z-index: 10;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: all 0.3s ease;
}

.visor-close-btn:hover {
    background: #EF4444;
    color: #ffffff;
    transform: rotate(90deg);
}

.visor-header {
    background: linear-gradient(135deg, #09305A 0%, #0d4a8c 100%);
    padding: 35px 45px;
    color: #ffffff;
    border-bottom: 5px solid #FBBF24;
    position: relative;
}

.visor-header-left {
    display: flex;
    align-items: center;
    gap: 28px;
    padding-right: 60px;
}

.visor-escudo-img {
    width: 95px;
    height: 95px;
    object-fit: contain;
    background: #ffffff;
    padding: 10px;
    border-radius: 20px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.3);
    flex-shrink: 0;
}

.visor-titles {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.visor-badge {
    display: inline-block;
    background: #FBBF24;
    color: #09305A;
    font-weight: 800;
    font-size: 0.85rem;
    padding: 5px 16px;
    border-radius: 20px;
    width: fit-content;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.visor-titles h2 {
    font-size: 1.9rem;
    font-weight: 800;
    margin: 0;
    line-height: 1.2;
    color: #ffffff;
    word-break: break-word;
}

.visor-body {
    padding: 40px 45px;
}

.visor-section {
    margin-bottom: 20px;
}

.visor-section-title {
    font-size: 1.4rem;
    color: #09305A;
    font-weight: 800;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.visor-section-subtitle {
    color: #64748b;
    font-size: 0.98rem;
    margin-bottom: 24px;
    line-height: 1.5;
}

.visor-photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 22px;
}

.visor-photo-item {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.07);
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
}

.visor-photo-item:hover {
    transform: translateY(-6px);
    box-shadow: 0 15px 30px rgba(9, 48, 90, 0.16);
    border-color: #cbd5e1;
}

.visor-photo-item .photo-wrapper {
    position: relative;
    height: 190px;
    width: 100%;
    cursor: pointer;
    overflow: hidden;
    background: #e2e8f0;
}

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

.visor-photo-item:hover .photo-wrapper img {
    transform: scale(1.08);
}

.photo-zoom {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(9, 48, 90, 0.95), rgba(9, 48, 90, 0.7));
    color: #FBBF24;
    padding: 10px;
    text-align: center;
    font-size: 0.9rem;
    font-weight: 700;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.visor-photo-item .photo-wrapper:hover .photo-zoom {
    opacity: 1;
}

.sede-photo-caption {
    padding: 14px 16px;
    background: #ffffff;
    border-top: 1px solid #f1f5f9;
    font-size: 0.95rem;
    color: #09305A;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sede-photo-caption i {
    color: #FBBF24;
    font-size: 1.1rem;
}

.visor-divider {
    height: 1px;
    background: #e2e8f0;
    margin: 38px 0;
}

.no-sedes-notice {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid #e2e8f0;
    border-left: 6px solid #FBBF24;
    padding: 22px 28px;
    border-radius: 16px;
    color: #334155;
    display: flex;
    align-items: center;
    gap: 18px;
    font-size: 1.02rem;
    line-height: 1.5;
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
}

.no-sedes-notice i {
    font-size: 2.2rem;
    color: #FBBF24;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .visor-header {
        padding: 25px 20px;
    }
    .visor-header-left {
        flex-direction: column;
        align-items: flex-start;
        gap: 18px;
        padding-right: 0;
    }
    .visor-escudo-img {
        width: 75px;
        height: 75px;
    }
    .visor-titles h2 {
        font-size: 1.5rem;
    }
    .visor-body {
        padding: 25px 20px;
    }
    .visor-photo-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 16px;
    }
    .no-sedes-notice {
        flex-direction: column;
        align-items: flex-start;
        padding: 18px 20px;
    }
}

/* ==========================================================================
   SISTEMA DE FILTROS DE DOS NIVELES PARA GALERÍA (INSTITUCIONES, COMUNIDAD, EVENTOS)
   ========================================================================== */

/* Nivel 1: Categorías Globales (Tabs principales) */
.global-categories-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 24px;
}

.global-tabs-pill {
    display: inline-flex;
    background: #E2E8F0;
    padding: 6px;
    border-radius: 50px;
    gap: 6px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.06);
    border: 1px solid rgba(255,255,255,0.8);
    flex-wrap: wrap;
    justify-content: center;
}

.global-btn {
    background: transparent;
    color: #475569;
    font-weight: 700;
    font-size: 0.95rem;
    padding: 10px 24px;
    border: none;
    border-radius: 40px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Outfit', sans-serif;
}

.global-btn:hover {
    color: var(--primary-blue);
    background: rgba(255, 255, 255, 0.5);
}

.global-btn.active {
    background: var(--primary-blue);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.25);
    transform: translateY(-1px);
}

.global-btn.active i {
    transform: scale(1.1);
    transition: transform 0.25s ease;
}

/* Nivel 2: Caja Desplegable de Municipios (Select Moderno) */
.muni-select-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    max-width: 620px;
    margin: 0 auto;
    background: #ffffff;
    padding: 14px 28px;
    border-radius: 50px;
    border: 1px solid #E2E8F0;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
    animation: fadeIn 0.3s ease;
}

.muni-select-label {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--primary-blue, #0A3D72);
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.custom-select-wrapper {
    position: relative;
    flex: 1;
    min-width: 240px;
    max-width: 350px;
    display: flex;
    align-items: center;
}

.custom-select-wrapper .select-icon {
    position: absolute;
    left: 18px;
    font-size: 1rem;
    pointer-events: none;
    z-index: 2;
}

.custom-select-wrapper .arrow-icon {
    position: absolute;
    right: 18px;
    font-size: 0.9rem;
    color: #64748b;
    pointer-events: none;
    z-index: 2;
    transition: transform 0.3s ease;
}

.custom-select-wrapper:hover .arrow-icon {
    color: #0369A1;
    transform: translateY(2px);
}

.muni-modern-select {
    width: 100%;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background: #F8FAFC;
    color: #0F172A;
    font-size: 1rem;
    font-weight: 700;
    font-family: 'Outfit', 'Inter', sans-serif;
    padding: 12px 45px 12px 46px;
    border: 2px solid #CBD5E1;
    border-radius: 40px;
    cursor: pointer;
    outline: none;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 6px rgba(0,0,0,0.02);
}

.muni-modern-select:hover {
    background: #ffffff;
    border-color: #0369A1;
    box-shadow: 0 4px 14px rgba(3, 105, 161, 0.12);
}

.muni-modern-select:focus {
    background: #ffffff;
    border-color: #0A3D72;
    box-shadow: 0 0 0 4px rgba(10, 61, 114, 0.15);
}

@media (max-width: 768px) {
    .global-tabs-pill {
        border-radius: 20px;
        padding: 8px;
        width: 100%;
    }
    .global-btn {
        width: 100%;
        justify-content: center;
        padding: 12px;
    }
    .muni-select-container {
        flex-direction: column;
        gap: 12px;
        padding: 18px 20px;
        border-radius: 24px;
        width: 100%;
    }
    .muni-select-label {
        width: 100%;
        justify-content: center;
        font-size: 0.9rem;
    }
    .custom-select-wrapper {
        width: 100%;
        min-width: 100%;
        max-width: 100%;
    }
}

/* Modern Grid Layout for Modal Colegios */
.modal-colegio-grid-layout {
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    gap: 30px;
    margin-bottom: 25px;
}

@media (max-width: 768px) {
    .modal-colegio-grid-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

.modal-col-left {
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 25px;
    height: 100%;
}

.modal-col-left .info-bloque {
    margin-bottom: 0;
}

.modal-info-list {
    list-style: none;
}

.modal-info-list li {
    padding: 12px 0;
    border-bottom: 1px solid #f1f5f9;
    color: #475569;
    font-size: 0.95rem;
    display: flex;
    align-items: flex-start;
}

.modal-info-list li:last-child {
    border-bottom: none;
}

.modal-info-list li strong {
    color: #1e293b;
    width: 120px;
    display: inline-block;
    font-weight: 700;
    flex-shrink: 0;
}

.modal-info-list li span {
    flex: 1;
    min-width: 0;
    word-break: break-word;
    overflow-wrap: break-word;
    max-height: 200px;
    overflow-y: auto;
    padding-right: 5px;
}

.resena-text {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #4b5563;
    text-align: justify;
    margin-bottom: 20px;
    margin-top: 10px;
}

.datos-clave-bloque-grid {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin-top: 15px;
}

.datos-clave-bloque-grid .dato-clave {
    text-align: center;
    flex: 1;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 15px 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.datos-clave-bloque-grid .dato-clave:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.05);
}

.datos-clave-bloque-grid .dato-clave i {
    font-size: 1.5rem;
    color: var(--accent-color);
    margin-bottom: 8px;
    display: block;
}

.datos-clave-bloque-grid .dato-label {
    font-size: 0.8rem;
    color: #64748b;
    display: block;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.datos-clave-bloque-grid .dato-valor {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-blue);
    display: block;
}

.ancho-completo {
    width: 100%;
    border-top: 1px solid #e2e8f0;
    padding-top: 25px;
}

