/* ==========================================================================
   THE HEDRICK GROUP - Optimizations v2.1 (Performance & Mobile Fix)
   ========================================================================== */

/* --- UNIFICACIÓN DE HEADER Y LOGO (TODAS LAS PÁGINAS) --- */

/* Forzamos que el header mida lo mismo en todo el sitio */
header.main-header {
    height: 90px !important;
    display: flex !important;
    align-items: center !important;
    padding: 0 !important;
}

/* Alineación consistente del contenedor (Index vs Internas) */
header .container, 
header .nav-container {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 0 20px !important;
    width: 100% !important;
    height: 100% !important;
}

.logo {
    display: flex !important;
    align-items: center !important;
    flex: 0 0 auto !important;
    padding: 0 !important;
    margin: 0 !important;
}

.logo-pc { 
    display: block !important; 
    height: 80px !important; 
    width: auto !important;
}

.logo-mobile { 
    display: none !important; 
}

/* --- AJUSTE DE CUADRÍCULA PARA 4 SERVICIOS (INDEX) --- */
.services-grid {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important; /* Forza las 4 columnas en PC */
    gap: 20px !important;
    width: 100% !important;
    margin-top: 40px !important;
}

.service-mini-card {
    padding: 30px 20px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    height: 100% !important;
}

/* --- WHATSAPP POP-UP --- */
.whatsapp-popup {
    position: fixed;
    bottom: 25px;
    right: 25px;
    background-color: var(--accent);
    color: var(--dark-bg);
    padding: 12px 22px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 800;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    z-index: 9999;
    transition: var(--transition);
    border: 1px solid rgba(255,255,255,0.1);
}
.whatsapp-popup:hover { transform: translateY(-5px) scale(1.03); background-color: var(--white); }

/* --- MEDIA QUERY PRINCIPAL (MÓVIL & TABLET) --- */
@media screen and (max-width: 968px) {
    
    header.main-header {
        height: 80px !important;
    }

    header .container, 
    header .nav-container {
        justify-content: center !important;
    }

    .logo-pc { display: none !important; }

    .logo-mobile { 
        display: block !important; 
        margin: 0 auto !important; 
        height: 55px !important; 
        width: auto !important; 
    }
    
    /* Responsividad Servicios: 2 columnas en tablets */
    .services-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    /* Soporte para How it Works en Tablet */
    .steps-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 30px !important;
    }

    .nav-container { position: relative; }

    .burger {
        display: block !important;
        position: absolute !important;
        right: 20px;
        top: 50%;
        transform: translateY(-50%);
        cursor: pointer;
        z-index: 2001;
    }
    
    .burger span {
        display: block;
        width: 28px;
        height: 3px;
        background: var(--white);
        margin: 5px;
        transition: var(--transition);
        border-radius: 2px;
    }

    /* Navegación Móvil */
    .nav-links {
        position: fixed;
        right: 0; top: 0;
        width: 75%; height: 100vh;
        background: #0a0f1a;
        flex-direction: column;
        justify-content: center;
        transform: translateX(100%);
        transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
        box-shadow: -10px 0 30px rgba(0,0,0,0.5);
    }

    .nav-active { transform: translateX(0%); }
    .nav-links li { width: 100%; text-align: center; }
    .nav-links a { font-size: 1.4rem !important; padding: 15px; display: block; }

    /* Hero Video Mobile */
    .hero-section {
        height: 75vh !important;
        min-height: 500px !important;
        padding-top: 70px !important;
    }

    .bg-video {
        object-fit: cover !important;
        object-position: center bottom !important;
    }

    .video-overlay {
        position: absolute;
        top: 0; left: 0; width: 100%; height: 100%;
        background: radial-gradient(circle, rgba(15, 23, 42, 0.6) 0%, rgba(15, 23, 42, 0.9) 100%);
    }

    .statement-content h1 { 
        font-size: 1.5rem !important; 
        background: rgba(0, 0, 0, 0.8) !important;
        padding: 15px 20px !important;
        border-radius: 8px;
        display: table !important; 
        margin: 0 auto !important; 
    }

    .subtitle {
        background: rgba(0, 0, 0, 0.8) !important;
        padding: 12px 18px !important;
        border-radius: 8px;
        display: table !important; 
        margin: 100px auto 0 !important; 
        font-size: 1rem !important;
        max-width: 90% !important;
    }
}

/* --- ANIMACIÓN BURGER --- */
.toggle .line1 { transform: rotate(-45deg) translate(-5px, 6px); }
.toggle .line2 { opacity: 0; }
.toggle .line3 { transform: rotate(45deg) translate(-5px, -6px); }

/* --- MÓVILES PEQUEÑOS --- */
@media screen and (max-width: 600px) {
    .services-grid, .steps-grid {
        grid-template-columns: 1fr !important; /* 1 columna en móviles */
    }
}

@media screen and (max-width: 480px) {
    .whatsapp-popup span { display: none; }
    .whatsapp-popup { padding: 15px; border-radius: 50%; bottom: 15px; right: 15px; }
    .hero-btns { flex-direction: column; width: 100%; margin-top: 20px; }
}

/* --- FIX CTA FINAL --- */
.final-cta .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 25px;
}

.final-cta p {
    margin-bottom: 30px !important; 
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* --- ESTILO "SEE DETAILS" (DORADO) --- */
.service-mini-card .learn-more {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
    display: inline-block;
    margin-top: 15px;
}

.service-mini-card .learn-more:hover {
    color: var(--white);
    transform: translateX(5px);
}