/* =========================================
   1. VARIABLES Y RESETEO GLOBAL
   ========================================= */
:root {
    --primary-blue: #0056b3;
    --dark-blue-bg: #0a1e3f;
    --darkest-blue-bg: #051024;
    --light-blue-accent: #00a8ff;
    --text-dark: #333333;
    --text-gray: #666666;
    --text-light-gray: #a0a0a0;
    --white: #ffffff;
    --light-bg: #f8f9fa;
    --card-blue: #007bff;
    --card-green: #28a745;
    --card-red: #dc3545;
    --card-purple: #6f42c1;
    --card-orange: #fd7e14;
    --font-family: 'Poppins', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
    width: 100%;
    position: relative;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

ul {
    list-style: none;
}

img {
    max-width: 70%;
    height: auto;
    display: block;
}

/* =========================================
   2. UTILIDADES Y BOTONES
   ========================================= */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

.section-padding { padding: 80px 0; }
.text-center { text-align: center; }
.text-blue { color: var(--primary-blue); }
.text-blue-light { color: var(--light-blue-accent); }
.text-white { color: var(--white); }
.text-gray { color: var(--text-gray); }
.text-light { color: var(--text-light-gray); }
.mt-4 { margin-top: 1.5rem; }

.section-header {
    max-width: 800px;
    margin: 0 auto 50px auto;
}

.section-subtitle {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary-blue);
    text-transform: uppercase;
    margin-bottom: 10px;
    letter-spacing: 1px;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.section-description {
    font-size: 1.1rem;
    color: var(--text-gray);
}

/* Botones */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 30px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    cursor: pointer;
}

.btn-primary {
    background-color: var(--primary-blue);
    color: var(--white);
}

.btn-primary:hover {
    background-color: #004494;
    transform: translateY(-2px);
}

.btn-outline {
    border-color: var(--white);
    color: var(--white);
}

.btn-outline:hover {
    background-color: var(--white);
    color: var(--primary-blue);
}

.btn-outline-blue {
    border-color: var(--primary-blue);
    color: var(--primary-blue);
}
.btn-outline-blue:hover {
    background-color: var(--primary-blue);
    color: var(--white);
}

.btn-block {
    display: block;
    width: 100%;
    text-align: center;
}

/* =========================================
   3. HEADER / NAVBAR
   ========================================= */
