/* ==========================================================================
   Al-Muhajireen Mosque & Islamic Community Center — Google Stitch Design System
   Bootstrap 5 + Custom Design Tokens (Warm Ivory, Deep Evergreen, Rich Bronze)
   Typography: Cormorant Garamond | Plus Jakarta Sans | Amiri (Arabic)
   ========================================================================== */

:root {
    --surface: #fcf9f2;
    --surface-bright: #fcf9f2;
    --surface-dim: #dcdad3;
    --surface-container-lowest: #ffffff;
    --surface-container-low: #f6f3ec;
    --surface-container: #f0eee7;
    --surface-container-high: #ebe8e1;
    --surface-container-highest: #e5e2db;
    --surface-variant: #e5e2db;

    --on-surface: #1c1c18;
    --on-surface-variant: #3f4944;
    --deep-ink: #111827;
    --outline: #6f7973;
    --outline-variant: #bec9c2;

    --primary: #004532;
    --on-primary: #ffffff;
    --primary-container: #065f46;
    --on-primary-container: #8bd6b7;
    --primary-fixed: #a6f2d1;
    --emerald-legacy: #059669;

    --secondary: #9b4500;
    --on-secondary: #ffffff;
    --secondary-container: #fd8a42;
    --on-secondary-container: #682c00;
    --secondary-fixed: #ffdbca;
    --warm-gold: #FCD34D;

    --tertiary: #652925;
    --tertiary-container: #823f3a;
    --error: #ba1a1a;
    --error-container: #ffdad6;

    --font-display: 'Cormorant Garamond', Georgia, serif;
    --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-arabic: 'Amiri', 'Traditional Arabic', serif;

    --shadow-card: 0 4px 20px -2px rgba(17, 24, 39, 0.06);
    --shadow-lift: 0 10px 28px -4px rgba(6, 95, 70, 0.13);
    --shadow-xl: 0 20px 40px -8px rgba(17, 24, 39, 0.12);

    --radius-sm: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;

    /* Override Bootstrap 5 core palette to Stitch tokens */
    --bs-primary: #004532;
    --bs-primary-rgb: 0, 69, 50;
    --bs-secondary: #9b4500;
    --bs-secondary-rgb: 155, 69, 0;
    --bs-body-bg: #fcf9f2;
    --bs-body-color: #1c1c18;
    --bs-body-font-family: 'Plus Jakarta Sans', sans-serif;
    --bs-link-color: #004532;
    --bs-link-hover-color: #059669;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--surface);
    color: var(--on-surface);
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.625;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* Stitch Typography Hierarchy */
.font-display-lg {
    font-family: var(--font-display);
    font-size: clamp(2.25rem, 4vw, 3.5rem);
    font-weight: 600;
    line-height: 1.14;
    letter-spacing: -0.02em;
}

.font-headline-lg {
    font-family: var(--font-display);
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.01em;
}

.font-headline-md {
    font-family: var(--font-display);
    font-size: clamp(1.45rem, 2.2vw, 1.75rem);
    font-weight: 600;
    line-height: 1.28;
}

.font-headline-sm {
    font-family: var(--font-display);
    font-size: 1.375rem;
    font-weight: 600;
    line-height: 1.3;
}

.font-title-lg {
    font-family: var(--font-sans);
    font-size: 1.125rem;
    font-weight: 600;
    line-height: 1.45;
}

.font-title-md {
    font-family: var(--font-sans);
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.5;
}

.font-body-lg {
    font-family: var(--font-sans);
    font-size: 1.125rem;
    font-weight: 400;
    line-height: 1.6;
}

.font-body-md {
    font-family: var(--font-sans);
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.625;
}

.font-body-sm {
    font-family: var(--font-sans);
    font-size: 0.875rem;
    font-weight: 400;
    line-height: 1.57;
}

.font-label-md {
    font-family: var(--font-sans);
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.35;
    letter-spacing: 0.06em;
}

/* Exact Arabic Script Styles (Amiri — Matching Stitch UI 100%) */
.font-arabic-display {
    font-family: var(--font-arabic) !important;
    font-size: clamp(1.5rem, 2.6vw, 2rem);
    font-weight: 700;
    line-height: 1.75;
    direction: rtl;
    unicode-bidi: isolate;
}

.font-arabic-body {
    font-family: var(--font-arabic) !important;
    font-size: 1.25rem;
    font-weight: 400;
    line-height: 1.8;
    direction: rtl;
    unicode-bidi: isolate;
}

.tabular-nums {
    font-variant-numeric: tabular-nums;
}

/* Stitch Surface & Color Helpers */
.bg-surface { background-color: var(--surface) !important; }
.bg-surface-lowest { background-color: var(--surface-container-lowest) !important; }
.bg-surface-low { background-color: var(--surface-container-low) !important; }
.bg-surface-container { background-color: var(--surface-container) !important; }
.bg-surface-high { background-color: var(--surface-container-high) !important; }
.bg-primary-stitch { background-color: var(--primary) !important; color: var(--on-primary) !important; }
.bg-primary-container-stitch { background-color: var(--primary-container) !important; color: var(--on-primary) !important; }
.bg-secondary-stitch { background-color: var(--secondary) !important; color: var(--on-secondary) !important; }
.bg-deep-ink { background-color: var(--deep-ink) !important; color: #ffffff !important; }

.text-primary-stitch { color: var(--primary) !important; }
.text-secondary-stitch { color: var(--secondary) !important; }
.text-warm-gold { color: var(--warm-gold) !important; }
.text-emerald-legacy { color: var(--emerald-legacy) !important; }
.text-muted-stitch { color: var(--on-surface-variant) !important; }
.text-deep-ink { color: var(--deep-ink) !important; }

/* Material Symbols alignment */
.material-symbols-outlined {
    vertical-align: middle;
    line-height: 1;
    user-select: none;
}

/* ==========================================================================
   Header & Navigation — Zero-Lag GPU Transparent → Floating Oval Pill
   Slightly Larger Balanced Sizing, Zero Reflow, Zero Overlap, 60fps Smooth
   ========================================================================== */
.stitch-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1030;
    background: transparent;
    pointer-events: none;
    transform: translate3d(0, 0, 0);
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: transform;
}

.stitch-header.is-scrolled {
    transform: translate3d(0, -34px, 0);
}

.stitch-header > * {
    pointer-events: auto;
}

/* Top Emerald Utility Bar — GPU opacity fade (zero height reflow!) */
.stitch-topbar {
    background-color: rgba(0, 69, 50, 0.96);
    color: var(--on-primary);
    height: 34px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    overflow: hidden;
    transition: opacity 0.24s ease;
}

body.has-dark-hero .stitch-topbar {
    background-color: rgba(0, 38, 27, 0.78);
    border-bottom: 1px solid rgba(252, 211, 77, 0.16);
}

.stitch-header.is-scrolled .stitch-topbar {
    opacity: 0;
    pointer-events: none;
}

.stitch-topbar a {
    color: var(--on-primary);
    text-decoration: none;
}

.stitch-topbar a:hover {
    color: var(--warm-gold);
}

/* Nav Shell — GPU translate into floating margin (zero padding animation!) */
.stitch-nav-shell {
    width: 100%;
    padding: 0 22px;
    transform: translate3d(0, 0, 0);
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.stitch-header.is-scrolled .stitch-nav-shell {
    transform: translate3d(0, 12px, 0);
}

.stitch-navbar {
    max-width: 1380px;
    min-height: 70px;
    width: 100%;
    margin: 0 auto;
    padding: 0.5rem 0.9rem;
    background-color: transparent;
    border: 1px solid transparent;
    border-radius: 9999px;
    box-shadow: 0 0 0 rgba(0, 0, 0, 0);
    transform: translateZ(0);
    transition: background-color 0.28s ease,
                border-color 0.28s ease,
                box-shadow 0.28s ease;
}

.stitch-navbar-inner {
    max-width: 100%;
    padding-left: 0.45rem;
    padding-right: 0.45rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.55rem;
}

.stitch-logo-frame {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.96);
    padding: 3.5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    flex-shrink: 0;
    transition: box-shadow 0.25s ease;
}

.stitch-logo-frame img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.stitch-brand-title {
    color: var(--primary);
    font-size: 1.18rem;
    white-space: nowrap;
    transition: color 0.25s ease;
}

.stitch-brand-sub {
    color: var(--on-surface-variant);
    font-size: 0.62rem;
    letter-spacing: 0.09em;
    white-space: nowrap;
    transition: color 0.25s ease;
}

.stitch-nav-list {
    gap: 0.16rem;
}

.stitch-nav-link {
    font-family: var(--font-sans);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--on-surface) !important;
    padding: 0.5rem 0.76rem !important;
    border-radius: 9999px;
    transition: color 0.2s ease, background-color 0.2s ease;
    white-space: nowrap;
}

