/* =========================================
   VARIABLES GLOBALES CSS (Premium Dark Theme)
   ========================================= */
:root {
    /* Colores Principales */
    --bg-main: #0a0b10;          /* Background Ultra Oscuro */
    --bg-secondary: #13151e;     /* Tarjetas / Secciones Alternas */
    --bg-tertiary: #1a1c29;      /* Hover states */
    
    /* Gradientes Vibrant */
    --gradient-primary: linear-gradient(135deg, #6366f1 0%, #a855f7 50%, #ec4899 100%);
    --gradient-secondary: linear-gradient(135deg, #38bdf8 0%, #6366f1 100%);
    
    /* Brand Colors Solidos */
    --primary: #6366f1;          /* Indigo 500 */
    --primary-hover: #4f46e5;    /* Indigo 600 */
    --accent: #ec4899;           /* Pink 500 */
    --accent-hover: #db2777;     /* Pink 600 */
    --success: #10b981;          /* Emerald */
    --warning: #f59e0b;          /* Amber */

    /* Textos */
    --text-pure: #ffffff;
    --text-main: #f3f4f6;        /* Gray 100 */
    --text-muted: #9ca3af;       /* Gray 400 */
    --text-dark: #cbd5e1;        /* Slate 300 */

    /* Bordes y Sombras */
    --border-light: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.15);
    --shadow-soft: 0 4px 20px -2px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 25px rgba(99, 102, 241, 0.3);

    /* Tipografía */
    --font-main: 'Inter', system-ui, -apple-system, sans-serif;
    
    /* Espaciados Base */
    --section-padding: 6rem;
    --container-width: 1200px;
    
    /* Transiciones */
    --transition-fast: 0.2s ease-in-out;
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* =========================================
   RESETS BASICOS
   ========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-normal);
}

ul, ol {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button, input, textarea {
    font-family: var(--font-main);
    outline: none;
}

/* =========================================
   UTILIDADES
   ========================================= */
.container {
    width: 90%;
    max-width: var(--container-width);
    margin: 0 auto;
}

.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

/* Botones */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 1.8rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition-normal);
    border: none;
    font-size: 1rem;
    gap: 0.5rem;
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--text-pure);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.25);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: var(--gradient-secondary);
    z-index: -1;
    transition: opacity var(--transition-normal);
    opacity: 0;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.btn-primary:hover::before {
    opacity: 1;
}

.btn-outline {
    background: transparent;
    color: var(--text-main);
    border: 1px solid var(--border-light);
}

.btn-outline:hover {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
    transform: translateY(-2px);
}

/* Secciones Titulos */
.section-header {
    margin-bottom: 4rem;
    text-align: center;
}

.section-subtitle {
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 1rem;
    display: block;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-pure);
    line-height: 1.2;
    margin-bottom: 1rem;
}

.section-desc {
    color: var(--text-muted);
    font-size: 1.125rem;
    max-width: 700px;
    margin: 0 auto;
}

/* Animaciones On Scroll (usadas en JS) */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

.delay-100 { transition-delay: 100ms; }
.delay-200 { transition-delay: 200ms; }
.delay-300 { transition-delay: 300ms; }

/* =========================================
   TOP BAR
   ========================================= */
.top-bar {
    background-color: rgba(10, 11, 16, 0.95);
    border-bottom: 1px solid var(--border-light);
    font-size: 0.875rem;
    padding: 0.5rem 0;
    color: var(--text-muted);
    display: none; /* Ocultar en moviles por defecto, mostrar desktop */
}

@media (min-width: 992px) {
    .top-bar {
        display: block;
    }
}

.top-bar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-contact a {
    margin-right: 1.5rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.top-contact a:hover {
    color: var(--primary);
}

.top-contact i {
    font-size: 1.1rem;
    color: var(--primary);
}

.top-social {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.top-social span {
    margin-right: 0.5rem;
}

.top-social a {
    color: var(--text-muted);
    font-size: 1.2rem;
}

.top-social a:hover {
    color: var(--primary);
}

/* =========================================
   HEADER & NAVIGATION
   ========================================= */
.main-header {
    background-color: rgba(10, 11, 16, 0.85); /* Glassmorphism */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-light);
    position: sticky;
    top: 0;
    width: 100%;
    z-index: 1000;
    transition: all var(--transition-normal);
    padding: 1.2rem 0;
}

.main-header.scrolled {
    padding: 0.8rem 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border-bottom: 1px solid transparent;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    z-index: 1001; /* Sobre menu overlay */
}

.logo-text {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text-pure);
    letter-spacing: -0.5px;
}

