/* Variables y Configuración Base */
:root {
    --primary: #0f172a; /* Slate 900 */
    --primary-light: #1e293b; /* Slate 800 */
    --secondary: #f59e0b; /* Amber 500 */
    --secondary-light: #fbbf24; /* Amber 400 */
    --accent: #10b981; /* Emerald 500 para el sello ambiental */
    --accent-light: #34d399; /* Emerald 400 */
    --dark: #020617; /* Slate 950 */
    --gray: #64748b; /* Slate 500 */
    --light-gray: #f1f5f9; /* Slate 100 */
    --light: #f8fafc; /* Slate 50 */
    --white: #ffffff;
    
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.5);
    --glass-shadow: 0 8px 32px 0 rgba(15, 23, 42, 0.05);
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body { 
    font-family: 'Inter', sans-serif; 
    background: var(--light); 
    color: var(--primary); 
    line-height: 1.6; 
    overflow-x: hidden; 
}

h1, h2, h3, h4, h5, h6 { 
    font-family: 'Outfit', sans-serif; 
    font-weight: 700; 
    line-height: 1.2; 
    color: var(--dark);
}

a { text-decoration: none; color: inherit; transition: var(--transition); }
img { max-width: 100%; height: auto; display: block; border-radius: 8px; }
ul { list-style: none; }

/* Tipografía de Utilidad */
.text-primary { color: var(--primary); }
.text-secondary { color: var(--secondary); }
.text-accent { color: var(--accent); }

/* Layout y Contenedores */
.container { 
    width: 100%;
    max-width: 1200px; 
    margin: 0 auto; 
    padding: 0 1.5rem; 
}

.section { padding: 6rem 0; position: relative; }
.section-light { background: var(--white); }
.section-dark { 
    background: var(--primary); 
    color: var(--white); 
}
.section-dark h2, .section-dark h3 { color: var(--white); }
.section-dark p { color: rgba(255, 255, 255, 0.8); }

.section-header { text-align: center; margin-bottom: 4rem; }
.section-tag { 
    display: inline-block; 
    background: rgba(245, 158, 11, 0.1); 
    color: var(--secondary); 
    padding: 0.5rem 1.5rem; 
    border-radius: 50px; 
    font-size: 0.85rem; 
    font-weight: 600; 
    text-transform: uppercase; 
    letter-spacing: 2px; 
    margin-bottom: 1rem; 
}
.section-dark .section-tag {
    background: rgba(255, 255, 255, 0.1);
    color: var(--secondary-light);
}

.section-title { 
    font-size: clamp(2rem, 5vw, 3rem); 
    margin-bottom: 1.5rem; 
}
.section-sub { 
    color: var(--gray); 
    max-width: 700px; 
    margin: 0 auto; 
    font-size: 1.1rem; 
}

/* Botones */
.btn { 
    display: inline-flex; 
    align-items: center; 
    justify-content: center; 
    gap: 0.75rem; 
    padding: 0.875rem 2.5rem; 
    border-radius: 50px; 
    font-family: 'Outfit', sans-serif;
    font-weight: 600; 
    font-size: 1rem; 
    transition: var(--transition); 
    cursor: pointer; 
    border: 2px solid transparent; 
}

.btn i { transition: transform 0.3s; }
.btn:hover i { transform: translateX(4px); }

.btn-primary { 
    background: var(--primary); 
    color: var(--white); 
    box-shadow: 0 4px 15px rgba(15, 23, 42, 0.2);
}
.btn-primary:hover { 
    background: var(--primary-light); 
    transform: translateY(-3px); 
    box-shadow: 0 8px 25px rgba(15, 23, 42, 0.3); 
}

.btn-secondary { 
    background: var(--secondary); 
    color: var(--dark); 
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.2);
}
.btn-secondary:hover { 
    background: var(--secondary-light); 
    transform: translateY(-3px); 
    box-shadow: 0 8px 25px rgba(245, 158, 11, 0.3); 
}

.btn-outline { 
    background: transparent; 
    color: var(--primary); 
    border-color: var(--primary); 
}
.btn-outline:hover { 
    background: var(--primary); 
    color: var(--white); 
}

