/*==================================================================
  AL-FAJR FOUNDATION — SECTION COMPONENTS

  Homepage sections are teasers that link out to their own detail
  page. Each detail page reuses these same components.
==================================================================*/

/*==================================================================
  HERO
  Navy ground with a geometric wash, an emotive headline, the ask,
  and the impact counters sitting on a card that overlaps the fold.
==================================================================*/

.hero {
    position: relative;
    background:
        linear-gradient(120deg, rgba(4, 18, 37, .93) 0%, rgba(7, 26, 54, .86) 55%, rgba(12, 38, 71, .78) 100%),
        var(--navy);
    color: var(--on-invert);
    overflow: hidden;
}

/* When a hero image exists it sits behind the gradient. */
.hero-bg {
    position: absolute;
    inset: 0;
    z-index: -1;
}

.hero-bg img { width: 100%; height: 100%; object-fit: cover; }

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    opacity: .06;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='70' height='70' viewBox='0 0 70 70'%3E%3Cpath d='M35 2 L68 35 L35 68 L2 35 Z' fill='none' stroke='%23C9A227' stroke-width='1.4'/%3E%3Cpath d='M35 14 L56 35 L35 56 L14 35 Z' fill='none' stroke='%23C9A227' stroke-width='1'/%3E%3C/svg%3E");
    background-size: 70px 70px;
}

.hero-inner {
    position: relative;
    z-index: 1;
    padding-block: clamp(3rem, 8vw, 6rem) clamp(3rem, 7vw, 5rem);
}

.hero-grid {
    display: grid;
    gap: var(--sp-7);
    grid-template-columns: 1fr;
    align-items: center;
}

@media (min-width: 1000px) {
    .hero-grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: var(--sp-8); }
}

.hero-urdu-name {
    font-family: var(--font-urdu);
    font-size: clamp(1.05rem, .9rem + .55vw, 1.4rem);
    line-height: 2;
    color: var(--gold-light);
    direction: rtl;
    margin-bottom: var(--sp-2);
}

.hero h1 {
    color: var(--white);
    font-size: clamp(2.1rem, 1.5rem + 3.1vw, 3.7rem);
    max-width: 24ch;
}

.hero-lede {
    margin-top: var(--sp-5);
    font-size: var(--step-1);
    line-height: 1.78;
    color: var(--on-invert-muted);
    max-width: 54ch;
}

.hero-actions { margin-top: var(--sp-6); }

.hero-note {
    display: flex;
    align-items: center;
    gap: var(--sp-2);
    margin-top: var(--sp-5);
    font-size: var(--step--1);
    color: var(--on-invert-muted);
}

.hero-note i { color: var(--gold); }

/* ---- Hadith panel ---- */

.hero-hadith {
    padding: var(--sp-6);
    border: 1px solid var(--rule-invert);
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, .05);
    text-align: center;
}

.hero-hadith-ar {
    font-family: var(--font-arabic);
    font-size: clamp(1.35rem, 1.05rem + 1.1vw, 1.95rem);
    line-height: 2;
    color: var(--white);
    direction: rtl;
}

.hero-hadith-sep {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    margin-block: var(--sp-5);
}

.hero-hadith-sep::before,
.hero-hadith-sep::after {
    content: "";
    flex: 1 1 auto;
    height: 1px;
    background: var(--rule-invert);
}

.hero-hadith-sep i { color: var(--gold); font-size: .8rem; }

.hero-hadith-ur {
    font-family: var(--font-urdu);
    font-size: .98rem;
    line-height: var(--leading-urdu);
    color: var(--on-invert-muted);
    direction: rtl;
}

.hero-hadith-cite {
    display: block;
    margin-top: var(--sp-3);
    font-family: var(--font-urdu);
    font-size: .84rem;
    font-style: normal;
    color: var(--gold-light);
    direction: rtl;
}

/*==================================================================
  COUNTER CARD
  Overlaps the hero, as on PCHF.
==================================================================*/

