:root {
    --primary: #00c2e8; /* Cyan from logo */
    --primary-dark: #0099b8;
    --secondary: #0b2147; /* Dark Navy from logo */
    --accent: #f0f4f8;
    --text-main: #1a202c;
    --text-muted: #4a5568;
    --bg-light: #ffffff;
    --bg-dark: #061121;
    --glass: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

    /* theme-aware variables (Light Default) */
    --theme-bg-body: #ffffff;
    --theme-bg-alt: #f8fafc;
    --theme-card-bg: rgba(255, 255, 255, 0.7);
    --theme-card-bg-solid: #ffffff;
    --theme-text-title: #0b2147;
    --theme-text-main: #1a202c;
    --theme-text-muted: #4a5568;
    --theme-border: rgba(0, 0, 0, 0.05);
    --theme-card-border: rgba(255, 255, 255, 0.5);
    --theme-input-bg: #ffffff;
    --theme-input-border: #e2e8f0;
}

body.dark-theme {
    --theme-bg-body: #061121;
    --theme-bg-alt: #0a192f;
    --theme-card-bg: rgba(11, 33, 71, 0.5);
    --theme-card-bg-solid: #0b2147;
    --theme-text-title: #ffffff;
    --theme-text-main: #e2e8f0;
    --theme-text-muted: #94a3b8;
    --theme-border: rgba(255, 255, 255, 0.08);
    --theme-card-border: rgba(255, 255, 255, 0.1);
    --theme-input-bg: #09162a;
    --theme-input-border: rgba(0, 194, 232, 0.3);
}

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

body {
    background-color: var(--theme-bg-body);
    color: var(--theme-text-main);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.4s ease, color 0.4s ease;
}

/* --- Marquee --- */
.top-marquee {
    background: var(--secondary);
    color: var(--primary);
    padding: 0.5rem 0;
    font-size: 0.9rem;
    font-weight: 600;
    overflow: hidden;
    white-space: nowrap;
    position: relative;
    z-index: 1001;
}

.marquee-content {
    display: inline-block;
    animation: marquee 40s linear infinite;
    padding-left: 100%;
}

@keyframes marquee {
    0% { transform: translate(0, 0); }
    100% { transform: translate(-100%, 0); }
}

/* --- Navigation --- */
nav {
    position: fixed;
    top: 34px; /* Space for marquee */
    width: 100%;
    z-index: 1000;
    padding: 1.5rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
    background: transparent;
}

nav.scrolled {
    background: rgba(6, 17, 33, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem 5%;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    text-decoration: none;
}

.logo img {
    height: 160px; /* Much larger */
    mix-blend-mode: multiply;
    filter: contrast(1.1);
    transition: var(--transition);
    position: absolute; 
    top: -20px;
    left: 50px; /* Moved to the right */
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    opacity: 0.8;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: var(--transition);
    transform: translateX(-50%);
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-links a:hover {
    color: var(--primary);
    opacity: 1;
}

.btn-cta {
    background: var(--primary);
    color: white;
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    box-shadow: 0 0 15px rgba(0, 194, 232, 0.4);
    animation: pulseGlow 3s infinite;
}

@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 0 15px rgba(0, 194, 232, 0.4); }
    50% { box-shadow: 0 0 30px rgba(0, 194, 232, 0.7); }
}

.btn-cta:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 10px 25px rgba(0, 194, 232, 0.6);
}

.secondary-cta {
    background: transparent;
    border: 2px solid var(--primary);
    box-shadow: none;
}

.secondary-cta:hover {
    background: var(--primary);
    box-shadow: 0 6px 20px rgba(0, 194, 232, 0.3);
}

/* --- Hero Section --- */
.hero {
    height: 100vh;
    background: 
        radial-gradient(circle at 130px 80px, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0) 250px), /* Foco preciso */
        linear-gradient(rgba(6, 17, 33, 0.1), rgba(6, 17, 33, 0.3)), 
        url('assets/hero_v3.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
    padding: 0 10%;
}

