/* ==========================================================================
   1. VARIABLES, CONFIGURACIÓN BASE Y RESET
   ========================================================================== */
:root {
    --navy-main: #0B1B3D;       /* Azul Marino Principal */
    --navy-light: #162B54;      /* Azul Marino Secundario */
    --accent-blue: #2A5C9A;     /* Azul de Acento */
    --bg-light: #F8F9FA;        /* Fondo claro */
    --text-dark: #212529;       /* Texto principal */
    --text-muted: #6C757D;      /* Texto suave */
    --white: #FFFFFF;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--white);
    color: var(--text-dark);
    overflow-x: hidden; /* Evita por completo el scroll horizontal */
    width: 100%;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ==========================================================================
   2. BARRA SUPERIOR (MARQUEE INFINITO)
   ========================================================================== */
.top-bar {
    background-color: var(--navy-main); 
    color: var(--white);
    padding: 10px 0;
    font-size: 13px;
    font-weight: 500;
    overflow: hidden;
    position: relative;
    width: 100%;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.marquee-wrapper {
    width: 100%;
    display: flex;
    overflow: hidden;
}

.marquee-track {
    display: flex;
    white-space: nowrap;
    gap: 100px;
    animation: scroll-infinite-marquee 15s linear infinite;
}

.marquee-item {
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: 0.5px;
}

.marquee-item i {
    color: var(--accent-blue);
}

.marquee-item .marquee-link {
    color: inherit;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.top-bar:hover .marquee-track {
    animation-play-state: paused;
}

@keyframes scroll-infinite-marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-33.33%); }
}

/* ==========================================================================
   3. NAVBAR COMPLETO Y TOTALMENTE RESPONSIVO
   ========================================================================== */
.navbar {
    background-color: var(--white);
    padding: 15px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
    position: sticky;
    top: 0;
    z-index: 1000;
    height: 75px;
    width: 100%;
}

a.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    cursor: pointer;
    transition: opacity 0.2s;
}

a.logo:hover {
    opacity: 0.9;
}

.logo-text {
    font-size: 22px;
    font-weight: 800;
    color: var(--navy-main);
    letter-spacing: 1px;
    line-height: 1.1;
}

.logo-sub {
    font-size: 10px;
    font-weight: 600;
    color: var(--accent-blue);
    letter-spacing: 2px;
}

.nav-toggle {
    display: none; /* Se activa únicamente en modo móvil */
    background: none;
    border: none;
    color: var(--navy-main);
    font-size: 24px;
    cursor: pointer;
    z-index: 1000;
    transition: all 0.3s ease;
}

.nav-menu {
    display: flex;
    align-items: center;
}

.nav-menu a {
    text-decoration: none;
    color: var(--navy-light);
    font-weight: 600;
    margin: 0 15px;
    font-size: 15px;
    transition: color 0.3s;
}

.nav-menu a:hover, .nav-menu a.active {
    color: var(--accent-blue);
}

.btn-nav-action {
    background-color: var(--navy-main);
    color: var(--white) !important;
    padding: 10px 20px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-nav-action:hover {
    background-color: var(--accent-blue);
    transform: translateY(-1px);
}

/* ==========================================================================
   4. HERO BANNER FLUIDO
   ========================================================================== */
.hero {
    position: relative;
    height: 75vh;
    min-height: 500px;
    background: url('fotohero.avif') no-repeat center center/cover;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
    width: 100%;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(11, 27, 61, 0.75), rgba(22, 43, 84, 0.6));
}

.hero-content {
    position: relative;
    width: 100%;
    max-width: 800px;
    padding: 0 20px;
    z-index: 10;
}