/* Desktop Nav */
.desktop-nav {
    display: none;
}

@media (min-width: 992px) {
    .desktop-nav {
         display: block;
    }
}

.nav-list {
    display: flex;
    gap: 2rem;
}

.nav-link {
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-main);
    position: relative;
    padding: 0.5rem 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0%;
    height: 2px;
    background: var(--gradient-primary);
    transition: var(--transition-normal);
}

.nav-link:hover {
    color: var(--text-pure);
}

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

/* CTA Header Desktop */
.header-cta {
    display: none;
}
@media (min-width: 992px) {
    .header-cta {
        display: block;
    }
}

/* Boton Movil */
.mobile-menu-btn {
    display: flex;
    background: transparent;
    border: none;
    color: var(--text-pure);
    font-size: 2rem;
    cursor: pointer;
    z-index: 1001;
}

@media (min-width: 992px) {
    .mobile-menu-btn {
        display: none;
    }
}

/* =========================================
   MOBILE OVERLAY MENU
   ========================================= */
.mobile-nav-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100vh;
    background-color: var(--bg-main);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease-in-out;
    transform: translateY(-10px);
}

.mobile-nav-overlay.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.close-menu-btn {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 2.5rem;
    cursor: pointer;
    transition: color var(--transition-fast);
}

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

.mobile-nav-list {
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.mobile-link {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-pure);
    display: inline-block;
    position: relative;
}

.mobile-link:hover {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* =========================================
   HERO SECTION
   ========================================= */
.hero {
    position: relative;
    padding: 8rem 0 6rem 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    min-height: 90vh;
}

/* Elementos de fondo decorativos Premium (Glows abstractos) */
.hero::before {
    content: '';
    position: absolute;
    top: -10%; left: -10%;
    width: 50%; height: 50%;
    background: radial-gradient(circle, rgba(99,102,241,0.15) 0%, rgba(10,11,16,0) 70%);
    border-radius: 50%;
    z-index: 0;
    filter: blur(60px);
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -10%; right: -5%;
    width: 40%; height: 40%;
    background: radial-gradient(circle, rgba(236,72,153,0.15) 0%, rgba(10,11,16,0) 70%);
    border-radius: 50%;
    z-index: 0;
    filter: blur(60px);
}

.hero-inner {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr;
    gap: 4rem;
    align-items: center;
}

@media (min-width: 992px) {
    .hero-inner {
        grid-template-columns: 1fr 1fr; /* Dividimos en dos columnas desktop */
    }
}

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

@media (min-width: 992px) {
    .hero-content {
        text-align: left;
    }
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 1rem;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 50px;
    color: var(--primary);
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.hero-badge i {
    font-size: 1.1rem;
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.1;
    color: var(--text-pure);
    margin-bottom: 1.5rem;
}

@media (min-width: 992px) {
    .hero-title {
        font-size: 4rem;
    }
}

.hero-desc {
    font-size: 1.125rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

@media (min-width: 992px) {
    .hero-desc {
        font-size: 1.25rem;
        margin-left: 0;
        margin-right: 0;
    }
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

@media (min-width: 992px) {
    .hero-actions {
        justify-content: flex-start;
    }
}

/* Gráfico ilustrativo a la derecha, de tipo abstract/tech */
.hero-visual {
    position: relative;
    border-radius: 24px;
    padding: 1rem;
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--border-light);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transform: perspective(1000px) rotateY(-5deg); /* Efecto 3D sutil */
    transition: transform 0.5s ease;
}

.hero-visual:hover {
    transform: perspective(1000px) rotateY(0deg);
}

.hero-img {
    border-radius: 16px;
    display: block;
    width: 100%;
}

/* Badge flotante animado */
.floating-badge {
    position: absolute;
    bottom: -20px;
    left: -20px;
    background: rgba(19, 21, 30, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-light);
    padding: 1rem 1.5rem;
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: var(--shadow-soft);
    animation: float 4s ease-in-out infinite;
}

.fb-icon {
    width: 45px; height: 45px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem; color: #fff;
}

.fb-text strong {
    display: block; color: var(--text-pure); font-size: 1.1rem;
}
.fb-text span {
    color: var(--text-muted); font-size: 0.8rem; text-transform: uppercase;
}

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


/* =========================================
   SECCIÓN SERVICIOS
   ========================================= */
.services-section {
    padding: var(--section-padding) 0;
    background-color: var(--bg-main);
    position: relative;
    border-top: 1px solid var(--border-light);
}

.services-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 768px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.service-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: 20px;
    padding: 2.5rem 2rem;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

/* Efecto glow interno */
.service-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(800px circle at var(--mouse-x, 50%) var(--mouse-y, -20%), rgba(99,102,241,0.06), transparent 40%);
    z-index: -1;
    opacity: 0;
    transition: opacity 0.5s;
}

.service-card:hover {
    transform: translateY(-5px);
    border-color: rgba(99, 102, 241, 0.4);
    box-shadow: 0 10px 40px -10px rgba(99, 102, 241, 0.15);
}

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

.service-icon {
    width: 60px;
    height: 60px;
    border-radius: 14px;
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(99, 102, 241, 0.2);
    transition: var(--transition-normal);
}

.service-card:hover .service-icon {
    background: var(--gradient-primary);
    color: #fff;
    transform: scale(1.05) rotate(-5deg);
    border-color: transparent;
}

.service-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-pure);
    margin-bottom: 1rem;
}

