/**
 * ============================================================================
 * HOSPITAL ERP — PREMIUM HEALTHCARE ANIMATION SYSTEM
 * Path: front/assets/css/animations.css
 * 
 * Elegant, smooth, high-performance transitions and reveal effects.
 * Timing: 400-800ms reveals, 150-300ms micro-interactions.
 * Respects prefers-reduced-motion and provides 100% visible fallback.
 * ============================================================================
 */

/* -----------------------------------------------------------------------------
   0. Global Top Reading & Scroll Progress Bar
   ----------------------------------------------------------------------------- */
.mpp-scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, #ff6a00 0%, #ff8533 40%, #06b6d4 75%, #38bdf8 100%);
    z-index: 999999;
    pointer-events: none;
    transition: width 0.08s linear;
    box-shadow: 0 0 10px rgba(255, 106, 0, 0.7);
}

/* -----------------------------------------------------------------------------
   0B. Lenis Butter-Smooth Inertial Scroll Standards
   ----------------------------------------------------------------------------- */
html, body {
    overflow-x: clip !important;
}

html.lenis, html.lenis body {
    height: auto;
}

.lenis.lenis-smooth {
    scroll-behavior: auto !important;
}

.lenis.lenis-smooth [data-lenis-prevent] {
    overscroll-behavior: contain;
}

.lenis.lenis-stopped {
    overflow: hidden;
}

.lenis.lenis-smooth iframe {
    pointer-events: none;
}

/* -----------------------------------------------------------------------------
   0C. Realistic Live Typing Animation & Blinking Cursor (H1, H2 & Headings)
   ----------------------------------------------------------------------------- */
