/* Central Cariboo Islamic Center — additions on top of the recoloured theme */

/* ---- GSAP ScrollSmoother wrapper/content: let the plugin's own inline
   styles (position/transform) drive layout instead of any ancestor
   `overflow: hidden` clipping the translated content — same override the
   original Islamus theme ships. ---- */
#smooth-wrapper,
#smooth-content {
  overflow: visible;
}

/* bootstrap.min.css sets `scroll-behavior: smooth` on :root. ScrollSmoother
   owns scrolling here and calls scrollTo(0, false) on route change (see
   SmoothScroll.tsx) expecting an instant jump — with the CSS behaviour left
   in place the browser animates that call instead, so a page navigation
   lands mid-scroll (wherever the previous page had scrolled to) rather than
   at the top. */
:root {
  scroll-behavior: auto;
}

/* ---- Header logo (BCMA logo sits on a white plate so it reads on dark
   mobile-menu / footer backgrounds) ---- */
.logo-box .logo a,
.sticky-header .logo a,
.mobile-menu .nav-logo a,
.footer-one .logo a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border-radius: 12px;
  padding: 6px 10px;
}
/* theme.css fixes .main-header .logo to a hardcoded 192px width (sized for
   the original template's own wide logo image); the actual BCMA logo is
   square, so it was being squashed to fill that width while separately
   capped to a short max-height, stretching it instead of scaling it. Width
   auto + object-fit: contain lets each logo scale within its box keeping
   its real aspect ratio instead of being forced to fill a mismatched one. */
.logo-box .logo img,
.sticky-header .logo img,
.mobile-menu .nav-logo img,
.footer-one .logo img {
  width: auto;
  object-fit: contain;
}
.logo-box .logo img { max-height: 54px; }
.sticky-header .logo img { max-height: 40px; }
.mobile-menu .nav-logo img { max-height: 44px; }
.footer-one .logo img { max-height: 60px; }

/* ---- Mobile header: below 1023.98px the main nav collapses into the
   hamburger toggler, leaving only the small square logo mark with nothing
   naming the chapter — add the chapter name next to it on that breakpoint
   only (desktop keeps the plain logo since the nav/menu text already
   identifies the site). ---- */
.site-name-mobile {
  display: none;
}
@media (max-width: 1023.98px) {
  /* The desktop nav (.main-menu) is already display:none at this width, but
     its empty .nav-outer wrapper still claims flex space (width: 100% in
     theme.css) and squeezes the logo/hamburger — nothing in it is visible,
     so drop the wrapper too. */
  .header-style-one .header-lower .nav-outer {
    display: none;
  }
  /* nav-outer was the flex item whose width:100% pushed action-box (the
     hamburger) to the right edge; with it gone, logo-box and action-box are
     the only two children left and default to sitting side by side at the
     start, so restore the left/right split directly on main-box. */
  .header-style-one .header-lower .main-box {
    justify-content: space-between;
    width: 100%;
  }
  .header-style-one .header-lower .logo-box {
    align-items: center;
    display: flex;
    flex-shrink: 0;
    gap: 12px;
    min-width: 220px;
  }
  .header-style-one .header-lower .logo-box .logo {
    /* theme.css hardcodes .logo to 192px (sized for the original template's
       wide logotype); our square logo image is scaled down to ~44px tall,
       but the container kept reserving the full 192px, which overflowed
       the header once the chapter name sits beside it. */
    flex-shrink: 0;
    width: auto;
  }
  .site-name-mobile {
    color: var(--theme-color-dark);
    display: inline-block;
    flex-shrink: 0;
    font-family: var(--heading-font-family);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.25;
    width: 150px;
  }
}
/* ---- Sticky (frozen-on-scroll) header: shows the chapter name next to the
   logo at every screen size (unlike .site-name-mobile above, which is
   mobile-only because the main header's desktop nav already names the site).
   .sticky-header's own .inner-container is a two-item flex row (logo,
   nav-outer) with justify-content: space-between — grouping the logo and
   name into one flex item keeps them side by side instead of being spread
   apart as separate flex children. ---- */
.sticky-header .sticky-logo-box {
  align-items: center;
  display: flex;
  gap: 10px;
  min-width: 0;
}
/* theme.css hardcodes .main-header .logo (which the sticky header inherits,
   since it's nested inside the same <header>) to a fixed 192px width sized
   for the original template's wide logotype — on the sticky header's compact
   40px-tall logo this reserved 152px of dead space, which is what pushed the
   chapter name and hamburger toggler past the edge of the header entirely
   on mobile instead of just tightening the gap between them. */
.sticky-header .logo {
  flex-shrink: 0;
  width: auto;
}
.sticky-header .nav-outer {
  flex-shrink: 0;
}
.sticky-header-name {
  color: var(--headings-color);
  font-family: var(--heading-font-family);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.25;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
@media (max-width: 480px) {
  .sticky-header-name {
    font-size: 13px;
  }
}
/* theme.css's own font-family for these links is scoped to
   `.header-style-one .sticky-header .main-menu .navigation > li > a` — but
   the sticky header portals straight to <body> (see the portal comment in
   Header.tsx) to escape ScrollSmoother's transform, so it's no longer a DOM
   descendant of `.header-style-one` and that rule never matches. The links
   fell back to the inherited body font (Manrope, sans-serif) instead of the
   serif heading font (Marcellus/Amiri) every other nav link on the site
   uses, so only the frozen/sticky header's menu text looked different. */
.sticky-header .main-menu .navigation > li > a {
  font-family: var(--heading-font-family);
}

/* ---- Header contact widget: no fabricated phone number, address + email ---- */
.contact-widget a { white-space: nowrap; }

/* ---- Contact info-bar (footer strip email/social/address): a flex item
   with no min-width defaults to min-width:auto, so an unbreakable string
   like an email address (no spaces, and browsers don't wrap at ".") refuses
   to shrink and spills out past the card edge on narrow screens instead of
   wrapping to a second line. ---- */
.contact-block .inner-box > div {
  min-width: 0;
}
.contact-block .inner-box .text {
  overflow-wrap: anywhere;
}

/* ---- Board / team initials avatars (no stock photos standing in for real people) ---- */
.team-block-two .avatar-circle {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, var(--theme-color3), var(--theme-color2));
  color: #fff;
  font-family: var(--heading-font-family);
  font-size: 42px;
  letter-spacing: 1px;
}
/* ---- Board / team real photos: theme.css never gives .inner-box .image a
   fixed size (it expected the missing team-mask-bg.png to define the shape),
   so a portrait-cropped source photo rendered as a tall oval/rectangle next
   to perfectly circular photos from square sources — the "inconsistent card
   size" look. Forcing the same 1:1 frame as the initials avatar above makes
   every member photo, whatever its original aspect ratio, crop into the same
   uniform circle. ---- */