.header {
    background: linear-gradient(to right, var(--dark-blue-bg), #003366);
    padding: 15px 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.navbar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-menu ul {
    display: flex;
}

.nav-menu ul li {
    margin-left: 30px;
}

.nav-menu ul li a {
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
    font-size: 0.95rem;
}

.nav-menu ul li a:hover {
    color: var(--white);
}

/* Botón Hamburguesa (Oculto en escritorio) */
.menu-toggle {
    display: none;
    cursor: pointer;
    z-index: 1100;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    transition: all 0.3s ease-in-out;
    background-color: var(--white);
}

/* Animación Hamburguesa Activa */
.menu-toggle.is-active .bar:nth-child(2) { opacity: 0; }
.menu-toggle.is-active .bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.menu-toggle.is-active .bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* =========================================
   4. HERO SECTION
   ========================================= */
.hero-section {
    background: linear-gradient(135deg, var(--dark-blue-bg) 0%, #004080 100%);
    color: var(--white);
    padding: 180px 0 100px 0;
    position: relative;
    overflow: hidden;
}

.hero-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.hero-content {
    flex: 1;
    padding-right: 50px;
}

.hero-content .subtitle {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    color: var(--light-blue-accent);
    margin-bottom: 15px;
    text-transform: uppercase;
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 25px;
}

.hero-content h1 .highlight { color: #4d75f4; }
.hero-content h1 .stand { color: #60A5FA; }

.hero-content p {
    font-size: 1.15rem;
    margin-bottom: 40px;
    opacity: 0.9;
    max-width: 600px;
}

.hero-buttons .btn {
    margin-right: 15px;
    margin-bottom: 15px;
}

.hero-stats {
    display: flex;
    margin-top: 50px;
    border-top: 1px solid rgba(255,255,255,0.2);
    padding-top: 30px;
}

.stat-item { margin-right: 60px; }

.stat-item h3 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--light-blue-accent);
    margin-bottom: 5px;
}

.stat-item p {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-bottom: 0;
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

.hero-image img {
    border-radius: 10px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

/* =========================================
   5. FEATURES GRID
   ========================================= */
.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.feature-item { padding: 20px; }

.icon-box {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px auto;
    font-size: 1.8rem;
    transition: transform 0.3s ease;
}

.feature-item:hover .icon-box { transform: scale(1.1) rotate(5deg); }

.blue-icon {
    background-color: rgba(0, 86, 179, 0.1);
    color: var(--primary-blue);
}

.feature-item h4 {
    font-size: 1.2rem;
    margin-bottom: 15px;
    font-weight: 600;
}

.feature-item p {
    color: var(--text-gray);
    font-size: 0.95rem;
}

/* =========================================
   6. VALUE PROPOSITION
   ========================================= */
.value-prop-section { background-color: var(--white); }

.value-prop-box {
    background-color: var(--light-bg);
    border-radius: 15px;
    padding: 50px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.value-content {
    flex: 1;
    padding-right: 50px;
}

.value-content h3 {
    font-size: 2rem;
    margin-bottom: 30px;
    color: var(--primary-blue);
}

.value-content p {
    margin-bottom: 20px;
    font-size: 1.05rem;
    color: var(--text-gray);
}

.value-content strong {
    color: var(--text-dark);
    font-weight: 700;
}

.value-image { flex: 0 0 40%; }
.value-image img { border-radius: 10px; }

/* =========================================
   7. SOLUCIONES (GRID)
   ========================================= */
.solutions-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 30px;
}

.solution-card {
    background: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.solution-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.12);
}

.card-header {
    padding: 20px;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--white);
    display: flex;
    align-items: center;
}

.card-header i {
    margin-right: 10px;
    font-size: 1.4rem;
}

/* Variantes de color tarjetas */
.card-blue .card-header { background: linear-gradient(135deg, #0D6EFD 0%, #00AAFF 100%); }
.card-green .card-header { background: linear-gradient(135deg, #198754 0%, #28A745 100%); }
.card-red .card-header { background: linear-gradient(135deg, #DC3545 0%, #D63384 100%); }
.card-purple .card-header { background: linear-gradient(135deg, #6F42C1 0%, #6610F2 100%); }
.card-orange .card-header { background: linear-gradient(135deg, #FD7E14 0%, #FFC107 100%); }

.card-body {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card-body p {
    font-size: 0.95rem;
    color: var(--text-gray);
    margin-bottom: 20px;
}

.card-body ul {
    margin-bottom: 25px;
    flex-grow: 1;
}

.card-body ul li {
    margin-bottom: 10px;
    font-size: 0.9rem;
    color: var(--text-dark);
    position: relative;
    padding-left: 20px;
}

.card-body ul li::before {
    content: '•';
    color: var(--text-light-gray);
    position: absolute;
    left: 0;
    font-size: 1.2rem;
    line-height: 1;
}

.btn-card {
    display: block;
    text-align: center;
    padding: 10px;
    border: 1px solid var(--text-light-gray);
    border-radius: 5px;
    color: var(--text-gray);
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    margin-top: auto;
}

/* Hover Botones Tarjeta */
.card-blue .btn-card:hover { background: var(--card-blue); color: white; border-color: var(--card-blue); }
.card-green .btn-card:hover { background: var(--card-green); color: white; border-color: var(--card-green); }
.card-red .btn-card:hover { background: var(--card-red); color: white; border-color: var(--card-red); }
.card-purple .btn-card:hover { background: var(--card-purple); color: white; border-color: var(--card-purple); }
.card-orange .btn-card:hover { background: var(--card-orange); color: white; border-color: var(--card-orange); }


/* =========================================
   8. HOME SOLUTIONS & CTA
   ========================================= */
.cta-banner {
    background-color: var(--light-bg);
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
    padding: 40px 0;
}

.cta-banner h3 { font-size: 1.8rem; margin-bottom: 10px; }
.cta-banner p { color: var(--text-gray); margin-bottom: 20px; }

.home-grid {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-top: 50px;
}

.home-content {
    flex: 1;
    padding-right: 50px;
}

.home-content h3 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: var(--text-dark);
}

.home-content p {
    color: var(--text-gray);
    margin-bottom: 30px;
}

.check-list li {
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    color: var(--text-dark);
    font-size: 1rem;
}

.check-list li i {
    color: var(--card-green);
    margin-right: 12px;
    font-size: 1.1rem;
}

.home-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #eee;
}

.h-stat strong {
    display: block;
    font-size: 1.4rem;
    color: var(--primary-blue);
}

.h-stat span {
    font-size: 0.9rem;
    color: var(--text-gray);
}

.home-image-col { flex: 0 0 45%; }

.main-home-img {
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.steps-grid {
    display: flex;
    justify-content: space-between;
}

.step-item { flex: 1; }

.step-icon {
    width: 60px;
    height: 60px;
    background-color: var(--light-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px auto;
    color: var(--primary-blue);
    font-size: 1.5rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.step-item p {
    font-weight: 600;
    font-size: 0.9rem;
}

/* =========================================
   9. CONTACT SECTION
   ========================================= */
.contact-section {
    background-color: var(--dark-blue-bg);
    color: var(--white);
    position: relative;
}

.contact-section::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(circle at center, rgba(0,86,179,0.1) 0%, rgba(10,30,63,1) 70%);
    pointer-events: none;
}

.contact-header { position: relative; z-index: 2; }

.contact-grid {
    display: flex;
    justify-content: space-between;
    margin-top: 60px;
    position: relative;
    z-index: 2;
}

.contact-info { flex: 0 0 40%; }
.contact-info h3 { font-size: 1.6rem; margin-bottom: 30px; }

.info-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 25px;
}

.info-item i {
    width: 40px;
    height: 40px;
    background-color: rgba(255,255,255,0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    color: var(--light-blue-accent);
    font-size: 1.1rem;
}

.info-item strong {
    display: block;
    margin-bottom: 5px;
    color: var(--white);
}

.info-item p {
    color: var(--text-light-gray);
    font-size: 0.95rem;
}

.whatsapp-box {
    background-color: var(--card-green);
    padding: 20px;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-top: 40px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.whatsapp-box:hover { background-color: #218838; }
.whatsapp-box i { font-size: 2.5rem; margin-bottom: 10px; }
.whatsapp-box span { font-size: 0.9rem; opacity: 0.9; }
.whatsapp-box strong { font-size: 1.1rem; }

.contact-form {
    flex: 0 0 50%;
    background-color: rgba(255,255,255,0.05);
    padding: 40px;
    border-radius: 15px;
    border: 1px solid rgba(255,255,255,0.1);
}

.contact-form h3 { font-size: 1.6rem; margin-bottom: 30px; }

.form-group-row { display: flex; gap: 20px; }
.form-group { flex: 1; margin-bottom: 20px; }

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: var(--text-light-gray);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    background-color: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 5px;
    color: var(--white);
    font-family: var(--font-family);
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--light-blue-accent);
}

.form-group textarea { resize: vertical; }

/* =========================================
   10. FOOTER
   ========================================= */
.footer {
    background-color: var(--darkest-blue-bg);
    color: var(--text-light-gray);
    padding: 70px 0 30px 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 50px;
}

.footer-logo {
    max-width: 100%;
    margin-bottom: 20px;
    opacity: 0.8;
}

.brand-col p {
    font-size: 0.9rem;
    margin-bottom: 25px;
    line-height: 1.8;
}

.footer-contact p {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.footer-contact i {
    margin-right: 10px;
    color: var(--light-blue-accent);
}

.footer-col h4 {
    color: var(--white);
    font-size: 1.1rem;
    margin-bottom: 25px;
    font-weight: 600;
}

.footer-col ul li { margin-bottom: 12px; }

.footer-col ul li a { font-size: 0.9rem; }
.footer-col ul li a:hover { color: var(--light-blue-accent); }

.certs-icons { display: flex; gap: 15px; }

.social-icons {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.social-icons a {
    width: 35px;
    height: 35px;
    background-color: rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

.social-icons a:hover {
    background-color: var(--light-blue-accent);
    color: var(--white);
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 30px;
    font-size: 0.85rem;
}

.footer-bottom a {
    color: var(--text-light-gray);
    text-decoration: underline;
}
.footer-bottom a:hover { color: var(--light-blue-accent); }

/* =========================================
   11. MEDIA QUERIES (RESPONSIVE)
   ========================================= */

/* Tablets y Laptops pequeñas (max 1024px) */
@media (max-width: 1024px) {
    .hero-content h1 { font-size: 2.8rem; }
    .hero-image { display: flex; justify-content: center; align-items: center; }
    .hero-image img { max-width: 90%; }

    .solutions-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Último elemento ocupa todo el ancho si es impar */
    .solutions-grid > .solution-card:last-child:nth-child(odd) {
        grid-column: 1 / -1;
    }

    .home-image-col { flex: 0 0 40%; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

/* =========================================
   MEDIA QUERY: Tablets pequeñas y Móviles (max 768px)
========================================= */
@media (max-width: 768px) {
    
    /* 1. Bloqueo estricto de scroll horizontal */
    html, body {
        overflow-x: hidden;
        width: 100%;
        position: relative;
    }

    .section-padding { padding: 60px 0; }
    
    /* --- HEADER Y MENU HAMBURGUESA --- */
    .navbar-container {
        width: 90%;
        margin: 0 auto;
        justify-content: space-between; /* Asegura separación logo/botón */
    }
    
    .logo img {
        max-height: 80px;
        width: auto;
    }

    .menu-toggle {
        display: block; /* Muestra el botón */
        z-index: 1100; /* Asegura que esté sobre el menú desplegado */
    }

    /* MENÚ OVERLAY (CORREGIDO) */
    .nav-menu {
        position: fixed;
        top: 0;
        left: -100%; /* Oculto completamente a la izquierda */
        width: 100%; /* CAMBIO CLAVE: Usar % en lugar de vw para evitar desborde */
        height: 100vh; /* Altura completa */
        background-color: var(--dark-blue-bg);
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: left 0.4s ease; /* Transición suave de izquierda a derecha */
        z-index: 1050;
        padding-top: 60px;
        overflow-y: auto; /* Permite scroll vertical si el menú es muy alto */
    }

    .nav-menu.active {
        left: 0; /* Al activarse, ocupa exactamente el ancho de la pantalla (0 a 100%) */
    }

    .nav-menu ul {
        flex-direction: column;
        width: 100%;
        text-align: center;
        padding: 0;
    }

    .nav-menu ul li {
        margin: 20px 0;
    }

    .nav-menu ul li a {
        font-size: 1.3rem;
        color: var(--white);
        display: block; /* Aumenta el área de clic */
    }

    /* --- HERO --- */
    .hero-section {
        padding-top: 120px;
        padding-bottom: 60px;
    }

    .hero-container {
        flex-direction: column;
        text-align: center;
    }

    .hero-content {
        padding-right: 0;
        margin-bottom: 40px;
        text-align: center;
    }

    .hero-content p { margin: 0 auto 30px auto; }

    .hero-stats {
        justify-content: center;
        flex-wrap: wrap;
        gap: 20px;
    }
    .stat-item { margin: 0 15px; }
    .hero-image { justify-content: center; }

    /* --- FEATURES & VALUE --- */
    .features-grid { grid-template-columns: repeat(2, 1fr); }

    .value-prop-box {
        flex-direction: column;
        padding: 30px;
    }
    .value-content { padding-right: 0; margin-bottom: 30px; }
    .value-image { width: 100%; }

    /* --- HOME SOLUCIONES --- */
    .home-grid { flex-direction: column; }
    .home-content { padding-right: 0; margin-bottom: 40px; }
    .home-image-col { width: 100%; }

    /* --- CONTACT --- */
    .contact-grid { flex-direction: column; }
    .contact-info { flex: 0 0 100%; margin-bottom: 40px; }
    .contact-form { flex: 0 0 100%; padding: 30px; }
}
/* Móviles pequeños (max 576px) */
@media (max-width: 576px) {
    .hero-content h1 { font-size: 2.2rem; }
    .hero-buttons .btn { width: 100%; margin-right: 0; }

    .features-grid { grid-template-columns: 1fr; }
    .solutions-grid { grid-template-columns: 1fr; }
    
    .solutions-grid > .solution-card:last-child:nth-child(odd) { 
        grid-column: auto; 
    }

    .home-stats { grid-template-columns: 1fr; gap: 15px;}
    .steps-grid { flex-wrap: wrap; justify-content: center; gap: 20px; }
    .step-item { min-width: 100px; }

    .form-group-row { flex-direction: column; gap: 0; }
    .footer-grid { grid-template-columns: 1fr; gap: 30px; }
}