/* ================================================================
   Maba Community UK — Main Stylesheet
   Design System: Royal Blue, Gold, White
   Features: RTL/LTR, glassmorphism, animations, premium aesthetics
   ================================================================ */

/* ----------------------------------------------------------------
   1. CSS CUSTOM PROPERTIES (Design Tokens)
   ---------------------------------------------------------------- */
:root {
    /* Brand Colors */
    --color-primary:       #1a3a7a;   /* Royal Blue */
    --color-primary-dark:  #0d2356;   /* Deep Royal Blue */
    --color-primary-light: #2557b8;   /* Light Royal Blue */
    --color-accent:        #d4a843;   /* Gold */
    --color-accent-dark:   #b8891e;   /* Dark Gold */
    --color-accent-light:  #f0c96a;   /* Light Gold */
    --color-navy:          #0d1b3e;   /* Dark Navy */
    --color-navy-mid:      #162040;   /* Mid Navy */
    --color-white:         #ffffff;
    --color-off-white:     #f8f9fc;
    --color-light-gray:    #f0f3f8;
    --color-border:        rgba(26, 58, 122, 0.12);

    /* Text Colors */
    --color-text:          #1a1a2e;
    --color-text-muted:    #5a6480;
    --color-text-light:    #8896b0;

    /* Semantic */
    --color-success:       #198754;
    --color-danger:        #dc3545;
    --color-warning:       #ffc107;

    /* Gradients */
    --grad-hero:      linear-gradient(135deg, #0d1b3e 0%, #1a3a7a 50%, #0f2d6b 100%);
    --grad-primary:   linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
    --grad-gold:      linear-gradient(135deg, var(--color-accent-dark) 0%, var(--color-accent-light) 100%);
    --grad-card:      linear-gradient(145deg, rgba(255,255,255,0.95), rgba(248,249,252,0.9));

    /* Typography */
    --font-primary:   'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --font-arabic:    'Cairo', 'Noto Sans Arabic', sans-serif;
    --font-size-xs:   0.75rem;
    --font-size-sm:   0.875rem;
    --font-size-base: 1rem;
    --font-size-lg:   1.125rem;
    --font-size-xl:   1.25rem;
    --font-size-2xl:  1.5rem;
    --font-size-3xl:  1.875rem;
    --font-size-4xl:  2.25rem;
    --font-size-5xl:  3rem;

    /* Spacing */
    --space-xs:    0.25rem;
    --space-sm:    0.5rem;
    --space-md:    1rem;
    --space-lg:    1.5rem;
    --space-xl:    2rem;
    --space-2xl:   3rem;
    --space-3xl:   4rem;
    --space-section: 5rem;

    /* Borders */
    --radius-sm:   6px;
    --radius-md:   12px;
    --radius-lg:   20px;
    --radius-xl:   28px;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm:   0 2px 8px rgba(13, 27, 62, 0.08);
    --shadow-md:   0 4px 20px rgba(13, 27, 62, 0.12);
    --shadow-lg:   0 8px 40px rgba(13, 27, 62, 0.18);
    --shadow-xl:   0 20px 60px rgba(13, 27, 62, 0.25);
    --shadow-gold: 0 8px 32px rgba(212, 168, 67, 0.35);
    --shadow-blue: 0 8px 32px rgba(26, 58, 122, 0.35);
    --shadow-inset: inset 0 2px 8px rgba(13, 27, 62, 0.08);

    /* Transitions */
    --transition-fast:   all 0.15s ease;
    --transition-base:   all 0.25s ease;
    --transition-slow:   all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);

    /* Navbar */
    --navbar-height: 72px;
}

/* ----------------------------------------------------------------
   2. RESET & BASE
   ---------------------------------------------------------------- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    overflow-x: hidden;
}

body {
    font-family: var(--font-primary);
    color: var(--color-text);
    background-color: var(--color-white);
    line-height: 1.65;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* RTL body adjustments */
body.rtl {
    font-family: var(--font-arabic);
    letter-spacing: 0;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--color-text);
}

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

a:hover { color: var(--color-accent); }

img { max-width: 100%; height: auto; }
.gallery-media-img { height: 100%; }

::selection {
    background-color: var(--color-accent);
    color: var(--color-white);
}

/* ----------------------------------------------------------------
   3. PAGE PROGRESS BAR
   ---------------------------------------------------------------- */
.page-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0%;
    background: var(--grad-gold);
    z-index: 9999;
    transition: width 0.3s ease;
    border-radius: 0 var(--radius-full) var(--radius-full) 0;
}

/* ----------------------------------------------------------------
   4. NAVIGATION BAR
   ---------------------------------------------------------------- */
.site-navbar {
    background: rgba(13, 27, 62, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(212, 168, 67, 0.2);
    padding: 0.75rem 0;
    position: sticky;
    top: 0;
    z-index: 1030;
    transition: var(--transition-base);
    min-height: var(--navbar-height);
}

.site-navbar.scrolled {
    background: rgba(13, 27, 62, 0.99);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
    border-bottom-color: rgba(212, 168, 67, 0.35);
}

/* Brand */
.brand-logo-wrap {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid rgba(212, 168, 67, 0.3);
    justify-content: center;
    transition: var(--transition-base);
}

.brand-logo-wrap:hover {
    transform: scale(1.05);
}

.brand-logo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    padding: 0;
}