.stitch-nav-link:hover {
    color: var(--primary) !important;
    background-color: rgba(0, 69, 50, 0.08);
}

.stitch-nav-link.active {
    background-color: var(--primary);
    color: #ffffff !important;
    font-weight: 700;
    box-shadow: 0 4px 12px -3px rgba(0, 69, 50, 0.35);
}

.stitch-nav-donate {
    border-radius: 9999px !important;
    padding: 0.54rem 1.14rem !important;
    font-size: 0.86rem !important;
    white-space: nowrap;
    box-shadow: 0 6px 16px -4px rgba(155, 69, 0, 0.38);
}

.stitch-account-btn {
    width: 40px;
    height: 40px;
    background-color: var(--primary);
    color: #ffffff;
    border: 1.5px solid rgba(0, 69, 50, 0.2);
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.stitch-account-btn:hover {
    background-color: var(--emerald-legacy);
    color: #ffffff;
    transform: translateY(-1px);
}

.stitch-toggler {
    color: var(--primary);
}

/* Transparent Menu Bar Over Dark Hero (Default Unscrolled State) */
body.has-dark-hero .stitch-header:not(.is-scrolled) .stitch-navbar {
    background-color: transparent;
}

body.has-dark-hero .stitch-header:not(.is-scrolled) .stitch-brand-title {
    color: #ffffff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}

body.has-dark-hero .stitch-header:not(.is-scrolled) .stitch-brand-sub {
    color: var(--warm-gold);
    opacity: 0.96;
}

body.has-dark-hero .stitch-header:not(.is-scrolled) .stitch-logo-frame {
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28), 0 0 0 1.5px rgba(252, 211, 77, 0.55);
}

body.has-dark-hero .stitch-header:not(.is-scrolled) .stitch-nav-link {
    color: rgba(255, 255, 255, 0.95) !important;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.34);
}

body.has-dark-hero .stitch-header:not(.is-scrolled) .stitch-nav-link:hover {
    color: var(--warm-gold) !important;
    background-color: rgba(255, 255, 255, 0.14);
}

body.has-dark-hero .stitch-header:not(.is-scrolled) .stitch-nav-link.active {
    background-color: rgba(252, 211, 77, 0.22);
    color: var(--warm-gold) !important;
    border: 1px solid rgba(252, 211, 77, 0.52);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}

body.has-dark-hero .stitch-header:not(.is-scrolled) .stitch-account-btn {
    background-color: rgba(0, 52, 37, 0.72);
    color: #ffffff;
    border-color: rgba(252, 211, 77, 0.5);
}

body.has-dark-hero .stitch-header:not(.is-scrolled) .stitch-account-btn:hover {
    background-color: var(--warm-gold);
    color: var(--primary);
}

body.has-dark-hero .stitch-header:not(.is-scrolled) .stitch-toggler {
    color: #ffffff;
}

/* ==========================================================================
   SCROLLED STATE: Crisp Floating Oval Pill Menu Bar (60fps Composited!)
   ========================================================================== */
.stitch-header.is-scrolled .stitch-navbar {
    background-color: rgba(252, 249, 242, 0.96);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-color: rgba(0, 69, 50, 0.14);
    box-shadow: 0 14px 34px -8px rgba(0, 45, 32, 0.18), 0 4px 12px rgba(17, 24, 39, 0.06);
}

/* Precision Desktop Fit Inside Oval Pill (Zero Overlapping / Wrapping / Clipping) */
@media (min-width: 1200px) and (max-width: 1379.98px) {
    .stitch-nav-shell {
        padding: 0 14px;
    }
    .stitch-navbar {
        padding: 0.45rem 0.65rem;
    }
    .stitch-navbar-inner {
        flex-wrap: nowrap !important;
    }
    .stitch-logo-frame {
        width: 38px;
        height: 38px;
    }
    .stitch-brand-title {
        font-size: 1.02rem !important;
    }
    .stitch-brand-sub {
        font-size: 0.56rem !important;
    }
    .stitch-nav-list {
        gap: 0.06rem;
    }
    .stitch-nav-link {
        font-size: 0.83rem !important;
        padding: 0.44rem 0.55rem !important;
    }
    .stitch-nav-donate {
        padding: 0.48rem 0.92rem !important;
        font-size: 0.81rem !important;
    }
    .stitch-account-btn {
        width: 36px;
        height: 36px;
    }
}

