/* ============================================
   ONCOLOGIA - Animations & Effects System
   ============================================ */

/* ============================================
   KEYFRAMES
   ============================================ */

/* Fade Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Scale Animations */
@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes scaleInBounce {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.95);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Glitch Effect */
@keyframes glitch {
    0% {
        text-shadow: 0.05em 0 0 #00fffc, -0.03em -0.04em 0 #fc00ff,
                     0.025em 0.04em 0 #fffc00;
    }
    15% {
        text-shadow: 0.05em 0 0 #00fffc, -0.03em -0.04em 0 #fc00ff,
                     0.025em 0.04em 0 #fffc00;
    }
    16% {
        text-shadow: -0.05em -0.025em 0 #00fffc, 0.025em 0.035em 0 #fc00ff,
                     -0.05em -0.05em 0 #fffc00;
    }
    49% {
        text-shadow: -0.05em -0.025em 0 #00fffc, 0.025em 0.035em 0 #fc00ff,
                     -0.05em -0.05em 0 #fffc00;
    }
    50% {
        text-shadow: 0.05em 0.035em 0 #00fffc, 0.03em 0 0 #fc00ff,
                     0 -0.04em 0 #fffc00;
    }
    99% {
        text-shadow: 0.05em 0.035em 0 #00fffc, 0.03em 0 0 #fc00ff,
                     0 -0.04em 0 #fffc00;
    }
    100% {
        text-shadow: -0.05em 0 0 #00fffc, -0.025em -0.04em 0 #fc00ff,
                     -0.04em -0.025em 0 #fffc00;
    }
}

/* Typing Effect */
@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blink-caret {
    from, to { border-color: transparent; }
    50% { border-color: #00d4ff; }
}

/* Float Animation */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

@keyframes floatSlow {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-10px) rotate(2deg);
    }
}

/* Pulse & Glow */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes pulseGlow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(0, 212, 255, 0.5),
                    0 0 10px rgba(0, 212, 255, 0.3),
                    0 0 15px rgba(0, 212, 255, 0.2);
    }
    50% {
        box-shadow: 0 0 10px rgba(0, 212, 255, 0.8),
                    0 0 20px rgba(0, 212, 255, 0.5),
                    0 0 30px rgba(0, 212, 255, 0.3);
    }
}

@keyframes pulseGlowText {
    0%, 100% {
        text-shadow: 0 0 5px rgba(0, 212, 255, 0.5),
                     0 0 10px rgba(0, 212, 255, 0.3);
    }
    50% {
        text-shadow: 0 0 10px rgba(0, 212, 255, 0.8),
                     0 0 20px rgba(0, 212, 255, 0.5),
                     0 0 30px rgba(0, 212, 255, 0.3);
    }
}

/* Scan Line */
@keyframes scanLine {
    0% {
        top: 0%;
    }
    100% {
        top: 100%;
    }
}

/* Ripple Effect */
@keyframes ripple {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    100% {
        transform: scale(4);
        opacity: 0;
    }
}

/* Draw Line */
@keyframes drawLine {
    from {
        stroke-dashoffset: 1000;
    }
    to {
        stroke-dashoffset: 0;
    }
}

@keyframes drawLineVertical {
    from {
        height: 0;
    }
    to {
        height: 100%;
    }
}

/* Counter Roll */
@keyframes counterRoll {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

/* Particle Float */
@keyframes particleFloat {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
        opacity: 0.5;
    }
    25% {
        transform: translate(10px, -10px) rotate(90deg);
        opacity: 1;
    }
    50% {
        transform: translate(0, -20px) rotate(180deg);
        opacity: 0.5;
    }
    75% {
        transform: translate(-10px, -10px) rotate(270deg);
        opacity: 1;
    }
}

/* Rotate */
@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes rotateSlow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Shine Effect */
@keyframes shine {
    0% {
        left: -100%;
    }
    50%, 100% {
        left: 100%;
    }
}

