/* RESET Y VARIABLES */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #0d3b66;
    --primary-dark: #082642;
    --secondary-color: #00a896;
    --secondary-hover: #008072;
    --dark-color: #1d2d44;
    --light-bg: #f8fafc;
    --card-bg: #ffffff;
    --border-color: #e2e8f0;
    --text-color: #334155;
    --text-muted: #64748b;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 10px 25px -5px rgba(0,0,0,0.08), 0 8px 10px -6px rgba(0,0,0,0.04);
    --shadow-lg: 0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.04);
    --font-main: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body {
    font-family: var(--font-main);
    color: var(--text-color);
    line-height: 1.6;
    background-color: #ffffff;
}

/* Evita scrollear el fondo cuando el modal está abierto */
body.modal-open {
    overflow: hidden;
}

.container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 20px;
}

.text-center { text-align: center; }
.mt-30 { margin-top: 30px; }

/* BOTONES */
.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.25s ease;
}

.btn-primary {
    background-color: var(--secondary-color);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 168, 150, 0.25);
}

.btn-primary:hover {
    background-color: var(--secondary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 168, 150, 0.35);
}

.btn-secondary {
    background-color: transparent;
    color: #ffffff;
    border: 2px solid rgba(255, 255, 255, 0.4);
}

.btn-secondary:hover {
    background-color: #ffffff;
    color: var(--primary-color);
    border-color: #ffffff;
}

.btn-link {
    background: none;
    border: none;
    color: var(--secondary-color);
    font-weight: 700;
    cursor: pointer;
    padding: 0;
    margin-top: 15px;
    font-size: 0.95rem;
    transition: color 0.2s ease;
}

.btn-link:hover {
    color: var(--primary-color);
}

/* NAVBAR */
.navbar {
    background-color: rgba(13, 59, 102, 0.95);
    backdrop-filter: blur(8px);
    padding: 18px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

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

.logo {
    color: #ffffff;
    font-size: 1.4rem;
    font-weight: 800;
    text-decoration: none;
    letter-spacing: -0.5px;
}

.logo span {
    color: var(--secondary-color);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 25px;
}

.nav-links a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.2s ease;
}

.nav-links a:hover {
    color: #ffffff;
}

/* HERO */
.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--dark-color) 100%);
    color: #ffffff;
    padding: 100px 0 90px 0;
    text-align: center;
    position: relative;
}

.hero-content h1 {
    font-size: 2.75rem;
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.25;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.hero-content p {
    font-size: 1.2rem;
    max-width: 750px;
    margin: 0 auto 35px auto;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 300;
}

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

/* GRIDS Y SECCIONES */
section {
    padding: 80px 0;
}

h2 {
    font-size: 2.1rem;
    color: var(--primary-color);
    margin-bottom: 40px;
    text-align: center;
    font-weight: 700;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 50px;
    align-items: center;
}

/* DESAFÍOS (PUNTOS DE DOLOR) */
.pain-points {
    background-color: var(--light-bg);
    border-bottom: 1px solid var(--border-color);
}

.card {
    background: var(--card-bg);
    padding: 35px 25px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: rgba(0, 168, 150, 0.4);
}

.card-icon {
    font-size: 2rem;
    margin-bottom: 15px;
    background: rgba(0, 168, 150, 0.1);
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

.card h3 {
    color: var(--primary-color);
    margin-bottom: 12px;
    font-size: 1.25rem;
}

.card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    flex-grow: 1;
}

/* NOSOTROS */
.about {
    background: #ffffff;
}

.about-text h2 {
    text-align: left;
    margin-bottom: 20px;
}

.about-text p {
    margin-bottom: 15px;
    color: var(--text-muted);
    font-size: 1.05rem;
}

.about-box {
    background: linear-gradient(135deg, var(--primary-color), var(--dark-color));
    color: #ffffff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
}

.about-box h3 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: var(--secondary-color);
}

.about-box ul {
    list-style: none;
}

