/* ==========================================================================
   DESIGN SYSTEM & VARIABLES
   ========================================================================== */
:root {
    /* Color Palette */
    --primary: #0f2a4a;        /* Azul Marino Institucional */
    --primary-light: #1b3d68;  /* Azul Marino Suave */
    --primary-dark: #071526;   /* Azul Marino Oscuro */
    --secondary: #ba2525;      /* Rojo Institucional */
    --secondary-hover: #9c1c1c;/* Rojo Oscuro */
    --accent: #f5b041;         /* Amarillo/Oro Logo */
    --accent-hover: #dca03a;   /* Amarillo Oscuro */
    
    /* Neutral Colors */
    --bg-main: #f8fafc;
    --bg-white: #ffffff;
    --text-main: #334155;      /* Slate 700 */
    --text-muted: #64748b;     /* Slate 500 */
    --text-white: #ffffff;
    --border-color: #e2e8f0;   /* Slate 200 */
    
    /* Typography */
    --font-headings: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    /* Layout Details */
    --max-width: 1200px;
    --header-height: 80px;
    --border-radius-sm: 8px;
    --border-radius-md: 16px;
    --border-radius-lg: 24px;
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-glow-blue: 0 10px 30px rgba(15, 42, 74, 0.2);
    --shadow-glow-red: 0 10px 30px rgba(186, 37, 37, 0.2);
    
    /* Transitions */
    --transition-fast: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   RESET & BASE STYLES
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-headings);
    color: var(--primary);
    font-weight: 700;
    line-height: 1.25;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-fast);
}

ul {
    list-style: none;
}

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

/* Utility Components */
.section-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 80px 24px;
}

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

.section-subtitle {
    font-family: var(--font-headings);
    color: var(--secondary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.9rem;
    display: block;
    margin-bottom: 8px;
}

.section-title {
    font-size: 2.5rem;
    position: relative;
    padding-bottom: 15px;
    display: inline-block;
}

.title-underline {
    width: 60px;
    height: 4px;
    background-color: var(--secondary);
    margin: 0 auto;
    border-radius: 2px;
    position: relative;
}

.title-underline::after {
    content: '';
    position: absolute;
    top: 0;
    left: 20px;
    width: 20px;
    height: 4px;
    background-color: var(--accent);
    border-radius: 2px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    font-family: var(--font-headings);
    font-weight: 600;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: var(--transition-normal);
    gap: 10px;
    border: none;
}

.btn-primary {
    background-color: var(--secondary);
    color: var(--text-white);
    box-shadow: 0 4px 12px rgba(186, 37, 37, 0.3);
}

.btn-primary:hover {
    background-color: var(--secondary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(186, 37, 37, 0.4);
}

.btn-secondary {
    background-color: var(--accent);
    color: var(--primary-dark);
    box-shadow: 0 4px 12px rgba(245, 176, 65, 0.3);
}

.btn-secondary:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(245, 176, 65, 0.4);
}

/* Scroll Reveal Base */
.scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

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

/* ==========================================================================
   HEADER NAVIGATION (GLASSMORPHISM)
   ========================================================================== */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    z-index: 1000;
    transition: var(--transition-normal);
    box-shadow: 0 2px 20px rgba(0,0,0,0.02);
}

.main-header.scrolled {
    background-color: rgba(15, 42, 74, 0.95);
    border-bottom: 1px solid rgba(15, 42, 74, 0.2);
    box-shadow: var(--shadow-md);
}

.main-header.scrolled .school-name, 
.main-header.scrolled .nav-link {
    color: var(--text-white);
}

.main-header.scrolled .school-slogan {
    color: var(--accent);
}

.main-header.scrolled .daem-badge {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--text-white);
}

.main-header.scrolled .mobile-menu-toggle {
    color: var(--text-white);
}

.header-container {
    max-width: var(--max-width);
    height: 100%;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 12px;
}

.school-logo-img {
    height: 50px;
    width: auto;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
    transition: var(--transition-normal);
}

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

.school-name {
    font-family: var(--font-headings);
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1.1;
    text-transform: uppercase;
}

