/* CSS Variables - Ultra Minimalist Color Palette */
:root {
    --primary-blue: #0085C8;
    --dark-blue: #010535;
    --soft-gray: #F8F9FA;
    --white: #FFFFFF;
    --text-dark: #2C3E50;
    --text-light: #6C757D;
    /* Variables de color del menú dinámico */
    --nav-bg: rgba(248, 249, 250, 0.88);
    --nav-text: #2C3E50;
    --nav-border: rgba(0, 0, 0, 0.06);
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-dark);
    /* Degradado global con stops alineados a secciones (scroll-aware) */
    background: linear-gradient(
        180deg,
        /* Inicio (~0–10%) */
        color-mix(in srgb, var(--soft-gray) 100%, var(--primary-blue) 0%) 0%,
        color-mix(in srgb, var(--soft-gray) 90%, var(--primary-blue) 10%) 10%,
        /* Problemas (~25%) */
        color-mix(in srgb, var(--soft-gray) 75%, var(--primary-blue) 25%) 25%,
        /* Soluciones (~35%) */
        color-mix(in srgb, var(--soft-gray) 65%, var(--primary-blue) 35%) 35%,
        /* Proceso (~50%) */
        color-mix(in srgb, var(--soft-gray) 50%, var(--primary-blue) 50%) 50%,
        /* Beneficios (~65%) */
        color-mix(in srgb, var(--soft-gray) 35%, var(--primary-blue) 65%) 65%,
        /* Casos (~80%) */
        color-mix(in srgb, var(--soft-gray) 20%, var(--primary-blue) 80%) 80%,
        /* Transición hacia el más oscuro (90–100%) */
        color-mix(in srgb, var(--primary-blue) 85%, var(--dark-blue) 15%) 90%,
        var(--dark-blue) 100%
    );
    /* El fondo se desplaza con la página (no fijo al viewport) */
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 16px;
    color: var(--dark-blue);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }

p {
    margin-bottom: 16px;
    color: var(--text-light);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.btn-primary {
    background-color: var(--primary-blue);
    color: var(--white);
}

.btn-primary:hover {
    background-color: var(--dark-blue);
}

.btn-secondary {
    background-color: transparent;
    color: var(--dark-blue);
    border: 2px solid var(--dark-blue);
}

.btn-secondary:hover {
    background-color: var(--dark-blue);
    color: var(--white);
}

.btn-white {
    background-color: var(--white);
    color: var(--dark-blue);
}

.btn-white:hover {
    background-color: var(--soft-gray);
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: var(--nav-bg);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--nav-border);
    z-index: 1000;
    padding: 12px 0;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-brand .logo {
    height: 40px;
    width: auto;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 32px;
}

.nav-menu li a {
    text-decoration: none;
    color: var(--nav-text);
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-menu li a:hover {
    color: var(--primary-blue);
}

/* Hero Section */
.hero {
    padding: 120px 0 80px;
    background: transparent;
    text-align: center;
}

/* Botón del menú móvil */
.mobile-menu-btn {
    display: none; /* oculto por defecto (desktop) */
    background: transparent;
    border: none;
    padding: 8px;
    cursor: pointer;
}

.mobile-menu-btn span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--nav-text);
    border-radius: 2px;
    margin: 4px 0;
    transition: background-color 0.3s ease;
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 24px;
    color: var(--dark-blue);
}

.hero-content p {
    font-size: 1.25rem;
    margin-bottom: 32px;
    color: var(--text-light);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Sections */
.section {
    padding: 80px 0;
}

.section h2 {
    text-align: center;
    margin-bottom: 48px;
    font-size: 2.5rem;
    color: var(--dark-blue);
}

/* No backgrounds por sección: usamos el degradado global del body */
.bg-gray {
    background: transparent !important;
}

.bg-blue {
    background: transparent !important;
    color: inherit;
}

/* Texto sin override global por clase de fondo */
.bg-blue h2,
.bg-blue h3 {
    color: inherit;
}

.bg-blue p {
    color: inherit;
}

/* CTA de contacto: buen contraste sobre área inferior más oscura del degradado */
#contacto h2,
#contacto p {
    color: var(--white);
}

/* Grid Layouts */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 32px;
    margin-top: 48px;
}

/* Cards */
.card {
    background: var(--white);
    padding: 32px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-4px);
}

.card .icon {
    font-size: 3rem;
    margin-bottom: 16px;
    display: block;
}

.card h3 {
    margin-bottom: 16px;
    color: var(--dark-blue);
}

.card p {
    color: var(--text-light);
}

.card strong {
    color: var(--primary-blue);
}

/* Process Grid */
.process-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 32px;
    margin-top: 48px;
}

.process-step {
    text-align: center;
    padding: 32px;
}

.step-number {
    width: 60px;
    height: 60px;
    background-color: var(--primary-blue);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0 auto 24px;
}

.process-step h3 {
    margin-bottom: 16px;
    color: var(--dark-blue);
}

.process-step p {
    color: var(--text-light);
}

/* Metrics Grid */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 32px;
    margin-top: 48px;
}