.brand-logo-fallback {
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
    color: var(--color-accent);
    font-size: 1.5rem;
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.brand-name {
    font-size: 1rem;
    font-weight: 800;
    color: var(--color-white);
    letter-spacing: -0.02em;
    white-space: nowrap;
}

.brand-tagline {
    font-size: 0.68rem;
    color: var(--color-accent);
    font-weight: 500;
    opacity: 0.9;
    white-space: nowrap;
}

/* Nav Links */
.site-navbar .nav-link {
    color: rgba(255, 255, 255, 0.82) !important;
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.45rem 0.75rem !important;
    border-radius: var(--radius-sm);
    transition: var(--transition-base);
    position: relative;
}

/* Custom underline for active/hover (excluding dropdown toggles caret) */
.site-navbar .nav-link:not(.dropdown-toggle)::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 70%;
    height: 2px;
    background: var(--grad-gold);
    border-radius: var(--radius-full);
    transition: transform 0.25s ease;
}
.site-navbar .nav-link:not(.dropdown-toggle):hover::after,
.site-navbar .nav-link:not(.dropdown-toggle).active::after {
    transform: translateX(-50%) scaleX(1);
}

/* Dropdown styling */
.site-navbar .dropdown-menu {
    background-color: rgba(13, 27, 62, 0.98);
    border: 1px solid rgba(212, 168, 67, 0.3) !important;
    backdrop-filter: blur(10px);
}
.site-navbar .dropdown-item {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.85rem;
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: all 0.2s;
}
.site-navbar .dropdown-item:hover, .site-navbar .dropdown-item.active {
    background-color: rgba(212, 168, 67, 0.15);
    color: var(--color-accent);
}

/* Hover dropdown for desktop */
@media (min-width: 992px) {
    .site-navbar .dropdown:hover .dropdown-menu {
        display: block;
        margin-top: 0;
    }
}

/* Nav action buttons */
/* Circular Language Switcher (Desktop & Mobile) */
.btn-lang, .btn-lang-mobile {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: var(--transition-base);
    background: rgba(212, 168, 67, 0.15);
    border: 1px solid rgba(212, 168, 67, 0.4);
    color: var(--color-accent) !important;
    text-decoration: none;
    flex-shrink: 0;
}

.btn-lang i, .btn-lang-mobile i {
    font-size: 1.15rem;
}

.btn-lang:hover, .btn-lang-mobile:hover,
.btn-lang:active, .btn-lang-mobile:active {
    background: var(--grad-gold);
    color: var(--color-navy) !important;
    border-color: var(--color-accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(212, 168, 67, 0.45);
}

.btn-admin {
    background: var(--grad-gold);
    color: var(--color-navy) !important;
    border: none;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0.4rem 1rem;
    border-radius: var(--radius-full);
    transition: var(--transition-bounce);
    box-shadow: 0 4px 14px rgba(212, 168, 67, 0.4);
}

.btn-admin:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 168, 67, 0.55);
}

/* Mobile Nav */
@media (max-width: 991.98px) {
    #mainNav.show, #mainNav.collapsing {
        background: rgba(10, 20, 50, 0.98);
        border-top: 1px solid rgba(212, 168, 67, 0.2);
        padding: 1.25rem 1rem;
        border-radius: 0 0 var(--radius-lg) var(--radius-lg);
        margin-top: 0.5rem;
    }
    .nav-actions { margin-top: 0.75rem; flex-wrap: wrap; justify-content: center; }
    .site-navbar .navbar-nav { gap: 0 !important; text-align: center; }
}

/* ----------------------------------------------------------------
   5. HERO SECTION
   ---------------------------------------------------------------- */
.hero-section {
    min-height: 92vh;
    background: var(--grad-hero);
    position: relative;
    display: flex;
    align-items: center;
    overflow: hidden;
}

/* Animated geometric background */
.hero-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 60% 50% at 70% 50%, rgba(37, 87, 184, 0.3) 0%, transparent 60%),
        radial-gradient(ellipse 40% 60% at 20% 80%, rgba(212, 168, 67, 0.12) 0%, transparent 50%);
    pointer-events: none;
}

/* Floating orbs */
.hero-section::after {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(212, 168, 67, 0.08) 0%, transparent 70%);
    top: -100px;
    right: -100px;
    animation: floatOrb 8s ease-in-out infinite;
    pointer-events: none;
}

@keyframes floatOrb {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33%       { transform: translate(-30px, 30px) scale(1.05); }
    66%       { transform: translate(20px, -20px) scale(0.97); }
}

.hero-content {
    position: relative;
    z-index: 1;
    padding-top: var(--space-3xl);
    padding-bottom: var(--space-3xl);
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(212, 168, 67, 0.15);
    border: 1px solid rgba(212, 168, 67, 0.4);
    color: var(--color-accent);
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.4rem 1rem;
    border-radius: var(--radius-full);
    margin-bottom: 1.5rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.hero-title {
    font-size: clamp(1.2rem, 2.8vw, 1.85rem);
    font-weight: 800;
    color: var(--color-white);
    line-height: 1.35;
    margin-bottom: 1rem;
    letter-spacing: -0.01em;
}

.hero-title .highlight {
    background: var(--grad-gold);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: rgba(255, 255, 255, 0.75);
    margin-bottom: 2rem;
    max-width: 540px;
    line-height: 1.7;
}

.hero-cta-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Hero image / logo */
.hero-image-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.hero-logo-frame {
    position: relative;
    width: 320px;
    height: 320px;
    margin: 0 auto;
    animation: float 6s ease-in-out infinite;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-logo-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    padding: 0;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

/* Hero stat cards */
.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 2.5rem;
}

.hero-stat-card {
    background: rgba(255, 255, 255, 0.07);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-md);
    padding: 1rem;
    text-align: center;
    transition: var(--transition-base);
}

