/* ==========================================================================
   HANUMAN DHAM - DR. P.K. TIWARI HOSPITAL & RIMSMED IVF
   PREMIUM MOBILE DESIGN SYSTEM & DAY/NIGHT MODE ENGINE
   Preserves 100% of Desktop and Tablet Design
   ========================================================================== */

/* ----------------------------------------------------
   1. GLOBAL SYSTEM VARIABLES & SMOOTH TRANSITIONS
   ---------------------------------------------------- */
:root {
    --brand-bhagwa: #D9531E;
    --brand-bhagwa-vibrant: #E65100;
    --brand-bhagwa-soft: #FFF3ED;
    --brand-navy: #000B21;
    --brand-navy-card: #0C1E33;
    --brand-sky: #0284C7;
    --brand-sky-soft: #E0F2FE;
    --brand-mint: #059669;
    --brand-mint-light: #E6F7F2;
    
    /* Day Mode Palette */
    --theme-bg: #FBF9F5;
    --theme-surface: #FFFFFF;
    --theme-surface-card: #FFFFFF;
    --theme-surface-subtle: #F5F3EF;
    --theme-text-main: #1B1C1A;
    --theme-text-muted: #594139;
    --theme-border: #E2E8F0;
    --theme-nav-bg: rgba(255, 255, 255, 0.96);
    --theme-footer-bg: #000B21;
}

/* Base Transition & Smooth Scrolling */
html {
    scroll-behavior: smooth !important;
    scroll-padding-top: 88px !important;
    -webkit-overflow-scrolling: touch !important;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto !important;
    }
}

body {
    transition: background-color 0.35s ease, color 0.35s ease;
}

#smart-nav {
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
    will-change: transform;
}

/* ----------------------------------------------------
   2. NIGHT MODE (DARK THEME) STYLING
   ---------------------------------------------------- */
body[data-theme="dark"],
html.dark body {
    --theme-bg: #060B19;
    --theme-surface: #0B1426;
    --theme-surface-card: #0F1C36;
    --theme-surface-subtle: #132240;
    --theme-text-main: #F1F5F9;
    --theme-text-muted: #94A3B8;
    --theme-border: rgba(255, 255, 255, 0.09);
    --theme-nav-bg: rgba(11, 20, 38, 0.96);
    
    background-color: var(--theme-bg) !important;
    color: var(--theme-text-main) !important;
}

/* Dark mode surface overrides */
body[data-theme="dark"] .bg-background,
body[data-theme="dark"] .bg-surface,
body[data-theme="dark"] .bg-canvas-cream,
body[data-theme="dark"] .bg-surface-bright {
    background-color: var(--theme-bg) !important;
}

body[data-theme="dark"] .bg-surface-container-lowest,
body[data-theme="dark"] .bg-card-white,
body[data-theme="dark"] .bg-white {
    background-color: var(--theme-surface-card) !important;
    border-color: var(--theme-border) !important;
}

body[data-theme="dark"] .bg-surface-container,
body[data-theme="dark"] .bg-surface-container-low,
body[data-theme="dark"] .bg-surface-container-high,
body[data-theme="dark"] .bg-surface-container-highest {
    background-color: var(--theme-surface-subtle) !important;
}

/* Text color overrides for Dark Mode */
body[data-theme="dark"] .text-navy-card,
body[data-theme="dark"] .text-on-surface,
body[data-theme="dark"] .text-text-primary,
body[data-theme="dark"] h1,
body[data-theme="dark"] h2,
body[data-theme="dark"] h3,
body[data-theme="dark"] h4 {
    color: var(--theme-text-main) !important;
}

body[data-theme="dark"] .text-on-surface-variant,
body[data-theme="dark"] .text-text-muted {
    color: var(--theme-text-muted) !important;
}

/* Header & Mobile Dropdown in Dark Mode */
body[data-theme="dark"] header#smart-nav > div {
    background-color: var(--theme-nav-bg) !important;
    border-bottom-color: var(--theme-border) !important;
}

body[data-theme="dark"] #mobile-menu {
    background-color: rgba(11, 20, 38, 0.98) !important;
    border-color: var(--theme-border) !important;
}

body[data-theme="dark"] #mobile-menu a {
    color: #E2E8F0 !important;
    border-bottom-color: rgba(255, 255, 255, 0.06) !important;
}