.counter-card {
    position: relative;
    z-index: 2;
    margin-top: calc(-1 * clamp(2rem, 5vw, 3.5rem));
    padding: clamp(1.75rem, 4vw, 2.75rem);
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.counter-card .counters { gap: var(--sp-6) var(--sp-5); }

@media (min-width: 860px) {
    .counter-card .counter + .counter {
        border-inline-start: 1px solid var(--rule);
    }
}

.counter-card-foot {
    margin-top: var(--sp-5);
    padding-top: var(--sp-4);
    border-top: 1px solid var(--rule);
    font-size: var(--step--1);
    color: var(--muted);
    text-align: center;
}

/*==================================================================
  QUICK ACTION CARDS
  The "Volunteer / Donate" pair on PCHF's homepage.
==================================================================*/

.action-grid {
    display: grid;
    gap: var(--sp-5);
    grid-template-columns: 1fr;
}

@media (min-width: 780px) { .action-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.action {
    display: flex;
    flex-direction: column;
    padding: var(--sp-6);
    border-radius: var(--radius-lg);
    background: var(--navy);
    color: var(--on-invert);
    overflow: hidden;
    position: relative;
}

.action--gold { background: var(--gold); color: var(--navy); }
.action--outline { background: var(--white); color: var(--text); border: 1px solid var(--rule); }

.action-icon {
    display: grid;
    place-items: center;
    width: 3.2rem; height: 3.2rem;
    margin-bottom: var(--sp-4);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, .14);
    color: var(--gold-light);
    font-size: 1.25rem;
}

.action--gold .action-icon { background: rgba(6, 20, 45, .12); color: var(--navy); }
.action--outline .action-icon { background: var(--gold-tint); color: var(--gold-dark); }

.action h3 { font-size: var(--step-1); color: inherit; }
.action--gold h3, .action--gold p { color: var(--navy); }

.action p { margin-top: var(--sp-3); font-size: .94rem; color: var(--on-invert-muted); }
.action--outline p { color: var(--muted); }

.action-spacer { flex: 1 1 auto; min-height: var(--sp-4); }

.action .btn { margin-top: var(--sp-5); align-self: flex-start; }

/*==================================================================
  DEPARTMENT / CAUSE CARDS
==================================================================*/

.dept-card .card-media img { aspect-ratio: 3 / 2; }

.dept-card-cat {
    font-family: var(--font-head);
    font-size: .74rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--gold-dark);
}

.dept-card h3 { margin-top: var(--sp-2); }

.dept-card-ur {
    display: block;
    margin-top: var(--sp-2);
    font-family: var(--font-urdu);
    font-size: .95rem;
    font-weight: 400;
    line-height: 1.9;
    color: var(--muted);
    direction: rtl;
}

/* Inline figures on a department card */
.dept-figures {
    display: flex;
    flex-wrap: wrap;
    gap: var(--sp-4) var(--sp-5);
    margin-top: var(--sp-4);
    padding-top: var(--sp-4);
    border-top: 1px solid var(--rule);
}

.dept-figure strong {
    display: block;
    font-family: var(--font-head);
    font-size: 1.3rem;
    font-weight: 700;
    line-height: 1;
    color: var(--navy);
    font-variant-numeric: tabular-nums;
}

.dept-figure span { display: block; margin-top: .2rem; font-size: .76rem; color: var(--muted); }

/* Detail page: what the foundation covers */
.provides-list { display: flex; flex-wrap: wrap; gap: var(--sp-2); list-style: none; }

.provides-list li {
    display: inline-flex;
    align-items: center;
    gap: .45em;
    padding: .35em .85em;
    border-radius: var(--pill);
    background: var(--gold-tint);
    border: 1px solid rgba(201, 162, 39, .32);
    font-size: var(--step--1);
    font-weight: 600;
    color: var(--gold-dark);
}

.provides-list i { font-size: .8em; }

/*==================================================================
  DONATION TIERS
==================================================================*/

.tier-grid {
    display: grid;
    gap: var(--sp-5);
    grid-template-columns: repeat(auto-fill, minmax(min(17.5rem, 100%), 1fr));
}