/* Slide In */
@keyframes slideInFromLeft {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInFromRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* DNA Helix */
@keyframes helixRotate {
    0% {
        transform: rotateY(0deg);
    }
    100% {
        transform: rotateY(360deg);
    }
}

@keyframes nodeGlow {
    0%, 100% {
        box-shadow: 0 0 5px currentColor;
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 15px currentColor, 0 0 25px currentColor;
        transform: scale(1.1);
    }
}

/* Data Stream */
@keyframes dataStream {
    0% {
        transform: translateY(-100%);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(100vh);
        opacity: 0;
    }
}

/* Border Animation */
@keyframes borderGlow {
    0%, 100% {
        border-color: rgba(0, 212, 255, 0.3);
    }
    50% {
        border-color: rgba(0, 212, 255, 0.8);
    }
}

/* Progress Fill */
@keyframes progressFill {
    from {
        width: 0%;
    }
}

/* Matrix Rain (for text) */
@keyframes matrixFade {
    0% {
        opacity: 0;
        transform: translateY(-20px);
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: translateY(20px);
    }
}

/* ============================================
   SCROLL REVEAL CLASSES
   ============================================ */

.scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

.scroll-reveal-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.scroll-reveal-left.revealed {
    opacity: 1;
    transform: translateX(0);
}

.scroll-reveal-right {
    opacity: 0;
    transform: translateX(50px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.scroll-reveal-right.revealed {
    opacity: 1;
    transform: translateX(0);
}

.scroll-reveal-scale {
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.scroll-reveal-scale.revealed {
    opacity: 1;
    transform: scale(1);
}

/* Stagger Delays */
.stagger-1 { transition-delay: 0.1s !important; }
.stagger-2 { transition-delay: 0.2s !important; }
.stagger-3 { transition-delay: 0.3s !important; }
.stagger-4 { transition-delay: 0.4s !important; }
.stagger-5 { transition-delay: 0.5s !important; }
.stagger-6 { transition-delay: 0.6s !important; }
.stagger-7 { transition-delay: 0.7s !important; }
.stagger-8 { transition-delay: 0.8s !important; }
.stagger-9 { transition-delay: 0.9s !important; }
.stagger-10 { transition-delay: 1.0s !important; }

/* ============================================
   ANIMATION UTILITY CLASSES
   ============================================ */

/* Float */
.animate-float {
    animation: float 6s ease-in-out infinite;
}

.animate-float-slow {
    animation: floatSlow 8s ease-in-out infinite;
}

/* Pulse */
.animate-pulse-glow {
    animation: pulseGlow 2s ease-in-out infinite;
}

.animate-pulse-text {
    animation: pulseGlowText 2s ease-in-out infinite;
}

/* Rotate */
.animate-rotate {
    animation: rotate 20s linear infinite;
}

.animate-rotate-slow {
    animation: rotateSlow 40s linear infinite;
}

/* Glitch */
.animate-glitch {
    animation: glitch 1s linear infinite;
}

.animate-glitch-hover:hover {
    animation: glitch 0.3s linear infinite;
}

/* ============================================
   HOVER EFFECTS
   ============================================ */

/* Card Lift */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* Card Glow */
.hover-glow {
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.hover-glow:hover {
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.3),
                0 0 40px rgba(0, 212, 255, 0.1);
    border-color: rgba(0, 212, 255, 0.5);
}

/* Link Underline */
.hover-underline {
    position: relative;
}

.hover-underline::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: linear-gradient(90deg, #00d4ff, #00ff88);
    transition: width 0.3s ease;
}

.hover-underline:hover::after {
    width: 100%;
}

/* Shine Effect */
.hover-shine {
    position: relative;
    overflow: hidden;
}

.hover-shine::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.1),
        transparent
    );
    transition: left 0.5s ease;
}

.hover-shine:hover::before {
    left: 100%;
}

/* Scale */
.hover-scale {
    transition: transform 0.3s ease;
}

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

/* ============================================
   BUTTON EFFECTS
   ============================================ */

.btn-magnetic {
    position: relative;
    transition: transform 0.2s ease;
}

.btn-ripple {
    position: relative;
    overflow: hidden;
}

.btn-ripple .ripple-effect {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: scale(0);
    animation: ripple 0.6s ease-out;
    pointer-events: none;
}

/* ============================================
   CUSTOM CURSOR
   ============================================ */

.custom-cursor {
    position: fixed;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(0, 212, 255, 0.8);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transition: transform 0.15s ease, width 0.2s ease, height 0.2s ease, border-color 0.2s ease;
    transform: translate(-50%, -50%);
}

.custom-cursor.cursor-hover {
    width: 40px;
    height: 40px;
    border-color: #00ff88;
    background: rgba(0, 255, 136, 0.1);
}

.custom-cursor-dot {
    position: fixed;
    width: 6px;
    height: 6px;
    background: #00d4ff;
    border-radius: 50%;
    pointer-events: none;
    z-index: 10000;
    transform: translate(-50%, -50%);
}

/* ============================================
   SCAN LINE EFFECT
   ============================================ */

.scan-line-effect {
    position: relative;
    overflow: hidden;
}

.scan-line-effect::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #00d4ff, transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.scan-line-effect:hover::after {
    opacity: 1;
    animation: scanLine 1.5s linear infinite;
}