body[data-theme="dark"] #mobile-menu a:hover {
    background-color: rgba(255, 255, 255, 0.05) !important;
    color: #FF9E66 !important;
}

body[data-theme="dark"] .border-border-subtle,
body[data-theme="dark"] .border-outline-variant {
    border-color: var(--theme-border) !important;
}

/* Brand badges & chips in Dark Mode */
body[data-theme="dark"] .bg-sky-soft {
    background-color: rgba(2, 132, 199, 0.18) !important;
    color: #7DD3FC !important;
}

body[data-theme="dark"] .bg-mint-light {
    background-color: rgba(16, 185, 129, 0.18) !important;
    color: #6EE7B7 !important;
}

body[data-theme="dark"] .bg-bhagwa-soft {
    background-color: rgba(217, 83, 30, 0.18) !important;
    color: #FDBA74 !important;
}

/* Form inputs in Dark Mode */
body[data-theme="dark"] input,
body[data-theme="dark"] select,
body[data-theme="dark"] textarea {
    background-color: #0c1629 !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
    color: #F8FAFC !important;
}

body[data-theme="dark"] input::placeholder,
body[data-theme="dark"] textarea::placeholder {
    color: #64748B !important;
}

/* Header SVG text in dark mode */
body[data-theme="dark"] header svg text {
    fill: #F8FAFC !important;
}

/* Day/Night Button active glow */
.theme-toggle-btn.dark-active {
    background-color: #1E293B !important;
    border-color: #FBBF24 !important;
    color: #FCD34D !important;
    box-shadow: 0 0 12px rgba(252, 211, 77, 0.25) !important;
}

/* ----------------------------------------------------
   3. PROFESSIONAL PHONE VERSION DESIGN (@media max-width: 768px)
   ---------------------------------------------------- */
