

body {
  overflow-x: clip;
}

.hero-strip {
  backdrop-filter: none;
}

.btn-purple {
  background: var(--purple);
  color: var(--white);
}

.btn-purple:hover {
  background: var(--green-dark);
}

/* ---------- Youth empowerment ---------- */

.empowerment-section {
  position: relative;
  overflow: hidden;
  background: var(--tint);
}

.empowerment-icon {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 0.8rem;
  border-radius: 50%;
  background: var(--purple);
  color: var(--white);
  font-family: var(--font-display);
  font-size: 1.05rem;
}

/* ---------- Shared carousel arrows ---------- */

.c-arrow {
  position: absolute;
  z-index: 5;
  top: 50%;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-top: -20px;
  border: 0;
  border-radius: 50%;
  background: var(--purple);
  color: var(--white);
  font-size: 1.2rem;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: background 0.2s, opacity 0.2s;
}

.c-arrow:hover {
  background: var(--green-dark);
}

.c-arrow:disabled {
  opacity: 0.3;
  cursor: default;
}

.c-prev {
  left: 0;
}

.c-next {
  right: 0;
}

/* ---------- Gallery filters ---------- */

.g-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.4rem;
}

.g-filter {
  min-height: 42px;
  padding: 0.4rem 1rem;
  border: 2px solid var(--purple);
  border-radius: 999px;
  background: var(--white);
  color: var(--purple);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.g-filter:hover {
  background: var(--tint);
}

.g-filter[aria-pressed="true"] {
  background: var(--purple);
  color: var(--white);
}

/* ---------- Gallery layout ---------- */

.gallery-wrap {
  position: relative;
  padding-inline: 1.9rem;
}

.gallery-scroller {
  display: grid;
  grid-auto-flow: column;
  grid-template-rows: repeat(2, auto);
  grid-auto-columns: min(58vw, 230px);
  gap: 0.6rem;
  overflow-x: auto;
  padding-bottom: 0.6rem;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
}

.gallery-scroller::-webkit-scrollbar {
  display: none;
}

.g-item {
  position: relative;
  margin: 0;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 12px;
  background: linear-gradient(
    135deg,
    var(--purple),
    var(--green-dark)
  );
  scroll-snap-align: start;
}

.g-item[hidden] {
  display: none;
}

.g-item::before {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 1rem;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.8rem;
  font-weight: 700;
  text-align: center;
  content: "Photo coming soon";
}

.g-item img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  transition: transform 0.5s;
}

.g-item:hover img {
  transform: scale(1.05);
}

.g-item figcaption {
  position: absolute;
  inset: auto 0 0;
  padding: 1.4rem 0.7rem 0.55rem;
  background: linear-gradient(
    transparent,
    rgba(20, 13, 28, 0.82)
  );
  color: var(--white);
  font-size: 0.85rem;
  font-weight: 700;
}

/* ---------- Units page: hero ---------- */

.lead-light {
  color: var(--mint);
  font-size: 1.15rem;
  font-weight: 600;
}

.page-hero {
  padding:
    calc(var(--header-h) + clamp(2.5rem, 6vw, 5rem))
    0
    clamp(2.5rem, 6vw, 4.5rem);
  background: linear-gradient(
    135deg,
    #2b1245,
    var(--purple) 60%,
    var(--green-dark)
  );
  color: var(--white);
}

.page-hero h1 {
  color: var(--white);
}

.page-hero-grid {
  display: grid;
  gap: 2rem;
  align-items: center;
}

.page-hero-grid > * {
  min-width: 0;
}

.page-hero-text p:not(.hero-eyebrow):not(.lead-light) {
  max-width: 40rem;
  color: #efe9f7;
}

.join-steps {
  padding: clamp(1.25rem, 4vw, 2rem);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.1);
}

.join-steps h2 {
  margin-bottom: 1rem;
  color: var(--white);
  font-size: clamp(1.3rem, 1.1rem + 1vw, 1.8rem);
}