.btn-accent {
    background: var(--accent);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.2);
}
.btn-accent:hover {
    background: var(--accent-light);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.3);
}

/* Glassmorphism Cards */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    box-shadow: var(--glass-shadow);
}

/* =========================================
   HEADER & NAVBAR
========================================= */
.site-header { 
    position: fixed; 
    top: 0; 
    left: 0; 
    right: 0; 
    z-index: 1000; 
    transition: var(--transition);
    background: transparent;
    padding: 1.5rem 0;
}

.site-header.scrolled {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    padding: 0.75rem 0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}

.site-header .container { 
    display: flex; 
    align-items: center; 
    justify-content: space-between; 
}

.nav-logo { display: flex; align-items: center; gap: 1rem; }
.nav-logo-icon { 
    width: auto; 
    height: auto; 
    background: none; 
    border-radius: 0; 
    display: flex; 
    align-items: center; 
    justify-content: center;
}
.nav-logo-icon span { 
    color: var(--secondary); 
    font-family: 'Outfit', sans-serif; 
    font-weight: 800; 
    font-size: 1.25rem; 
}
.nav-logo-text { 
    font-family: 'Outfit', sans-serif; 
    font-weight: 700; 
    font-size: 1.1rem; 
    color: var(--dark); 
    line-height: 1.2; 
}
.nav-logo-text span { color: var(--secondary); }

/* Navigation Links Desktop */
.nav-links { display: none; align-items: center; gap: 2rem; }
.nav-link { 
    color: var(--primary); 
    font-family: 'Outfit', sans-serif;
    font-weight: 600; 
    font-size: 0.95rem; 
    position: relative;
    padding: 0.5rem 0;
}
.nav-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--secondary);
    transition: var(--transition);
}
.nav-link:hover::before { width: 100%; }

/* Dropdown hover behavior for Bootstrap */
@media (min-width: 992px) {
    .dropdown:hover .dropdown-menu { display: block; animation: fadeIn 0.15s ease-in; }
    .dropdown > .nav-link { display: flex; align-items: center; gap: 0.5rem; }
    .dropdown:hover > .nav-link { color: var(--secondary) !important; }
    
    /* Invisible bridge to prevent hover loss between link and menu */
    .dropdown-menu::before {
        content: '';
        position: absolute;
        top: -20px;
        left: 0;
        right: 0;
        height: 20px;
        background: transparent;
    }
}

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

/* Cleanup old obsolete nav-dropdown CSS */

.menu-toggle { 
    display: block; 
    background: none; 
    border: none; 
    font-size: 1.5rem; 
    color: var(--primary); 
    cursor: pointer; 
}

/* =========================================
   MOBILE MENU
========================================= */
.mobile-menu-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    z-index: 1001;
    opacity: 0;
    transition: opacity 0.3s;
}
.mobile-menu { 
    position: fixed; 
    top: 0;
    bottom: 0;
    right: -100%;
    width: 90%;
    max-width: 400px;
    background: var(--white); 
    z-index: 1002; 
    padding: 2rem; 
    overflow-y: auto; 
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -10px 0 30px rgba(0,0,0,0.1);
}
.mobile-menu.open { right: 0; }
.mobile-menu-overlay.open { display: block; opacity: 1; }

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--light-gray);
}
.mobile-close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--gray);
    cursor: pointer;
}

.mobile-menu a { 
    display: block; 
    color: var(--primary); 
    font-family: 'Outfit', sans-serif;
    font-size: 1.2rem; 
    font-weight: 600; 
    padding: 1rem 0; 
    border-bottom: 1px solid var(--light-gray); 
}
.mobile-dropdown-menu { 
    display: none; 
    padding-left: 1rem; 
    background: var(--light); 
    border-radius: 12px; 
    padding: 0.5rem 1rem; 
    margin-top: 0.5rem;
}
.mobile-dropdown-menu.open { display: block; }
.mobile-dropdown-menu a { 
    font-size: 1rem; 
    border: none; 
    padding: 0.75rem 0; 
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    color: var(--gray);
}
.mobile-dropdown-btn { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    width: 100%; 
    background: none; 
    border: none; 
    color: var(--primary); 
    font-family: 'Outfit', sans-serif;
    font-size: 1.2rem; 
    font-weight: 600; 
    padding: 1rem 0; 
    border-bottom: 1px solid var(--light-gray); 
    cursor: pointer; 
}
.mobile-dropdown-btn i { transition: transform 0.3s; }
.mobile-dropdown-btn.open i { transform: rotate(180deg); color: var(--secondary); }