.hero-stat-card:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(212, 168, 67, 0.35);
    transform: translateY(-3px);
}

.hero-stat-number {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--color-accent);
    line-height: 1;
    display: block;
}

.hero-stat-label {
    font-size: 0.78rem;
    color: rgba(255,255,255,0.65);
    margin-top: 0.25rem;
    display: block;
}

/* ----------------------------------------------------------------
   6. BUTTONS
   ---------------------------------------------------------------- */
.btn-primary-custom {
    background: var(--grad-gold);
    color: var(--color-navy) !important;
    border: none;
    font-weight: 700;
    padding: 0.75rem 1.75rem;
    border-radius: var(--radius-full);
    font-size: 0.95rem;
    box-shadow: var(--shadow-gold);
    transition: var(--transition-bounce);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary-custom:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 12px 40px rgba(212, 168, 67, 0.5);
}

.btn-outline-light-custom {
    background: transparent;
    color: var(--color-white) !important;
    border: 2px solid rgba(255, 255, 255, 0.45);
    font-weight: 600;
    padding: 0.75rem 1.75rem;
    border-radius: var(--radius-full);
    font-size: 0.95rem;
    transition: var(--transition-base);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-outline-light-custom:hover {
    background: rgba(255,255,255,0.12);
    border-color: rgba(255,255,255,0.8);
    transform: translateY(-2px);
}

.btn-gold {
    background: var(--grad-gold);
    color: var(--color-navy);
    border: none;
    font-weight: 700;
    padding: 0.6rem 1.5rem;
    border-radius: var(--radius-full);
    box-shadow: 0 4px 16px rgba(212, 168, 67, 0.35);
    transition: var(--transition-bounce);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.btn-gold:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(212, 168, 67, 0.5);
    color: var(--color-navy);
}

.btn-blue {
    background: var(--grad-primary);
    color: var(--color-white);
    border: none;
    font-weight: 600;
    padding: 0.6rem 1.5rem;
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-blue);
    transition: var(--transition-bounce);
}

.btn-blue:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(26, 58, 122, 0.5);
    color: var(--color-white);
}

.btn-whatsapp {
    background: linear-gradient(135deg, #25d366, #128c7e);
    color: var(--color-white) !important;
    border: none;
    font-weight: 700;
    padding: 1rem 2rem;
    border-radius: var(--radius-full);
    font-size: 1rem;
    box-shadow: 0 8px 32px rgba(37, 211, 102, 0.4);
    transition: var(--transition-bounce);
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
}

.btn-whatsapp:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 14px 40px rgba(37, 211, 102, 0.55);
}

/* ----------------------------------------------------------------
   7. SECTION LAYOUT
   ---------------------------------------------------------------- */
.section {
    padding: var(--space-section) 0;
    scroll-margin-top: calc(var(--navbar-height) + 30px);
}

.section-alt {
    background: var(--color-off-white);
}

.section-dark {
    background: var(--color-navy);
    color: var(--color-white);
}

.section-header {
    margin-bottom: 3rem;
}

.section-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-accent);
    margin-bottom: 0.75rem;
}

.section-label::before,
.section-label::after {
    content: '';
    width: 30px;
    height: 2px;
    background: var(--grad-gold);
    border-radius: var(--radius-full);
}

.section-title {
    font-size: clamp(1.75rem, 3.5vw, 2.5rem);
    font-weight: 800;
    color: var(--color-text);
    line-height: 1.15;
    letter-spacing: -0.02em;
}

.section-dark .section-title { color: var(--color-white); }

.section-subtitle {
    font-size: 1.05rem;
    color: var(--color-text-muted);
    margin-top: 0.75rem;
    max-width: 600px;
}

.section-dark .section-subtitle { color: rgba(255,255,255,0.65); }

/* ----------------------------------------------------------------
   8. CARDS
   ---------------------------------------------------------------- */
.section-title-center {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    color: var(--color-primary);
    line-height: 1.15;
    letter-spacing: -0.02em;
    text-align: center;
    position: relative;
    display: block;
    margin-bottom: 2rem;
}

.section-title-center::after {
    content: '';
    display: block;
    width: 80px;
    height: 6px;
    background: var(--color-accent);
    margin: 1.25rem auto 0;
    border-radius: var(--radius-full);
}

/* News Card */
.news-card {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--color-border);
    transition: var(--transition-slow);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.news-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 35px -10px rgba(212, 168, 67, 0.35);
    border-color: rgba(212, 168, 67, 0.4);
}

.news-card-image {
    aspect-ratio: 16/9;
    overflow: hidden;
    background: var(--grad-primary);
    position: relative;
}

.news-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.news-card:hover .news-card-image img {
    transform: scale(1.06);
}

.news-card-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.4);
    font-size: 3rem;
}

.news-card-body {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.news-card-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.78rem;
    color: var(--color-text-light);
    margin-bottom: 0.75rem;
}

.news-card-meta .dot { opacity: 0.5; }

.news-card-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--color-text);
    line-height: 1.35;
    margin-bottom: 0.75rem;
    flex: 1;
}

.news-card-excerpt {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    line-height: 1.6;
    margin-bottom: 1.25rem;
}

.news-card-link {
    color: var(--color-primary);
    font-weight: 600;
    font-size: 0.875rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    transition: var(--transition-base);
    margin-top: auto;
}

.news-card-link:hover {
    color: var(--color-accent);
    gap: 0.6rem;
}

