/* ============================================= */
/* VARIABLES Y RESET                            */
/* ============================================= */
:root {
    --color-primary: #007887;     /* Azul Turquesa Corporativo */
    --color-white: #ffffff;
    --text-on-dark: rgba(255, 255, 255, 0.9);
    /* Fondo Glassmorphism para las tarjetas */
    --bg-card-glass: rgba(0, 0, 0, 0.5); 
    --blur-card: blur(10px);
    --radius-md: 12px;
    --shadow-lg: 0 10px 30px rgba(0,0,0,0.3);
    --transition: all 0.3s ease;
}

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

/* Cambiado a min-height para permitir scroll en pantallas compactas */
html, body {
    min-height: 100vh;
    font-family: 'Montserrat', sans-serif;
    background-color: #121212;
}

body {
    display: flex;
    flex-direction: column;
}

/* ============================================= */
/* 1. HEADER SÓLIDO OSCURO                      */
/* ============================================= */
.site-header {
    background-color: #0d1520;
    padding: 10px 60px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    position: relative;
    border-bottom: 2px solid var(--color-primary);
}

.logo-container img {
    max-height: 48px;
    width: auto;
    display: block;
}

/* Enlace del logo */
.logo-container a {
    display: inline-block;
    text-decoration: none;
}

/* Menú Escritorio */
.main-nav ul {
    list-style: none;
    display: flex;
    gap: 25px;
}

.main-nav a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: var(--transition);
}

.main-nav a:hover, .main-nav a.active {
    color: var(--color-primary);
}

.main-nav a.active {
    border-bottom: 2px solid var(--color-primary);
    padding-bottom: 5px;
}

/* Botón de Hamburguesa para Móviles */
.menu-toggle { 
    display: none; 
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.menu-toggle .bar {
    width: 25px;
    height: 3px;
    background-color: var(--color-white);
    transition: var(--transition);
}

/* ============================================= */
/* 2. MAIN CON FONDO DEGRADADO                   */
/* ============================================= */
.main-viewport {
    flex: 1;
    background: linear-gradient(135deg, #0d1520 0%, #0f172a 50%, #1a1a2e 100%);
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 50px 40px;
}

/* Eliminamos la capa oscura porque el fondo ya es oscuro */
.hero-overlay {
    display: none;
}

/* ============================================= */
/* 3. TITULARES HERO                            */
/* ============================================= */
.hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    max-width: 900px;
    margin-bottom: 40px;
}

.hero-content h1 {
    font-size: 2.8rem;
    font-weight: 700;
    color: var(--color-white);
    margin-bottom: 15px;
    text-shadow: 0 3px 10px rgba(0,0,0,0.5);
    letter-spacing: -1px;
}

.hero-content p {
    font-size: 1.3rem;
    color: var(--color-white);
    font-weight: 400;
    text-shadow: 0 2px 6px rgba(0,0,0,0.5);
}

/* ============================================= */
/* 3.1 BOTÓN DE INICIO (HOME)                   */
/* ============================================= */
.btn-home {
    display: inline-block;
    margin-top: 25px;
    padding: 12px 32px;
    background: linear-gradient(135deg, var(--color-primary) 0%, #005f6b 100%);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    letter-spacing: 0.5px;
}

.btn-home:hover {
    transform: translateY(-3px);
    background: linear-gradient(135deg, #0095a8 0%, #007887 100%);
    box-shadow: 0 8px 25px rgba(0, 120, 135, 0.4);
}

.btn-home:active {
    transform: translateY(0);
}

/* ============================================= */
/* 4. GRID DE TARJETAS FLOTANTES                 */
/* ============================================= */
.services-container {
    position: relative;
    z-index: 20;
    width: 100%;
    max-width: 1100px; 
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); 
    gap: 25px; 
}

/* Tarjetas como enlaces - sin subrayado */
.service-card-glass {
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: var(--blur-card);
    -webkit-backdrop-filter: var(--blur-card);
    padding: 35px 30px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.15);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
    text-decoration: none;
    cursor: pointer;
}

.service-card-glass:hover {
    transform: translateY(-4px);
    background-color: rgba(0, 0, 0, 0.7);
    border-color: var(--color-primary);
    text-decoration: none;
}

/* Asegurar que ningún elemento interno herede subrayado */
.service-card-glass h3,
.service-card-glass p {
    text-decoration: none;
}

.icon-wrapper-floating {
    width: 60px;
    height: 60px;
    background-color: var(--color-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: var(--color-white);
}

.icon-google-flat { font-weight: 700; }

.service-card-glass h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--color-white);
    margin-bottom: 12px;
}

.service-card-glass p {
    font-size: 0.92rem;
    color: var(--text-on-dark);
    line-height: 1.5;
}

/* ============================================= */
/* 5. FOOTER SÓLIDO OSCURO                      */
/* ============================================= */
.site-footer {
    background-color: #0d1520;
    padding: 20px 60px; 
    z-index: 50;
    position: relative;
    border-top: 2px solid var(--color-primary);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.site-footer p {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
}

.footer-contact-btn {
    background-color: transparent;
    color: var(--color-white);
    border: 1px solid var(--color-primary);
    padding: 5px 12px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    font-size: 0.7rem;
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition);
}

.footer-contact-btn:hover {
    background-color: var(--color-primary);
    transform: scale(1.02);
}

.footer-links {
    display: flex;
    gap: 15px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.7rem;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--color-primary);
}

