/* Darul Ihsaan Barking — design tokens + base styles
   Palette and token names carried forward from the existing WP theme's --di-*
   system so the rebuild reads as the same brand, refined. */

:root {
  /* Brand palette (extracted from the live site) */
  --di-teal:            #35868b;   /* primary */
  --di-teal-deep:       #2a6f73;
  --di-teal-2:          #2a9d8f;
  --di-cyan:            #0ea1b7;
  --di-sky:             #0ea5e9;
  --di-ink:             #0f172a;   /* dark slate text */
  --di-muted:           #475569;

  /* Backgrounds & borders (slate tiers) */
  --di-bg:              #ffffff;
  --di-bg-2:            #f8fafc;
  --di-bg-3:            #f1f5f9;
  --di-border:          #e2e8f0;
  --di-border-light:    rgba(15, 23, 42, 0.08);

  /* Accents */
  --di-amber-bg:        #fef3c7;
  --di-amber-text:      #b45309;
  --di-success:         #0d9488;
  --di-success-bg:      #ccfbf1;
  --di-danger:          #b91c1c;
  --di-danger-bg:       #fee2e2;

  /* Shape & type (preserved from existing tokens) */
  --di-radius-card:     20px;
  --di-radius-btn:      14px;
  --di-radius-sm:       10px;
  --di-maxw:            1140px;
  /* Type pairing: Bricolage Grotesque for headings (bold, confident, with real
     character — not the ubiquitous Inter look) over Lexend body (clean, highly
     legible). Distinctive and personable without sacrificing readability. */
  --di-font:            'Lexend', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --di-font-display:    'Bricolage Grotesque', 'Lexend', sans-serif;
  --di-shadow:          0 1px 2px rgba(15,23,42,.04), 0 8px 24px rgba(15,23,42,.06);
  --di-shadow-lg:       0 12px 40px rgba(15,23,42,.12);

  --di-grad: linear-gradient(135deg, var(--di-teal) 0%, var(--di-cyan) 100%);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
/* Anchor jumps clear the sticky header */
:target { scroll-margin-top: 96px; }
::selection { background: rgba(53,134,139,.22); }

/* Keyboard focus — visible brand ring, never on mouse click */
:focus-visible { outline: 2px solid var(--di-teal); outline-offset: 2px; border-radius: 4px; }
:focus:not(:focus-visible) { outline: none; }

/* Skip to content (screen-reader / keyboard users) */
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 200; background: var(--di-teal); color: #fff; padding: 10px 16px; border-radius: 10px; font-weight: 700; transition: top .15s; }
.skip-link:focus { top: 12px; text-decoration: none; }
body {
  margin: 0;
  font-family: var(--di-font);
  color: var(--di-ink);
  background: var(--di-bg);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--di-teal); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { font-family: var(--di-font-display); line-height: 1.08; color: var(--di-ink); font-weight: 800; letter-spacing: -0.02em; }
h1 { font-weight: 800; }
h1 { font-size: clamp(2rem, 4vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }

.container { max-width: var(--di-maxw); margin: 0 auto; padding: 0 20px; }
.section { padding: 64px 0; }
.section--tight { padding: 40px 0; }
.muted { color: var(--di-muted); }
.center { text-align: center; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px; border-radius: var(--di-radius-btn);
  font-weight: 600; font-size: 1rem; cursor: pointer;
  border: 1px solid var(--di-border); background: var(--di-bg); color: var(--di-ink);
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); box-shadow: var(--di-shadow); }
.btn--primary { background: var(--di-grad); color: #fff; border: none; }
.btn--ghost { background: transparent; }
.btn--lg { padding: 15px 30px; font-size: 1.05rem; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.85); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--di-border);
}
.navbar { display: flex; align-items: center; justify-content: space-between; height: 80px; }
.brand { display: flex; align-items: center; gap: 12px; }
/* Logo: keep the emblem's true (square) aspect, fit fully with breathing room
   so the calligraphy never looks clipped, vertically centred in the bar. */