.mpp-typing-cursor {
    display: inline-block;
    width: 3px;
    height: 0.92em;
    vertical-align: -0.06em;
    background: linear-gradient(180deg, #ff6a00 0%, #ff8533 100%);
    margin-left: 4px;
    border-radius: 2px;
    box-shadow: 0 0 10px rgba(255, 106, 0, 0.7);
    animation: mppCursorBlink 0.85s ease-in-out infinite;
    pointer-events: none;
}

.mpp-typing-cursor.is-done {
    animation: mppCursorFadeAfter 4s forwards, mppCursorBlink 0.85s ease-in-out infinite;
}

@keyframes mppCursorBlink {
    0%, 100% {
        opacity: 1;
        box-shadow: 0 0 10px rgba(255, 106, 0, 0.75);
    }
    50% {
        opacity: 0.15;
        box-shadow: 0 0 2px rgba(255, 106, 0, 0.2);
    }
}

@keyframes mppCursorFadeAfter {
    0%, 75% {
        opacity: 0.85;
    }
    100% {
        opacity: 0;
    }
}

/* -----------------------------------------------------------------------------
   1. Keyframe Definitions
   ----------------------------------------------------------------------------- */
@keyframes hmsFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes hmsFadeUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes hmsFadeDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes hmsFadeLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes hmsFadeRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes hmsSubtleZoom {
    from {
        opacity: 0;
        transform: scale(0.96);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes hmsFloatAmbient {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-8px);
    }
}

@keyframes hmsPulseGlow {
    0%, 100% {
        box-shadow: 0 4px 14px rgba(255, 106, 0, 0.28);
    }
    50% {
        box-shadow: 0 4px 24px rgba(255, 106, 0, 0.55), 0 0 12px rgba(66, 232, 207, 0.4);
    }
}

@keyframes hmsDotBeacon {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 8px rgba(16, 185, 129, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

@keyframes hmsShimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* -----------------------------------------------------------------------------
   2. Progressive Enhancement: Scroll Reveal Base Classes (Infinite Multi-Scroll)
   (Content is 100% visible by default; animated smoothly every time it scrolls into view)
   ----------------------------------------------------------------------------- */
.hms-anim-ready .hms-reveal {
    opacity: 0;
    transform: translateY(35px);
    transition: 
        opacity 0.4s ease-out,
        transform 0.4s ease-out;
    transition-delay: 0s !important;
    will-change: opacity, transform;
}

.hms-anim-ready .hms-reveal.hms-reveal-left {
    transform: translateX(-55px) translateY(0);
}

.hms-anim-ready .hms-reveal.hms-reveal-right {
    transform: translateX(55px) translateY(0);
}

.hms-anim-ready .hms-reveal.hms-reveal-zoom {
    transform: scale(0.90);
}

.hms-anim-ready .hms-reveal.hms-reveal-down {
    transform: translateY(-35px) translateX(0);
}

.hms-anim-ready .hms-reveal.hms-reveal-up {
    transform: translateY(45px) translateX(0);
}

/* In-View State: Perfectly glides in from Left, Right or Down and fixes cleanly into its exact spot */
.hms-anim-ready .hms-reveal.hms-in-view {
    opacity: 1 !important;
    transform: translate(0, 0) scale(1) !important;
    transition: 
        opacity 0.72s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.72s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

/* Stagger Delay Modifiers (Applied strictly when in-view so exit resets immediately) */
.hms-anim-ready .hms-reveal.hms-in-view.hms-delay-1 { transition-delay: 0.06s !important; }
.hms-anim-ready .hms-reveal.hms-in-view.hms-delay-2 { transition-delay: 0.12s !important; }
.hms-anim-ready .hms-reveal.hms-in-view.hms-delay-3 { transition-delay: 0.18s !important; }
.hms-anim-ready .hms-reveal.hms-in-view.hms-delay-4 { transition-delay: 0.24s !important; }
.hms-anim-ready .hms-reveal.hms-in-view.hms-delay-5 { transition-delay: 0.30s !important; }
.hms-anim-ready .hms-reveal.hms-in-view.hms-delay-6 { transition-delay: 0.36s !important; }
.hms-anim-ready .hms-reveal.hms-in-view.hms-delay-7 { transition-delay: 0.42s !important; }
.hms-anim-ready .hms-reveal.hms-in-view.hms-delay-8 { transition-delay: 0.48s !important; }
.hms-anim-ready .hms-reveal.hms-in-view.hms-delay-9 { transition-delay: 0.54s !important; }
.hms-anim-ready .hms-reveal.hms-in-view.hms-delay-10 { transition-delay: 0.60s !important; }
.hms-anim-ready .hms-reveal.hms-in-view.hms-delay-11 { transition-delay: 0.66s !important; }
.hms-anim-ready .hms-reveal.hms-in-view.hms-delay-12 { transition-delay: 0.72s !important; }

/* -----------------------------------------------------------------------------
   3. Page-Load Hero Sequential Animations (No Scroll Required)
   ----------------------------------------------------------------------------- */
.hero-multi .hero-pill-badge,
.hero-multi .hero-copy h1,
.hero-multi .hero-copy .hero-lead,
.hero-multi .hero-actions,
.hero-multi .trust-row,
.hero-multi .product-stage,
.page-hero .page-hero__crumbs,
.page-hero h1,
.page-hero .page-hero__lead,
#page-banner.team-banner .breadcrumb,
#page-banner.team-banner h1,
#page-banner.team-banner p {
    animation-duration: 0.75s;
    animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
    animation-fill-mode: both;
}

/* Home Hero Sequence */
.hero-multi .hero-pill-badge {
    animation-name: hmsFadeDown;
    animation-delay: 0.08s;
}
.hero-multi .hero-copy h1 {
    animation-name: hmsFadeUp;
    animation-delay: 0.18s;
}
.hero-multi .hero-copy .hero-lead {
    animation-name: hmsFadeUp;
    animation-delay: 0.28s;
}
.hero-multi .hero-actions {
    animation-name: hmsFadeUp;
    animation-delay: 0.38s;
}
.hero-multi .trust-row {
    animation-name: hmsFadeUp;
    animation-delay: 0.48s;
}
.hero-multi .product-stage {
    animation-name: hmsSubtleZoom;
    animation-delay: 0.25s;
}

/* Inner Page Hero Sequence */
.page-hero .page-hero__crumbs,
#page-banner.team-banner .breadcrumb {
    animation-name: hmsFadeDown;
    animation-delay: 0.08s;
}
.page-hero h1,
#page-banner.team-banner h1 {
    animation-name: hmsFadeUp;
    animation-delay: 0.18s;
}
.page-hero .page-hero__lead,
#page-banner.team-banner p {
    animation-name: hmsFadeUp;
    animation-delay: 0.28s;
}