.metric-card {
    background: var(--white);
    padding: 32px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.metric-value {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-blue);
    margin: 16px 0;
}

.metric-card h3 {
    color: var(--dark-blue);
    margin-bottom: 8px;
}

.metric-card p {
    color: var(--text-light);
    margin: 0;
}

/* Case Cards */
.case-card {
    background: var(--white);
    padding: 32px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border-left: 4px solid var(--primary-blue);
}

.case-card h3 {
    color: var(--dark-blue);
    margin-bottom: 16px;
}

.case-card p {
    color: var(--text-light);
    margin-bottom: 8px;
}

.case-card strong {
    color: var(--primary-blue);
}

/* CTA Section */
.cta-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.cta-content .contact-info {
    margin: 32px 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: center;
}

.contact-item {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
}

/* Footer */
.footer {
    /* Sin degradado local: dejamos que el del body se vea continuo */
    background: transparent;
    color: white;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 3rem;
    margin-bottom: 2rem;
    align-items: start;
    justify-items: start;
}

.footer-section {
    text-align: left;
}

/* Secciones del footer sin paddings asimétricos para alineación pareja */

.footer-section h3 {
    color: var(--primary-blue);
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
    font-weight: 600;
}

.footer-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-section ul li {
    margin-bottom: 0.8rem;
    line-height: 1.5;
}

.footer-section a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: var(--primary-blue);
}

.footer .contact-info {
    display: grid;
    grid-template-columns: 120px 1fr;
    column-gap: 12px;
    row-gap: 8px;
    align-items: start;
}

.footer .contact-info .label {
    color: var(--primary-blue);
    font-weight: 600;
    white-space: nowrap;
}

.footer .contact-info a,
.footer .contact-info span {
    color: #ccc;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.footer-bottom {
    border-top: 1px solid #333;
    padding-top: 1rem;
    text-align: center;
}

.footer-bottom p {
    margin: 0.5rem 0;
    color: #ccc;
}

.footer-brand .logo {
    height: 40px;
    width: auto;
    margin-bottom: 16px;
}

.footer-brand p {
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
}

.footer-info {
    text-align: right;
}

.footer-info p {
    color: rgba(255, 255, 255, 0.8);
    margin: 4px 0;
}

/* Responsive Design */
@media (max-width: 1024px) and (min-width: 769px) {
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 2.5rem;
        max-width: 100%;
    }
    
    .footer-section:first-child {
        padding-right: 1rem;
    }
    
    .footer-section:nth-child(2),
    .footer-section:nth-child(3) {
        padding-left: 0.5rem;
    }
    
    .footer-section:last-child {
        grid-column: 1 / -1;
        text-align: center;
        margin-top: 1rem;
        padding-left: 0;
    }
}

@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-content p {
        font-size: 1.1rem;
    }
    
    .section h2 {
        font-size: 2rem;
    }
    
    .nav-menu {
        display: none;
    }

    /* Menú móvil como overlay bajo la barra */
    .nav-menu.active {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        position: fixed;
        top: 58px; /* altura aproximada de la navbar */
        left: 0;
        right: 0;
        background-color: var(--nav-bg);
        border-bottom: 1px solid var(--nav-border);
        box-shadow: 0 8px 24px rgba(0,0,0,0.12);
        padding: 12px 20px;
        gap: 12px;
        z-index: 1000;
    }

    .nav-menu.active li { width: 100%; }
    .nav-menu.active li a {
        color: var(--nav-text);
        padding: 8px 0;
        display: block;
        width: 100%;
        text-align: center;
    }

    /* Botón del menú móvil visible y animado */
    .mobile-menu-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex-direction: column;
        gap: 4px;
    }

    .mobile-menu-btn span {
        transition: transform 0.3s ease, background-color 0.3s ease, opacity 0.3s ease;
    }

    .mobile-menu-btn.active span:nth-child(1) {
        transform: translateY(6px) rotate(45deg);
    }
    .mobile-menu-btn.active span:nth-child(2) {
        opacity: 0;
    }
    .mobile-menu-btn.active span:nth-child(3) {
        transform: translateY(-6px) rotate(-45deg);
    }

    .mobile-menu-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex-direction: column;
        gap: 4px;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 300px;
    }
    
    .footer .contact-info {
        grid-template-columns: 1fr;
        text-align: center;
        justify-items: center;
    }
    .footer .contact-info .label {
        justify-self: center;
    }
    .footer .contact-info a,
    .footer .contact-info span {
        text-align: center;
        justify-self: center;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
        justify-items: center;
        max-width: 100%;
    }
    
    .footer-section {
        text-align: center;
        padding-left: 0;
        padding-right: 0;
    }
    .footer-section ul {
        text-align: center;
    }
    
    .footer-info {
        text-align: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }
    
    .section {
        padding: 60px 0;
    }
    
    .hero {
        padding: 100px 0 60px;
    }
    
    .hero-content h1 {
        font-size: 1.75rem;
    }
    
    .card,
    .metric-card,
    .case-card,
    .process-step {
        padding: 24px;
    }
}