.tier {
    display: flex;
    flex-direction: column;
    padding: var(--sp-6);
    background: var(--white);
    border: 1px solid var(--rule);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

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

.tier--featured {
    border-color: var(--gold);
    border-top: 4px solid var(--gold);
}

.tier-flag {
    align-self: flex-start;
    margin-bottom: var(--sp-4);
    padding: .28em .8em;
    border-radius: var(--pill);
    background: var(--gold);
    color: var(--navy);
    font-family: var(--font-head);
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
}

.tier-icon {
    display: grid;
    place-items: center;
    width: 3rem; height: 3rem;
    margin-bottom: var(--sp-4);
    border-radius: var(--radius);
    background: var(--gold-tint);
    color: var(--gold-dark);
    font-size: 1.2rem;
}

.tier-amount { display: flex; align-items: baseline; flex-wrap: wrap; gap: var(--sp-2); }

.tier-amount strong {
    font-family: var(--font-head);
    font-size: clamp(1.6rem, 1.35rem + .9vw, 2.1rem);
    font-weight: 700;
    line-height: 1;
    letter-spacing: -.03em;
    color: var(--gold-dark);
    font-variant-numeric: tabular-nums;
}

.tier-period { font-size: var(--step--1); color: var(--muted); }

.tier-amount--open strong { font-size: var(--step-1); color: var(--navy); }

.tier h3 { margin-top: var(--sp-4); font-size: var(--step-1); }

.tier-ur {
    display: block;
    margin-top: var(--sp-2);
    font-family: var(--font-urdu);
    font-size: .92rem;
    font-weight: 400;
    line-height: 1.85;
    color: var(--muted);
    direction: rtl;
}

.tier p { margin-top: var(--sp-3); font-size: .93rem; color: var(--muted); }

.tier-spacer { flex: 1 1 auto; min-height: var(--sp-4); }

/* Bank details */
.bank-box {
    margin-top: var(--sp-5);
    padding: var(--sp-4);
    border-radius: var(--radius);
    background: var(--cream-200);
    border: 1px solid var(--rule);
}

.bank-title {
    font-family: var(--font-head);
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--navy);
    margin-bottom: var(--sp-3);
}

.bank-box dl {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: var(--sp-2) var(--sp-4);
    font-size: var(--step--1);
    margin: 0;
}

.bank-box dt { color: var(--muted); white-space: nowrap; }
.bank-box dd { margin: 0; font-weight: 600; color: var(--text); overflow-wrap: anywhere; }
.bank-box dd.ltr { font-family: var(--font-mono); font-size: .82rem; letter-spacing: .02em; }

@media (max-width: 480px) {
    .bank-box dl { grid-template-columns: 1fr; gap: 0; }
    .bank-box dt { margin-top: var(--sp-3); }
}

/* Ways to give — icon rows on the donate page */
.ways-list { list-style: none; display: grid; gap: var(--sp-4); }

.ways-list li {
    display: flex;
    gap: var(--sp-4);
    padding: var(--sp-4);
    background: var(--white);
    border: 1px solid var(--rule);
    border-radius: var(--radius);
}

.ways-icon {
    display: grid;
    place-items: center;
    width: 2.6rem; height: 2.6rem;
    flex: 0 0 auto;
    border-radius: var(--radius-sm);
    background: var(--gold-tint);
    color: var(--gold-dark);
}

.ways-list h4 { font-size: var(--step-0); }
.ways-list p  { margin-top: var(--sp-1); font-size: .9rem; color: var(--muted); }

/*==================================================================
  PROJECT FILTERS
==================================================================*/

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: var(--sp-2);
    margin-bottom: var(--sp-6);
}

.filter-pill {
    display: inline-flex;
    align-items: center;
    gap: var(--sp-2);
    padding: .5em 1.15em;
    border: 1px solid var(--rule-strong);
    border-radius: var(--pill);
    background: var(--white);
    color: var(--text);
    font-family: var(--font-head);
    font-size: var(--step--1);
    font-weight: 600;
    cursor: pointer;
    transition: background var(--dur) var(--ease), color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}

.filter-pill:hover { border-color: var(--gold); color: var(--gold-dark); }

.filter-pill.is-active { background: var(--navy); border-color: var(--navy); color: var(--white); }

.filter-count { font-variant-numeric: tabular-nums; opacity: .7; font-weight: 500; }

.project-card[hidden] { display: none !important; }

/*==================================================================
  GALLERY
==================================================================*/

.gallery {
    display: grid;
    gap: var(--sp-4);
    grid-template-columns: repeat(auto-fill, minmax(min(15.5rem, 100%), 1fr));
}

