/* =========================================
   1. Dashboard Variables & Reset
   ========================================= */
:root {
    /* Premium Medical Dashboard Palette */
    --primary: #0A5BC9;
    --primary-light: #eff6ff;
    --primary-hover: #1e40af;
    --secondary: #0ea5e9;
    /* Light blue accent */
    --accent: #10b981;
    /* Success/Growth green */

    --text-dark: #0f172a;
    --text-muted: #64748b;
    --text-light: #94a3b8;

    --bg-main: #f8fafc;
    --bg-glass: rgba(255, 255, 255, 0.75);
    --bg-glass-hover: rgba(255, 255, 255, 0.95);

    --white: #ffffff;
    --border-light: rgba(255, 255, 255, 0.5);
    --border-dark: rgba(226, 232, 240, 0.8);

    /* Neumorphic / Glassmorphic Shadows */
    --shadow-glass: 0 8px 32px 0 rgba(148, 163, 184, 0.15);
    --shadow-card: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-float: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

    /* Dimensions & Transitions */
    --radius-sm: 12px;
    --radius-md: 20px;
    --radius-lg: 32px;
    --radius-full: 9999px;
    --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);

    /* Typography */
    --font-main: 'Inter', system-ui, sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px;
    /* Essential for sticky header layout when using anchor tags */
    font-size: 16px;
}

body {
    font-family: var(--font-main);
    color: var(--text-dark);
    background-color: var(--bg-main);
    background-image: radial-gradient(at 0% 0%, hsla(217, 100%, 94%, 1) 0px, transparent 50%),
        radial-gradient(at 100% 0%, hsla(189, 100%, 92%, 1) 0px, transparent 50%);
    background-attachment: fixed;
    line-height: 1.6;
    overflow-x: hidden;
    width: 100%;
}

#main-content {
    width: 100%;
    overflow-x: hidden;
    position: relative;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: var(--radius-sm);
}

/* =========================================
   2. Page Transition & Global Animations
   ========================================= */
.page-transition {
    animation: fadeSlideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fadeSlideUp {
    0% {
        opacity: 0;
        transform: translateY(30px) scale(0.98);
    }

    100% {
        opacity: 1;
        transform: none;
    }
}

.animate-pulse-soft {
    animation: pulseSoft 3s infinite alternate;
}

@keyframes pulseSoft {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(10, 91, 201, 0.4);
    }

    100% {
        transform: scale(1.02);
        box-shadow: 0 0 0 10px rgba(10, 91, 201, 0);
    }
}

.reveal-on-scroll {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* =========================================
   3. Glassmorphism Panels & UI Cards
   ========================================= */
.glass-panel {
    background: var(--bg-glass);
    backdrop-filter: blur(20px) saturate(150%);
    -webkit-backdrop-filter: blur(20px) saturate(150%);
    border: 1px solid var(--border-light);
    border-top: 1px solid rgba(255, 255, 255, 0.9);
    border-left: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-glass);
    transition: var(--transition);
}

.glass-panel:hover {
    background: var(--bg-glass-hover);
    transform: translateY(-5px);
    box-shadow: var(--shadow-float);
}

.card-icon {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin-bottom: 20px;
}

.card-icon.primary {
    background: var(--primary-light);
    color: var(--primary);
}

.card-icon.secondary {
    background: #e0f2fe;
    color: var(--secondary);
}

.card-icon.accent {
    background: #d1fae5;
    color: var(--accent);
}

/* =========================================
   4. Typography & Layout Utilities
   ========================================= */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0;
}

.pt-header {
    padding-top: 120px;
}

.pb-section {
    padding-bottom: 80px;
}

.section-pad {
    padding: 100px 0;
}

.text-primary {
    color: var(--primary);
}

.text-muted {
    color: var(--text-muted);
}

.heading-xl {
    font-size: 4rem;
    font-weight: 800;
    letter-spacing: -1px;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.heading-lg {
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 1rem;
}

.heading-md {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.text-lead {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 60px auto;
}

.section-tag {
    display: inline-block;
    padding: 6px 16px;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 16px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* =========================================
   5. Buttons
   ========================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 28px;
    min-height: 44px;
    min-width: 44px;
    border-radius: var(--radius-full);
    font-weight: 600;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
    box-shadow: 0 8px 16px rgba(10, 91, 201, 0.2);
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 12px 20px rgba(10, 91, 201, 0.3);
}

.btn-glass {
    background: var(--bg-glass);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-light);
    color: var(--text-dark);
}

.btn-glass:hover {
    background: var(--white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-card);
}

/* =========================================
   6. Header Navigation
   ========================================= */
.header {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 1200px;
    z-index: 1000;
    transition: var(--transition);
}

.header.scrolled .nav-container {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(16px);
    border-color: rgba(226, 232, 240, 0.8);
    box-shadow: var(--shadow-glass);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 30px;
    background: var(--bg-glass);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-full);
    transition: var(--transition);
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 800;
    font-size: 1.25rem;
}