@media (max-width: 768px) {
    /* Balanced Typography Hierarchy */
    h1, .font-display-lg {
        font-size: 1.55rem !important; /* ~25px */
        line-height: 2.05rem !important; /* ~33px */
        letter-spacing: -0.015em !important;
    }

    h2, .font-headline-xl {
        font-size: 1.3rem !important; /* ~21px */
        line-height: 1.7rem !important; /* ~27px */
        letter-spacing: -0.01em !important;
    }

    h3, .font-headline-lg {
        font-size: 1.12rem !important; /* ~18px */
        line-height: 1.45rem !important;
    }

    .font-headline-md {
        font-size: 1rem !important; /* 16px */
        line-height: 1.4rem !important;
    }

    .font-title-md {
        font-size: 0.925rem !important; /* ~15px */
        line-height: 1.3rem !important;
    }

    .font-body-md {
        font-size: 0.875rem !important; /* 14px */
        line-height: 1.375rem !important; /* 22px */
    }

    .font-body-sm {
        font-size: 0.775rem !important; /* 12.4px */
        line-height: 1.15rem !important;
    }

    .font-label-lg {
        font-size: 0.85rem !important;
        line-height: 1.25rem !important;
    }

    .font-label-md {
        font-size: 0.75rem !important;
        line-height: 1.1rem !important;
    }

    .font-label-sm {
        font-size: 0.685rem !important;
        line-height: 0.95rem !important;
    }

    /* Section Padding Balance on Phone */
    .py-space-xl {
        padding-top: 1.5rem !important;
        padding-bottom: 1.5rem !important;
    }

    .py-space-lg {
        padding-top: 1.15rem !important;
        padding-bottom: 1.15rem !important;
    }

    .px-margin,
    .px-margin-sm {
        padding-left: 0.875rem !important;
        padding-right: 0.875rem !important;
    }

    /* Header & Navigation Bar on Phone */
    header#smart-nav {
        padding-top: 0 !important;
    }

    header#smart-nav > div > div {
        padding-top: 0.45rem !important;
        padding-bottom: 0.5rem !important;
        min-height: 60px !important;
    }

    /* Logo inside Header: perfectly fitted without overflow */
    .header-logo-container {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        position: relative !important;
    }

    .header-devanagari-text {
        font-size: 7.5px !important;
        letter-spacing: 0.18em !important;
        margin-bottom: 1px !important;
        line-height: 1 !important;
    }

    .header-logo-img {
        height: 33px !important;
        width: auto !important;
    }

    .header-subtext-svg {
        width: clamp(96px, 26vw, 140px) !important;
        height: auto !important;
        margin-top: 1px !important;
    }

    /* 3-Lines Hamburger Button at Top Right */
    #mobile-menu-btn {
        width: 34px !important;
        height: 34px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        border-radius: 10px !important;
        background-color: rgba(0, 0, 0, 0.04) !important;
        border: 1px solid rgba(0, 0, 0, 0.08) !important;
        transition: all 0.2s ease !important;
    }

    body[data-theme="dark"] #mobile-menu-btn {
        background-color: rgba(255, 255, 255, 0.06) !important;
        border: 1px solid rgba(255, 255, 255, 0.12) !important;
        color: #FFFFFF !important;
    }

    #mobile-menu-btn:active {
        transform: scale(0.92) !important;
    }

    /* Mobile Dropdown Menu under 3 lines */
    #mobile-menu {
        max-height: calc(100vh - 66px) !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
        box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.25) !important;
    }

    .menu-enter {
        animation: slideDownMenu 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    }

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

    /* Touch-Friendly Input & Button Heights on Mobile */
    input, select, textarea {
        font-size: 16px !important; /* Prevents iOS auto-zoom */
        min-height: 44px !important;
    }

    /* Professional Horizontal 2-Card Row with Left Scroll on Phone */
    .grid.grid-flow-col,
    .grid.lg\:grid-cols-4 {
        display: flex !important;
        flex-direction: row !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        scroll-snap-type: x mandatory !important;
        -webkit-overflow-scrolling: touch !important;
        gap: 0.75rem !important; /* 12px gap */
        padding-left: 0.25rem !important;
        padding-right: 0.25rem !important;
        padding-bottom: 0.75rem !important;
        scrollbar-width: none !important;
    }

    .grid.grid-flow-col::-webkit-scrollbar,
    .grid.lg\:grid-cols-4::-webkit-scrollbar {
        display: none !important;
    }

    /* Exactly 2 cards per view (50% minus half-gap) */
    .grid.grid-flow-col > div,
    .grid.lg\:grid-cols-4 > div {
        flex: 0 0 calc(50% - 0.375rem) !important;
        width: calc(50% - 0.375rem) !important;
        min-width: 150px !important;
        max-width: 220px !important;
        scroll-snap-align: start !important;
        padding: 0.85rem !important;
        border-radius: 14px !important;
    }

    /* Card internal text and badge scaling */
    .grid.grid-flow-col > div h3,
    .grid.lg\:grid-cols-4 > div h3 {
        font-size: 0.875rem !important; /* 14px */
        line-height: 1.15rem !important;
        margin-bottom: 0.25rem !important;
    }

    .grid.grid-flow-col > div p,
    .grid.lg\:grid-cols-4 > div p {
        font-size: 0.72rem !important; /* 11.5px */
        line-height: 1rem !important;
    }

    .grid.grid-flow-col > div ul,
    .grid.lg\:grid-cols-4 > div ul {
        font-size: 0.72rem !important;
    }

    .grid.grid-flow-col > div .w-12,
    .grid.lg\:grid-cols-4 > div .w-12 {
        width: 2.25rem !important;
        height: 2.25rem !important;
        border-radius: 8px !important;
    }

    .grid.grid-flow-col > div .w-12 span,
    .grid.lg\:grid-cols-4 > div .w-12 span {
        font-size: 1.25rem !important;
    }

    .grid.grid-flow-col > div span.bg-bhagwa-primary,
    .grid.lg\:grid-cols-4 > div span.bg-bhagwa-primary {
        font-size: 0.75rem !important;
        padding: 0.2rem 0.5rem !important;
    }

    /* Main Container Top Padding */
    main {
        padding-top: 68px !important;
    }
}

/* ----------------------------------------------------
   4. DESKTOP & TABLET PRESERVATION (@media min-width: 769px)
   Everything stays 100% exact to Stitch design specifications
   ---------------------------------------------------- */
@media (min-width: 769px) {
    main {
        padding-top: 110px !important;
    }
}

/* ----------------------------------------------------
   5. FOUNDER & CHAIRMAN MOBILE PINNED HORIZONTAL SCROLL
   ---------------------------------------------------- */