.join-steps ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

.join-steps li {
  display: flex;
  gap: 0.9rem;
  padding: 0.8rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
}

.join-steps li > span {
  display: grid;
  flex: 0 0 38px;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--green);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.1rem;
}

.join-steps strong {
  color: var(--white);
}

.join-steps p {
  margin: 0.1rem 0 0;
  color: var(--mint);
  font-size: 0.92rem;
}

/* ---------- Units page: sticky navigation ---------- */

.unit-nav {
  position: sticky;
  top: var(--header-h);
  z-index: 50;
  background: var(--white);
  box-shadow: 0 4px 14px rgba(32, 14, 48, 0.1);
}

.unit-nav-list {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-block: 0.7rem;
  scrollbar-width: none;
}

.unit-nav-list::-webkit-scrollbar {
  display: none;
}

.unit-nav a {
  flex: none;
  padding: 0.45rem 1rem;
  border: 2px solid var(--purple);
  border-radius: 999px;
  color: var(--purple);
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.2s, color 0.2s;
}

.unit-nav a:hover,
.unit-nav a.active {
  background: var(--purple);
  color: var(--white);
}

/* ---------- Units page: unit sections ---------- */

.unit-section {
  scroll-margin-top: calc(var(--header-h) + 60px);
}

.unit-layout {
  display: grid;
  gap: clamp(1.5rem, 4vw, 4rem);
  align-items: center;
}

.unit-layout > * {
  min-width: 0;
}

.unit-num {
  display: block;
  margin-bottom: 0.2rem;
  color: transparent;
  font-family: var(--font-display);
  font-size: clamp(3rem, 2rem + 5vw, 5rem);
  font-weight: 700;
  line-height: 1;
  -webkit-text-stroke: 2px var(--green);
}

.unit-info .lead {
  margin-bottom: 1.2rem;
}

.unit-body p {
  color: var(--muted);
}

.close-line {
  margin: 1.4rem 0 1.2rem;
  padding-left: 1rem;
  border-left: 4px solid var(--green);
  color: var(--purple);
  font-size: 1.1rem;
  font-weight: 700;
}

/* ---------- Units page: photo carousel ---------- */

.stage {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--ink);
  box-shadow: 0 18px 40px rgba(32, 14, 48, 0.18);
}

.stage .c-track {
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
}

.stage .c-track::-webkit-scrollbar {
  display: none;
}

.stage-slide {
  position: relative;
  flex: 0 0 100%;
  margin: 0;
  aspect-ratio: 4 / 3;
  background: linear-gradient(
    135deg,
    var(--purple),
    var(--green-dark)
  );
  scroll-snap-align: center;
}

.stage-slide::before {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.8);
  font-family: var(--font-display);
  font-size: 1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  content: "Photo coming soon";
}

.stage-slide img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
}

.stage-slide figcaption {
  position: absolute;
  inset: auto 0 0;
  padding: 2rem 1rem 0.8rem;
  background: linear-gradient(
    transparent,
    rgba(20, 13, 28, 0.8)
  );
  color: var(--white);
  font-weight: 700;
}

/* Logo slides: show the complete logo without cropping */

.stage-slide.logo-slide {
  background: radial-gradient(
    circle at 50% 40%,
    var(--white),
    var(--tint)
  );
}

.stage-slide.logo-slide::before {
  display: none;
}

.stage-slide.logo-slide img {
  padding: 9% 9% 14%;
  object-fit: contain;
  object-position: center;
}

.stage-slide.logo-slide figcaption {
  background: none;
  color: var(--purple);
  text-align: center;
}

.stage .c-prev {
  left: 0.7rem;
}

.stage .c-next {
  right: 0.7rem;
}

.stage .c-arrow {
  background: rgba(91, 42, 134, 0.92);
}

.stage .c-arrow:hover {
  background: var(--green-dark);
}