.school-slogan {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--secondary);
    letter-spacing: 1px;
}

/* Nav Menu Desktop */
.nav-menu ul {
    display: flex;
    gap: 30px;
}

.nav-link {
    font-family: var(--font-headings);
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--primary);
    position: relative;
    padding: 8px 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-link i {
    font-size: 0.85rem;
    opacity: 0.7;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background-color: var(--secondary);
    border-radius: 2px;
    transition: var(--transition-normal);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-link:hover {
    color: var(--secondary);
}

.main-header.scrolled .nav-link:hover {
    color: var(--accent);
}

.main-header.scrolled .nav-link::after {
    background-color: var(--accent);
}

/* DAEM Logo Header */
.header-daem {
    display: flex;
    align-items: center;
    gap: 10px;
}

.daem-logo-img {
    height: 36px;
    width: auto;
}

.daem-badge {
    background-color: rgba(15, 42, 74, 0.05);
    color: var(--primary);
    padding: 4px 10px;
    border-radius: 30px;
    font-family: var(--font-headings);
    font-weight: 600;
    font-size: 0.75rem;
}

/* Menu Toggle Button Mobile */
.mobile-menu-toggle {
    display: none;
    font-size: 1.5rem;
    background: none;
    border: none;
    color: var(--primary);
    cursor: pointer;
    z-index: 1010;
}

/* Mobile Drawer */
.mobile-nav-drawer {
    position: fixed;
    top: 0;
    right: -300px;
    width: 300px;
    height: 100%;
    background-color: var(--primary-dark);
    color: var(--text-white);
    z-index: 1050;
    padding: 30px;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-lg);
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-nav-drawer.open {
    right: 0;
}

.drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.drawer-logo {
    height: 40px;
}

.drawer-title {
    font-family: var(--font-headings);
    font-weight: 700;
    font-size: 1.2rem;
}

.drawer-close {
    background: none;
    border: none;
    color: var(--text-white);
    font-size: 1.5rem;
    cursor: pointer;
}

.drawer-links {
    margin-top: 30px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.drawer-link {
    font-family: var(--font-headings);
    font-size: 1.1rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
}

.drawer-link:hover {
    color: var(--accent);
    padding-left: 5px;
}

.drawer-footer {
    margin-top: auto;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
}

.drawer-daem-logo {
    height: 35px;
    margin: 0 auto 10px;
    filter: brightness(0) invert(1);
}

.drawer-footer p {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.6);
    margin-bottom: 5px;
}

.drawer-footer .hashtag {
    font-family: var(--font-headings);
    font-size: 0.85rem;
    color: var(--accent);
    font-weight: 700;
}

.drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0,0,0,0.5);
    z-index: 1040;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.drawer-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

/* ==========================================================================
   HERO CAROUSEL SECTION
   ========================================================================== */
.hero-section {
    position: relative;
    height: 85vh;
    min-height: 550px;
    background-color: var(--primary-dark);
}

.carousel-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    opacity: 0;
    z-index: 1;
    transition: opacity 0.8s ease-in-out;
}

.carousel-slide.active {
    opacity: 1;
    z-index: 2;
}

.slide-content {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
    color: var(--text-white);
    width: 100%;
    transform: translateY(30px);
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.2s;
}

.carousel-slide.active .slide-content {
    transform: translateY(0);
}

.welcome-badge {
    background-color: var(--secondary);
    color: var(--text-white);
    padding: 6px 14px;
    border-radius: 30px;
    font-family: var(--font-headings);
    font-weight: 600;
    font-size: 0.8rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    letter-spacing: 1px;
    text-transform: uppercase;
    box-shadow: 0 4px 10px rgba(186, 37, 37, 0.3);
}

