/* --- CONFIGURACIÓN BASE --- */
:root {
    --primary: #002b5c;
    --accent: #00a8e8;
    --accent-hover: #0086ba;
    --text: #333;
    --light-gray: #f4f7f6;
    --white: #ffffff;
    --shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease-in-out;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { 
    scroll-behavior: smooth; 
    scroll-padding-top: 100px; /* Evita que el navbar tape los títulos */
}

body { 
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; 
    color: var(--text); 
    line-height: 1.6; 
    overflow-x: hidden;
}

.container { width: 90%; max-width: 1100px; margin: auto; }
.section { padding: 80px 0; }
h2 { text-align: center; margin-bottom: 50px; color: var(--primary); font-size: 2.2rem; position: relative; }

/* --- NAVEGACIÓN --- */
.navbar { 
    background: var(--primary); 
    padding: 15px 0; 
    position: sticky; 
    top: 0; 
    z-index: 1000; 
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.nav-container { display: flex; justify-content: space-between; align-items: center; }

.nav-logo {
    height: 120px; /* Tamaño optimizado */
    width: auto;
    transition: var(--transition);
}

/*.nav-logo:hover {
    transform: scale(1.02);
    filter: brightness(1.1);
}*/

.nav-logo:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 0 10px rgba(0, 168, 232, 0.8)); /* Neón para imágenes transparentes */
}

.nav-links { display: flex; list-style: none; gap: 25px; }

.nav-links a {
    color: var(--white);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
    padding: 5px 0;
    transition: var(--transition);
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0; height: 2px;
    bottom: 0; left: 0;
    background-color: var(--accent);
    transition: var(--transition);
}

.nav-links a:hover { color: var(--accent); }
.nav-links a:hover::after { width: 100%; }

.hamburger { display: none; background: none; border: none; color: white; font-size: 1.8rem; cursor: pointer; }

/* --- HERO SECTION --- */
.hero {
    width: 100%;
    min-height: 85vh; 
    background: linear-gradient(rgba(0, 43, 92, 0.75), rgba(0, 43, 92, 0.75)), 
                url('img/imagen_fondo.png') no-repeat center center/cover;
    background-attachment: fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
    padding: 0 20px;
}

.hero h1 { font-size: 3rem; margin-bottom: 15px; letter-spacing: 1px; }
.hero-content { animation: fadeInUp 1s ease-out; }

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- COMPONENTES VISUALES --- */
.img-hover {
    width: 100%;
    border-radius: 10px;
    transition: var(--transition);
    box-shadow: var(--shadow);
}

.img-hover:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(0, 43, 92, 0.2);
}

/* --- GRID DE SERVICIOS Y VALORES --- */
.valor-row { 
    display: flex; 
    flex-direction: column; 
    gap: 40px; 
    margin-bottom: 60px; 
    align-items: center; 
}

.valor-text h3 { color: var(--primary); font-size: 1.8rem; margin-bottom: 15px; }

.services-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); 
    gap: 40px; 
}

.service-card { 
    background: var(--white);
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    transition: var(--transition);
}

.service-card p { margin-top: 20px; font-weight: 600; color: var(--primary); font-size: 1.1rem; }

/* --- CLIENTES --- */
.clientes-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    align-items: center;
    justify-items: center;
    padding: 40px 0;
}

.cliente-item img {
    max-width: 180px;
    /*filter: grayscale(100%);*/
    opacity: 0.9;
    transition: var(--transition);
}

.cliente-item img:hover {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.1);
}

/* --- UTILIDADES --- */
.reveal { opacity: 0; transform: translateY(30px); transition: all 0.8s ease-out; }
.reveal.active { opacity: 1; transform: translateY(0); }

.btn-whatsapp { 
    background: #25d366; 
    color: white; 
    padding: 14px 30px; 
    border-radius: 50px; 
    text-decoration: none; 
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 25px;
    transition: var(--transition);
}

.btn-whatsapp:hover { background: #1ebe57; transform: translateY(-2px); box-shadow: 0 5px 15px rgba(37, 211, 102, 0.3); }

/* --- MODAL --- */
.modal {
    display: none; position: fixed; z-index: 2000;
    left: 0; top: 0; width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.8); backdrop-filter: blur(4px);
}

.modal-content {
    background: var(--white); margin: 5vh auto; padding: 40px;
    border-radius: 15px; width: 90%; max-width: 750px;
    max-height: 85vh; overflow-y: auto; position: relative;
    }

   /* Estilo para el texto principal de Conócenos */
.text-principal {
    text-align: center; /* Centrado total */
    max-width: 1000px;   /* Ancho ideal para lectura profesional */
    margin: 0 auto;     /* Centra el bloque de texto en la pantalla */
    font-size: 1.1rem; /* Tamaño ligeramente mayor para resaltar */
    line-height: 1.4;   /* Espaciado entre líneas para que respire */
    color: var(--text);
    padding-bottom: 10px;
}

/* Ajustes específicos para móviles */
@media (max-width: 768px) {
    .text-principal {
        font-size: 1.05rem; /* Un poco más pequeño en celular */
        line-height: 1.6;
        padding: 0 15px;    /* Margen de seguridad para que no toque los bordes */
    }
}

/* --- RESPONSIVIDAD (MEDIA QUERIES AGRUPADAS) --- */
@media (min-width: 769px) {
    .valor-row { flex-direction: row; text-align: left; }
    .valor-row.reverse { flex-direction: row-reverse; }
    .valor-img, .valor-text { flex: 1; }
}

@media (max-width: 768px) {
    .section { padding: 50px 0; }
    h2 { font-size: 1.8rem; }
    
    .navbar { padding: 10px 0; }
    .nav-logo { height: 60px; }
    
    .hamburger { display: block; }
    
    .nav-links {
        display: none;
        position: absolute;
        top: 100%; left: 0; width: 100%;
        background: var(--primary);
        flex-direction: column;
        padding: 30px;
        text-align: center;
        border-top: 1px solid rgba(255,255,255,0.1);
    }
    
    .nav-links.active { display: flex; }
    
    .hero { background-attachment: scroll; min-height: 60vh; }
    .hero h1 { font-size: 2.2rem; }
    
    .clientes-grid { grid-template-columns: repeat(2, 1fr); }
    
    .valor-row { gap: 20px; }
}

@media (max-width: 480px) {
    .clientes-grid { grid-template-columns: 1fr; }
    .hero h1 { font-size: 1.8rem; }
}

/* Transición suave para el navbar al hacer scroll */
.navbar-scrolled {
    padding: 5px 0 !important;
    background: rgba(0, 43, 92, 0.98) !important;
}

.navbar-scrolled .nav-logo {
    height: 80px !important; /* El logo se encoge suavemente */
}

/* --- FOOTER (CORREGIDO Y CENTRADO) --- */
.footer { 
    background: var(--primary); /* Asegura que la franja azul sea visible */
    color: var(--white); 
    padding: 10px 0; 
    text-align: center; /* Centra el texto */
    margin-top: 0; /* Ajusta según prefieras el espacio con la sección anterior */
    width: 100%;
}

.footer .container {
    display: flex;
    flex-direction: column;
    align-items: center; /* Centra los elementos hijos en el flex */
    gap: 10px;
}

.privacy-link {
    color: var(--accent);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
}

.privacy-link:hover {
    color: var(--white);
    text-decoration: underline;
}

/* Ajuste para que el texto de derechos reservados no se vea amontonado */
.footer p {
    margin: 5px 0;
    font-size: 0.95rem;
    opacity: 0.9;
}