:root {
    --text-primary: #111827;
    --text-secondary: #4b5563;
    --text-menu: #d1d1d1;
    --accent: #8b5cf6;
    --accent-dark: #7c3aed;
    --background: #ffffff;
    --background-subtle: #c4c4c7; 
    --border-color: #e5e7eb;
    --navbar-h: 4rem;
    --header-pt: 6rem;
    --header-pb: 4rem;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scrollbar-gutter: stable;
}

body {
    font-family: 'Inter', system-ui, sans-serif;
    background-color: var(--background);
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scroll-padding-top: var(--navbar-h);
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

h1, h2, h3 {
    color: var(--text-primary);
    font-weight: 600;
    line-height: 1.3;
}

h1 { font-size: clamp(2.25rem, 5vw, 3.75rem); }
h2 { font-size: clamp(1.75rem, 4vw, 2.75rem); }
p { margin-bottom: 1rem; }

a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s ease;
}
a:hover { color: var(--accent-dark); }

img, svg {
    max-width: 100%;
    height: auto;
    display: block;
}

/* --- ANIMACIONES SUTILES --- */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}
.animate-on-scroll { opacity: 0; }
.is-visible { animation: fadeInUp 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards; }

/* --- BOTONES MINIMALISTAS --- */
.btn {
    display: inline-block;
    padding: 0.8rem 1.75rem;
    border-radius: 999px;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.2s ease-in-out;
}
.btn-primary {
    background-color: var(--accent);
    color: var(--background);
}
.btn-primary:hover {
    background-color: var(--accent-dark);
    transform: scale(1.03);
    color: #e5e5e5;
}
.btn-secondary {
    background-color: transparent;
    color: var(--text-primary);
    border-color: var(--border-color);
}
.btn-secondary:hover {
    background-color: var(--background-subtle);
    border-color: var(--text-secondary);
}

/* --- NAVEGACIÓN RESPONSIVE --- */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: #222222;
    z-index: 100;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}
.navbar.scrolled {
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}
.navbar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: var(--navbar-h);
}
.logo-image {
    height: calc(var(--navbar-h) - 16px);
    width: auto;
}
.nav-links { display: none; }
.mobile-menu-button {
    display: block;
    background: none;
    border: none;
    cursor: pointer;
    color: white;
    padding: 0.5rem;
}
.mobile-menu-button .icon {
    width: 28px;
    height: 28px;
    stroke: currentColor;
}
.mobile-menu {
    display: none;
    background-color: #222222;
    border-top: 1px solid #444;
}
.mobile-menu a {
    display: block;
    padding: 1rem;
    text-align: center;
    color: var(--text-menu);
    font-weight: 500;
}
.mobile-menu.active { display: block; }

/* --- HERO SECTION --- */
.hero {
    padding: calc(var(--header-pt) + 1rem) 0 var(--header-pb) 0;
    text-align: center;
}
.hero-container {
    display: grid;
    gap: 2rem;
    align-items: center;
}
.hero-content h1 { margin-bottom: 1.5rem; }
.hero-content p {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto 2.5rem auto;
}
.hero-buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}
.hero-image-wrapper img { border-radius: 0.75rem; }

/* --- SECCIONES Y CABECERAS --- */
section { padding: 5rem 0; }
.section-header {
    text-align: center;
    margin-bottom: 4rem;
}
.section-header span {
    display: block;
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 0.5rem;
}
.section-header h2 { max-width: 650px; margin: 0 auto; }

/* --- TARJETAS (SOLUTIONS) --- */
.solutions { background-color: var(--background-subtle); }
.solutions-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: 1fr;
}
.card {
    background-color: var(--background);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 2rem;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.card:hover {
    border-color: var(--accent);
    transform: translateY(-5px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}
.card-header h3 { font-size: 1.3rem; font-weight: 600; margin-bottom: 0.5rem; }
.card-header p { font-size: 1rem; margin-bottom: 1.5rem; }
.card ul { list-style: none; }
.card ul li {
    padding-left: 1.5rem;
    position: relative;
    margin-bottom: 0.5rem;
}
.card ul li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: 600;
}

/* --- ABOUT SECTION --- */
.about-container { display: grid; gap: 3rem; align-items: center; }
.about-content .section-header { text-align: left; margin-bottom: 2rem; }
.about-content .section-header h2 { margin: 0; }
.about-image-wrapper img { width: 100%; border-radius: 0.75rem; }

/* --- CTA SECTION --- */
.cta { background-color: var(--background-subtle); padding: 6rem 0; }
.cta-container { text-align: center; }
.cta-container h2 { max-width: 600px; margin: 0 auto 1.5rem auto; }
.cta-container p { max-width: 500px; margin: 0 auto 2rem auto; }

/* --- FOOTER RESPONSIVE --- */
.footer {
    background-color: var(--text-primary);
    color: #ececec;
    padding: 4rem 0 0 0;
}
.footer-container {
    display: flex;
    flex-direction: column;
    gap: 3rem;
    padding-bottom: 3rem;
    text-align: center;
}
.footer-about p {
    color: #9ca3af;
    margin: 1rem auto;
    max-width: 28rem;
    line-height: 1.6;
}
.footer-links h3, .footer-contact h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--background);
    margin-bottom: 1rem;
}
.footer-links ul, .footer-contact ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.footer-links a, .footer-contact li, .footer-contact a {
    color: #9ca3af;
    text-decoration: none;
    transition: color 0.2s ease;
}
.footer-links a:hover { color: var(--accent); }
.footer-bottom {
    background-color: #000000;
    padding: 1.5rem;
    text-align: center;
    color: #9ca3af;
    font-size: 0.875rem;
}