.team-block-two .inner-box .image {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  overflow: hidden;
}
.team-block-two .inner-box .image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ---- Prayer-times honesty card (real iqamah times are posted on social,
   not invented here) ---- */
.prayer-note {
  background: rgba(20, 78, 151, 0.06);
  border: 1px dashed rgba(20, 78, 151, 0.35);
  border-radius: 16px;
  padding: 24px 28px;
  text-align: center;
  max-width: 920px;
  margin: 40px auto 0;
}
.prayer-note .h6 { margin-bottom: 8px; }
.prayer-note a { color: var(--theme-color3); font-weight: 700; text-decoration: underline; }

/* ---- Empty state (events) ---- */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  border: 1px dashed rgba(20, 78, 151, 0.3);
  border-radius: 20px;
  background: rgba(20, 78, 151, 0.04);
}
.empty-state i { font-size: 40px; color: var(--theme-color3); margin-bottom: 18px; display: inline-block; }

/* ---- Events empty-state Instagram/Facebook buttons: .btn-style-three keeps
   its actual icon (.btn-arrow-left) scaled to 0 until :hover, showing a
   generic arrow (.btn-arrow-right) at rest instead — fine for a plain "read
   more" CTA, but here it meant both buttons looked identical (same bare
   arrow circle) at rest, with no way to tell Instagram from Facebook by icon
   at all on touch devices, which never trigger :hover. Applying the theme's
   own hover-state values permanently so the real brand icon always shows. ---- */
.empty-state .btn-style-three .btn-arrow-left {
  scale: 1;
}
.empty-state .btn-style-three .btn-arrow-right {
  display: none;
}
.empty-state .btn-style-three .btn-title {
  transform: translateX(30px);
}

/* ---- Inspiration (Qur'an / Hadith) quote slider — replaces stock testimonials ---- */
.testimonial-block-two .quote-source {
  display: block;
  margin-top: 14px;
  font-weight: 700;
  color: var(--theme-color3);
  font-size: 14px;
  letter-spacing: .3px;
}
.testimonial-block-two blockquote { margin: 0; }

/* ---- Gallery lightbox ---- */
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 767px) { .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; } }
.gallery-grid figure {
  margin: 0;
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  position: relative;
  aspect-ratio: 4 / 3;
}
.gallery-grid figure img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; display: block; }
.gallery-grid figure:hover img { transform: scale(1.08); }
.gallery-grid figure::after {
  content: "\f00e";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 22px;
  background: rgba(10, 47, 92, 0);
  opacity: 0;
  transition: all .35s ease;
}
.gallery-grid figure:hover::after { background: rgba(10, 47, 92, 0.45); opacity: 1; }