.service-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.service-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary);
    font-weight: 600;
    font-size: 0.9rem;
}

.service-link i {
    transition: transform var(--transition-fast);
}

.service-link:hover i {
    transform: translateX(5px);
}

/* =========================================
   SECCIÓN FAQ (Acordeón)
   ========================================= */
.faq-section {
    padding: var(--section-padding) 0;
    background-color: var(--bg-secondary);
    border-top: 1px solid var(--border-light);
}

.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: var(--bg-main);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    margin-bottom: 1rem;
    overflow: hidden;
    transition: border-color var(--transition-fast);
}

.faq-item:hover {
    border-color: rgba(255, 255, 255, 0.2);
}

.faq-item.active {
    border-color: var(--primary);
}

.faq-header {
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    background: transparent;
    border: none;
    width: 100%;
    color: var(--text-pure);
    font-size: 1.1rem;
    font-weight: 600;
    font-family: var(--font-main);
    text-align: left;
}

.faq-header i {
    color: var(--primary);
    font-size: 1.25rem;
}

.faq-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.faq-item.active .faq-body {
    max-height: 500px; /* Suficiente para el texto */
}

.faq-content {
    padding: 0 1.5rem 1.5rem 1.5rem;
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* =========================================
   FOOTER
   ========================================= */
.main-footer {
    background-color: #050508;
    padding-top: 5rem;
    border-top: 1px solid var(--border-light);
}

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

@media (min-width: 768px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .footer-grid {
        grid-template-columns: 2fr 1fr 1fr 1.5fr;
        gap: 2rem;
    }
}

.about-col .logo-footer {
    display: inline-block;
    margin-bottom: 1.5rem;
}

.footer-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 2rem;
}

.footer-social {
    display: flex;
    gap: 1rem;
}

.social-icon {
    width: 40px; height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.05);
    display: flex; align-items: center; justify-content: center;
    color: var(--text-pure);
    font-size: 1.2rem;
    transition: all var(--transition-fast);
}

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

.footer-heading {
    color: var(--text-pure);
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

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

.footer-link {
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.95rem;
}

.footer-link i {
    color: var(--primary);
    font-size: 0.8rem;
    transition: transform var(--transition-fast);
}

.footer-link:hover {
    color: var(--text-pure);
    transform: translateX(5px);
}

.contact-info li {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    color: var(--text-muted);
    margin-bottom: 1.2rem;
    font-size: 0.95rem;
}

.contact-info i {
    color: var(--primary);
    font-size: 1.2rem;
    margin-top: 0.2rem;
}

.footer-bottom {
    border-top: 1px solid var(--border-light);
    padding: 1.5rem 0;
    background: rgba(0,0,0,0.2);
}

.footer-bottom-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
}

@media (min-width: 768px) {
    .footer-bottom-inner {
        flex-direction: row;
        justify-content: space-between;
    }
}

.copyright {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.legal-links {
    display: flex;
    gap: 1.5rem;
}

.legal-links a {
    color: var(--text-muted);
    font-size: 0.85rem;
}

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