/* Event Card */
.event-card {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-base);
    position: relative;
    overflow: hidden;
}

.event-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(212, 168, 67, 0.4);
}

.event-date-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: var(--grad-gold);
    color: var(--color-navy);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    text-align: center;
    box-shadow: var(--shadow-sm);
}

/* RTL overrides for event badges */
html[dir="rtl"] .event-date-badge {
    left: auto;
    right: 1rem;
}

.event-date-day {
    display: block;
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1;
}

.event-date-month {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
}

.event-card-content {
    margin-top: 3.5rem;
}

html[dir="rtl"] .event-card-content {
    margin-top: 0;
    padding-right: 4.5rem;
}

html[dir="ltr"] .event-card-content {
    margin-top: 0;
    padding-left: 4.5rem;
}

.event-card-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 0.5rem;
}

.event-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

.event-card-meta span {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

/* Info Card (History, About, etc.) */
.info-card {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--color-border);
    transition: var(--transition-base);
    height: 100%;
}

.info-card:hover {
    box-shadow: var(--shadow-lg);
    border-color: rgba(26, 58, 122, 0.2);
}

.info-card-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, rgba(26,58,122,0.1), rgba(37,87,184,0.15));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--color-primary);
    margin-bottom: 1.25rem;
}

.info-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--color-primary);
}

.info-card-text {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    line-height: 1.7;
}

/* Stats Widget Card */
.stat-card {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--color-border);
    transition: var(--transition-slow);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--grad-primary);
}

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

.stat-card-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    background: var(--color-light-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: var(--color-primary);
    margin-bottom: 1rem;
}

.stat-card-value {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--color-text);
    line-height: 1;
}

.stat-card-label {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    font-weight: 500;
    margin-top: 0.35rem;
}

/* ----------------------------------------------------------------
   9. GALLERY / VIDEO GRID
   ---------------------------------------------------------------- */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.gallery-card {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--color-border);
    transition: var(--transition-slow);
}

.gallery-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.gallery-video-wrap {
    position: relative;
    width: 100%;
    height: 220px;
    background: var(--color-navy);
    overflow: hidden;
}

.gallery-media-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    cursor: pointer;
    transition: transform 0.3s;
}

.gallery-video-wrap iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

.gallery-card-body {
    padding: 1.25rem;
}

.gallery-card-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 0.35rem;
}

.gallery-card-category {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-primary);
    background: rgba(26, 58, 122, 0.08);
    padding: 0.2rem 0.65rem;
    border-radius: var(--radius-full);
}

/* Gallery filter buttons */
.gallery-filter-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.gallery-filter-btn {
    background: var(--color-light-gray);
    color: var(--color-text-muted);
    border: 1px solid var(--color-border);
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.45rem 1.1rem;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: var(--transition-base);
}

.gallery-filter-btn:hover,
.gallery-filter-btn.active {
    background: var(--grad-primary);
    color: var(--color-white);
    border-color: transparent;
    box-shadow: var(--shadow-blue);
}

/* ----------------------------------------------------------------
   10. FORMS
   ---------------------------------------------------------------- */
.form-card {
    background: var(--color-white);
    border-radius: var(--radius-xl);
    padding: 1.5rem 1.8rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(26, 58, 122, 0.1);
}

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

.form-control,
.form-select {
    border: 1.5px solid rgba(26, 58, 122, 0.25);
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    color: var(--color-text);
    background: #f0f3f8;
    transition: var(--transition-base);
    font-family: inherit;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--color-accent);
    background: var(--color-white);
    box-shadow: 0 0 0 4px rgba(212, 168, 67, 0.15);
    outline: none;
}

.form-control.is-valid { border-color: var(--color-success); }
.form-control.is-invalid { border-color: var(--color-danger); }

.invalid-feedback { font-size: 0.8rem; color: var(--color-danger); }

/* ----------------------------------------------------------------
   11. PAGE HERO BANNER (Interior pages)
   ---------------------------------------------------------------- */
.page-hero {
    background: var(--grad-hero);
    padding: 5rem 0 4rem;
    position: relative;
    overflow: hidden;
}

.page-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 50% 80% at 80% 50%, rgba(212,168,67,0.08) 0%, transparent 60%),
        radial-gradient(ellipse 30% 50% at 10% 20%, rgba(37,87,184,0.2) 0%, transparent 50%);
}

.page-hero-content { position: relative; z-index: 1; }

.page-hero-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    color: var(--color-white);
    margin-bottom: 0.75rem;
    letter-spacing: -0.02em;
}

.page-hero-subtitle {
    font-size: 1.05rem;
    color: rgba(255,255,255,0.7);
}

/* Breadcrumb in page hero */
.page-hero .breadcrumb {
    background: none;
    padding: 0;
    margin-bottom: 1rem;
}

.page-hero .breadcrumb-item,
.page-hero .breadcrumb-item a {
    color: rgba(255,255,255,0.6);
    font-size: 0.85rem;
}

.page-hero .breadcrumb-item.active { color: var(--color-accent); }
.page-hero .breadcrumb-item + .breadcrumb-item::before { color: rgba(255,255,255,0.4); }

/* ----------------------------------------------------------------
   12. DONATIONS PAGE
   ---------------------------------------------------------------- */
.donation-bank-card {
    background: var(--color-white);
    border-radius: var(--radius-xl);
    padding: 1.5rem 1.8rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(26, 58, 122, 0.1);
    position: relative;
    overflow: hidden;
}

.donation-bank-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: var(--grad-gold);
}

.bank-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 0;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.bank-detail-row:last-child { border-bottom: none; }