.about-box li {
    margin-bottom: 15px;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* SERVICIOS */
.services {
    background-color: var(--light-bg);
}

.service-card {
    background: var(--card-bg);
    padding: 35px 25px;
    border-radius: 12px;
    border-top: 4px solid var(--secondary-color);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.service-card h3 {
    color: var(--primary-color);
    margin-bottom: 12px;
    font-size: 1.25rem;
}

.service-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* FAQ */
.faq-list details {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 20px 25px;
    margin-bottom: 15px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.faq-list details[open] {
    box-shadow: var(--shadow-sm);
    border-color: var(--secondary-color);
}

.faq-list summary {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 1.05rem;
}

.faq-list p {
    margin-top: 12px;
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* FOOTER */
.footer {
    background-color: var(--primary-dark);
    color: rgba(255, 255, 255, 0.7);
    padding: 40px 0;
    text-align: center;
    font-size: 0.9rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer a {
    color: var(--secondary-color);
    text-decoration: none;
}

/* MODALES CORREGIDOS CON SCROLL INTERNO */
.modal {
    display: none;
    position: fixed;
    z-index: 200;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(13, 45, 74, 0.75);
    backdrop-filter: blur(4px);
    padding: 20px;
    overflow-y: auto; /* Permite scroll externo si la pantalla es muy pequeña */
}

.modal-content {
    background-color: #ffffff;
    margin: 40px auto;
    padding: 35px;
    width: 100%;
    max-width: 520px;
    border-radius: 12px;
    position: relative;
    box-shadow: var(--shadow-lg);
    max-height: calc(100vh - 80px); /* Garantiza que encaje en pantalla */
    overflow-y: auto; /* Scroll dentro del modal si el contenido excede */
}

.modal-large {
    max-width: 800px;
}

.close-btn {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 1.8rem;
    cursor: pointer;
    color: var(--text-muted);
    transition: color 0.2s ease;
}

.close-btn:hover {
    color: var(--primary-color);
}

.modal-subtitle {
    color: var(--text-muted);
    margin-bottom: 25px;
}

/* Formulario Modal */
.modal-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-top: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary-color);
}

.form-group input, .form-group textarea {
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.95rem;
    transition: border-color 0.2s ease;
}

.form-group input:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--secondary-color);
}

/* Modal Despliegue de Soluciones */
.solutions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.solution-item {
    background: var(--light-bg);
    padding: 20px;
    border-radius: 8px;
    border-left: 3px solid var(--secondary-color);
}

.solution-item h4 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 1.05rem;
}

.solution-item ul {
    padding-left: 18px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.solution-item li {
    margin-bottom: 6px;
}

.modal-footer-cta {
    text-align: center;
    background: var(--light-bg);
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
}

.modal-footer-cta p {
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--primary-color);
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 15px;
    }
    
    .hero {
        padding: 60px 0;
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .grid-2 {
        grid-template-columns: 1fr;
    }

    .modal-content {
        margin: 20px auto;
        padding: 25px 20px;
    }
}

/* ==========================================
   FOOTER LLAMATIVO Y CORPORATIVO
   ========================================== */

.footer-main {
    background: linear-gradient(180deg, var(--dark-color) 0%, var(--primary-dark) 100%);
    color: rgba(255, 255, 255, 0.8);
    padding: 70px 0 30px 0;
    border-top: 3px solid var(--secondary-color);
    font-size: 0.95rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1.5fr;
    gap: 50px;
    margin-bottom: 50px;
}

.footer-logo {
    color: #ffffff;
    font-size: 1.5rem;
    font-weight: 800;
    text-decoration: none;
    letter-spacing: -0.5px;
    display: inline-block;
    margin-bottom: 15px;
}

.footer-logo span {
    color: var(--secondary-color);
}

.footer-tagline {
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 20px;
    max-width: 380px;
}

/* Iconos Sociales */
.footer-socials {
    display: flex;
    gap: 12px;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-icon:hover {
    background-color: var(--secondary-color);
    transform: translateY(-3px);
}

/* Columnas de Links y Contacto */
.footer-heading {
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 20px;
    position: relative;
}

.footer-heading::after {
    content: '';
    display: block;
    width: 30px;
    height: 2px;
    background-color: var(--secondary-color);
    margin-top: 8px;
    border-radius: 2px;
}

.footer-links, .footer-contact {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    transition: all 0.2s ease;
}

.footer-links a:hover {
    color: var(--secondary-color);
    padding-left: 5px;
}

.footer-contact li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 15px;
    color: rgba(255, 255, 255, 0.75);
}

.footer-contact a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-contact a:hover {
    color: var(--secondary-color);
}

.contact-icon {
    font-size: 1.1rem;
}

/* Sub-Footer */
.footer-bottom {
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
}

.footer-legal a {
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-legal a:hover {
    color: rgba(255, 255, 255, 0.8);
}

.footer-legal .separator {
    margin: 0 8px;
}

/* Adaptación Mobile */
@media (max-width: 850px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 35px;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

/* METODOLOGÍA */
.process {
    background-color: #ffffff;
}

.process-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.step-card {
    background-color: var(--light-bg);
    padding: 30px 20px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    position: relative;
    transition: transform 0.3s ease;
}

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

.step-number {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--secondary-color);
    margin-bottom: 10px;
}

.step-card h3 {
    color: var(--primary-color);
    font-size: 1.15rem;
    margin-bottom: 10px;
}

.step-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
}