@media (max-width: 1023px) {
    #founder-mobile-pin-container {
        height: 250vh;
        position: relative;
        margin-top: 1rem;
        margin-bottom: 1rem;
    }

    #founder-mobile-sticky {
        position: sticky;
        top: 60px;
        height: calc(100vh - 60px);
        overflow: hidden;
        display: flex;
        flex-direction: column;
        justify-content: center;
        padding-left: 0.75rem;
        padding-right: 0.75rem;
        z-index: 20;
    }

    #founder-horizontal-track {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        gap: 0.875rem !important;
        will-change: transform;
    }

    .founder-slide {
        width: calc(100vw - 1.75rem) !important;
        max-width: 360px !important;
        flex-shrink: 0 !important;
        box-sizing: border-box !important;
    }
}

/* ----------------------------------------------------
   6. DEMYSTIFYING INFERTILITY RESPONSIVE BACKGROUND & CONTRAST
   ---------------------------------------------------- */
#overview picture {
    display: block;
    width: 100%;
    height: 100%;
}

#overview picture img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
    opacity: 0.85 !important;
    transition: opacity 0.4s ease;
}

body[data-theme="dark"] #overview picture img {
    opacity: 0.75 !important;
}

@media (max-width: 767px) {
    #overview picture img {
        object-position: center top !important;
        opacity: 0.88 !important;
    }

    body[data-theme="dark"] #overview picture img {
        opacity: 0.78 !important;
    }
}

#overview .overview-text-panel {
    background-color: rgba(251, 249, 245, 0.84);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.08);
}

body[data-theme="dark"] #overview .overview-text-panel {
    background-color: rgba(12, 30, 51, 0.86) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-color: rgba(255, 255, 255, 0.12) !important;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.4);
}

@media (min-width: 1024px) {
    #overview .overview-text-panel {
        background-color: transparent !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        border: none !important;
        box-shadow: none !important;
        padding: 0 !important;
    }
}

body[data-theme="dark"] #overview h1 {
    color: #FFFFFF !important;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7);
}

body[data-theme="dark"] #overview p.font-body-lg {
    color: #F8FAFC !important;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.5);
}


/* ========================================================================= */
/* CITYBIZ BRANDING STUDIO - LOGO TYPOGRAPHY & ANIMATION                     */
/* ========================================================================= */
@import url('https://fonts.googleapis.com/css2?family=Syne:wght@800;900&display=swap');

@keyframes citybizPulse {
  0%, 100% {
    filter: drop-shadow(0 0 2px rgba(255, 0, 0, 0.6));
    color: #ff0000;
  }
  50% {
    filter: drop-shadow(0 0 8px rgba(255, 0, 0, 1)) drop-shadow(0 0 14px rgba(255, 50, 50, 0.7));
    color: #ff2222;
  }
}

@keyframes citybizBorderPulse {
  0%, 100% {
    border-color: rgba(255, 255, 255, 0.25);
    box-shadow: 0 0 6px rgba(255, 0, 0, 0.25);
  }
  50% {
    border-color: rgba(255, 0, 0, 0.85);
    box-shadow: 0 0 16px rgba(255, 0, 0, 0.55), inset 0 0 8px rgba(255, 0, 0, 0.2);
  }
}

.citybiz-animated-badge {
  animation: citybizBorderPulse 2.6s ease-in-out infinite;
}

.citybiz-animated-badge:hover {
  animation: none !important;
  border-color: #ff0000 !important;
  box-shadow: 0 0 20px rgba(255, 0, 0, 0.75), inset 0 0 10px rgba(255, 0, 0, 0.3) !important;
}

.citybiz-red-letter {
  color: #ff0000 !important;
  display: inline-block;
  animation: citybizPulse 2.6s ease-in-out infinite;
}

    /* Continuously Blinking Book Consultation Button Glow Effect */
    .opd-blinking-btn {
        animation: opdGlowPulse 2s ease-in-out infinite;
        flex-shrink: 0 !important;
    }
    @keyframes opdGlowPulse {
        0%, 100% {
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 0 0 0 rgba(255, 102, 0, 0.4);
        }
        50% {
            box-shadow: 0 3px 6px rgba(0, 0, 0, 0.12), 0 0 0 4px rgba(255, 102, 0, 0.18);
        }
    }