/* -----------------------------------------------------------------------------
   4. Floating Ambient Elements & Live Status Beacons
   ----------------------------------------------------------------------------- */
.hms-float {
    animation: hmsFloatAmbient 4s ease-in-out infinite;
}

/* Hero Teacher Stage Soft Floating Breathing Effect */
.hero-teacher-floating-stage {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: mppTeacherFloat 5.5s ease-in-out infinite;
}

.hero-teacher-glow-ring {
    animation: mppGlowPulse 4s ease-in-out infinite;
}

@keyframes mppTeacherFloat {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes mppGlowPulse {
    0%, 100% {
        transform: scale(0.97);
        opacity: 0.5;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.85;
    }
}

/* Ambient Background Glow Spheres in Verification & Hero */
.v-ambient-glow {
    animation: vAmbientPulse 8s ease-in-out infinite alternate;
}

@keyframes vAmbientPulse {
    0% {
        transform: scale(0.92) translate(0, 0);
        opacity: 0.28;
    }
    100% {
        transform: scale(1.12) translate(14px, -14px);
        opacity: 0.6;
    }
}

.team-bubbles .bubble {
    animation: hmsFloatAmbient 5s ease-in-out infinite;
}
.team-bubbles .bubble.b2 { animation-delay: 1s; animation-duration: 4.5s; }
.team-bubbles .bubble.b3 { animation-delay: 2s; animation-duration: 5.5s; }
.team-bubbles .bubble.b4 { animation-delay: 1.5s; animation-duration: 4s; }

.pulse-dot,
.heartbeat-dot,
.live-status-dot,
.mpp-live-dot,
.v-pulse-dot {
    animation: hmsDotBeacon 1.8s infinite !important;
}

/* -----------------------------------------------------------------------------
   5. Button & Call-to-Action Enhancements (Sheen & Magnetic States)
   ----------------------------------------------------------------------------- */
.button,
.btn,
.branch-pill-btn,
.billing-btn,
.premium-role-tab-btn,
.module-filter-btn,
.v-btn-primary,
.v-verify-submit-btn,
.hero-default-login-btn {
    position: relative;
    overflow: hidden;
    transition: 
        transform 0.22s cubic-bezier(0.16, 1, 0.3, 1),
        box-shadow 0.22s ease,
        background-color 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease;
    will-change: transform;
}

/* Sleek Diagonal Light Sheen on Hover */
.button::after,
.btn-brand-orange::after,
.v-btn-primary::after,
.hero-default-login-btn::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -70%;
    width: 45%;
    height: 200%;
    background: linear-gradient(
        60deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.26) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    transform: rotate(25deg);
    transition: none;
    pointer-events: none;
}

.button:hover::after,
.btn-brand-orange:hover::after,
.v-btn-primary:hover::after,
.hero-default-login-btn:hover::after {
    left: 140%;
    transition: left 0.75s ease-in-out;
}

.button:hover,
.btn:hover,
.v-btn-primary:hover {
    transform: translateY(-2.5px);
    box-shadow: 0 8px 20px rgba(255, 106, 0, 0.28);
}

.button:active,
.btn:active,
.v-btn-primary:active {
    transform: translateY(0.5px) scale(0.98);
}

/* Gentle Glow for Primary Action Buttons */
.hero-actions .button:first-child,
.site-header .nav-actions .button,
.demo-box .button,
.footer-login-highlight {
    animation: hmsPulseGlow 3.5s ease-in-out infinite;
}

.footer-login-highlight {
    display: inline-block;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.footer-login-highlight:hover {
    transform: translateX(4px);
}

/* -----------------------------------------------------------------------------
   6. Navigation Links Micro-Interactions (No Underline)
   ----------------------------------------------------------------------------- */
.primary-nav a {
    position: relative;
    transition: color 0.2s ease;
    border-bottom: none !important;
    text-decoration: none !important;
}

.primary-nav a::after {
    display: none !important;
    content: none !important;
}

/* -----------------------------------------------------------------------------
   7. Card & Media Smooth Hover Elevations
   ----------------------------------------------------------------------------- */
.value-card,
.custom-cap-card,
.leader-card,
.plan-card,
.pricing-card-item,
.demo-card-box,
.tech-spec-box,
.dev-process-card,
.network-preview-shell,
.role-pane-card,
.feature-card,
.featured-services-box1,
.feature-item,
.service-card,
.team-item,
.course-card-mpp,
.course-card-erp,
.module-card-mpp,
.testi-card,
.faculty-card,
.inst-marquee-card,
.student-join-marquee-card,
.about-panel,
.v-perk-item {
    transition: 
        transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
        box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1),
        border-color 0.25s ease;
}

