:root{
  --primary: #437ED6;
  --accent: #F15B43;
  --text: #2F4158;
}

/* Global content section spacing (80–120px target) */
.section-block{ padding-top: 90px; padding-bottom: 90px; }
@media (max-width: 576px){ .section-block{ padding-top: 70px; padding-bottom: 70px; } }

.home-section{
  --home-section-gap: 24px;
  margin-top: var(--home-section-gap);
}
.home-section.section-block{
  padding-top: 45px;
  padding-bottom: 45px;
}
.home-section.home-section--first{ margin-top: 0; }
@media (max-width: 576px){
  .home-section.section-block{
    padding-top: 35px;
    padding-bottom: 35px;
  }
}

.home-cause-card{
  display:flex;
  flex-direction:column;
  height:100%;
  color: var(--text);
  text-decoration: none;
  border: 1px solid rgba(47,65,88,0.12);
  border-radius: 1rem;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 12px 28px rgba(15,23,42,0.08);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.home-cause-card:hover{
  transform: translateY(-3px);
  border-color: rgba(67,126,214,0.22);
  box-shadow: 0 18px 34px rgba(15,23,42,0.1);
}
.home-cause-card:focus-visible{
  outline: 3px solid rgba(67,126,214,0.35);
  outline-offset: 3px;
}
.home-cause-card__media{
  display: block;
  aspect-ratio: 16 / 10;
  background: #eef4fb;
  overflow: hidden;
}
.home-cause-card__media picture,
.home-cause-card__media img{
  width:100%;
  height:100%;
  display:block;
}
.home-cause-card__img{
  width:100%;
  height:100%;
  object-fit:cover;
  transition: transform .35s ease;
}
.home-cause-card:hover .home-cause-card__img{
  transform: scale(1.03);
}
.home-cause-card__media--placeholder{
  background:
    radial-gradient(circle at top right, rgba(255,255,255,0.85), transparent 34%),
    linear-gradient(135deg, rgba(67,126,214,0.14), rgba(241,91,67,0.18));
}
.home-cause-card__placeholder{
  display:flex;
  flex-direction:column;
  justify-content:flex-end;
  min-height:100%;
  padding:1.2rem;
  color: var(--primary);
}
.home-cause-card__eyebrow{
  display:inline-flex;
  width:max-content;
  margin-bottom:auto;
  padding:.35rem .65rem;
  border-radius:999px;
  background: rgba(255,255,255,0.82);
  color: var(--text);
  font-size:.7rem;
  font-weight:700;
  letter-spacing:.08em;
  text-transform:uppercase;
}
.home-cause-card__initial{
  font-size: clamp(2.7rem, 8vw, 4rem);
  font-weight:800;
  line-height:1;
}
.home-cause-card__body{
  display:flex;
  flex-direction:column;
  flex:1;
  min-height: 150px;
  padding:1.2rem 1.25rem 1.15rem;
}
.home-cause-card__title{
  display:block;
  font-size:1.1rem;
  font-weight:700;
  line-height:1.4;
}
.home-cause-card__summary{
  display:-webkit-box;
  margin-top:.7rem;
  color: rgba(47,65,88,0.8);
  font-size:.95rem;
  line-height:1.65;
  overflow:hidden;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}
.home-cause-card__cta{
  display:inline-flex;
  align-items:center;
  gap:.35rem;
  margin-top:auto;
  padding-top:1rem;
  color: var(--primary);
  font-size:.92rem;
  font-weight:700;
}
@media (max-width: 576px){
  .home-cause-card__media,
  .home-cause-card__placeholder{ min-height: 100%; }
  .home-cause-card__body{
    min-height: 140px;
    padding: 1rem;
  }
}

.link-underlined{ text-decoration: underline !important; text-underline-offset: 3px; }
.btn-primary{ background: var(--accent); border-color: var(--accent); }
.btn-outline-primary{ color: var(--primary); border-color: var(--primary); }
.btn-outline-primary:hover{ background: var(--primary); border-color: var(--primary); color:#fff; }
.nav-link{ font-weight: 500; }
.hero{ background-size: cover; background-position: center; }
.rounded-4{ border-radius: 1rem !important; }
.step-num{
  width: 36px; height: 36px; border-radius: 12px;
  display:flex; align-items:center; justify-content:center;
  background: rgba(67,126,214,.12);
  color: var(--primary); font-weight:700;
}
.content img{ max-width:100%; height:auto; border-radius: 12px; }

/* Homepage media frame (How We Work) */
.media-frame{ border-radius: 1rem; overflow: hidden; background: var(--light); min-height: 360px; position: relative; }
.media-frame--gallery-mode,
.media-frame--placeholder-mode{ background: var(--light); border: 1px solid rgba(15,23,42,.08); }
.media-frame--video-mode{ background: #0b1220; }
.media-frame .media-frame-inner{ padding: 10px; }
.media-frame .media-frame-gallery{ column-count: 2; column-gap: 10px; height: 360px; overflow: hidden; }
.media-frame .media-frame-gallery .mf-item{ break-inside: avoid; margin-bottom: 10px; }
.media-frame .media-frame-gallery img{ width: 100%; height: auto; display:block; border-radius: 0.75rem; background:#fff; }
.media-frame .media-frame-grid{ display:grid; grid-template-columns: repeat(2, 1fr); gap: 10px; height: 360px; overflow:hidden; }
.media-frame .media-frame-grid img{ width:100%; height: 170px; object-fit: cover; border-radius: 0.75rem; background:#fff; }
.media-frame .play-badge{ position:absolute; inset:0; display:flex; align-items:center; justify-content:center; background: linear-gradient(180deg, rgba(0,0,0,.15), rgba(0,0,0,.55)); }
.media-frame .play-badge button{ width: 86px; height: 86px; border-radius: 999px; border: 0; background: rgba(255,255,255,.92); display:flex; align-items:center; justify-content:center; box-shadow: 0 12px 30px rgba(0,0,0,.25); }
.media-frame .play-badge button:focus{ outline: 3px solid rgba(255,255,255,.65); outline-offset: 4px; }


/* Gallery styles */
.gallery-grid img{transition:transform .25s ease;}
.gallery-grid .rounded-4{background:#fff;}
.gallery-masonry .col-6:nth-child(3n) img{height:300px !important;}
.gallery-masonry .col-6:nth-child(4n) img{height:180px !important;}

/* True masonry for home/media galleries */
.masonry-grid{column-count:4; column-gap:1rem;}
.masonry-item{break-inside:avoid; margin:0 0 1rem; display:block;}
.masonry-item img{width:100%; height:auto; display:block;}
@media (max-width: 992px){.masonry-grid{column-count:3;}}
@media (max-width: 768px){.masonry-grid{column-count:2;}}
@media (max-width: 480px){.masonry-grid{column-count:1;}}

/* Section text color support */
section[style*="--sec-text"] .text-muted{color: var(--sec-text) !important; opacity:.75;}


/* Impact video trigger */
.impact-stat-card{
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.impact-stat-value{
  color: var(--primary);
  letter-spacing: -0.02em;
}
.impact-stat-card--has-tooltip{
  cursor: help;
}
.impact-stat-card--has-tooltip:hover,
.impact-stat-card--has-tooltip:focus-visible{
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(15,23,42,0.12) !important;
}
.impact-stat-card--has-tooltip:focus-visible{
  outline: 3px solid rgba(67,126,214,0.22);
  outline-offset: 3px;
}

.impact-video-box{
  background-image: radial-gradient(circle at 20% 20%, rgba(0,0,0,0.03), transparent 60%),
                    radial-gradient(circle at 80% 30%, rgba(0,0,0,0.04), transparent 55%);
}
.impact-video-play-btn{
  width: 86px;
  height: 86px;
  border: 0;
  box-shadow: 0 10px 25px rgba(0,0,0,0.15);
  position: relative;
}
.impact-video-play-btn:focus{
  outline: 3px solid rgba(13,110,253,0.35);
  outline-offset: 3px;
}
.impact-play-icon{
  font-size: 34px;
  line-height: 1;
  margin-left: 3px; /* optical centering */
}
@media (prefers-reduced-motion: no-preference){
  .impact-video-play-btn{
    animation: impactPulse 2.2s ease-in-out infinite;
  }
  @keyframes impactPulse{
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.06); }
  }
}

.how-we-work-hero__copy{
  max-width: 960px;
}
.how-we-work-hero__media{
  --how-we-work-hero-height-scale: 1;
  position: relative;
  min-height: 240px;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #f8f9fa;
}
.how-we-work-hero__media-inner{
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
}
.how-we-work-hero__image{
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  transform: scale(var(--how-we-work-hero-height-scale));
  transform-origin: center;
}
.contact-map-pin{
  width: 42px;
  height: 42px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(67,126,214,.12);
  color: var(--primary);
  font-weight: 800;
}
.contact-map-embed iframe,
.contact-map-embed > iframe{
  display:block;
  width:100%;
  min-height:360px;
  border:0;
}
@media (min-width: 992px){
  .how-we-work-hero__media{
    min-height: 420px;
    aspect-ratio: 16 / 9;
  }
}

/* Centralized page title section foundation */
.page-title-section{
  --pts-bg-color: #f8f9fa;
  --pts-text-color: var(--text);
  --pts-subtitle-color: rgba(47,65,88,0.76);
  --pts-overlay-color: transparent;
  --pts-overlay-opacity: 0;
  --pts-min-height: auto;
  position: relative;
  display: flex;
  align-items: center;
  overflow: hidden;
  min-height: var(--pts-min-height);
  background: var(--pts-bg-color);
  color: var(--pts-text-color);
  isolation: isolate;
}
.page-title-section > .container{
  position: relative;
  z-index: 3;
  width: 100%;
}
.page-title-section__media,
.page-title-section__overlay-media,
.page-title-section__overlay{
  position: absolute;
  inset: 0;
}
.page-title-section__media,
.page-title-section__overlay-media{
  z-index: 0;
}
.page-title-section__overlay-media{
  z-index: 1;
  opacity: var(--pts-overlay-opacity);
}
.page-title-section__overlay{
  z-index: 2;
  background: var(--pts-overlay-color);
  opacity: var(--pts-overlay-opacity);
}
.page-title-section__media-image,
.page-title-section__media-video{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.page-title-section__content{
  max-width: 100%;
}
.page-title-section__content--narrow{ max-width: 720px; }
.page-title-section__content--standard{ max-width: 900px; }
.page-title-section__content--wide{ max-width: 1080px; }
.page-title-section__content--full{ max-width: none; }
.page-title-section--align-center .page-title-section__content{
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}
.page-title-section--align-end .page-title-section__content{
  margin-left: auto;
  text-align: right;
}
.page-title-section__eyebrow{
  display: inline-flex;
  margin-bottom: .85rem;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--pts-subtitle-color);
}
.page-title-section__title{
  margin: 0;
  line-height: 1.12;
  font-size: clamp(2rem, 1.45rem + 1.8vw, 3rem);
  color: var(--pts-text-color);
}
.page-title-section__subtitle,
.page-title-section__meta-line{
  max-width: 62ch;
  margin: .85rem 0 0;
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--pts-subtitle-color);
}
.page-title-section__intro{
  max-width: 62ch;
  margin-top: 1rem;
  color: var(--pts-subtitle-color);
}
.page-title-section__intro p:last-child{
  margin-bottom: 0;
}
.page-title-section__actions{
  display: flex;
  gap: .75rem;
  margin-top: 1.4rem;
}
.page-title-section--align-center .page-title-section__actions{
  justify-content: center;
}
.page-title-section--align-end .page-title-section__actions{
  justify-content: flex-end;
}
.page-title-section__detail-head{
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.page-title-section__detail-copy{
  min-width: 0;
}
.page-title-section__back-link{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .7rem 1rem;
  border-radius: .85rem;
  border: 1px solid rgba(47,65,88,0.18);
  color: inherit;
  text-decoration: none;
  background: rgba(255,255,255,0.7);
  transition: background-color .2s ease, border-color .2s ease;
}
.page-title-section__back-link:hover{
  background: rgba(255,255,255,0.9);
  border-color: rgba(47,65,88,0.28);
}
.page-title-section__back-link--light{
  border-color: rgba(255,255,255,0.35);
  background: rgba(255,255,255,0.08);
}
.page-title-section__back-link--light:hover{
  background: rgba(255,255,255,0.16);
  border-color: rgba(255,255,255,0.48);
}
@media (max-width: 768px){
  .page-title-section__detail-head{
    align-items: start;
  }
  .page-title-section__subtitle,
  .page-title-section__meta-line,
  .page-title-section__intro{
    max-width: 100%;
  }
  .page-title-section__actions{
    flex-wrap: wrap;
  }
}

/* Team member profile page */
.team-profile-hero {
  background: linear-gradient(135deg, rgba(var(--bs-primary-rgb), .08), rgba(var(--bs-primary-rgb), .015));
}
.team-profile-photo {
  width: 210px;
  height: 210px;
  border-radius: 50%;
  overflow: hidden;
  background: #fff;
  border: 8px solid #fff;
  box-shadow: 0 1rem 2.5rem rgba(0,0,0,.12);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--bs-primary);
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: .05em;
}
.team-social-btn {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  font-weight: 700;
}
.team-social-icon {
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(var(--bs-primary-rgb), .1);
  font-size: .8rem;
  line-height: 1;
}
.team-profile-content > :last-child {
  margin-bottom: 0;
}
@media (max-width: 767.98px) {
  .team-profile-photo {
    width: 150px;
    height: 150px;
    border-width: 6px;
    font-size: 2.2rem;
  }
}