/* Responsive Mobile Header Navigation Controls */
@media (max-width: 768px) {
    header#smart-nav .header-subtext-svg {
        width: 100px !important;
    }
    header#smart-nav .header-logo-img {
        height: 26px !important;
    }
    header#smart-nav .opd-blinking-btn {
        font-size: 10.5px !important;
        padding: 4px 8px !important;
        gap: 4px !important;
        max-width: 130px !important;
        display: inline-flex !important;
    }
    header#smart-nav .opd-blinking-btn .calendar-icon {
        display: none !important;
    }
    header#smart-nav .theme-toggle-btn {
        width: 32px !important;
        height: 32px !important;
        min-width: 32px !important;
        display: flex !important;
    }
    header#smart-nav #mobile-menu-btn {
        width: 32px !important;
        height: 32px !important;
        min-width: 32px !important;
        display: flex !important;
    }
}


/* ========================================================================= */

/* ========================================================================= */
/* GLOBAL CYBERNETIC LASER SCROLL TRACKER HUD (Mobile & Desktop)             */
/* ========================================================================= */
#cyber-scroll-tracker {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 3.5px !important;
    z-index: 999999 !important;
    pointer-events: none !important;
    background: transparent !important;
}

#cyber-scroll-progress-bar {
    height: 100% !important;
    width: 0% !important;
    background: linear-gradient(90deg, #FF6600 0%, #FF8800 25%, #38BDF8 70%, #00F0FF 100%) !important;
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.9), 0 0 22px rgba(255, 102, 0, 0.8) !important;
    position: relative !important;
    transition: width 0.08s ease-out !important;
    will-change: width !important;
}

#cyber-scroll-progress-bar::after {
    content: '' !important;
    position: absolute !important;
    right: 0 !important;
    top: -2.5px !important;
    bottom: -2.5px !important;
    width: 7px !important;
    border-radius: 9999px !important;
    background: #ffffff !important;
    box-shadow: 0 0 12px 3px #00F0FF, 0 0 22px 5px #FF6600 !important;
}

/* ========================================================================= */
/* FUTURISTIC TECH SCROLL-REVEAL & LASER SCANNER SYSTEM (Mobile & Desktop)  */
/* ========================================================================= */
.tech-scroll-node {
    position: relative !important;
    opacity: 0.12;
    transform: translateY(22px) scale(0.985);
    transition: opacity 0.65s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.65s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.45s ease,
                border-color 0.4s ease !important;
    will-change: opacity, transform, box-shadow !important;
}

/* Immediate in-view state upon scrolling into read focal zone */
.tech-scroll-node.tech-in-view {
    opacity: 1 !important;
    transform: translateY(0) scale(1) !important;
}

/* Stagger cascade delay for multi-item grids */
.tech-scroll-node[data-stagger="1"] { transition-delay: 0.05s !important; }
.tech-scroll-node[data-stagger="2"] { transition-delay: 0.10s !important; }
.tech-scroll-node[data-stagger="3"] { transition-delay: 0.15s !important; }
.tech-scroll-node[data-stagger="4"] { transition-delay: 0.20s !important; }
.tech-scroll-node[data-stagger="5"] { transition-delay: 0.25s !important; }
.tech-scroll-node[data-stagger="6"] { transition-delay: 0.30s !important; }