@media (min-width: 1380px) {
    .stitch-navbar-inner {
        flex-wrap: nowrap !important;
    }
    .stitch-nav-list {
        gap: 0.18rem;
    }
    .stitch-nav-link {
        font-size: 0.9rem;
        padding: 0.5rem 0.74rem !important;
    }
}

/* Mobile & Tablet Collapse Drawer Inside Oval Bar */
@media (max-width: 1199.98px) {
    .stitch-nav-shell {
        padding: 0 12px;
    }
    .stitch-navbar {
        border-radius: 30px;
        min-height: 64px;
        padding: 0.45rem 0.6rem;
    }
    .stitch-navbar .navbar-collapse {
        background: rgba(252, 249, 242, 0.98);
        border-radius: 20px;
        padding: 0.65rem 0.9rem;
        margin-top: 0.65rem;
        border: 1px solid rgba(0, 69, 50, 0.1);
        box-shadow: 0 18px 40px -10px rgba(0, 45, 32, 0.22);
    }
    body.has-dark-hero .stitch-header:not(.is-scrolled) .navbar-collapse .stitch-nav-link {
        color: var(--on-surface) !important;
        text-shadow: none;
    }
    body.has-dark-hero .stitch-header:not(.is-scrolled) .navbar-collapse .stitch-nav-link.active {
        background-color: var(--primary);
        color: #ffffff !important;
        border-color: transparent;
    }
}

.main-offset {
    padding-top: 112px;
}

body.has-dark-hero .main-offset {
    padding-top: 0;
}

body.has-dark-hero .stitch-flash-wrap {
    position: fixed;
    top: 114px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1035;
    width: min(760px, calc(100% - 32px));
    padding-top: 0 !important;
}

/* GPU-Composited Live Pulse Dot (Zero box-shadow Repaints!) */
.live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    animation: pulseLive 1.8s ease-in-out infinite;
}

@keyframes pulseLive {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.38); opacity: 0.55; }
}

/* Stitch Buttons */
.btn-stitch-primary {
    background-color: var(--primary);
    color: #ffffff;
    border: 1px solid var(--primary);
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.875rem;
    padding: 0.65rem 1.3rem;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    text-decoration: none;
}

.btn-stitch-primary:hover, .btn-stitch-primary:focus {
    background-color: var(--emerald-legacy);
    border-color: var(--emerald-legacy);
    color: #ffffff;
    box-shadow: var(--shadow-lift);
    transform: translateY(-1px);
}

.btn-stitch-secondary {
    background-color: var(--secondary);
    color: #ffffff;
    border: 1px solid var(--secondary);
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.875rem;
    padding: 0.65rem 1.3rem;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    text-decoration: none;
}

.btn-stitch-secondary:hover, .btn-stitch-secondary:focus {
    background-color: var(--secondary-container);
    border-color: var(--secondary-container);
    color: var(--on-secondary-container);
    box-shadow: var(--shadow-lift);
    transform: translateY(-1px);
}

.btn-stitch-gold {
    background-color: var(--warm-gold);
    color: var(--primary);
    border: 1px solid var(--warm-gold);
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 0.875rem;
    padding: 0.65rem 1.3rem;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    text-decoration: none;
}

.btn-stitch-gold:hover {
    background-color: #ffffff;
    color: var(--primary);
}

.btn-stitch-outline {
    background-color: transparent;
    color: var(--primary);
    border: 1px solid var(--primary);
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.875rem;
    padding: 0.6rem 1.25rem;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    text-decoration: none;
}

.btn-stitch-outline:hover {
    background-color: rgba(0, 69, 50, 0.07);
    color: var(--primary);
}

.btn-stitch-soft {
    background-color: var(--surface-container-high);
    color: var(--on-surface);
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.875rem;
    padding: 0.65rem 1.25rem;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    text-decoration: none;
}

.btn-stitch-soft:hover {
    background-color: var(--primary);
    color: #ffffff;
}

/* Stitch Cards & Elevation */
.stitch-card {
    background-color: var(--surface-container-lowest);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    border: 1px solid rgba(6, 95, 70, 0.05);
    transition: all 0.25s ease;
}

.stitch-card-hover:hover {
    box-shadow: var(--shadow-lift);
    border-color: rgba(6, 95, 70, 0.14);
    transform: translateY(-2px);
}

.stitch-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border-radius: 9999px;
    padding: 0.32rem 0.85rem;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    background-color: var(--surface-container-high);
    color: var(--on-surface);
}

.stitch-chip-primary {
    background-color: rgba(0, 69, 50, 0.1);
    color: var(--primary);
}

.stitch-chip-secondary {
    background-color: rgba(155, 69, 0, 0.12);
    color: var(--secondary);
}

.stitch-chip-gold {
    background-color: rgba(252, 211, 77, 0.22);
    color: var(--warm-gold);
}

/* ==========================================================================
   Hero Banner & Multi-Slide Cross-Fade Slider (Crystal-Clear Foreground!)
   ========================================================================== */
.stitch-hero {
    position: relative;
    min-height: 600px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    overflow: hidden;
    background-color: #002d20;
}

.stitch-hero:not(.stitch-hero-slider)::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(95deg, rgba(0, 52, 37, 0.92) 0%, rgba(0, 69, 50, 0.76) 55%, rgba(0, 45, 32, 0.35) 100%);
}

.stitch-hero > .container,
.stitch-hero > .container-xl,
.hero-foreground {
    position: relative;
    z-index: 5;
}

/* Multi-Slide Hero Specifics (100% GPU-Composited, Zero Reflows!) */
.stitch-hero-slider {
    min-height: 700px;
    contain: layout paint style;
}

.hero-bg-layers {
    position: absolute;
    inset: 0;
    z-index: 1;
    overflow: hidden;
}

.hero-bg-slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transform: translate3d(0, 0, 0) scale(1.045);
    transition: opacity 0.95s cubic-bezier(0.4, 0, 0.2, 1),
                transform 6.5s ease-out;
}

.hero-bg-slide.is-active {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
    will-change: opacity, transform;
}

.hero-scrim {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    background:
        linear-gradient(95deg, rgba(0, 38, 27, 0.92) 0%, rgba(0, 58, 42, 0.76) 48%, rgba(0, 42, 30, 0.38) 100%),
        linear-gradient(180deg, rgba(0, 28, 20, 0.56) 0%, transparent 28%, rgba(0, 28, 20, 0.34) 100%);
}

