:root {
    --primary-blue: #007AFF;
    --primary-blue-glow: rgba(0, 122, 255, 0.4);
    --bg-light: #FBFBFD;
    --text-dark: #1D1D1F;
    --text-gray: #86868B;
    --glass-bg: rgba(255, 255, 255, 0.75);
    --glass-border: rgba(255, 255, 255, 0.5);
    --shadow: 0 20px 40px rgba(0, 0, 0, 0.05);
    --transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

img {
    border-radius: 40px;
    object-fit: cover;
    max-width: 100%;
}

.logo img {
    border-radius: 0 !important;
}

/* 
   ========================================
   ULTRA-PREMIUM BEAUTIFUL BACKGROUND
   ========================================
*/

/* Aurora Mesh System */
.bg-mesh {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    background: var(--bg-light);
    overflow: hidden;
}

.bg-mesh::before, .bg-mesh::after {
    content: "";
    position: absolute;
    width: 1000px;
    height: 1000px;
    border-radius: 50%;
    filter: blur(140px);
    opacity: 0.35;
    animation: aurora 20s infinite alternate;
}

.bg-mesh::before {
    background: radial-gradient(circle, #007AFF, #5856D6, #00C6FF);
    top: -300px;
    left: -200px;
}

.bg-mesh::after {
    background: radial-gradient(circle, #5856D6, #007AFF, #FF2D55);
    bottom: -300px;
    right: -200px;
    animation-delay: -8s;
}

@keyframes aurora {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(100px, 50px) scale(1.2); }
    100% { transform: translate(-50px, 100px) scale(0.8); }
}

/* Floating Light Orbs */
.bg-shapes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

.bg-shape {
    position: absolute;
    background: var(--primary-blue);
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.2;
    animation: drift 25s infinite linear;
}

.bg-shape-1 { width: 500px; height: 500px; top: 10%; left: 15%; background: #00C6FF; }
.bg-shape-2 { width: 600px; height: 600px; bottom: 5%; right: 10%; animation-duration: 40s; background: #5856D6; }
.bg-shape-3 { width: 400px; height: 400px; top: 30%; right: 30%; animation-duration: 30s; background: #FF2D55; opacity: 0.1; }

@keyframes drift {
    from { transform: rotate(0deg) translate(50px) rotate(0deg); }
    to { transform: rotate(360deg) translate(50px) rotate(-360deg); }
}



/* 
   ========================================
   UI COMPONENTS
   ========================================
*/

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 5%;
}

.cursor-dot, .cursor-outline {
    pointer-events: none;
    position: fixed;
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    z-index: 9999;
}

.cursor-dot { width: 8px; height: 8px; background-color: var(--primary-blue); }
.cursor-outline { width: 40px; height: 40px; border: 1px solid var(--primary-blue); opacity: 0.3; }

@media (max-width: 992px) {
    .cursor-dot, .cursor-outline {
        display: none;
    }
}

.header {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 1100px;
    background: var(--glass-bg);
    backdrop-filter: blur(25px);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 40px;
    z-index: 1000;
    box-shadow: 0 20px 50px rgba(0,0,0,0.03);
    transition: var(--transition);
}

.logo img { 
    height: 35px; 
    filter: brightness(0) saturate(100%) invert(29%) sepia(96%) saturate(2768%) hue-rotate(201deg) brightness(101%) contrast(101%);
    transition: var(--transition);
}

.logo img:hover {
    transform: scale(1.05);
    filter: brightness(0) saturate(100%) invert(45%) sepia(90%) saturate(3000%) hue-rotate(195deg) brightness(110%) contrast(110%);
}

.nav-list { display: flex; list-style: none; gap: 40px; }
.nav-link {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition);
    opacity: 0.7;
}

.nav-link:hover, .nav-link.active { opacity: 1; color: var(--primary-blue); }

.nav-cta {
    background: var(--primary-blue);
    color: white;
    padding: 14px 30px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.85rem;
    box-shadow: 0 10px 25px var(--primary-blue-glow);
    transition: var(--transition);
}

.nav-cta:hover { transform: translateY(-3px); box-shadow: 0 15px 35px var(--primary-blue-glow); }

/* Hero */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: 100px;
    overflow: hidden;
    z-index: 10;
}

.hero-bg-video {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: translate(-50%, -50%);
    z-index: -1;
    opacity: 0.8;
    mask-image: linear-gradient(to bottom, black 60%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 60%, transparent 100%);
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, 
        rgba(251, 251, 253, 0.4) 0%, 
        rgba(251, 251, 253, 0.9) 80%,
        rgba(251, 251, 253, 1) 100%
    );
    backdrop-filter: blur(4px);
    z-index: 0;
}

.hero::after {
    content: "";
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 300px;
    background: linear-gradient(to bottom, 
        rgba(251, 251, 253, 0) 0%, 
        rgba(251, 251, 253, 1) 100%
    );
    z-index: 2;
    pointer-events: none;
}

/* Stats Section Fade Integration */
.stats-section {
    padding: 100px 0;
    position: relative;
    z-index: 5;
}

.stats-section::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 200px;
    background: linear-gradient(to bottom, 
        rgba(251, 251, 253, 1) 0%, 
        rgba(251, 251, 253, 0) 100%
    );
    z-index: -1;
}

