/* v1.0.0 — homepage-only typography and opt-in structural layouts. */
body.home-title-font-custom :is(h1,h2,h3,h4,h5,h6,.section-title p,.activity-card-title,.village-impact-title,.village-impact-header h3) {
  font-family: var(--home-title-font) !important;
}
body.home-body-font-custom,
body.home-body-font-custom :is(p,li,a,button,label,input,select,textarea,td,th,.activity-card-summary,.village-summary-value,.village-summary-label) {
  font-family: var(--home-body-font) !important;
}
/* Some existing headings are links or <p> nodes: title wins over body. */
body.home-title-font-custom :is(h1,h2,h3,h4,h5,h6,.section-title p,.activity-card-title) *,
body.home-title-font-custom .section-title p { font-family:var(--home-title-font) !important; }
#hero h1, #hero h2, #main .section-title, #footer { word-break:keep-all; overflow-wrap:break-word; }
#hero h1 { text-wrap:balance; }
/* Public header links share the header backdrop, not form/tab night surfaces. */
html[data-theme='dark'][data-theme-page='index'] #header #navbar,
html[data-theme='dark'][data-theme-page='index'] #header #navbar .nav-link { background-color:transparent !important; }
body.home-layout-designed #hero { height:auto; min-height:620px; padding:136px 0 76px; }
body.home-layout-designed #hero .container { padding-bottom:0; }
body.home-layout-designed #hero h1 { font-size:clamp(2.5rem,4.7vw,4.5rem); line-height:1.3; letter-spacing:-.035em; }
body.home-layout-designed #hero h2 { margin-top:22px; line-height:1.7; }
body.home-layout-designed #main > section { scroll-margin-top:96px; }
body.home-layout-designed #about .row.content { row-gap:28px; }

/* Split opening: text on the left, the selected banner photograph on the right. */
body.home-layout-designed.home-template-simple #hero { background:#123e2e; overflow:hidden; min-height:680px; }
/* Device-aware banners own their photo/overlay and caption positioning. */
body.home-layout-designed.home-template-simple #hero:not(.has-mobile-image):before { background:linear-gradient(90deg,#123e2e 0%,#123e2e 45%,rgba(18,62,46,.18) 100%); z-index:1; }
body.home-layout-designed.home-template-simple #hero:not(.has-mobile-image):after { content:''; position:absolute; inset:0 0 0 46%; background-image:var(--hero-background-image, url('https://images.unsplash.com/photo-1509391366360-2e959784a276?q=80&w=2072&auto=format&fit=crop')); background-size:cover; background-position:var(--hero-background-position,center); }
body.home-layout-designed.home-template-simple #hero:not(.has-mobile-image) .container { z-index:2; position:relative; }
body.home-layout-designed.home-template-simple #hero .col-xl-8 { width:52%; max-width:660px; padding-right:32px; }
body.home-layout-designed.home-template-simple #hero h1 { font-size:clamp(2.25rem,3.8vw,3.8rem); }
body.home-layout-designed.home-template-simple #about .row.content { border:0; padding:0; box-shadow:none; background:transparent; }
body.home-layout-designed.home-template-simple #about .row.content > div:first-child { padding:36px; border-radius:24px; background:#f3f8f4; }
body.home-layout-designed.home-template-simple #about .row.content > div:last-child { padding-left:32px; }

/* Brand introduction, then the organizations supporting it. */
body.home-layout-designed.home-template-brand #hero .col-xl-8 { max-width:720px; padding:38px; border-radius:12px; border-left:6px solid #fbbf24; }
body.home-layout-designed.home-template-brand #about .row.content { flex-direction:row-reverse; }
body.home-layout-designed.home-template-brand #about .row.content > div:first-child { padding-left:36px; }
body.home-layout-designed.home-template-brand #partners { padding-top:36px; }

