/* Body font: the theme sets body { font-family: 'Gilroy' } (q.css) but WordPress never defined it, so visitors got
   Arial. Map 'Gilroy' to the theme's own Gilroy files so body text matches the headings, as designed. */
@font-face { font-family: 'Gilroy'; font-weight: 300; font-display: swap; src: url('/fonts/Gilroy-Light.woff') format('woff'); }
@font-face { font-family: 'Gilroy'; font-weight: 400; font-display: swap; src: url('/fonts/Gilroy-Regular.woff') format('woff'); }
@font-face { font-family: 'Gilroy'; font-weight: 500; font-display: swap; src: url('/fonts/Gilroy-Medium.woff') format('woff'); }
@font-face { font-family: 'Gilroy'; font-weight: 600; font-display: swap; src: url('/fonts/Gilroy-SemiBold.woff2') format('woff2'), url('/fonts/Gilroy-SemiBold.woff') format('woff'); }
@font-face { font-family: 'Gilroy'; font-weight: 700; font-display: swap; src: url('/fonts/Gilroy-Bold.woff') format('woff'); }
@font-face { font-family: 'Gilroy'; font-weight: 800 900; font-display: swap; src: url('/fonts/Gilroy-Heavy.woff') format('woff'); }
/* Theme fonts: render text while they load */
@font-face { font-family: 'G-B'; font-display: swap; src: url('/fonts/Gilroy-Bold.woff') format('woff'); }
@font-face { font-family: 'G-M'; font-display: swap; src: url('/fonts/Gilroy-Medium.woff') format('woff'); }

/* Enhancements layered on top of the original theme. Keep the look; improve a11y, polish and robustness. */

/* Owl base (owl.carousel.min.css expects JS-added classes; we add them in site.js) */
.owl-carousel { display: block; }
.owl-carousel .owl-stage-outer { overflow: hidden; touch-action: pan-y; }
.owl-carousel .owl-stage { display: flex; will-change: transform; }
.owl-carousel .owl-item { flex: 0 0 auto; }
.owl-carousel .owl-nav button.owl-prev, .owl-carousel .owl-nav button.owl-next { background: none; border: 0; cursor: pointer; }
.owl-carousel .owl-nav.disabled, .owl-carousel .owl-dots.disabled { display: none; }
.owl-carousel .owl-dot { background: none; border: 0; padding: 0; cursor: pointer; }

/* Skip link + visible focus for keyboard users */
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 1000; background: #003C6D; color: #fff !important; padding: 10px 18px; border-radius: 4px; font-family: 'G-B', sans-serif; transition: top .2s; }
.skip-link:focus { top: 12px; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, summary:focus-visible {
  outline: 3px solid #85DAE1 !important; outline-offset: 3px;
}
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; } }

[id] { scroll-margin-top: 90px; }