/* =========================================
   HERO SECTION
========================================= */
.hero { 
    padding: 12rem 0 8rem; 
    background: linear-gradient(135deg, var(--light-gray) 0%, var(--white) 100%); 
    position: relative; 
    overflow: hidden; 
}
.hero-shapes {
    position: absolute;
    inset: 0;
    overflow: hidden;
    z-index: 0;
}
.shape-1 {
    position: absolute;
    top: -100px;
    right: -100px;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(245,158,11,0.1) 0%, rgba(255,255,255,0) 70%);
}
.shape-2 {
    position: absolute;
    bottom: -100px;
    left: -100px;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(16,185,129,0.05) 0%, rgba(255,255,255,0) 70%);
}

.hero .container { 
    display: grid; 
    grid-template-columns: 1fr; 
    gap: 4rem; 
    align-items: center; 
    position: relative; 
    z-index: 1; 
}
.hero-content { text-align: center; }
.hero-badge { 
    display: inline-flex; 
    align-items: center; 
    gap: 0.5rem; 
    background: var(--white); 
    border: 1px solid rgba(15,23,42,0.1); 
    color: var(--primary); 
    padding: 0.5rem 1.2rem; 
    border-radius: 50px; 
    font-size: 0.85rem; 
    font-weight: 600; 
    margin-bottom: 2rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
}
.hero-badge i { color: var(--secondary); }
.hero h1 { 
    font-size: clamp(2.5rem, 6vw, 4.5rem); 
    color: var(--dark); 
    margin-bottom: 1.5rem; 
    line-height: 1.1; 
}
.hero h1 span { 
    background: linear-gradient(120deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.hero p { 
    font-size: 1.25rem; 
    color: var(--gray); 
    max-width: 540px; 
    margin: 0 auto 2.5rem; 
}
.hero-ctas { 
    display: flex; 
    gap: 1rem; 
    justify-content: center; 
    flex-wrap: wrap; 
}

.hero-image-wrap { position: relative; }
.hero-image-glass {
    padding: 1rem;
    background: rgba(255,255,255,0.4);
    backdrop-filter: blur(20px);
    border-radius: 32px;
    border: 1px solid rgba(255,255,255,0.6);
    box-shadow: 0 25px 50px -12px rgba(15,23,42,0.15);
}
.hero-img { 
    border-radius: 24px; 
    overflow: hidden; 
}
.hero-img img { 
    width: 100%; 
    height: 450px; 
    object-fit: cover; 
    transition: transform 0.7s;
}
.hero-img:hover img { transform: scale(1.03); }

/* Stats Overlay in Hero */
.hero-stats-card {
    position: absolute;
    bottom: -30px;
    left: -30px;
    background: var(--white);
    padding: 1.5rem 2rem;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    display: flex;
    gap: 2rem;
    animation: float 6s ease-in-out infinite;
}
.stat-item h4 { font-size: 2rem; color: var(--secondary); margin-bottom: 0.2rem; }
.stat-item p { font-size: 0.9rem; color: var(--gray); margin: 0; }

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

/* =========================================
   NOSOTROS / ACERCA DE
========================================= */
.nosotros-grid { 
    display: grid; 
    grid-template-columns: 1fr; 
    gap: 4rem; 
    align-items: center; 
}

.image-gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}
.img-card {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    height: 250px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}
.img-card:nth-child(1) { transform: translateY(20px); }
.img-card:nth-child(2) { height: 280px; }
.img-card:nth-child(3) { height: 220px; transform: translateY(20px); }
.img-card:nth-child(4) { }

.img-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}
.img-card:hover img { transform: scale(1.1); }
.img-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(15,23,42,0.8), transparent);
    display: flex;
    align-items: flex-end;
    padding: 1.5rem;
}
.img-card-overlay span {
    color: var(--white);
    font-weight: 600;
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(4px);
    padding: 0.4rem 1rem;
    border-radius: 50px;
    font-size: 0.85rem;
}