.logo i {
    font-size: 1.75rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-list {
    display: flex;
    gap: 24px;
    align-items: center;
}

.nav-link {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-muted);
    padding: 8px 12px;
    border-radius: var(--radius-full);
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary);
    background: var(--primary-light);
}

.mobile-toggle {
    display: none;
    background: transparent;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-dark);
}

/* =========================================
   7. Overview Hero (index.html)
   ========================================= */
.hero-overview {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-stats-floating {
    position: absolute;
    inset: 0;
    z-index: 5;
    pointer-events: none;
    animation: float 6s ease-in-out infinite alternate;
}

.stat-puck {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 15px;
    background: var(--white);
    padding: 12px 24px;
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-float);
    font-weight: 700;
    transition: var(--transition);
    pointer-events: auto;
}

.stat-puck-1 {
    top: 15%;
    left: -40px;
}

.stat-puck-2 {
    bottom: 20%;
    right: -30px;
}

.stat-puck i {
    color: var(--accent);
    font-size: 1.5rem;
}

@keyframes float {
    0% {
        transform: translateY(0);
    }

    100% {
        transform: translateY(-20px);
    }
}

/* =========================================
   8. Clinical Profile (clinical-profile.html)
   ========================================= */
.profile-layout {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 60px;
    align-items: start;
}

.sticky-profile {
    position: sticky;
    top: 120px;
}

.profile-image-card {
    border-radius: var(--radius-lg);
    overflow: hidden;
    position: relative;
    box-shadow: var(--shadow-glass);
}

.profile-image-card img {
    width: 100%;
    height: 500px;
    object-fit: cover;
}

.profile-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    background: var(--white);
    padding: 8px;
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-card);
    overflow-x: auto;
}

.tab-btn {
    padding: 12px 24px;
    border-radius: var(--radius-full);
    border: none;
    background: transparent;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.tab-btn.active {
    background: var(--primary);
    color: var(--white);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeSlideUp 0.5s ease forwards;
}

/* Dashboard Metrics inside Profile */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-top: 40px;
}

.metric-card {
    padding: 24px;
    border-radius: var(--radius-md);
    background: var(--white);
    border: 1px solid var(--border-dark);
}

.metric-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    color: var(--text-muted);
}

.metric-value {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
}

.progress-bg {
    width: 100%;
    height: 8px;
    background: var(--bg-main);
    border-radius: var(--radius-full);
    margin-top: 15px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: var(--secondary);
    width: 0;
    transition: width 1.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Circular Chart */
.circular-chart {
    width: 100px;
    height: 100px;
    position: relative;
}

.circle-bg {
    fill: none;
    stroke: #eee;
    stroke-width: 3.8;
}

.circle {
    fill: none;
    stroke: var(--accent);
    stroke-width: 3.8;
    stroke-linecap: round;
    stroke-dasharray: 0, 100;
    transition: stroke-dasharray 2s ease;
}

.percentage {
    fill: var(--text-dark);
    font-weight: 700;
    text-anchor: middle;
    font-size: 0.5em;
}

/* =========================================
   9. Custom Overrides for Sections
   ========================================= */

/* Grid Utility */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

/* Expertise Cards inside Expertise.html */
.proc-card {
    height: 100%;
    padding: 40px 30px;
    text-align: left;
}

.proc-card:hover .btn-icon {
    background: var(--primary);
    color: var(--white);
    transform: translateX(5px);
}

.btn-icon {
    display: inline-flex;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--primary);
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    margin-top: 20px;
}

/* Category Filters */
.filter-container {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 50px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 24px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-dark);
    background: var(--white);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.filter-btn.active,
.filter-btn:hover {
    background: var(--text-dark);
    color: var(--white);
    border-color: var(--text-dark);
}

/* Timeline for Case Insights */
.timeline {
    position: relative;
    border-left: 2px dashed var(--border-dark);
    padding-left: 40px;
    margin-left: 20px;
}

.timeline-item {
    position: relative;
    margin-bottom: 60px;
}

.timeline-dot {
    position: absolute;
    left: -49px;
    top: 0;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary);
    border: 4px solid var(--primary-light);
}

/* Before/After Testimonials */
.ba-container {
    display: flex;
    gap: 20px;
    margin-top: 20px;
}

