:root{
  --accent: #f39c12;
  --font: "Lato", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --body-bg: #ffffff;
  --text: #222222;
  /* Offset for fixed navbar (padding + logo); not tied to a removed top strip */
  --nav-h: 70px;
}

html, body{
  height: 100%;
}

html{
  scroll-behavior: smooth;
}

/* ── Page transition fade ───────────────────────────────── */
/* Never fade entire `body` — fixed `.site-header` lives inside body and would vanish */
html.page-transitioning main,
html.page-transitioning footer.site-footer{
  opacity: 0;
  pointer-events: none;
}

body{
  font-family: var(--font);
  background: var(--body-bg);
  color: var(--text);
}

/* =========================
   Header Layout
   ========================= */
.site-header{
  position: fixed;
  top: 0 !important;
  left: 0;
  width: 100%;
  /* Above main; below Bootstrap modal/backdrop (~1050+) */
  z-index: 1046;
  background: #fff;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.10);
  transform: none !important;
  margin-top: 0 !important;
}

.navbar-row{
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  padding-block: 4px;
  box-sizing: border-box;
}

/* Kill Bootstrap navbar vertical rhythm (still causes a tall white bar after custom padding:0). */
.site-header .navbar{
  --bs-navbar-padding-y: 0;
  --bs-navbar-padding-x: 0;
  --bs-navbar-brand-padding-y: 0;
  --bs-navbar-brand-margin-end: 1rem;
  min-height: 0;
}

.site-header .navbar-nav{
  --bs-nav-link-padding-y: 0;
  --bs-nav-link-padding-x: 0.5rem;
}

.navbar-row{
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  padding-block: 4px;
  box-sizing: border-box;
}

.navbar-row > .container{
  display: flex;
  align-items: center;
}

.navbar{
  padding: 0;
  display: flex;
  align-items: center;
  width: 100%;
  justify-content: space-between;
}

/* Wraps logo only; toggler is sibling (mobile: flex space-between). Desktop: contents = brand flows into .navbar */
.navbar-inlinebar{
  display: contents;
}

.navbar-brand{
  margin: 0;
  padding: 0;
  height: auto;
  display: inline-flex;
  align-items: center;
  line-height: 1;
}

.navbar-brand .logo{
  display: block;
  height: min(var(--logo-max-h, 60px), 70px);
  max-height: 70px;
  width: auto;
  object-fit: contain;
  background: transparent;
  transition: height 0.35s ease, max-height 0.35s ease;
}

/* Desktop: vertically center logo + links (993 avoids overlap with mobile max-width:992px) */
@media (min-width: 993px){
  :root{
    --nav-h: 78px;
  }
  .navbar-row{
    padding-block: 14px;
  }
  nav.navbar.navbar-expand-lg{
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    align-items: center !important;
    min-height: 0 !important;
  }
  .navbar-brand{
    align-self: center;
  }
  .navbar-brand .logo{
    transition: none;
  }
  .navbar-collapse{
    align-self: center;
  }
  .navbar-nav{
    align-items: center;
  }
}

.navbar-collapse{
  align-items: center;
  justify-content: flex-end;
  flex-grow: 1;
}

.navbar-nav{
  align-items: center;
  margin-left: auto !important;
  gap: 2px;
}

.navbar .nav-link{
  color: #222 !important;
  font-size: 16px;
  font-weight: 500;
  padding-top: 0;
  padding-bottom: 0;
  line-height: 1.4;
  height: auto;
  display: inline-flex;
  align-items: center;
  transition: color 0.2s ease;
}