.footer-contact {
    display: flex;   
    flex-direction: column;    
    align-items: center;  
    color: #9ca3af;        
    transition: color 0.2s ease;
}

.contact-link-with-icon {
    display: flex;       
    align-items: center;
    justify-content: center;
    color: #9ca3af;        
    transition: color 0.2s ease;
}

.footer-contact .contact-link-with-icon:hover {
    color: var(--accent);  
}

.icon {
    margin-right: 10px; 
    flex-shrink: 0;      
}

/* --- MODAL DE LA SUITE (SIN CAMBIOS) --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease-in-out;
}
.modal-overlay.visible {
    opacity: 1;
    visibility: visible;
}
.modal-content {
    background-color: var(--background);
    border-radius: 1rem;
    position: relative;
    max-width: 800px;
    max-height: 90vh;
    width: 90vw;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transform: scale(0.95);
    transition: transform 0.3s ease-in-out;
    display: flex;
    flex-direction: column;
}
.modal-overlay.visible .modal-content { transform: scale(1); }
.modal-page-content { padding: 2rem; flex-grow: 1; overflow-y: auto; }
#modal-image {
    width: 100%;
    height: auto;
    max-height: 280px;
    object-fit: cover;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
}
#modal-title { font-size: 1.8rem; font-weight: 700; margin-bottom: 1rem; }
#modal-description { font-size: 1rem; line-height: 1.6; }
.modal-navigation {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem;
    border-top: 1px solid var(--border-color);
    flex-shrink: 0;
}
.modal-nav-arrow {
    background: none;
    border: none;
    font-size: 2rem;
    font-weight: bold;
    color: #888;
    cursor: pointer;
    padding: 0 1.5rem;
    transition: color 0.2s ease;
}
.modal-nav-arrow:hover { color: var(--text-primary); }
.modal-nav-arrow:disabled { color: #ddd; cursor: not-allowed; }
.modal-page-indicator {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-secondary);
    min-width: 50px;
    text-align: center;
}

/* --- BOTÓN FLOTANTE DE WHATSAPP --- */
.wa-float {
    position: fixed;
    right: 20px;
    bottom: 20px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #25D366;
    box-shadow: 0 10px 25px rgba(0,0,0,.25);
    display: grid;
    place-items: center;
    z-index: 999;
    transition: transform .15s ease, box-shadow .15s ease;
}
.wa-float:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(0,0,0,.3); }
.wa-float svg { width: 28px; height: 28px; fill: #ffffff; }

/* =================================================================
   MEDIA QUERIES - FINALES Y CORREGIDAS
   ================================================================= */


/* --- TABLET (768px y más) --- */
@media (min-width: 768px) {
    body {
        font-size: 17px;
    }

    /* --- Arreglo del Menú para TABLET Y DESKTOP --- */
    .mobile-menu-button, .mobile-menu {
        display: none;
    }
    .nav-links {
        display: flex;
        gap: 2rem;
        align-items: center;
    }
    .nav-links a {
        color: var(--text-menu);
        font-weight: 500;
    }

    /* --- Layouts Generales para TABLET Y DESKTOP --- */
    .hero {
        text-align: left;
    }
    .hero-container {
        grid-template-columns: 1fr 1fr;
        gap: 4rem;
    }
    .hero-buttons {
        flex-direction: row;
    }
    .solutions-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .about-container {
        grid-template-columns: 1fr 1fr;
    }
    .footer-container {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }

    /* --- Arreglo Suite Fintech para TABLET (Diseño Simple) --- */
    .module-section, .module-section-b {
        width: 600px;
    }
}

/* --- DESKTOP (1024px y más) --- */
@media (min-width: 1024px) {
    body {
        font-size: 18px;
    }
    section {
        padding: 7rem 0;
    }
    .solutions-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}