.ba-img {
    flex: 1;
    border-radius: var(--radius-sm);
    overflow: hidden;
    position: relative;
}

.ba-label {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 4px 10px;
    font-size: 0.75rem;
    border-radius: 4px;
}

/* Form */
.form-control {
    width: 100%;
    padding: 16px 20px;
    border: 1px solid var(--border-dark);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 1rem;
    background: var(--white);
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-light);
}

/* Footer */
footer {
    background: #061A3A;
    color: var(--text-light);
    padding: 80px 0 40px;
    margin-top: 100px;
    border-top: 1px solid #112d59;
}

footer h4 {
    color: var(--white);
}

footer .text-muted {
    color: #94a3b8 !important;
}

footer .footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 60px;
    margin-bottom: 60px;
}

/* Responsive Adjustments based on Standard Breakpoints */
@media (max-width: 1024px) {
    .profile-layout {
        grid-template-columns: 1fr;
    }

    .sticky-profile {
        position: static;
        margin-bottom: 40px;
    }

    .profile-image-card img {
        height: 400px;
    }

    .hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-content {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .hero-stats-floating {
        position: static;
        display: flex;
        justify-content: center;
        gap: 20px;
        margin-top: 30px;
        animation: none;
        width: 100%;
        height: auto;
    }

    .stat-puck {
        position: static !important;
        width: auto !important;
    }

    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }

    .section-pad {
        padding: 60px 0;
    }

    .footer-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 40px !important;
        text-align: center;
        align-items: center;
    }

    .footer-grid>div {
        width: 100% !important;
        margin-bottom: 20px;
    }
}

@media (max-width: 768px) {
    html {
        font-size: 15px;
    }

    /* Slightly scaled but body text remains readable */
    .heading-xl {
        font-size: 2.75rem;
    }

    .heading-lg {
        font-size: 2.25rem;
    }

    .heading-md {
        font-size: 1.75rem;
    }

    .nav-list {
        display: none;
        position: absolute;
        top: calc(100% + 15px);
        left: 0;
        width: 100%;
        background: var(--white);
        flex-direction: column;
        padding: 30px;
        border-radius: var(--radius-md);
        box-shadow: var(--shadow-float);
        border: 1px solid var(--border-dark);
    }

    .nav-list.active {
        display: flex;
        animation: slideDown 0.3s ease;
    }

    .mobile-toggle {
        display: block;
    }

    .grid-3,
    .grid-2 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 425px) {
    .heading-xl {
        font-size: 2.25rem;
    }

    .heading-lg {
        font-size: 1.85rem;
    }

    .btn {
        width: 100%;
        height: 48px;
    }

    /* Improved touch target height for mobile L */
    .hero-visual {
        width: 100%;
    }

    .glass-panel {
        padding: 25px !important;
    }

    .header {
        width: 100%;
        top: 0;
        left: 0;
        transform: none;
        border-radius: 0;
    }

    .nav-container {
        border-radius: 0;
        border-left: none;
        border-right: none;
        border-top: none;
        padding: 10px 15px;
    }

    .mesh-bg {
        display: none;
    }
}

@media (max-width: 320px) {
    .heading-xl {
        font-size: 2rem;
    }

    .container {
        width: 95%;
    }

    /* Extra snug for absolute minimum width */
    .stat-puck {
        padding: 10px 15px;
        font-size: 0.85rem;
    }
}

/* =========================================
   10. Masonry Grid & Lightbox
   ========================================= */
.masonry-grid {
    column-count: 3;
    column-gap: 20px;
}

@media (max-width: 900px) {
    .masonry-grid {
        column-count: 2;
    }
}

@media (max-width: 600px) {
    .masonry-grid {
        column-count: 1;
    }
}

.masonry-item {
    break-inside: avoid;
    margin-bottom: 20px;
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: pointer;
    box-shadow: var(--shadow-card);
}

.masonry-item img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s ease;
}

.masonry-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 91, 201, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    opacity: 0;
    transition: opacity 0.3s;
}

.masonry-item:hover .masonry-overlay {
    opacity: 1;
}

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

/* Lightbox */
.lb {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.95);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    transition: opacity 0.3s;
}

.lb.active {
    display: flex;
    opacity: 1;
}

.lb-content {
    background: var(--white);
    border-radius: var(--radius-md);
    width: 80%;
    height: 60vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-dark);
    position: relative;
    font-size: 1.5rem;
    font-weight: bold;
}

.lb-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 2.5rem;
    color: #fff;
    cursor: pointer;
    z-index: 2001;
    transition: transform 0.3s;
}