.brand img { width: auto; height: 62px; max-height: 62px; object-fit: contain; flex: none; }
@media (max-width: 560px) { .brand img { height: 48px; } }
.brand__name { font-weight: 800; font-size: 1.15rem; letter-spacing: -0.02em; }
.nav-links { display: flex; gap: 4px; align-items: center; }
.nav-links a { padding: 8px 14px; border-radius: 10px; color: var(--di-muted); font-weight: 500; font-size: .97rem; }
.nav-links a:hover { background: var(--di-bg-3); color: var(--di-ink); text-decoration: none; }
/* The Donate button is a primary button inside the nav — keep its text white,
   overriding the muted .nav-links a colour. */
.nav-links a.btn--primary, .mobile-nav a.btn--primary { color: #fff; }
.nav-links a.btn--primary:hover, .mobile-nav a.btn--primary:hover { color: #fff; }
.menu-btn { display: none; background: none; border: 1px solid var(--di-border); border-radius: 10px; padding: 8px 12px; font-size: 1.1rem; cursor: pointer; }

/* Hero */
.hero { background: var(--di-bg-2); border-bottom: 1px solid var(--di-border); }
.hero__wrap { display: grid; gap: 28px; padding: 72px 0; }
.kicker { display: inline-block; padding: 6px 14px; border-radius: 999px; background: var(--di-success-bg); color: var(--di-success); font-weight: 600; font-size: .85rem; }
.hero__sub { font-size: 1.2rem; color: var(--di-muted); max-width: 60ch; }
.hero__cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; }

/* Cards */
.grid { display: grid; gap: 22px; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.card {
  background: var(--di-bg); border: 1px solid var(--di-border);
  border-radius: var(--di-radius-card); padding: 26px; box-shadow: var(--di-shadow);
  transition: transform .14s ease, box-shadow .14s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--di-shadow-lg); }
.card h3 { margin: 6px 0 8px; font-size: 1.2rem; }
.card p { margin: 0; color: var(--di-muted); font-size: .97rem; }
.pill { display: inline-block; padding: 4px 12px; border-radius: 999px; background: var(--di-bg-3); color: var(--di-teal-deep); font-weight: 600; font-size: .8rem; }
.tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 14px; }
.tag { display: inline-block; padding: 4px 11px; border-radius: 999px; font-size: .76rem; font-weight: 600; background: var(--di-success-bg); color: var(--di-success); }
.tags--hero .tag { background: rgba(255,255,255,.18); color: #fff; }

/* Page hero band (content/news pages) */
.page-hero { background: var(--di-grad); color: #fff; padding: 56px 0; }
.page-hero h1 { color: #fff; }
.page-hero .pill { background: rgba(255,255,255,.18); color: #fff; }
.page-hero a.pill:hover { background: rgba(255,255,255,.28); text-decoration: none; }

/* Rendered WP page body */
.prose { max-width: 75ch; margin: 0 auto; }
.prose h2 { margin-top: 2em; }
.prose h3 { margin-top: 1.6em; }
.prose p { margin: 1em 0; }
.prose img { border-radius: var(--di-radius-sm); margin: 1.4em 0; width: 100%; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin: .4em 0; }
.prose a { font-weight: 600; }
.prose blockquote { position: relative; margin: 1.6em 0; padding: 4px 0 4px 30px; font-size: 1.18rem; line-height: 1.5; font-style: italic; color: var(--di-ink); }
.prose blockquote::before { content: "\201C"; position: absolute; left: -2px; top: 2px; font-family: Georgia, "Times New Roman", serif; font-size: 2.6rem; line-height: 1; color: var(--di-teal); }
.prose blockquote > :first-child { margin-top: 0; } .prose blockquote > :last-child { margin-bottom: 0; }
.prose video, .prose iframe { width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; border-radius: var(--di-radius-card); margin: 1.4em 0; display: block; }
.prose table { width: 100%; border-collapse: collapse; margin: 1.4em 0; font-size: .95rem; }
.prose th, .prose td { border: 1px solid var(--di-border); padding: 10px 12px; text-align: left; }
.prose thead th { background: var(--di-bg-3); }

/* CMS content blocks (inserted via the editor; rendered on public pages) */
.prose .callout { background: var(--di-success-bg); border: 1px solid rgba(13,148,136,.22); border-radius: var(--di-radius-card); padding: 18px 22px; margin: 1.4em 0; }
.prose .callout > :first-child { margin-top: 0; }
.prose .callout > :last-child { margin-bottom: 0; }
.prose .cols { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin: 1.4em 0; }
.prose .cols > div > :first-child { margin-top: 0; }
.prose hr { border: 0; height: 1px; background: var(--di-border); margin: 2em 0; }
.prose .embed { margin: 1.4em 0; }
.prose .embed iframe { width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; border-radius: var(--di-radius-card); display: block; }
.prose .btn { text-decoration: none; }
@media (max-width: 640px) { .prose .cols { grid-template-columns: 1fr; gap: 16px; } }

/* WhatsApp floating button (site-wide, discoverable) */
.wa-fab { position: fixed; right: 18px; bottom: 18px; z-index: 900; width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; background: #25d366; color: #fff; box-shadow: 0 8px 24px rgba(15,23,42,.22); transition: transform .15s; }
.wa-fab:hover { transform: translateY(-2px) scale(1.04); text-decoration: none; }
.wa-fab::after { content: "Join our WhatsApp"; position: absolute; right: 70px; white-space: nowrap; background: var(--di-ink); color: #fff; font-size: .82rem; font-weight: 600; padding: 7px 12px; border-radius: 10px; opacity: 0; pointer-events: none; transition: opacity .15s; }
.wa-fab:hover::after { opacity: 1; }
.mobile-wa { display: none; }
.mobile-nav a.mobile-qibla { display: flex; align-items: center; gap: 10px; color: var(--di-teal-deep); background: var(--di-bg-2); border: 1px solid var(--di-border); margin-top: 4px; }
@media (max-width: 860px) { .wa-fab { display: none; } .mobile-nav a.mobile-wa { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 6px; background: #25d366; color: #fff; } .mobile-nav a.mobile-wa:hover { background: #1ebe5b; color: #fff; } }

/* WhatsApp join banner block (usable in content via [whatsapp]) */
.wa-join { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; justify-content: space-between; background: var(--di-bg-2); border: 1px solid var(--di-border); border-radius: var(--di-radius-card); padding: 22px 26px; }
.wa-join h3 { margin: 0 0 4px; }
.wa-join p { margin: 0; color: var(--di-muted); }
.wa-join .btn-wa { background: #25d366; color: #fff; border: none; padding: 13px 22px; border-radius: var(--di-radius-btn); font-weight: 700; display: inline-flex; align-items: center; gap: 9px; }
.wa-join .btn-wa:hover { background: #1da851; text-decoration: none; }

/* Mobile nav panel */
.mobile-nav { display: none; flex-direction: column; gap: 6px; padding: 12px 20px 20px; border-top: 1px solid var(--di-border); background: #fff; }
.mobile-nav a { padding: 12px 14px; border-radius: 10px; color: var(--di-ink); font-weight: 600; }
.mobile-nav a:hover { background: var(--di-bg-3); text-decoration: none; }
.mobile-nav .btn--primary { color: #fff; margin-top: 6px; justify-content: center; }
@media (max-width: 860px) {
  .mobile-nav:not([hidden]) { display: flex; }
}

/* Footer — world class */
.site-footer { position: relative; color: #cbd5e1; margin-top: 64px; background: var(--di-ink); }
.site-footer a { color: #cbd5e1; transition: color .15s; }
.site-footer a:hover { color: #fff; }
/* Call-to-action band */
.footer__cta { position: relative; overflow: hidden; background: linear-gradient(120deg, #123b3f 0%, #2a6f73 55%, #0ea1b7 100%); }
.footer__cta::before { content: ""; position: absolute; inset: 0; background: radial-gradient(600px 300px at 85% -30%, rgba(255,255,255,.18), transparent 60%); pointer-events: none; }
.footer__cta-in { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 28px; padding: 46px 20px; flex-wrap: wrap; }
.footer__cta-txt h2 { color: #fff; margin: 0 0 6px; font-size: clamp(1.5rem, 3.4vw, 2.1rem); line-height: 1.1; }
.footer__cta-txt p { margin: 0; color: rgba(255,255,255,.92); max-width: 48ch; font-size: 1.02rem; }
.footer__cta-btns { display: flex; gap: 12px; flex-wrap: wrap; }
.footer__cta .btn--primary { background: #fff; color: var(--di-teal-deep); }
.footer__cta .btn--primary:hover { background: #f1f5f9; }
.footer__ghost { background: rgba(255,255,255,.14); color: #fff; border: 1px solid rgba(255,255,255,.32); }
.site-footer .footer__ghost { color: #fff; }
.footer__ghost:hover { background: rgba(255,255,255,.24); color: #fff; }
/* Main body */
.footer__body { position: relative; overflow: hidden; padding: 56px 0 28px; }
.footer__body::before { content: ""; position: absolute; top: -30%; right: -8%; width: 520px; height: 520px; background: radial-gradient(circle, rgba(53,134,139,.16), transparent 70%); pointer-events: none; }
.footer__top { position: relative; display: grid; grid-template-columns: 1.4fr 2.4fr; gap: 48px; }
.footer__brand { display: flex; flex-direction: column; align-items: flex-start; gap: 18px; }
.footer__logo { width: auto; height: 62px; object-fit: contain; filter: brightness(0) invert(1); }
.footer__tag { margin: 0; color: #94a3b8; font-size: .96rem; line-height: 1.65; max-width: 36ch; }
.footer__addr { font-style: normal; color: #94a3b8; line-height: 1.65; font-size: .92rem; margin: 0 0 8px; }
.footer__cols { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
.footer__links { display: flex; flex-direction: column; gap: 11px; }
.footer__links strong { color: #fff; font-size: .76rem; text-transform: uppercase; letter-spacing: .09em; margin-bottom: 6px; }
.footer__links a { font-size: .94rem; font-weight: 500; width: fit-content; }
.footer__socials { display: flex; gap: 9px; flex-wrap: wrap; }
.footer__social { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); color: #94a3b8; transition: background .15s, color .15s, border-color .15s, transform .12s; }
.footer__social:hover { background: var(--di-teal); color: #fff; border-color: transparent; transform: translateY(-2px); text-decoration: none; }
.footer__bottom { position: relative; border-top: 1px solid rgba(255,255,255,.1); margin-top: 48px; padding-top: 24px; font-size: .85rem; color: #94a3b8; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px 24px; }
.footer__legal { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.footer__legal a { font-size: .84rem; font-weight: 600; color: #94a3b8; }
@media (max-width: 900px) { .footer__top { grid-template-columns: 1fr; gap: 36px; } .footer__cta-in { padding: 36px 20px; } }
@media (max-width: 600px) { .footer__cols { grid-template-columns: 1fr 1fr; gap: 24px; } .footer__cta-btns .btn { flex: 1; justify-content: center; } }
/* Mobile: tighter rhythm + compact footer */
@media (max-width: 767px) {
  .section { padding: 36px 0; }
  .section--tight { padding: 24px 0; }
  .page-hero { padding: 32px 0; }
  .section-head { margin-bottom: 14px !important; }
  .yt-head { margin-bottom: 14px; }
  .prose h2 { margin-top: 1.4em; }
  .prose h3 { margin-top: 1.2em; }
}
@media (max-width: 600px) {
  .site-footer { margin-top: 32px; }
  .footer__cta-in { padding: 28px 20px; gap: 16px; }
  .footer__cta-txt h2 { font-size: 1.4rem; }
  .footer__cta-txt p { font-size: .95rem; }
  .footer__cta-btns { width: 100%; gap: 10px; }
  .footer__cta-btns .btn { padding: 12px 14px; font-size: .95rem; }
  .footer__body { padding: 28px 0 18px; }
  .footer__top { gap: 22px; }
  .footer__brand { gap: 12px; }
  .footer__logo { height: 48px; }
  .footer__tag { font-size: .9rem; line-height: 1.5; }
  .footer__social { width: 40px; height: 40px; }
  .footer__cols { gap: 20px 14px; }
  .footer__links { gap: 4px; }
  .footer__links strong { margin-bottom: 4px; }
  .footer__links a { font-size: .92rem; padding: 5px 0; }
  .footer__cols .footer__links:first-child { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, 1fr); column-gap: 10px; align-content: start; }
  .footer__cols .footer__links:first-child strong { grid-column: 1 / -1; }
  .footer__cols .footer__links:last-child { grid-column: 1 / -1; border-top: 1px solid rgba(255,255,255,.1); padding-top: 16px; }
  .footer__addr { margin: 0 0 2px; }
  .footer__bottom { margin-top: 22px; padding-top: 16px; flex-direction: column; align-items: flex-start; gap: 10px; font-size: .8rem; }
  .footer__legal { gap: 4px 18px; }
}

@media (max-width: 860px) {
  .grid--3, .grid--2 { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .menu-btn { display: inline-block; }
}

/* ─────────────────────────────────────────────────────────────
   Motion & interaction layer (progressively enhanced by site.js)
   ───────────────────────────────────────────────────────────── */

/* Scroll-reveal: elements start shifted + transparent, settle when .is-in added */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s cubic-bezier(.22,.61,.36,1), transform .6s cubic-bezier(.22,.61,.36,1); will-change: opacity, transform; }
.reveal.is-in { opacity: 1; transform: none; }

/* Header: condense + gain shadow once scrolled */
.site-header { transition: box-shadow .2s ease, background .2s ease; }
.site-header.scrolled { box-shadow: 0 6px 24px rgba(15,23,42,.08); background: rgba(255,255,255,.92); }
.site-header.scrolled .navbar { height: 66px; }

/* Animated underline for nav links */
.nav-links a:not(.btn) { position: relative; }
.nav-links a:not(.btn)::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: 4px; height: 2px; background: var(--di-grad); border-radius: 2px; transform: scaleX(0); transform-origin: left; transition: transform .22s ease; }
.nav-links a:not(.btn):hover::after, .nav-links a[aria-current="page"]::after { transform: scaleX(1); }
.nav-links a[aria-current="page"] { color: var(--di-ink); }

/* Buttons: sheen sweep on hover for primary CTAs */
.btn--primary { position: relative; overflow: hidden; }
.btn--primary::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.35) 50%, transparent 70%); transform: translateX(-120%); transition: transform .6s ease; }
.btn--primary:hover::after { transform: translateX(120%); }

/* Card top-accent that draws in on hover */
.card { position: relative; overflow: hidden; }
.card::before { content: ""; position: absolute; left: 0; top: 0; height: 3px; width: 100%; background: var(--di-grad); transform: scaleX(0); transform-origin: left; transition: transform .3s ease; }
.card:hover::before { transform: scaleX(1); }

/* Reading-progress bar (article pages) */
.read-bar { position: fixed; left: 0; top: 0; height: 3px; width: 100%; z-index: 100; background: var(--di-grad); transform: scaleX(0); transform-origin: left; will-change: transform; }

/* Back-to-top */
.to-top { position: fixed; left: 18px; bottom: 18px; z-index: 800; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: #fff; color: var(--di-teal); border: 1px solid var(--di-border); box-shadow: var(--di-shadow); cursor: pointer; opacity: 0; transform: translateY(12px) scale(.9); pointer-events: none; transition: opacity .2s, transform .2s, background .15s; }
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { background: var(--di-teal); color: #fff; }
@media (max-width: 640px) { .to-top { left: 14px; bottom: 76px; width: 42px; height: 42px; } }

/* Stat / impact figure (uses data-count) */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 20px; }
.stat { text-align: center; padding: 22px 16px; }
.stat__num { font-family: var(--di-font-display); font-size: clamp(2rem, 5vw, 3rem); font-weight: 800; letter-spacing: -.02em; background: var(--di-grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; line-height: 1; }
.stat__label { margin-top: 8px; color: var(--di-muted); font-weight: 600; font-size: .95rem; }

/* Subtle float for the WhatsApp FAB to draw the eye (once) */
@keyframes wa-pop { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
.wa-fab { animation: wa-pop 2.4s ease-in-out 1.5s 2; }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}

/* Breadcrumbs — page hierarchy trail, sits above the H1 in the hero. */
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 12px; font-size: .82rem; font-weight: 600; }
.crumbs a { color: var(--di-teal); }
.crumbs a:hover { text-decoration: underline; }
.crumbs [aria-current="page"] { color: var(--di-muted); }
.crumbs__sep { color: var(--di-border); }
.page-hero .crumbs a { color: rgba(255,255,255,.9); }
.page-hero .crumbs [aria-current="page"], .page-hero .crumbs__sep { color: rgba(255,255,255,.6); }

/* ============================================================
   GALLERY BLOCKS  (.di-gal--grid|wall|reel|snaps|spotlight|mosaic)
   Inserted from the CMS editor, enhanced by site.js (lightbox + coverflow).
   ============================================================ */
.di-gal { margin: 1.8em 0; }
.di-gal img { display: block; width: 100%; height: 100%; object-fit: cover; margin: 0; background: var(--di-bg-3); cursor: zoom-in; }
.di-gal__item { margin: 0; position: relative; overflow: hidden; border-radius: var(--di-radius-sm); }

@media (prefers-reduced-motion: no-preference) {
  .di-gal--grid .di-gal__item,
  .di-gal--wall .di-gal__item,
  .di-gal--mosaic .di-gal__item { animation: diGalRise .6s cubic-bezier(.2,.8,.2,1) both; animation-delay: calc(var(--i,0) * 40ms); }
  @keyframes diGalRise { from { opacity: 0; transform: translateY(14px) scale(.985); } to { opacity: 1; transform: none; } }
}

/* Grid — uniform squares */
.di-gal--grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.di-gal--grid .di-gal__item { aspect-ratio: 1 / 1; border: 1px solid var(--di-border); }
.di-gal--grid .di-gal__item img { transition: transform .5s cubic-bezier(.2,.8,.2,1); }
.di-gal--grid .di-gal__item::after { content: ""; position: absolute; inset: 0; border: 2px solid transparent; border-radius: var(--di-radius-sm); transition: border-color .2s; pointer-events: none; }
.di-gal--grid .di-gal__item:hover img { transform: scale(1.07); }
.di-gal--grid .di-gal__item:hover::after { border-color: var(--di-teal); }

/* Masonry wall — natural heights in columns */
.di-gal--wall { column-count: 4; column-gap: 12px; }
.di-gal--wall .di-gal__item { break-inside: avoid; margin: 0 0 12px; box-shadow: var(--di-shadow); transition: transform .35s cubic-bezier(.2,.8,.2,1); }
.di-gal--wall .di-gal__item img { height: auto; }
.di-gal--wall .di-gal__item:hover { transform: translateY(-4px); }
@media (max-width: 960px) { .di-gal--wall { column-count: 3; } }
@media (max-width: 600px) { .di-gal--wall { column-count: 2; } }

/* Filmstrip reel — auto-scrolling ribbon (site.js clones the track for a seamless loop) */
.di-gal--reel { position: relative; overflow: hidden; border: 1px solid var(--di-border); border-radius: var(--di-radius-card); background: var(--di-bg); }
.di-gal--reel::before, .di-gal--reel::after { content: ""; position: absolute; top: 0; bottom: 0; width: 64px; z-index: 3; pointer-events: none; }
.di-gal--reel::before { left: 0; background: linear-gradient(90deg, var(--di-bg), transparent); }
.di-gal--reel::after { right: 0; background: linear-gradient(270deg, var(--di-bg), transparent); }
.di-gal--reel .di-gal__track { display: flex; gap: 14px; padding: 16px; width: max-content; }
.di-gal--reel .di-gal__item { flex: 0 0 auto; width: 240px; aspect-ratio: 3 / 2; box-shadow: var(--di-shadow); }
.di-gal--reel .di-gal__item img { transition: transform .4s; }
.di-gal--reel .di-gal__item:hover img { transform: scale(1.05); }
@media (prefers-reduced-motion: no-preference) {
  .di-gal--reel .di-gal__track { animation: diGalReel 42s linear infinite; }
  .di-gal--reel:hover .di-gal__track { animation-play-state: paused; }
  @keyframes diGalReel { to { transform: translateX(-50%); } }
}

/* Snapshots — scattered instant prints */
.di-gal--snaps { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.di-gal--snaps .di-gal__item { background: #fff; padding: 10px 10px 32px; border: 1px solid var(--di-border); border-radius: 4px; box-shadow: var(--di-shadow); width: 204px; transition: transform .3s cubic-bezier(.2,.8,.2,1), box-shadow .3s; overflow: visible; }
.di-gal--snaps .di-gal__item img { aspect-ratio: 1 / 1; border-radius: 2px; }
.di-gal--snaps .di-gal__item:nth-child(3n+1) { transform: rotate(-3deg); }
.di-gal--snaps .di-gal__item:nth-child(3n+2) { transform: rotate(2.2deg); }
.di-gal--snaps .di-gal__item:nth-child(3n) { transform: rotate(-1.3deg); }
.di-gal--snaps .di-gal__item:hover { transform: rotate(0deg) translateY(-8px) scale(1.03); box-shadow: var(--di-shadow-lg); z-index: 2; }

/* Mosaic — dense bento wall */
.di-gal--mosaic { display: grid; grid-template-columns: repeat(6, 1fr); grid-auto-rows: 116px; gap: 12px; grid-auto-flow: dense; }
.di-gal--mosaic .di-gal__item { grid-column: span 2; grid-row: span 2; }
.di-gal--mosaic .di-gal__item:nth-child(7n+1) { grid-column: span 3; grid-row: span 3; }
.di-gal--mosaic .di-gal__item:nth-child(7n+4) { grid-column: span 4; grid-row: span 2; }
.di-gal--mosaic .di-gal__item:nth-child(7n+5) { grid-column: span 2; grid-row: span 1; }
.di-gal--mosaic .di-gal__item:nth-child(7n+6) { grid-column: span 2; grid-row: span 3; }
.di-gal--mosaic .di-gal__item img { transition: transform .55s cubic-bezier(.2,.8,.2,1); }
.di-gal--mosaic .di-gal__item:hover img { transform: scale(1.06); }
@media (max-width: 820px) { .di-gal--mosaic { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 520px) { .di-gal--mosaic { grid-template-columns: repeat(2, 1fr); } .di-gal--mosaic .di-gal__item, .di-gal--mosaic .di-gal__item:nth-child(n) { grid-column: span 2; grid-row: span 2; } }

/* Spotlight — 3D coverflow. Static horizontal scroll until site.js adds .is-ready. */
.di-gal--spotlight { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; }
.di-gal--spotlight .di-gal__item { flex: 0 0 280px; aspect-ratio: 1 / 1; scroll-snap-align: center; }
.di-gal--spotlight.is-ready { display: block; position: relative; height: 400px; perspective: 1500px; overflow: hidden; scroll-snap-type: none; }
.di-gal--spotlight.is-ready .di-gal__item { position: absolute; top: 50%; left: 50%; width: 300px; height: 300px; flex: none; border-radius: 18px; box-shadow: var(--di-shadow-lg); transform: translate(-50%, -50%); transition: transform .5s cubic-bezier(.2,.8,.2,1), opacity .5s, filter .5s; will-change: transform; }
.di-gal--spotlight.is-ready .di-gal__item.is-center { cursor: zoom-in; }
.di-gal--spotlight.is-ready .di-gal__item::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 58%, rgba(15,23,42,.4)); pointer-events: none; }
.di-gal__nav { position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%); display: flex; gap: 10px; z-index: 40; }
.di-gal__nav button { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--di-border); background: var(--di-bg); color: var(--di-ink); font-size: 18px; line-height: 1; cursor: pointer; box-shadow: var(--di-shadow); transition: .15s; }
.di-gal__nav button:hover { background: var(--di-teal); color: #fff; border-color: var(--di-teal); }

/* Shared lightbox (built once by site.js) */
.di-lb { position: fixed; inset: 0; z-index: 4000; display: none; align-items: center; justify-content: center; padding: 32px; background: rgba(15,23,42,.86); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.di-lb.on { display: flex; }
.di-lb img { max-width: min(94vw, 1040px); max-height: 86vh; border-radius: 12px; object-fit: contain; box-shadow: 0 40px 90px -30px #000; background: none; cursor: default; }
.di-lb__x { position: absolute; top: 18px; right: 22px; font-size: 24px; }
.di-lb__nav { position: absolute; top: 50%; transform: translateY(-50%); font-size: 34px; padding: 18px; opacity: .75; }
.di-lb__nav:hover { opacity: 1; }
.di-lb__prev { left: 4px; } .di-lb__next { right: 4px; }
.di-lb__x, .di-lb__nav { background: none; border: 0; color: #fff; cursor: pointer; line-height: 1; }

/* ── Nav dropdowns (max 3 levels) ───────────────────────────── */
.nav-item { position: relative; }
.sub-toggle { appearance: none; border: 0; background: transparent; cursor: pointer; width: 26px; height: 32px; padding: 0; border-radius: 8px; color: var(--di-muted); display: inline-grid; place-items: center; }
.sub-toggle::before { content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translate(-1px,-1px); transition: transform .2s ease; }
.sub-toggle:hover { background: var(--di-bg-3); color: var(--di-ink); }
.nav-item.open > .sub-toggle::before { transform: rotate(-135deg) translate(-1px,-1px); }

/* desktop bar */
.nav-links .nav-item.has-sub { display: flex; align-items: center; }
.nav-links .nav-item.has-sub > a { padding-right: 4px; }
.nav-links .nav-item.has-sub > a::after { right: 4px; }
.nav-links .sub { position: absolute; top: 100%; left: 0; min-width: 230px; padding: 8px; background: #fff; border: 1px solid var(--di-border); border-radius: 14px; box-shadow: var(--di-shadow-lg); display: none; flex-direction: column; gap: 2px; z-index: 60; }
.nav-links .nav-item:hover > .sub, .nav-links .nav-item:focus-within > .sub, .nav-links .nav-item.open > .sub { display: flex; }
.nav-links .sub .nav-item { display: flex; align-items: center; }
.nav-links .sub a { display: block; flex: 1; padding: 9px 12px; border-radius: 8px; white-space: nowrap; color: var(--di-ink); font-size: .93rem; }
.nav-links .sub a::after { display: none; }
.nav-links .sub .sub-toggle::before { transform: rotate(-45deg); }
.nav-links .sub .nav-item.open > .sub-toggle::before { transform: rotate(-45deg); }
.nav-links .sub .sub { top: -9px; left: 100%; margin-left: 4px; }
.nav-links .sub .nav-item:hover > a, .nav-links .sub a[aria-current="page"] { background: var(--di-bg-3); }

/* mobile panel */
.mobile-nav .nav-item { display: flex; flex-wrap: wrap; align-items: center; }
.mobile-nav .nav-item > a { flex: 1; }
.mobile-nav .sub-toggle { width: 44px; height: 44px; }
.mobile-nav .sub { display: none; flex-basis: 100%; flex-direction: column; gap: 2px; margin: 0 0 6px 14px; padding-left: 10px; border-left: 2px solid var(--di-border); }
.mobile-nav .nav-item.open > .sub { display: flex; }
.mobile-nav .sub a { font-weight: 500; padding: 10px 12px; }
@media (prefers-reduced-motion: reduce) { .sub-toggle::before { transition: none; } }

/* Primary buttons (incl. nav + footer Donate) turn brand gold on hover; dark teal text keeps contrast. */
.btn--primary:hover,
.nav-links a.btn--primary:hover, .mobile-nav a.btn--primary:hover,
.footer__cta .btn--primary:hover { background: #c9962e; color: #123b3f; }
.btn--primary:hover::after { transform: translateX(-120%); }
.btn--primary { transition: transform .12s ease, box-shadow .12s ease, background .18s ease, color .18s ease; }

/* tap targets */
.footer__links a,.footer__legal a,#diCookieSettings{display:inline-block;padding-block:6px;min-height:24px}