/* Holographic Laser Scanner Beam */
.tech-laser-beam {
    position: absolute !important;
    left: 0 !important;
    right: 0 !important;
    height: 3px !important;
    background: linear-gradient(90deg, transparent 0%, rgba(56, 189, 248, 0.35) 15%, #38BDF8 40%, #FF6600 60%, rgba(255, 102, 0, 0.35) 85%, transparent 100%) !important;
    box-shadow: 0 0 16px 3px rgba(56, 189, 248, 0.9), 0 0 12px 2px rgba(255, 102, 0, 0.9) !important;
    pointer-events: none !important;
    z-index: 35 !important;
    opacity: 0 !important;
    transform: translateZ(0) !important;
}

.tech-scroll-node.is-scanning .tech-laser-beam,
.futuristic-stack-card.is-scanning .tech-laser-beam {
    animation: techLaserSweep 1.2s cubic-bezier(0.25, 1, 0.5, 1) forwards !important;
}

@keyframes techLaserSweep {
    0% { top: 0%; opacity: 0; }
    15% { opacity: 1; }
    85% { opacity: 1; }
    100% { top: 100%; opacity: 0; }
}

/* Desktop & Tablet Viewport Futuristic Scroll Reactions (>= 640px) */
@media (min-width: 640px) {
    .tech-scroll-node.tech-active {
        transform: translateY(-8px) scale(1.02) !important;
        box-shadow: 0 20px 45px -10px rgba(0, 0, 0, 0.18), 
                    0 0 30px -4px rgba(255, 102, 0, 0.35), 
                    0 0 0 2px rgba(255, 102, 0, 0.55) !important;
    }

    .dark .tech-scroll-node.tech-active,
    body[data-theme="dark"] .tech-scroll-node.tech-active {
        box-shadow: 0 24px 55px -10px rgba(0, 0, 0, 0.85), 
                    0 0 36px -4px rgba(56, 189, 248, 0.4), 
                    0 0 0 2px rgba(56, 189, 248, 0.65) !important;
    }

    /* Subtle Cybernetic Top Edge Neon on Active Desktop Cards */
    .tech-scroll-node.tech-active::before {
        content: '' !important;
        position: absolute !important;
        top: 0 !important;
        left: 10% !important;
        right: 10% !important;
        height: 2px !important;
        background: linear-gradient(90deg, transparent, #FF6600, #38BDF8, transparent) !important;
        border-radius: 9999px !important;
        z-index: 25 !important;
        pointer-events: none !important;
    }
}

/* ========================================================================= */
/* FUTURISTIC 3D STACKING DECK SCROLL EFFECT (Mobile Devices < 640px)        */
/* Preserves 100% of Tablet & Desktop Multi-Column Grid Layouts              */
/* ========================================================================= */
@media (max-width: 639px) {
    .futuristic-stack-deck {
        display: flex !important;
        flex-direction: column !important;
        position: relative !important;
        gap: 0 !important;
        padding-bottom: 2rem !important;
    }

    .futuristic-stack-card {
        position: sticky !important;
        top: 112px !important; /* Fixed smart-nav (~60px) + HUD pill (~44px) + margin */
        scroll-margin-top: 116px !important;
        margin-bottom: 28px !important;
        border-radius: 1.25rem !important;
        transform-origin: center top !important;
        transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1), 
                    opacity 0.45s ease, 
                    filter 0.45s ease,
                    box-shadow 0.45s ease !important;
        will-change: transform, filter, opacity !important;
        background: #ffffff !important;
        box-shadow: 0 -6px 20px -4px rgba(255, 102, 0, 0.15), 
                    0 16px 38px -6px rgba(0, 0, 0, 0.22), 
                    0 0 0 1px rgba(226, 232, 240, 0.95) !important;
    }

    .dark .futuristic-stack-card,
    body[data-theme="dark"] .futuristic-stack-card {
        background: #001D31 !important;
        box-shadow: 0 -8px 25px -4px rgba(255, 102, 0, 0.25), 
                    0 22px 48px -8px rgba(0, 0, 0, 0.8), 
                    0 0 0 1px rgba(255, 255, 255, 0.14) !important;
    }

    /* Cybernetic Neon Top Edge Glow */
    .futuristic-stack-card::before {
        content: '' !important;
        position: absolute !important;
        top: 0 !important;
        left: 8% !important;
        right: 8% !important;
        height: 2px !important;
        background: linear-gradient(90deg, transparent, #FF6600, #38BDF8, transparent) !important;
        border-radius: 9999px !important;
        z-index: 25 !important;
        pointer-events: none !important;
    }

    /* Stacked cards underneath active top card (Depth Cascade) */
    .futuristic-stack-card.is-stacked {
        transform: perspective(1000px) scale(0.92) translateY(-18px) rotateX(4deg) !important;
        opacity: 0.52 !important;
        filter: blur(1.5px) brightness(0.85) !important;
        pointer-events: none !important;
    }

    /* Active Topmost Card */
    .futuristic-stack-card.is-active {
        transform: perspective(1000px) scale(1) translateY(0) rotateX(0deg) !important;
        opacity: 1 !important;
        filter: none !important;
        box-shadow: 0 -8px 26px -2px rgba(255, 102, 0, 0.25), 
                    0 24px 50px -6px rgba(0, 0, 0, 0.32), 
                    0 0 0 1.5px rgba(255, 102, 0, 0.5) !important;
    }
}

/* ========================================================================= */
/* FUTURISTIC BLINKING TOP-LEFT NAVBAR LOGO - THEME MATCHED (NO CARD)        */
/* Active for 1-2s on Load, Switching Between Pages & Slow Internet          */
/* ========================================================================= */
#rimsmed-slow-network-overlay {
    position: fixed !important;
    inset: 0 !important;
    z-index: 99999 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 1.5rem !important;
    background-color: #F8F9FA !important;
    background-image: 
        linear-gradient(90deg, rgba(255, 102, 0, 0.08) 1px, transparent 1px),
        linear-gradient(0deg, rgba(236, 72, 153, 0.08) 1px, transparent 1px),
        radial-gradient(circle at 50% 50%, rgba(255, 102, 0, 0.12) 0%, rgba(236, 72, 153, 0.08) 45%, transparent 75%) !important;
    background-size: 36px 36px, 36px 36px, 100% 100% !important;
    transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                visibility 0.4s cubic-bezier(0.16, 1, 0.3, 1) !important;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* Dark Mode Theme Matching */
.dark #rimsmed-slow-network-overlay {
    background-color: #000b21 !important;
    background-image: 
        linear-gradient(90deg, rgba(255, 102, 0, 0.14) 1px, transparent 1px),
        linear-gradient(0deg, rgba(236, 72, 153, 0.14) 1px, transparent 1px),
        radial-gradient(circle at 50% 50%, rgba(255, 102, 0, 0.18) 0%, rgba(236, 72, 153, 0.12) 45%, transparent 75%) !important;
}

#rimsmed-slow-network-overlay.rimsmed-slow-net-fading {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

#rimsmed-slow-network-overlay.rimsmed-slow-net-hidden {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    display: none !important;
}