/* ============================================
   TYPING EFFECT
   ============================================ */

.typing-effect {
    overflow: hidden;
    border-right: 2px solid #00d4ff;
    white-space: nowrap;
    animation: typing 3.5s steps(40, end), blink-caret 0.75s step-end infinite;
}

/* ============================================
   PROGRESS BARS
   ============================================ */

.progress-bar-animated {
    position: relative;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar-animated .progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #00d4ff, #00ff88);
    border-radius: 4px;
    width: 0;
    transition: width 1.5s ease-out;
}

.progress-bar-animated.animated .progress-fill {
    width: var(--progress, 0%);
}

/* ============================================
   COUNTER ANIMATION
   ============================================ */

.counter-animated {
    display: inline-block;
}

/* ============================================
   TIMELINE ANIMATION
   ============================================ */

.timeline-container {
    position: relative;
}

.timeline-line {
    position: absolute;
    left: 50%;
    top: 0;
    width: 2px;
    height: 0;
    background: linear-gradient(180deg, #00d4ff, #00ff88);
    transition: height 1s ease-out;
    transform: translateX(-50%);
}

.timeline-container.animated .timeline-line {
    height: 100%;
}

.timeline-item {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.timeline-container.animated .timeline-item {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   ACCORDION ANIMATION
   ============================================ */

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out, padding 0.4s ease-out;
}

.accordion-item.active .accordion-content {
    max-height: 500px;
}

.accordion-icon {
    transition: transform 0.3s ease;
}

.accordion-item.active .accordion-icon {
    transform: rotate(180deg);
}

/* ============================================
   HEADER SCROLL
   ============================================ */

.header-scrolled {
    background: rgba(5, 5, 5, 0.95) !important;
    backdrop-filter: blur(20px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* ============================================
   PAGE TRANSITIONS
   ============================================ */

.page-transition-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #050505;
    z-index: 10000;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.page-transition-overlay.active {
    opacity: 1;
    pointer-events: all;
}

/* ============================================
   LOADING SCREEN
   ============================================ */

.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #050505;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
}

.loading-dna {
    width: 60px;
    height: 60px;
    position: relative;
}

.loading-dna::before,
.loading-dna::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    animation: loadingDna 1.5s ease-in-out infinite;
}

.loading-dna::before {
    background: #00d4ff;
    top: 0;
    left: 0;
}

.loading-dna::after {
    background: #00ff88;
    bottom: 0;
    right: 0;
    animation-delay: 0.75s;
}

@keyframes loadingDna {
    0%, 100% {
        transform: translate(0, 0);
    }
    25% {
        transform: translate(40px, 0);
    }
    50% {
        transform: translate(40px, 40px);
    }
    75% {
        transform: translate(0, 40px);
    }
}

/* ============================================
   3D TILT EFFECT
   ============================================ */

.tilt-card {
    transform-style: preserve-3d;
    transition: transform 0.1s ease;
}

.tilt-card-inner {
    transform: translateZ(20px);
}

/* ============================================
   FLIP CARD
   ============================================ */

.flip-card {
    perspective: 1000px;
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.8s;
    transform-style: preserve-3d;
}

.flip-card:hover .flip-card-inner {
    transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
}

.flip-card-back {
    transform: rotateY(180deg);
}

/* ============================================
   HERO 3D CANVAS BACKGROUND
   ============================================ */

[data-hero-3d] {
    position: relative;
    isolation: isolate;
}

.hero-bg-container {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
}

#hero-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

/* Gradient overlays for readability */
.hero-gradient-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.hero-gradient-overlay-bottom {
    background: linear-gradient(to bottom, transparent 0%, transparent 60%, rgba(5, 5, 5, 0.8) 100%);
}

.hero-gradient-overlay-vignette {
    background: radial-gradient(circle at 50% 50%, transparent 0%, rgba(5, 5, 5, 0.4) 70%);
}

.hero-gradient-overlay-left {
    background: linear-gradient(to right, rgba(5, 5, 5, 0.6) 0%, transparent 50%);
}

/* Fallback image (hidden when canvas is active) */
.hero-fallback-image {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0.4;
    mix-blend-mode: screen;
    transition: opacity 0.5s ease;
}

[data-hero-3d] .hero-fallback-image {
    opacity: 0;
}

/* ============================================
   MOLECULAR VISUALIZATION (plataforma page)
   ============================================ */

[data-molecular-visualization] {
    position: relative;
    overflow: visible;
}

.molecular-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

/* Ensure content is above the canvas */
[data-molecular-visualization] > *:not(.molecular-canvas) {
    position: relative;
    z-index: 1;
}

/* ============================================
   DNA ANALYSIS BOX (descubrimiento page)
   ============================================ */

[data-dna-analysis] {
    position: relative;
    overflow: hidden;
}

/* Scanning line effect */
.analysis-scan-line {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(0, 212, 255, 0.8), transparent);
    animation: analysisScan 3s ease-in-out infinite;
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.5);
}