.lightbox-overlay {
  position: fixed; inset: 0; background: rgba(6, 20, 38, 0.92);
  display: flex; align-items: center; justify-content: center;
  z-index: 999999; opacity: 0; visibility: hidden; transition: opacity .3s ease;
  padding: 30px;
}
.lightbox-overlay.open { opacity: 1; visibility: visible; }
.lightbox-overlay img,
.lightbox-overlay video { max-width: 90vw; max-height: 85vh; border-radius: 10px; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.video-figure video { width: 100%; height: 100%; object-fit: cover; display: block; }
.video-play-badge {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 20px; background: rgba(10, 47, 92, 0.25); pointer-events: none;
}
.lightbox-close {
  position: absolute; top: 24px; right: 28px; color: #fff; font-size: 28px;
  cursor: pointer; width: 46px; height: 46px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,.12);
}
.lightbox-close:hover { background: var(--theme-color1); color: #14213A; }

/* ---- Donate page fundraiser progress bar wrapper. The bar/figures
   themselves are the shared DonationGoalBar component (.goal-progress*
   rules, further down this file) so the donate page, homepage and header
   all animate and format the goal identically. ---- */
.donation-bar { margin: 30px 0 40px; }

/* ---- Ways to give cards (replaces fake fundraiser progress bars) ---- */
.give-block .content-box .tag { display: inline-flex; align-items: center; gap: 8px; }
.give-block .content-box .tag i { color: var(--theme-color1); }

/* ---- Give-block cards: theme.css's hover crossfade expects two stacked
   images (a visible one plus a blurred :first-child overlay revealed on
   hover) — every card here only ever renders one, which still matches
   :first-child, so it inherits opacity: 0 / absolute positioning and stays
   permanently invisible. With the image gone, its .image box collapses to
   0 height, which is why the Cash/Cheque card (no logo, so nothing masked
   the bug) rendered far shorter than the PayPal/Interac cards next to it.
   Restoring normal flow fixes both the visibility and the card-height
   mismatch in one pass. ---- */
.give-block .image-box .image img {
  filter: none !important;
  opacity: 1 !important;
  position: static !important;
  transform: none !important;
  width: 100%;
}

/* ---- Give-block equal-height cards: Bootstrap's row stretches the
   columns themselves to match the tallest one, but a plain block div
   doesn't inherit that as its own height without being told to — and text
   length varies (PayPal's card carries an extra sentence + button that the
   Cash/Cheque card doesn't), so the cards still ended up different heights.
   Filling the stretched column and pinning each card's CTA to the bottom
   keeps all three level regardless of copy length.
   theme.css's own card-to-card spacing is a margin-bottom on .inner-block —
   but once .inner-block is told height:100% of the stretched column, that
   margin is measured outside a box that's already sized to fill the column
   exactly, so it has nowhere to go: on desktop the row's tallest card still
   reserves room for it, but every stacked-single-column mobile card has
   nothing beside it forcing that reservation, so the margin collapses away
   and the cards touch. Moving the gap onto .give-block's own padding-bottom
   (part of its fixed, stretched height) instead of a margin outside it
   keeps the same visual spacing without it ever being absorbed. ---- */
.give-block {
  height: 100%;
  padding-bottom: 30px;
}
.give-block .inner-block {
  display: flex;
  flex-direction: column;
  height: 100%;
  margin-bottom: 0;
}
.give-block .image-box {
  height: 235px;
}
.give-block .image-box .image {
  height: 100%;
}
.give-block .image-box .image img {
  height: 100%;
  object-fit: cover;
}
.give-block .content-box {
  display: flex;
  flex: 1;
  flex-direction: column;
}
.give-block .content-box .btn-style-six,
.give-block .content-box .copy-chip {
  align-self: flex-start;
  margin-top: auto;
}

/* PayPal / Interac payment-method logos read as a small badge, not a
   full-bleed photo — sat on a white tile, centered and contained, within
   the same fixed-height image area the photo card above now also uses. */
.give-block .image-box .image.logo-badge {
  align-items: center;
  background: var(--theme-color-white);
  display: flex;
  justify-content: center;
  padding: 40px;
}
.give-block .image-box .image.logo-badge img {
  height: auto;
  max-height: 64px;
  max-width: 200px;
  object-fit: contain;
  width: auto;
}
/* A framed inset (rather than the image filling the whole card top) makes
   clear the image is one bordered element sitting inside the card, not the
   card's background. Applies to any card image, logo badge or photo alike,
   so all three donation methods read as the same kind of card. */
.give-block .image-box.logo-frame {
  padding: 20px;
}
.give-block .image-box.logo-frame .image {
  border: 1px solid rgba(20, 78, 151, 0.18);
  border-radius: 16px;
  height: 100%;
  overflow: hidden;
  width: 100%;
}
.give-note {
  font-size: 13px;
  color: var(--text-color);
  margin-top: 10px;
}

/* ---- Small helper: copy-to-clipboard chip for e-transfer email ---- */
.copy-chip {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid rgba(20,78,151,.25); border-radius: 999px;
  padding: 8px 16px; cursor: pointer; background: #fff; font-weight: 700; color: var(--theme-color3);
  transition: all .25s ease;
}
.copy-chip:hover { background: var(--theme-color3); color: #fff; }
.copy-chip.copied { background: var(--theme-color1); color: #14213A; border-color: var(--theme-color1); }

/* ---- The about-section's decorative ::before oval is a 1905x1327px ellipse
   that pokes 496px above the section's own box — fine on the home page
   where it peeks over the bottom of the tall hero, but the About page reuses
   the exact same about-section directly after the much shorter .page-banner,
   so that fixed -496px overlap swallowed the banner's whole "About Us"
   heading and breadcrumb under a solid white dome. Shrinking the overlap
   only in that context. ---- */
.page-banner + .about-section:before {
  top: -40px !important;
}

/* ---- Page (inner) banner ---- */
.page-banner {
  position: relative;
  padding: 190px 0 100px;
  text-align: center;
  background: linear-gradient(180deg, rgba(10,47,92,.88), rgba(10,47,92,.72)), url(../images/banner-bg.jpg) center/cover;
  color: #fff;
}
.page-banner .h1, .page-banner h1 { color: #fff; margin-bottom: 14px; }
.page-banner .breadcrumb-nav { color: rgba(255,255,255,.8); font-weight: 600; }
.page-banner .breadcrumb-nav a { color: #fff; }
.page-banner .breadcrumb-nav i { margin: 0 8px; font-size: 11px; }

/* ---- FAQ note credit ---- */
.section-eyebrow { color: var(--theme-color3); font-weight: 700; letter-spacing: .5px; }

/* ---- Donation CTA rounded card: .donation-section's markup was missing
   the .outer-container wrapper theme.css actually styles (max-width, gray
   background, 30px rounded corners — the same "card" treatment the hero
   banner's .outer-box gets), so the whole section rendered edge-to-edge
   instead of as a contained card, and its .sec-bg/.sec-shape decorations
   (styled only when nested inside that wrapper) fell back to being huge
   unstyled inline blocks. Now that the wrapper is in the markup, theme.css
   positions .sec-bg/.sec-shape itself — only their images still need sizing,
   since theme.css never styled the <img> tags inside those wrappers. ---- */
.donation-section .outer-container .sec-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* Stretching this to the container's full width (matching .sec-bg's own
   full-cover sizing) blew the skyline silhouette up to span the entire
   section — it's a small corner accent in the original design, sized off
   its own 382px-native width instead of the section's. */
.donation-section .outer-container .sec-shape img {
  display: block;
  width: 440px;
}

/* ---- Hero banner body copy: theme.css whitens the sub-title and heading
   over the dark hero image but leaves the paragraph on the default dark
   .text color, making it unreadable against the photo. ---- */
.banner-section .outer-box .banner-content .text {
  color: var(--theme-color-white);
}

/* ---- Hero banner top gap: theme.css's 100px margin-top assumes the
   original template's transparent header sits absolutely positioned over
   the hero image. This header is static (position: relative, ~109px tall)
   and sits above it in normal flow, so that 100px became a second, pure
   white gap stacked underneath the header instead of clearance for it. ---- */
.banner-section {
  margin-top: 24px;
}

/* ---- Hero banner mouse-ripple effect (jQuery Ripples plugin) ---- */
.banner-section .outer-box .sec-bg.banner-ripple {
  background-image: url(../images/banner-bg-new.jpg);
  background-size: cover;
  background-position: center;
}
/* Swap to the portrait-cropped shot below the tablet breakpoint so the
   mosque and minaret stay framed instead of being cover-cropped from the
   wide desktop photo. */
@media (max-width: 767.98px) {
  .banner-section .outer-box .sec-bg.banner-ripple {
    background-image: url(../images/banner-bg-new-mobile.jpg);
  }
}
.banner-section .outer-box .sec-bg.banner-ripple canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* ---- Scroll-to-top button: theme.css centers the icon vertically via
   line-height but never horizontally (no flex/text-align), so the caret
   sits pinned to the left edge of the circle instead of in the middle.
   Redone as a flex-centered navy circle with a gold hover state matching
   the site's brand palette, plus a lift/scale on hover instead of the
   flat color swap. ---- */
.back-to-top {
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  line-height: normal;
  background-color: var(--theme-color3);
  color: var(--theme-color-white);
  font-size: 16px;
  box-shadow: 0 6px 18px rgba(10, 47, 92, 0.35);
}
.back-to-top:hover {
  background-color: var(--theme-color1);
  color: var(--headings-color);
  transform: translateY(-4px);
  box-shadow: 0 10px 22px rgba(10, 47, 92, 0.4);
}
.back-to-top.show:hover {
  transform: translateY(-4px);
}

/* ---- Utility ---- */
.text-navy { color: var(--theme-color3) !important; }
.bg-soft { background: rgba(20,78,151,.05); }

/* ---- Critical fix: WOW.js's own visibility:hidden pre-animation state (set by
   animate.css's .wow{visibility:hidden}) can get permanently stuck hidden if its
   scroll-position polling misses a fast/programmatic scroll — leaving whole
   sections invisible. Replaced with a simpler, reliable opacity/transform
   transition driven by IntersectionObserver in custom.js (see initReveal). */
.wow {
  visibility: visible !important;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .6s ease, transform .6s ease;
}
.wow.wow-in {
  opacity: 1;
  transform: translateY(0);
}

/* ---- Photo frames: several containers relied SOLELY on the missing CSS
   mask-image blobs (see the mask-image fix below) for their rounded/organic
   shape, with no border-radius fallback at all — so once masking was
   disabled they rendered as bare hard-edged rectangles. Restoring a clean
   rounded-rect "frame" so every photo across the site sits inside a shape,
   not a raw edge-to-edge image. Only applies to spots with no matching
   halo/shape asset to build a real mask from (see restore block below). ---- */
.donation-section .image-column .inner-column .image {
  border-radius: 30px;
  overflow: hidden;
  box-shadow: 0 20px 45px rgba(10, 47, 92, 0.18);
}
/* service-item-mask.png is another mask asset recovered from the theme
   vendor's own demo (like time-item-mask.png above) — gives the Programs &
   Services cards their real arched "mihrab" silhouette instead of the plain
   rounded-rectangle fallback. Wins over the "* { mask-image: none }" reset
   purely on selector specificity, same trick as the other restores below. */
.service-block .inner-box {
  mask-image: url(../images/mask/service-item-mask.png) !important;
  -webkit-mask-image: url(../images/mask/service-item-mask.png) !important;
  mask-repeat: no-repeat !important;
  -webkit-mask-repeat: no-repeat !important;
  mask-size: cover !important;
  -webkit-mask-size: cover !important;
  mask-position: top !important;
  -webkit-mask-position: top !important;
}

/* ---- Programs & Services cards: theme.css only reveals the mosque-skyline
   pattern (.item-shape) at the bottom of each card on :hover. Show it all
   the time instead of just on hover. ---- */
.service-block .inner-box .item-shape {
  opacity: 1 !important;
  visibility: visible !important;
}

/* ---- Scroll-reveal (ScrollReveal.tsx): the vendor demo slides each service
   card in from the right with a slight rotation via a GSAP ScrollTrigger
   pin, which needs a real scroll library to reproduce faithfully. This is a
   lighter approximation with the same slide+rotate feel, driven by a plain
   IntersectionObserver so it plays once as each card enters the viewport. */
.scroll-reveal {
  opacity: 0;
  transform: translateX(60px) rotate(-6deg);
  transition: opacity 700ms ease, transform 700ms ease;
}
.scroll-reveal.is-revealed {
  opacity: 1;
  transform: translateX(0) rotate(0deg);
}
@media (prefers-reduced-motion: reduce) {
  .scroll-reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ---- Critical fix: theme.css references ~25 decorative CSS mask-image blobs
   (images/mask/*.png, images/resource/*.png, images/bg/*.png) that were never
   part of the saved template download. An element masked by a missing image
   renders fully invisible (about images, service/time/team cards, donation
   images, etc.) — so mask-image is disabled globally here. Spots where we've
   since recovered the real mask asset from the vendor's own demo (service,
   time cards, donation image) re-enable it below with a more specific
   selector; everything else falls back to plain border-radius cards. */
* {
  mask-image: none !important;
  -webkit-mask-image: none !important;
}

/* ---- Restore the real organic photo frames the theme intended, for the
   handful of spots where we still have the matching silhouette: each of
   these "-bg"/"-shape" PNGs is the exact halo drawn behind the photo, so
   reusing it as the photo's own clip-mask makes the picture fill that same
   lantern/dome outline instead of sitting on top of it as a bare rectangle
   (this was the "pictures overlaying the frame" look in the hero and about
   sections). Must win over the "* { mask-image: none }" reset above purely
   on selector specificity, since both sides carry !important. ---- */
.banner-section .outer-box .banner-image .image,
.about-section .image-column .inner-column .image-box .image,
.about-section .image-column .inner-column .image-box-two .image,
.service-block .inner-box .image-box .image,
.donation-section .donation-image {
  border-radius: 0 !important;
  box-shadow: none !important;
  overflow: visible !important;
  /* The halo PNGs are a colour gradient, not flat white — without forcing
     alpha mode the browser masks by luminance, fading the photo out toward
     the darker end of the gradient instead of giving a clean, fully-opaque
     cutout. */
  mask-mode: alpha !important;
  -webkit-mask-mode: alpha !important;
  mask-type: alpha !important;
}
.banner-section .outer-box .banner-image .image {
  /* banner-image-bg.png (used as the halo behind the photo) bakes a soft
     vertical alpha gradient into the glow, so using it directly as a mask
     fades the photo out near the top; banner-image-mask.png is a hard-alpha
     binarised version of the same silhouette generated from it. */
  mask-image: url(../images/banner-image-mask.png) !important;
  -webkit-mask-image: url(../images/banner-image-mask.png) !important;
  mask-repeat: no-repeat !important;
  -webkit-mask-repeat: no-repeat !important;
  mask-size: contain !important;
  -webkit-mask-size: contain !important;
  mask-position: top center !important;
  -webkit-mask-position: top center !important;
}
.about-section .image-column .inner-column .image-box .image {
  mask-image: url(../images/about-image1-shape.png) !important;
  -webkit-mask-image: url(../images/about-image1-shape.png) !important;
  mask-repeat: no-repeat !important;
  -webkit-mask-repeat: no-repeat !important;
  mask-size: contain !important;
  -webkit-mask-size: contain !important;
  mask-position: center !important;
  -webkit-mask-position: center !important;
}
.about-section .image-column .inner-column .image-box-two .image {
  mask-image: url(../images/about-image2-shape.png) !important;
  -webkit-mask-image: url(../images/about-image2-shape.png) !important;
  mask-repeat: no-repeat !important;
  -webkit-mask-repeat: no-repeat !important;
  mask-size: contain !important;
  -webkit-mask-size: contain !important;
  mask-position: center !important;
  -webkit-mask-position: center !important;
}
/* The homepage "Support CTA" banner's donation-image-mask.png (theme.css
   line ~7619) was never part of the template download either, same as the
   about-image shapes above — donation-image-mask.png is about-image1-shape.png
   rotated 90°, since this theme reuses one lantern silhouette (portrait for
   the about page, landscape here) across sections. The container is sized to
   the mask's own near-square aspect ratio so mask-size: contain shows the
   full lantern outline instead of a sliver of it inside a much wider box. */
.donation-section .donation-image {
  aspect-ratio: 584 / 591;
  margin: 0 auto;
  max-width: 480px;
  position: relative;
  mask-image: url(../images/mask/donation-image-mask.png) !important;
  -webkit-mask-image: url(../images/mask/donation-image-mask.png) !important;
  mask-repeat: no-repeat !important;
  -webkit-mask-repeat: no-repeat !important;
  mask-size: contain !important;
  -webkit-mask-size: contain !important;
  mask-position: center !important;
  -webkit-mask-position: center !important;
}
.donation-section .donation-image img {
  display: block;
  height: 100%;
  object-fit: cover;
  width: 100%;
}
.service-block .inner-box .image-box .image {
  mask-image: url(../images/mask/service-item-image-mask.png) !important;
  -webkit-mask-image: url(../images/mask/service-item-image-mask.png) !important;
  mask-repeat: no-repeat !important;
  -webkit-mask-repeat: no-repeat !important;
  mask-size: contain !important;
  -webkit-mask-size: contain !important;
  mask-position: center !important;
  -webkit-mask-position: center !important;
}
/* ---- Footer newsletter subscribe form (mirrors the "Subscribe to get
   exclusive updates" widget on theccic.ca's footer/contact page).
   One unified pill (input + inset CTA) instead of two separate pills —
   matches the .footer-two .footer-newslatter-widget .email-row / gold
   .btn-submit pattern this theme already ships elsewhere — so the row
   never has to flex-wrap onto its own awkward second line. ---- */
.footer-subscribe {
  max-width: 440px;
  margin: 30px auto 0;
}
.footer-subscribe-title {
  color: var(--theme-color-white);
  font-weight: 600;
  margin-bottom: 14px;
}
.footer-subscribe-row {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(var(--theme-color-white-rgb), 0.15);
  border-radius: 999px;
  padding: 6px 6px 6px 22px;
  transition: box-shadow 0.2s ease;
}
.footer-subscribe-row:focus-within {
  box-shadow: 0 0 0 2px rgba(var(--theme-color-white-rgb), 0.5);
}
.footer-subscribe-row input[type="email"] {
  flex: 1 1 auto;
  min-width: 0;
  height: 44px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--theme-color-white);
  font-weight: 500;
}
.footer-subscribe-row input[type="email"]:focus {
  outline: none;
}
.footer-subscribe-row input[type="email"]::placeholder {
  color: rgba(var(--theme-color-white-rgb), 0.75);
}
.footer-subscribe-row button {
  flex: 0 0 auto;
  height: 44px;
  padding: 0 22px;
  border: none;
  border-radius: 999px;
  background: var(--theme-color1);
  color: var(--theme-color-dark);
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.3s ease;
}
.footer-subscribe-row button:hover:not(:disabled) {
  background: var(--theme-color-white);
}
.footer-subscribe-row button:disabled {
  opacity: 0.7;
  cursor: default;
}
@media (max-width: 480px) {
  .footer-subscribe-row {
    flex-wrap: wrap;
    border-radius: 24px;
    padding: 14px;
  }
  .footer-subscribe-row input[type="email"] {
    flex-basis: 100%;
  }
  .footer-subscribe-row button {
    flex-basis: 100%;
  }
}
/* Checkbox + fine-print: the label's text/link/text used to be three
   separate flex children (checkbox, text, <Link>, text), so a wrap
   fragmented the sentence instead of flowing it — wrapping all the
   copy in one <span> (see SubscribeForm.tsx) makes it a single flex
   item that wraps like a normal paragraph next to the checkbox. */
.footer-subscribe-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 14px;
  color: rgba(var(--theme-color-white-rgb), 0.85);
  font-size: 13px;
  line-height: 1.5;
  text-align: left;
  cursor: pointer;
}
.footer-subscribe-checkbox input[type="checkbox"] {
  flex-shrink: 0;
  width: 15px;
  height: 15px;
  margin-top: 3px;
  accent-color: var(--theme-color1);
}
.footer-subscribe-checkbox a {
  color: var(--theme-color-white);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.footer-subscribe-thanks {
  background: rgba(var(--theme-color-white-rgb), 0.15);
  border-radius: 999px;
  padding: 14px 22px;
  color: var(--theme-color-white);
  font-weight: 600;
}
.footer-subscribe-error {
  color: #ffd7d7;
  font-size: 13px;
  margin-top: 10px;
}

/* ---- About page: land acknowledgement. The preceding .about-section's
   ::before is a big decorative oval taller than the section itself (see the
   "page-banner + about-section:before" fix above) — since it's absolutely
   positioned with no z-index, it paints in the browser's default "positioned
   elements" layer, which sits above plain in-flow content regardless of DOM
   order, so its overflow was covering this section's card instead of sitting
   behind it. Lifting the card into its own stacked layer (same trick used by
   .about-section .image-column .inner-column) puts it back on top. ---- */
.land-ack-box {
  position: relative;
  z-index: 1;
  border-radius: 30px;
  padding: 50px;
}
@media (max-width: 767.98px) {
  .land-ack-box { padding: 30px 24px; }
}
.land-ack-image {
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 20px 45px rgba(10, 47, 92, 0.18);
}
.land-ack-image img {
  width: 100%;
  display: block;
}

/* time-item-mask.png is the one mask asset we actually recovered (downloaded
   from the theme vendor's own demo), so give the Salah cards their real
   hexagonal "ticket" shape back instead of the border-radius fallback.
   100% 100% (stretch, not cover/contain) because the card's rendered height
   doesn't exactly match the mask's native 312x114 — cover would crop the
   pointed tips, contain would letterbox; stretching the mask to the box is
   imperceptible on a shape this simple and keeps the tips flush with the
   card edges. */
.time-block {
  mask-image: url(../images/mask/time-item-mask.png) !important;
  -webkit-mask-image: url(../images/mask/time-item-mask.png) !important;
  mask-repeat: no-repeat !important;
  -webkit-mask-repeat: no-repeat !important;
  mask-size: 100% 100% !important;
  -webkit-mask-size: 100% 100% !important;
  mask-position: center !important;
  -webkit-mask-position: center !important;
}
/* Every .time-block rule in theme.css (background, icon colour, hover swap,
   heading colours) is built entirely off --theme-color1/2/3, so redefining
   those three custom properties scoped to the card is enough to reproduce
   the original demo's green palette here without touching the site's navy
   /gold brand colours used everywhere else (buttons, nav, etc). Values are
   the exact green trio from the template vendor's own demo. */
.time-block {
  --theme-color1: #C7DC49;
  --theme-color2: #0C2F25;
  --theme-color3: #10551F;
}

/* .about-section:before is the big circular gradient shape behind the
   "Serving the Williams Lake Muslim Community" heading — nudge it down 2cm
   (~76px) from theme.css's defaults at each breakpoint that sets `top`. */
.about-section:before {
  top: -420px;
}
@media (max-width: 1399.98px) {
  .about-section:before {
    top: -341px;
  }
}

/* time-bg.png (the dome/arch mihrab shape behind the Salah cards) sits too
   low by default via theme.css's `bottom: -25px` — nudge it up ~4-5cm
   (~170px), back down 2cm (~76px), then up another 1cm (~38px), while
   keeping the existing horizontal centering transform. */
.time-section .sec-bg {
  bottom: 107px;
}

/* time-section (Daily Prayers) had a lot of empty space above and below the
   cards from theme.css's padding-top: 150px / padding-bottom: 100px (and
   padding-top: 120px on the <1499.98px variant) — tighten both. */
.time-section {
  padding-top: 80px;
  padding-bottom: 50px;
}
@media (max-width: 1499.98px) {
  .time-section {
    padding-top: 70px;
  }
}

/* ---- Contact info bar (homepage + contact page): the email/address text
   overflows its box because a flex item's default min-width is its content's
   unwrapped width, not 0 — the long support email then pushes past the
   column edge instead of wrapping. theme.css also only styles the envelope/
   pin `i` (FontAwesome) icons with the circular grey badge; the Instagram
   SVG icon component has no matching selector, so it rendered as a small
   bare glyph instead of a badge matching the other two. ---- */
.contact-block .inner-box > div:not(:first-child) {
  min-width: 0;
}
.contact-block .inner-box .text {
  overflow-wrap: break-word;
}
.contact-block .inner-box svg {
  background: var(--theme-color-gray);
  border-radius: 50%;
  box-sizing: border-box;
  color: var(--theme-color3);
  flex-shrink: 0;
  height: 60px;
  min-width: 60px;
  padding: 20px;
  width: 60px;
}
.contact-block .inner-box a {
  color: inherit;
  text-decoration: none;
}
.contact-block .inner-box a:hover {
  text-decoration: underline;
}
/* theme.css draws the vertical divider between blocks as :after positioned
   70px (20px below 1199.98px) in from .inner-box's right edge — tuned for
   the original template's much shorter placeholder text. The real support
   email needs the box's near-full width to fit on one line, so pull the
   divider in near the edge instead (it then sits in the row's own gutter
   space rather than over the column's content) and keep a small buffer on
   the text so the two never touch. */
.contact-block .inner-box:not(.after-none) {
  padding-right: 14px;
}
.contact-block .inner-box:not(.after-none):after {
  right: 4px;
}
@media (max-width: 767.98px) {
  .contact-block .inner-box:not(.after-none) {
    padding-right: 0;
  }
}
/* Long as it is, the support email reads better as one line than wrapped
   mid-address — .text-nowrap (Bootstrap utility) keeps it intact; the
   padding/divider changes above make room for it at every breakpoint. */
.contact-block .inner-box .text.text-nowrap {
  overflow-wrap: normal;
}
/* ---- Social block: shows both platforms it links to (Instagram + Facebook)
   instead of a single Instagram badge standing in for both, so each icon
   pairs with its own line of text below. Sized down from the standard 60px
   single-icon badge (svg rule above) so two side-by-side badges plus the
   divider clearance above still fit the column without crowding. ---- */
.contact-block .contact-icons {
  display: flex;
  flex-shrink: 0;
  gap: 8px;
}
.contact-block .contact-icons svg {
  height: 44px;
  min-width: 44px;
  padding: 12px;
  width: 44px;
}

/* ---- Shared fundraising-goal bar (DonationGoalBar.tsx): the animated
   track/fill/thumb + raised/goal figures + "last updated" caption used by
   the donate page, the homepage hero card and bottom CTA, the header's
   sitewide strip, and the donation popup modal — one visual so the goal
   reads the same wherever the board wants it highlighted. The component
   counts the fill/figures up from 0 on every mount (see the .tsx), so no
   width/opacity transition is set here — animating both the inline width
   every frame *and* via a CSS transition at once would fight each other. */
.goal-progress { width: 100%; }
.goal-progress-track {
  background: rgba(20, 78, 151, 0.12);
  border-radius: 50px;
  height: 10px;
  position: relative;
  width: 100%;
}
.goal-progress-sm .goal-progress-track { height: 6px; }
.goal-progress-fill {
  background: var(--theme-color1);
  border-radius: 50px;
  height: 100%;
  position: relative;
}
.goal-progress-thumb {
  background: var(--theme-color-white);
  border: 2px solid var(--theme-color1);
  border-radius: 50%;
  box-sizing: border-box;
  height: 14px;
  position: absolute;
  right: -7px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
}
.goal-progress-sm .goal-progress-thumb { height: 10px; right: -5px; width: 10px; }
.goal-progress-tip {
  background: var(--theme-color1);
  border-radius: 20px;
  bottom: 100%;
  color: var(--theme-color2);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1;
  margin-bottom: 8px;
  padding: 4px 9px;
  pointer-events: none;
  position: absolute;
  right: 0;
  transform: translateX(50%);
  white-space: nowrap;
}
.goal-progress-sm .goal-progress-tip { font-size: 10px; margin-bottom: 6px; padding: 2px 7px; }
.goal-progress-stats {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  justify-content: space-between;
  margin-top: 14px;
}
.goal-progress-raised { color: var(--text-color); }
.goal-progress-raised strong { color: var(--theme-color3); font-weight: 700; }
.goal-progress-pct { color: var(--text-color); font-weight: 600; }
.goal-progress-updated {
  color: var(--text-color);
  font-size: 13px;
  margin-top: 8px;
  opacity: .8;
}
.goal-progress-updated i { margin-right: 6px; }

/* ---- Sitewide goal strip (Header.tsx): board members wanted the fund goal
   to be a persistent, highly visible presence across the whole site rather
   than something visitors only see if they land on the Donate page — this
   sits above .header-lower on every page. It scrolls away once .sticky-header
   takes over (kept deliberately compact — logo/nav only) so it doesn't eat
   into reading space while scrolling. ---- */
.goal-highlight-bar { background: var(--theme-color2); }
.goal-highlight-inner {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  padding: 10px 0;
}
.goal-highlight-label {
  align-items: center;
  color: var(--theme-color-white);
  display: flex;
  flex-shrink: 0;
  font-weight: 700;
  gap: 8px;
  letter-spacing: -0.01em;
}
.goal-highlight-label i { color: var(--theme-color1); }
.goal-highlight-inner .goal-progress { flex: 1 1 200px; min-width: 140px; }
.goal-highlight-inner .goal-progress-track { background: rgba(255, 255, 255, 0.25); }
.goal-highlight-cta {
  background-color: var(--theme-color1);
  border-radius: 40px;
  color: var(--theme-color2);
  flex-shrink: 0;
  font-size: 14px;
  font-weight: 600;
  padding: 8px 20px;
  transition: opacity 300ms ease;
  white-space: nowrap;
}
.goal-highlight-cta:hover { color: var(--theme-color2); opacity: 0.85; }
/* Cramped rather than useful at phone widths (icon, label, bar and button
   all fighting for the same row) — hidden below the tablet breakpoint the
   rest of the header's mobile treatment already uses; the goal is still
   visible via the hero section, the donate page and the popup modal. */
@media (max-width: 767.98px) {
  .goal-highlight-bar { display: none; }
}

/* ---- Hero Building Fund line (homepage banner): plain text + the shared
   bar, styled like the rest of .banner-content (reuses its existing .text
   color rule) rather than a boxed-on widget, so it reads as part of the hero
   copy instead of a separate card. ---- */
.banner-goal-bar { max-width: 420px; }
/* theme.css hardcodes `b, strong { color: #333 }` globally — a direct match
   on the element itself, so it wins over the inherited white .text color
   from the hero paragraph instead of the other way around. Without this,
   "Sadaqah Jariyah" renders dark-on-dark against the hero photo. */
.banner-goal-bar strong { color: inherit; }
.banner-goal-bar .goal-progress-track { background: rgba(255, 255, 255, 0.25); }
.banner-goal-bar .goal-progress-raised,
.banner-goal-bar .goal-progress-pct,
.banner-goal-bar .goal-progress-updated {
  color: var(--theme-color-white);
}
.banner-goal-bar .goal-progress-raised strong { color: var(--theme-color1); }
.banner-goal-bar .goal-progress-updated { opacity: .85; }

/* ---- Delayed donation ask (DonationModal.tsx): opens once per browser tab
   session a couple of seconds after landing on any page except /donate/
   itself. Mirrors .lightbox-overlay's fixed + opacity/visibility toggle (kept
   permanently mounted so the transition has something to animate) for the
   same reason documented there — position: fixed only pins to the true
   viewport when nothing between it and <body> carries a transform, and GSAP
   ScrollSmoother puts one on #smooth-content. ---- */
.donation-modal-overlay {
  align-items: center;
  background: rgba(6, 20, 38, 0.75);
  display: flex;
  inset: 0;
  justify-content: center;
  opacity: 0;
  padding: 20px;
  position: fixed;
  transition: opacity .3s ease;
  visibility: hidden;
  z-index: 999999;
}
.donation-modal-overlay.open { opacity: 1; visibility: visible; }
.donation-modal {
  background: var(--theme-color-white);
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .35);
  max-width: 460px;
  padding: 40px 34px 34px;
  position: relative;
  text-align: center;
  transform: translateY(16px) scale(.97);
  transition: transform .3s ease;
  width: 100%;
}
.donation-modal-overlay.open .donation-modal { transform: translateY(0) scale(1); }
@media (prefers-reduced-motion: reduce) {
  .donation-modal-overlay,
  .donation-modal { transition: none; }
}
.donation-modal-close {
  align-items: center;
  background: rgba(20, 78, 151, 0.08);
  border: 0;
  border-radius: 50%;
  color: var(--theme-color2);
  cursor: pointer;
  display: flex;
  height: 34px;
  justify-content: center;
  position: absolute;
  right: 16px;
  top: 16px;
  transition: background 300ms ease;
  width: 34px;
}
.donation-modal-close:hover { background: rgba(20, 78, 151, 0.16); }
/* Reuses the site's own .sec-title/.sub-title.section-eyebrow pattern (see
   the Donate page's "Assalamu Alaikum" / "Building Fund" eyebrows) instead of
   a one-off icon badge, just tightened up for the modal's small footprint. */
.donation-modal .sec-title { margin-bottom: 16px; }
.donation-modal-title {
  color: var(--theme-color2);
  font-size: 22px;
  margin: 0;
}
.donation-modal-text {
  color: var(--text-color);
  margin-bottom: 22px;
}
.donation-modal .goal-progress { margin-bottom: 24px; text-align: left; }
.donation-modal-actions {
  align-items: center;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.donation-modal-actions .theme-btn { justify-content: center; width: 100%; }
.donation-modal-dismiss {
  background: none;
  border: 0;
  color: var(--text-color);
  cursor: pointer;
  font-size: 14px;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.donation-modal-dismiss:hover { color: var(--theme-color2); }

/* ---- Event RSVP pipeline (EventRsvpForm.tsx + events/[slug] detail page):
   theme.css has no built-in registration-form styling to build on, so this
   borrows the site's existing white-card treatment (donation-modal above)
   rather than inventing a new visual language. ---- */
.event-rsvp-box {
  background: var(--theme-color-white);
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, .08);
  padding: 36px 30px;
}
.event-rsvp-box .title { margin: 0; }
.rsvp-limit-note {
  color: var(--text-color);
  font-size: 14px;
  font-weight: 400;
}
.rsvp-field-label {
  color: var(--theme-color2);
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
}
.rsvp-guest-names {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 12px;
}
.rsvp-checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.rsvp-checkbox-option {
  align-items: center;
  display: flex;
  gap: 10px;
}
.rsvp-checkbox-option input { flex: none; }
.rsvp-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}
.rsvp-decline-btn {
  background: none;
  border: 0;
  color: var(--text-color);
  cursor: pointer;
  font-size: 14px;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.rsvp-decline-btn:hover { color: var(--theme-color2); }
.rsvp-error-text {
  color: #c0392b;
  font-size: 14px;
}
/* ---- RSVP confirmation state: reuses the .event-rsvp-box shell so the
   card's height doesn't jump between the form and the "thank you" message. ---- */
.event-rsvp-box.rsvp-confirmed { text-align: center; }
.event-rsvp-box.rsvp-confirmed i {
  color: var(--theme-color3);
  font-size: 40px;
  margin-bottom: 14px;
}

/* ---- Event detail page (events/[slug]/page.tsx) ---- */
.event-detail-image {
  aspect-ratio: 16 / 10;
  border-radius: 16px;
  overflow: hidden;
  position: relative;
}
.event-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.event-detail-meta li {
  align-items: center;
  color: var(--theme-color2);
  display: flex;
  font-weight: 600;
  gap: 8px;
}
.rsvp-back-link {
  align-items: center;
  color: var(--text-color);
  display: inline-flex;
  gap: 8px;
  margin-top: 20px;
}
.rsvp-back-link:hover { color: var(--theme-color2); }

/* ---- Events list cards (events/page.tsx): small RSVP/tickets CTA under an
   upcoming event's excerpt, previewing the detail page's registration state
   (RSVP / waitlist / tickets / closed) before a visitor clicks through. ---- */
.event-card-cta {
  align-items: center;
  color: var(--theme-color2);
  display: inline-flex;
  font-weight: 600;
  gap: 8px;
  margin-top: 6px;
}
.event-card-cta:hover { text-decoration: underline; }