/* Prefer <button> for dropdown toggles — avoids href="#" quirks on mobile / shared hosting. */
.navbar button.nav-link.dropdown-toggle{
  background: none;
  border: none;
  font: inherit;
  font-family: inherit;
  color: inherit;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  text-align: inherit;
}
.navbar button.nav-link.dropdown-toggle:focus-visible{
  outline: 2px solid var(--accent, #f39c12);
  outline-offset: 2px;
  box-shadow: none;
}

.navbar .nav-link:hover{
  color: var(--accent) !important;
}

.navbar-toggler{
  border: 0;
  box-shadow: none !important;
  padding: 6px 4px;
}

.navbar-toggler:focus{
  box-shadow: none;
}

.navbar-toggler .navbar-toggler-icon{
  position: relative;
  display: block;
  width: 24px;
  height: 2px;
  background: #222;
  background-image: none;
  border-radius: 99px;
  transition: background 200ms ease;
}

.navbar-toggler .navbar-toggler-icon::before,
.navbar-toggler .navbar-toggler-icon::after{
  content: "";
  position: absolute;
  left: 0;
  width: 24px;
  height: 2px;
  background: #222;
  border-radius: 99px;
  transition: transform 260ms ease, top 260ms ease, opacity 200ms ease;
}

.navbar-toggler .navbar-toggler-icon::before{
  top: -7px;
}

.navbar-toggler .navbar-toggler-icon::after{
  top: 7px;
}

.navbar-toggler[aria-expanded="true"] .navbar-toggler-icon{
  background: transparent;
}

.navbar-toggler[aria-expanded="true"] .navbar-toggler-icon::before{
  top: 0;
  transform: rotate(45deg);
}

.navbar-toggler[aria-expanded="true"] .navbar-toggler-icon::after{
  top: 0;
  transform: rotate(-45deg);
}

.navbar .dropdown-menu{
  border: 0;
  border-radius: 0;
  background: #f7f7f7;
}
.navbar .dropdown-item{
  color: #222;
  font-size: 15px;
  font-weight: 500;
  padding: 8px 16px;
}
.navbar .dropdown-item:hover{
  background: rgba(243,156,18,0.22);
  color: #111;
}
.navbar .dropdown-menu .dropdown-item.active,
.navbar .dropdown-menu .dropdown-item:active{
  background-color: rgba(243,156,18,0.3);
  color: #111;
}
.navbar .dropdown-menu .dropdown-item:focus,
.navbar .dropdown-menu .dropdown-item:focus-visible{
  background-color: rgba(243,156,18,0.18);
  color: #111;
}
.navbar .nav-link.dropdown-toggle:focus-visible{
  outline: 2px solid var(--accent, #f39c12);
  outline-offset: 2px;
  box-shadow: none;
}

.btn-accent{
  background: var(--accent);
  border: 1px solid var(--accent);
  color: #fff;
  border-radius: 0;
}
.btn-accent:hover{
  background: #e08a08;
  border-color: #e08a08;
  color: #fff;
}

/* index.php — hero must not steal pointer events (.hero-content:auto was catching clicks across the full width) */
.page-home:not(.no-navbar) .site-header{
  z-index: 1080 !important;
  opacity: 1 !important;
  visibility: visible !important;
}
.page-home .hero,
.page-home .hero *{
  pointer-events: none !important;
}
.page-home .hero .hero-carousel-btn,
.page-home .hero .hero-carousel-dot{
  pointer-events: auto !important;
  cursor: pointer;
}

/* index.php: home nav uses <details> for About / Contributions (Bootstrap JS not required) */
.page-home .page-home-nav-details > summary.dropdown-toggle::-webkit-details-marker{
  display: none;
}
.page-home .page-home-nav-details > summary.dropdown-toggle{
  list-style: none;
  cursor: pointer;
}
.page-home .page-home-nav-details:not([open]) > .dropdown-menu{
  display: none !important;
}
.page-home .page-home-nav-details[open] > .dropdown-menu{
  display: block !important;
}

/* Push page content below fixed header */
main{
  padding-top: var(--nav-h);
  position: relative;
  z-index: 0;
  opacity: 1;
  transition: opacity 0.25s ease;
}
body.no-navbar main{
  padding-top: 0;
}

/* =========================
   Hero
   ========================= */
.hero{
  position: relative;
  overflow: hidden;
  min-height: 520px;
  min-height: 100vh;
  min-height: 100dvh;
  margin-top: calc(-1 * var(--nav-h));
  background: #000;
}

.hero-slides{
  position: absolute;
  inset: 0;
}

.hero-slide{
  position: absolute;
  inset: 0;
  opacity: 0;
  z-index: 1;
  visibility: hidden;
  transition: opacity 520ms ease, visibility 0s linear 520ms;
  pointer-events: none;
}

.hero-slide.active{
  opacity: 1;
  z-index: 3;
  visibility: visible;
  transition: opacity 520ms ease, visibility 0s;
  pointer-events: none;
}

.hero-slide-img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 22%;
  transform: scale(1.01);
}

.hero-gradient{
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.25) 55%, rgba(0,0,0,0.35) 100%);
}