.info-cards { display: grid; gap: 1.5rem; margin-top: 2rem; }
.info-card {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    border-left: 4px solid var(--secondary);
}
.info-card h4 { color: var(--primary); margin-bottom: 0.5rem; font-size: 1.2rem;}
.info-card p { color: var(--gray); font-size: 0.95rem; margin: 0;}
.info-card.ambiental { border-left-color: var(--accent); }

/* =========================================
   EQUIPO DIRECTIVO Y DOCENTE (CARDS)
========================================= */
.equipo-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); 
    gap: 2rem;
    justify-content: center;
}
.team-card { 
    background: var(--white); 
    border-radius: 24px; 
    overflow: hidden; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.04); 
    transition: var(--transition);
    border: 1px solid rgba(0,0,0,0.02);
    position: relative;
    padding-bottom: 1.5rem;
    width: 100%;
    max-width: 380px;
    margin: 0 auto;
}
.team-card:hover { 
    transform: translateY(-10px); 
    box-shadow: 0 20px 40px rgba(15,23,42,0.1); 
}
.team-card-image { 
    height: 260px; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    overflow: hidden;
    position: relative;
}
.team-card-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent, rgba(0,0,0,0.3));
    opacity: 0;
    transition: opacity 0.3s;
}
.team-card:hover .team-card-image::after { opacity: 1; }

.team-card-image i { font-size: 4rem; color: rgba(255, 255, 255, 0.5); }
.team-card-image img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    object-position: top center; 
    transition: transform 0.5s; 
}
.team-card:hover .team-card-image img { transform: scale(1.05); }

.team-card-body { 
    padding: 1.5rem; 
    text-align: center; 
    position: relative;
    z-index: 2;
    background: var(--white);
    margin: -20px 1rem 0;
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}
.team-card-body h3 { font-size: 0.9rem; color: var(--secondary); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 0.5rem; }
.team-card-body .name { color: var(--primary); font-family: 'Outfit', sans-serif; font-weight: 700; font-size: 1.2rem; margin-bottom: 0.3rem; }
.team-card-body .role { color: var(--gray); font-size: 0.9rem; margin-bottom: 1rem; }
.team-card-body .links { display: flex; justify-content: center; gap: 0.5rem; }
.team-card-body .links a { 
    width: 36px; 
    height: 36px; 
    border-radius: 50%; 
    background: var(--light-gray); 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    color: var(--primary); 
    transition: var(--transition); 
}
.team-card-body .links a:hover { 
    background: var(--secondary); 
    color: var(--white); 
    transform: translateY(-2px);
}

/* Cycle Groups Styles */
.cycle-group {
    margin-bottom: 5rem;
    background: rgba(255, 255, 255, 0.3);
    padding: 2.5rem;
    border-radius: 32px;
    border: 1px solid rgba(15, 23, 42, 0.05);
}
.cycle-title {
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 2.5rem;
    padding: 1rem 1.5rem;
    background: var(--white);
    border-radius: 16px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
}
.cycle-subtitle {
    font-size: 0.85rem;
    color: var(--secondary);
    font-weight: 700;
    background: rgba(245, 158, 11, 0.1);
    padding: 0.3rem 1rem;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-left: 0.5rem;
}
.empty-cycle {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem;
    background: var(--white);
    border: 2px dashed var(--light-gray);
    border-radius: 24px;
    color: var(--gray);
}

