/* 1. CONFIGURACIÓN GENERAL */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    line-height: 1.6;
    color: #2c3e50;
    background-color: #f4f7f6;
    width: 100%;
    overflow-x: hidden;
}

/* 2. HEADER Y NAVEGACIÓN (MÓVIL ADAPTADO) */
header {
    background-color: #1a5276;
    color: white;
    padding: 1.5rem 5%;
    display: flex;
    flex-direction: column; /* Apilado por defecto en pantallas pequeñas */
    gap: 15px;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo {
    font-size: 1.4rem;
    font-weight: bold;
    text-transform: uppercase;
    text-align: center;
    letter-spacing: 0.5px;
}

nav ul {
    display: flex;
    list-style: none;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
}

nav ul li a {
    color: white;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    padding: 6px 10px;
    white-space: nowrap;
}

/* 3. SECCIÓN HERO */
.hero {
    background: linear-gradient(rgba(26, 82, 118, 0.7), rgba(26, 82, 118, 0.7)), 
                url('../hero-bg.jpg') no-repeat center center/cover;
    min-height: 65vh; 
    display: flex;
    flex-direction: column; 
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    padding: 50px 6%;
}

.hero h1 {
    font-size: clamp(2rem, 6vw, 3.5rem);
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero p {
    font-size: clamp(1.1rem, 2.5vw, 1.4rem);
    margin-bottom: 35px;
    font-weight: 300;
}

.btn {
    background-color: #2ecc71; 
    color: white;
    padding: 16px 40px; /* Botón más grande */
    text-decoration: none;
    border-radius: 6px;
    font-weight: bold;
    display: inline-block;
    font-size: 16px;
    transition: background 0.3s ease;
}

.btn:hover {
    background-color: #27ae60;
}

.intro {
    padding: 3rem 6%;
    background-color: #ffffff;
    text-align: center;
    font-size: 1.1rem;
}

/* 4. SECCIONES COMUNES Y SERVICIOS */
section {
    padding: 4rem 6%;
    text-align: center;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* Tarjetas amplias */
    gap: 30px;
    margin-top: 35px;
}

.service-card {
    background: #eaf2f8;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.04);
}

.service-img {
    width: 100%;
    height: 220px; /* Imagen de servicios más alta */
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 22px;
}

/* 5. GALERÍA DE FOTOS (GRANDES EN MÓVIL) */
.gallery-grid {
    display: grid;
    /* Cambiado a 280px para evitar miniaturas en celulares */
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); 
    gap: 20px;
    margin-top: 30px;
}

.gallery-item img {
    width: 100%;
    height: 240px; /* Fotos de la galería mucho más altas y llamativas */
    object-fit: cover;
    border-radius: 10px;
    transition: transform 0.3s ease;
}

/* 6. EDUCACIÓN Y VIDEO */
.edu-section {
    display: flex;
    flex-direction: column; 
    gap: 35px;
    background: white;
    text-align: left;
}

.video-container {
    width: 100%;
    position: relative;
    padding-bottom: 56.25%; /* Relación 16:9 nítida */
    height: 0;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 6px 15px rgba(0,0,0,0.1);
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.edu-text h2 {
    margin-bottom: 15px;
}

/* 7. HORARIOS DE ATENCIÓN */
.schedule-table {
    width: 100%;
    max-width: 600px;
    margin: 2rem auto;
    border-collapse: collapse;
    background: white;
    font-size: 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
}

.schedule-table th {
    background-color: #1a5276;
    color: white;
    padding: 16px;
}

.schedule-table td {
    padding: 16px;
    border-bottom: 1px solid #eee;
}

/* 8. CONTACTO Y UBICACIÓN */
.contact-section {
    display: flex;
    flex-direction: column;
    gap: 45px;
    background-color: #eaf2f8;
    text-align: left;
}

.contact-form, .location-info {
    width: 100%;
}

.contact-form h3, .location-info h3 {
    font-size: 1.6rem;
    margin-bottom: 20px;
}

input, textarea {
    width: 100%;
    padding: 16px; /* Campos más altos y fáciles de presionar */
    margin-bottom: 18px;
    border: 1px solid #b3cbdc;
    border-radius: 6px;
    font-size: 16px; 
    background-color: #fff;
}

.btn-submit {
    background-color: #1a5276;
    color: white;
    padding: 16px 30px;
    border: none;
    border-radius: 6px;
    font-weight: bold;
    font-size: 16px;
    cursor: pointer;
    width: 100%; 
    transition: background 0.3s ease;
}

.btn-submit:hover {
    background-color: #113750;
}

/* Contenedor del Mapa Ampliado en Móvil */
.map-container {
    margin-top: 25px;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    padding-bottom: 70%; /* Aumentado el alto proporcional para que no se achique */
    height: 0;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.map-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* 9. FOOTER */
footer {
    background-color: #1a5276;
    color: white;
    padding: 45px 5%;
    text-align: center;
}

.social-icon-link {
    display: inline-flex;
    align-items: center;
    color: white;
    text-decoration: none;
    background: #3b5998;
    padding: 12px 24px;
    border-radius: 6px;
    margin-top: 20px;
    font-weight: 500;
}

.fb-icon {
    width: 22px;
    margin-right: 12px;
}

/* 10. WHATSAPP FLOTANTE */
.whatsapp-btn {
    position: fixed;
    bottom: 25px;
    right: 25px;
    background-color: #25d366;
    color: white;
    padding: 14px 26px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.35);
    z-index: 1000;
    font-size: 15px;
}

/* =======================================================
   11. MEDIA QUERIES (ESTILO ESTRUCTURADO PARA ESCRITORIO)
   ======================================================= */
@media (min-width: 992px) {
    header {
        flex-direction: row;
        padding: 1.2rem 5%;
    }
    
    nav ul {
        gap: 0;
    }
    
    nav ul li a {
        margin-left: 25px;
        font-size: 15px;
    }

    .edu-section {
        flex-direction: row;
        align-items: center;
    }
    
    .video-container, .edu-text {
        flex: 1;
    }
    
    .video-container {
        padding-bottom: 0;
        height: 350px; 
    }

    .contact-section {
        flex-direction: row;
        gap: 60px;
    }
    
    .contact-form, .location-info {
        flex: 1;
    }
    
    .btn-submit {
        width: auto;
    }
    
    .map-container {
        padding-bottom: 0;
        height: 450px; 
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 18px;
    }

    .gallery-item img {
        height: 190px;
    }
    
    .gallery-item img:hover {
        transform: scale(1.04);
    }
}