.hero-content{
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(900px, 92%);
  text-align: center;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-kicker{
  margin: 0 0 10px 0;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.4px;
  opacity: 0.95;
}

.hero-title{
  font-weight: 800;
  letter-spacing: 0.2px;
  margin: 0 0 10px 0;
  font-size: clamp(34px, 4vw, 56px);
}

.hero-subtitle{
  margin: 0;
  font-size: clamp(14px, 1.8vw, 18px);
  opacity: 0.95;
  max-width: 680px;
  margin-inline: auto;
}

/* Wave wipe overlay */
.hero-wave-overlay{
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  clip-path: polygon(0 70%, 100% 55%, 100% 100%, 0 100%);
  pointer-events: none;
  filter: saturate(1.05) contrast(1.02);
}

.hero-wave-overlay.is-active{
  opacity: 1;
  animation: waveReveal 920ms ease-out forwards;
}

@keyframes waveReveal{
  0%{
    transform: translateY(10px);
    clip-path: polygon(0 75%, 100% 58%, 100% 100%, 0 100%);
  }
  55%{
    clip-path: polygon(0 45%, 100% 35%, 100% 100%, 0 100%);
  }
  100%{
    transform: translateY(0px);
    clip-path: polygon(0 0%, 100% 0%, 100% 30%, 0 30%);
    opacity: 0;
  }
}

/* Home hero — prev / next + dots (same as Education page hero) */
.hero-carousel-btn{
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.55);
  background: rgba(0,0,0,0.35);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.22s ease, border-color 0.22s ease, transform 0.22s ease;
  z-index: 12;
  backdrop-filter: blur(4px);
  padding: 0;
}
.hero-carousel-btn:hover{
  background: var(--accent);
  border-color: var(--accent);
  transform: translateY(-50%) scale(1.08);
}
.hero-carousel-btn--prev{ left: 20px; }
.hero-carousel-btn--next{ right: 20px; }
.hero-carousel-dots{
  position: absolute;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 12;
}
.hero-carousel-dot{
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.45);
  cursor: pointer;
  padding: 0;
  transition: background 0.25s ease, width 0.25s ease;
}
.hero-carousel-dot.is-active{
  background: var(--accent);
  width: 26px;
  border-radius: 4px;
}

/* Per-slide text animation styles */
.hero-slide[data-anim-style="a"].active .hero-title{
  animation: textInA 900ms cubic-bezier(.2,.9,.2,1) both;
}
.hero-slide[data-anim-style="a"].active .hero-subtitle{
  animation: textInASub 950ms 120ms cubic-bezier(.2,.9,.2,1) both;
}

.hero-slide[data-anim-style="b"].active .hero-title{
  animation: textInB 900ms cubic-bezier(.2,.9,.2,1) both;
}
.hero-slide[data-anim-style="b"].active .hero-subtitle{
  animation: textInBSub 900ms 140ms cubic-bezier(.2,.9,.2,1) both;
}

.hero-slide[data-anim-style="c"].active .hero-title{
  animation: textInC 900ms cubic-bezier(.2,.9,.2,1) both;
}
.hero-slide[data-anim-style="c"].active .hero-subtitle{
  animation: textInCSub 900ms 140ms cubic-bezier(.2,.9,.2,1) both;
}

.recent-causes{
  background: #f4f4f7;
  padding: 40px 0 44px;
}

.recent-causes-head h2{
  margin: 0;
  font-size: clamp(34px, 3.8vw, 54px);
  line-height: 1.15;
  font-weight: 700;
  color: #252933;
  position: relative;
  padding-bottom: 10px;
}

.recent-causes-head h2::after{
  content: "";
  width: 44px;
  height: 4px;
  border-radius: 99px;
  background: var(--accent);
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
}