.value-card:hover,
.custom-cap-card:hover,
.leader-card:hover,
.dev-process-card:hover,
.demo-card-box:hover,
.course-card-mpp:hover,
.course-card-erp:hover,
.testi-card:hover,
.faculty-card:hover,
.inst-marquee-card:hover,
.student-join-marquee-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 36px rgba(0, 39, 92, 0.12);
}

.feature-item:hover,
.featured-services-box1:hover,
.v-perk-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(0, 39, 92, 0.08);
}

/* Icon tilt on card hover */
.featured-services-box1 .icon i,
.feature-item .icon-box i {
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.featured-services-box1:hover .icon i,
.feature-item:hover .icon-box i {
    transform: scale(1.15) rotate(6deg);
}

/* Doctor & Team Photo Subtle Zoom */
.team-img-wrap,
.doctor-photo-wrap,
.leader-avatar,
.faculty-photo {
    overflow: hidden;
}

.team-img-wrap img,
.doctor-photo-wrap img,
.team-card img {
    transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

.team-card:hover img,
.team-item:hover img,
.doctor-card:hover img {
    transform: scale(1.05);
}

/* -----------------------------------------------------------------------------
   8. Counter Animation Display Helpers
   ----------------------------------------------------------------------------- */
.hms-counter {
    display: inline-block;
    font-variant-numeric: tabular-nums;
    transition: opacity 0.3s ease;
}

/* -----------------------------------------------------------------------------
   9. Reduced Motion Accessibility (Strict Compliance)
   ----------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .hms-anim-ready .hms-reveal {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }

    .hms-float,
    .team-bubbles .bubble,
    .hero-actions .button:first-child,
    .footer-login-highlight {
        animation: none !important;
    }
}

/* -----------------------------------------------------------------------------
   10. MPP PREMIUM LOADING PRELOADER (High-Tech Educational OS Startup)
   ----------------------------------------------------------------------------- */
.mpp-preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #050811;
    color: #ffffff;
    pointer-events: all;
    transition: transform 0.85s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.85s ease;
    will-change: transform, opacity;
}

.mpp-preloader.is-loaded {
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
}

.mpp-preloader-backdrop {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 50%, rgba(255, 106, 0, 0.14) 0%, rgba(6, 182, 212, 0.08) 50%, transparent 75%);
    pointer-events: none;
}

.mpp-preloader-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 420px;
    width: 90%;
    padding: 0 24px;
}

.mpp-preloader-emblem {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto 22px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mpp-preloader-icon {
    width: 52px;
    height: 52px;
    position: relative;
    z-index: 2;
    filter: drop-shadow(0 0 20px rgba(255, 106, 0, 0.45));
    animation: mppPreloaderFloat 2.4s ease-in-out infinite;
}

.mpp-preloader-glow-ring {
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 2px dashed rgba(255, 106, 0, 0.45);
    animation: mppPreloaderSpin 12s linear infinite;
}

.mpp-preloader-brand-title {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: 1.5px;
    margin-bottom: 6px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.mpp-preloader-mpp {
    color: #ff6a00;
    text-shadow: 0 0 25px rgba(255, 106, 0, 0.4);
}

.mpp-preloader-group {
    color: #ffffff;
}

.mpp-preloader-motto {
    font-size: 13px;
    color: #94a3b8;
    margin-bottom: 26px;
    letter-spacing: 0.5px;
}

.mpp-preloader-track {
    width: 100%;
    height: 5px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    overflow: hidden;
    position: relative;
    margin-bottom: 12px;
}

.mpp-preloader-bar {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #ff6a00, #ff8533, #06b6d4, #38bdf8);
    border-radius: 999px;
    transition: width 0.1s linear;
    box-shadow: 0 0 14px rgba(255, 106, 0, 0.7);
}

.mpp-preloader-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    color: #64748b;
    font-family: monospace;
}

.mpp-preloader-pct {
    color: #ff6a00;
    font-weight: 700;
}

@keyframes mppPreloaderFloat {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-6px) scale(1.04); }
}