.hero-foreground {
    padding-top: 142px;
    padding-bottom: 112px;
}

.hero-slides-stage {
    display: grid;
    grid-template-columns: 1fr;
    align-items: center;
}

.hero-content-slide {
    grid-area: 1 / 1;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.55s ease, visibility 0.55s ease;
}

.hero-content-slide.is-active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* Staggered Cross-Fade Entrance for Slide Text & Buttons */
.hero-anim-1,
.hero-anim-2,
.hero-anim-3,
.hero-anim-4 {
    opacity: 0;
    transform: translate3d(0, 16px, 0);
    transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.hero-content-slide.is-active .hero-anim-1 {
    opacity: 1;
    transform: translate3d(0, 0, 0);
    transition-delay: 0.06s;
}

.hero-content-slide.is-active .hero-anim-2 {
    opacity: 1;
    transform: translate3d(0, 0, 0);
    transition-delay: 0.14s;
}

.hero-content-slide.is-active .hero-anim-3 {
    opacity: 1;
    transform: translate3d(0, 0, 0);
    transition-delay: 0.24s;
}

.hero-content-slide.is-active .hero-anim-4 {
    opacity: 1;
    transform: translate3d(0, 0, 0);
    transition-delay: 0.34s;
}

.hero-eyebrow-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.4rem 0.95rem;
    border-radius: 9999px;
    background: rgba(0, 40, 29, 0.84);
    border: 1px solid rgba(252, 211, 77, 0.52);
    color: var(--warm-gold);
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22);
}

.hero-gold-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--warm-gold);
    animation: pulseLive 2s ease-in-out infinite;
}

.hero-headline {
    color: #ffffff !important;
    font-size: clamp(2.45rem, 4.4vw, 3.85rem);
    font-weight: 700;
    line-height: 1.1;
    text-shadow: 0 4px 24px rgba(0, 0, 0, 0.38);
}

.hero-subtitle {
    color: rgba(255, 255, 255, 0.95) !important;
    max-width: 650px;
    font-weight: 400;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.32);
}

.hero-announcement-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.62rem 1.05rem;
    border-radius: 0.75rem;
    background: rgba(0, 56, 40, 0.9);
    border: 1px solid rgba(252, 211, 77, 0.5);
    color: #ffffff;
    font-size: 0.875rem;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.24);
}

/* Crisp, High-Contrast Solid Hero Buttons */
.btn-hero-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.88rem 1.65rem;
    border-radius: 9999px;
    background: linear-gradient(135deg, #c25905 0%, #9b4500 100%);
    color: #ffffff !important;
    font-weight: 700;
    font-size: 0.93rem;
    text-decoration: none;
    border: 1.5px solid rgba(252, 211, 77, 0.45);
    box-shadow: 0 10px 26px -6px rgba(155, 69, 0, 0.65);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.btn-hero-primary:hover {
    background: linear-gradient(135deg, #d8670c 0%, #b55200 100%);
    transform: translateY(-2px);
    box-shadow: 0 14px 30px -6px rgba(155, 69, 0, 0.75);
}

.btn-hero-ivory {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.88rem 1.65rem;
    border-radius: 9999px;
    background: #fcf9f2;
    color: #004532 !important;
    font-weight: 700;
    font-size: 0.93rem;
    text-decoration: none;
    border: 1.5px solid #fcf9f2;
    box-shadow: 0 10px 26px -6px rgba(0, 0, 0, 0.35);
    transition: transform 0.22s ease, background-color 0.22s ease, box-shadow 0.22s ease;
}

.btn-hero-ivory:hover {
    background: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 14px 30px -6px rgba(0, 0, 0, 0.45);
}

.btn-hero-glass {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.88rem 1.5rem;
    border-radius: 9999px;
    background: rgba(0, 56, 40, 0.88);
    color: #ffffff !important;
    font-weight: 600;
    font-size: 0.93rem;
    text-decoration: none;
    border: 1.5px solid rgba(252, 211, 77, 0.55);
    box-shadow: 0 10px 24px -8px rgba(0, 0, 0, 0.35);
    transition: transform 0.22s ease, background-color 0.22s ease, border-color 0.22s ease;
}

.btn-hero-glass:hover {
    background: rgba(6, 95, 70, 0.96);
    border-color: var(--warm-gold);
    transform: translateY(-2px);
}

/* Hero Slider Controls & GPU-Accelerated Progress Pills (Zero Width Reflow!) */
.hero-controls-bar {
    padding-top: 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.16);
}

.hero-dot-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.38rem 0.72rem;
    border-radius: 9999px;
    background: rgba(0, 35, 25, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.24);
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.72rem;
    font-weight: 700;
    cursor: pointer;
    transition: border-color 0.22s ease, color 0.22s ease, background-color 0.22s ease;
}

.hero-dot-btn:hover {
    border-color: rgba(252, 211, 77, 0.65);
    color: #ffffff;
}

.hero-dot-btn.is-active {
    background: rgba(0, 52, 37, 0.92);
    border-color: var(--warm-gold);
    color: var(--warm-gold);
}

.hero-dot-track {
    width: 34px;
    height: 3px;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.22);
    overflow: hidden;
    display: none;
}

.hero-dot-btn.is-active .hero-dot-track {
    display: block;
}

.hero-dot-fill {
    display: block;
    width: 100%;
    height: 100%;
    background: var(--warm-gold);
    border-radius: 99px;
    transform-origin: left center;
    transform: scaleX(0);
}

.hero-dot-btn.is-active .hero-dot-fill {
    animation: heroProgressFill 6.5s linear forwards;
}

.stitch-hero-slider.is-paused .hero-dot-btn.is-active .hero-dot-fill {
    animation-play-state: paused;
}

@keyframes heroProgressFill {
    from { transform: scaleX(0); }
    to { transform: scaleX(1); }
}

.hero-arrow-btn {
    width: 40px;
    height: 40px;
    border-radius: 9999px;
    background: rgba(0, 42, 30, 0.82);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
    cursor: pointer;
    backdrop-filter: blur(8px);
    transition: all 0.25s ease;
}

.hero-arrow-btn:hover {
    background: var(--warm-gold);
    border-color: var(--warm-gold);
    color: var(--primary);
    transform: translateY(-2px);
}

/* Prayer Cards */
.prayer-card {
    background-color: var(--surface-container-low);
    border-radius: var(--radius-md);
    padding: 1rem;
    transition: all 0.25s ease;
    border: 1px solid rgba(6, 95, 70, 0.06);
}