.tag-hero {
    background-color: var(--accent-blue);
    color: var(--white);
    display: inline-block;
    padding: 6px 16px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.hero-title {
    font-size: 42px;
    font-weight: 800;
    line-height: 1.25;
    margin-bottom: 20px;
}

.hero-description {
    font-size: 18px;
    opacity: 0.95;
    margin-bottom: 35px;
    line-height: 1.6;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap; /* Permite colapsar en pantallas medianas */
}

.btn-primary {
    background-color: var(--accent-blue);
    color: var(--white);
    text-decoration: none;
    padding: 14px 28px;
    border-radius: 4px;
    font-weight: 600;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary:hover {
    background-color: #1e4575;
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: transparent;
    color: var(--white);
    border: 2px solid var(--white);
    text-decoration: none;
    padding: 12px 28px;
    border-radius: 4px;
    font-weight: 600;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-secondary:hover {
    background-color: var(--white);
    color: var(--navy-main);
    transform: translateY(-2px);
}

/* ==========================================================================
   5. SECCIÓN DE ENFOQUE (CONSTRUCCIÓN MÁS LIMPIA)
   ========================================================================== */
.focus-section {
    padding: 100px 20px;
    background-color: var(--bg-light);
    width: 100%;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.focus-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.focus-text h2 {
    font-size: 36px;
    color: var(--navy-main);
    margin-bottom: 25px;
    font-weight: 700;
}

.focus-text p {
    color: var(--text-muted);
    font-size: 16px;
    line-height: 1.8;
}

.focus-cards {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.mini-card {
    background-color: var(--white);
    padding: 25px;
    border-radius: 6px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.02);
    border-left: 4px solid var(--accent-blue);
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: transform 0.3s;
}

.mini-card:hover {
    transform: translateX(5px);
}

.mini-card i {
    font-size: 24px;
    color: var(--navy-main);
}

.mini-card h3 {
    font-size: 18px;
    color: var(--navy-main);
}

.mini-card p {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.5;
}

/* ==========================================================================
   6. SECCIÓN IA OPTIMIZADA CON BOTÓN CENTRADO ELÉGANTE
   ========================================================================== */
.ia-clean-section {
    padding: 100px 20px;
    background-color: var(--bg-light); 
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    width: 100%;
}

.ia-clean-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.4fr 1fr; 
    gap: 60px;
    align-items: center;
    width: 100%;
}

.ia-sub {
    color: var(--accent-blue);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    display: block;
    margin-bottom: 12px;
}

.ia-clean-text h2 {
    font-size: 36px;
    color: var(--navy-main);
    font-weight: 700;
    margin-bottom: 20px;
}

.ia-clean-text p {
    color: var(--text-muted);
    font-size: 16px;
    line-height: 1.8;
}

.ia-clean-text strong {
    color: var(--navy-main);
    font-weight: 600;
}

.ia-clean-action {
    background-color: var(--white);
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.03);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center; 
    justify-content: center;
}

.ia-clean-action p {
    font-size: 16px;
    color: var(--navy-light);
    font-weight: 600;
    margin-bottom: 20px;
}

.ia-clean-action .btn-primary {
    width: auto;
    min-width: 240px;
    justify-content: center;
}

/* ==========================================================================
   7. PÁGINA DE SERVICIOS (ESTILO EDITORIAL COMPACTO Y LIMPIO)
   ========================================================================== */
.services-editorial-section {
    padding: 100px 20px;
    background-color: var(--white);
    width: 100%;
}

.container-editorial {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 50px;
    width: 100%;
}

.editorial-block {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr; 
    gap: 60px;
    padding: 60px 40px;
    background-color: var(--white);
    border-radius: 8px;
    border-top: 1px solid rgba(11, 27, 61, 0.1); 
    align-items: flex-start;
}

.editorial-block:first-child {
    border-top: none;
    padding-top: 10px;
}

.editorial-block.alt-bg {
    background-color: #F9FAFC;
    border-top: 1px solid rgba(11, 27, 61, 0.04);
}

.editorial-header {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.editorial-icon-num {
    font-size: 28px;
    color: var(--accent-blue);
}

.editorial-header h2 {
    font-size: 30px;
    color: var(--navy-main);
    font-weight: 700;
    line-height: 1.2;
}

.editorial-content p {
    color: var(--text-dark);
    font-size: 16px;
    line-height: 1.8;
    margin-bottom: 25px;
}

.editorial-list {
    list-style: none;
    display: grid;
    grid-template-columns: 1fr 1fr; 
    gap: 16px;
}

.editorial-list li {
    font-size: 15px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 10px;
}

.editorial-list li i {
    color: var(--accent-blue);
    font-size: 12px;
}

.cchc-link {
    color: var(--accent-blue);
    text-decoration: none;
    font-weight: 600;
    border-bottom: 1px dashed var(--accent-blue);
    transition: all 0.2s;
}

.cchc-link:hover {
    color: var(--navy-light);
    border-bottom-style: solid;
}

/* ==========================================================================
   8. FOOTER REPARTIDO HORIZONTALMENTE (SOLUCIÓN SPACE-BETWEEN)
   ========================================================================== */
.footer {
    background-color: var(--navy-main);
    color: rgba(255, 255, 255, 0.75);
    padding: 80px 20px 30px 20px;
    width: 100%;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between; 
    gap: 40px;
    margin-bottom: 60px;
    align-items: flex-start;
    width: 100%;
}

.footer-col {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.footer-col h3 {
    color: var(--white);
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 5px;
}

.footer-col p {
    font-size: 14px;
    line-height: 1.7;
    max-width: 380px; 
}

.footer-col .social-links {
    display: flex;
    gap: 15px;
    margin-top: 10px;
}

.footer-col .social-links a {
    color: rgba(255, 255, 255, 0.75);
    font-size: 18px;
    transition: color 0.2s;
}

.footer-col .social-links a:hover {
    color: var(--white);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
    display: inline-block;
}

.footer-links a:hover {
    color: var(--white);
}

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 25px;
    text-align: center;
    font-size: 13px;
    width: 100%;
}

/* ==========================================================================
   9. BREAKPOINT INTEGRAL DE RESPONSIVIDAD (MÓVILES Y TABLETS)
   ========================================================================== */
@media (max-width: 768px) {
    /* Navbar Ajustado */
    .navbar {
        padding: 0 20px;
        height: 65px;
        display: flex;
        justify-content: space-between;
        align-items: center;
        position: relative;
    }

    .nav-toggle {
        display: block;
        order: 1; /* Mantiene el botón hamburguesa a la izquierda */
    }

    /* Mover el botón al abrir el menú lateral con JS clase .is-active */
    .nav-toggle.is-active {
        color: var(--white);
        position: fixed;
        top: 20px;
        left: 30px;
    }

    /* Centrado perfecto del logo en celular */
    a.logo {
        order: 2;
        margin: 0 auto;
        transform: translateX(-12px); /* Compensa el ancho del botón hamburguesa */
    }

    .logo-text {
        font-size: 18px;
    }

    .logo-sub {
        font-size: 9px;
    }

    /* Menú Móvil Lateral Estilo Constructor Premium */
    .nav-menu {
        position: fixed;
        top: 0;
        left: -100%;
        width: 85%;
        height: 100vh;
        background: linear-gradient(rgba(11, 27, 61, 0.93), rgba(11, 27, 61, 0.96)), 
                    url('fotohero.avif') no-repeat center center/cover;
        flex-direction: column;
        padding: 100px 24px 30px 24px;
        box-shadow: 15px 0 40px rgba(0,0,0,0.3);
        gap: 10px;
        transition: left 0.35s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 999;
        align-items: flex-start;
    }

    .nav-menu.show {
        left: 0;
    }

    .nav-menu a {
        color: rgba(255, 255, 255, 0.85);
        margin: 0;
        font-size: 18px;
        font-weight: 600;
        letter-spacing: 0.5px;
        width: 100%;
        padding: 14px 16px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
        border-radius: 6px;
        transition: all 0.22s ease;
    }

    .nav-menu a:hover, .nav-menu a.active {
        color: var(--white);
        background-color: rgba(42, 92, 154, 0.25);
        padding-left: 22px;
    }

    /* Acción de Cotizar estirada full ancho en celular */
    .btn-nav-action {
        width: 100% !important;
        margin: 20px 0 0 0;
        padding: 14px;
        font-size: 15px;
        justify-content: center;
        background-color: var(--accent-blue);
        box-shadow: 0 4px 15px rgba(42, 92, 154, 0.3);
    }

    /* Reducción dinámica de secciones de texto */
    .hero {
        height: auto;
        padding: 80px 0;
    }

    .hero-title {
        font-size: 28px;
    }
    
    .hero-description {
        font-size: 15px;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 12px;
        width: 100%;
        max-width: 280px;
        margin: 0 auto;
    }

    .hero-buttons .btn-primary, 
    .hero-buttons .btn-secondary {
        width: 100%;
    }

    .focus-text h2, .ia-clean-text h2, .editorial-header h2 {
        font-size: 26px;
        text-align: center;
    }

    .focus-text p, .ia-clean-text p {
        text-align: center;
        font-size: 15px;
    }

    /* Transformación de Grillas a Columnas Únicas en Celular */
    .focus-grid, .ia-clean-container, .editorial-block, .footer-container {
        grid-template-columns: 1fr;
        flex-direction: column;
        gap: 35px;
    }

    .focus-section, .ia-clean-section, .services-editorial-section {
        padding: 50px 15px;
    }

    .ia-clean-action {
        padding: 30px 20px;
    }

    .ia-clean-action .btn-primary {
        width: 100%;
    }

    .editorial-block {
        padding: 30px 15px;
    }

    .editorial-list {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    /* Footer verticalizado para pantallas táctiles */
    .footer-container {
        align-items: center;
        text-align: center;
    }

    .footer-col p {
        margin: 0 auto;
    }

    .footer-col .social-links {
        justify-content: center;
    }
}