/* 1. VARIABLES Y RESET */
:root {
    --primary: #0046ad; 
    --secondary: #f2a900; 
    --dark: #1a1a1a;
    --light: #ffffff;
    --gray: #f4f4f4;
    --text-dark: #333333;
    --font-main: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body { 
    font-family: var(--font-main); 
    line-height: 1.6; 
    color: var(--text-dark); 
    background-color: var(--light);
}

.container { 
    max-width: 1200px; 
    margin: 0 auto; 
    padding: 0 20px; 
}

/* 2. NAVEGACIÓN (MINIMALISTA BLANCO) */
nav {
    background: var(--light);
    padding: 10px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
}

nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center; /* Centrado vertical perfecto */
}

.logo-img {
    height: 55px;
    width: auto;
    display: block;
    transition: transform 0.3s ease;
}

.logo-img:hover { transform: scale(1.02); }

nav ul {
    display: flex;
    list-style: none;
    align-items: center;
}

nav ul li a {
    color: var(--dark);
    text-decoration: none;
    padding: 0.5rem 1.2rem;
    font-weight: 600;
    font-size: 0.95rem;
    transition: 0.3s;
}

nav ul li a:hover { color: var(--primary); }

/* 3. HERO SECTION */
.hero {
    background: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.7)), url('../assets/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    color: white;
    padding: 120px 0;
    text-align: center;
}

.hero h1 { font-size: 2.8rem; margin-bottom: 1rem; }

.btn {
    display: inline-block;
    padding: 15px 35px;
    background: var(--secondary);
    color: var(--dark);
    text-decoration: none;
    font-weight: bold;
    border-radius: 5px;
    transition: 0.3s;
    border: none;
    cursor: pointer;
}

.btn:hover { background: #e09d00; transform: translateY(-3px); }

/* 4. SERVICIOS (CARDS) */
.services-grid {
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); 
    gap: 30px; 
    margin-top: 40px;
}

.card {
    background: white;
    border: 1px solid #eee;
    padding: 30px;
    text-align: center;
    border-radius: 8px;
    transition: 0.3s;
}

.card:hover { box-shadow: 0 10px 20px rgba(0,0,0,0.05); }

/* 5. FOOTER */
footer {
    background: var(--dark);
    color: #ccc;
    padding: 60px 0 20px 0;
    border-top: 4px solid var(--primary);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h4 {
    color: var(--light);
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 10px;
}

.footer-section h4::after {
    content: ''; position: absolute; left: 0; bottom: 0; width: 40px; height: 2px; background: var(--secondary);
}

.contact-item { display: flex; align-items: center; margin-bottom: 15px; }
.contact-item span { color: var(--secondary); margin-right: 12px; }
.contact-item a { color: #ccc; text-decoration: none; }
.contact-item a:hover { color: white; }

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #333;
    font-size: 0.85rem;
}

/* BOTÓN FLOTANTE WHATSAPP */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 30px;
    right: 30px;
    background-color: #25d366;
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    font-size: 30px;
    box-shadow: 2px 2px 15px rgba(0,0,0,0.3);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    animation: pulse 2s infinite;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    background-color: #128c7e;
    color: #fff;
}

.whatsapp-float svg {
    width: 35px;
    height: 35px;
    fill: white;
}

