/* Extracted from front-page.php */

/* Force Desktop Grid/Flex behavior explicitly */
@media (min-width: 900px) {
    .desktop-row-force {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 60px !important;
    }

    .desktop-col-50 {
        width: 50% !important;
        min-width: 50% !important;
        max-width: 50% !important;
        flex: 0 0 50% !important;
    }

    .desktop-col-40 {
        width: 40% !important;
        min-width: 40% !important;
        max-width: 40% !important;
        flex: 0 0 40% !important;
    }

    .desktop-col-60 {
        width: 60% !important;
        min-width: 60% !important;
        max-width: 60% !important;
        flex: 0 0 60% !important;
    }

    .desktop-text-left {
        text-align: left !important;
        align-items: flex-start !important;
    }
}

/* ============================================
   🎬 ANIMACIONES TECNOLÓGICAS CYBERPUNK
   ============================================ */

/* 1. SCROLL REVEAL ANIMATIONS */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-60px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-left.active {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(60px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-right.active {
    opacity: 1;
    transform: translateX(0);
}

.reveal-scale {
    opacity: 0;
    transform: scale(0.9);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-scale.active {
    opacity: 1;
    transform: scale(1);
}

/* 2. GLOW PULSE ANIMATION */
@keyframes glowPulse {

    0%,
    100% {
        box-shadow: 0 0 20px rgba(34, 211, 238, 0.3);
    }

    50% {
        box-shadow: 0 0 40px rgba(34, 211, 238, 0.6), 0 0 60px rgba(217, 70, 239, 0.3);
    }
}

.glow-pulse {
    animation: glowPulse 3s ease-in-out infinite;
}

@keyframes glowPulseFuchsia {

    0%,
    100% {
        box-shadow: 0 0 20px rgba(217, 70, 239, 0.3);
    }

    50% {
        box-shadow: 0 0 40px rgba(217, 70, 239, 0.6), 0 0 60px rgba(34, 211, 238, 0.3);
    }
}

.glow-pulse-fuchsia {
    animation: glowPulseFuchsia 3s ease-in-out infinite;
}

/* 3. GRADIENT SHIFT ANIMATION */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.gradient-animate {
    background: linear-gradient(270deg, #22d3ee, #d946ef, #22d3ee);
    background-size: 400% 400%;
    animation: gradientShift 8s ease infinite;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* 4. FLOATING ANIMATION */
@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-15px);
    }
}

.float {
    animation: float 4s ease-in-out infinite;
}

.float-slow {
    animation: float 6s ease-in-out infinite;
}

.float-delay-1 {
    animation-delay: 0.5s;
}

.float-delay-2 {
    animation-delay: 1s;
}

/* 5. HOVER LIFT EFFECT */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(34, 211, 238, 0.15);
}

/* 6. NEON BORDER ANIMATION */
@keyframes neonBorder {

    0%,
    100% {
        border-color: rgba(34, 211, 238, 0.5);
    }

    50% {
        border-color: rgba(217, 70, 239, 0.8);
    }
}

.neon-border {
    animation: neonBorder 3s ease-in-out infinite;
}

/* 7. TEXT SHIMMER */
@keyframes shimmer {
    0% {
        background-position: -200% center;
    }

    100% {
        background-position: 200% center;
    }
}

.text-shimmer {
    background: linear-gradient(90deg, #22d3ee, #d946ef, #22d3ee, #d946ef);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shimmer 4s linear infinite;
}

/* 8. ICON ROTATE ON HOVER */
.icon-hover-rotate:hover i {
    transform: rotate(15deg) scale(1.1);
    transition: transform 0.3s ease;
}

/* 9. CARD TILT EFFECT */
.card-tilt {
    transition: transform 0.3s ease;
    transform-style: preserve-3d;
}

.card-tilt:hover {
    transform: perspective(1000px) rotateX(3deg) rotateY(-3deg) translateY(-5px);
}

/* 10. STAGGER DELAY CLASSES */
.stagger-1 {
    transition-delay: 0.1s;
}

.stagger-2 {
    transition-delay: 0.2s;
}

.stagger-3 {
    transition-delay: 0.3s;
}

.stagger-4 {
    transition-delay: 0.4s;
}

/* 11. SCANNING LINE (Cyberpunk Effect) */
@keyframes scanLine {
    0% {
        top: -100%;
    }

    100% {
        top: 200%;
    }
}

.scan-effect::before {
    content: '';
    position: absolute;
    top: -100%;
    left: 0;
    width: 100%;
    height: 50%;
    background: linear-gradient(transparent, rgba(34, 211, 238, 0.05), transparent);
    animation: scanLine 4s linear infinite;
    pointer-events: none;
}

/* 12. BUTTON SHINE EFFECT */
@keyframes buttonShine {
    0% {
        left: -100%;
    }

    50%,
    100% {
        left: 100%;
    }
}

.btn-shine {
    position: relative;
    overflow: hidden;
}

.btn-shine::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: buttonShine 3s ease-in-out infinite;
}

/* 13. COUNTER ANIMATION HELPER */
.counter {
    display: inline-block;
}

/* 14. PARTICLE DOTS BACKGROUND */
@keyframes particleFloat {

    0%,
    100% {
        transform: translate(0, 0) rotate(0deg);
        opacity: 0.3;
    }

    25% {
        transform: translate(10px, -10px) rotate(90deg);
        opacity: 0.6;
    }

    50% {
        transform: translate(0, -20px) rotate(180deg);
        opacity: 0.3;
    }

    75% {
        transform: translate(-10px, -10px) rotate(270deg);
        opacity: 0.6;
    }
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: #22d3ee;
    border-radius: 50%;
    animation: particleFloat 8s ease-in-out infinite;
}

/* ============================================
   📱 MOBILE RESPONSIVE OVERRIDES
   ============================================ */

@media (max-width: 768px) {

    /* HERO: Reduce title size */
    .reveal-left h1,
    section h1 {
        font-size: 2.5rem !important;
        line-height: 1.2 !important;
    }

    /* STATS ROW: Stack vertically on mobile */
    .stats-row {
        flex-direction: column !important;
        gap: 2rem !important;
        padding-bottom: 2rem !important;
    }

    /* Stats items: Full width and centered */
    .stat-item {
        border-left: none !important;
        border-right: none !important;
        border-bottom: 1px solid #334155 !important;
        padding-bottom: 1.5rem !important;
        width: 100% !important;
    }

    .stat-item:last-child {
        border-bottom: none !important;
        padding-bottom: 0 !important;
    }

    .stat-item-middle {
        border-left: none !important;
        border-right: none !important;
    }

    /* Stats numbers: Smaller on mobile */
    .stat-number {
        font-size: 2.5rem !important;
    }

    /* CAREER GRID: Single column on mobile */
    .career-grid {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
    }

    /* Career items: Better spacing */
    .career-item {
        gap: 1rem !important;
    }

    /* ECOSYSTEM SECTION: Title smaller */
    .gradient-animate {
        font-size: 1.75rem !important;
    }

    /* ECOSYSTEM CARDS: Full width on mobile */
    .reveal-scale {
        min-width: 100% !important;
        max-width: 100% !important;
        flex: 1 1 100% !important;
    }

    /* Container padding: More breathing room */
    .container {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }

    /* Glass card: Less padding on mobile */
    .bg-slate-900\/80 {
        padding: 1.5rem !important;
    }

    /* Disable float animations on mobile for performance */
    .float,
    .float-slow {
        animation: none !important;
    }

    /* Reduce section padding on mobile */
    .py-24 {
        padding-top: 3rem !important;
        padding-bottom: 3rem !important;
    }

    /* Column layout: Stack on mobile */
    .lg\:w-4\/12,
    .lg\:w-8\/12,
    .desktop-col-50,
    .desktop-col-70 {
        width: 100% !important;
        min-width: 100% !important;
        max-width: 100% !important;
    }

    /* Flex row to column on mobile */
    .desktop-row-force {
        flex-direction: column !important;
        gap: 2rem !important;
    }

    /* Neon border: Disable on mobile for cleaner look */
    .neon-border {
        animation: none !important;
    }

    /* Scan effect: Disable on mobile */
    .scan-effect::before {
        display: none !important;
    }
}

@media (max-width: 480px) {

    /* Extra small screens */
    .reveal-left h1,
    section h1 {
        font-size: 2rem !important;
    }

    .stat-number {
        font-size: 2rem !important;
    }

    .gradient-animate {
        font-size: 1.5rem !important;
    }

    /* Buttons: Smaller padding */
    .btn-shine {
        padding: 0.75rem 1.5rem !important;
        font-size: 0.75rem !important;
    }

    /* Card padding: Even less on very small screens */
    .reveal-scale {
        padding: 1.5rem !important;
    }
}

/* MULTI-AGENT SECTION STYLES */
.multi-agent-section {
    position: relative;
    width: 100%;
    height: 90vh;
    min-height: 600px;
    max-height: 900px;
    overflow: hidden;
    margin: 0;
    padding: 0;
    background: #050505;
}

.orchestrator-iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    background: transparent;
}

@media (max-width: 768px) {
    .multi-agent-section {
        height: 500px !important;
        min-height: auto !important;
    }
}