/* 
  Charity Foundation - Main Stylesheet 
  Brand overrides bridge Charry utilities → Salam Design palette (see tokens.css)
*/

body {
    font-family: 'IBM Plex Sans Arabic', sans-serif;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    background-color: var(--color-surface-muted, var(--paper-2, #f7fbfb));
    color: var(--color-ink, var(--ink, #0d2f3a));
}

/* Custom Scrollbar — Design teal / sage */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--sage, #e4f1f0);
}
::-webkit-scrollbar-thumb {
    background: var(--teal, #0B8380);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--cyan, #2798B5);
}

html {
    scrollbar-width: thin;
    scrollbar-color: var(--teal, #0B8380) var(--sage, #e4f1f0);
}

a:where(:not([class])) {
    color: var(--teal, #0B8380);
}
a:where(:not([class])):hover {
    color: var(--blue, #1A6D99);
}

/* Button Hover Ripple Effect */
.btn-hover-fx {
    position: relative;
    overflow: hidden;
}
.btn-hover-fx::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 300%;
    height: 300%;
    background: rgba(255, 255, 255, 0.1);
    transform: translate(-50%, -50%) scale(0);
    border-radius: 50%;
    transition: transform 0.5s ease-out;
}
.btn-hover-fx:hover::after {
    transform: translate(-50%, -50%) scale(1);
}

/* Common Page Hero Background — Design teal → blue */
.page-hero-bg {
    background: linear-gradient(
        135deg,
        var(--color-trust-green-500, #0B8380) 0%,
        var(--color-trust-green-700, #075a58) 60%,
        var(--blue, #1A6D99) 100%
    );
}

/*
  Header + sticky mobile donate CTA
  Before: flat teal/cyan ~#0B8380→#1A6D99 (same as page-hero-bg — poor contrast)
  After:  Design blue→cyan #1A6D99→#2798B5 — pops on white header, white text OK
  Higher specificity beats leftover Tailwind bg-trust-green-* if present.
*/
/* Two-row Salam header (compact nav + dropdowns + icons) — cache bump 2026-08-20a */
.site-header,
.site-header .header-nav-row,
.site-header .header-nav-row .container,
.site-header .nav-links,
.site-header .drop {
    overflow: visible;
}
.site-header .brand-text {
    display: none !important;
}
@media (min-width: 1081px) {
    .site-header .header-nav-row {
        display: block;
        height: var(--header-nav-h, 54px);
        min-height: var(--header-nav-h, 54px);
        max-height: var(--header-nav-h, 54px);
        overflow: visible;
    }
    .site-header .header-nav-row .container {
        display: block;
        height: 100%;
        min-height: 0;
        overflow: visible;
    }
    .site-header .nav-links {
        display: flex !important;
        visibility: visible;
        opacity: 1;
        pointer-events: auto;
        position: relative;
        transform: none;
        width: 100%;
        height: var(--header-nav-h, 54px);
        max-height: var(--header-nav-h, 54px);
        flex-direction: row;
        flex-wrap: nowrap;
        justify-content: space-between;
        align-items: stretch;
        gap: clamp(4px, 0.85vw, 16px);
    }
    .site-header .nav-links > .mobile-nav-head,
    .site-header .nav-links > .mobile-nav-extras {
        display: none !important;
    }
    .site-header .drop-menu {
        position: absolute !important;
    }
}
.site-header .drop-menu {
    z-index: 1400;
}
@media (max-width: 1080px) {
    .site-header .header-nav-row,
    .site-header .header-nav-row .container {
        overflow: visible;
        height: 0;
    }
    .site-header .nav-links {
        overflow-x: hidden !important;
        overflow-y: auto !important;
        max-width: 100vw;
        white-space: normal;
        flex-wrap: nowrap;
        flex-direction: column;
        height: auto;
    }
    .site-header .drop {
        overflow: visible;
        height: auto;
        width: 100%;
    }
    .site-header .drop-menu,
    .site-header .drop-menu a {
        white-space: normal;
    }
}
.site-header .header-nav-row .nav-links > a:hover,
.site-header .header-nav-row .nav-links > a.active,
.site-header .header-nav-row .nav-links .drop:hover > button,
.site-header .header-nav-row .nav-links .drop.open > button {
    color: var(--teal, #0B8380);
}

.site-header a.donate,
.site-header .nav-actions a.donate,
.site-header a.donate.bg-trust-green-500,
.site-header a.donate[class*="bg-trust-green"],
a.mobile-donate-bar,
a.mobile-donate-bar[class*="bg-trust-green"] {
    background: linear-gradient(135deg, var(--blue, #1A6D99), var(--cyan, #2798B5)) !important;
    background-color: var(--blue, #1A6D99) !important;
    color: #fff !important;
    border-color: transparent;
    box-shadow: 0 8px 22px rgba(26, 109, 153, 0.28);
}
.site-header a.donate:hover,
.site-header .nav-actions a.donate:hover,
a.mobile-donate-bar:hover {
    filter: brightness(1.06);
    box-shadow: 0 12px 28px rgba(26, 109, 153, 0.36);
}
.site-header a.donate:focus-visible,
a.mobile-donate-bar:focus-visible {
    outline: 2px solid var(--cyan, #2798B5);
    outline-offset: 3px;
}

/*
  Dark teal urgency / page CTA banners — Donate Now must stay readable.
  .campaign-urgency-cta sets color:#fff; main.css `a{color:inherit}` then
  beats layered Tailwind text-trust-green-700 → white label on white bg.
  Scoped away from .site-header a.donate (header keep blue→cyan).
*/
.campaign-urgency-cta a.btn,
.campaign-urgency-cta a.btn-hover-fx {
    background: linear-gradient(135deg, var(--teal, #0B8380), var(--blue, #1A6D99)) !important;
    background-color: var(--teal, #0B8380) !important;
    color: #fff !important;
    border-color: transparent !important;
    box-shadow: 0 10px 28px rgba(11, 131, 128, 0.28);
}
.campaign-urgency-cta a.btn:hover,
.campaign-urgency-cta a.btn-hover-fx:hover {
    filter: brightness(1.05);
    box-shadow: 0 14px 32px rgba(11, 131, 128, 0.34);
}
.campaign-urgency-cta a.btn:focus-visible,
.campaign-urgency-cta a.btn-hover-fx:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 3px;
}
.campaign-urgency-cta a.btn .ph,
.campaign-urgency-cta a.btn-hover-fx .ph,
.campaign-urgency-cta a.btn .ph-fill,
.campaign-urgency-cta a.btn-hover-fx .ph-fill {
    color: #fff !important;
}

/* Force brand teal on donate CTAs (never slate/navy black) */
a.fundraiseup-donate-btn,
a.external-donate-btn,
.campaign-card-cta,
.donation-form a.fundraiseup-donate-btn,
.donation-form a.external-donate-btn,
button[type="submit"].bg-slate-800,
a.bg-slate-800.fundraiseup-donate-btn,
a.w-full.bg-slate-800 {
    background: #0B8380 !important;
    background-color: #0B8380 !important;
    color: #fff !important;
    border-color: transparent !important;
}
a.fundraiseup-donate-btn:hover,
a.external-donate-btn:hover,
.campaign-card-cta:hover,
a.w-full.bg-slate-800:hover {
    background: #09706e !important;
    background-color: #09706e !important;
    color: #fff !important;
}

/* Design page-cta: white pill + dark ink (never inherit banner white) */
.page-cta a.btn {
    background: #fff !important;
    background-color: #fff !important;
    color: var(--ink, #0d2f3a) !important;
    border-color: #fff !important;
}
.page-cta a.btn:hover {
    background: rgba(255, 255, 255, 0.92) !important;
    color: var(--ink, #0d2f3a) !important;
}
.page-cta a.btn .ph,
.page-cta a.btn .ph-fill {
    color: var(--ink, #0d2f3a) !important;
}

/* Form Input Fields */
.input-field {
    width: 100%;
    padding: 14px 18px;
    background: var(--paper, #f3f8f8);
    border: 2px solid var(--line, #d2e3e2);
    border-radius: 14px;
    font-family: 'IBM Plex Sans Arabic', sans-serif;
    font-size: 15px;
    transition: all 0.3s;
    outline: none;
    color: var(--ink, #0d2f3a);
}
.input-field:focus {
    border-color: var(--teal, #0B8380);
    background: white;
    box-shadow: 0 0 0 4px rgba(11, 131, 128, 0.12);
}
.input-field::placeholder {
    color: #94a3b8;
}

/* Info Cards Hover */
.contact-info-card:hover {
    transform: translateY(-4px);
}

/* Project Cards Specific */
.proj-img {
    transition: transform 0.7s ease-out;
}
.proj-card:hover .proj-img {
    transform: scale(1.05);
}
.progress-bar {
    height: 6px;
    border-radius: 99px;
    background: #e2e8f0;
}
.progress-fill {
    height: 100%;
    border-radius: 99px;
    transition: width 1.5s ease-out;
}
.filter-btn.active {
    background-color: var(--color-trust-green-500, #0B8380);
    color: white;
    border-color: var(--color-trust-green-600, #09706e);
}

/* Privacy TOC Sidebar */
.toc-link.active {
    color: var(--color-trust-green-600, #09706e);
    font-weight: 700;
    border-inline-end-color: var(--color-trust-green-600, #09706e);
}

/* Advanced Prose Styling */
.prose h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-trust-green-700, #075a58);
    margin: 2.5rem 0 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #f1f5f9;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.prose h3 {
    font-size: 1.125rem;
    font-weight: 700;
    color: #1e293b;
    margin: 1.5rem 0 0.75rem;
}
.prose p {
    color: #64748b;
    line-height: 1.8;
    margin-bottom: 1rem;
    font-size: 0.9375rem;
}
.prose ul {
    list-style: none;
    padding: 0;
    margin: 0 0 1rem;
}
.prose ul li {
    color: #64748b;
    line-height: 1.8;
    font-size: 0.9375rem;
    padding: 0.35rem 0;
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
}
.prose ul li::before {
    content: '';
    display: block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--teal, #0B8380);
    flex-shrink: 0;
    margin-top: 0.55rem;
}
.info-box {
    background: linear-gradient(135deg, #eef6f6, #e4f1f0);
    border: 1px solid #7ec4c1;
    border-radius: 1rem;
    padding: 1.25rem 1.5rem;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    margin: 1.5rem 0;
}
.warn-box {
    background: linear-gradient(135deg, #fffbeb, #fefce8);
    border: 1px solid #fde68a;
    border-radius: 1rem;
    padding: 1.25rem 1.5rem;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    margin: 1.5rem 0;
}

/* About Page */
.team-card:hover .team-overlay { opacity: 1; }
.team-overlay { opacity: 0; transition: opacity 0.4s ease; }
.timeline-item:not(:last-child)::before {
    content: '';
    position: absolute;
    inset-inline-end: 23px;
    top: 48px;
    bottom: -24px;
    width: 2px;
    background: linear-gradient(to bottom, var(--teal, #0B8380), rgba(11, 131, 128, 0.19));
}

/* Blog Page */
.blog-img { transition: transform 0.7s ease-out; }
.blog-card:hover .blog-img { transform: scale(1.05); }
.category-pill.active { background-color: var(--color-trust-green-500, #0B8380); color: white; border-color: var(--color-trust-green-600, #09706e); }

/* Article card logo placeholder (no featured image / broken remote image) */
.article-card-media--placeholder {
    background: linear-gradient(135deg, #e8f0f8 0%, #eef6f1 55%, #f4f8fb 100%);
}
.article-card-placeholder-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    padding: 1.75rem;
}
.blog-card:hover .article-card-placeholder-img { transform: none; }

.article-thumb-compact {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 0.75rem;
    background: #f3f4f6;
}
.article-thumb-compact--sm { width: 6rem; height: 5rem; }
.article-thumb-compact--md { width: 7rem; height: 5rem; }
.article-thumb-compact--placeholder {
    background: linear-gradient(135deg, #e8f0f8 0%, #eef6f1 100%);
}
.article-thumb-compact-img {
    width: 100%;
    height: 100%;
}
.article-thumb-compact-img--logo {
    object-fit: contain;
    object-position: center;
    padding: 0.45rem;
}

/* Landing Page Specific Rules */
input[type=number]::-webkit-inner-spin-button, 
input[type=number]::-webkit-outer-spin-button { 
    -webkit-appearance: none; 
    margin: 0; 
}
#search-overlay {
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
#search-overlay.active {
    visibility: visible;
    opacity: 1;
}
#search-overlay .search-overlay-backdrop {
    opacity: 0;
    transition: opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
#search-overlay.active .search-overlay-backdrop {
    opacity: 1;
}
#search-overlay .search-overlay-panel {
    opacity: 0;
    transform: scale(0.96) translateY(12px);
    transition: opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1), transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
#search-overlay.active .search-overlay-panel {
    opacity: 1;
    transform: scale(1) translateY(0);
}
#search-overlay .search-overlay-close:hover {
    transform: rotate(90deg);
}
#search-overlay .search-overlay-close {
    transition: background-color 0.2s, color 0.2s, transform 0.25s ease;
}
#search-overlay .search-results-scroll {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}
#search-overlay .search-results-scroll::-webkit-scrollbar {
    width: 6px;
}
#search-overlay .search-results-scroll::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 9999px;
}
#search-overlay .search-result-item:focus-visible {
    outline: 2px solid #22c55e;
    outline-offset: 2px;
}
html[dir="rtl"] #search-overlay .search-overlay-input {
    text-align: right;
}
html[dir="ltr"] #search-overlay .search-overlay-input {
    text-align: left;
}

/* =============================================
   Arabic RTL & Typography Improvements
   ============================================= */

html[dir="rtl"] body {
    text-rendering: optimizeLegibility;
    -webkit-text-size-adjust: 100%;
    -moz-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

html[dir="rtl"] p {
    line-height: 1.9;
    word-spacing: 0.03em;
}

html[dir="rtl"] {
    font-size: 16px;
}

html[dir="rtl"] h1, html[dir="rtl"] h2, html[dir="rtl"] h3 {
    letter-spacing: -0.01em;
    line-height: 1.4;
}

html[dir="rtl"] h1 {
    line-height: 1.3;
}

html[dir="rtl"] input[type="text"],
html[dir="rtl"] input[type="email"],
html[dir="rtl"] input[type="tel"],
html[dir="rtl"] textarea {
    text-align: right;
}

html[dir="rtl"] input[type="number"] {
    text-align: left;
    direction: ltr;
}

[dir="ltr"], .ltr {
    direction: ltr;
    unicode-bidi: embed;
}

#mobile-menu {
    transition: opacity 0.2s ease, transform 0.2s ease;
}
#mobile-menu.hidden {
    display: none !important;
}
#mobile-menu:not(.hidden) {
    display: block;
    opacity: 1;
}
#mobile-menu-overlay.hidden {
    display: none !important;
}
body.mobile-nav-open {
    overflow: hidden;
}
.header-mobile-btn[aria-expanded="true"] .mobile-menu-icon-open {
    display: none;
}
.header-mobile-btn[aria-expanded="true"] .mobile-menu-icon-close {
    display: inline-block !important;
}

a:focus-visible, button:focus-visible, input:focus-visible {
    outline: 2px solid var(--teal, #0B8380);
    outline-offset: 2px;
    border-radius: 4px;
}

/* Avoid will-change on all sections — it breaks z-index stacking in donations/hero overlays */
section[data-aos] {
    will-change: opacity, transform;
}

/* ── Donation campaign page ── */
.donation-progress-animated {
    transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.sticky-donate-form {
    scroll-margin-top: 7rem;
}
.payment-method-card:has(input:checked) {
    border-color: var(--teal, #0B8380);
    background-color: rgba(11, 131, 128, 0.06);
}
.payment-method-card:focus-within {
    outline: 2px solid var(--teal, #0B8380);
    outline-offset: 2px;
}
.donation-form .checkout-btn:disabled {
    cursor: not-allowed;
}
/* Preset amount row → custom amount field */
.donation-form fieldset:has(.amount-grid) {
    padding-bottom: 1rem;
}
.donation-form .amount-btn {
    box-sizing: border-box;
    border-width: 2px;
}
@media (max-width: 1023px) {
    .sticky-donate-form {
        position: sticky;
        top: 5.5rem;
        z-index: 20;
    }
}

/* ── GLightbox: unified slides + title banner (Salam Design teal/blue) ── */
.glightbox-container {
    font-family: 'IBM Plex Sans Arabic', Inter, ui-sans-serif, system-ui, sans-serif;
    background: rgba(13, 47, 58, 0.94) !important;
    z-index: 99990 !important;
    /* Isolate from page RTL so slides stay visually centered */
    direction: ltr;
}
.glightbox-container .goverlay {
    background: linear-gradient(160deg, rgba(11, 131, 128, 0.96) 0%, rgba(26, 109, 153, 0.98) 55%, rgba(13, 47, 58, 0.99) 100%);
}
.glightbox-container .gcontainer {
    position: relative;
}
.glightbox-container .gslider {
    overflow: visible;
}
.glightbox-container .gslide {
    display: flex;
    align-items: center;
    justify-content: center;
}
.glightbox-container .gslide-inner-content {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.45s ease, filter 0.45s ease;
    will-change: transform, opacity;
}
.glightbox-container .ginner-container {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: min(92vw, 1100px);
    margin: 0 auto;
    height: auto;
}
.glightbox-container .ginner-container.desc-bottom {
    box-shadow: 0 24px 80px rgba(0, 31, 61, 0.35);
    border-radius: 12px;
    overflow: hidden;
    background: #000;
}
.glightbox-container .gslide-media {
    box-shadow: none;
    border-radius: 0;
    overflow: hidden;
    background: #0a0a0a;
    position: relative;
    line-height: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.glightbox-container .ginner-container.desc-bottom .gslide-media {
    border-radius: 12px 12px 0 0;
}
.glightbox-container .gslide-image {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: min(92vw, 1100px);
    max-height: 90vh;
    background: transparent;
}
.glightbox-container .gslide-image img {
    display: block;
    width: auto;
    height: auto;
    max-width: min(92vw, 1100px);
    max-height: 90vh;
    margin: 0 auto;
    object-fit: contain !important;
    background: transparent;
    transition: opacity 0.35s ease;
}
/* Carousel peek: stack slides; use GLightbox .current/.prev/.next state */
.glightbox-container.cms-peek-carousel .gcontainer {
    overflow: visible;
}
.glightbox-container.cms-peek-carousel .gslider {
    transform: translate3d(0, 0, 0) !important;
    width: 100% !important;
}
.glightbox-container.cms-peek-carousel .gslide {
    position: absolute !important;
    inset: 0;
    width: 100% !important;
    opacity: 0 !important;
    pointer-events: none;
}
.glightbox-container.cms-peek-carousel .gslide.current,
.glightbox-container.cms-peek-carousel .gslide.prev,
.glightbox-container.cms-peek-carousel .gslide.next {
    opacity: 1 !important;
}
.glightbox-container.cms-peek-carousel .gslide.current {
    z-index: 3;
    pointer-events: auto;
}
.glightbox-container.cms-peek-carousel .gslide.prev,
.glightbox-container.cms-peek-carousel .gslide.next {
    z-index: 2;
}
.glightbox-container.cms-peek-carousel .gslide.current .gslide-inner-content {
    transform: translate3d(0, 0, 0) scale(1);
    opacity: 1;
    filter: none;
}
.glightbox-container.cms-peek-carousel .gslide.prev .gslide-inner-content {
    transform: translate3d(-58%, 0, 0) scale(0.82);
    opacity: 0.42;
    filter: brightness(0.82);
}
.glightbox-container.cms-peek-carousel .gslide.next .gslide-inner-content {
    transform: translate3d(58%, 0, 0) scale(0.82);
    opacity: 0.42;
    filter: brightness(0.82);
}
.glightbox-container.cms-peek-carousel .gslide.prev .gslide-description,
.glightbox-container.cms-peek-carousel .gslide.next .gslide-description {
    opacity: 0;
}
/* Caption bar sits below the image — not overlaid on it */
.glightbox-container .gslide-description {
    position: static;
    flex: 0 0 auto;
    width: 100%;
    margin: 0;
    padding: 14px 20px 16px;
    background: #000;
    pointer-events: auto;
    border-radius: 0;
    max-height: none;
    overflow: visible;
}
.glightbox-container .gdesc-inner {
    padding: 0;
}
.glightbox-container .gslide-title {
    color: #fff;
    font-family: 'IBM Plex Sans Arabic', Inter, ui-sans-serif, system-ui, sans-serif;
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1.65;
    text-align: center;
    text-shadow: none;
    padding-inline: 4px;
    margin: 0;
}
.glightbox-container .gnext,
.glightbox-container .gprev {
    width: 48px;
    height: 48px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 50%;
    backdrop-filter: blur(8px);
    transition: background 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
}
.glightbox-container .gnext:hover,
.glightbox-container .gprev:hover {
    background: rgba(255, 255, 255, 0.22);
    transform: translateY(-50%) scale(1.05);
}
.glightbox-container .gclose {
    width: 42px;
    height: 42px;
    opacity: 0.85;
    transition: opacity 0.2s ease;
}
.glightbox-container .gclose:hover {
    opacity: 1;
}
.glightbox-container .cms-lb-counter {
    position: fixed;
    top: 18px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 999999;
    padding: 6px 16px;
    border-radius: 999px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #fff;
    background: rgba(26, 143, 92, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(8px);
    pointer-events: none;
    font-variant-numeric: tabular-nums;
    direction: ltr;
    unicode-bidi: isolate;
}
@media (min-width: 769px) {
    .glightbox-container .gnext {
        right: calc(50% - min(46vw, 550px) - 60px);
        left: auto;
    }
    .glightbox-container .gprev {
        left: calc(50% - min(46vw, 550px) - 60px);
        right: auto;
    }
}
@media (max-width: 768px) {
    .glightbox-container .gnext,
    .glightbox-container .gprev {
        width: 42px;
        height: 42px;
        inset-inline-start: 8px;
        inset-inline-end: 8px;
    }
    .glightbox-container .gnext {
        inset-inline-start: auto;
    }
    .glightbox-container .gprev {
        inset-inline-end: auto;
    }
    .glightbox-container .ginner-container {
        max-width: 92vw;
    }
    .glightbox-container .gslide-image,
    .glightbox-container .gslide-image img {
        max-width: 92vw;
        max-height: 90vh;
    }
    /* Mobile: full-size active slide only; hide peek neighbors */
    .glightbox-container.cms-peek-carousel .gslide.prev,
    .glightbox-container.cms-peek-carousel .gslide.next {
        opacity: 0 !important;
        pointer-events: none;
    }
    .glightbox-container.cms-peek-carousel .gslide.current .gslide-inner-content {
        transform: translate3d(0, 0, 0) scale(1);
    }
    .glightbox-container .ginner-container.desc-bottom {
        border-radius: 0;
    }
    .glightbox-container .ginner-container.desc-bottom .gslide-media {
        border-radius: 0;
    }
    .glightbox-container .gslide-description {
        padding: 12px 14px 14px;
    }
    .glightbox-container .gslide-title {
        font-size: 0.875rem;
    }
}

/* Urgent campaign fixed bottom bar — sticky donate stays visible; stack on mobile */
body.has-urgent-banner,
body:has(#urgent-campaign-banner:not([hidden])) {
    padding-bottom: calc(var(--urgent-banner-offset, 5.5rem) + env(safe-area-inset-bottom, 0px));
}

/* Sticky donate visibility lives in main.css (always on ≤900px).
   Here only stack urgent ABOVE sticky when the banner is open. */
@media (max-width: 900px) {
    body.has-urgent-banner,
    body:has(#urgent-campaign-banner:not([hidden])) {
        padding-bottom: calc(
            var(--urgent-banner-offset, 5.5rem)
            + var(--sticky-donate-stack, 4.5rem)
            + env(safe-area-inset-bottom, 0px)
        );
    }

    body.has-urgent-banner .urgent-campaign-banner,
    body:has(#urgent-campaign-banner:not([hidden])) .urgent-campaign-banner {
        bottom: calc(var(--sticky-donate-stack, 4.5rem) + env(safe-area-inset-bottom, 0px));
        padding-bottom: 0;
    }
}

@media (min-width: 901px) {
    body.has-urgent-banner,
    body:has(#urgent-campaign-banner:not([hidden])) {
        padding-bottom: calc(var(--urgent-banner-offset, 4.75rem) + env(safe-area-inset-bottom, 0px));
    }
}

/* Design filter-bar supports anchors (category chips) */
.filter-bar a {
    border: 1px solid var(--line);
    background: #fff;
    padding: 9px 14px;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
    color: var(--muted);
    min-height: 40px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}
.filter-bar a.active,
.filter-bar a:hover {
    background: var(--teal);
    color: #fff;
    border-color: var(--teal);
}

/* About/legal CMS body inside Design shell */
.legal-page-shell,
.contact-page-info {
    color: var(--ink);
    line-height: 1.8;
}
.legal-page-shell img,
.contact-page-info img {
    max-width: 100%;
    height: auto;
    border-radius: 18px;
}
.legal-page-shell h2 {
    font-size: 28px;
    margin: 1.4em 0 .5em;
}
.legal-page-shell p,
.contact-page-info p {
    color: var(--muted);
    margin: 0 0 12px;
}

/*
  Icon compatibility — Design CSS sizes SVG; CMS markup often uses Phosphor <i>.
  Keep both visible after salam main.css + Tailwind.
*/
.ph,
.ph-bold,
.ph-fill {
    display: inline-block;
    line-height: 1;
    vertical-align: middle;
    speak: never;
    font-style: normal !important;
    font-weight: normal !important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.nav-links .ph,
.nav-links .ph-bold,
.nav-links .ph-fill,
.drop-menu .ph,
.drop-menu .ph-bold,
.drop-menu .ph-fill {
    font-size: 18px;
    color: var(--teal, #0B8380);
}

.impact-cell .cell-ico .ph,
.impact-cell .cell-ico .ph-bold,
.impact-cell .cell-ico .ph-fill {
    font-size: 20px;
}

.cat-dot .ph,
.cat-dot .ph-bold,
.cat-dot .ph-fill {
    font-size: 28px;
}

.step-card .num .step-ico .ph,
.step-card .num .step-ico .ph-bold,
.step-card .num .step-ico .ph-fill,
.footer-col h4 .ph,
.footer-col h4 .ph-bold,
.footer-col h4 .ph-fill {
    font-size: 16px;
}

.footer-col a .ph,
.footer-col a .ph-bold,
.footer-col a .ph-fill {
    font-size: 18px;
    flex-shrink: 0;
    line-height: 1;
    color: var(--cyan);
    opacity: .7;
}

/* Design-style footer link icons (SVG before label; works in RTL via flex + DOM order) */
.footer-col a {
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-col a svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    display: block;
    overflow: visible;
    opacity: .7;
    color: var(--cyan);
    stroke: currentColor;
}

.footer-col h4 svg,
.footer-contact-title svg,
.footer-contact h4 svg,
.footer-contact-item svg {
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    flex-shrink: 0;
    display: block;
    overflow: visible;
    color: var(--cyan);
    stroke: currentColor;
}

.icon-btn .ph,
.icon-btn .ph-bold,
.icon-btn .ph-fill {
    font-size: 26px;
}

.donate .ph,
.donate .ph-bold,
.donate .ph-fill {
    font-size: 18px;
}
.btn .ph,
.btn .ph-bold,
.btn .ph-fill,
.mobile-donate-bar .ph,
.mobile-donate-bar .ph-bold,
.mobile-donate-bar .ph-fill {
    font-size: 16px;
}

.faq-item button i:not([class*="ph"]) {
    font-family: inherit;
}

/* Ensure Design inline SVGs keep explicit box size (not collapsed by resets) */
.icon-btn svg,
.donate svg,
.lang-btn svg,
.drop > button .chev,
.social a svg,
.impact-cell .cell-ico svg,
.cat-dot svg,
.mobile-donate-bar svg,
.footer-col a svg,
.footer-col h4 svg,
.footer-contact-title svg,
.footer-contact h4 svg,
.footer-contact-item svg {
    display: block;
    flex-shrink: 0;
    overflow: visible;
}

/* Force contact rows: icon | label | value (Tailwind svg{display:block} was stacking). */
.footer-contact-title,
.footer-contact h4,
.footer-contact-item {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: 8px !important;
}
.footer-contact-ico {
    display: flex !important;
    flex: 0 0 15px;
    align-items: center;
}
.footer-contact-title svg,
.footer-contact h4 svg,
.footer-contact-item svg,
.footer-contact-ico svg {
    width: 15px !important;
    height: 15px !important;
    max-width: 15px !important;
    flex: 0 0 15px !important;
}
.footer-contact-label,
.footer-contact-value,
.footer-contact-item small,
.footer-contact-item b {
    display: inline !important;
}