/* Animación de pulso para SEO/Conversión */
@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(37, 211, 102, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

/* Ajuste para móviles: un poco más pequeño */
@media (max-width: 768px) {
    .whatsapp-float {
        width: 50px;
        height: 50px;
        bottom: 20px;
        right: 20px;
    }
    .whatsapp-float svg {
        width: 30px;
        height: 30px;
    }
}

/* SECCIÓN NOSOTROS - IMPACTO */
.about-hero {
    background: linear-gradient(rgba(0, 70, 173, 0.85), rgba(0, 70, 173, 0.85)), url('../assets/office-bg.webp');
    background-size: cover;
    background-position: center;
    color: white;
    padding: 80px 0;
    text-align: center;
}

.about-content { padding: 80px 0; }

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.stat-item {
    background: var(--gray);
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    border-bottom: 4px solid var(--primary);
}

.stat-item h3 { color: var(--primary); font-size: 1.8rem; margin-bottom: 5px; }

.values-section {
    background: var(--gray);
    padding: 80px 0;
}

@media (max-width: 768px) {
    .about-grid { grid-template-columns: 1fr; }
}

/* --- OPTIMIZACIÓN RESPONSIVA GLOBAL --- */

/* 1. Contenedores Fluidos */
.container {
    width: 90%; /* En móviles ocupa casi todo el ancho */
    max-width: 1200px;
    margin: 0 auto;
}

/* 2. Navegación Adaptable */
@media (max-width: 768px) {
    nav .container {
        flex-direction: column; /* Apila logo y menú */
        gap: 15px;
    }
    
    nav ul {
        flex-wrap: wrap; /* Permite que los links bajen si no caben */
        justify-content: center;
        padding: 0;
    }

    nav ul li a {
        padding: 0.5rem 0.8rem;
        font-size: 0.85rem;
    }
}

/* 3. Hero Section (Ajuste de textos) */
@media (max-width: 768px) {
    .hero h1, .about-hero h1 {
        font-size: 1.8rem !important; /* Texto más pequeño en móvil */
        padding: 0 10px;
    }
    
    .hero {
        padding: 60px 0; /* Menos espacio vertical */
    }
}

/* 4. Grillas de Servicios y Footer (De 3 columnas a 1 columna) */
@media (max-width: 768px) {
    .services-grid, .footer-grid, .about-grid {
        grid-template-columns: 1fr !important; /* Fuerza una sola columna */
        text-align: center;
        gap: 30px;
    }

    .about-grid div {
        order: 2; /* Texto abajo */
    }
    .about-grid div:has(img) {
        order: 1; /* Imagen arriba en móviles */
    }
    
    .contact-item {
        justify-content: center; /* Centra iconos de contacto */
    }
}

/* 5. Imágenes Responsivas */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* --- ESTILOS PARA EL MENÚ DESPLEGABLE (DROPDOWN) --- */

/* Contenedor del ítem con hijos */
.dropdown {
    position: relative;
    display: inline-block;
}

/* El menú oculto */
.dropdown-content {
    display: none;
    position: absolute;
    background-color: var(--light);
    min-width: 280px;
    box-shadow: 0px 8px 16px rgba(0,0,0,0.1);
    z-index: 1001;
    border-top: 3px solid var(--primary);
    list-style: none;
    padding: 10px 0;
    border-radius: 0 0 5px 5px;
}

/* Links dentro del menú desplegable */
.dropdown-content li a {
    color: var(--dark) !important;
    padding: 12px 20px !important;
    text-decoration: none;
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    transition: background 0.3s;
}

.dropdown-content li a:hover {
    background-color: var(--gray);
    color: var(--primary) !important;
}

/* Mostrar el menú al pasar el mouse */
.dropdown:hover .dropdown-content {
    display: block;
}

/* Indicador visual de que hay un menú (flecha) */
.dropdown > a::after {
    content: ' ▾';
    font-size: 0.8rem;
    vertical-align: middle;
}

/* Ajuste para móviles */
@media (max-width: 768px) {
    .dropdown-content {
        position: static;
        display: block; /* En móviles es mejor que estén visibles o en lista simple */
        box-shadow: none;
        border: none;
        padding-left: 20px;
        background: transparent;
    }
    .dropdown > a::after { content: ''; }
}

/* --- ESTILOS FASE 4: CONTACTO --- */
.contact-section { padding: 80px 0; }

.contact-container {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 50px;
}

.contact-info-card {
    background: var(--primary);
    color: white;
    padding: 40px;
    border-radius: 10px;
    height: fit-content;
}

.contact-info-card h2 { color: var(--secondary); margin-bottom: 20px; }

.form-container {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.form-group { margin-bottom: 20px; }

.form-group label { display: block; margin-bottom: 8px; font-weight: 600; }

.form-control {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: inherit;
}

.map-container {
    margin-top: 50px;
    border-radius: 10px;
    overflow: hidden;
    height: 400px;
    border: 1px solid #eee;
}

@media (max-width: 768px) {
    .contact-container { grid-template-columns: 1fr; }
}