/* ==========================================================================
   1. VARIABLES, CONFIGURACIÓN BASE Y REINICIOS (RESET)
   ========================================================================== */
:root {
    --accent: #2563eb;
    --bg-body: #f8f9fa;
    --white: #ffffff;
    --primary: #3498db;
    --primary-light: #b2ccdd;
    --primary-hover: #2980b9;
    --text: #2c3e50;
    --text-muted: #7f8c8d;
    --border-light: #eeeeee;
    
    /* Gris más claro para un aspecto más moderno y suave */
    --gray-light-bg: #4b5563; 
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    color: var(--text);
    /* Evita que palabras muy largas rompan el contenedor */
    overflow-wrap: break-word;
}

/* Asegurar que las imágenes no desborden el ancho de pantalla */
img {
    max-width: 100%;
    height: auto;
}

html, body {
    height: 100%;
}

body {
    font-family: 'Segoe UI', Roboto, Arial, sans-serif;
    background: var(--bg-body);
    color: #111;
    display: flex;
    flex-direction: column;
    overflow-x: hidden; /* Evita el scroll horizontal accidental */
}

a {
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
    color: var(--primary-light);
}

/* Enlace para saltar al contenido (visualmente oculto hasta focus) */
.skip-link {
    position: absolute;
    left: 8px;
    top: 8px;
    background: #111;
    color: #fff;
    padding: 8px 12px;
    border-radius: 4px;
    z-index: 20000;
    transform: translateY(-120%);
    transition: transform 0.18s ease;
}
.skip-link:focus {
    transform: translateY(0);
    outline: 3px solid #fff;
}

/* Estilos visibles para el foco (mejor accesibilidad) */
:where(a, button, input, select, textarea):focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 2px;
}

/* Evitar que el header tape anclas internas */
section, .site-main, .content, .banner, .form-section {
    scroll-margin-top: 80px;
}

/* Componente de diseño reutilizable */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}


/* ==========================================================================
   2. ELEMENTOS DE NAVEGACIÓN (HEADER & NAV)
   ========================================================================== */