.hero h1 {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    font-weight: 800;
    background: linear-gradient(
        to right, 
        #ffffff 20%, 
        var(--primary) 40%, 
        #a855f7 60%, 
        var(--primary) 80%, 
        #ffffff 100%
    );
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: fadeInUp 1s ease, tornasol 5s linear infinite;
}

@keyframes tornasol {
    to { background-position: 200% center; }
}

.hero p {
    font-size: 1.2rem;
    max-width: 900px; /* Mas ancho para mejor balance */
    margin: 0 auto 2.5rem; /* Centrado perfecto y mas aire */
    opacity: 0.9;
    animation: fadeInUp 1.2s ease;
}

.hero-btns {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    animation: fadeInUp 1.4s ease;
}

/* --- Sections --- */
section {
    padding: 100px 10%;
}

.section-title {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title h2 {
    font-size: 2.5rem;
    color: var(--theme-text-title);
    margin-bottom: 1rem;
}

.section-title .underline {
    width: 60px;
    height: 4px;
    background: var(--primary);
    margin: 0 auto;
    border-radius: 2px;
}

/* --- Services Grid --- */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.service-card {
    background: var(--theme-card-bg);
    backdrop-filter: blur(10px);
    padding: 0;
    border-radius: 24px;
    box-shadow: 0 10px 40px var(--theme-border);
    transition: var(--transition);
    border: 1px solid var(--theme-card-border);
    position: relative;
    overflow: hidden;
}

.service-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-bottom: 2px solid var(--primary);
}

.service-content {
    padding: 2.5rem;
}

.service-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    opacity: 0;
    transition: var(--transition);
}

.service-card:hover::after {
    opacity: 1;
}

.service-card:hover {
    transform: translateY(-15px) rotateX(5deg) rotateY(-5deg); /* 3D Tilt Effect */
    box-shadow: 0 30px 60px rgba(0, 194, 232, 0.2);
    border-color: var(--primary);
}

.service-card i {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
    display: inline-block;
    animation: floatIcon 4s ease-in-out infinite; /* Floating Icon */
}

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

/* --- Scan Effect on Images --- */
.service-card {
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: -100%;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        transparent,
        rgba(0, 194, 232, 0.2),
        transparent
    );
    z-index: 2;
    pointer-events: none;
    animation: scanLine 6s linear infinite;
}

@keyframes scanLine {
    0% { top: -100%; }
    100% { top: 100%; }
}

.service-card h3 {
    margin-bottom: 1rem;
    color: var(--theme-text-title);
}

.service-card ul {
    list-style: none;
    color: var(--theme-text-muted);
}

.service-card ul li {
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.service-card ul li::before {
    content: '→';
    color: var(--primary);
}

/* --- Features Section --- */
.features {
    background: var(--bg-dark);
    color: white;
}

.features .section-title h2 {
    color: white;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 3rem;
    text-align: center;
}

.feature-item i {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
}

/* --- About Section --- */
.about-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text h3 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: var(--theme-text-title);
}

.mission-vision {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 3rem;
}

.mv-card {
    background: var(--theme-bg-alt);
    padding: 2rem;
    border-radius: 15px;
    border: 1px solid var(--theme-border);
}

.mv-card h4 {
    color: var(--primary);
    margin-bottom: 1rem;
}

/* --- Values --- */
.values-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.value-card {
    text-align: center;
    padding: 2rem;
    background: var(--theme-card-bg-solid);
    border-radius: 15px;
    box-shadow: 0 5px 15px var(--theme-border);
    border: 1px solid var(--theme-border);
}

/* --- Footer --- */
footer {
    background: var(--bg-dark);
    color: white;
    padding: 80px 10% 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 4rem;
    margin-bottom: 3rem;
}

.footer-logo h2 {
    color: var(--primary);
    margin-bottom: 1.5rem;
}

.footer-links h4 {
    margin-bottom: 1.5rem;
}

.footer-links ul {
    list-style: none;
}

.footer-links ul li {
    margin-bottom: 0.8rem;
}

.footer-links a {
    color: #a0aec0;
    text-decoration: none;
    transition: var(--transition);
}

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

.copyright {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: #718096;
}

