/* Maticfy Framework v2.0 - Custom Styles */

/* 1. Noise Texture Overlay
   Usado en: Global utility (opcional para fondos premium) */
.noise-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 50;
    opacity: 0.05;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* 2. Scrollbar Customization
   Usado en: Global (todas las páginas) */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #0a0a0a;
}

::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Hide scrollbar for horizontal carousels
   Usado en: our-process.html, otros componentes con scroll horizontal */
.scrollbar-hide {
    -ms-overflow-style: none;
    /* IE and Edge */
    scrollbar-width: none;
    /* Firefox */
}

.scrollbar-hide::-webkit-scrollbar {
    display: none;
    /* Chrome, Safari, Opera */
}

/* Hide scrollbar utility
   Usado en: testimonials.html, partners-logos.html (marquee containers) */
.scrollbar-hide::-webkit-scrollbar {
    display: none;
}

.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* 3. Text Glow Effect
   Usado en: Global utility (títulos destacados) */
.text-glow {
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

/* 4. Glassmorphism Panels
   Usado en: home-v2.html, about.html (cards flotantes) */
.glass-panel {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.dark .glass-panel {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: none;
}

/* 5. Text Gradient
   Usado en: home-v2.html, about.html (títulos destacados) */
.text-gradient {
    background: linear-gradient(to right, #0284c7, #0ea5e9);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.dark .text-gradient {
    background: linear-gradient(to right, #ffffff, #93c5fd);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

/* 6. Marquee Animation
   Usado en: partners-logos.html, testimonials.html */
@keyframes scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

.animate-marquee {
    animation: scroll 40s linear infinite;
}

@keyframes scroll-reverse {
    0% {
        transform: translateX(-50%);
    }

    100% {
        transform: translateX(0);
    }
}

.animate-marquee-reverse {
    animation: scroll-reverse 40s linear infinite;
}

/* 7. Float Animation
   Usado en: about.html (elementos decorativos) */
@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-20px);
    }
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

/* 8. Fade In Up Animation
   Usado en: index.html (hero section) */
@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
    opacity: 0;
    transform: translateY(20px);
}

/* 9. Bounce Slow Animation
   Usado en: index.html, about.html (floating cards) */
.animate-bounce-slow {
    animation: bounce 3s infinite;
}

/* 10. Scroll Animations
   Usado en: Global (todas las páginas con scroll reveal) */
.animate-on-scroll {
    opacity: 0;
    will-change: opacity, transform;
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-up {
    transform: translateY(30px);
}

.fade-left {
    transform: translateX(-30px);
}

.fade-right {
    transform: translateX(30px);
}

.zoom-in {
    transform: scale(0.95);
}

/* Visibility State (Triggered by JS) */
.animate-on-scroll.is-visible {
    opacity: 1;
    transform: none;
}

/* 11. Staggered Delays
   Usado en: Global (animaciones escalonadas) */
.delay-100 {
    transition-delay: 100ms;
}

.delay-200 {
    transition-delay: 200ms;
}

.delay-300 {
    transition-delay: 300ms;
}

.delay-500 {
    transition-delay: 500ms;
}

/* 12. 3D Card Perspective
   Usado en: community-impact.html (tarjetas flotantes) */
.perspective-container {
    perspective: 1000px;
}

.card-3d {
    transform-style: preserve-3d;
    transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.card-3d:hover {
    transform: rotateY(5deg) rotateX(-5deg) translateZ(20px);
}

/* Sombra dinámica para efecto 3D */
.card-3d::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    opacity: 0;
    transition: opacity 0.6s ease;
    pointer-events: none;
    box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.3);
}

.card-3d:hover::after {
    opacity: 1;
}

/* 13. Number Counter Animation
   Usado en: community-impact.html, stats sections */
.counter-number {
    font-variant-numeric: tabular-nums;
    transition: transform 0.3s ease;
}

/* Pulse effect cuando el número está contando */
@keyframes pulse-scale {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

.counter-animating {
    animation: pulse-scale 0.5s ease-in-out;
}