.site-header {
    background: var(--gray-light-bg);
    box-shadow: 0 2px 6px rgba(0,0,0,.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav {
    height: 60px;
    display: flex;
    align-items: center;
}

.nav .container {
    width: 100%;
}

.logo {
    font-weight: 500;
    color: var(--white); 
    order: 1;
}

.logo * {
    color: var(--white);
}

.phone-header {
    display: block;
    font-size: 0.85rem;
    font-weight: 300;
    color: var(--primary-light);
}

.nav-menu {
    order: 2;
}

.nav-list {
    list-style: none;
    display: flex;
    gap: 24px;
}

.nav-list a {
    color: var(--white); 
    font-weight: 300;
    letter-spacing: 0.5px;
    transition: opacity 0.2s;
}

.nav-list a:hover {
    opacity: 0.7;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    background: transparent;
    border: none;
    cursor: pointer;
    order: 3;
    padding: 6px; /* aumenta área táctil en móviles */
}

.menu-toggle i{
    width: 100%;
    font-size: 1.5rem;
    color: var(--white); 
}

.menu-toggle i:hover {
    color: var(--primary-light);
}


/* ==========================================================================
   3. ESTRUCTURA CENTRAL Y CONTENIDO PRINCIPAL (MAIN)
   ========================================================================== */
.site-main {
    flex: 1;
    display: flex;          
    flex-direction: column; 
    align-items: center;    
    justify-content: center;
    padding: 40px 16px;
}

.logotipo {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;    
}

.horarios {
    margin: 5px 0 40px 0; 
    text-align: center;
}

.horarios h1 {
    font-size: 1.6rem;
    color: var(--text);
    margin-bottom: 8px;
    font-weight: 600;
}

/* Bloques principales de ancho controlado */
.content, .banner {
    width: 100%;              /* Ocupan todo el ancho disponible... */
    max-width: 1000px;        /* ...pero se frenan en 1000px en pantallas grandes */
    padding: 40px;
    text-align: center;
}

.content h1 {
    font-size: 1.4rem;
    margin-bottom: 16px;
}


/* ==========================================================================
   4. BANNERS Y SECCIONES DE LLAMADA A LA ACCIÓN (CTA)
   ========================================================================== */
/* Banner Principal */
.banner {
    background: url('../src/img/banner.webp') no-repeat center center;
    background-size: cover;
    box-shadow: 0 2px 6px rgba(0,0,0,.08);
    color: var(--white);
    margin-bottom: 20px;
}

.banner-content {
    max-width: 100%; 
    text-align: center;
}

.banner-content * {
    color: var(--white);
}

.btn-cta {
    display: inline-block;
    background-color: #e67e22;
    color: var(--white) !important;
    padding: 12px 28px;
    font-weight: bold;
    border-radius: 4px;
    margin-top: 20px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.15);
    transition: background 0.3s ease;
}

.btn-cta:hover {
    background-color: #d35400;
}

/* Banners CTA Intermedios */
.cta-banner-inline {
    background: #e2e8f0;
    width: 100%;
    max-width: 1000px;
    padding: 15px;
    margin-bottom: 30px;
    text-align: center;
    border-radius: 4px;
    border-left: 5px solid var(--primary);
}

.cta-banner-inline p, 
.cta-banner-inline a {
    color: #1e293b;
}


/* ==========================================================================
   5. COMPONENTES DEL CONTENIDO (SERVICIOS Y DIFERENCIACIÓN)
   ========================================================================== */
/* Grid de Servicios */
.services-section h3, 
.form-section h3, 
.banner-style-diff h3 {
    font-size: 1.8rem;
    margin-bottom: 10px;
    color: var(--text);
}

.section-subtitle {
    color: var(--text-muted);
    margin-bottom: 30px;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
    gap: 20px;
    width: 100%;
    margin-top: 20px;
}

.service-card {
    background: var(--white);
    padding: 25px;
    border-radius: 6px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    text-align: left;
    border-top: 3px solid var(--primary);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.service-card h4 {
    font-size: 1.2rem;
    margin-bottom: 12px;
    color: var(--text);
}

.service-card p {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 15px;
    line-height: 1.5;
}

.more-info {
    color: var(--primary);
    font-weight: bold;
    font-size: 0.9rem;
}

/* Sección de Diferenciación */
.banner-style-diff {
    background: #1e293b;
    color: white;
    width: 100%;
    max-width: 1000px;
    padding: 40px;
    border-radius: 6px;
    margin-bottom: 30px;
}

.banner-style-diff h3 {
    color: white;
    margin-bottom: 30px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
    gap: 20px;
}

.feature-item {
    background: rgba(255,255,255,0.05);
    padding: 20px;
    border-radius: 4px;
    text-align: left;
}

.feature-item strong {
    display: block;
    color: #38bdf8;
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.feature-item p {
    color: #cbd5e1;
    font-size: 0.9rem;
    line-height: 1.4;
}


/* ==========================================================================
   6. FORMULARIOS
   ========================================================================== */
.quick-form {
    max-width: 500px;
    margin: 20px auto 0 auto;
    width: 100%;
}

.quick-form * {
    color: #1e293b;
}

.form-group {
    margin-bottom: 15px;
}

.quick-form input, 
.quick-form select {
    width: 100%;
    padding: 12px;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    font-size: 1rem;
}

.quick-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
    resize: vertical; 
}

.btn-submit {
    width: 100%;
    background: #2563eb;
    color: white;
    padding: 14px;
    border: none;
    font-weight: bold;
    font-size: 1.1rem;
    border-radius: 4px;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.btn-submit:hover {
    background: #1d4ed8;
}


/* ==========================================================================
   7. COMPONENTES EMERGENTES (MODAL POPUP) Y BOTONES ASOCIADOS
   ========================================================================== */
.open-popup-btn {
    background: transparent;
    border: none;
    color: var(--primary);
    font-weight: bold;
    font-size: 0.9rem;
    cursor: pointer;
    text-align: left;
    padding: 0;
    margin-top: 10px;
    display: inline-block;
    transition: color 0.2s ease;
}

.open-popup-btn:hover {
    color: var(--primary-hover);
}

/* Capa oscura de fondo (Overlay) */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.6); 
    backdrop-filter: blur(4px); 
    z-index: 10000; /* Por encima de todo */
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

/* Estado activo del Modal */
.modal-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

/* Contenedor del contenido del popup */
.modal-content {
    background: var(--white);
    width: 90%;
    max-width: 750px;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    position: relative;
    overflow: hidden;
    transform: translateY(-30px);
    transition: transform 0.3s ease;
}

.modal-overlay.open .modal-content {
    transform: translateY(0);
}

/* Botón de cerrar (X) */
.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: rgba(0, 0, 0, 0.5);
    color: var(--white);
    border: none;
    font-size: 1.8rem;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: background 0.2s;
}

.modal-close:hover {
    background: rgba(0, 0, 0, 0.8);
}

/* Estructura interna del popup */
.modal-body {
    display: flex;
    flex-direction: column;
}

.modal-img-container {
    width: 100%;
    height: 220px;
    background: #e2e8f0;
}

.modal-img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-text-container {
    padding: 30px;
}

#modal-h1 {
    font-size: 1.8rem;
    color: var(--text);
    margin-bottom: 5px;
    font-weight: 700;
}

