/* Paleta de colores basada en el logotipo institucional ESA */
:root {
    --primary-green: #0d8a52;   /* Verde institucional del logotipo */
    --dark-green: #085934;      /* Verde oscuro para hovers */
    --black-bg: #121212;        /* Negro de alto contraste */
    --accent-yellow: #f4d03f;   /* Amarillo técnico de acento */
    --dark-text: #222222;       /* Texto oscuro principal */
    --light-bg: #f4f6f7;        /* Fondo gris claro */
    --white: #ffffff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    color: var(--dark-text);
    line-height: 1.6;
    background-color: var(--white);
}

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

.section-padding {
    padding: 60px 0;
}

.bg-light {
    background-color: var(--light-bg);
}

.section-title {
    text-align: center;
    font-size: 2.2rem;
    color: var(--primary-green);
    margin-bottom: 10px;
}

.section-subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 40px;
}

/* Header y Navegación */
.header {
    background-color: var(--black-bg);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 3px solid var(--primary-green);
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

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

/* Efecto Interactivo del Logotipo <-> Icono Home */
.logo-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    position: relative;
    width: 160px;
    height: 55px;
    overflow: hidden;
    cursor: pointer;
}

.logo-img {
    height: 55px;
    width: auto;
    object-fit: contain;
    transition: opacity 0.4s ease, transform 0.4s ease;
    position: absolute;
    top: 0;
    left: 0;
}

.logo-home-icon {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-yellow);
    font-size: 2.2rem;
    opacity: 0;
    transform: scale(0.5) rotate(-180deg);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.logo-brand:hover .logo-img,
.logo-brand.clicked .logo-img {
    opacity: 0;
    transform: scale(0.5) rotate(180deg);
}

.logo-brand:hover .logo-home-icon,
.logo-brand.clicked .logo-home-icon {
    opacity: 1;
    transform: scale(1) rotate(0deg);
}

.nav-menu {
    display: flex;
    gap: 20px;
}

.nav-menu a {
    color: var(--white);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

.nav-menu a:hover {
    color: var(--accent-yellow);
}

.menu-check, .menu-btn {
    display: none;
}

/* Hero Section */
.hero {
    background: linear-gradient(rgba(0, 0, 0, 0.75), rgba(13, 138, 82, 0.85)), url('../img/fondo.jpg') center/cover no-repeat;
    color: var(--white);
    padding: 120px 0;
    text-align: center;
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.6);
}

.hero-content p {
    font-size: 1.25rem;
    max-width: 850px;
    margin: 0 auto 35px auto;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

/* Estilos de Botones */
.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background-color: var(--primary-green);
    color: var(--white);
}

.btn-primary:hover {
    background-color: var(--dark-green);
}

.btn-accent {
    background-color: var(--accent-yellow);
    color: var(--black-bg);
}

.btn-accent:hover {
    background-color: #d4b22f;
}

.btn-whatsapp {
    background-color: #25d366;
    color: var(--white);
}

.btn-whatsapp:hover {
    background-color: #1ebc57;
}

/* Tarjetas (Cards) */
.grid-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 25px;
}