/* =========================================
   NOTICIAS
========================================= */
.noticias-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); 
    gap: 2rem; 
}
.news-card { 
    background: var(--white); 
    border-radius: 24px; 
    overflow: hidden; 
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05); 
    transition: var(--transition); 
    border: 1px solid rgba(0,0,0,0.02);
    cursor: pointer;
    display: flex;
    flex-direction: column;
}
.news-card:hover { 
    transform: translateY(-10px); 
    box-shadow: 0 20px 40px rgba(15,23,42,0.1); 
}
.news-card-image { position: relative; overflow: hidden; height: 220px; }
.news-card-image img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1); 
}
.news-card:hover .news-card-image img { transform: scale(1.08); }
.news-badge { 
    position: absolute; 
    top: 1rem; 
    left: 1rem; 
    padding: 0.4rem 1rem; 
    border-radius: 50px; 
    font-size: 0.75rem; 
    font-weight: 700; 
    color: var(--white); 
    text-transform: uppercase; 
    letter-spacing: 1px;
    z-index: 2;
}
.news-card-body { padding: 1.5rem; flex-grow: 1; display: flex; flex-direction: column;}
.news-date { color: var(--gray); font-size: 0.85rem; margin-bottom: 0.75rem; font-weight: 500;}
.news-date i { color: var(--secondary); margin-right: 0.3rem;}
.news-card-body h3 { font-size: 1.25rem; color: var(--primary); margin-bottom: 0.75rem; line-height: 1.3;}
.news-card-body p { color: var(--gray); font-size: 0.95rem; line-height: 1.6; margin-bottom: 1.5rem; flex-grow: 1;}
.read-more { color: var(--secondary); font-weight: 600; font-size: 0.95rem; display: flex; align-items: center; gap: 0.5rem;}
.news-card:hover .read-more { color: var(--primary); }
.read-more i { transition: transform 0.3s; }
.news-card:hover .read-more i { transform: translateX(5px); }

/* =========================================
   GALERÍA
========================================= */
.galeria-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); 
    grid-auto-rows: 250px;
    gap: 1.5rem; 
}
.galeria-item { 
    border-radius: 20px; 
    overflow: hidden; 
    position: relative; 
    cursor: pointer;
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}
.galeria-item img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1); 
}
.galeria-item:hover img { transform: scale(1.1); }
.galeria-item-overlay { 
    position: absolute; 
    inset: 0; 
    background: linear-gradient(to top, rgba(15,23,42,0.8), rgba(15,23,42,0.2) 50%, transparent); 
    opacity: 0; 
    transition: opacity 0.3s; 
    display: flex; 
    align-items: flex-end; 
    justify-content: center;
    padding: 2rem 1.5rem; 
}
.galeria-item:hover .galeria-item-overlay { opacity: 1; }
.galeria-item-overlay span { 
    color: var(--white); 
    font-weight: 600; 
    font-size: 1.1rem; 
    transform: translateY(20px);
    transition: transform 0.3s;
}
.galeria-item:hover .galeria-item-overlay span { transform: translateY(0); }

/* =========================================
   CONTACTO
========================================= */
.contacto-grid { 
    display: grid; 
    grid-template-columns: 1fr; 
    gap: 4rem; 
}

@media (min-width: 768px) {
    .contacto-grid { 
        grid-template-columns: 1fr 1.2fr; 
    }
}
.contacto-info { display: flex; flex-direction: column; gap: 1.5rem; }
.contacto-item { 
    background: var(--white); 
    border-radius: 20px; 
    padding: 1.5rem; 
    display: flex; 
    align-items: center;
    gap: 1.5rem; 
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03); 
    transition: var(--transition);
}
.contacto-item:hover { transform: translateY(-5px); box-shadow: 0 15px 35px rgba(0,0,0,0.06); }
.contacto-item-icon { 
    width: 60px; 
    height: 60px; 
    background: rgba(15, 23, 42, 0.05); 
    border-radius: 16px; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    flex-shrink: 0; 
    transition: var(--transition);
}
.contacto-item:hover .contacto-item-icon { background: var(--secondary); }
.contacto-item-icon i { font-size: 1.5rem; color: var(--primary); transition: var(--transition); }
.contacto-item:hover .contacto-item-icon i { color: var(--white); }
.contacto-item h4 { font-size: 1.1rem; color: var(--primary); margin-bottom: 0.3rem; }
.contacto-item p { color: var(--gray); font-size: 0.95rem; }