.slide-title {
    font-size: 3.5rem;
    color: var(--text-white);
    font-weight: 800;
    margin-bottom: 20px;
    max-width: 700px;
    line-height: 1.15;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.slide-title .highlight {
    color: var(--accent);
}

.slide-title .highlight-red {
    color: #ff6b6b;
}

.slide-description {
    font-size: 1.15rem;
    max-width: 600px;
    margin-bottom: 35px;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

.slide-actions {
    display: flex;
    gap: 15px;
}

/* Carousel Controls */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: var(--text-white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 10;
    backdrop-filter: blur(5px);
    transition: var(--transition-normal);
}

.carousel-btn:hover {
    background-color: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-50%) scale(1.05);
}

.prev-btn {
    left: 20px;
}

.next-btn {
    right: 20px;
}

.carousel-indicators {
    position: absolute;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 10;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.3);
    border: none;
    cursor: pointer;
    transition: var(--transition-normal);
}

.indicator.active {
    background-color: var(--accent);
    transform: scale(1.25);
}

/* Overlapping Quick Features Bar */
.quick-features {
    position: absolute;
    bottom: -50px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 48px);
    max-width: var(--max-width);
    background-color: var(--bg-white);
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-lg);
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    z-index: 20;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 30px;
    border-right: 1px solid var(--border-color);
    transition: var(--transition-normal);
}

.feature-item:last-child {
    border-right: none;
}

.feature-item:hover {
    background-color: #fafbfc;
    transform: translateY(-4px);
}

.feature-icon {
    width: 60px;
    height: 60px;
    background-color: rgba(15, 42, 74, 0.08);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.6rem;
    flex-shrink: 0;
}

.feature-icon-red {
    width: 60px;
    height: 60px;
    background-color: rgba(186, 37, 37, 0.08);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--secondary);
    font-size: 1.6rem;
    flex-shrink: 0;
}

.feature-icon-yellow {
    width: 60px;
    height: 60px;
    background-color: rgba(245, 176, 65, 0.12);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #e67e22;
    font-size: 1.6rem;
    flex-shrink: 0;
}

.feature-text h3 {
    font-size: 1.15rem;
    margin-bottom: 4px;
}

.feature-text p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ==========================================================================
   DAEM INTEGRATION BANNER
   ========================================================================== */
.daem-banner {
    background: linear-gradient(135deg, #071526, #16365b);
    padding: 100px 0 60px;
    color: var(--text-white);
    margin-top: 50px;
    position: relative;
    overflow: hidden;
}

.daem-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(186, 37, 37, 0.15) 0%, transparent 60%);
    pointer-events: none;
}

.daem-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 40px;
}

.daem-logo-wrapper {
    background-color: var(--bg-white);
    padding: 20px;
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    justify-content: center;
}

.daem-banner-img {
    height: 80px;
    width: auto;
}

.daem-info-wrapper {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.daem-tag {
    font-family: var(--font-headings);
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--accent);
}

.daem-title {
    color: var(--text-white);
    font-size: 2rem;
    font-weight: 800;
}

.daem-description {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
    max-width: 700px;
}

.daem-hashtag-box {
    display: inline-block;
}

.hashtag-text {
    font-family: var(--font-headings);
    font-weight: 800;
    font-size: 1.2rem;
    color: var(--accent);
    border: 2px dashed rgba(245, 176, 65, 0.4);
    padding: 6px 15px;
    border-radius: 8px;
    letter-spacing: 1px;
}

.escuela-logo-wrapper {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: var(--border-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
}

.daem-escuela-img {
    height: 90px;
    width: auto;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.2));
}

/* ==========================================================================
   ABOUT US SECTION
   ========================================================================== */
.about-section {
    background-color: var(--bg-main);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 50px;
    align-items: start;
}

.about-heading {
    font-size: 1.8rem;
    margin-bottom: 20px;
    font-weight: 800;
}

.about-paragraph {
    margin-bottom: 18px;
    color: var(--text-main);
    text-align: justify;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 35px;
}