.stage-count {
  position: absolute;
  z-index: 4;
  top: 0.8rem;
  right: 0.8rem;
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  background: rgba(20, 13, 28, 0.7);
  color: var(--white);
  font-size: 0.8rem;
  font-weight: 700;
}

/* ---------- Units page: closing section ---------- */

.cta-section {
  background: linear-gradient(135deg, var(--ink), #2b1245);
  color: var(--mint);
}

.cta-section h2 {
  color: var(--white);
}

.cta-end {
  max-width: 46rem;
}

.cta-end p {
  color: var(--mint);
}

.cta-end .btn-row {
  margin-top: 1.5rem;
}

/* ========================================
   RESPONSIVE DESIGN
======================================== */

/* Small screens: gallery and unit page */

@media (min-width: 600px) {
  .gallery-wrap {
    padding-inline: 2.6rem;
  }

  .c-arrow {
    width: 44px;
    height: 44px;
    margin-top: -22px;
  }
}

@media (min-width: 700px) {
  .gallery-scroller {
    grid-auto-columns: 260px;
    gap: 1rem;
  }
}

@media (min-width: 900px) {
  .page-hero-grid {
    grid-template-columns: 1.25fr 0.75fr;
    gap: 3.5rem;
  }

  .unit-layout {
    grid-template-columns: 1fr 1fr;
  }

  .unit-layout.flip .stage {
    order: -1;
  }
}

@media (min-width: 1100px) {
  .gallery-scroller {
    grid-auto-columns: 290px;
  }
}

/* Phone layout: two cards per row */

@media (max-width: 599px) {
  /* Give and Support, This Week, and other .grid-3 cards */

  .grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
  }

  .grid-3 > .card:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }

  .card {
    padding: 1rem 0.9rem;
  }

  .card h3 {
    font-size: clamp(1rem, 4.2vw, 1.2rem);
  }

  .card p {
    font-size: clamp(0.82rem, 3.6vw, 0.95rem);
    line-height: 1.5;
  }

  /* Contact cards */

  .contact-card {
    padding: 1rem 0.9rem;
  }

  .contact-card strong {
    font-size: clamp(1rem, 4.2vw, 1.2rem);
    line-height: 1.2;
  }

  .contact-card span {
    font-size: clamp(0.82rem, 3.5vw, 0.95rem);
  }

  .contact-card:nth-child(1) {
    order: 1;
  }

  .contact-card:nth-child(3) {
    order: 2;
  }

  .contact-card:nth-child(2) {
    order: 3;
    grid-column: 1 / -1;
  }

  .contact-card:nth-child(4) {
    order: 4;
  }

  .contact-card:nth-child(5) {
    order: 5;
  }

  /* Youth empowerment cards */

  .empowerment-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
  }

  .empowerment-cards > .empowerment-card:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }

  .empowerment-card {
    padding: 1rem 0.9rem;
  }

  .empowerment-card h3 {
    font-size: clamp(1rem, 4.2vw, 1.2rem);
  }

  .empowerment-card p {
    margin-bottom: 0;
    font-size: clamp(0.82rem, 3.6vw, 0.95rem);
    line-height: 1.5;
  }

  .empowerment-icon {
    width: 38px;
    height: 38px;
    margin-bottom: 0.6rem;
    font-size: 0.95rem;
  }

  /* About: motto and life together */

  .pillars {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem;
  }

  .pillars > div {
    padding-left: 0.8rem;
  }

  .pillars h3 {
    font-size: clamp(0.95rem, 4vw, 1.1rem);
  }

  .pillars p {
    font-size: clamp(0.82rem, 3.5vw, 0.95rem);
    line-height: 1.5;
  }

  /* Visit: labels and details side by side */

  .info-list li {
    flex-direction: row;
    gap: 0.9rem;
  }

  .info-list strong {
    flex: 0 0 4.8rem;
    font-size: 0.95rem;
  }

  .info-list span {
    font-size: clamp(0.85rem, 3.6vw, 0.95rem);
  }
}