@keyframes analysisScan {
    0%, 100% { top: 0; opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { top: 100%; opacity: 0; }
}

/* Particles canvas */
.analysis-particles-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

/* Icon pulse effect */
.analysis-icon-pulse {
    animation: iconPulse 2s ease-in-out infinite;
}

@keyframes iconPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(0, 212, 255, 0.4);
        border-color: rgba(255, 255, 255, 0.1);
    }
    50% {
        box-shadow: 0 0 20px 5px rgba(0, 212, 255, 0.2);
        border-color: rgba(0, 212, 255, 0.3);
    }
}

/* Progress bar animation */
.analysis-progress-bar {
    animation: progressFill 2s ease-out forwards;
    animation-delay: 0.5s;
}

@keyframes progressFill {
    0% { width: 0%; }
    100% { width: 85%; }
}

/* Glow pulse for analysis core */
.analysis-glow-pulse {
    animation: glowPulse 2s ease-in-out infinite;
}

@keyframes glowPulse {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.1); }
}

/* Rotating ring */
.analysis-rotate {
    animation: rotateRing 8s linear infinite;
}

.analysis-rotate-reverse {
    animation: rotateRing 12s linear infinite reverse;
}

@keyframes rotateRing {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Icon glow */
.analysis-icon-glow {
    animation: iconGlow 1.5s ease-in-out infinite;
    color: rgba(0, 212, 255, 0.8);
    filter: drop-shadow(0 0 10px rgba(0, 212, 255, 0.5));
}

@keyframes iconGlow {
    0%, 100% {
        filter: drop-shadow(0 0 10px rgba(0, 212, 255, 0.5));
        color: rgba(0, 212, 255, 0.8);
    }
    50% {
        filter: drop-shadow(0 0 20px rgba(0, 212, 255, 0.8));
        color: rgba(0, 212, 255, 1);
    }
}

/* Animated dots */
.analysis-dots div {
    animation: dotPulse 1.5s ease-in-out infinite;
}

.analysis-dots div:nth-child(1) { animation-delay: 0s; }
.analysis-dots div:nth-child(2) { animation-delay: 0.2s; }
.analysis-dots div:nth-child(3) { animation-delay: 0.4s; }

@keyframes dotPulse {
    0%, 100% { transform: scale(1); opacity: 0.4; }
    50% { transform: scale(1.5); opacity: 1; }
}

/* Status text animation */
.analysis-status {
    animation: statusBlink 1s steps(1) infinite;
}

@keyframes statusBlink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0.3; }
}

/* Result bar animation */
.analysis-result-bar {
    animation: resultFill 1.5s ease-out forwards;
    animation-delay: 2s;
}

@keyframes resultFill {
    0% { width: 0%; }
    100% { width: 98%; }
}

/* Validated checkmark fade-in */
.analysis-validated {
    animation: fadeInValidated 0.5s ease-out forwards;
    animation-delay: 3.5s;
}

@keyframes fadeInValidated {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Result text reveal */
.analysis-result-text {
    animation: textReveal 0.8s ease-out forwards;
    animation-delay: 2.5s;
    opacity: 0;
}

@keyframes textReveal {
    from { opacity: 0; transform: translateX(-10px); }
    to { opacity: 1; transform: translateX(0); }
}

/* ============================================
   REDUCED MOTION
   ============================================ */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .scroll-reveal,
    .scroll-reveal-left,
    .scroll-reveal-right,
    .scroll-reveal-scale {
        opacity: 1;
        transform: none;
    }

    /* Show fallback image when animations are reduced */
    #hero-canvas {
        opacity: 0.2;
    }

    [data-hero-3d] .hero-fallback-image {
        opacity: 0.3;
    }

    .molecular-canvas {
        opacity: 0.3;
    }
}

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */

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

    .hover-lift:hover {
        transform: translateY(-4px);
    }
}

/* ============================================
   MANTRA SECTION ANIMATIONS
   ============================================ */

/* Mantra Container */
[data-mantra-section] {
    position: relative;
}