.hero .container {
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 5.5rem;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -3px;
}
.text-gradient { background: linear-gradient(90deg, #007AFF, #5856D6); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.hero-description { font-size: 1.3rem; color: var(--text-gray); margin: 30px 0 50px; max-width: 600px; }

.btn { padding: 20px 45px; border-radius: 50px; font-weight: 800; text-decoration: none; transition: var(--transition); display: inline-block; }
.btn-primary { background: var(--primary-blue); color: white; box-shadow: 0 25px 50px var(--primary-blue-glow); }
.btn-outline { border: 2px solid var(--text-dark); color: var(--text-dark); }
.btn:hover { transform: translateY(-5px); }

.hero-visual { display: none; }

@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-30px); } }

/* Cards & Sections */
.section-header { text-align: center; margin-bottom: 80px; }
.section-title { font-size: 3.5rem; font-weight: 800; letter-spacing: -1.5px; }

.services-grid {
    display: grid;
    grid-template-columns: 1fr; /* Por defecto una columna si no se especifica otra cosa */
    gap: 40px; /* Separación base */
}

.service-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 40px;
    padding: 50px;
    transition: var(--transition);
    height: 100%; /* Asegura que todas tengan la misma altura si están en grid */
}

.service-card:hover { transform: translateY(-10px); box-shadow: 0 40px 80px rgba(0,0,0,0.06); }

/* Partners */
.partners-grid {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 60px;
    flex-wrap: wrap;
    padding: 20px 0;
}

.partners-grid img {
    height: 85px;
    width: auto;
    filter: none;
    opacity: 1;
    transition: var(--transition);
    border-radius: 0; /* Remove global border-radius */
    mix-blend-mode: multiply; /* Secret trick to remove white backgrounds */
}

.partners-grid img:hover {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.1);
}

/* Footer */
.footer {
    padding: 80px 0 40px;
    border-top: 1px solid rgba(0,0,0,0.05);
    background: #fbfbfd;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 40px;
}

.copyright {
    font-size: 0.95rem;
    color: var(--text-gray);
    font-weight: 500;
}

.footer-status {
    background: white;
    padding: 15px 30px;
    border-radius: 40px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.03);
}

.status-inner {
    display: flex;
    align-items: center;
    gap: 15px;
}

.status-dot {
    width: 10px;
    height: 10px;
    background: #00FF85;
    border-radius: 50%;
    box-shadow: 0 0 15px rgba(0, 255, 133, 0.5);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.5; }
    100% { transform: scale(1); opacity: 1; }
}

.clock {
    font-weight: 800;
    color: var(--primary-blue);
    font-size: 1.2rem;
    font-family: monospace;
}

/* 
   ========================================
   MOBILE RESPONSIVENESS (iPhone/Android)
   ========================================
*/

/* Hamburger Menu Icon */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    z-index: 1001;
    padding: 5px;
}

.menu-toggle span {
    display: block;
    width: 28px;
    height: 3px;
    background: var(--text-dark);
    border-radius: 3px;
    transition: var(--transition);
}