.lb-close:hover {
    transform: scale(1.1);
    color: var(--secondary);
}

/* =========================================
   11. Zig-Zag Surgical Timeline
   ========================================= */
.timeline-section {
    position: relative;
    padding: 100px 0;
    background: var(--bg-main);
    overflow: hidden;
}

/* Filter Container for Timeline */
.timeline-filters {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 60px;
    flex-wrap: wrap;
}

/* The Tree Wrapper */
.timeline-tree {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 0;
}

/* The Central Connecting Line */
.timeline-tree::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 100%;
    background: rgba(10, 91, 201, 0.15);
    /* Light blue track */
    border-radius: 10px;
}

.timeline-line-fill {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 0%;
    /* Grows via JS */
    background: linear-gradient(180deg, var(--secondary), var(--primary));
    border-radius: 10px;
    z-index: 1;
    transition: height 0.5s ease-out;
}

/* Individual Node Row */
.tl-node {
    position: relative;
    width: 100%;
    display: flex;
    justify-content: center;
    margin-bottom: 80px;
    opacity: 0;
    transform: translateY(40px);
    /* JS fades them in */
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.tl-node.visible {
    opacity: 1;
    transform: translateY(0);
}

/* The Center Circle Marker */
.tl-marker {
    position: absolute;
    left: 50%;
    top: 40px;
    transform: translate(-50%, -50%);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--white);
    border: 5px solid var(--primary);
    z-index: 2;
    box-shadow: 0 0 15px rgba(10, 91, 201, 0.4);
    transition: var(--transition);
}

.tl-node:hover .tl-marker {
    transform: translate(-50%, -50%) scale(1.3);
    background: var(--accent);
    border-color: var(--white);
}

/* Halves: 50% width on left and right */
.tl-content-side,
.tl-image-side {
    width: 45%;
    padding: 0 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Odd Rows: Content Left, Image Right */
.tl-node:nth-child(odd) {
    flex-direction: row;
}

.tl-node:nth-child(odd) .tl-content-side {
    align-items: flex-end;
    text-align: right;
}

/* Even Rows: Image Left, Content Right */
.tl-node:nth-child(even) {
    flex-direction: row-reverse;
}

.tl-node:nth-child(even) .tl-content-side {
    align-items: flex-start;
    text-align: left;
}

/* The Content Box */
.tl-card {
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    border-radius: var(--radius-md);
    padding: 30px;
    box-shadow: var(--shadow-card);
    transition: var(--transition);
    position: relative;
    border: 1px solid var(--border-light);
    width: 100%;
    text-align: inherit;
}

.tl-node:hover .tl-card {
    transform: translateY(-5px);
    box-shadow: var(--shadow-float);
    background: var(--bg-glass-hover);
}

.tl-date {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 5px;
    font-weight: 600;
    display: block;
}

.tl-title {
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 10px;
    font-weight: 800;
}

.tl-desc {
    color: var(--text-muted);
    font-size: 1rem;
}

.tl-tags {
    display: flex;
    gap: 8px;
    margin-top: 15px;
    flex-wrap: wrap;
    justify-content: inherit;
}

.tl-tag {
    background: var(--primary-light);
    color: var(--primary);
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

/* Expanded Details Accordion */
.tl-expanded {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.5s ease, opacity 0.5s ease;
    margin-top: 0;
    text-align: inherit;
}

.tl-expanded.open {
    max-height: 600px;
    opacity: 1;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px dashed var(--border-dark);
}

.btn-expand {
    background: none;
    border: none;
    color: var(--secondary);
    font-weight: 600;
    cursor: pointer;
    margin-top: 15px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.95rem;
}

.btn-expand:hover {
    color: var(--primary);
}

/* The Image Side */
.tl-img-wrapper {
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    display: block;
    height: 100%;
    border: 1px solid var(--border-light);
}

.tl-img-wrapper img {
    width: 100%;
    height: 350px;
    object-fit: cover;
    transition: transform 0.8s ease;
}

.tl-node:hover .tl-img-wrapper img {
    transform: scale(1.08);
}

/* Mobile Logic */
@media (max-width: 900px) {

    .timeline-tree::before,
    .timeline-line-fill {
        left: 40px;
    }

    .tl-node,
    .tl-node:nth-child(odd),
    .tl-node:nth-child(even) {
        flex-direction: column;
        margin-bottom: 60px;
    }

    .tl-marker {
        left: 40px;
        transform: translate(-50%, 0);
        top: 0;
    }

    .tl-node:hover .tl-marker {
        transform: translate(-50%, 0) scale(1.3);
    }

    .tl-content-side,
    .tl-image-side {
        width: 100%;
        padding: 0 0 0 90px;
        text-align: left !important;
        align-items: flex-start !important;
    }

    .tl-image-side {
        margin-top: 20px;
    }

    .tl-img-wrapper img {
        height: 250px;
    }

    .tl-tags {
        justify-content: flex-start !important;
    }
}

/* =========================================
   12. Success Stories Marquee
   ========================================= */
.marquee-section {
    padding: 100px 0;
    background: var(--bg-main);
    overflow: hidden;
    position: relative;
}

.marquee-wrapper {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 30px;
    padding: 20px 0;
    overflow: hidden;
}

.marquee {
    display: flex;
    flex-wrap: nowrap;
    overflow: hidden;
    user-select: none;
    gap: 30px;
}

.marquee-content {
    display: flex;
    flex-shrink: 0;
    min-width: 100%;
    gap: 30px;
    justify-content: flex-around;
    align-items: center;
    animation: scroll var(--scroll-duration) linear infinite;
}

.marquee:hover .marquee-content {
    animation-play-state: paused;
}

.marquee-row-1 {
    --scroll-duration: 45s;
}

.marquee-row-2 {
    --scroll-duration: 55s;
}

/* Slightly different speed for variation */

@keyframes scroll {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(calc(-100% - 30px));
    }
}

/* Duplicating content gives seamless scroll when translateX hits -100% */
.story-card {
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 30px;
    width: 380px;
    max-width: 85vw;
    box-shadow: var(--shadow-glass);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    gap: 15px;
    white-space: normal;
}

.story-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-float);
    background: var(--bg-glass-hover);
    border-color: var(--primary-light);
}