/* News first: a lead story and a readable two-column story list. */
body.home-layout-designed.home-template-editorial #hero { min-height:480px; padding-bottom:52px; }
body.home-layout-designed.home-template-editorial #hero .col-xl-8 { width:100%; max-width:1040px; }
body.home-layout-designed.home-template-editorial #hero h1 { font-size:clamp(2.4rem,4.4vw,4rem); }
body.home-layout-designed.home-template-editorial #activities .activity-scroll-track { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); overflow:visible; }
body.home-layout-designed.home-template-editorial #activities .activity-card-slide { max-width:none; width:100%; }
body.home-layout-designed.home-template-editorial #activities .activity-card-slide:first-child { grid-column:1/-1; }
body.home-layout-designed.home-template-editorial #activities .activity-card-slide:first-child .activity-card { flex-direction:row; width:100%; }
body.home-layout-designed.home-template-editorial #activities .activity-card-slide:first-child .activity-card-media { width:50%; flex:0 0 50%; aspect-ratio:16/10; }
body.home-layout-designed.home-template-editorial #activities .activity-card-slide:first-child .activity-card-body { padding:30px; justify-content:center; }
body.home-layout-designed.home-template-editorial #activities .activity-card-slide:first-child .activity-card-title { font-size:1.65rem; line-height:1.5; }

/* Participation first: a poster opening and the live participation section below. */
body.home-layout-designed.home-template-campaign #hero { min-height:660px; }
body.home-layout-designed.home-template-campaign #hero .col-xl-8 { width:100%; max-width:1050px; border-radius:16px; border-width:1px; background:rgba(79,27,9,.5); }
body.home-layout-designed.home-template-campaign #hero .btn-get-started { min-width:220px; }
body.home-layout-designed.home-template-campaign #about .row.content { flex-direction:row-reverse; }
body.home-layout-designed.home-template-community #impact { padding-top:60px; }

html[data-theme='dark'] body.home-layout-designed.home-template-simple #about .row.content > div:first-child { background:#1c3026; }
html[data-theme='dark'] body.home-layout-designed.home-template-simple #about :is(h3,p,li) { color:#e8f1eb; }
html[data-theme='dark'] body.home-layout-designed.home-template-editorial .activity-card { background:#232823; border-color:#4b514d; }
html[data-theme='dark'] body.home-layout-designed.home-template-editorial :is(.activity-card-title,.activity-card-summary) { color:#f4efe4; }
@media (max-width:991px) {
  body.home-layout-designed #hero { min-height:560px; padding:118px 0 54px; }
  body.home-layout-designed #hero h1 { font-size:clamp(1.9rem,6.1vw,3rem); }
  body.home-layout-designed.home-template-simple #hero .col-xl-8 { width:100%; max-width:720px; padding-right:12px; }
  body.home-layout-designed.home-template-simple #hero:not(.has-mobile-image):after { inset:0; }
  body.home-layout-designed.home-template-simple #hero:not(.has-mobile-image):before { background:rgba(12,40,29,.78); }
  body.home-layout-designed.home-template-simple #about .row.content > div:last-child,
  body.home-layout-designed.home-template-brand #about .row.content > div:first-child { padding-left:12px; }
  body.home-layout-designed.home-template-campaign #hero .col-xl-8 { width:calc(100% - 24px); margin:0 12px; padding:30px 20px; }
}
@media (max-width:575px) {
  body.home-layout-designed #hero { min-height:520px; }
  body.home-layout-designed #hero h1 { font-size:clamp(1.75rem,7.2vw,2.4rem); }
  body.home-layout-designed.home-template-brand #hero .col-xl-8 { padding:26px 18px; }
  body.home-layout-designed.home-template-editorial #hero { min-height:430px; }
  body.home-layout-designed.home-template-editorial #activities .activity-scroll-track { grid-template-columns:minmax(0,1fr); }
  body.home-layout-designed.home-template-editorial #activities .activity-card-slide:first-child .activity-card { flex-direction:column; }
  body.home-layout-designed.home-template-editorial #activities .activity-card-slide:first-child .activity-card-media { width:100%; flex:auto; }
  body.home-layout-designed.home-template-editorial #activities .activity-card-slide:first-child .activity-card-body { padding:22px; }
  body.home-layout-designed.home-template-editorial #activities .activity-card-slide:first-child .activity-card-title { font-size:1.25rem; }
}