.bank-detail-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-text-muted);
    flex-shrink: 0;
    width: 35%;
}

.bank-detail-value {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--color-primary);
    text-align: right;
    word-break: break-word;
    line-height: 1.4;
    flex-grow: 1;
}

.copy-btn {
    background: none;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 0.2rem 0.5rem;
    font-size: 0.75rem;
    color: var(--color-text-muted);
    cursor: pointer;
    transition: var(--transition-base);
    flex-shrink: 0;
}

.copy-btn:hover {
    background: var(--color-primary);
    color: var(--color-white);
    border-color: var(--color-primary);
}

/* ----------------------------------------------------------------
   13. MEMBERSHIP REGISTRATION
   ---------------------------------------------------------------- */
.register-page-wrap {
    background: #f1f5f9;
    min-height: 60vh;
    padding-top: 3rem;
    padding-bottom: 3rem;
}

/* ----------------------------------------------------------------
   18. FOOTER
   ---------------------------------------------------------------- */
.site-footer {
    background: transparent;
    color: var(--color-white);
    position: relative;
    /* Padding removed so wave sits seamlessly at the top */
}

.footer-wave {
    width: 100%;
    overflow: hidden;
    line-height: 0;
    /* Removed absolute positioning and fixed overlap */
}

.footer-wave svg {
    display: block;
    width: 100%;
    height: 80px;
}

.footer-main {
    background: var(--color-navy);
    padding: 1.5rem 0 1rem;
}

.footer-bottom {
    background: var(--color-navy);
    padding-bottom: 2rem;
}

.footer-brand { }

.footer-logo {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(212,168,67,0.3);
    margin-bottom: 1rem;
}

.footer-brand-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-white);
    margin-bottom: 0.5rem;
}

.footer-about {
    font-size: 0.875rem;
    color: rgba(255,255,255,0.6);
    line-height: 1.65;
}

.footer-heading {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-accent);
    margin-bottom: 1.25rem;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.footer-links a {
    color: rgba(255,255,255,0.6);
    font-size: 0.875rem;
    transition: var(--transition-base);
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.footer-links a::before {
    content: '›';
    color: var(--color-accent);
    font-weight: 700;
    opacity: 0;
    transform: translateX(-4px);
    transition: var(--transition-base);
}

.rtl .footer-links a::before {
    content: '‹';
    transform: translateX(4px);
}

.footer-links a:hover {
    color: var(--color-white);
    padding-inline-start: 4px;
}

.footer-links a:hover::before { opacity: 1; transform: translateX(0); }
.rtl .footer-links a:hover::before { transform: translateX(0); }

.footer-contact {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.footer-contact li {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    font-size: 0.875rem;
    color: rgba(255,255,255,0.65);
}

.footer-contact li i {
    color: var(--color-accent);
    margin-top: 0.1rem;
    flex-shrink: 0;
}

.footer-contact a {
    color: rgba(255,255,255,0.65);
    transition: var(--transition-base);
}

.footer-contact a:hover { color: var(--color-accent); }

/* Social Buttons */
.social-btn {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-md);
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.7);
    font-size: 1rem;
    transition: var(--transition-bounce);
    text-decoration: none;
}

.social-btn:hover {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: var(--color-navy);
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(212, 168, 67, 0.4);
}

