/* =====================================================
   WOW EFFECTS - Premium Visual Experience
   ===================================================== */

/* =====================================================
   UNIFIED HEADER - Consistent across all pages
   ===================================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 99999;
    background: rgba(11, 11, 11, 0.95) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 1rem 0;
}

.header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.header .logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: #7B78FF !important;
    text-decoration: none;
    letter-spacing: -0.02em;
}

.header .nav {
    display: flex;
    gap: 2rem;
}

.header .nav-link {
    color: #8A8A85 !important;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

.header .nav-link:hover,
.header .nav-link.active {
    color: #F5F5F0 !important;
}

.header .language-selector {
    position: relative;
    z-index: 100000;
}

.header .lang-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    color: #8A8A85;
    transition: color 0.3s ease;
}

.header .lang-btn:hover {
    color: #F5F5F0;
}

.header .globe-icon {
    width: 20px;
    height: 20px;
}

.header .lang-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 180px;
    background: rgba(12, 12, 15, 0.98) !important;
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border: 1px solid rgba(94, 90, 255, 0.3) !important;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8) !important;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.3s ease;
    z-index: 100001;
    display: block !important;
    /* Ensure it's not hidden by display:none */
}

.header .lang-dropdown.active {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
}

/* =====================================================
   UNIFIED BODY - Consistent dark theme
   ===================================================== */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: #0B0B0B !important;
    color: #F5F5F0;
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    height: auto !important;
    display: flex;
    flex-direction: column;
    margin: 0 !important;
    padding: 0 !important;
}

html {
    height: auto !important;
}

.footer {
    margin-top: auto !important;
}

/* Loading Screen */
.loading {
    position: fixed;
    inset: 0;
    background: #0B0B0B;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loading.hidden {
    opacity: 0;
    visibility: hidden;
}

.loading-text {
    font-size: 1.5rem;
    font-weight: 300;
    letter-spacing: 0.3em;
    color: #8A8A85;
}

/* Visual Thread - decorative line */
.visual-thread {
    position: fixed;
    top: 0;
    left: 50%;
    width: 1px;
    height: 100vh;
    background: linear-gradient(to bottom, transparent, rgba(123, 120, 255, 0.1), transparent);
    pointer-events: none;
    z-index: 0;
}

/* Page Header - unified style for all interior pages */
.page-header {
    padding: 10rem 0 4rem;
    text-align: center;
    background: linear-gradient(180deg, rgba(123, 120, 255, 0.03) 0%, transparent 100%);
    position: relative;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at top, rgba(123, 120, 255, 0.05), transparent 70%);
    pointer-events: none;
}

.page-title {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    color: #F5F5F0;
    margin-bottom: 1rem;
    position: relative;
}

.page-subtitle {
    font-size: 1.1rem;
    color: #8A8A85;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.7;
    position: relative;
}

/* Pricing Section background */
.pricing-section,
.faq-section {
    background: transparent;
    padding: 4rem 0;
    position: relative;
}

/* Custom Cursor */
.cursor-dot {
    position: fixed;
    top: 0;
    left: 0;
    width: 8px;
    height: 8px;
    background: linear-gradient(135deg, #7B78FF, #9333ea);
    border-radius: 50%;
    pointer-events: none;
    z-index: 99999;
    transform: translate(-50%, -50%);
    transition: transform 0.1s ease, width 0.2s ease, height 0.2s ease, opacity 0.2s ease;
    box-shadow: 0 0 15px rgba(147, 51, 234, 0.8), 0 0 30px rgba(147, 51, 234, 0.4);
}

.cursor-ring {
    position: fixed;
    top: 0;
    left: 0;
    width: 40px;
    height: 40px;
    border: 2px solid rgba(147, 51, 234, 0.5);
    border-radius: 50%;
    pointer-events: none;
    z-index: 99998;
    transform: translate(-50%, -50%);
    transition: transform 0.15s ease-out, width 0.3s ease, height 0.3s ease, border-color 0.3s ease;
}

/* Cursor states */
.cursor-hover .cursor-dot {
    transform: translate(-50%, -50%) scale(2);
    background: linear-gradient(135deg, #9333ea, #c084fc);
}

.cursor-hover .cursor-ring {
    width: 60px;
    height: 60px;
    border-color: rgba(147, 51, 234, 0.8);
}

.cursor-click .cursor-dot {
    transform: translate(-50%, -50%) scale(0.5);
}

/* Hide on touch devices */
@media (hover: none) and (pointer: coarse) {

    .cursor-dot,
    .cursor-ring {
        display: none !important;
    }

    * {
        cursor: auto !important;
    }
}

/* Hide default cursor */
body:has(.cursor-dot) * {
    cursor: none !important;
}

/* =====================================================
   SCROLL PROGRESS BAR
   ===================================================== */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, #5E5AFF, #9333ea, #c084fc);
    z-index: 99997;
    transition: width 0.05s linear;
    box-shadow: 0 0 10px rgba(147, 51, 234, 0.8);
}

/* =====================================================
   WHATSAPP FLOATING BUTTON
   ===================================================== */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #25D366, #128C7E);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: whatsapp-pulse 2s infinite;
}