.contacto-form-wrapper {
    background: var(--white);
    border-radius: 24px;
    padding: 3rem;
    box-shadow: 0 20px 50px rgba(15,23,42,0.08);
}
.form-group { margin-bottom: 1.5rem; }
.form-group label { 
    display: block; 
    color: var(--primary); 
    font-weight: 600; 
    font-size: 0.95rem; 
    margin-bottom: 0.5rem; 
}
.form-group input, .form-group textarea { 
    width: 100%; 
    background: var(--light-gray); 
    border: 2px solid transparent; 
    border-radius: 12px; 
    padding: 1rem 1.25rem; 
    color: var(--primary); 
    font-family: inherit; 
    font-size: 1rem; 
    transition: var(--transition); 
}
.form-group input:focus, .form-group textarea:focus { 
    outline: none; 
    border-color: var(--secondary); 
    background: var(--white); 
    box-shadow: 0 0 0 4px rgba(245,158,11,0.1);
}
.form-group textarea { resize: vertical; min-height: 150px; }

/* =========================================
   FOOTER
========================================= */
footer { 
    background: var(--dark); 
    color: rgba(255, 255, 255, 0.7); 
    padding: 6rem 0 2rem; 
    position: relative;
    overflow: hidden;
}
.footer-grid { 
    display: grid; 
    grid-template-columns: 1fr; 
    gap: 3rem; 
    margin-bottom: 4rem; 
    position: relative;
    z-index: 1;
}
.footer-brand-icon {
    width: auto; height: auto;
    background: none;
    border-radius: 0;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 2rem;
}
.footer-brand-icon span { color: var(--white); font-weight: 800; font-family: 'Outfit'; font-size: 1.2rem;}
footer h4 { color: var(--white); font-size: 1.2rem; margin-bottom: 1.5rem; }
footer ul li { margin-bottom: 0.8rem; }
footer ul li a { color: rgba(255,255,255,0.7); transition: var(--transition); display: inline-flex; align-items: center; gap: 0.5rem;}
footer ul li a:hover { color: var(--secondary); transform: translateX(5px);}

.footer-social { display: flex; gap: 1rem; }
.footer-social a { 
    width: 45px; 
    height: 45px; 
    background: rgba(255, 255, 255, 0.05); 
    border-radius: 12px; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    color: var(--white); 
    transition: var(--transition); 
}
.footer-social a:hover { background: var(--secondary); transform: translateY(-5px); }

.footer-bottom { 
    border-top: 1px solid rgba(255, 255, 255, 0.1); 
    padding-top: 2rem; 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    gap: 1rem; 
    text-align: center; 
}

/* =========================================
   MODALES Y UTILIDADES
========================================= */
.reveal { opacity: 0; transform: translateY(40px); transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1); }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* WhatsApp Floater */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background-color: #25d366;
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    font-size: 30px;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}
.whatsapp-float:hover {
    background-color: #128C7E;
    transform: scale(1.1);
}

/* Modales Compartidos */
.lightbox {
    position: fixed; inset: 0; z-index: 9999;
    background: rgba(15,23,42,0.95);
    backdrop-filter: blur(8px);
    display: flex; align-items: center; justify-content: center;
    opacity: 0; visibility: hidden;
    transition: var(--transition);
}
.lightbox.active { opacity: 1; visibility: visible; }
.lightbox-close {
    position: absolute; top: 20px; right: 30px;
    background: none; border: none; color: var(--white);
    font-size: 2.5rem; cursor: pointer; transition: var(--transition);
}
.lightbox-close:hover { color: var(--secondary); transform: rotate(90deg); }

.modal-content-wrapper {
    background: var(--white);
    width: 90%; max-width: 800px;
    border-radius: 24px;
    overflow: hidden;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    transform: translateY(20px);
    transition: transform 0.4s;
}
.lightbox.active .modal-content-wrapper { transform: translateY(0); }