/* Mantra Lines */
.mantra-line {
    opacity: 0;
    transform: translateY(60px);
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.mantra-line.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Third line starts more transparent */
.mantra-line-ia {
    color: rgba(255, 255, 255, 0.25);
}

.mantra-line-ia.revealed {
    animation: mantraFadeIntense 1.5s ease-out forwards;
    animation-delay: 0.5s;
}

@keyframes mantraFadeIntense {
    0% { color: rgba(255, 255, 255, 0.25); }
    50% { color: rgba(255, 255, 255, 0.5); }
    100% { color: rgba(255, 255, 255, 0.35); }
}

/* Highlight Effect for "genética" */
.mantra-highlight {
    position: relative;
    display: inline-block;
}

.mantra-highlight::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 4px;
    background: linear-gradient(90deg, #00d4ff, #00ff88);
    transition: width 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transition-delay: 0.3s;
}

.mantra-line.revealed .mantra-highlight::after {
    width: 100%;
}

.mantra-highlight:hover {
    text-shadow: 0 0 30px rgba(0, 212, 255, 0.5);
}

/* Target Circle Effect */
.mantra-target-wrapper {
    position: relative;
    display: inline-block;
}

.mantra-target-circle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 60px;
    height: 60px;
    border: 2px solid #00d4ff;
    border-radius: 50%;
    opacity: 0;
    pointer-events: none;
    transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1),
                opacity 0.4s ease;
}

.mantra-target-circle::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background: #00d4ff;
    border-radius: 50%;
    box-shadow: 0 0 10px #00d4ff, 0 0 20px #00d4ff;
}

.mantra-target-circle::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 1px solid rgba(0, 212, 255, 0.4);
    border-radius: 50%;
}

.mantra-line.revealed .mantra-target-circle {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
    animation: targetPulse 2s ease-in-out infinite;
    animation-delay: 0.8s;
}

@keyframes targetPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(0, 212, 255, 0.4);
    }
    50% {
        box-shadow: 0 0 0 15px rgba(0, 212, 255, 0);
    }
}

/* IA Text Special Effect */
.mantra-ia-text {
    color: #00d4ff;
    position: relative;
    display: inline-block;
    text-shadow: 0 0 20px rgba(0, 212, 255, 0.6);
}

.mantra-line.revealed .mantra-ia-text {
    animation: iaGlow 2s ease-in-out infinite;
}

@keyframes iaGlow {
    0%, 100% {
        text-shadow: 0 0 20px rgba(0, 212, 255, 0.6),
                     0 0 40px rgba(0, 212, 255, 0.3);
        filter: brightness(1);
    }
    50% {
        text-shadow: 0 0 30px rgba(0, 212, 255, 0.9),
                     0 0 60px rgba(0, 212, 255, 0.5),
                     0 0 80px rgba(0, 212, 255, 0.3);
        filter: brightness(1.2);
    }
}

/* Floating Particles */
.mantra-particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(0, 212, 255, 0.6);
    border-radius: 50%;
    animation: mantraParticleFloat 8s ease-in-out infinite;
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
}

.mantra-particle:nth-child(1) {
    top: 20%;
    left: 10%;
    animation-delay: 0s;
    animation-duration: 7s;
}

.mantra-particle:nth-child(2) {
    top: 60%;
    left: 85%;
    animation-delay: 1.5s;
    animation-duration: 9s;
}

.mantra-particle:nth-child(3) {
    top: 80%;
    left: 20%;
    animation-delay: 3s;
    animation-duration: 6s;
}

.mantra-particle:nth-child(4) {
    top: 30%;
    left: 70%;
    animation-delay: 2s;
    animation-duration: 8s;
}

.mantra-particle:nth-child(5) {
    top: 70%;
    left: 50%;
    animation-delay: 4s;
    animation-duration: 10s;
}

@keyframes mantraParticleFloat {
    0%, 100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.3;
    }
    25% {
        transform: translate(30px, -40px) scale(1.5);
        opacity: 0.8;
    }
    50% {
        transform: translate(-20px, -80px) scale(1);
        opacity: 0.5;
    }
    75% {
        transform: translate(40px, -40px) scale(1.2);
        opacity: 0.7;
    }
}

/* DNA Icon Decoration */
.mantra-dna-icon {
    animation: dnaIconPulse 3s ease-in-out infinite;
}

@keyframes dnaIconPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.3);
    }
    50% {
        transform: scale(1.3);
        box-shadow: 0 0 20px 5px rgba(0, 212, 255, 0.3);
    }
}

/* Responsive adjustments for mantra */
@media (max-width: 768px) {
    .mantra-target-circle {
        width: 40px;
        height: 40px;
    }

    .mantra-target-circle::after {
        width: 28px;
        height: 28px;
    }

    .mantra-particle {
        display: none;
    }
}