/* 3D Perspective Ray Floor - GPU Optimized */
.rimsmed-ray-grid-floor {
    position: absolute !important;
    bottom: -8% !important;
    left: -20% !important;
    right: -20% !important;
    height: 46% !important;
    background-image: 
        linear-gradient(90deg, rgba(255, 102, 0, 0.18) 1px, transparent 1px),
        linear-gradient(0deg, rgba(236, 72, 153, 0.18) 1px, transparent 1px) !important;
    background-size: 38px 38px !important;
    transform: perspective(400px) rotateX(65deg) translate3d(0, 0, 0) !important;
    transform-origin: center bottom !important;
    pointer-events: none !important;
    opacity: 0.8 !important;
    mask-image: linear-gradient(to top, rgba(0,0,0,1) 0%, transparent 100%) !important;
    -webkit-mask-image: linear-gradient(to top, rgba(0,0,0,1) 0%, transparent 100%) !important;
    will-change: opacity !important;
    animation: rimsmedRayFloorBreathe 2.4s cubic-bezier(0.4, 0, 0.2, 1) infinite !important;
}

@keyframes rimsmedRayFloorBreathe {
    0%, 100% { opacity: 0.65; }
    50% { opacity: 0.95; }
}

/* Floating Futuristic Stage - NO CARD, NO BOX, NO BORDER */
.rimsmed-futuristic-flow-stage {
    position: relative !important;
    z-index: 10 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    max-width: 480px !important;
    width: 100% !important;
}

/* Top-Left Navbar Logo Blinking Stage - Futuristic Smooth Zoom In & Out Animation */
.rimsmed-blinking-nav-logo-stage {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0.5rem 0 1.25rem 0 !important;
    will-change: transform, opacity, filter !important;
    transform-origin: center center !important;
    transform: translate3d(0, 0, 0) scale3d(1, 1, 1) !important;
    -webkit-transform: translate3d(0, 0, 0) scale3d(1, 1, 1) !important;
    backface-visibility: hidden !important;
    -webkit-backface-visibility: hidden !important;
    animation: rimsmedFuturisticLogoZoom 1.6s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite !important;
    pointer-events: none !important;
}

.rimsmed-blinking-nav-logo-stage img {
    height: 48px !important;
    width: auto !important;
    object-fit: contain !important;
    transform: translateZ(0) !important;
}