.stat-card {
    background-color: var(--bg-white);
    padding: 20px;
    border-radius: var(--border-radius-sm);
    box-shadow: var(--shadow-sm);
    text-align: center;
    border-top: 4px solid var(--primary);
    transition: var(--transition-normal);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.stat-card:nth-child(2) {
    border-top-color: var(--secondary);
}

.stat-card:nth-child(3) {
    border-top-color: var(--accent);
}

.stat-number {
    display: block;
    font-family: var(--font-headings);
    font-weight: 800;
    font-size: 1.4rem;
    color: var(--primary);
    margin-bottom: 5px;
}

.stat-card:nth-child(2) .stat-number {
    color: var(--secondary);
    font-size: 1.15rem;
    padding: 3px 0;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 600;
}

/* Identity Cards Column */
.about-cards-column {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.identity-card {
    background-color: var(--bg-white);
    padding: 30px;
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-sm);
    display: flex;
    gap: 20px;
    align-items: flex-start;
    transition: var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.identity-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 6px;
    height: 100%;
}

.border-blue::before { background-color: var(--primary); }
.border-red::before { background-color: var(--secondary); }
.border-yellow::before { background-color: var(--accent); }

.identity-card:hover {
    transform: translateX(5px);
    box-shadow: var(--shadow-md);
}

.card-icon {
    font-size: 1.8rem;
    color: var(--primary);
    background-color: rgba(15, 42, 74, 0.08);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.card-icon-red {
    font-size: 1.8rem;
    color: var(--secondary);
    background-color: rgba(186, 37, 37, 0.08);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.card-icon-yellow {
    font-size: 1.8rem;
    color: #e67e22;
    background-color: rgba(245, 176, 65, 0.12);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.card-content h4 {
    font-size: 1.25rem;
    margin-bottom: 8px;
    font-weight: 700;
}

.card-content p {
    font-size: 0.95rem;
    color: var(--text-main);
}

/* ==========================================================================
   EDUCATIONAL LEVELS SECTION
   ========================================================================== */
.levels-section {
    background-color: var(--bg-white);
}

.levels-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.level-card {
    background-color: var(--bg-main);
    border-radius: var(--border-radius-md);
    padding: 40px 30px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-normal);
    border: 1px solid var(--border-color);
    position: relative;
    display: flex;
    flex-direction: column;
}

.level-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    background-color: var(--bg-white);
}

.level-icon-box {
    width: 70px;
    height: 70px;
    border-radius: 20px;
    background-color: var(--primary);
    color: var(--text-white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: 25px;
    box-shadow: var(--shadow-glow-blue);
    transition: var(--transition-normal);
}

.level-card:hover .level-icon-box {
    transform: rotateY(180deg);
}

.red-icon-box {
    background-color: var(--secondary);
    box-shadow: var(--shadow-glow-red);
}

.yellow-icon-box {
    background-color: var(--accent);
    color: var(--primary-dark);
    box-shadow: 0 10px 30px rgba(245, 176, 65, 0.3);
}

.level-content h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    font-weight: 800;
}

.level-tag {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 30px;
    font-family: var(--font-headings);
    font-weight: 700;
    font-size: 0.75rem;
    margin-bottom: 20px;
}

.blue-tag {
    background-color: rgba(15, 42, 74, 0.08);
    color: var(--primary);
}

.red-tag {
    background-color: rgba(186, 37, 37, 0.08);
    color: var(--secondary);
}

.yellow-tag {
    background-color: rgba(245, 176, 65, 0.15);
    color: #e67e22;
}

.level-content p {
    color: var(--text-main);
    font-size: 0.95rem;
    margin-bottom: 25px;
    flex-grow: 1;
}

.level-features {
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.level-features li {
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
}

.level-features li i {
    color: var(--secondary);
    font-size: 1rem;
}

.level-card:nth-child(1) .level-features li i {
    color: var(--primary);
}

.level-card:nth-child(3) .level-features li i {
    color: #e67e22;
}

/* ==========================================================================
   GALLERY SECTION (MASONRY-GRID)
   ========================================================================== */
.gallery-section {
    background-color: var(--bg-main);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.gallery-item {
    position: relative;
    border-radius: var(--border-radius-md);
    overflow: hidden;
    aspect-ratio: 4 / 3;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    border: 4px solid var(--bg-white);
    transition: var(--transition-normal);
}

.gallery-item:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent);
}

.gallery-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-slow);
}

