/* ========================================
   INFRGY — Premium Animations
   ======================================== */

/* === Custom Scrollbar === */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #F1F5F9;
}
::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #1E40AF, #3B82F6);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #0B1B3D, #1E40AF);
}

/* === Text Selection === */
::selection {
    background: rgba(30, 64, 175, 0.2);
    color: #0F172A;
}

/* === Scroll Progress Bar === */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, #1E40AF, #3B82F6, #60A5FA);
    z-index: 999999;
    transition: width 0.1s linear;
    box-shadow: 0 0 10px rgba(30, 64, 175, 0.5);
}

/* === Floating Decorative Orbs === */
.float-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.08;
    pointer-events: none;
    z-index: 0;
    animation: floatOrb 20s ease-in-out infinite;
}
.float-orb--sm {
    width: 200px;
    height: 200px;
}
.float-orb--md {
    width: 350px;
    height: 350px;
}
.float-orb--lg {
    width: 500px;
    height: 500px;
}
.float-orb--blue {
    background: #3B82F6;
}
.float-orb--indigo {
    background: #1E40AF;
}
.float-orb--cyan {
    background: #06B6D4;
}

@keyframes floatOrb {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(30px, -40px) scale(1.05); }
    50% { transform: translate(-20px, 20px) scale(0.95); }
    75% { transform: translate(40px, 30px) scale(1.02); }
}

/* === Pulse Animation for Play Buttons === */
.play-pulse {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    border-radius: 50%;
    z-index: 0;
    animation: playPulse 2s ease-out infinite;
}
.play-pulse::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: rgba(30, 64, 175, 0.3);
    animation: playPulseRing 2s ease-out infinite;
}

@keyframes playPulse {
    0% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(2.5); opacity: 0; }
}

@keyframes playPulseRing {
    0% { transform: scale(1); opacity: 0.6; }
    100% { transform: scale(3); opacity: 0; }
}

/* === Shimmer / Glow Effect === */
.shimmer {
    position: relative;
    overflow: hidden;
}
.shimmer::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.15),
        transparent
    );
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    50% { left: 100%; }
    100% { left: 100%; }
}

/* === Gradient Border Animation === */
.gradient-border {
    position: relative;
    background: white;
    border-radius: 24px;
    z-index: 1;
}
.gradient-border::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 26px;
    background: linear-gradient(
        var(--gradient-angle, 0deg),
        #1E40AF,
        #3B82F6,
        #60A5FA,
        #3B82F6,
        #1E40AF
    );
    z-index: -1;
    animation: rotateBorder 4s linear infinite;
}

@keyframes rotateBorder {
    0% { --gradient-angle: 0deg; }
    100% { --gradient-angle: 360deg; }
}

@property --gradient-angle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}