#modal-h2 {
    font-size: 1.1rem;
    color: var(--primary);
    margin-bottom: 15px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#modal-desc {
    font-size: 1rem;
    color: #475569;
    line-height: 1.6;
}


/* ==========================================================================
   8. ELEMENTOS FIJOS (WHATSAPP FLOTANTE)
   ========================================================================== */
.whatsapp-float {
    position: fixed;
    bottom: 30px; 
    left: 5px;   
    z-index: 9999; 
    background-color: #25d366;
    border-radius: 50px;
    padding: 15px 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    text-decoration: none;
    transition: transform 0.2s ease;
}

.whatsapp-float img {
    width: 30px;  
    height: 30px;
}

.whatsapp-float span {
    color: white;
    font-size: 15px;
    font-weight: bold;
    font-family: Arial, sans-serif;
}

.whatsapp-float:hover {
    transform: scale(1.05);
}


/* ==========================================================================
   9. PIE DE PÁGINA (FOOTER)
   ========================================================================== */
.site-footer {
    background: var(--gray-light-bg);
    color: var(--white);
    padding: 20px 0; 
    font-weight: 300; 
    font-size: 0.9rem;
}

.footer-container {
    flex-direction: column; 
    align-items: stretch;
}

.footer-row {
    display: flex;
    width: 100%;
}

.footer-nav-row {
    justify-content: center;
    padding-bottom: 12px;
}

.footer-list {
    list-style: none;
    display: flex;
    gap: 32px;
    flex-wrap: wrap;
    justify-content: center;
}

.site-footer a {
    color: var(--white);
    font-weight: 300;
    transition: opacity 0.2s;
}

.site-footer a:hover {
    opacity: 0.7;
}

.footer-divider {
    border: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    margin: 0;
    width: 100%;
}

.footer-info-row {
    justify-content: space-between; 
    align-items: center;
    padding-top: 12px;
    flex-wrap: wrap; 
    gap: 16px;
}

.footer-info-row * {
    color: var(--white);
}

.company-name {
    font-weight: 400; 
}

.footer-info-row p {
    opacity: 0.85;
}


/* ==========================================================================
   10. DISEÑO RESPONSIVO (MEDIA QUERIES)
   ========================================================================== */
@media (max-width: 768px) {
    .footer-info-row {
        flex-direction: column; 
        gap: 8px;
        text-align: center;
    }
}

@media (min-width: 650px) {
    /* Comportamiento responsive del Popup (Cambio a 2 columnas) */
    .modal-body {
        flex-direction: row; 
    }
    
    .modal-img-container {
        width: 40%;
        height: auto; 
    }
    
    .modal-text-container {
        width: 60%;
        padding: 40px;
    }
}

@media (max-width: 600px) {
    .menu-toggle {
        display: flex;
    }

    .nav-menu {
        display: none;
        position: absolute;
        top: 60px;
        right: 16px;
        background: var(--gray-light-bg); 
        box-shadow: 0 4px 12px rgba(0,0,0,.15);
        padding: 16px;
        border-radius: 8px;
        width: 200px;
    }

    .nav-menu.active {
        display: block;
    }

    .nav-list {
        flex-direction: column;
        gap: 12px;
    }
  
    .container {
        padding: 0 16px;
    }

    /* Reducir paddings laterales en móviles para ganar espacio */
    .content, .banner, .banner-style-diff {
        padding: 40px 20px;
        max-width: 100%; 
    }

    /* Limita de forma segura el ancho en móviles medianos */
    .content, .banner {
        max-width: 100%; 
    }
}

@media (max-width: 450px) {
    .footer-list {
        gap: 16px; 
    }
}