.gallery-item:hover .gallery-img {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(15, 42, 74, 0.9) 0%, rgba(15, 42, 74, 0.4) 60%, rgba(15, 42, 74, 0.1) 100%);
    opacity: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 24px;
    transition: var(--transition-normal);
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-icon {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
    background-color: var(--accent);
    color: var(--primary-dark);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    box-shadow: var(--shadow-sm);
    transform: scale(0.7);
    transition: var(--transition-normal);
}

.gallery-item:hover .gallery-icon {
    transform: scale(1);
}

.gallery-text {
    transform: translateY(15px);
    transition: var(--transition-normal);
}

.gallery-item:hover .gallery-text {
    transform: translateY(0);
}

.gallery-text h4 {
    color: var(--text-white);
    font-size: 1.2rem;
    margin-bottom: 4px;
}

.gallery-text p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.85rem;
}

/* Lightbox Modal */
.lightbox-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(7, 21, 38, 0.95);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.lightbox-modal.open {
    opacity: 1;
    pointer-events: auto;
}

.lightbox-close {
    position: absolute;
    top: 24px;
    right: 24px;
    background: none;
    border: none;
    color: var(--text-white);
    font-size: 2.2rem;
    cursor: pointer;
    transition: var(--transition-fast);
}

.lightbox-close:hover {
    color: var(--accent);
    transform: rotate(90deg);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-white);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-normal);
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    color: var(--accent);
}

.lightbox-nav.prev { left: 24px; }
.lightbox-nav.next { right: 24px; }

.lightbox-content-img {
    max-width: 80%;
    max-height: 75vh;
    object-fit: contain;
    border-radius: var(--border-radius-sm);
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    border: 5px solid rgba(255, 255, 255, 0.05);
    transform: scale(0.9);
    transition: transform 0.4s ease;
}

.lightbox-modal.open .lightbox-content-img {
    transform: scale(1);
}

.lightbox-caption {
    position: absolute;
    bottom: 40px;
    color: var(--text-white);
    font-family: var(--font-headings);
    font-size: 1.15rem;
    text-align: center;
    background-color: rgba(15, 42, 74, 0.8);
    backdrop-filter: blur(5px);
    padding: 12px 30px;
    border-radius: 30px;
    max-width: 60%;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ==========================================================================
   CONTACT & LOCATION SECTION
   ========================================================================== */
.contact-section {
    background-color: var(--bg-white);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 50px;
}

/* Contact Form */
.contact-form-wrapper {
    background-color: var(--bg-main);
    padding: 40px;
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.contact-form-wrapper h3 {
    font-size: 1.8rem;
    margin-bottom: 12px;
    font-weight: 800;
}

.contact-form-wrapper p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 30px;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-family: var(--font-headings);
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--primary-light);
    display: flex;
    align-items: center;
    gap: 6px;
}

.form-group label i {
    font-size: 0.8rem;
    opacity: 0.8;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--text-main);
    background-color: var(--bg-white);
    transition: var(--transition-normal);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(15, 42, 74, 0.08);
}

.form-group.error input,
.form-group.error select,
.form-group.error textarea {
    border-color: var(--secondary);
    background-color: rgba(186, 37, 37, 0.01);
}

.error-msg {
    color: var(--secondary);
    font-size: 0.75rem;
    font-weight: 600;
    display: none;
}

.form-group.error .error-msg {
    display: block;
}

.btn-submit {
    align-self: flex-start;
    padding: 14px 35px;
    font-size: 1rem;
    margin-top: 10px;
}