.card {
    background: var(--white);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: transform 0.3s, box-shadow 0.3s;
    text-align: center;
    border-top: 4px solid var(--primary-green);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.card-icon {
    font-size: 2.5rem;
    color: var(--primary-green);
    margin-bottom: 15px;
}

.card h3 {
    margin-bottom: 12px;
    color: var(--black-bg);
}

.card-interactive {
    cursor: pointer;
}

.card-link {
    display: inline-block;
    margin-top: 15px;
    font-size: 0.9rem;
    font-weight: bold;
    color: var(--primary-green);
}

.card-interactive:hover .card-link {
    color: var(--dark-green);
    text-decoration: underline;
}

/* Banner de Promociones */
.promo-banner {
    background-color: var(--black-bg);
    border-left: 6px solid var(--accent-yellow);
    color: var(--white);
    padding: 40px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.promo-text h3 {
    color: var(--accent-yellow);
    margin-bottom: 8px;
}

/* Formulario, Contacto y Mapa Chico */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.contact-info h3 {
    color: var(--primary-green);
    margin-bottom: 20px;
}

.contact-info p {
    margin-bottom: 15px;
}

.contact-info i {
    color: var(--primary-green);
    margin-right: 10px;
    width: 20px;
}

.map-container-small {
    margin-top: 20px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    border-radius: 8px;
    overflow: hidden;
}

.contact-form input, .contact-form textarea {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

.contact-form input:focus, .contact-form textarea:focus {
    outline: none;
    border-color: var(--primary-green);
}

/* Pie de Página */
.footer {
    background-color: var(--black-bg);
    color: #888;
    padding: 25px 0;
    text-align: center;
    font-size: 0.9rem;
    border-top: 1px solid #333;
}

/* WhatsApp Flotante */
.whatsapp-float {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #25d366;
    color: white;
    border-radius: 50%;
    width: 55px;
    height: 55px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2rem;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    z-index: 1000;
    text-decoration: none;
}

/* ==================== MODALES CON FONDOS ULTRA CLAROS Y VISIBLES ==================== */

.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.35); /* Fondo exterior atenuado */
    z-index: 2000;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal-content {
    border-radius: 12px;
    max-width: 620px;
    width: 100%;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    position: relative;
    overflow: hidden;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    animation: modalFadeIn 0.3s ease;
}

/* Rutas de las imágenes con soporte doble (.jpg y .jpeg) para evitar errores de carga */
.modal-bg-1 { background-image: url('../img/1.jpg'), url('../img/1.jpeg'); }
.modal-bg-2 { background-image: url('../img/2.jpg'), url('../img/2.jpeg'); }
.modal-bg-3 { background-image: url('../img/3.jpg'), url('../img/3.jpeg'); }
.modal-bg-4 { background-image: url('../img/4.jpeg'), url('../img/4.jpg'); }
.modal-bg-5 { background-image: url('../img/5.jpeg'), url('../img/5.jpg'); }
.modal-bg-6 { background-image: url('../img/6.jpeg'), url('../img/6.jpg'); }
.modal-bg-7 { background-image: url('../img/7.jpg'), url('../img/7.jpeg'); }

/* Overlay interior transparente para máxima visibilidad de las fotos */
.modal-inner {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.35), rgba(15, 15, 15, 0.20));
    color: var(--white);
    height: 100%;
    width: 100%;
    backdrop-filter: blur(1.5px);
}

.modal-header {
    background-color: rgba(13, 138, 82, 0.80); /* Verde traslúcido */
    color: var(--white);
    padding: 18px 20px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.modal-icon {
    font-size: 1.8rem;
    color: var(--accent-yellow);
    filter: drop-shadow(1px 1px 2px rgba(0,0,0,0.8));
}

.modal-header h2 {
    font-size: 1.35rem;
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.9);
}

.modal-body {
    padding: 25px;
    color: #ffffff;
    /* Sombras de texto para garantizar legibilidad óptima sobre la foto */
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.95), 0px 0px 8px rgba(0,0,0,0.8);
}

.modal-body p {
    margin-bottom: 15px;
    line-height: 1.6;
    font-weight: 600;
}

.modal-body ul {
    list-style: none;
    padding: 0;
}

.modal-body li {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}

.modal-body li i {
    color: var(--accent-yellow);
    filter: drop-shadow(1px 1px 3px rgba(0,0,0,0.9));
}

.modal-footer {
    padding: 15px 25px;
    background-color: rgba(0, 0, 0, 0.20);
    text-align: right;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 18px;
    color: var(--white);
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    z-index: 10;
    transition: color 0.2s;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.9);
}

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

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

/* Responsive Móvil */
@media (max-width: 768px) {
    .menu-btn {
        display: block;
        color: var(--white);
        font-size: 1.5rem;
        cursor: pointer;
    }
    
    .nav-menu {
        position: absolute;
        top: 75px;
        left: -100%;
        background-color: var(--black-bg);
        width: 100%;
        flex-direction: column;
        padding: 20px;
        transition: all 0.3s ease;
    }
    
    .menu-check:checked ~ .nav-menu {
        left: 0;
    }

    .hero-content h1 {
        font-size: 2.2rem;
    }
}