/* ============================================= */
/* POPUP / MODAL DE CONTACTO ESTILOS             */
/* ============================================= */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-card {
    background-color: #1e1e1e;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--radius-md);
    width: 100%;
    max-width: 450px;
    padding: 30px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.5);
    position: relative;
    color: var(--color-white);
}

.modal-close {
    position: absolute;
    top: 15px; right: 15px;
    background: none; border: none;
    color: rgba(255,255,255,0.5);
    font-size: 1.8rem; cursor: pointer;
    line-height: 1;
    transition: var(--transition);
}

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

.modal-card h2 {
    font-size: 1.6rem; font-weight: 700;
    margin-bottom: 5px; color: var(--color-white);
}

.modal-card .schedule-info {
    font-size: 0.85rem; color: #00a2b5;
    margin-bottom: 20px; font-weight: 600;
    letter-spacing: 0.5px;
}

.callback-form {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    padding: 20px; border-radius: 8px;
    margin-bottom: 20px;
}

.callback-form h3 {
    font-size: 1rem; margin-bottom: 12px; font-weight: 600;
}

.form-group { margin-bottom: 12px; }

.form-group input {
    width: 100%; padding: 12px;
    background: #121212; border: 1px solid rgba(255,255,255,0.15);
    color: white; font-family: 'Montserrat', sans-serif;
    border-radius: 6px; font-size: 0.9rem;
}

.form-group input:focus {
    outline: none; border-color: var(--color-primary);
}

.btn-submit-call {
    width: 100%; background-color: var(--color-primary);
    color: white; border: none; padding: 12px;
    font-weight: 700; border-radius: 6px; cursor: pointer;
    text-transform: uppercase; letter-spacing: 0.5px;
    font-size: 0.85rem; transition: var(--transition);
}

.btn-submit-call:hover { background-color: #00626e; }

.direct-channels { display: flex; flex-direction: column; gap: 10px; }

.channel-link {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    padding: 12px; border-radius: 6px; text-decoration: none;
    font-weight: 600; font-size: 0.9rem; transition: var(--transition);
}

.channel-link.whatsapp { background-color: #25d366; color: white; }
.channel-link.whatsapp:hover { background-color: #1ebd58; }

.channel-link.email {
    background-color: rgba(255,255,255,0.08); color: white;
    border: 1px solid rgba(255,255,255,0.1);
}
.channel-link.email:hover { background-color: rgba(255,255,255,0.15); }

/* ============================================= */
/* RESPONSIVE: MÓVILES, TABLETS Y MENÚ HAMBURGUESA*/
/* ============================================= */
@media (max-width: 1024px) {
    .site-header { padding: 10px 30px; }
    .hero-content h1 { font-size: 2.2rem; }
    .services-grid { gap: 20px; }
}

@media (max-width: 768px) {
    .main-viewport { padding: 40px 15px; }
    .site-header { padding: 15px 20px; }
    
    /* Activa el botón de hamburguesa en móvil */
    .menu-toggle { display: flex; }
    
    /* Convierte la barra en menú desplegable móvil (CORREGIDO - fondo oscuro) */
    .main-nav {
        position: absolute;
        top: 70px;
        left: 0;
        width: 100%;
        background-color: #0d1520;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease-out;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
        border-bottom: 1px solid var(--color-primary);
    }
    .main-nav.open { max-height: 400px; }
    .main-nav ul { 
        flex-direction: column; 
        padding: 10px 0; 
        gap: 0; 
    }
    .main-nav li { 
        width: 100%; 
        text-align: center; 
    }
    .main-nav a { 
        display: block; 
        padding: 15px 0; 
        color: rgba(255, 255, 255, 0.85);
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    .main-nav a.active { 
        background: rgba(0, 120, 135, 0.2);
        color: var(--color-primary);
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    /* Ajustes del contenido en móvil */
    .hero-content h1 { font-size: 1.8rem; }
    .hero-content p { font-size: 1.1rem; }
    .btn-home { 
        padding: 10px 24px; 
        font-size: 0.9rem; 
        margin-top: 20px;
    }
    .services-grid { grid-template-columns: 1fr; gap: 15px; }
    
    /* FOOTER EN MÓVIL - UNA COLUMNA */
    .site-footer { 
        padding: 15px 20px;
    }
    
    .footer-content { 
        flex-direction: column; 
        gap: 10px; 
        text-align: center;
    }
    
    .footer-links { 
        justify-content: center;
        gap: 12px;
        flex-wrap: wrap;
    }
    
    .footer-links a { 
        margin: 0;
        font-size: 0.65rem;
    }
    
    .footer-contact-btn {
        padding: 4px 10px;
        font-size: 0.65rem;
    }
    
    .modal-card { width: 92%; padding: 20px; }
}

/* ============================================= */
/* MÓVILES MUY PEQUEÑOS (menos de 480px)       */
/* ============================================= */
@media (max-width: 480px) {
    .site-footer {
        padding: 12px 15px;
    }
    
    .site-footer p {
        font-size: 0.65rem;
    }
    
    .footer-links {
        gap: 8px;
    }
    
    .footer-links a {
        font-size: 0.6rem;
    }
    
    .footer-contact-btn {
        padding: 3px 8px;
        font-size: 0.6rem;
    }
    
    .btn-home {
        padding: 8px 20px;
        font-size: 0.85rem;
    }
}