/* --- Animations --- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Responsive --- */
@media (max-width: 968px) {
    .about-container {
        grid-template-columns: 1fr;
    }
    .hero h1 {
        font-size: 2.5rem;
    }
    .footer-content {
        grid-template-columns: 1fr 1fr;
    }
    .values-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 600px) {
    .footer-content {
        grid-template-columns: 1fr;
    }
}

/* --- Reveal Animation --- */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.about-image img {
    transition: var(--transition);
}

.about-image img:hover {
    transform: scale(1.05);
}

/* --- Preloader --- */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-dark);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

.preloader-content {
    text-align: center;
}

.preloader-logo {
    font-size: 3rem;
    font-weight: 800;
    color: white;
    letter-spacing: 10px;
    margin-bottom: 1.5rem;
    animation: glitchText 2s infinite;
}

.loader-bar {
    width: 200px;
    height: 2px;
    background: rgba(255, 255, 255, 0.1);
    margin: 0 auto 1rem;
    position: relative;
    overflow: hidden;
}

.loader-progress {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--primary);
    animation: loadProgress 1s ease-in-out forwards;
}

.loader-text {
    color: var(--primary);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 2px;
}

@keyframes loadProgress {
    0% { left: -100%; }
    100% { left: 0; }
}

@keyframes glitchText {
    0%, 100% { transform: skew(0); }
    20% { transform: skew(-5deg); text-shadow: 2px 0 var(--primary); }
    40% { transform: skew(5deg); text-shadow: -2px 0 #ff00c1; }
}

#preloader.fade-out {
    opacity: 0;
    visibility: hidden;
}

/* --- Service Detail Styles --- */
.service-hero {
    height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    padding: 0 10%;
    position: relative;
    overflow: hidden;
}

.service-detail {
    padding: 100px 10%;
    background: white;
    position: relative;
    z-index: 1;
}

.detail-grid {
    max-width: 1000px;
    margin: 0 auto;
}

.detail-text h2 {
    font-size: 2.5rem;
    color: var(--secondary);
    margin-bottom: 2rem;
}

.detail-features {
    display: grid;
    gap: 2.5rem;
    margin: 3rem 0;
}

.df-item {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.df-item i {
    color: var(--primary);
    width: 40px;
    height: 40px;
    flex-shrink: 0;
}

.df-item h4 {
    margin-bottom: 0.5rem;
    color: var(--secondary);
}

.service-card {
    text-decoration: none;
    display: block;
    color: inherit;
}

/* --- Optimized WhatsApp Button --- */
.whatsapp-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #25d366;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
    z-index: 1000;
    transition: var(--transition);
}

.whatsapp-btn:hover {
    transform: scale(1.1) translateY(-5px);
    background: #128c7e;
    box-shadow: 0 15px 30px rgba(37, 211, 102, 0.4);
}

.whatsapp-btn i {
    width: 30px;
    height: 30px;
}