/* Footer Social Row — full-width centered bar above the bottom strip */
.footer-social-row {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(255,255,255,0.08);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.footer-social-label {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: rgba(255,255,255,0.4);
    margin: 0;
}

.footer-social-row .social-btn {
    width: 44px;
    height: 44px;
    font-size: 1.1rem;
}

/* Brand specific base colors & hovers */
.social-btn.btn-facebook { background: #1877F2; border-color: #1877F2; color: #ffffff; }
.social-btn.btn-facebook:hover { box-shadow: 0 6px 16px rgba(24, 119, 242, 0.4); }

.social-btn.btn-twitter { background: #000000; border-color: #333333; color: #ffffff; }
.social-btn.btn-twitter:hover { box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4); }

.social-btn.btn-youtube { background: #FF0000; border-color: #FF0000; color: #ffffff; }
.social-btn.btn-youtube:hover { box-shadow: 0 6px 16px rgba(255, 0, 0, 0.4); }

.social-btn.btn-whatsapp { background: #25D366; border-color: #25D366; color: #ffffff; }
.social-btn.btn-whatsapp:hover { box-shadow: 0 6px 16px rgba(37, 211, 102, 0.4); }

.social-btn.btn-tiktok { background: #000000; border-color: #333333; color: #ffffff; }
.social-btn.btn-tiktok:hover { box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4); }

.social-btn.btn-instagram { background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%); border-color: transparent; color: #ffffff; }
.social-btn.btn-instagram:hover { box-shadow: 0 6px 16px rgba(220, 39, 67, 0.4); }

.social-btn.btn-telegram { background: #0088cc; border-color: #0088cc; color: #ffffff; }
.social-btn.btn-telegram:hover { box-shadow: 0 6px 16px rgba(0, 136, 204, 0.4); }

/* Footer Bottom */
.footer-bottom {
    background: #081126;
    padding: 1.2rem 0;
    border-top: 1px solid rgba(255,255,255,0.06);
}

.footer-bottom p {
    color: rgba(255,255,255,0.45);
    font-size: 0.8rem;
}

.footer-credit { color: rgba(212, 168, 67, 0.7) !important; }

/* ----------------------------------------------------------------
   15. UTILITY / HELPERS
   ---------------------------------------------------------------- */
.text-gold      { color: var(--color-accent) !important; }
.text-blue      { color: var(--color-primary) !important; }
.text-navy      { color: var(--color-navy) !important; }
.bg-navy        { background-color: var(--color-navy) !important; }
.bg-primary-custom { background-color: var(--color-primary) !important; }

/* Gold divider */
.divider-gold {
    height: 3px;
    width: 60px;
    background: var(--grad-gold);
    border-radius: var(--radius-full);
    margin: 1rem 0;
}

.divider-gold.center { margin-left: auto; margin-right: auto; }

/* Badge/Tag */
.tag {
    display: inline-flex;
    align-items: center;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
}

.tag-blue {
    background: rgba(26,58,122,0.1);
    color: var(--color-primary);
}

.tag-gold {
    background: rgba(212,168,67,0.15);
    color: var(--color-accent-dark);
}

.tag-green {
    background: rgba(25,135,84,0.1);
    color: #155724;
}

.tag-red {
    background: rgba(220,53,69,0.1);
    color: #842029;
}

/* View all link */
.view-all-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-primary);
    transition: var(--transition-base);
}

.view-all-link:hover {
    color: var(--color-accent);
    gap: 0.6rem;
}

/* Loading spinner */
.spinner-custom {
    width: 40px;
    height: 40px;
    border: 3px solid var(--color-border);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* Skeleton loader */
.skeleton {
    background: linear-gradient(90deg, #f0f3f8 25%, #e8edf5 50%, #f0f3f8 75%);
    background-size: 200% 100%;
    animation: skeleton-wave 1.4s ease infinite;
    border-radius: var(--radius-sm);
}

@keyframes skeleton-wave {
    0%   { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* Scroll-reveal animation hook */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.55s ease, transform 0.55s ease;
}

.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ----------------------------------------------------------------
   16. BOARD MEMBER CARDS (About page)
   ---------------------------------------------------------------- */
.board-card {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    text-align: center;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--color-border);
    transition: var(--transition-slow);
}

.board-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.board-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--grad-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 2rem;
    color: var(--color-white);
    font-weight: 700;
    border: 3px solid rgba(212,168,67,0.3);
}

.board-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 0.25rem;
}

.board-role {
    font-size: 0.8rem;
    color: var(--color-accent-dark);
    font-weight: 600;
}

/* ----------------------------------------------------------------
   17. BRANCHES PAGE — Branch cards
   ---------------------------------------------------------------- */
.branch-card {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--color-border);
    transition: var(--transition-slow);
}

.branch-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.branch-card-header {
    background: var(--grad-primary);
    padding: 1.75rem;
    position: relative;
    overflow: hidden;
}

.branch-card-header::before {
    content: '';
    position: absolute;
    bottom: -20px;
    right: -20px;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(255,255,255,0.06);
}

.branch-name-en {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.7);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.branch-name-main {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--color-white);
    margin-top: 0.25rem;
}

.branch-gold-accent {
    width: 40px;
    height: 3px;
    background: var(--grad-gold);
    border-radius: var(--radius-full);
    margin-top: 0.75rem;
}

.branch-card-body {
    padding: 1.5rem;
}

.branch-desc {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    line-height: 1.7;
}

/* ----------------------------------------------------------------
   18. TOAST NOTIFICATIONS
   ---------------------------------------------------------------- */
.toast-container-custom {
    position: fixed;
    top: calc(var(--navbar-height) + 1rem);
    right: 1rem;
    z-index: 9990;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.rtl .toast-container-custom { right: auto; left: 1rem; }

.toast-custom {
    background: var(--color-white);
    border-radius: var(--radius-md);
    padding: 1rem 1.25rem;
    box-shadow: var(--shadow-lg);
    border-left: 4px solid var(--color-primary);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 280px;
    max-width: 380px;
    animation: slideInRight 0.3s ease;
}

.rtl .toast-custom {
    border-left: none;
    border-right: 4px solid var(--color-primary);
    animation: slideInLeft 0.3s ease;
}

.toast-custom.toast-success { border-left-color: var(--color-success); }
.rtl .toast-custom.toast-success { border-right-color: var(--color-success); }
.toast-custom.toast-error   { border-left-color: var(--color-danger); }
.rtl .toast-custom.toast-error   { border-right-color: var(--color-danger); }

@keyframes slideInRight {
    from { transform: translateX(60px); opacity: 0; }
    to   { transform: translateX(0); opacity: 1; }
}

@keyframes slideInLeft {
    from { transform: translateX(-60px); opacity: 0; }
    to   { transform: translateX(0); opacity: 1; }
}

/* ----------------------------------------------------------------
   19. ACCESSIBILITY
   ---------------------------------------------------------------- */
:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ----------------------------------------------------------------
   20. RESPONSIVE
   ---------------------------------------------------------------- */
/* See merged responsive section at the bottom of this file */

/* ----------------------------------------------------------------
   21. PRINT
   ---------------------------------------------------------------- */
@media print {
    .site-navbar, .site-footer, .page-progress,
    .btn-whatsapp, .btn-admin { display: none !important; }
    body { color: #000 !important; }
    .hero-section { min-height: auto; padding: 2rem 0; }
}

/* ----------------------------------------------------------------
   22. NEWS BLOG CARDS (account-project style)
   ---------------------------------------------------------------- */
.news-blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.news-blog-card {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--color-border);
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: var(--transition-slow);
}

.news-blog-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-xl);
    color: inherit;
    border-color: rgba(26,58,122,0.2);
}

.news-blog-img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
    background: var(--grad-primary);
    transition: transform 0.45s ease;
}