@media (min-width: 640px) {
    .rimsmed-blinking-nav-logo-stage img {
        height: 56px !important;
    }
}

@keyframes rimsmedFuturisticLogoZoom {
    0% {
        transform: scale3d(0.88, 0.88, 1) translate3d(0, 0, 0);
        filter: drop-shadow(0 0 12px rgba(255, 102, 0, 0.50)) drop-shadow(0 0 20px rgba(236, 72, 153, 0.35));
        opacity: 0.78;
    }
    50% {
        transform: scale3d(1.15, 1.15, 1) translate3d(0, 0, 0);
        filter: drop-shadow(0 0 30px rgba(255, 102, 0, 0.95)) drop-shadow(0 0 52px rgba(236, 72, 153, 0.85));
        opacity: 1;
    }
    100% {
        transform: scale3d(0.88, 0.88, 1) translate3d(0, 0, 0);
        filter: drop-shadow(0 0 12px rgba(255, 102, 0, 0.50)) drop-shadow(0 0 20px rgba(236, 72, 153, 0.35));
        opacity: 0.78;
    }
}

/* Floating Status Line */
.rimsmed-futuristic-status-line {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 6px 18px !important;
    border-radius: 9999px !important;
    background: rgba(255, 102, 0, 0.08) !important;
    border: 1px solid rgba(255, 102, 0, 0.25) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    box-shadow: 0 0 18px rgba(255, 102, 0, 0.12) !important;
}

.dark .rimsmed-futuristic-status-line {
    background: rgba(255, 102, 0, 0.15) !important;
    border-color: rgba(255, 102, 0, 0.45) !important;
}

/* Floating Progress Track */
.rimsmed-floating-progress-track {
    width: 220px !important;
    height: 5px !important;
    background: rgba(226, 232, 240, 0.8) !important;
    border-radius: 9999px !important;
    overflow: hidden !important;
    margin-top: 14px !important;
    position: relative !important;
    border: 1px solid rgba(203, 213, 225, 0.6) !important;
}

.dark .rimsmed-floating-progress-track {
    background: rgba(30, 41, 59, 0.8) !important;
    border-color: rgba(51, 65, 85, 0.8) !important;
}

.rimsmed-laser-progress-beam {
    height: 100% !important;
    width: 45% !important;
    border-radius: 9999px !important;
    background: linear-gradient(90deg, #FF6600, #EC4899, #38BDF8) !important;
    box-shadow: 0 0 10px #FF6600, 0 0 14px #EC4899 !important;
    animation: rimsmedLaserSlide 1.2s cubic-bezier(0.4, 0, 0.2, 1) infinite !important;
}

@keyframes rimsmedLaserSlide {
    0% { transform: translateX(-100%); }
    50% { transform: translateX(75%); }
    100% { transform: translateX(240%); }
}

/* Floating Continue Button */
.rimsmed-continue-btn {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    padding: 8px 22px !important;
    border-radius: 9999px !important;
    background: linear-gradient(90deg, #FF6600, #EA580C) !important;
    color: #ffffff !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    letter-spacing: 0.04em !important;
    border: none !important;
    cursor: pointer !important;
    box-shadow: 0 4px 16px rgba(255, 102, 0, 0.35) !important;
    transition: all 0.2s ease !important;
    margin-top: 16px !important;
}

.rimsmed-continue-btn:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 6px 22px rgba(255, 102, 0, 0.5) !important;
}

.rimsmed-continue-btn:active {
    transform: scale(0.96) !important;
}

/* Discrete Floating Network Monitor Pill (Bottom-Right) */
#rimsmed-network-pill {
    position: fixed !important;
    bottom: 16px !important;
    right: 16px !important;
    z-index: 9999 !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    padding: 5px 12px !important;
    border-radius: 9999px !important;
    background: rgba(255, 255, 255, 0.92) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border: 1px solid rgba(255, 102, 0, 0.35) !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08) !important;
    cursor: pointer !important;
    font-size: 10px !important;
    font-weight: 700 !important;
    color: #1e293b !important;
    transition: all 0.25s ease !important;
    user-select: none !important;
}

.dark #rimsmed-network-pill {
    background: rgba(15, 23, 42, 0.92) !important;
    color: #ffffff !important;
    border-color: rgba(255, 102, 0, 0.5) !important;
}