/* Sticky header with a soft shadow once scrolled */
.site-header { position: sticky; top: 0; z-index: 100; background: #fff; transition: box-shadow .25s ease; }
.site-header.is-scrolled { box-shadow: 0 6px 24px rgba(0, 60, 109, .10); }

/* Submenu: also open on keyboard focus (theme only handled :hover) */
@media (min-width: 993px) {
  .navbar ul li.menu-item-has-children:focus-within > .sub-menu { visibility: visible; opacity: 1; }
}
.navbar ul li.current-menu-item > a { color: #85DAE1 !important; }
.navbar ul li.plus-icon.current-menu-item > a { color: #003C6D !important; }

/* Mobile nav uses .show instead of Bootstrap's collapse JS */
@media (max-width: 991.98px) {
  .navbar-collapse.collapse:not(.show) { display: none; }
  .navbar-collapse.show { display: block; }
}

/* Scroll reveal (only when JS + motion allowed) */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-in { opacity: 1; transform: none; }

/* YouTube lite embed */
.yt-lite { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; padding: 0; cursor: pointer; background: #003C6D center / cover no-repeat; overflow: hidden; }
.yt-lite::before { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,60,109,0) 40%, rgba(0,60,109,.55)); transition: opacity .3s; }
.yt-lite:hover::before { opacity: .6; }
.yt-lite .yt-play { position: absolute; left: 50%; top: 50%; width: 84px; height: 84px; margin: -42px 0 0 -42px; border-radius: 50%; background: #fff; box-shadow: 0 10px 30px rgba(0,0,0,.25); transition: transform .25s ease, background .25s; }
.yt-lite .yt-play::after { content: ''; position: absolute; left: 34px; top: 26px; border-style: solid; border-width: 16px 0 16px 26px; border-color: transparent transparent transparent #003C6D; }
.yt-lite:hover .yt-play { transform: scale(1.08); background: #85DAE1; }
.yt-frame { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; }

/* Lightbox */
dialog.lightbox { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; }
dialog.lightbox::backdrop { background: rgba(0, 25, 46, .92); }
dialog.lightbox figure { margin: 0; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 60px 70px; }
dialog.lightbox img { max-width: 100%; max-height: calc(100vh - 140px); object-fit: contain; border-radius: 4px; box-shadow: 0 20px 60px rgba(0,0,0,.4); }
dialog.lightbox figcaption { color: #fff; font-family: 'G-M', sans-serif; letter-spacing: .1em; }
dialog.lightbox button { position: fixed; background: rgba(255,255,255,.12); color: #fff; border: 0; width: 52px; height: 52px; border-radius: 50%; font-size: 34px; line-height: 1; cursor: pointer; transition: background .2s; }
dialog.lightbox button:hover { background: #85DAE1; color: #003C6D; }
dialog.lightbox .lb-close { top: 16px; right: 16px; }
dialog.lightbox .lb-prev { left: 12px; top: 50%; transform: translateY(-50%); }
dialog.lightbox .lb-next { right: 12px; top: 50%; transform: translateY(-50%); }

/* Photo grid used on the program pages (replaces the Photo Gallery plugin) */
.rok-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.rok-gallery a { display: block; position: relative; overflow: hidden; border-radius: 6px; aspect-ratio: 4 / 3; background: #eef6f8; }
.rok-gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.rok-gallery a:hover img { transform: scale(1.06); }
.rok-gallery a::after { content: '\f00e'; font-family: 'FontAwesome'; position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-size: 26px; background: rgba(0,60,109,.45); opacity: 0; transition: opacity .3s; }
.rok-gallery a:hover::after { opacity: 1; }

/* Visually hidden helper */
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* Home video slots now hold real YouTube videos */
.video-left .yt-lite, .video-left .yt-frame { height: 100%; aspect-ratio: auto; box-shadow: 0 24px 50px rgba(0, 60, 109, .25); }
@media (max-width: 767px) { .video-left { height: auto !important; } .video-left .yt-lite, .video-left .yt-frame { aspect-ratio: 16 / 9; height: auto; } }

/* ---- Program pages (/medical-supplies/, /hospital-equipment/, /clothing/) — src/components/ProgramPage.astro ----
   Mirrors the old Photo Gallery (BWG) thumbnail layout: up to 5 per row, 4px gutters, 16:9-ish (56%) crops,
   square corners, last row centred, gentle zoom on hover. */
.medical-gallery-content { margin-bottom: 24px; }
.medical-gallery .program-gallery { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; padding: 0 4px; }
.medical-gallery .program-gallery a { flex: 0 0 calc((100% - 4px) / 2); aspect-ratio: 100 / 56; border-radius: 0; background: rgba(0,0,0,.3); }
.medical-gallery .program-gallery a:hover img { transform: scale(1.08); }
.medical-gallery .program-gallery img { transition: transform .3s; }
@media (min-width: 576px) { .medical-gallery .program-gallery a { flex-basis: calc((100% - 8px) / 3); } }
@media (min-width: 992px) { .medical-gallery .program-gallery a { flex-basis: calc((100% - 12px) / 4); } }
@media (min-width: 1200px) { .medical-gallery .program-gallery a { flex-basis: calc((100% - 16px) / 5); } }
/* Bootstrap reboot sets `dialog { display: block }`, so the closed lightbox rendered as an invisible 100vh box
   after the footer (blank space at page bottom) and its fixed prev/next/close buttons sat over the page.
   Hide it until opened. (Added with the program pages; applies to every [data-lightbox] page.) */
dialog.lightbox:not([open]) { display: none; }

/* About page (/about/): keep the value icons at their 50px theme size. The global `img { max-width: 100% }`
   above lets the flex column shrink them, which the live site does not do. */
.our-value-sec .value-img { flex-shrink: 0; }

/* ---- /donate/ — src/components/FundraiseUpEmbed.astro placeholder (shown until FundraiseUp codes are set) ---- */
.fru-placeholder { margin: 10px auto 0; padding: 44px 40px 40px; background: #F7F8FA; border: 1px solid #E9EEF5; border-top: 4px solid #85DAE1; border-radius: 3px; text-align: center; }
.fru-badge { display: inline-block; margin-bottom: 16px; padding: 6px 14px; border-radius: 50px; background: #E6F6F8; color: #003C6D; font-family: 'G-B', sans-serif; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; }
.fru-badge .fa { margin-right: 6px; }
.fru-placeholder h2 { font-family: 'G-B', sans-serif; font-size: 32px; letter-spacing: -.5px; color: #003C6D; margin-bottom: 12px; }
.support-sec-wrap .fru-placeholder p.fru-lead { font-size: 18px; color: #668AA7; max-width: 620px; margin: 0 auto 30px; }
.fru-ways { display: grid; grid-template-columns: minmax(0, 520px); justify-content: center; gap: 20px; }
.fru-ways.fru-ways-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.fru-way { display: flex; flex-direction: column; align-items: center; padding: 30px 24px; background: #FEFEFF; border-radius: 3px; box-shadow: 0 26px 32px rgba(179, 188, 211, .27); }
.fru-icon { display: grid; place-items: center; width: 54px; height: 54px; margin-bottom: 14px; border-radius: 50%; background: #003C6D; color: #fff; font-size: 22px; }
.fru-way h3 { font-family: 'G-B', sans-serif; font-size: 22px; color: #003C6D; margin-bottom: 8px; }
.support-sec-wrap .fru-way p { font-size: 16px; color: #668AA7; margin-bottom: 16px; }
.fru-addr { font-family: 'G-B', sans-serif; font-size: 18px; color: #003C6D; text-decoration: underline; text-decoration-color: #85DAE1; text-underline-offset: 4px; overflow-wrap: anywhere; }
.fru-addr:hover { color: #85DAE1; }
.fru-btn { display: inline-block; margin-top: auto; padding: 12px 28px; border: 2px solid #003C6D; border-radius: 50px; background: #003C6D; color: #fff !important; font-family: 'G-B', sans-serif; font-size: 15px; letter-spacing: .04em; text-decoration: none !important; word-break: break-word; transition: background .25s, color .25s, border-color .25s; }
.fru-btn:hover { background: #85DAE1; border-color: #85DAE1; color: #003C6D !important; }
.fru-cta { text-align: center; margin-top: 20px; }
@media (max-width: 767px) {
  .fru-placeholder { padding: 30px 16px 24px; }
  .fru-placeholder h2 { font-size: 26px; }
  .fru-ways.fru-ways-2 { grid-template-columns: minmax(0, 1fr); }
  .fru-btn { padding: 12px 18px; font-size: 14px; }
  .fru-addr { font-size: 16px; }
}
/* long e-transfer address in the original heading must wrap instead of widening the page */
.support-sec-wrap .etransfer a { overflow-wrap: anywhere; }
@media (max-width: 575px) { .support-sec-wrap .etransfer { font-size: 20px; } }

/* ---- /impact/ — carousel dots: site.js adds .owl-theme, whose grey dots outrank the theme's cyan ones.
   Restore the live look (cyan, 50% opacity, solid when active) on this page's sliders. ---- */
.stories-right-img.owl-theme .owl-dots .owl-dot span,
.sto-vid .video-car-s.owl-theme .owl-dots .owl-dot span { background: #85DAE1; opacity: .5; width: 12px; height: 12px; }
.stories-right-img.owl-theme .owl-dots .owl-dot.active span, .stories-right-img.owl-theme .owl-dots .owl-dot:hover span,
.sto-vid .video-car-s.owl-theme .owl-dots .owl-dot.active span, .sto-vid .video-car-s.owl-theme .owl-dots .owl-dot:hover span { background: #85DAE1; opacity: 1; }

/* ---- /contact/ — mailto contact form (src/pages/contact.astro) ---- */
.contact-form .rok-mail-form textarea { height: 93px; }
.rok-mail-status { margin: 16px 0 0; padding: 12px 16px; background: #E6F6F8; border-left: 3px solid #85DAE1; color: #003C6D; font-size: 15px; }
.rok-mail-status a { color: #003C6D; text-decoration: underline; }
.inquiries-sec h4 a, .sponsorships-sec h4 a { color: inherit; overflow-wrap: anywhere; }
@media (max-width: 575px) { .inquiries-sec h4, .sponsorships-sec h4 { font-size: 16px; } }
.inquiries-sec h4 a:hover, .sponsorships-sec h4 a:hover { text-decoration: underline; text-underline-offset: 4px; }
.sponsorships-sec h2 { margin-bottom: 18px; }