.news-blog-card:hover .news-blog-img { transform: scale(1.04); }

.news-blog-img-placeholder {
    width: 100%;
    height: 220px;
    background: linear-gradient(135deg, var(--color-navy) 0%, #1a2a50 100%);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.news-blog-img-placeholder::after {
    content: '';
    position: absolute;
    inset: 0;
    background: url('../img/logo.png') center/contain no-repeat;
    opacity: 0.05;
    transform: scale(1.5);
}

.news-blog-img-placeholder i {
    font-size: 3.5rem;
    color: rgba(212, 168, 67, 0.5); /* Gold tint */
    position: relative;
    z-index: 1;
}

.news-blog-body {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.news-blog-date {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--color-accent-dark);
    margin-bottom: 0.65rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.news-blog-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-primary);
    line-height: 1.35;
    margin-bottom: 0.75rem;
}

.news-blog-excerpt {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    line-height: 1.65;
    flex: 1;
    margin-bottom: 1.25rem;
}

.news-blog-read-more {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--color-primary);
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: auto;
    justify-content: flex-end;
    transition: var(--transition-base);
}

.news-blog-card:hover .news-blog-read-more {
    color: var(--color-accent-dark);
    gap: 0.7rem;
}


/* ----------------------------------------------------------------
   23. COOKIE CONSENT BANNER & MODAL  
   ---------------------------------------------------------------- */
.cookie-banner {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 440px;
    background: var(--grad-gold);
    padding: 1.25rem 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 40px rgba(212,168,67,0.4);
    z-index: 9000; /* Higher than PWA install prompt */
    display: flex;
    flex-direction: column;
    gap: 1rem;
    border: 1px solid rgba(255,255,255,0.25);
    animation: cookieSlideUp 0.4s cubic-bezier(0.34,1.56,0.64,1);
}

@keyframes cookieSlideUp {
    from { transform: translateX(-50%) translateY(120%); opacity:0; }
    to   { transform: translateX(-50%) translateY(0);   opacity:1; }
}

.cookie-content { display:flex; gap:1rem; align-items:flex-start; }

.cookie-icon {
    font-size: 1.4rem;
    color: var(--color-navy);
    background: rgba(255,255,255,0.4);
    width: 44px; height: 44px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}

.cookie-text h4 { margin:0 0 4px; font-size:1rem; font-weight:700; color:var(--color-navy); }
.cookie-text p  { margin:0; font-size:0.83rem; color:rgba(13,27,62,0.82); line-height:1.5; }

.cookie-actions { display:flex; gap:0.5rem; }

.btn-cookie {
    flex: 1; padding: 0.5rem 0.75rem;
    font-size: 0.85rem; font-weight: 600;
    border-radius: var(--radius-sm); cursor: pointer;
    border: 1.5px solid rgba(13,27,62,0.3);
    background: transparent; color: var(--color-navy);
    transition: var(--transition-base);
}
.btn-cookie:hover { background: rgba(13,27,62,0.1); border-color: rgba(13,27,62,0.5); }

.btn-cookie-primary { background:var(--color-navy); color:var(--color-white); border-color:transparent; }
.btn-cookie-primary:hover { background:var(--color-primary-dark); color:var(--color-white); box-shadow:0 4px 14px rgba(13,27,62,0.35); }

.cookie-overlay {
    position: fixed; inset: 0;
    background: rgba(13,27,62,0.55);
    backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
    z-index: 9100;
}

.cookie-prefs-modal {
    position: fixed; top:50%; left:50%;
    transform: translate(-50%,-50%);
    width: 90%; max-width: 480px;
    background: var(--color-white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--color-border);
    padding: 1.75rem; z-index: 9200;
    display: flex; flex-direction: column;
    max-height: 90vh; overflow-y: auto;
}

.cookie-pref-item {
    display: flex; justify-content: space-between; align-items: center;
    background: var(--color-off-white);
    padding: 1rem; border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
}