.prayer-card.is-next {
    background-color: var(--primary);
    color: #ffffff;
    box-shadow: var(--shadow-lift);
    transform: translateY(-3px);
}

.prayer-card.is-next .text-muted-stitch {
    color: rgba(255, 255, 255, 0.82) !important;
}

/* Stitch Form Inputs */
.form-control, .form-select {
    background-color: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: var(--radius-sm);
    padding: 0.68rem 0.95rem;
    font-size: 0.9375rem;
    color: var(--on-surface);
    transition: all 0.2s ease;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(6, 95, 70, 0.16);
}

.form-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--on-surface);
    margin-bottom: 0.4rem;
}

/* Progress Bars */
.stitch-progress {
    height: 10px;
    background-color: var(--surface-container-high);
    border-radius: 9999px;
    overflow: hidden;
}

.stitch-progress-bar {
    height: 100%;
    border-radius: 9999px;
    background-color: var(--primary);
    transition: width 0.6s ease;
}

.stitch-progress-bar.bg-emerald { background-color: var(--emerald-legacy); }
.stitch-progress-bar.bg-bronze { background-color: var(--secondary); }

/* Amount Buttons in Donation Terminal */
.donation-amount-btn {
    border: 1.5px solid transparent;
    background-color: var(--surface-container);
    color: var(--on-surface);
    border-radius: var(--radius-sm);
    padding: 0.85rem 0.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
}

.donation-amount-btn:hover {
    background-color: var(--primary-fixed);
    color: var(--primary);
}

.donation-amount-btn.active {
    background-color: var(--primary);
    color: #ffffff;
    box-shadow: var(--shadow-card);
}

/* Islamic Geometric Pattern Overlay */
.islamic-pattern-bg {
    background-image: radial-gradient(rgba(0, 69, 50, 0.08) 1px, transparent 1px),
                      radial-gradient(rgba(155, 69, 0, 0.05) 1px, transparent 1px);
    background-size: 32px 32px;
    background-position: 0 0, 16px 16px;
}

/* Stitch Tables */
.stitch-table thead th {
    background-color: var(--surface-container-high);
    color: var(--on-surface-variant);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--surface-variant);
}

.stitch-table tbody td {
    padding: 0.85rem 1rem;
    vertical-align: middle;
    border-bottom: 1px solid var(--surface-container-low);
}

.stitch-table tbody tr.is-friday {
    background-color: rgba(0, 69, 50, 0.07);
    font-weight: 600;
}

/* Footer */
.stitch-footer {
    background-color: var(--surface-container-low);
    color: var(--on-surface-variant);
    border-top: 1px solid var(--surface-container-highest);
}

.stitch-footer a {
    color: var(--on-surface-variant);
    text-decoration: none;
    transition: color 0.15s ease;
}

.stitch-footer a:hover {
    color: var(--primary);
}

/* Accessible Focus */
:focus-visible {
    outline: 2px solid var(--warm-gold);
    outline-offset: 2px;
}

/* Image Ratios */
.img-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-img-top-fixed {
    height: 215px;
    width: 100%;
    object-fit: cover;
}

/* Calendar Grid */
.calendar-grid-7 {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 1px;
    background-color: var(--surface-container-high);
}

.calendar-cell {
    background-color: #ffffff;
    min-height: 108px;
    padding: 0.5rem;
}

.calendar-cell.is-friday {
    background-color: rgba(0, 69, 50, 0.04);
}

.calendar-cell.is-other-month {
    background-color: var(--surface-container-low);
    opacity: 0.65;
}

/* ==========================================================================
   Site-Wide Smooth Scroll Reveal & Micro-Interaction Animations
   ========================================================================== */
.stitch-reveal {
    opacity: 0;
    transform: translate3d(0, 20px, 0);
    transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.stitch-reveal.is-visible {
    opacity: 1;
    transform: translate3d(0, 0, 0);
}

.stitch-card-hover {
    transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1),
                box-shadow 0.32s ease,
                border-color 0.32s ease;
}

.stitch-card-hover:hover {
    transform: translateY(-5px);
    box-shadow: 0 18px 36px -10px rgba(0, 69, 50, 0.16);
    border-color: rgba(0, 69, 50, 0.18);
}

.stitch-card-hover img.card-img-top-fixed,
.stitch-card-hover img.img-cover {
    transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.stitch-card-hover:hover img.card-img-top-fixed,
.stitch-card-hover:hover img.img-cover {
    transform: scale(1.045);
}

.prayer-card {
    transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.28s ease;
}

.prayer-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lift);
}

@media (max-width: 991.98px) {
    .main-offset { padding-top: 108px; }
    .stitch-hero { min-height: 540px; }
    .stitch-hero-slider { min-height: 620px; }
    .hero-foreground { padding-top: 124px; padding-bottom: 92px; }
}

@media (prefers-reduced-motion: reduce) {
    .stitch-reveal,
    .hero-anim-1, .hero-anim-2, .hero-anim-3, .hero-anim-4,
    .hero-bg-slide,
    .leadership-tree .tree-orb-node,
    .leadership-tree .tree-trunk-line,
    .leadership-tree .tree-trunk-pulse {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
        animation: none !important;
    }
}

/* ==========================================================================
   Education Hover Dropdown Menu (Works in Transparent & Floating Oval Modes)
   ========================================================================== */
.stitch-nav-dropdown {
    position: relative;
}

.stitch-dd-caret {
    transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

.stitch-nav-dropdown:hover .stitch-dd-caret,
.stitch-nav-dropdown.is-open .stitch-dd-caret {
    transform: rotate(180deg);
}

.stitch-dropdown-menu {
    position: absolute;
    top: calc(100% + 14px);
    left: 50%;
    transform: translateX(-50%) translateY(10px) scale(0.97);
    width: 375px;
    padding: 0.7rem;
    border-radius: 1.2rem;
    background: rgba(252, 249, 242, 0.98);
    backdrop-filter: blur(22px) saturate(160%);
    -webkit-backdrop-filter: blur(22px) saturate(160%);
    border: 1px solid rgba(0, 69, 50, 0.14);
    box-shadow: 0 22px 48px -12px rgba(0, 42, 30, 0.24), 0 4px 14px rgba(17, 24, 39, 0.08);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    z-index: 1060;
    transition: opacity 0.24s ease, transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), visibility 0.24s ease;
}

/* Invisible hover bridge so moving mouse from Education link to dropdown never loses hover */
.stitch-dropdown-menu::before {
    content: "";
    position: absolute;
    top: -18px;
    left: 0;
    right: 0;
    height: 18px;
}