@media (max-width: 992px) {
    .header {
        width: 95%;
        padding: 10px 20px;
    }

    .nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        height: 100vh;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px);
        display: flex;
        align-items: center;
        justify-content: center;
        transition: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1000;
        box-shadow: -20px 0 50px rgba(0,0,0,0.1);
    }

    .nav.active {
        right: 0;
    }

    .nav-list {
        flex-direction: column;
        gap: 30px;
        text-align: center;
    }

    .nav-link {
        font-size: 1.5rem;
    }

    .menu-toggle {
        display: flex;
    }

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

    .nav-cta {
        display: none; /* Hide in header on mobile, can add to nav list if needed */
    }

    /* Hero adjustments */
    .hero {
        padding-top: 140px;
        text-align: center;
    }

    .hero-title {
        font-size: 3rem;
        letter-spacing: -1px;
        margin-bottom: 25px;
    }

    .hero-description {
        font-size: 1.1rem;
        padding: 0 10px;
        margin-bottom: 40px; /* More space before buttons */
        line-height: 1.6;
    }

    .hero-btns {
        flex-direction: column;
        gap: 25px; /* More space between buttons */
    }

    .btn {
        width: 100%;
    }

    /* Grid adjustments */
    .services-grid {
        grid-template-columns: 1fr;
        gap: 40px;
        display: flex;
        flex-direction: column;
    }

    /* Centrado y Stacking total para móviles */
    .about-content-wrapper,
    .services-grid,
    .section-header,
    .hero-content,
    .container > div,
    .footer-content,
    .partners-grid,
    .service-row {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
        width: 100% !important;
        max-width: 100% !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        gap: 60px !important; /* Aumentar separación */
        grid-template-columns: 1fr !important; 
    }

    .services-grid .service-card {
        margin: 80px 0 !important; /* Separación extrema */
        display: block !important;
        position: relative !important;
        z-index: 10 !important;
        border: 1px solid rgba(0, 122, 255, 0.1) !important;
        box-shadow: 0 20px 40px rgba(0,0,0,0.05) !important;
    }

    .service-info,
    .service-text,
    .service-list,
    .service-intro-text {
        width: 100% !important;
        max-width: 100% !important;
        text-align: center !important;
        padding: 0 !important;
        margin: 0 auto !important;
    }

    .service-list li {
        justify-content: center !important;
        text-align: center !important;
        width: 100% !important;
    }

    /* Partners en móvil */
    .partners-grid {
        flex-direction: row !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        gap: 30px !important;
    }

    .partners-grid img {
        height: 60px !important;
        opacity: 1 !important;
        filter: none !important;
    }

    /* Footer en móvil */
    .footer {
        padding: 60px 0 !important;
    }

    .copyright {
        font-size: 0.85rem !important;
        order: 2;
    }

    .footer-status {
        order: 1;
        width: auto !important;
    }

    .clock {
        font-size: 1.1rem !important;
    }

    /* Ajuste específico para la caja azul de metodología */
    div[style*="background: var(--primary-blue)"] {
        padding: 40px 20px !important;
    }

    div[style*="background: rgba(255,255,255,0.1)"] {
        width: 100% !important;
        box-sizing: border-box;
    }

    /* Fix image visibility in About section */
    .about-content + div, 
    div[style*="position: relative"] img {
        width: 100% !important;
        margin-top: 30px;
        border-radius: 30px !important;
    }

    .about-content + div div[style*="position: absolute"] {
        position: relative !important; /* Move absolute floating box to normal flow on mobile */
        top: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        left: 0 !important;
        margin-top: 15px;
        text-align: center;
    }

    /* Stacking mission/vision cards in About */
    .about-content div[style*="display: grid"] {
        grid-template-columns: 1fr !important;
        gap: 30px !important;
    }

    .stats-section .container > div {
        grid-template-columns: 1fr 1fr !important;
        gap: 40px !important;
    }

    section {
        padding: 100px 0 !important; /* More breathing room between sections */
    }

    .section-header {
        margin-bottom: 60px !important;
    }

    section[style*="grid-template-columns: 1fr 1fr"] {
        grid-template-columns: 1fr !important;
        gap: 60px !important; /* Increased separation */
    }

    /* Partners */
    .partners .container div[style*="display: flex"] {
        gap: 40px !important;
        justify-content: center;
        flex-wrap: wrap;
    }

    .partners img {
        height: 45px !important;
        margin: 10px;
    }

    .section-title {
        font-size: 2.2rem;
        margin-bottom: 20px;
    }

    .container {
        padding: 0 25px; /* More side margin on mobile */
    }
}

/* 
   ========================================
   FLOATING CONTACT BUTTON
   ========================================
*/

.floating-contact {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: linear-gradient(135deg, #25D366, #128C7E);
    color: white;
    padding: 15px 25px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.3rem;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 10px 25px rgba(37, 211, 102, 0.4), inset 0 2px 10px rgba(255, 255, 255, 0.4);
    z-index: 9999;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
}

.floating-contact i {
    font-size: 1.6rem;
}

.floating-contact:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 15px 35px rgba(37, 211, 102, 0.5), inset 0 2px 10px rgba(255, 255, 255, 0.6);
}

@media (max-width: 480px) {
    .floating-contact {
        bottom: 20px;
        right: 20px;
        padding: 12px 20px;
        font-size: 1.1rem;
    }
}

