:root {
    --primary-blue: #002D62;
    --primary-red: #CE1126;
    --accent-gold: #FFD700;
    --white: #FFFFFF;
    --light-gray: #F4F6F9;
    --dark-text: #333333;
    --text-gray: #666666;
    --success: #28a745;
    --error: #dc3545;
    --transition: all 0.3s ease;
    --shadow: 0 5px 15px rgba(0,0,0,0.1);
}

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

body {
    font-family: 'Open Sans', sans-serif;
    color: var(--dark-text);
    line-height: 1.6;
    background-color: var(--white);
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 { font-family: 'Montserrat', sans-serif; font-weight: 700; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* --- HEADER --- */
header {
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    height: 80px;
    display: flex;
    align-items: center;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

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

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

/* Estilo para imagen de logo desde archivo */
.logo-img-file {
    width: 60px; 
    height: 60px; 
    object-fit: contain; /* Asegura que no se deforme */
}

.logo-text h1 { font-size: 1.2rem; color: var(--primary-blue); line-height: 1.2; }
.logo-text span { font-size: 0.9rem; color: var(--primary-red); font-weight: 600; }

.nav-menu { display: flex; gap: 30px; }
.nav-link { font-weight: 600; color: var(--dark-text); position: relative; }
.nav-link::after { content: ''; position: absolute; width: 0; height: 2px; bottom: -5px; left: 0; background-color: var(--primary-red); transition: var(--transition); }
.nav-link:hover::after { width: 100%; }

.hamburger { display: none; cursor: pointer; font-size: 1.5rem; color: var(--primary-blue); }

/* --- HERO --- */
.hero {
    margin-top: 80px;
    height: 85vh; /* Ajustado para dar espacio a stats */
    background: linear-gradient(rgba(0, 45, 98, 0.7), rgba(0, 45, 98, 0.5)), url('https://picsum.photos/seed/school/1920/1080');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    text-align: center;
    color: var(--white);
}

.hero-content { max-width: 800px; margin: 0 auto; animation: fadeInUp 1s ease; }
.hero h2 { font-size: 3rem; margin-bottom: 20px; text-transform: uppercase; }
.hero p { font-size: 1.2rem; margin-bottom: 30px; font-weight: 300; }

.btn { display: inline-block; padding: 12px 30px; border-radius: 5px; font-weight: 600; transition: var(--transition); cursor: pointer; border: none; }
.btn-primary { background-color: var(--primary-red); color: var(--white); }
.btn-primary:hover { background-color: #a80e1e; transform: translateY(-2px); }
.btn-secondary { background-color: transparent; border: 2px solid var(--white); color: var(--white); margin-left: 10px; }
.btn-secondary:hover { background-color: var(--white); color: var(--primary-blue); }

/* --- ESTADÍSTICAS (NUEVO) --- */
.stats-section {
    background-color: var(--white);
    padding: 50px 0;
    margin-top: -50px; /* Superposición ligera con el Hero */
    position: relative;
    z-index: 10;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.stat-card {
    background: var(--white);
    padding: 20px;
    border-radius: 10px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 20px;
    text-align: left;
    border-bottom: 4px solid var(--primary-blue);
}

.stat-icon {
    width: 50px;
    height: 50px;
    background-color: rgba(0, 45, 98, 0.1);
    color: var(--primary-blue);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-icon.female { background-color: rgba(255, 105, 180, 0.1); color: #d63384; }
.stat-icon.male { background-color: rgba(13, 110, 253, 0.1); color: #0d6efd; }
.stat-icon.history { background-color: rgba(25, 135, 84, 0.1); color: #198754; }

.stat-info h3 { font-size: 1.8rem; color: var(--primary-blue); margin-bottom: 0; }
.stat-info p { font-size: 0.9rem; color: var(--text-gray); font-weight: 600; }

/* --- SECCIONES GENERALES --- */
section { padding: 80px 0; }
.section-title { text-align: center; margin-bottom: 60px; }
.section-title h2 { font-size: 2.2rem; color: var(--primary-blue); margin-bottom: 10px; position: relative; display: inline-block; }
.section-title h2::after { content: ''; display: block; width: 60px; height: 4px; background-color: var(--primary-red); margin: 10px auto 0; border-radius: 2px; }

/* --- ABOUT --- */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: center; }
.about-img { width: 100%; border-radius: 10px; box-shadow: var(--shadow); }
.values-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 30px; }
.value-card { background: var(--light-gray); padding: 20px; border-radius: 8px; text-align: center; border-top: 4px solid var(--primary-blue); }
.value-card i { color: var(--primary-red); font-size: 2rem; margin-bottom: 15px; }

/* --- SERVICIOS --- */
.bg-light { background-color: var(--light-gray); }
.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }
.service-card { background: var(--white); padding: 40px 30px; border-radius: 10px; box-shadow: var(--shadow); text-align: center; }
.service-card:hover { transform: translateY(-10px); }
.service-icon { width: 70px; height: 70px; background-color: rgba(0, 45, 98, 0.1); border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 20px; color: var(--primary-blue); font-size: 1.8rem; }

/* --- NOTICIAS --- */
.news-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }
.news-card { background: var(--white); border-radius: 10px; overflow: hidden; box-shadow: var(--shadow); }
.news-card:hover { transform: translateY(-5px); }
.news-img { height: 200px; width: 100%; object-fit: cover; background-color: #ddd; }
.news-content { padding: 20px; }
.news-date { font-size: 0.8rem; color: var(--primary-red); font-weight: 600; margin-bottom: 5px; }
.news-content h3 { font-size: 1.2rem; margin-bottom: 10px; color: var(--primary-blue); }
.read-more { color: var(--primary-blue); font-weight: 600; font-size: 0.9rem; }

/* --- CONTACTO --- */
.contact-container { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; }
.contact-info { display: flex; flex-direction: column; gap: 30px; }
.info-item { display: flex; align-items: flex-start; gap: 15px; }
.info-icon { width: 50px; height: 50px; background-color: rgba(0, 45, 98, 0.1); color: var(--primary-blue); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; }

.form-group { margin-bottom: 20px; position: relative; }
.form-control { width: 100%; padding: 12px 15px; border: 1px solid #ddd; border-radius: 5px; font-family: inherit; }
.form-control:focus { outline: none; border-color: var(--primary-blue); }
.form-label { display: block; margin-bottom: 5px; font-weight: 600; font-size: 0.9rem; }
.error-msg { color: var(--error); font-size: 0.8rem; margin-top: 5px; display: none; }
.form-control.error { border-color: var(--error); }

/* --- FOOTER --- */
footer { background-color: var(--primary-blue); color: var(--white); padding: 60px 0 20px; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 40px; margin-bottom: 40px; }
.footer-col h3 { margin-bottom: 20px; color: var(--accent-gold); }
.footer-links li { margin-bottom: 10px; }
.footer-links a { color: #ddd; transition: 0.3s; }
.footer-links a:hover { color: var(--white); padding-left: 5px; }
.copyright { text-align: center; padding-top: 20px; border-top: 1px solid rgba(255,255,255,0.1); font-size: 0.9rem; color: #aaa; }

/* --- TOAST --- */
#toast { visibility: hidden; min-width: 250px; background-color: var(--success); color: #fff; text-align: center; border-radius: 4px; padding: 16px; position: fixed; z-index: 1001; bottom: 30px; right: 30px; opacity: 0; transition: opacity 0.5s, bottom 0.5s; }
#toast.show { visibility: visible; opacity: 1; bottom: 50px; }

/* --- ANIMATIONS --- */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
.reveal { opacity: 0; transform: translateY(30px); transition: all 0.8s ease; }
.reveal.active { opacity: 1; transform: translateY(0); }

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    .hamburger { display: block; }
    .nav-menu { position: fixed; left: -100%; top: 80px; flex-direction: column; background-color: var(--white); width: 100%; text-align: center; padding: 20px 0; box-shadow: 0 5px 10px rgba(0,0,0,0.1); transition: 0.3s; }
    .nav-menu.active { left: 0; }
    .nav-item { margin: 15px 0; }
    .hero h2 { font-size: 2rem; }
    .about-grid, .contact-container, .values-grid { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: 1fr 1fr; } /* 2 columnas en móvil */
    .stat-card { flex-direction: column; text-align: center; }
}