@media (min-width: 1200px) {
    .stitch-nav-dropdown:hover > .stitch-dropdown-menu,
    .stitch-nav-dropdown:focus-within > .stitch-dropdown-menu {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translateX(-50%) translateY(0) scale(1);
    }
}

.stitch-dd-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.35rem 0.65rem 0.6rem;
    margin-bottom: 0.35rem;
    border-bottom: 1px solid rgba(0, 69, 50, 0.09);
}

.stitch-dd-item-group {
    border-radius: 0.85rem;
    transition: background-color 0.2s ease;
}

.stitch-dd-item-group:hover {
    background: rgba(0, 69, 50, 0.055);
}

.stitch-dd-item {
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
    padding: 0.58rem 0.65rem;
    border-radius: 0.8rem;
    text-decoration: none;
    color: var(--on-surface);
    transition: all 0.2s ease;
}

.stitch-dd-item:hover {
    background: rgba(0, 69, 50, 0.065);
    color: var(--primary);
    transform: translateX(2px);
}

.stitch-dd-item-group .stitch-dd-item:hover {
    background: transparent;
}

.stitch-dd-icon {
    width: 34px;
    height: 34px;
    border-radius: 0.65rem;
    background: rgba(0, 69, 50, 0.09);
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.22s ease;
}

.stitch-dd-icon .material-symbols-outlined {
    font-size: 18px;
}

.stitch-dd-item:hover .stitch-dd-icon,
.stitch-dd-item-group:hover .stitch-dd-icon {
    background: var(--primary);
    color: var(--warm-gold);
}

.stitch-dd-copy {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.stitch-dd-copy strong {
    font-size: 0.855rem;
    font-weight: 700;
    line-height: 1.25;
    color: var(--deep-ink);
}

.stitch-dd-item:hover .stitch-dd-copy strong {
    color: var(--primary);
}

.stitch-dd-copy small {
    font-size: 0.74rem;
    line-height: 1.35;
    color: var(--on-surface-variant);
    margin-top: 2px;
}

.stitch-dd-subpills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    padding: 0 0.65rem 0.6rem 3.45rem;
}

.stitch-dd-subpills a {
    font-size: 0.7rem;
    font-weight: 700;
    text-decoration: none;
    color: var(--primary);
    background: rgba(0, 69, 50, 0.09);
    border: 1px solid rgba(0, 69, 50, 0.14);
    padding: 0.18rem 0.58rem;
    border-radius: 999px;
    transition: all 0.2s ease;
}

.stitch-dd-subpills a:hover {
    background: var(--primary);
    color: var(--warm-gold);
    border-color: var(--primary);
}

.stitch-dd-footer {
    margin-top: 0.45rem;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(0, 69, 50, 0.09);
}

.stitch-dd-footer a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0.7rem;
    border-radius: 0.7rem;
    background: linear-gradient(135deg, #004532 0%, #065f46 100%);
    color: #ffffff;
    font-size: 0.78rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.22s ease;
}

.stitch-dd-footer a:hover {
    background: linear-gradient(135deg, #065f46 0%, #059669 100%);
    color: var(--warm-gold);
}

/* Mobile Education Dropdown Accordion inside Collapsed Drawer */
@media (max-width: 1199.98px) {
    .stitch-dd-caret {
        display: none;
    }
    .stitch-dd-mobile-toggle {
        color: var(--primary);
        margin-left: auto;
    }
    .stitch-dropdown-menu {
        position: static;
        transform: none !important;
        width: 100%;
        margin-top: 0.35rem;
        margin-bottom: 0.4rem;
        display: none;
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        box-shadow: inset 0 0 0 1px rgba(0, 69, 50, 0.1);
        background: var(--surface-container-low);
    }
    .stitch-dropdown-menu::before {
        display: none;
    }
    .stitch-nav-dropdown.is-open > .stitch-dropdown-menu {
        display: block;
    }
}

/* ==========================================================================
   Pure Boxless Circular Medallion Leadership Org-Tree (About Us Page)
   Zero Boxes — Crisp, Full-Visibility Circular Portraits + Glowing Connectors
   ========================================================================== */
.leadership-tree {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    max-width: 1020px;
    margin: 0 auto;
}

.tree-tier {
    width: 100%;
    display: flex;
    justify-content: center;
    position: relative;
    z-index: 3;
}

/* Pure Boxless Circular Node (NO white box wrapper!) */
.tree-orb-node {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0.25rem 0.5rem;
    cursor: pointer;
    position: relative;
    max-width: 240px;
    opacity: 0;
    transform: translateY(22px) scale(0.9);
    transition:
        opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1) var(--tree-delay, 0s),
        transform 0.65s cubic-bezier(0.22, 1, 0.36, 1) var(--tree-delay, 0s);
}