/* iOS-style toggle switch */
.cookie-switch { position:relative; display:inline-block; width:46px; height:24px; flex-shrink:0; }
.cookie-switch input { opacity:0; width:0; height:0; }
.cookie-slider { position:absolute; cursor:pointer; inset:0; background:#cbd5e1; transition:.3s; border-radius:34px; }
.cookie-slider::before {
    position:absolute; content:''; height:18px; width:18px;
    left:3px; bottom:3px; background:white; transition:.3s;
    border-radius:50%; box-shadow:0 1px 3px rgba(0,0,0,0.15);
}
.cookie-switch input:checked + .cookie-slider { background: var(--color-primary); }
.cookie-switch input:checked + .cookie-slider::before { transform: translateX(22px); }


/* ----------------------------------------------------------------
   24. SINGLE ARTICLE PAGE
   ---------------------------------------------------------------- */
.article-header { 
    background-color: var(--color-off-white); 
    padding: 60px 0 40px; 
    border-bottom: 1px solid var(--color-border); 
    text-align: center; 
}
.article-meta { 
    font-size: 0.95rem; 
    color: var(--color-accent-dark); 
    font-weight: 600; 
    margin-top: 15px; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    gap: 15px; 
}
.article-title { 
    font-size: clamp(1.6rem, 4vw, 2.2rem); 
    color: var(--color-primary); 
    margin: 0 auto 5px; 
    line-height: 1.3; 
    font-weight: 800; 
    max-width: 850px; 
}

.article-featured-img { 
    width: 100%; 
    max-width: 800px; 
    display: block; 
    height: auto; 
    aspect-ratio: 21/9; 
    max-height: 400px; 
    object-fit: cover; 
    border-radius: var(--radius-lg); 
    margin: 10px auto 35px; 
    box-shadow: var(--shadow-md); 
    background-color: var(--color-light-gray); 
}

.article-content { 
    font-size: 1.15rem; 
    line-height: 1.85; 
    color: var(--color-text); 
    font-weight: 400; 
}
.article-content p { margin-bottom: 25px; }
.article-content h2, .article-content h3 { 
    color: var(--color-primary); 
    margin: 50px 0 25px; 
    font-weight: 700; 
    line-height: 1.3; 
}
.article-content ul, .article-content ol { margin-bottom: 25px; }
.article-content li { margin-bottom: 12px; }
.article-content a { 
    color: var(--color-primary-light); 
    font-weight: 600; 
    text-decoration: underline; 
    text-decoration-color: transparent; 
    transition: text-decoration-color 0.2s; 
}
.article-content a:hover { text-decoration-color: var(--color-primary-light); }

.back-btn { 
    display: inline-flex; 
    align-items: center; 
    gap: 8px; 
    font-weight: 600; 
    color: var(--color-text-muted); 
    text-decoration: none; 
    margin-bottom: 30px; 
    transition: color 0.2s; 
    justify-content: center; 
}
.back-btn:hover { color: var(--color-primary); }

/* ================================================================
   RESPONSIVE MEDIA QUERIES (merged, no conflicts)
   ================================================================ */

/* ── Tablet and below (≤ 991px) ── */
@media (max-width: 991.98px) {
    .hero-section { padding-top: 3rem; padding-bottom: 3rem; }
    .footer-heading { letter-spacing: 0.05em; }   /* tighter on tablet */
}

/* ── Mobile (≤ 767px) ── */
@media (max-width: 767.98px) {
    /* Hero */
    .hero-section {
        min-height: auto;
        align-items: flex-start;
        padding-top: 80px !important;
        padding-bottom: 2.5rem;
    }
    .hero-content { padding-top: 1rem; padding-bottom: 1rem; }
    .hero-logo-frame {
        width: 210px !important;
        height: 210px !important;
        margin: 1.5rem auto 0 auto !important;
        box-shadow: 0 8px 25px rgba(0,0,0,0.35) !important;
    }
    .hero-image-wrap { margin-top: 1.5rem; }
    .hero-stats {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.6rem;
        margin-top: 1.5rem;
    }
    .hero-stat-number { font-size: 1.3rem; }
    .hero-cta-group { flex-direction: column; align-items: stretch; }
    .hero-cta-group .btn,
    .hero-cta-group .btn-primary-custom,
    .hero-cta-group .btn-outline-light-custom { width: 100%; justify-content: center; margin-bottom: 0.5rem; }

    /* Page hero (interior pages) — reduce padding */
    .page-hero { padding: 3rem 0 2.5rem; }
    .page-hero-title { font-size: clamp(1.5rem, 5vw, 2rem); }

    /* Safe padding for edges on mobile */
    .container, .container-fluid, .container-xl, .container-lg, .container-md, .container-sm {
        padding-left: 1.25rem !important;
        padding-right: 1.25rem !important;
    }

    /* Sections */
    .section { padding: 3rem 0; }
    section.py-5, .py-5 { padding-top: 2rem !important; padding-bottom: 2rem !important; }

    /* Navbar mobile links */
    .site-navbar .nav-link { padding-top: 0.75rem !important; padding-bottom: 0.75rem !important; font-size: 1.1rem; }

    /* Forms */
    .form-card { padding: 1.5rem; }

    /* Donations */
    .donation-bank-card { padding: 1.5rem; }

    /* Gallery: 2 cols on mobile */
    .gallery-grid { grid-template-columns: 1fr 1fr; }
    .gallery-video-wrap { height: 160px; }

    /* News grid: 1 col on mobile */
    .news-blog-grid { grid-template-columns: 1fr; }

    /* Disable sticky info panels on mobile — prevents overlap */
    [style*="position:sticky"] { position: static !important; }

    /* Center align footer on mobile */
    .footer-brand, .footer-heading, .footer-links, .social-links, .footer-bottom p {
        text-align: center;
        justify-content: center;
    }

    /* Footer RTL heading — remove letter-spacing that breaks Arabic */
    .rtl .footer-heading { letter-spacing: 0; text-transform: none; font-size: 0.9rem; }
}

/* ── Small phones (≤ 575px) ── */
@media (max-width: 575.98px) {
    /* Hero stats: 2 cols on very small phones */
    .hero-stats { grid-template-columns: 1fr 1fr; }
    
    /* Make odd items (like the 3rd stat) span full width to avoid orphaning */
    .hero-stats > *:last-child:nth-child(odd) {
        grid-column: 1 / -1;
    }

    /* Gallery: single column on tiny phones */
    .gallery-grid { grid-template-columns: 1fr; }
    .gallery-video-wrap { height: 200px; }

    /* Donations: stack bank detail rows vertically */
    .bank-detail-row { flex-direction: column; align-items: flex-start; gap: 0.4rem; }
    .bank-detail-value { text-align: start; }

    /* Section label: hide decorative lines on tiny screens */
    .section-label::before, .section-label::after { display: none; }

    /* Page hero even smaller */
    .page-hero { padding: 2.5rem 0 2rem; }
}

/* ── Cookie banner on small phones ── */
@media (max-width: 480px) {
    .cookie-banner { bottom: 10px; width: 95%; }
    .cookie-actions { flex-direction: column; }
}