.story-header {
    display: flex;
    align-items: center;
    gap: 15px;
}

.story-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: bold;
    flex-shrink: 0;
}

.story-name {
    font-weight: 700;
    color: var(--primary);
    font-size: 1.1rem;
}

.story-text {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.story-rating {
    color: #f59e0b;
    font-size: 0.85rem;
    margin-top: 5px;
}

/* =========================================
   13. Floating WhatsApp Button
   ========================================= */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: #25d366;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    box-shadow: 0px 4px 15px rgba(37, 211, 102, 0.4);
    z-index: 1000;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    text-decoration: none;
}

.whatsapp-float:hover {
    transform: scale(1.1) translateY(-5px);
    box-shadow: 0px 8px 25px rgba(37, 211, 102, 0.6);
    color: white;
}

.wa-tooltip {
    position: absolute;
    right: 80px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--white);
    color: var(--text-dark);
    padding: 10px 18px;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-weight: 600;
    box-shadow: var(--shadow-glass);
    border: 1px solid var(--border-dark);
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
}

.wa-tooltip::after {
    content: '';
    position: absolute;
    top: 50%;
    right: -6px;
    transform: translateY(-50%);
    border-width: 6px 0 6px 6px;
    border-style: solid;
    border-color: transparent transparent transparent var(--border-dark);
}

.wa-tooltip::before {
    content: '';
    position: absolute;
    top: 50%;
    right: -5px;
    transform: translateY(-50%);
    border-width: 5px 0 5px 5px;
    border-style: solid;
    border-color: transparent transparent transparent var(--white);
    z-index: 1;
}

.whatsapp-float:hover .wa-tooltip {
    opacity: 1;
    visibility: visible;
    right: 75px;
}

/* =========================================
   14. Premium Background Meshes
   ========================================= */
.mesh-bg {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    z-index: -1;
    pointer-events: none;
    opacity: 0.6;
}

.mesh-1 {
    top: 5%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    animation: drift 20s infinite alternate;
}

.mesh-2 {
    top: 50%;
    left: -15%;
    width: 500px;
    height: 500px;
    background: linear-gradient(135deg, var(--accent), var(--secondary));
    animation: drift 25s infinite alternate-reverse;
}

@keyframes drift {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(60px, -60px) scale(1.2);
    }
}

/* =========================================
   15. Instagram Reel Hybrid Overrides
   ========================================= */
.reel-card {
    transition: var(--transition);
}

.reel-container {
    position: relative;
    width: 100%;
    aspect-ratio: 9/16;
    background: #000;
    overflow: hidden;
    border-radius: var(--radius-sm);
    box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.5);
}

/* Force official Instagram embed to behave within our cropping container */
.reel-container iframe.instagram-media-rendered {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    height: calc(100% + 200px) !important;
    /* Oversize height to push footer out */
    border: none !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #000 !important;
}

/* Ensure blockquote doesn't show during loading if possible */
.instagram-media {
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    background: transparent !important;
}