/* Custom Scrollbar */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--light); }
::-webkit-scrollbar-thumb { background: var(--gray); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* =========================================
   RESPONSIVE
========================================= */
@media (min-width: 768px) {
    .nav-links { display: flex; }
    .menu-toggle { display: none; }
    
    .hero .container { grid-template-columns: 1fr 1fr; text-align: left; }
    .hero-content { text-align: left; }
    .hero p { margin: 0 0 2.5rem; }
    .hero-ctas { justify-content: flex-start; }
    
    .nosotros-grid { grid-template-columns: 1fr 1fr; }
    .contacto-grid { grid-template-columns: 1fr 1fr; }
    
    /* Alineación pareja para Convivencia y Padres */
    #convivencia .contacto-grid > div {
        display: flex;
        flex-direction: column;
    }
    #convivencia .section-sub {
        min-height: 100px; /* Asegura que el texto ocupe el mismo espacio */
        margin-bottom: 2rem !important;
    }
    #convivencia .info-card {
        height: 100%; /* Opcional: hace que las tarjetas blancas también tengan el mismo tamaño */
    }

    .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; }
    .footer-bottom { flex-direction: row; justify-content: space-between; }
}

@media (min-width: 1024px) {
    .galeria-grid { 
        grid-template-columns: repeat(4, 1fr); 
    }
    .galeria-item:nth-child(1) { grid-column: span 2; grid-row: span 2; }
}

/* =========================================
   SISTEMA DE CHAT PROPIO (GLASSMORPHISM)
========================================= */
.chat-widget {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.chat-btn {
    width: 60px;
    height: 60px;
    background: var(--secondary); /* Cambiado de primary a secondary para resaltar */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary); /* El icono será oscuro sobre fondo naranja */
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(245, 158, 11, 0.4);
    transition: var(--transition);
}
.chat-btn:hover { transform: scale(1.1) rotate(5deg); background: var(--primary); color: white; }
.chat-btn::before {
    content: 'Desarrollado por mundoclassnet.cl';
    position: absolute;
    right: 70px;
    background: var(--primary);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 10px;
    font-size: 0.7rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: 0.3s;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}
.chat-btn:hover::before { opacity: 1; transform: translateX(-10px); }

.chat-window {
    width: 350px;
    height: 500px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    margin-bottom: 20px;
    box-shadow: var(--glass-shadow);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.95);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.chat-window.active { opacity: 1; visibility: visible; transform: translateY(0) scale(1); }

.chat-header {
    background: var(--primary);
    color: white; /* Asegurado que sea blanco */
    padding: 1.2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.chat-header h4 { margin: 0; font-size: 1rem; color: white; }
.chat-close { cursor: pointer; opacity: 0.8; transition: 0.2s; color: white; }
.chat-close:hover { opacity: 1; }

.chat-messages {
    flex-grow: 1;
    padding: 1.2rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}
.chat-msg {
    max-width: 80%;
    padding: 0.7rem 1rem;
    border-radius: 15px;
    font-size: 0.9rem;
    line-height: 1.4;
}
.chat-msg.visitor { align-self: flex-end; background: var(--secondary); color: var(--dark); border-bottom-right-radius: 2px; }
.chat-msg.admin { align-self: flex-start; background: white; color: var(--primary); border-bottom-left-radius: 2px; box-shadow: 0 2px 5px rgba(0,0,0,0.05); }

.chat-footer {
    padding: 1rem;
    background: rgba(255,255,255,0.5);
    display: flex;
    gap: 0.5rem;
    border-top: 1px solid var(--glass-border);
}
.chat-footer input {
    flex-grow: 1;
    border: 1px solid var(--glass-border);
    background: white;
    border-radius: 50px;
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
    outline: none;
}
.chat-footer button {
    background: var(--primary);
    color: white;
    border: none;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.2s;
}
.chat-footer button:hover { background: var(--secondary); color: var(--dark); }

/* Classnet Floating Button */
.classnet-float {
    position: fixed;
    bottom: 30px;
    right: 105px;
    z-index: 2000;
    background: var(--accent);
    color: white;
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 0.9rem;
    box-shadow: 0 10px 25px rgba(16, 185, 129, 0.3);
    transition: var(--transition);
}

.classnet-float:hover {
    background: var(--primary);
    transform: translateY(-5px) scale(1.05);
    color: white;
    box-shadow: 0 15px 30px rgba(15, 23, 42, 0.2);
}

.classnet-float i {
    font-size: 1.1rem;
}

@media (max-width: 768px) {
    .classnet-float span {
        display: none;
    }
    .classnet-float {
        padding: 0;
        width: 60px;
        height: 60px;
        justify-content: center;
    }
    .classnet-float i {
        margin: 0;
    }
}