@keyframes mppPreloaderSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* -----------------------------------------------------------------------------
   11. PREMIUM ANIMATED TESTIMONIAL 3D STACK, GLASSMORPHISM & MARQUEE ENGINE
   ----------------------------------------------------------------------------- */
.section-testimonials {
    position: relative;
    overflow: hidden;
    background: linear-gradient(180deg, #f8fafc 0%, #f0f7ff 50%, #f8fafc 100%);
    padding: 95px 0 105px;
}

/* Floating Ambient Glow Orbs (Item 10) */
.testi-ambient-orb-1 {
    position: absolute;
    top: -80px;
    left: 8%;
    width: 420px;
    height: 420px;
    background: radial-gradient(circle, rgba(0, 162, 255, 0.16) 0%, rgba(0, 74, 173, 0.02) 65%, transparent 100%);
    border-radius: 50%;
    filter: blur(75px);
    pointer-events: none;
    animation: testiAmbientFloat1 13s ease-in-out infinite alternate;
    z-index: 0;
}

.testi-ambient-orb-2 {
    position: absolute;
    bottom: -80px;
    right: 8%;
    width: 460px;
    height: 460px;
    background: radial-gradient(circle, rgba(255, 106, 0, 0.14) 0%, rgba(255, 170, 0, 0.02) 65%, transparent 100%);
    border-radius: 50%;
    filter: blur(85px);
    pointer-events: none;
    animation: testiAmbientFloat2 15s ease-in-out infinite alternate;
    z-index: 0;
}

@keyframes testiAmbientFloat1 {
    0% { transform: translate3d(0, 0, 0) scale(1); }
    100% { transform: translate3d(40px, 35px, 0) scale(1.12); }
}

@keyframes testiAmbientFloat2 {
    0% { transform: translate3d(0, 0, 0) scale(1); }
    100% { transform: translate3d(-35px, -40px, 0) scale(1.15); }
}

/* 3D Stack Deck Wrapper */
.testi-swipe-deck-wrapper {
    max-width: 820px;
    margin: 38px auto 0;
    position: relative;
    perspective: 1400px;
    z-index: 2;
}

/* 3D Card Stage with Viewport Entrance Blur-to-Focus (Item 1 & Item 2) */
.testi-deck-stage {
    position: relative;
    width: 100%;
    min-height: 380px;
    perspective: 1400px;
    transform-style: preserve-3d;
    filter: blur(12px);
    opacity: 0;
    transform: translateY(35px) scale(0.97);
    transition: 
        filter 0.85s cubic-bezier(0.16, 1, 0.3, 1),
        opacity 0.85s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.85s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: filter, opacity, transform;
}

.testi-deck-stage.mpp-revealed {
    filter: blur(0);
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Premium Glassmorphic Card (Item 10) */
.testi-deck-card {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
    background: rgba(255, 255, 255, 0.86) !important;
    -webkit-backdrop-filter: blur(24px) saturate(180%) !important;
    backdrop-filter: blur(24px) saturate(180%) !important;
    border: 1px solid rgba(255, 255, 255, 0.85) !important;
    outline: 1px solid rgba(0, 74, 173, 0.08) !important;
    border-radius: 18px !important;
    padding: 38px 36px 32px !important;
    user-select: none !important;
    cursor: grab;
    transform-origin: center bottom;
    box-shadow: 0 24px 60px -12px rgba(0, 58, 140, 0.16), 0 12px 24px -8px rgba(0, 0, 0, 0.05), inset 0 1px 1px 0 rgba(255, 255, 255, 0.95) !important;
    transition: 
        transform 0.65s cubic-bezier(0.16, 1, 0.3, 1),
        opacity 0.65s cubic-bezier(0.16, 1, 0.3, 1),
        box-shadow 0.4s ease,
        filter 0.4s ease;
    will-change: transform, opacity;
    overflow: hidden !important;
}

.testi-deck-card:active {
    cursor: grabbing;
}

/* Specular Mouse Glare Light (Item 4) */
.testi-card-glare {
    position: absolute;
    inset: 0;
    border-radius: 18px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 15;
}

/* 3D Stack Layer Positions (Item 2) */
/* Position 0 (Front Prominent Active Card) */
.testi-deck-card.pos-0 {
    transform: translate3d(0, 0, 0) scale(1) rotate(0deg) !important;
    opacity: 1 !important;
    z-index: 10 !important;
    pointer-events: auto !important;
    box-shadow: 
        0 30px 70px -14px rgba(0, 74, 173, 0.22),
        0 10px 22px -6px rgba(0, 0, 0, 0.05),
        0 0 0 1px rgba(0, 74, 173, 0.12) !important;
}

/* Position 1 (Peeking behind front) */
.testi-deck-card.pos-1 {
    transform: translate3d(0, 18px, -45px) scale(0.95) rotate(1.4deg) !important;
    opacity: 0.88 !important;
    z-index: 9 !important;
    pointer-events: none !important;
    box-shadow: 0 18px 42px rgba(0, 39, 92, 0.10) !important;
    filter: brightness(0.98) !important;
}

/* Position 2 (3rd in stack) */
.testi-deck-card.pos-2 {
    transform: translate3d(0, 36px, -90px) scale(0.90) rotate(-1.6deg) !important;
    opacity: 0.65 !important;
    z-index: 8 !important;
    pointer-events: none !important;
    box-shadow: 0 12px 28px rgba(0, 39, 92, 0.06) !important;
    filter: brightness(0.95) !important;
}

/* Position 3 (4th in stack) */
.testi-deck-card.pos-3 {
    transform: translate3d(0, 52px, -135px) scale(0.85) rotate(1.1deg) !important;
    opacity: 0.35 !important;
    z-index: 7 !important;
    pointer-events: none !important;
    filter: brightness(0.92) !important;
}

/* Hidden Cards waiting in back of deck */
.testi-deck-card.pos-hidden {
    transform: translate3d(0, 60px, -180px) scale(0.80) !important;
    opacity: 0 !important;
    z-index: 1 !important;
    pointer-events: none !important;
}

/* Front Card Swiping Out to Back (Item 3) */
.testi-deck-card.is-swiping-out {
    transform: translate3d(-130%, -28px, 80px) rotate(-16deg) scale(0.90) !important;
    opacity: 0.12 !important;
    z-index: 30 !important;
    transition: transform 0.46s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.46s ease !important;
}

/* Card Swiping in from Back (Prev Action) */
.testi-deck-card.is-swiping-in-from-back {
    transform: translate3d(120%, -22px, 60px) rotate(14deg) scale(0.92) !important;
    opacity: 0.2 !important;
    z-index: 30 !important;
    transition: transform 0.46s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.46s ease !important;
}

/* Card Topbar */
.testi-card-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

/* Star Rating Animation & Golden Shimmer (Item 7) */
.testi-rating {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.testi-deck-card .star-bounce {
    display: inline-block;
    color: #f59e0b;
    font-size: 16px;
    text-shadow: 0 0 10px rgba(245, 158, 11, 0.45);
    transform-origin: center;
}

.testi-deck-card.pos-0 .star-bounce {
    animation: starBouncePop 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    animation-delay: calc(var(--star-idx, 0) * 75ms);
}

@keyframes starBouncePop {
    0% { transform: scale(0.4) rotate(-25deg); opacity: 0; }
    70% { transform: scale(1.32) rotate(8deg); opacity: 1; }
    100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

.testi-rating-val {
    font-size: 12.5px;
    font-weight: 800;
    color: #b45309;
    background: #fef3c7;
    border: 1px solid #fde68a;
    padding: 3px 9px;
    border-radius: 999px;
    margin-left: 6px;
}

/* Verified Security & Center Badge (Item 5) */
.testi-card-badge {
    font-size: 11.5px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 999px;
    background: rgba(2, 132, 199, 0.08);
    color: #0284c7;
    border: 1px solid rgba(2, 132, 199, 0.22);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* Review Quote & Gradient Text Highlights (Item 6) */
.testi-quote {
    color: #1e293b !important;
    font-size: 16px !important;
    line-height: 1.8 !important;
    margin: 0 0 24px !important;
    flex: 1;
    font-style: normal !important;
    position: relative;
}

.testi-highlight {
    background: linear-gradient(135deg, #004aad 0%, #ff6a00 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
    display: inline;
}

/* Author Profile Section (Item 5) */
.testi-author {
    display: flex !important;
    align-items: center !important;
    gap: 15px !important;
    border-top: 1px solid rgba(226, 232, 240, 0.8) !important;
    padding-top: 20px !important;
}

.testi-author-avatar-wrap {
    position: relative;
    width: 54px;
    height: 54px;
    flex-shrink: 0;
}

.testi-author-avatar {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    object-fit: cover;
    border: 2.5px solid #004aad;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s ease;
}

/* Hover avatar scale (Item 4) */
.testi-deck-card.pos-0:hover .testi-author-avatar {
    transform: scale(1.1);
    box-shadow: 0 0 0 3px rgba(0, 74, 173, 0.28);
}

.testi-author-verified-dot {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #10b981;
    color: #ffffff;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2.5px solid #ffffff;
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.45);
}

.testi-deck-card.pos-0 .testi-author-verified-dot {
    animation: badgePopIn 0.55s cubic-bezier(0.175, 0.885, 0.32, 1.275) 0.2s forwards;
}

@keyframes badgePopIn {
    0% { transform: scale(0) rotate(-35deg); opacity: 0; }
    70% { transform: scale(1.35) rotate(10deg); opacity: 1; }
    100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

.testi-author-info strong {
    font-family: var(--display, 'Manrope', sans-serif);
    font-size: 16px !important;
    display: block;
    color: #0f172a !important;
    font-weight: 800 !important;
}

.testi-author-role {
    font-size: 13.5px;
    color: #0284c7;
    font-weight: 700;
    display: block;
    margin-top: 1px;
}

.testi-author-scale {
    font-size: 12px;
    color: #64748b;
    display: block;
    margin-top: 3px;
}

/* Infinite Marquee Testimonials Strip (Item 9) */
.testi-marquee-wrapper {
    margin-top: 60px;
    overflow: hidden;
    position: relative;
    width: 100%;
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    padding: 10px 0;
}

.testi-marquee-track {
    display: flex;
    gap: 20px;
    width: max-content;
    animation: testiMarqueeScroll 44s linear infinite;
    will-change: transform;
}

.testi-marquee-track:hover {
    animation-play-state: paused;
}

@keyframes testiMarqueeScroll {
    0% { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(-50%, 0, 0); }
}

.testi-marquee-chip {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.82);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 999px;
    padding: 8px 20px 8px 10px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
    white-space: nowrap;
    transition: transform 0.25s ease, border-color 0.25s ease;
}

.testi-marquee-chip:hover {
    transform: translateY(-2px);
    border-color: #004aad;
}

.testi-marquee-chip-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    border: 1.5px solid #004aad;
}

.testi-marquee-chip-body {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

.testi-marquee-chip-body strong {
    color: #0f172a;
    font-weight: 700;
}

.testi-marquee-chip-badge {
    font-size: 10.5px;
    font-weight: 700;
    color: #0284c7;
    background: #e0f2fe;
    padding: 2px 7px;
    border-radius: 999px;
}

.testi-marquee-chip-body p {
    margin: 0;
    color: #475569;
    font-style: italic;
    max-width: 320px;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Responsive Styles (Item 11) */
@media (max-width: 768px) {
    .section-testimonials {
        padding: 65px 0 75px;
    }

    .testi-deck-stage {
        min-height: 440px;
    }

    .testi-deck-card {
        padding: 26px 22px 24px !important;
    }

    .testi-quote {
        font-size: 15px !important;
        line-height: 1.7 !important;
    }

    .testi-ambient-orb-1,
    .testi-ambient-orb-2 {
        display: none;
    }

    .testi-marquee-wrapper {
        margin-top: 40px;
    }
}

/* Reduced Motion Compliance (Item 12) */
@media (prefers-reduced-motion: reduce) {
    .testi-ambient-orb-1,
    .testi-ambient-orb-2,
    .testi-marquee-track,
    .testi-deck-card .star-bounce,
    .testi-author-verified-dot {
        animation: none !important;
    }

    .testi-deck-stage {
        filter: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
}