.whatsapp-float:hover {
    transform: scale(1.1) translateY(-5px);
    box-shadow: 0 8px 30px rgba(37, 211, 102, 0.6);
}

.whatsapp-float svg {
    width: 32px;
    height: 32px;
    fill: white;
}

.whatsapp-float::before {
    content: '¡Hablemos!';
    position: absolute;
    right: 70px;
    background: #fff;
    color: #333;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    transform: translateX(10px);
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.whatsapp-float:hover::before {
    opacity: 1;
    transform: translateX(0);
}

@keyframes whatsapp-pulse {

    0%,
    100% {
        box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    }

    50% {
        box-shadow: 0 4px 35px rgba(37, 211, 102, 0.7);
    }
}

/* =====================================================
   3D HOVER BUTTONS
   ===================================================== */
.btn-wow {
    position: relative;
    overflow: hidden;
    transform-style: preserve-3d;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-wow::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.btn-wow:hover::before {
    left: 100%;
}

.btn-wow:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 15px 40px rgba(147, 51, 234, 0.4);
}

/* Magnetic button effect applied via JS */
.btn-magnetic {
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* =====================================================
   REVEAL ANIMATIONS
   ===================================================== */
.reveal-up {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-up.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Ensure section headers are always visible */
.section-header,
.section-title,
.section-subtitle {
    opacity: 1 !important;
    transform: none !important;
    visibility: visible !important;
}

.reveal-left {
    opacity: 0;
    transform: translateX(-30px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-left.revealed {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(30px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-right.revealed {
    opacity: 1;
    transform: translateX(0);
}

.reveal-scale {
    opacity: 0;
    transform: scale(0.9);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-scale.revealed {
    opacity: 1;
    transform: scale(1);
}

/* Stagger delays */
.stagger-1 {
    transition-delay: 0s;
}

.stagger-2 {
    transition-delay: 0.05s;
}

.stagger-3 {
    transition-delay: 0.1s;
}

.stagger-4 {
    transition-delay: 0.15s;
}

.stagger-5 {
    transition-delay: 0.2s;
}

/* =====================================================
   FLOATING ANIMATION
   ===================================================== */
.float-animation {
    animation: float 6s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-20px);
    }
}

/* =====================================================
   TEXT ANIMATIONS
   ===================================================== */
.text-gradient-animate {
    background: linear-gradient(90deg, #fff, #9333ea, #5E5AFF, #fff);
    background-size: 300% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: text-shine 8s linear infinite;
}

@keyframes text-shine {
    0% {
        background-position: 0% 50%;
    }

    100% {
        background-position: 300% 50%;
    }
}

/* Typewriter effect */
.typewriter {
    overflow: hidden;
    border-right: 3px solid #9333ea;
    white-space: nowrap;
    animation: typing 3s steps(30) forwards, blink 0.7s step-end infinite;
}

@keyframes typing {
    from {
        width: 0;
    }

    to {
        width: 100%;
    }
}

@keyframes blink {
    50% {
        border-color: transparent;
    }
}

/* =====================================================
   CARD 3D HOVER EFFECTS
   ===================================================== */
.card-3d {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
}

.card-3d:hover {
    transform: translateY(-10px) rotateX(5deg) rotateY(-5deg);
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.3),
        0 0 60px rgba(147, 51, 234, 0.2);
}

.card-3d::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(147, 51, 234, 0.1), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.card-3d:hover::before {
    opacity: 1;
}

/* =====================================================
   GLOW EFFECTS
   ===================================================== */
.glow-text {
    text-shadow: 0 0 10px rgba(147, 51, 234, 0.5),
        0 0 20px rgba(147, 51, 234, 0.3),
        0 0 40px rgba(147, 51, 234, 0.2);
}

.glow-border {
    box-shadow: 0 0 15px rgba(147, 51, 234, 0.3),
        inset 0 0 15px rgba(147, 51, 234, 0.1);
    border: 1px solid rgba(147, 51, 234, 0.3);
}

.glow-border:hover {
    box-shadow: 0 0 25px rgba(147, 51, 234, 0.5),
        inset 0 0 25px rgba(147, 51, 234, 0.2);
    border-color: rgba(147, 51, 234, 0.6);
}

/* =====================================================
   RIPPLE EFFECT
   ===================================================== */
.ripple {
    position: relative;
    overflow: hidden;
}

.ripple-effect {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    transform: scale(0);
    animation: ripple-animation 0.6s linear;
    pointer-events: none;
}

@keyframes ripple-animation {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* =====================================================
   PARALLAX ELEMENTS
   ===================================================== */
.parallax-slow {
    will-change: transform;
}

.parallax-fast {
    will-change: transform;
}

/* =====================================================
   BACK TO TOP BUTTON
   ===================================================== */
.back-to-top {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: rgba(147, 51, 234, 0.8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: rgba(147, 51, 234, 1);
    transform: translateY(-5px);
}

.back-to-top svg {
    width: 24px;
    height: 24px;
    fill: white;
}

/* =====================================================
   LOADING ANIMATION ENHANCEMENT
   ===================================================== */
.loading-premium {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #0a0a12;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 999999;
}

.loading-premium .logo-animate {
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, #fff, #9333ea);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: logoFloat 2s ease-in-out infinite;
}

@keyframes logoFloat {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.loading-premium .loading-bar {
    width: 200px;
    height: 3px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    margin-top: 30px;
    overflow: hidden;
}

.loading-premium .loading-bar::after {
    content: '';
    display: block;
    width: 30%;
    height: 100%;
    background: linear-gradient(90deg, #5E5AFF, #9333ea);
    border-radius: 3px;
    animation: loadingBar 1.5s ease-in-out infinite;
}

@keyframes loadingBar {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(400%);
    }
}

/* =====================================================
   RESPONSIVE ADJUSTMENTS
   ===================================================== */
@media (max-width: 768px) {
    .whatsapp-float {
        bottom: 20px;
        right: 20px;
        width: 55px;
        height: 55px;
    }

    .whatsapp-float::before {
        display: none;
    }

    .back-to-top {
        bottom: 85px;
        right: 20px;
        width: 45px;
        height: 45px;
    }

    .promo-grid {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
    }

    .promo-visual {
        order: 1 !important;
    }

    .promo-content {
        order: 2 !important;
    }
}

/* =====================================================
   COMPACT SECTIONS - Reduce scroll distance
   ===================================================== */

/* Services section - more compact layout */
.services-stack {
    padding-top: 3rem !important;
    padding-bottom: 2rem !important;
}

.services-stack .section-header {
    margin-bottom: 2rem !important;
}

.service-card {
    padding: 1.5rem !important;
    margin-bottom: 1rem !important;
}

/* Process section - more compact */
.process-section {
    padding-top: 4rem !important;
    padding-bottom: 2rem !important;
    margin-top: 2rem !important;
}

.process-section .section-header {
    padding-top: 1rem !important;
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

.horizontal-scroll-wrapper {
    padding: 0 !important;
    margin-top: 1rem !important;
}

.horizontal-scroll-item {
    min-width: 280px !important;
}

.process-step {
    padding: 1.5rem !important;
}

/* Showcase section - more compact */
#showcase {
    padding-top: 2rem !important;
    padding-bottom: 1rem !important;
}

.showcase-gallery {
    padding: 1.5rem 5vw !important;
}

/* Promo sections - already good but ensure consistency */
.promo-section {
    padding: 4rem 0 !important;
}