.gallery-item {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--cream-200);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    transition: transform .6s var(--ease);
}

.gallery-item:hover img { transform: scale(1.06); }

.gallery-overlay {
    position: absolute;
    inset: auto 0 0 0;
    padding: var(--sp-5) var(--sp-4) var(--sp-4);
    background: linear-gradient(to top, rgba(4, 18, 37, .92), transparent);
    color: var(--white);
}

.gallery-overlay h3 { font-size: .95rem; color: var(--white); }
.gallery-overlay p  { margin-top: .2rem; font-size: .8rem; color: rgba(255, 255, 255, .8); }

.gallery-kind {
    position: absolute;
    inset-block-start: var(--sp-3);
    inset-inline-start: var(--sp-3);
    padding: .22em .7em;
    border-radius: var(--pill);
    background: var(--gold);
    color: var(--navy);
    font-family: var(--font-head);
    font-size: .66rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.gallery-play {
    position: absolute;
    inset-block-start: 50%;
    inset-inline-start: 50%;
    transform: translate(-50%, -50%);
    display: grid;
    place-items: center;
    width: 3.4rem; height: 3.4rem;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: var(--gold);
    color: var(--navy);
    font-size: 1rem;
    cursor: pointer;
    transition: transform var(--dur) var(--ease);
}

.gallery-play i { margin-inline-start: 3px; }
.gallery-play:hover { transform: translate(-50%, -50%) scale(1.1); }

/*==================================================================
  NEWS
==================================================================*/

.news-card .card-media img { aspect-ratio: 3 / 2; }

.news-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--sp-2) var(--sp-3);
    font-size: var(--step--1);
    color: var(--muted);
}

.news-cat {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: .72rem;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--gold-dark);
}

.news-meta time { font-variant-numeric: tabular-nums; }
.news-meta .dot { opacity: .4; }

/* Featured news split on the homepage */
.news-feature {
    display: grid;
    gap: var(--sp-5) var(--sp-7);
    grid-template-columns: 1fr;
    align-items: center;
    padding: var(--sp-5);
    background: var(--white);
    border: 1px solid var(--rule);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    margin-bottom: var(--sp-6);
}

@media (min-width: 900px) {
    .news-feature { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); }
}

.news-feature-media { border-radius: var(--radius); overflow: hidden; }
.news-feature-media img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.news-feature h3 { margin-top: var(--sp-3); font-size: var(--step-2); }
.news-feature h3 a { color: inherit; text-decoration: none; }
.news-feature h3 a:hover { color: var(--gold-dark); }
.news-feature p { margin-top: var(--sp-3); color: var(--muted); }

/*==================================================================
  TESTIMONIALS
==================================================================*/

.quote {
    padding: var(--sp-6);
    background: var(--white);
    border: 1px solid var(--rule);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.quote-mark { font-size: 2rem; line-height: 1; color: var(--gold); }

.quote p {
    margin-top: var(--sp-3);
    font-size: var(--step-0);
    line-height: 1.8;
    color: var(--text-mid);
}

.quote footer {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    margin-top: var(--sp-5);
    padding-top: var(--sp-4);
    border-top: 1px solid var(--rule);
}

.quote-cite { font-family: var(--font-head); font-weight: 600; font-style: normal; color: var(--navy); }
.quote-role { display: block; font-size: var(--step--1); color: var(--muted); }

/*==================================================================
  CONTACT
==================================================================*/

.contact-grid { display: grid; gap: var(--sp-7); grid-template-columns: 1fr; }

@media (min-width: 940px) {
    .contact-grid { grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: var(--sp-8); }
}

.contact-list { list-style: none; }

.contact-list > li {
    display: flex;
    gap: var(--sp-4);
    padding: var(--sp-4) 0;
    border-bottom: 1px solid var(--rule);
}

.contact-list > li:first-child { border-top: 1px solid var(--rule); }

.contact-icon {
    display: grid;
    place-items: center;
    width: 2.5rem; height: 2.5rem;
    flex: 0 0 auto;
    border-radius: 50%;
    background: var(--gold-tint);
    color: var(--gold-dark);
    font-size: .9rem;
}

.contact-label {
    display: block;
    font-family: var(--font-head);
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .13em;
    text-transform: uppercase;
    color: var(--muted);
}

.contact-value { display: block; margin-top: .15rem; font-weight: 500; overflow-wrap: anywhere; }

.contact-list a { color: inherit; text-decoration: none; }
.contact-list a:hover .contact-value { color: var(--gold-dark); text-decoration: underline; }

.contact-map {
    margin-top: var(--sp-5);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--rule);
    background: var(--cream-200);
}