/* --- High Performance Scroll Reveal --- */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1s cubic-bezier(0.4, 0, 0.2, 1), transform 1s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: opacity, transform;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* --- Page Reveal --- */
body.loaded .hero-content {
    animation: cinematicEntrance 1.5s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

@keyframes cinematicEntrance {
    from {
        opacity: 0;
        transform: scale(1.1) translateY(50px);
        filter: blur(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
        filter: blur(0);
    }
}

/* --- Nebula Background Elements --- */
.nebula {
    position: fixed;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    z-index: -1;
    filter: blur(120px);
    opacity: 0.15;
    pointer-events: none;
    animation: floatNebula 25s ease-in-out infinite alternate;
}

.nebula-1 {
    background: radial-gradient(circle, var(--primary), transparent);
    top: -150px;
    right: -100px;
}

.nebula-2 {
    background: radial-gradient(circle, var(--secondary), transparent);
    bottom: -150px;
    left: -100px;
    animation-delay: -7s;
    animation-duration: 30s;
}

@keyframes floatNebula {
    0% { transform: translate(0, 0) rotate(0deg) scale(1); }
    100% { transform: translate(150px, 200px) rotate(30deg) scale(1.3); }
}

@media (max-width: 768px) {
    .nebula {
        width: 300px;
        height: 300px;
        opacity: 0.1;
    }
}

/* --- Success Metrics --- */
.metrics {
    background: var(--bg-dark);
    color: white;
    padding: 80px 10%;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 3rem;
    text-align: center;
}

.metric-item .number {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--primary);
    display: block;
    margin-bottom: 0.5rem;
}

.metric-item p {
    font-size: 1.1rem;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* --- Technology Partners --- */
.partners {
    background: #f8fafc;
    padding: 80px 10%;
    text-align: center;
}

.partners .section-title p {
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 3px;
    font-size: 0.9rem;
    margin-bottom: 4rem;
}

.partners-row {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 4rem;
}

.partners-row img {
    height: 55px;
    filter: grayscale(100%);
    opacity: 0.7;
    transition: var(--transition);
}

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

/* --- Testimonials Section --- */
.testimonials {
    background: var(--theme-bg-body);
    padding: 100px 10%;
    position: relative;
    z-index: 1;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    max-width: 1100px;
    margin: 0 auto;
}

.testimonial-card {
    background: var(--theme-bg-alt);
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px var(--theme-border);
    border: 1px solid var(--theme-border);
    transition: var(--transition);
    position: relative;
}

.testimonial-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 194, 232, 0.08);
    border-color: rgba(0, 194, 232, 0.3);
}

.testimonial-stars {
    color: #f59e0b;
    margin-bottom: 1rem;
    font-size: 1.1rem;
    letter-spacing: 2px;
}

.testimonial-text {
    color: var(--theme-text-muted);
    font-style: italic;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.author-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--bg-dark);
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--primary);
    font-weight: 700;
    font-size: 1.1rem;
}

.author-info h4 {
    color: var(--theme-text-title);
    font-size: 1rem;
    margin-bottom: 2px;
}

.author-info p {
    font-size: 0.8rem;
    color: var(--theme-text-muted);
}

/* --- FAQ Section --- */
.faq {
    background: var(--theme-bg-alt);
    padding: 100px 10%;
    position: relative;
    z-index: 1;
}

.faq-container {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.faq-item {
    background: var(--theme-card-bg-solid);
    border-radius: 15px;
    box-shadow: 0 5px 15px var(--theme-border);
    border: 1px solid var(--theme-border);
    overflow: hidden;
    transition: var(--transition);
}

.faq-question {
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-weight: 600;
    color: var(--theme-text-title);
    font-size: 1.1rem;
    user-select: none;
    transition: var(--transition);
}

.faq-question:hover {
    color: var(--primary);
}

.faq-question i {
    color: var(--primary);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--theme-text-muted);
    line-height: 1.6;
    font-size: 0.95rem;
}

.faq-answer p {
    padding: 0 2rem 1.5rem 2rem;
}

.faq-item.active .faq-answer {
    max-height: 200px; /* Will be smoothly transitioned in JS */
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
}

.faq-item.active {
    border-color: rgba(0, 194, 232, 0.2);
    box-shadow: 0 10px 25px rgba(0, 194, 232, 0.05);
}

/* --- Theme Toggle Switch --- */
.theme-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    cursor: pointer;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: var(--transition);
}

.theme-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(0, 194, 232, 0.4);
    transform: scale(1.05);
}

body.dark-theme .theme-btn {
    background: rgba(0, 194, 232, 0.1);
    border-color: rgba(0, 194, 232, 0.3);
    color: var(--primary);
}

/* Hide moon in light, sun in dark */
.theme-btn .moon-icon {
    display: none;
}

body.dark-theme .theme-btn .moon-icon {
    display: block;
}

body.dark-theme .theme-btn .sun-icon {
    display: none;
}

/* --- WhatsApp Floating Button --- */
.whatsapp-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #25d366;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 10px 25px rgba(37, 211, 102, 0.4);
    z-index: 1000;
    transition: var(--transition);
}

.whatsapp-btn:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 15px 30px rgba(37, 211, 102, 0.6);
}

#valores {
    background: var(--theme-bg-alt) !important;
}