.recent-causes-head .recent-causes-head-desc{
  margin: 8px 0 16px;
  max-width: none;
  width: 100%;
  color: #626774;
  font-size: 17px;
  line-height: 1.55;
  text-align: center;
}
.recent-causes-head .recent-causes-head-desc p{
  margin: 0 0 0.45em;
}
.recent-causes-head .recent-causes-head-desc p:last-child{
  margin-bottom: 0;
}
.recent-causes-head .recent-causes-head-desc a{
  color: var(--accent, #f39c12);
}

.cause-panel{
  margin-top: 22px;
  padding: 12px 0 22px;
  border-bottom: 1px dashed rgba(0,0,0,0.14);
}

.cause-panel:first-child{
  margin-top: 0;
}

.cause-panel:last-child{
  border-bottom: 0;
  padding-bottom: 0;
}

.cause-panel-subtitle{
  text-align: center;
  margin: 0 0 22px;
  color: #626774;
  max-width: none;
  width: 100%;
  font-size: 17px;
  line-height: 1.55;
}

.cause-grid{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

/* Grid items default min-width:auto — without this, long text can ignore line-clamp. */
.cause-grid > .cause-card{
  min-width: 0;
}

.cause-card{
  background: #fff;
  border: 1px solid rgba(0,0,0,0.09);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 8px 18px rgba(18, 24, 40, 0.06);
  min-width: 0;
}

a.cause-card.cause-card--link:link,
a.cause-card.cause-card--link:visited,
a.cause-card.cause-card--link:any-link{
  text-decoration: none !important;
  color: inherit !important;
}
a.cause-card.cause-card--link{
  text-decoration: none !important;
  color: inherit !important;
  display: block;
  -webkit-tap-highlight-color: transparent;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
  cursor: pointer;
}
a.cause-card.cause-card--link:hover{
  box-shadow: 0 14px 32px rgba(18, 24, 40, 0.12);
  transform: translateY(-3px);
}
a.cause-card.cause-card--link:focus-visible{
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* Must beat `a.cause-card.cause-card--link { display: block }`, else all cards stay visible */
.cause-grid a.cause-card.cause-card--link.is-hidden,
a.cause-card.cause-card--link.is-hidden{
  display: none !important;
}

.site-footer{
  background: #202124;
  color: #d7d9dd;
  margin-top: 22px;
  opacity: 1;
  transition: opacity 0.25s ease;
}

.footer-top{
  padding: 36px 0 26px;
  display: grid;
  gap: 28px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.footer-col h3{
  color: #fff;
  margin: 0 0 14px;
  font-size: 22px;
}

.footer-brand-link {
  display: inline-block;
  text-decoration: none;
  outline: none;
}

.footer-logo{
  max-height: 52px;
  width: auto;
  display: block;
  margin-bottom: 12px;
  background: transparent;
}

.footer-subtitle{
  color: #b8bcc5;
  line-height: 1.7;
  margin: 0 0 12px;
}

.footer-list{
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-list li{
  margin-bottom: 8px;
  color: #b8bcc5;
}

.footer-list a{
  color: #b8bcc5;
  text-decoration: none;
  overflow-wrap: break-word;
  word-break: normal;
}

.footer-list a:hover{
  color: #fff;
}

.footer-bottom{
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 14px 0;
}

.footer-bottom-inner{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.footer-copy{
  color: #b8bcc5;
  font-size: 14px;
}

.footer-links{
  display: flex;
  gap: 16px;
}

.footer-links a{
  color: #d5d8de;
  text-decoration: none;
  font-size: 14px;
}

.cause-card img{
  width: 100%;
  height: 228px;
  object-fit: cover;
}

.cause-card-body{
  padding: 16px 16px 18px;
  min-width: 0;
  overflow: hidden;
}

/* Cause cards — Home AND category pages (education.php …): title max 2 lines, description max 3 (…). */
main section.recent-causes .cause-card .cause-card__title,
main section.recent-causes .cause-card .cause-card-body h3,
main section.board-page-causes .cause-card .cause-card__title,
main section.board-page-causes .cause-card .cause-card-body h3{
  box-sizing: border-box;
  margin: 0 0 8px;
  font-size: clamp(18px, 1.5vw, 24px) !important;
  line-height: 1.3 !important;
  font-weight: 600;
  color: #2a2f3a;
  min-width: 0;
  max-width: 100%;
  width: 100%;
  white-space: normal;
  overflow: hidden !important;
  text-overflow: ellipsis;
  -webkit-box-orient: vertical !important;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  display: -webkit-box !important;
  overflow-wrap: anywhere;
  word-break: break-word;
  max-height: calc(1.3em * 2);
}

main section.recent-causes .cause-card .cause-card__desc,
main section.recent-causes .cause-card .cause-card-body > p,
main section.board-page-causes .cause-card .cause-card__desc,
main section.board-page-causes .cause-card .cause-card-body > p{
  box-sizing: border-box;
  margin: 0;
  color: #666c79;
  font-size: 16px !important;
  line-height: 1.5 !important;
  min-width: 0;
  max-width: 100%;
  width: 100%;
  white-space: normal;
  overflow: hidden !important;
  text-overflow: ellipsis;
  -webkit-box-orient: vertical !important;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  display: -webkit-box !important;
  overflow-wrap: anywhere;
  word-break: break-word;
  max-height: calc(1.5em * 3);
}

/* Rich subtitle (folded to inline in PHP for cards) — keep helpers for any legacy HTML */
main section.recent-causes .cause-card .cause-card__desc p,
main section.board-page-causes .cause-card .cause-card__desc p{
  margin: 0 !important;
  display: contents;
}

main section.recent-causes .cause-card--link .cause-card__title,
main section.recent-causes .cause-card--link .cause-card__title a,
main section.recent-causes .cause-card--link .cause-card__desc,
main section.recent-causes .cause-card--link .cause-card__desc a,
main section.board-page-causes .cause-card--link .cause-card__title,
main section.board-page-causes .cause-card--link .cause-card__title a,
main section.board-page-causes .cause-card--link .cause-card__desc,
main section.board-page-causes .cause-card--link .cause-card__desc a{
  color: inherit !important;
  text-decoration: none !important;
  font-weight: inherit;
}

main section.recent-causes .cause-card--link .cause-card__title,
main section.recent-causes .cause-card--link .cause-card__title a,
main section.board-page-causes .cause-card--link .cause-card__title,
main section.board-page-causes .cause-card--link .cause-card__title a{
  color: #2a2f3a !important;
}

main section.recent-causes .cause-card--link .cause-card__desc,
main section.recent-causes .cause-card--link .cause-card__desc a,
main section.board-page-causes .cause-card--link .cause-card__desc,
main section.board-page-causes .cause-card--link .cause-card__desc a{
  color: #666c79 !important;
}

main section.recent-causes .cause-card--link .cause-card__title a,
main section.recent-causes .cause-card--link .cause-card__desc a,
main section.board-page-causes .cause-card--link .cause-card__title a,
main section.board-page-causes .cause-card--link .cause-card__desc a{
  cursor: inherit;
  pointer-events: none;
}

main section.recent-causes .cause-card--link .cause-card__title u,
main section.recent-causes .cause-card--link .cause-card__desc u,
main section.board-page-causes .cause-card--link .cause-card__title u,
main section.board-page-causes .cause-card--link .cause-card__desc u{
  text-decoration: none;
}

@keyframes textInA{
  0%{ opacity: 0; transform: translateY(18px) scale(0.98); }
  100%{ opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes textInASub{
  0%{ opacity: 0; transform: translateY(14px); }
  100%{ opacity: 1; transform: translateY(0); }
}

@keyframes textInB{
  0%{ opacity: 0; transform: translateX(-16px) scale(0.98); }
  100%{ opacity: 1; transform: translateX(0) scale(1); }
}
@keyframes textInBSub{
  0%{ opacity: 0; transform: translateX(-10px); }
  100%{ opacity: 1; transform: translateX(0); }
}

@keyframes textInC{
  0%{ opacity: 0; transform: scale(0.92); filter: blur(2px); }
  100%{ opacity: 1; transform: scale(1); filter: blur(0); }
}
@keyframes textInCSub{
  0%{ opacity: 0; transform: scale(0.98); filter: blur(1.5px); }
  100%{ opacity: 1; transform: scale(1); filter: blur(0); }
}

/* Placeholder blocks for dropdown anchor targets */
.anchor-section{
  margin: 0;
  padding: 0;
}

.anchor-section .container,
.anchor-section .row,
.anchor-section .col-12{
  margin: 0;
  padding: 0;
}

.anchor-spacer{
  height: 0;
  margin: 0;
  padding: 0;
}

@media (max-width: 992px){
  /* Tight strip — Bootstrap padding/min-heights were stretching the white bar */
  :root{
    --nav-h: 64px;
  }
  main{
    padding-top: var(--nav-h);
  }
  /* Full-bleed header row on small screens (Bootstrap .container max-width was narrowing the bar). */
  .site-header .container{
    max-width: none !important;
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: max(12px, var(--bs-gutter-x, 0.75rem)) !important;
    padding-right: max(12px, var(--bs-gutter-x, 0.75rem)) !important;
    box-sizing: border-box !important;
  }
  .navbar-row > .container{
    display: block !important;
  }
  /*
    HTML: .navbar-inlinebar (logo) + .navbar-toggler + #mainNav (absolute).
    Two in-flow flex children → space-between = logo left, hamburger right.
  */
  .navbar-inlinebar{
    display: flex !important;
    align-items: center;
    flex: 1 1 auto;
    min-width: 0;
    min-height: 0 !important;
    max-height: 100%;
    box-sizing: border-box;
  }
  nav.navbar.navbar-expand-lg{
    position: relative !important;
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    height: var(--nav-h) !important;
    max-height: var(--nav-h) !important;
    min-height: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
  }
  nav.navbar.navbar-expand-lg > .navbar-toggler{
    flex: 0 0 auto !important;
    margin: 0 !important;
    padding: 4px 6px !important;
    min-height: 0 !important;
    align-self: center !important;
  }
  nav.navbar.navbar-expand-lg .navbar-brand{
    padding-top: 0 !important;
    padding-bottom: 0 !important;
  }
  .navbar-row{
    overflow: visible;
    height: var(--nav-h) !important;
    max-height: var(--nav-h) !important;
    min-height: 0 !important;
    align-items: center !important;
  }
  .navbar-collapse{
    background: #fff;
    margin-top: 8px;
    padding: 10px 14px;
    border-radius: 10px;
    box-shadow: 0 10px 24px rgba(0,0,0,0.18);
    position: absolute !important;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1005;
    flex: none !important;
    flex-basis: auto !important;
    width: auto !important;
    max-width: none !important;
    height: auto !important;
    max-height: 0;
    overflow: hidden;
    align-items: stretch !important;
    opacity: 0;
    transform: translateY(-8px);
    transition: max-height 280ms ease, opacity 220ms ease, transform 220ms ease;
  }
  .navbar-collapse.collapse{
    display: block;
  }
  .navbar-collapse.collapse.show{
    opacity: 1;
    transform: translateY(0);
    max-height: 75vh;
    overflow-y: auto;
    overflow-x: visible;
  }
  .navbar-collapse.collapsing{
    display: block;
    height: auto !important;
    max-height: 75vh;
    overflow-y: hidden;
  }
  .navbar-nav{
    height: auto;
    width: 100%;
    align-items: stretch;
    margin-left: 0 !important;
    gap: 0;
  }
  .navbar .nav-item{
    width: 100%;
  }
  .navbar .nav-link{
    height: auto;
    min-height: 0;
    display: block;
    padding: 12px 14px;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.35;
  }
  .navbar .dropdown-menu{
    background: #fff;
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 8px;
    margin-top: 4px;
    position: static;
    float: none;
    transform: none !important;
    width: 100%;
  }
  .hero{
    min-height: 500px;
    min-height: calc(100vh - var(--nav-h));
    min-height: calc(100dvh - var(--nav-h));
  }
  .hero-content{
    top: 54%;
    width: min(980px, 94%);
  }
  .hero-title{
    font-size: clamp(30px, 8.4vw, 46px);
    line-height: 1.15;
  }
  .cause-grid{
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
  }
  .footer-top{
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .hero-subtitle{
    font-size: clamp(15px, 4.2vw, 18px);
    max-width: 95%;
    margin: 0 auto;
  }
}

@media (max-width: 576px){
  .navbar-brand .logo{
    height: min(36px, calc(var(--nav-h) - 12px));
    max-height: calc(var(--nav-h) - 12px);
  }
  .hero{
    min-height: 470px;
    min-height: calc(100vh - var(--nav-h));
    min-height: calc(100dvh - var(--nav-h));
  }
  .hero-kicker{
    font-size: 12px;
    margin-bottom: 8px;
  }
  .hero-content{
    top: 56%;
  }
  .recent-causes{
    padding: 28px 0 32px;
  }
  .recent-causes-head h2{
    font-size: clamp(28px, 8vw, 38px);
  }
  .recent-causes-head .recent-causes-head-desc,
  .cause-panel-subtitle{
    font-size: 15px;
  }
  .cause-grid{
    grid-template-columns: 1fr;
  }
  .cause-card img{
    height: 210px;
  }
  .footer-top{
    grid-template-columns: 1fr;
    padding: 28px 0 18px;
    gap: 16px;
  }
  .site-footer .container{
    padding-left: 16px;
    padding-right: 16px;
  }
  .footer-col h3{
    font-size: 20px;
    margin-bottom: 10px;
  }
  .footer-subtitle{
    font-size: 14px;
    line-height: 1.6;
  }
  .footer-list li{
    margin-bottom: 6px;
    font-size: 15px;
    line-height: 1.45;
    overflow-wrap: break-word;
    word-break: break-word;
  }
  .footer-bottom-inner{
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .footer-links{
    flex-wrap: wrap;
    gap: 10px 14px;
  }
  .footer-copy{
    font-size: 13px;
    line-height: 1.5;
  }
}

/* cause-detail.php: breadcrumb only above image; image; then h1; then subtitle; then body */
.cause-detail-hero-header{
  padding: 0.5rem 10% 0.35rem;
  text-align: left;
  background: var(--body-bg, #fff);
  box-sizing: border-box;
  position: relative;
  z-index: 5;
}
.cause-detail-text-head{
  padding: 0.6rem 10% 0.4rem;
  text-align: center;
  background: var(--body-bg, #fff);
  box-sizing: border-box;
}
.cause-detail-text-head .cause-detail-page-title{
  margin: 0 auto 0.4rem;
}
.cause-detail-text-head .cause-detail-subtitle:last-child{
  margin-bottom: 0;
}
.cause-detail-text-head .cause-detail-page-title,
.cause-detail-text-head .cause-detail-subtitle{
  max-width: none;
  width: 100%;
  box-sizing: border-box;
}
.cause-detail-text-head .cause-detail-subtitle{
  overflow-wrap: break-word;
}
.cause-detail-crumb{
  display: block;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.5;
  margin: 0 0 0.35rem 0;
  color: #5a5f6b;
  word-wrap: break-word;
}
.cause-detail-crumb a{
  color: var(--text, #222);
  text-decoration: none;
  font-weight: 600;
  cursor: pointer;
  position: relative;
  z-index: 1;
}
.cause-detail-crumb a:hover{
  color: var(--accent, #f39c12);
  text-decoration: underline;
}
.cause-detail-crumb__sep{
  margin: 0 0.3em;
  opacity: 0.5;
  font-weight: 400;
}
.cause-detail-crumb__current{
  color: #7a7f8b;
  word-break: break-word;
}
.cause-detail-page-title{
  font-size: clamp(26px, 3.6vw, 40px);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: 0.02em;
  margin: 0 auto;
  color: var(--text, #111);
  max-width: 56rem;
}
/* cause-detail.php: carousel (2+ imgs) or single static cover */
.cause-detail-hero-static{
  margin: 0 0 0.25rem;
  background: var(--body-bg, #fff);
}
.cause-detail-hero-static__frame{
  margin: 0 auto;
  position: relative;
  box-sizing: border-box;
  /* Fixed canvas: big uploads crop inside — never enlarge past this box */
  width: 80%;
  max-width: min(920px, 100%);
  aspect-ratio: 16 / 13;
  max-height: min(75vh, 780px);
  min-height: 275px;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
  background: #111;
}
.cause-detail-carousel.cause-detail-hero-static__frame{
  padding: 0;
  position: relative;
}
.cause-detail-carousel__btn{
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  color: #1a1a1a;
  cursor: pointer;
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
  transition: background 0.15s ease, transform 0.15s ease;
}
.cause-detail-carousel__btn:hover{
  background: #fff;
}
.cause-detail-carousel__btn:focus-visible{
  outline: 2px solid var(--accent, #f39c12);
  outline-offset: 2px;
}
.cause-detail-carousel__btn--prev{
  left: 10px;
}
.cause-detail-carousel__btn--next{
  right: 10px;
}
@media (max-width: 576px){
  .cause-detail-carousel__btn{
    width: 40px;
    height: 40px;
  }
  .cause-detail-carousel__btn--prev{ left: 6px; }
  .cause-detail-carousel__btn--next{ right: 6px; }
}
.cause-detail-carousel__track{
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  transition: transform 0.52s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: transform;
}
.cause-detail-carousel__track--instant{
  transition: none !important;
}
/* Slides: width/height set in JS (= frame viewport); imgs fill slide */
.cause-detail-carousel__slide{
  position: relative;
  flex: 0 0 auto;
  margin: 0;
  overflow: hidden;
  box-sizing: border-box;
}
@media (prefers-reduced-motion: reduce){
  .cause-detail-carousel__track{
    transition: none !important;
  }
}
.cause-detail-hero-static__frame--empty{
  aspect-ratio: 16 / 13;
  max-height: min(75vh, 780px);
  min-height: 275px;
}
/* Fill the frame crop box; intrinsic px size from upload does not change layout */
.cause-detail-hero-static__frame .cause-detail-hero-static__img{
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  min-height: 0 !important;
  margin: 0;
  padding: 0;
  border: 0;
  object-fit: cover;
  object-position: center center;
}
.cause-detail-hero-static__placeholder{
  position: absolute;
  inset: 0;
  background: #111;
}
.cause-detail-subtitle{
  font-size: clamp(1rem, 1.35vw, 1.15rem);
  line-height: 1.6;
  margin: 0 auto;
  max-width: 52ch;
  color: #5a5f6b;
}
.cause-detail-content{
  padding: 8px 0 38px;
}
.cause-detail-content .container{
  max-width: 100%;
  padding-left: 10%;
  padding-right: 10%;
  box-sizing: border-box;
}
.cause-detail-content__inner{
  max-width: none;
  width: 100%;
  margin: 0;
  font-size: 17px;
  line-height: 1.75;
  color: #3a3f4d;
  overflow-wrap: break-word;
}
.cause-detail-lead{
  margin: 0 0 1.25rem;
  font-size: 1.2rem;
  line-height: 1.65;
  color: #2a2f3a;
}
.cause-detail-body{
  font-size: 1.02rem;
  line-height: 1.8;
  color: #3a3f4d;
  margin: 0;
}
.cause-detail-back{
  margin: 2rem 0 0;
  padding-top: 1rem;
  border-top: 1px solid rgba(0,0,0,0.08);
  font-size: 15px;
}
.cause-detail-back-link{
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}
.cause-detail-back-link:hover{
  text-decoration: underline;
  color: var(--accent);
}

.cause-detail-static-gallery{
  padding: 0 0 0.5rem;
  background: var(--body-bg, #fff);
}
.cause-detail-static-gallery__inner{
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 0 10% 0.5rem;
  box-sizing: border-box;
  justify-content: center;
}
.cause-detail-static-gallery__item{
  margin: 0;
  flex: 0 1 auto;
  max-width: min(100%, 400px);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.1);
}
.cause-detail-static-gallery__item img{
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
  vertical-align: top;
}

@media (max-width: 576px) {
  .cause-detail-hero-header {
    padding: 0.35rem 5% 0.25rem;
  }
  .cause-detail-text-head {
    padding: 0.45rem 5% 0.35rem;
  }
  .cause-detail-content .container {
    padding-left: 5%;
    padding-right: 5%;
  }
  .cause-detail-hero-static__frame{
    width: 90%;
    margin-left: auto;
    margin-right: auto;
    border-radius: 12px;
  }
  .cause-detail-static-gallery__inner{
    padding-left: 5%;
    padding-right: 5%;
  }
}