.leadership-tree.is-tree-visible .tree-orb-node {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.leadership-tree.is-tree-visible .tree-orb-node:hover {
    transform: translateY(-6px);
    transition-delay: 0s !important;
}

/* Circular Portrait Stage */
.tree-orb-stage {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.05rem;
}

.tree-orb-halo {
    width: 152px;
    height: 152px;
    border-radius: 50%;
    padding: 4.5px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 14px 32px -8px rgba(0, 56, 40, 0.3), 0 0 0 6px rgba(0, 69, 50, 0.05);
    transition: transform 0.38s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s ease;
}

.tree-orb-apex .tree-orb-halo {
    width: 172px;
    height: 172px;
    padding: 5px;
    box-shadow: 0 18px 40px -8px rgba(0, 69, 50, 0.34), 0 0 0 8px rgba(252, 211, 77, 0.14);
}

.tree-orb-leaf .tree-orb-halo {
    width: 142px;
    height: 142px;
}

.tree-halo-gold {
    background: conic-gradient(from 0deg, #FCD34D 0%, #004532 32%, #059669 62%, #f59e0b 84%, #FCD34D 100%);
}

.tree-halo-emerald {
    background: linear-gradient(135deg, #004532 0%, #059669 55%, #FCD34D 100%);
}

.tree-halo-leaf {
    background: linear-gradient(135deg, #065f46 0%, #059669 62%, #FCD34D 100%);
}

.tree-orb-node:hover .tree-orb-halo {
    transform: scale(1.06);
    box-shadow: 0 22px 44px -8px rgba(0, 69, 50, 0.4), 0 0 0 9px rgba(252, 211, 77, 0.22);
}

.tree-orb-photo,
.tree-circle-inner {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: hidden;
    background: #fcf9f2;
    border: 4px solid #ffffff;
}

.tree-orb-photo img,
.tree-circle-inner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 18%;
    transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.tree-orb-node:hover .tree-orb-photo img {
    transform: scale(1.07);
}

/* Modal avatar helper */
.tree-circle-halo {
    border-radius: 50%;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Sequence Number Seal Tucked Cleanly on Upper-Right Rim */
.tree-seq-seal {
    position: absolute;
    top: 4px;
    right: 4px;
    z-index: 4;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #004532;
    color: var(--warm-gold);
    font-size: 0.7rem;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2.5px solid #ffffff;
    box-shadow: 0 4px 12px rgba(0, 45, 32, 0.3);
}

.tree-seq-gold {
    background: linear-gradient(135deg, #FCD34D 0%, #f59e0b 100%);
    color: #003224;
    border-color: #ffffff;
    box-shadow: 0 6px 16px rgba(245, 158, 11, 0.45);
}

/* Floating Role Pill Anchored on Lower Rim (Zero Face Obstruction) */
.tree-orb-pill {
    position: absolute;
    bottom: -11px;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    padding: 0.24rem 0.8rem;
    border-radius: 9999px;
    background: #004532;
    color: #ffffff;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    border: 2px solid #ffffff;
    box-shadow: 0 6px 16px rgba(0, 45, 32, 0.24);
    z-index: 4;
}

.tree-role-gold {
    background: linear-gradient(135deg, #004532 0%, #065f46 100%);
    color: var(--warm-gold);
    border-color: var(--warm-gold);
}

/* Clean Boxless Typography Below Circle */
.tree-orb-caption {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 0.2rem;
}

.tree-orb-title {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--secondary);
    margin-top: 0.2rem;
    line-height: 1.35;
}

.tree-orb-hint {
    margin-top: 0.35rem;
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--primary);
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.22s ease, transform 0.22s ease;
    background: rgba(0, 69, 50, 0.08);
    padding: 0.14rem 0.58rem;
    border-radius: 999px;
}

.tree-orb-node:hover .tree-orb-hint {
    opacity: 1;
    transform: translateY(0);
}

.tree-verified-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    padding: 0.26rem 0.68rem;
    border-radius: 9999px;
    background: rgba(0, 69, 50, 0.075);
    color: var(--primary);
    font-size: 0.74rem;
    font-weight: 700;
}

.tree-verified-chip .material-symbols-outlined {
    font-size: 15px;
    color: var(--emerald-legacy);
}

/* Animated Glowing Trunks Connecting Circle to Circle */
.tree-trunk {
    position: relative;
    width: 40px;
    height: 44px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.tree-trunk-line {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 2.5px;
    transform: translateX(-50%) scaleY(0);
    transform-origin: top center;
    background: linear-gradient(180deg, #004532 0%, #059669 55%, #FCD34D 100%);
    border-radius: 99px;
    transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.14s;
}

.leadership-tree.is-tree-visible .tree-trunk-line {
    transform: translateX(-50%) scaleY(1);
}

.tree-trunk-pulse {
    position: absolute;
    top: 0;
    left: 50%;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--warm-gold);
    box-shadow: 0 0 10px var(--warm-gold), 0 0 18px rgba(252, 211, 77, 0.8);
    transform: translateX(-50%);
    animation: treeFlowDown 2.3s ease-in-out infinite;
}

@keyframes treeFlowDown {
    0% { transform: translate3d(-50%, 0, 0); opacity: 0; }
    20% { opacity: 1; }
    80% { opacity: 1; }
    100% { transform: translate3d(-50%, 34px, 0); opacity: 0; }
}

.tree-junction-dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: var(--warm-gold);
    border: 2.5px solid var(--primary);
    position: relative;
    z-index: 3;
    box-shadow: 0 0 0 3px rgba(0, 69, 50, 0.14);
}

.tree-junction-hub {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: linear-gradient(135deg, #004532 0%, #065f46 100%);
    color: var(--warm-gold);
    border: 2px solid var(--warm-gold);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 4;
    box-shadow: 0 5px 15px rgba(0, 69, 50, 0.28);
    margin-top: auto;
    transform: translateY(14px);
}

/* Symmetrical Pure-Circle Branching Grid */
.tree-branches-wrap.tree-branches-orbs {
    width: 100%;
    max-width: calc(var(--branch-cols, 2) * 270px);
    display: grid;
    grid-template-columns: repeat(var(--branch-cols, 2), minmax(0, 1fr));
    gap: 1.5rem;
    position: relative;
    z-index: 2;
}

.tree-branches-wrap.is-single-branch {
    max-width: 240px;
}

.tree-branch-col {
    position: relative;
    padding-top: 34px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

@media (min-width: 768px) {
    .tree-branches-wrap:not(.is-single-branch) .tree-branch-col::before {
        content: "";
        position: absolute;
        top: 0;
        left: -0.75rem;
        right: -0.75rem;
        height: 2.5px;
        background: linear-gradient(90deg, #004532 0%, #059669 50%, #004532 100%);
        transform: scaleX(0);
        transition: transform 0.65s cubic-bezier(0.22, 1, 0.36, 1) 0.22s;
    }

    .leadership-tree.is-tree-visible .tree-branches-wrap:not(.is-single-branch) .tree-branch-col::before {
        transform: scaleX(1);
    }

    .tree-branches-wrap:not(.is-single-branch) .tree-branch-col:first-child::before {
        left: 50%;
    }

    .tree-branches-wrap:not(.is-single-branch) .tree-branch-col:last-child::before {
        right: 50%;
    }

    .tree-branches-wrap:not(.is-single-branch) .tree-branch-col:nth-child(n+5)::before {
        display: none;
    }

    .tree-leaf-connector {
        position: absolute;
        top: 0;
        left: 50%;
        width: 2.5px;
        height: 34px;
        transform: translateX(-50%);
        background: linear-gradient(180deg, #004532 0%, #059669 75%, #FCD34D 100%);
    }

    .tree-leaf-dot {
        position: absolute;
        bottom: -4px;
        left: 50%;
        width: 10px;
        height: 10px;
        border-radius: 50%;
        transform: translateX(-50%);
        background: var(--warm-gold);
        border: 2px solid var(--primary);
        box-shadow: 0 0 0 3px rgba(0, 69, 50, 0.14);
    }
}

/* Mobile Responsive Pure-Circle Org-Tree */
@media (max-width: 767.98px) {
    .tree-orb-apex .tree-orb-halo { width: 152px; height: 152px; }
    .tree-orb-halo { width: 136px; height: 136px; }
    .tree-orb-leaf .tree-orb-halo { width: 128px; height: 128px; }
    .tree-trunk { height: 34px; }
    .tree-junction-hub { transform: translateY(4px); }
    .tree-branches-wrap.tree-branches-orbs {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1.25rem 0.75rem;
        max-width: 360px;
        margin-top: 0.75rem;
    }
    .tree-branch-col {
        padding-top: 10px;
    }
    .tree-leaf-connector {
        display: none;
    }
}

/* ==========================================================================
   100% All-Device Responsive Safeguards (Mobile 320px+, Tablet, Desktop)
   Zero Horizontal Overflow + Polished 2–3 Column Cards on Phones & Tablets
   ========================================================================== */
html, body {
    max-width: 100%;
    overflow-x: clip;
}

img, iframe, video, svg {
    max-width: 100%;
}

.calendar-scroll-wrap {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.calendar-scroll-wrap .calendar-grid-7 {
    min-width: 680px;
}

/* Tablet Ergonomics (576px – 991.98px): Crisp 2–3 Column Cards */
@media (min-width: 576px) and (max-width: 991.98px) {
    .stitch-mobile-2col .stitch-card > div > .position-relative {
        height: 155px !important;
    }
    .stitch-mobile-2col .stitch-card .p-4 {
        padding: 1rem !important;
    }
    .stitch-mobile-2col .stitch-card .px-4.pb-4 {
        padding: 0 1rem 1rem !important;
    }
    .stitch-mobile-2col .font-headline-sm {
        font-size: 1.12rem;
    }
}

/* Mobile Ergonomics (< 576px): Sleek 2-Column Multi-Card Layout */
@media (max-width: 575.98px) {
    body {
        font-size: 15px;
    }

    /* Compact Mobile Navbar (Single Tidy Row, Zero Clipping) */
    .stitch-topbar {
        font-size: 0.68rem;
    }
    .stitch-nav-shell {
        padding: 0 10px;
    }
    .stitch-navbar {
        min-height: 58px;
        padding: 0.35rem 0.45rem;
    }
    .stitch-logo-frame {
        width: 34px;
        height: 34px;
    }
    .stitch-brand-title {
        font-size: 0.98rem !important;
    }
    .stitch-brand-sub {
        font-size: 0.5rem !important;
        letter-spacing: 0.05em;
    }
    .stitch-nav-donate {
        padding: 0.38rem 0.72rem !important;
        font-size: 0.74rem !important;
        gap: 0.25rem !important;
    }
    .stitch-nav-donate .material-symbols-outlined {
        font-size: 15px !important;
    }
    .stitch-account-btn {
        width: 32px;
        height: 32px;
    }
    .main-offset {
        padding-top: 96px;
    }

    /* Mobile Hero Ergonomics */
    .stitch-hero-slider {
        min-height: 580px;
    }
    .hero-foreground {
        padding-top: 116px;
        padding-bottom: 84px;
    }
    .hero-headline {
        font-size: clamp(1.85rem, 7.2vw, 2.5rem);
        line-height: 1.14;
    }
    .hero-subtitle {
        font-size: 0.94rem;
        line-height: 1.5;
    }
    .btn-hero-primary,
    .btn-hero-ivory,
    .btn-hero-glass {
        padding: 0.68rem 1.12rem;
        font-size: 0.82rem;
    }
    .hero-dot-btn {
        padding: 0.3rem 0.55rem;
        font-size: 0.66rem;
    }
    .hero-arrow-btn {
        width: 34px;
        height: 34px;
    }

    /* 2-Column Mobile Cards — Balanced Heights, Crisp Ratios, Zero Crowding */
    .stitch-mobile-2col .stitch-card,
    .stitch-mobile-2col article.stitch-card {
        border-radius: 0.85rem;
    }
    .stitch-mobile-2col .stitch-card > div > .position-relative,
    .stitch-mobile-2col .stitch-card.position-relative {
        height: 120px !important;
    }
    .stitch-mobile-2col .stitch-card .p-4 {
        padding: 0.75rem !important;
    }
    .stitch-mobile-2col .stitch-card .px-4.pb-4 {
        padding: 0 0.75rem 0.75rem !important;
    }
    .stitch-mobile-2col .stitch-card .bg-surface-low.rounded-3.p-3 {
        padding: 0.5rem !important;
        font-size: 0.7rem !important;
    }
    .stitch-mobile-2col .font-headline-sm,
    .stitch-mobile-2col .font-title-lg {
        font-size: 0.94rem !important;
        line-height: 1.26;
    }
    .stitch-mobile-2col .font-headline-md {
        font-size: 1.1rem !important;
    }
    .stitch-mobile-2col .font-body-sm {
        font-size: 0.74rem !important;
        line-height: 1.4;
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    .stitch-mobile-2col .font-label-md {
        font-size: 0.62rem !important;
    }
    .stitch-mobile-2col .badge {
        font-size: 0.58rem !important;
        padding: 0.22rem 0.45rem !important;
        margin: 0.4rem !important;
    }
    .stitch-mobile-2col .btn-stitch-primary,
    .stitch-mobile-2col .btn-stitch-secondary,
    .stitch-mobile-2col .btn-stitch-soft,
    .stitch-mobile-2col .btn-stitch-outline {
        padding: 0.46rem 0.6rem !important;
        font-size: 0.73rem !important;
        gap: 0.25rem !important;
    }
    .stitch-mobile-2col .d-flex.align-items-center.gap-3.mb-2 {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 0.45rem !important;
    }
    .stitch-mobile-2col .rounded-circle.bg-primary-stitch {
        width: 34px !important;
        height: 34px !important;
    }
    .stitch-mobile-2col .rounded-circle.bg-primary-stitch .material-symbols-outlined {
        font-size: 17px !important;
    }

    /* Prayer cards 2-col compact on phones */
    .prayer-card {
        padding: 0.75rem;
    }

    /* Filter Forms Full-Width Stack on Small Phones */
    .stitch-filter-form {
        width: 100%;
    }
    .stitch-filter-form .form-control,
    .stitch-filter-form .form-select {
        width: 100% !important;
        flex: 1 1 100%;
    }
    .stitch-filter-form button {
        width: 100%;
    }

    /* Donation Terminal Mobile Ergonomics */
    .donation-amount-btn {
        padding: 0.65rem 0.35rem;
    }
    .donation-amount-btn .fs-5 {
        font-size: 1rem !important;
    }
}

/* Ultra-Small Phones (< 390px) */
@media (max-width: 389.98px) {
    .stitch-brand-sub {
        display: none;
    }
}