.contact-map iframe { width: 100%; border: 0; }

.contact-map-empty {
    display: grid;
    place-items: center;
    gap: var(--sp-3);
    aspect-ratio: 16 / 10;
    color: var(--muted);
    font-size: var(--step--1);
}

.contact-map-empty i { font-size: 1.7rem; color: var(--sand-600); }

.contact-form {
    padding: clamp(1.5rem, 3vw, 2.25rem);
    background: var(--white);
    border: 1px solid var(--rule);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-3); margin-top: var(--sp-5); }

.btn--whatsapp { --btn-bg: transparent; --btn-fg: #128C7E; --btn-bd: #128C7E; }
.btn--whatsapp:hover { --btn-bg: #128C7E; --btn-fg: #fff; }

.cbtn-send[aria-busy="true"] { opacity: .7; pointer-events: none; }

/*==================================================================
  LIGHTBOX
==================================================================*/

.alfajr-lightbox { position: fixed; inset: 0; z-index: 900; display: none; }
.alfajr-lightbox.is-open { display: block; }

.lb-backdrop { position: absolute; inset: 0; background: rgba(4, 18, 37, .95); }

.lb-panel {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
    gap: var(--sp-4);
    padding: var(--sp-5);
}

.lb-topbar { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--sp-4); color: #fff; }
.lb-meta { display: flex; flex-direction: column; gap: .1rem; }

.lb-category {
    font-family: var(--font-head);
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--gold-light);
}

.lb-title { font-size: var(--step-0); }

.lb-close, .lb-nav, .lb-download {
    display: grid;
    place-items: center;
    width: 2.6rem; height: 2.6rem;
    flex: 0 0 auto;
    border: 1px solid rgba(255, 255, 255, .3);
    border-radius: 50%;
    background: transparent;
    color: #fff;
    text-decoration: none;
    cursor: pointer;
    transition: background var(--dur) var(--ease);
}

.lb-close:hover, .lb-nav:hover, .lb-download:hover { background: var(--gold); border-color: var(--gold); color: var(--navy); }

.lb-stage { flex: 1 1 auto; display: flex; align-items: center; justify-content: center; gap: var(--sp-4); min-height: 0; }
.lb-img-wrapper { position: relative; display: grid; place-items: center; max-height: 100%; }
.lb-img { max-width: 100%; max-height: 76vh; border-radius: var(--radius); object-fit: contain; }
.lb-spinner { position: absolute; }

.lb-spinner-ring {
    width: 2rem; height: 2rem;
    border: 2px solid rgba(255, 255, 255, .25);
    border-top-color: var(--gold);
    border-radius: 50%;
    animation: lbSpin .8s linear infinite;
}

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

.lb-bottombar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-4);
    color: rgba(255, 255, 255, .75);
    font-size: var(--step--1);
}

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

/*==================================================================
  VIDEO MODAL
==================================================================*/

.video-modal { position: fixed; inset: 0; z-index: 900; display: none; align-items: center; justify-content: center; padding: var(--sp-5); }
.video-modal.is-open { display: flex; }
.video-modal-backdrop { position: absolute; inset: 0; background: rgba(4, 18, 37, .95); }
.video-modal-panel { position: relative; z-index: 1; width: min(1100px, 100%); }

.video-modal-bar { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4); margin-bottom: var(--sp-3); color: #fff; }

.video-modal-close {
    display: grid; place-items: center;
    width: 2.5rem; height: 2.5rem;
    border: 1px solid rgba(255, 255, 255, .3);
    border-radius: 50%;
    background: transparent; color: #fff; cursor: pointer;
}

.video-modal-close:hover { background: var(--gold); border-color: var(--gold); color: var(--navy); }

.video-modal-frame {
    position: relative;
    aspect-ratio: 16 / 9;
    border-radius: var(--radius);
    overflow: hidden;
    background: #000;
}

.video-modal-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