/* === Gradient Text === */
.gradient-text {
    background: linear-gradient(135deg, #1E40AF, #3B82F6, #60A5FA);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* === Fade Up / Fade In Animations === */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}
.animate-on-scroll.slide-left {
    transform: translateX(-40px);
}
.animate-on-scroll.slide-left.is-visible {
    transform: translateX(0);
}
.animate-on-scroll.slide-right {
    transform: translateX(40px);
}
.animate-on-scroll.slide-right.is-visible {
    transform: translateX(0);
}
.animate-on-scroll.scale-in {
    transform: scale(0.9);
}
.animate-on-scroll.scale-in.is-visible {
    transform: scale(1);
}

/* === Staggered Children === */
.stagger-children .animate-on-scroll:nth-child(1) { transition-delay: 0.05s; }
.stagger-children .animate-on-scroll:nth-child(2) { transition-delay: 0.1s; }
.stagger-children .animate-on-scroll:nth-child(3) { transition-delay: 0.15s; }
.stagger-children .animate-on-scroll:nth-child(4) { transition-delay: 0.2s; }
.stagger-children .animate-on-scroll:nth-child(5) { transition-delay: 0.25s; }
.stagger-children .animate-on-scroll:nth-child(6) { transition-delay: 0.3s; }

/* === Hover Lift === */
.hover-lift {
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.hover-lift:hover {
    transform: translateY(-8px);
}

/* === Spin === */
@keyframes spin {
    to { transform: rotate(360deg); }
}
.spin-slow {
    animation: spin 8s linear infinite;
}

/* === Slide In From Bottom (Hero text) === */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(60px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.slide-in-up {
    animation: slideInUp 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* === Fade In === */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
.fade-in {
    animation: fadeIn 0.8s ease forwards;
}

/* === Bounce In === */
@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}
.bounce-in {
    animation: bounceIn 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
}

/* === Brand Spinner === */
.brand-spinner {
    width: 60px;
    height: 60px;
    position: relative;
}
.brand-spinner::before,
.brand-spinner::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 3px solid transparent;
}
.brand-spinner::before {
    border-top-color: #1E40AF;
    animation: spin 1s linear infinite;
}
.brand-spinner::after {
    border-right-color: #3B82F6;
    inset: 6px;
    animation: spin 1.5s linear infinite reverse;
}

/* === Card Hover Glow === */
.card-glow {
    transition: box-shadow 0.4s ease, transform 0.4s ease;
}
.card-glow:hover {
    box-shadow: 0 0 30px rgba(30, 64, 175, 0.15),
                0 20px 40px -10px rgba(0, 0, 0, 0.1) !important;
}

/* === Image Zoom on Hover === */
.img-zoom {
    overflow: hidden;
}
.img-zoom img {
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.img-zoom:hover img {
    transform: scale(1.08);
}

/* === Ripple Effect === */
.ripple {
    position: relative;
    overflow: hidden;
}
.ripple::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease, opacity 0.6s ease;
    opacity: 0;
}
.ripple:active::after {
    width: 300px;
    height: 300px;
    opacity: 1;
    transition: 0s;
}

/* === Parallax Container === */
.parallax-layer {
    transition: transform 0.1s ease-out;
    will-change: transform;
}

/* === Counter Pulse === */
.counter-pulse {
    animation: counterPulse 0.5s ease;
}
@keyframes counterPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* === Wave Divider === */
.wave-divider {
    position: relative;
    width: 100%;
    overflow: hidden;
    line-height: 0;
}
.wave-divider svg {
    display: block;
    width: 100%;
    height: 60px;
}

/* === Energy Lines (Hero decoration) === */
.energy-lines {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 1;
}
.energy-line {
    position: absolute;
    width: 1px;
    height: 100px;
    background: linear-gradient(180deg, transparent, rgba(59, 130, 246, 0.4), transparent);
    animation: energyFlow 3s ease-in-out infinite;
}
.energy-line:nth-child(1) { left: 10%; animation-delay: 0s; }
.energy-line:nth-child(2) { left: 25%; animation-delay: 0.5s; }
.energy-line:nth-child(3) { left: 50%; animation-delay: 1s; }
.energy-line:nth-child(4) { left: 75%; animation-delay: 1.5s; }
.energy-line:nth-child(5) { left: 90%; animation-delay: 2s; }

@keyframes energyFlow {
    0% { top: -100px; opacity: 0; }
    50% { opacity: 1; }
    100% { top: 110%; opacity: 0; }
}

/* === Badge Pulse === */
.badge-pulse {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}
.badge-pulse::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    animation: badgeDot 1.5s ease-in-out infinite;
}
@keyframes badgeDot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.5); }
}

/* === Media Card Hover Effect === */
.media-card {
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.media-card:hover {
    transform: translateY(-6px) !important;
    border-color: rgba(30, 64, 175, 0.2) !important;
}
.media-card .read-more-arrow {
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s ease;
}
.media-card:hover .read-more-arrow {
    opacity: 1;
    transform: translateX(0);
}

/* === Smooth section transitions === */
.section-separator {
    position: relative;
}
.section-separator::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, transparent, rgba(30, 64, 175, 0.1), transparent);
}