/* Info Column & Simulated Map */
.contact-info-wrapper {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.info-block h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    font-weight: 800;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.detail-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.detail-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(15, 42, 74, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.1rem;
    flex-shrink: 0;
}

.detail-icon-red {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(186, 37, 37, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--secondary);
    font-size: 1.1rem;
    flex-shrink: 0;
}

.detail-text h4 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.detail-text p {
    font-size: 0.9rem;
    color: var(--text-main);
}

.contact-link {
    font-weight: 500;
    transition: var(--transition-fast);
}

.contact-link:hover {
    color: var(--secondary);
    text-decoration: underline;
}

/* Simulated Map */
.map-wrapper {
    position: relative;
    border-radius: var(--border-radius-md);
    overflow: hidden;
    height: 240px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.map-overlay {
    position: absolute;
    top: 15px;
    left: 15px;
    background-color: var(--primary);
    color: var(--text-white);
    padding: 6px 14px;
    border-radius: 30px;
    font-family: var(--font-headings);
    font-weight: 600;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 5;
    box-shadow: var(--shadow-sm);
}

.simulated-map {
    position: relative;
    width: 100%;
    height: 100%;
    background-color: #e5e9f0;
    overflow: hidden;
}

.map-bg {
    position: absolute;
    width: 200%;
    height: 200%;
    top: -50%;
    left: -50%;
    background-image: 
        radial-gradient(#d1d8e6 15%, transparent 16%),
        radial-gradient(#d1d8e6 15%, transparent 16%);
    background-size: 20px 20px;
    background-position: 0 0, 10px 10px;
    opacity: 0.5;
}

.map-routes {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
}

/* Road lines simulating map */
.map-routes::before {
    content: '';
    position: absolute;
    top: 50%;
    left: -10%;
    width: 120%;
    height: 14px;
    background-color: #ffffff;
    transform: rotate(-15deg);
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.map-routes::after {
    content: '';
    position: absolute;
    left: 45%;
    top: -10%;
    width: 14px;
    height: 120%;
    background-color: #ffffff;
    transform: rotate(35deg);
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.map-pin {
    position: absolute;
    left: 45%;
    top: 45%;
    transform: translate(-50%, -50%);
    z-index: 3;
}

.pin-ring {
    position: absolute;
    top: -15px;
    left: -15px;
    width: 40px;
    height: 40px;
    background-color: rgba(186, 37, 37, 0.2);
    border-radius: 50%;
    animation: pulse-ring 2s infinite ease-out;
}

.pin-dot {
    width: 14px;
    height: 14px;
    background-color: var(--secondary);
    border: 2px solid var(--bg-white);
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

.map-card-popup {
    position: absolute;
    left: 48%;
    top: 15%;
    background-color: var(--bg-white);
    border-radius: var(--border-radius-sm);
    padding: 10px;
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 4;
    border: 1px solid var(--border-color);
}

.popup-logo {
    height: 25px;
}

.popup-text h5 {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1.1;
}

.popup-text p {
    font-size: 0.65rem;
    color: var(--text-muted);
}

@keyframes pulse-ring {
    0% { transform: scale(0.3); opacity: 1; }
    80%, 100% { transform: scale(1.5); opacity: 0; }
}

/* Toast Success Notification */
.toast-notification {
    position: fixed;
    top: -100px;
    right: 30px;
    background-color: #0f2a4a;
    color: var(--text-white);
    padding: 16px 24px;
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 16px;
    z-index: 2500;
    transition: top 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border-left: 5px solid var(--accent);
}

.toast-notification.show {
    top: 30px;
}

.toast-icon {
    font-size: 1.8rem;
    color: var(--accent);
}

.toast-content h4 {
    color: var(--text-white);
    font-size: 1rem;
    margin-bottom: 2px;
}

.toast-content p {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.8);
}

/* ==========================================================================
   FOOTER SECTION
   ========================================================================== */
.main-footer {
    background-color: var(--primary-dark);
    color: rgba(255, 255, 255, 0.75);
}

.footer-top {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr 0.8fr 1.2fr;
    gap: 40px;
    padding: 70px 0;
}

.footer-col h4 {
    color: var(--text-white);
    font-size: 1.15rem;
    margin-bottom: 24px;
    position: relative;
    padding-bottom: 10px;
}

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

.brand-col .footer-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.footer-logo-img {
    height: 48px;
    width: auto;
}

.brand-col .footer-logo h3 {
    font-size: 1.2rem;
    color: var(--text-white);
    font-weight: 800;
    line-height: 1.1;
}

.brand-col .footer-logo p {
    font-size: 0.8rem;
    color: var(--accent);
    font-weight: 600;
}

.footer-desc {
    font-size: 0.85rem;
    line-height: 1.6;
    margin-bottom: 20px;
}

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

.footer-socials a {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-white);
    font-size: 1rem;
    transition: var(--transition-normal);
}

.footer-socials a:hover {
    background-color: var(--secondary);
    transform: translateY(-3px);
}

/* Links columns */
.footer-col ul {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-col ul li a {
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-col ul li a i {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.4);
    transition: var(--transition-fast);
}

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

.footer-col ul li a:hover i {
    transform: translateX(4px);
    color: var(--accent);
}

/* DAEM Footer column */
.daem-col {
    display: flex;
    flex-direction: column;
}

.footer-daem-img {
    height: 50px;
    width: auto;
    align-self: flex-start;
    margin-bottom: 18px;
    background-color: var(--bg-white);
    padding: 6px 12px;
    border-radius: 6px;
}

.municipal-slogan {
    font-size: 0.85rem;
    line-height: 1.5;
    margin-bottom: 12px;
}

.hashtag-footer {
    font-family: var(--font-headings);
    font-weight: 800;
    font-size: 1rem;
    color: var(--accent);
    letter-spacing: 1px;
}

/* Footer Bottom */
.footer-bottom {
    padding: 25px 0;
    background-color: rgba(0,0,0,0.15);
    font-size: 0.8rem;
}

.bottom-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.municipal-credit {
    color: rgba(255, 255, 255, 0.45);
}

/* ==========================================================================
   RESPONSIVE DESIGN (MEDIA QUERIES)
   ========================================================================== */

/* Max Width 1024px (Tablets / Laptops) */
@media (max-width: 1024px) {
    .quick-features {
        position: relative;
        bottom: 0;
        margin: -40px auto 0;
        width: 100%;
        grid-template-columns: repeat(2, 1fr);
    }
    
    .about-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .levels-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
}

/* Max Width 768px (Mobile Portrait / Landscape) */
@media (max-width: 768px) {
    :root {
        --header-height: 70px;
    }
    
    /* Navigation changes */
    .nav-menu, 
    .header-daem {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .school-name {
        font-size: 1.15rem;
    }
    
    .school-slogan {
        font-size: 0.75rem;
    }
    
    /* Hero Carousel */
    .hero-section {
        height: 70vh;
        min-height: 480px;
    }
    
    .slide-title {
        font-size: 2.2rem;
    }
    
    .slide-description {
        font-size: 1rem;
        margin-bottom: 25px;
    }
    
    .carousel-btn {
        display: none; /* Hide buttons on mobile, swipe or dots are better */
    }
    
    .carousel-indicators {
        bottom: 20px;
    }
    
    /* Quick features */
    .quick-features {
        grid-template-columns: 1fr;
        margin: 20px auto 0;
    }
    
    .feature-item {
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        padding: 20px 24px;
    }
    
    .feature-item:last-child {
        border-bottom: none;
    }
    
    /* DAEM Banner */
    .daem-banner {
        padding: 60px 0 40px;
    }
    
    .daem-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 24px;
    }
    
    .daem-logo-wrapper {
        justify-self: center;
    }
    
    .escuela-logo-wrapper {
        display: none; /* Hide double logos on mobile layout */
    }
    
    .daem-info-wrapper {
        align-items: center;
    }
    
    .daem-description {
        margin: 0 auto;
    }
    
    /* Sections title */
    .section-title {
        font-size: 2rem;
    }
    
    /* Stats grid */
    .about-stats {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    /* Levels and Gallery */
    .levels-grid,
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    
    /* Forms */
    .form-row {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .contact-form-wrapper {
        padding: 24px;
    }
    
    .btn-submit {
        width: 100%;
    }
    
    /* Lightbox modal UI scaling */
    .lightbox-nav {
        display: none; /* Swipe/tap or use smaller dots for mobiles, hide big arrows */
    }
    
    .lightbox-content-img {
        max-width: 90%;
    }
    
    .lightbox-caption {
        max-width: 90%;
        font-size: 0.95rem;
        padding: 8px 16px;
    }
    
    /* Footer */
    .footer-grid {
        grid-template-columns: 1fr;
        padding: 40px 0;
    }
    
    .bottom-flex {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
}
