/* ============================================
   CYF - Create Your Future
   Main Stylesheet
   ============================================ */

:root {
  --gold:      #b8a16a;
  --gold-dark: #8a7340;
  --navy:      #050505;
  --navy-mid:  #050505;
  --dark:      #050505;
  --dark-rgb:  5, 5, 5;
  --text:      #333333;
  --text-light:#666666;
  --white:     #ffffff;
  --off-white: #f8f6f2;
  --border:    #e0d9ce;
  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-sans:  'Jost', sans-serif;
  --font-thai:  'Sarabun', 'Jost', sans-serif;
  --transition: 0.3s ease;
  --shadow:     0 4px 30px rgba(0,0,0,0.10);
  --shadow-hover: 0 8px 40px rgba(0,0,0,0.18);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--white);
  line-height: 1.7;
  overflow-x: hidden;
}

/* Thai language: use Sarabun for body text, serif still uses Cormorant for headings that look better as latin-only,
   but Thai headings get Sarabun too since Cormorant doesn't have Thai glyphs */
body.lang-th {
  font-family: var(--font-thai);
}
body.lang-th h1,
body.lang-th h2,
body.lang-th h3,
body.lang-th h4,
body.lang-th h5,
body.lang-th h6,
body.lang-th .hero-text h1,
body.lang-th .page-hero-content h1,
body.lang-th .pillar-card h3,
body.lang-th .gallery-section h2,
body.lang-th .section-title-block h2,
body.lang-th .trustee-card h3,
body.lang-th .news-card-body h3,
body.lang-th .partner-card h3,
body.lang-th .letter-card .student-name,
body.lang-th .help-form-card h3,
body.lang-th .newsletter-inner h3,
body.lang-th .video-cta {
  font-family: var(--font-thai);
  font-weight: 600;
  line-height: 1.4;
}

img { max-width: 100%; height: auto; display: block; }

a { color: inherit; text-decoration: none; transition: color var(--transition); }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* ---- HEADER WRAPPER (overlay on hero, fades to solid on scroll) ---- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  overflow:visible;
  /* Background is controlled via JS scroll opacity --hdr-bg */
  background: rgba(var(--dark-rgb), var(--hdr-bg, 0));
  backdrop-filter: blur(var(--hdr-blur, 0px));
  -webkit-backdrop-filter: blur(var(--hdr-blur, 0px));
  border-bottom: 1px solid rgba(255,255,255, var(--hdr-border, 0));
  transition: background 0.2s linear, backdrop-filter 0.2s linear, border-color 0.2s linear;
}

.cyf-featured-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}
.cyf-featured {
  grid-column: 3;   /* aligns with the "second item" column below */
  max-width: 90%;
  justify-self: center;
}

@media (max-width: 1024px) {
  .cyf-featured-row { grid-template-columns: repeat(2, 1fr); }
  .cyf-featured { grid-column: 2; }
}
@media (max-width: 600px) {
  .cyf-featured-row { grid-template-columns: 1fr; }
  .cyf-featured { grid-column: 1; }
}

/* ---- TOP BAR ---- */
.topbar {
  color: rgba(255,255,255,0.85);
  font-size: 0.78rem;
  font-family: var(--font-sans);
  letter-spacing: 0.04em;
  background: transparent;
  overflow: hidden;
  max-height: 60px;
  opacity: 1;
  transition: max-height 0.35s ease, opacity 0.25s ease, padding 0.35s ease;
}
.site-header.shrunk .topbar {
  max-height: 0;
  opacity: 0;
  pointer-events: none;
}
.topbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.5rem 2rem;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 2rem;
  transition: padding 0.35s ease;
}
.site-header.shrunk .topbar-inner { padding-top: 0; padding-bottom: 0; }
.lang-link, .topbar-email {
  display: inline-block;
  padding: 0.35rem 0.95rem;
  border: 1px solid rgba(255,255,255,0.35);
  border-radius: 999px;
  color: rgba(255,255,255,0.9);
  font-weight: 500;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
}
.lang-link:hover, .topbar-email:hover {
  background: rgba(255,255,255,0.12);
  border-color: var(--gold);
  color: var(--gold);
}

/* ---- NAVBAR ---- */
.navbar {
  background: transparent;
  transition: box-shadow var(--transition);
}
.site-header.scrolled { box-shadow: 0 2px 20px rgba(0,0,0,0.25); }

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.5rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  transition: padding 0.35s ease;
  position: relative;
}
.site-header.shrunk .nav-inner { padding-top: 0.35rem; padding-bottom: 0.35rem; }
.nav-logo {
  display: flex;
  align-items: center;
  max-height: 32px;       /* limit how much vertical space the logo claims in the bar */
  overflow: visible;       /* allow the actual image to spill outside */
  line-height: 0;
}
.nav-logo img {
  height: 72px;            /* the big visible size */
  width: auto;
  transition: height 0.35s ease;
  display: block;
}
.site-header.shrunk .nav-logo { max-height: 30px; }
.site-header.shrunk .nav-logo img { height: 46px; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  width: 26px;
  height: 2px;
  background: var(--white);
  transition: var(--transition);
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-list {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.2rem;
}
.nav-item { position: relative; }

.nav-link {
  display: block;
  padding: 0.5rem 0.9rem;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: lowercase;
  color: var(--white);
  text-shadow: 0 1px 4px rgba(0,0,0,0.25);
  transition: color var(--transition), text-shadow var(--transition);
  border-radius: 4px;
  transition: var(--transition);
}
.nav-link:hover, .nav-item.active > .nav-link { color: var(--gold); }

/* When header is scrolled (solid bg), drop the text-shadow */
.site-header.scrolled .nav-link {
  text-shadow: none;
}

.nav-link.nav-highlight {
  background: var(--gold);
  color: var(--white);
  padding: 0.5rem 1.2rem;
  border-radius: 100px;
  font-weight: 600;
}
.nav-link.nav-highlight:hover {
  background: var(--gold-dark);
  color: var(--white);
}
body.help .nav-link.nav-highlight {
  background: var(--white);
  color: var(--gold);
}
body.help .nav-link.nav-highlight:hover {
  background: rgba(255,255,255,0.85);
  color: var(--gold);
}

/* Dropdown */
.dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--white);
  border: 1px solid var(--border);
  border-top: 2px solid var(--gold);
  list-style: none;
  min-width: 200px;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all var(--transition);
  z-index: 300;
}
.has-dropdown:hover .dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.dropdown li a {
  display: block;
  padding: 0.6rem 1.2rem;
  font-size: 0.8rem;
  color: var(--text);
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--border);
}
.dropdown li:last-child a { border-bottom: none; }
.dropdown li a:hover { background: var(--off-white); color: var(--gold); }

/* ---- HERO ---- */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.hero-overlay {
  display: none;
}
.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1200px;
  margin: 0 auto;
  padding: 6rem 2rem 4rem;
  width: 100%;
}
.hero-text {
  max-width: 580px;
  animation: fadeUp 1s ease forwards;
}
.hero-text h1 {
  font-family: var(--font-serif);
  font-size: clamp(2.6rem, 5.5vw, 4.2rem);
  font-weight: 700;
  color: var(--white);
  line-height: 1.18;
  margin-bottom: 1.2rem;
  letter-spacing: 0.01em;
}
.hero-text h1 .accent { color: var(--white); font-weight: 700; }
.hero-text p {
  font-size: clamp(1rem, 1.8vw, 1.15rem);
  color: rgba(255,255,255,0.82);
  font-weight: 300;
  line-height: 1.8;
  letter-spacing: 0.03em;
}
.hero-scroll-hint {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
}
.hero-scroll-hint span {
  display: block;
  width: 1px;
  height: 56px;
  background: linear-gradient(to bottom, transparent, rgba(255,255,255,0.6));
  animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(40px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes scrollPulse {
  0%, 100% { opacity: 0.5; transform: scaleY(0.8); }
  50%       { opacity: 1;   transform: scaleY(1); }
}

/* ---- VIDEO SECTION ---- */
.video-section {
  background: transparent;
  padding: 5rem 0 5rem;
}
.video-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3.5rem;
  align-items: center;
}

/* LEFT: inline YouTube iframe */
.video-col { display: flex; flex-direction: column; gap: 0.8rem; }
.video-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow-hover);
  background: #000;
}
.video-wrapper iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.video-youtube-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  align-self: flex-end;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  color: var(--white);
  text-decoration: none;
  transition: color var(--transition);
}
.video-youtube-link svg { width: 20px; height: 20px; color: #ff0000; }
.video-youtube-link:hover { color: var(--gold); }

/* RIGHT: heading + vertical pillar list */
.pillars-col {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.video-cta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-family: var(--font-serif);
  font-size: clamp(1.4rem, 2.2vw, 1.9rem);
  color: var(--white);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0.02em;
  margin-bottom: 0.5rem;
}
.arrow-icon { height: 32px; width: auto; flex-shrink: 0; }

.pillars-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
}
.pillar-item {
  display: flex;
  gap: 1.1rem;
  align-items: flex-start;
}
.pillar-icon-img {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  object-fit: contain;
}
.pillar-text h3 {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 0.25rem;
  line-height: 1.2;
}
.pillar-text p {
  font-size: 0.92rem;
  line-height: 1.65;
  color: rgba(255,255,255,0.9);
  margin: 0;
}

@media (max-width: 900px) {
  .video-row { grid-template-columns: 1fr; gap: 2.5rem; }
  .video-cta { font-size: 1.3rem; }
}
@media (max-width: 480px) {
  .pillar-item { gap: 0.8rem; }
  .pillar-icon-img { width: 44px; height: 44px; }
  .pillar-text h3 { font-size: 1.1rem; }
}

/* ---- PILLARS ---- */
.pillars-section {
  padding: 6rem 0;
  background: transparent;
}
.pillars-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3rem;
}
.pillar-card {
  text-align: center;
  padding: 2.5rem 1.5rem;
  border-radius: 8px;
  transition: transform var(--transition), box-shadow var(--transition);
  opacity: 0;
  animation: fadeUp 0.8s ease forwards;
}
.pillar-card:nth-child(1) { animation-delay: 0s; }
.pillar-card:nth-child(2) { animation-delay: 0.15s; }
.pillar-card:nth-child(3) { animation-delay: 0.3s; }
.pillar-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
}
.pillar-icon { margin-bottom: 1.5rem; }
.pillar-icon img { height: 64px; width: auto; margin: 0 auto; }
.pillar-card h3 {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 1rem;
}
.pillar-card p { color: var(--text-light); font-size: 0.95rem; line-height: 1.8; }

/* ---- FUTURES SECTION ---- */
.futures-section { padding: 4rem 0 5rem; background: transparent; }
.futures-header {
  max-width: 1200px;
  margin: 0 auto 3rem;
  padding: 0 2rem;
}
.section-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.4rem;
}

.story-row {
  max-width: 1200px;
  margin: 0 auto 5rem;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}
.story-row.story-left { direction: rtl; }
.story-row.story-left > * { direction: ltr; }

.story-photo { }
.story-photo img { width: 100%; height: auto; object-fit: contain; display: block; }

.story-content { }
.story-profile {
  height: 60px;
  width: auto;
  margin-bottom: 1.2rem;
}
.story-content p {
  font-size: 0.97rem;
  line-height: 1.9;
  color: var(--text-light);
}

/* ---- GALLERY ---- */
.gallery-section {
  background: transparent;
  padding: 5rem 2rem;
  text-align: center;
}
.gallery-section h2 {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 400;
  color: var(--navy);
  margin-bottom: 2.5rem;
  letter-spacing: 0.02em;
}
.gallery-img-wrap { max-width: 1100px; margin: 0 auto; }

/* ---- STATS ---- */
.stats-section {
  position: relative;
  background-color: var(--dark);
  color: var(--white);
  display: block;
  overflow: hidden;
}

/* Background image: shows full image, never cropped */
.stats-bg {
  display: block;
  width: 100%;
  line-height: 0;
}
.stats-bg img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

/* Overlay removed — image shown without darkening */
.stats-overlay {
  display: none;
}

/* Content layer */
.stats-content {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}

.stats-header {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.1rem;
  margin-bottom: 2.5rem;
  font-size: 0.95rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--dark);
}
.stats-header img { height: 64px; width: auto; filter: none; }
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  text-align: center;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
}
.stat-card { padding: 1rem; }
.stat-card img { height: 50px; width: auto; margin: 0 auto 1rem; filter: none; }
.stat-number {
  font-family: var(--font-serif);
  font-size: clamp(2.2rem, 4vw, 3.4rem);
  font-weight: 800;
  color: var(--dark);
  line-height: 1;
  margin-bottom: 0.4rem;
}
.stat-label {
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dark);
  font-weight: 500;
}

/* On narrower screens, the image is too short for the content to fit absolutely
   positioned. Stack normally so nothing gets cut off. */
@media (max-width: 768px) {
  .stats-bg { display: block; position: absolute; inset: 0; height: 100%; }
  .stats-bg img { height: 100%; object-fit: cover; }
  .stats-content {
    position: relative;
    inset: auto;
    padding: 4rem 1rem;
  }
  .stats-grid { grid-template-columns: 1fr; gap: 2rem; }
  .stat-card img { height: 60px; margin-bottom: 1.2rem; }
}

/* ---- NEWSLETTER ---- */
.newsletter-section {
  position: relative;
  background-color: var(--dark);
  display: block;
  margin-top: -2px;  /* pull up to eliminate the seam line between stats image and newsletter image */
  overflow: hidden;
}

/* The <picture>/<img> sits behind everything and shows the entire image
   at the section's full width with natural height (no cropping). */
.newsletter-bg {
  display: block;
  width: 100%;
  line-height: 0;
}
.newsletter-bg img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

/* Overlay removed — image shown without darkening */
.newsletter-overlay {
  display: none;
}

/* Content sits over both image and overlay */
.newsletter-section > .container {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}
.newsletter-inner {
  text-align: center;
  max-width: 560px;
  margin: 0 auto;
  color: var(--white);
}
.send-icon { height: 48px; margin: 0 auto 1.5rem; filter: brightness(0) invert(1); }
.newsletter-inner h3 {
  font-family: var(--font-serif);
  font-size: clamp(1.4rem, 2.6vw, 1.9rem);
  font-weight: 600;
  color: var(--white);
  margin-bottom: 1.5rem;
  letter-spacing: 0.03em;
}
.newsletter-inner .contact-email { color: rgba(255,255,255,0.75); margin-top: 1rem; }
.newsletter-inner .contact-email a { color: var(--white); }
.newsletter-inner .contact-email a:hover { color: var(--gold); }
.newsletter-form, .footer-form {
  display: flex;
  gap: 0.5rem;
  max-width: 460px;
  margin: 0 auto 1.2rem;
}
.newsletter-form input, .footer-form input {
  flex: 1;
  padding: 0.8rem 1.2rem;
  border: 1px solid var(--border);
  border-radius: 4px 0 0 4px;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  outline: none;
  background: var(--white);
  transition: border-color var(--transition);
}
.newsletter-form input:focus, .footer-form input:focus { border-color: var(--gold); }
.newsletter-form button, .footer-form button {
  padding: 0.8rem 1.5rem;
  background: var(--gold);
  color: var(--white);
  border: none;
  border-radius: 0 4px 4px 0;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background var(--transition);
}
.newsletter-form button:hover, .footer-form button:hover { background: var(--gold-dark); }
.contact-email { font-size: 0.9rem; color: var(--text-light); }
.contact-email a:hover { color: var(--gold); }

/* ---- FOOTER ---- */
.site-footer { background: #282828; color: rgba(255,255,255,0.75); }
.footer-top {
  max-width: 1200px;
  margin: 0 auto;
  padding: 4rem 2rem;
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1.5fr;
  gap: 3rem;
}
.footer-logo { height: 48px; margin-bottom: 1.2rem; }
.footer-brand p { font-size: 0.8rem; color: rgba(255,255,255,0.45); margin-top: 1.2rem; }

.footer-social {
  display: flex;
  gap: 0.6rem;
  margin-top: 1.5rem;
}
.social-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 50%;
  color: rgba(255,255,255,0.6);
  transition: var(--transition);
}
.social-btn svg { width: 16px; height: 16px; }
.social-btn:hover { border-color: var(--gold); color: var(--gold); }

.footer-col h4 {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.2rem;
}
.footer-nav ul { list-style: none; }
.footer-nav li { margin-bottom: 0.5rem; }
.footer-nav a {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.6);
  transition: color var(--transition);
}
.footer-nav a:hover { color: var(--gold); }
.footer-contact p, .footer-contact address {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.6);
  font-style: normal;
  line-height: 1.8;
}
.footer-contact a:hover { color: var(--gold); }
.footer-subscribe p { font-size: 0.85rem; color: rgba(255,255,255,0.6); margin-bottom: 1rem; }
.footer-form input { background: rgba(255,255,255,0.07); border-color: rgba(255,255,255,0.15); color: var(--white); }
.footer-form input::placeholder { color: rgba(255,255,255,0.35); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  text-align: center;
  padding: 1.5rem 2rem;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.5);
}

/* ---- PAGE HEADER (inner pages) ---- */
.page-hero {
  position: relative;
  min-height: 50vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.page-hero .hero-bg, .page-hero .hero-img, .page-hero .hero-overlay { position: absolute; inset: 0; }
.page-hero .hero-img { width: 100%; height: 100%; object-fit: cover; }
.page-hero .hero-overlay { display: none; }
.page-hero-content {
  position: relative;
  z-index: 2;
  max-width: 1200px;
  margin: 0 auto;
  padding: 5rem 2rem 3rem;
  width: 100%;
}
.page-hero-content h1 {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 300;
  color: var(--white);
  line-height: 1.25;
  margin-bottom: 0.8rem;
}
.page-hero-content h1 .accent { color: var(--gold); font-weight: 600; }
.page-hero-content p {
  font-size: 1.05rem;
  color: rgba(255,255,255,0.8);
  max-width: 600px;
  line-height: 1.75;
}

/* ---- ABOUT PAGE ---- */
.philosophy-section { padding: 6rem 0; }
.section-title-block { margin-bottom: 3rem; }
.section-title-block h2 {
  font-family: var(--font-serif);
  font-size: 2.2rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 1rem;
}
.philosophy-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: start;
}
.philosophy-text ol { padding-left: 1.4rem; }
.philosophy-text ol li { margin-bottom: 1rem; line-height: 1.8; color: var(--text-light); }
.philosophy-image img { }

.history-section { background: var(--off-white); padding: 6rem 0; }
.history-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 3rem;
  align-items: start;
}
.history-block p { font-size: 0.95rem; line-height: 1.85; color: var(--text-light); }
.history-block img { margin-bottom: 1.5rem; }

.trustees-section { padding: 6rem 0; }
.trustees-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 3rem;
}
.trustee-card { text-align: center; }
.trustee-card img {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 1.2rem;
}
.trustee-card h3 { font-family: var(--font-serif); font-size: 1.2rem; color: var(--navy); margin-bottom: 0.2rem; }
.trustee-card .role { font-size: 0.8rem; color: var(--gold); letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 1rem; }
.trustee-card p { font-size: 0.87rem; color: var(--text-light); line-height: 1.8; font-style: italic; }

/* ---- NEWS PAGE ---- */
.news-section { padding: 5rem 0; }
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2.5rem;
}
.news-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
}
.news-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.news-card-img img { width: 100%; height: 220px; object-fit: cover; }
.news-card-body { padding: 1.5rem; }
.news-card-date { font-size: 0.78rem; color: var(--gold); letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 0.5rem; }
.news-card-body h3 { font-family: var(--font-serif); font-size: 1.3rem; color: var(--navy); margin-bottom: 0.8rem; }
.news-card-body p { font-size: 0.9rem; color: var(--text-light); line-height: 1.75; }
.read-more {
  display: inline-block;
  margin-top: 1rem;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
  border-bottom: 1px solid var(--gold);
  padding-bottom: 2px;
  transition: var(--transition);
}
.read-more:hover { color: var(--gold-dark); border-color: var(--gold-dark); }

/* ---- HOW TO APPLY ---- */
.apply-page-bg {
  background-color: #2a2a2a;
  background-image: url('/assets/images/main-bg-768x601.jpg');
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
}
@media (min-width: 769px)  { .apply-page-bg { background-image: url('/assets/images/main-bg-1024x801.jpg'); } }
@media (min-width: 1025px) { .apply-page-bg { background-image: url('/assets/images/main-bg.jpg'); } }
.apply-section { padding: 8rem 0 6rem; background: transparent; }
.apply-page-header { text-align: center; max-width: 860px; margin: 0 auto 3rem; }
.apply-page-header h1 { font-family: var(--font-serif); font-size: clamp(2rem, 4vw, 3rem); font-weight: 700; color: #fff; margin-bottom: 1.2rem; }
.apply-page-header p { font-size: 1rem; color: rgba(255,255,255,0.88); line-height: 1.9; }
.apply-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: start;
}
.apply-steps { counter-reset: steps; }
.step {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
  align-items: flex-start;
}
.step-num {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  background: var(--gold);
  color: var(--white);
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 700;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.step-text h4 { font-family: var(--font-serif); font-size: 1.2rem; color: var(--navy); margin-bottom: 0.4rem; }
.step-text p { font-size: 0.9rem; color: var(--text-light); line-height: 1.8; }

/* ---- PARTNER ORGS ---- */
.partners-section { padding: 6rem 0; }
.partners-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2.5rem;
}
.partner-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2rem;
  transition: transform var(--transition), box-shadow var(--transition);
}
.partner-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.partner-card h3 { font-family: var(--font-serif); font-size: 1.2rem; color: var(--navy); margin-bottom: 0.8rem; }
.partner-card p { font-size: 0.9rem; color: var(--text-light); line-height: 1.8; }

/* ---- I WANT TO HELP ---- */
.help-page-bg {
  background-color: #2a2a2a;
  background-image: url('/assets/images/home-sec2-bg-768x368.jpg');
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
}
@media (min-width: 769px)  { .help-page-bg { background-image: url('/assets/images/home-sec2-bg-1024x491.jpg'); } }
@media (min-width: 1025px) { .help-page-bg { background-image: url('/assets/images/home-sec2-bg.jpg'); } }

.help-section { padding: 8rem 0 6rem; background: transparent; }

.help-page-header { max-width: 860px; margin: 0 auto 3.5rem; text-align: center; }
.help-page-header h1 {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  color: #fff;
  margin-bottom: 1.2rem;
}
.help-page-header p { font-size: 1rem; color: rgba(255,255,255,0.88); line-height: 1.9; }

.help-form-wrap { max-width: 620px; margin: 0 auto; }
.form-row { margin-bottom: 1.2rem; }
.form-row label { display: block; font-size: 0.82rem; font-weight: 500; color: #fff; margin-bottom: 0.4rem; letter-spacing: 0.04em; }
.form-row input, .form-row textarea, .form-row select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 4px;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  outline: none;
  transition: border-color var(--transition);
  background: rgba(255,255,255,0.12);
  color: #fff;
}
.form-row input::placeholder, .form-row textarea::placeholder { color: rgba(255,255,255,0.45); }
.form-row input:focus, .form-row textarea:focus { border-color: var(--gold); background: rgba(255,255,255,0.18); }
.form-row textarea { min-height: 120px; resize: vertical; }
.btn-primary {
  display: inline-block;
  padding: 0.9rem 2.5rem;
  background: var(--gold);
  color: var(--white);
  border: none;
  border-radius: 4px;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background var(--transition);
}
.btn-primary:hover { background: var(--gold-dark); }

/* ---- PARTNER ORGANISATIONS ---- */
.partners-page-bg {
  background-color: #1a1a1a;
  background-image: url('/assets/images/future-bg-502x1024.jpg');
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
}
@media (min-width: 480px)  { .partners-page-bg { background-image: url('/assets/images/future-bg-768x1568.jpg'); } }
@media (min-width: 769px)  { .partners-page-bg { background-image: url('/assets/images/future-bg-1003x2048.jpg'); } }
@media (min-width: 1200px) { .partners-page-bg { background-image: url('/assets/images/future-bg-scaled.jpg'); } }

/* Grid: title cell + 4 polaroid cards */
.partners-section { padding: 8rem 0 5rem; }
.partners-outer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  align-items: start;
}
.partners-title-cell {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 1rem 0.5rem;
}
.partners-title-label {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.75);
  margin-bottom: 0.4rem;
}
.partners-title-heading {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 2.5vw, 2.2rem);
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
}

/* Polaroid cards */
.partner-polaroid {
  display: block;
  text-decoration: none;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.partner-polaroid:hover { transform: translateY(-6px) scale(1.02); }
.partner-polaroid-img { overflow: hidden; aspect-ratio: 3/4; }
.partner-polaroid-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.4s ease; }
.partner-polaroid:hover .partner-polaroid-img img { transform: scale(1.05); }

/* Words from partner organizations */
.partner-words-section { padding: 3rem 0 6rem; }
.partner-words-label {
  color: #fff !important;
  font-weight: 700;
  margin-bottom: 3.5rem;
}
.partner-words-entry {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  margin-bottom: 5rem;
}
.partner-words-entry:last-child { margin-bottom: 0; }
.partner-words-entry--reverse .partner-words-text { order: 2; }
.partner-words-entry--reverse .partner-words-img  { order: 1; }
.partner-words-quote {
  font-size: 1rem;
  color: #fff;
  line-height: 1.9;
  margin-bottom: 1.2rem;
}
.partner-words-author {
  font-size: 0.85rem;
  color: #fff;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.partner-words-img img {
  width: 100%;
  height: auto;
  display: block;
}

/* Partner detail page */
.pdetail-hero {
  position: relative;
  width: 100%;
  overflow: hidden;
  max-height: 480px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pdetail-hero img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pdetail-hero-text {
  position: absolute;
  text-align: center;
  padding: 0 2rem;
}
.pdetail-hero-text h1 {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.5rem;
  line-height: 1.2;
  text-shadow: 0 2px 12px rgba(0,0,0,0.6);
}
.pdetail-hero-text p {
  font-size: clamp(0.95rem, 1.8vw, 1.15rem);
  font-weight: 400;
  color: rgba(255,255,255,0.95);
  line-height: 1.5;
  text-shadow: 0 1px 8px rgba(0,0,0,0.5);
}

.pdetail-section { padding: 4rem 0 6rem; }
.pdetail-container { max-width: 1200px; margin: 0 auto; padding: 0 2rem; }

.pdetail-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 3.5rem;
  align-items: start;
}

.pdetail-title { font-family: var(--font-serif); font-size: clamp(1.6rem, 3vw, 2.4rem); font-weight: 700; color: #fff; margin-bottom: 1.5rem; line-height: 1.3; }
.pdetail-body p { font-size: 1rem; color: rgba(255,255,255,0.9); line-height: 1.9; margin-bottom: 1.3rem; }

.pdetail-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; margin-top: 2.5rem; }
.pdetail-gallery-item { border-radius: 4px; overflow: hidden; aspect-ratio: 4/3; }
.pdetail-gallery-item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.3s ease; }
.pdetail-gallery-item:hover img { transform: scale(1.05); }

/* Student testimonials */
.pdetail-testimonials { margin-top: 3rem; }
.pdetail-testimonial {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 2rem;
  margin-bottom: 3rem;
  align-items: start;
}
.pdetail-testimonial:last-child { margin-bottom: 0; }
.pdetail-testimonial-img img { width: 100%; height: auto; display: block; border-radius: 4px; }
.pdetail-testimonial-text h4 { font-family: var(--font-serif); font-size: 1.1rem; font-weight: 700; color: #fff; margin-bottom: 0.8rem; }
.pdetail-testimonial-text p { font-size: 0.95rem; color: rgba(255,255,255,0.88); line-height: 1.85; margin-bottom: 0.8rem; }

/* Sidebar */
.pdetail-sidebar-box {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 8px;
  overflow: hidden;
  position: sticky;
  top: 100px;
}
.pdetail-sidebar-item {
  padding: 1.1rem 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.pdetail-sidebar-label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; color: #fff; font-weight: 600; }
.pdetail-sidebar-value { font-size: 0.9rem; color: rgba(255,255,255,0.85); line-height: 1.4; }
.pdetail-sidebar-link { font-size: 0.9rem; color: rgba(255,255,255,0.85); text-decoration: none; word-break: break-all; }
.pdetail-sidebar-link:hover { color: #fff; }

/* SET Foundation video section */
.pdetail-video-section {
  margin-top: 3rem;
  margin-bottom: 3rem;
}
.pdetail-video-row {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 3rem;
  align-items: center;
}
.pdetail-video-col .video-wrapper { border-radius: 6px; overflow: hidden; }
.pdetail-video-text h3 {
  font-family: var(--font-serif);
  font-size: clamp(1.2rem, 2vw, 1.6rem);
  font-weight: 700;
  color: #fff;
  margin-bottom: 1rem;
  line-height: 1.35;
}
.pdetail-video-text p { font-size: 1rem; color: rgba(255,255,255,0.88); line-height: 1.85; }
@media (max-width: 768px) {
  .pdetail-video-row { grid-template-columns: 1fr; gap: 2rem; }
}

/* Force all text white on partners listing page */
.partners-page-bg .section-label { color: #fff; }
.partners-title-label { color: rgba(255,255,255,0.75); }
.partners-title-heading { color: #fff; }

.partner-back-btn { display: inline-flex; align-items: center; margin-top: 3rem; padding: 0.6rem 1.5rem; background: var(--gold); color: #fff; border-radius: 999px; font-size: 0.85rem; font-weight: 600; text-decoration: none; transition: background var(--transition); }
.partner-back-btn:hover { background: var(--gold-dark); }

@media (max-width: 768px) {
  .pdetail-layout { grid-template-columns: 1fr; }
  .pdetail-sidebar { order: -1; }
  .pdetail-sidebar-box { position: static; }
  .pdetail-testimonial { grid-template-columns: 140px 1fr; gap: 1.2rem; }
}

@media (max-width: 1024px) {
  .partners-outer-grid { grid-template-columns: repeat(2, 1fr); }
  .partner-words-entry { grid-template-columns: 1fr; gap: 2rem; }
  .partner-words-entry--reverse .partner-words-text { order: 1; }
  .partner-words-entry--reverse .partner-words-img  { order: 2; }
}
@media (max-width: 600px) {
  .partners-outer-grid { grid-template-columns: 1fr 1fr; }
}

/* ---- STUDENT LETTERS PAGE ---- */
.letters-page {
  background-color: #5c5050;
  background-image: url('/assets/images/main-bg-300x235.jpg');
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  padding: 5rem 0 6rem;
}
@media (min-width: 480px) {
  .letters-page { background-image: url('/assets/images/main-bg-768x601.jpg'); }
}
@media (min-width: 769px) {
  .letters-page { background-image: url('/assets/images/main-bg-1024x801.jpg'); }
}
@media (min-width: 1025px) {
  .letters-page { background-image: url('/assets/images/main-bg.jpg'); }
}
.letters-page-header {
  text-align: center;
  padding: 0 2rem 4rem;
}
.letters-page-header h1 {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.01em;
}
.letter-entry {
  display: grid;
  grid-template-columns: 55fr 45fr;
  gap: 3rem;
  max-width: 1300px;
  margin: 0 auto 5rem;
  padding: 0 3rem;
  align-items: start;
}
.letter-entry:last-child { margin-bottom: 0; }
.letter-entry--reverse {
  grid-template-columns: 55fr 45fr;
}
.letter-intro {
  color: #fff;
  font-size: 1rem;
  line-height: 1.8;
  margin-bottom: 1.5rem;
}
.letter-body {
  color: #fff;
  font-size: 1rem;
  line-height: 1.85;
  margin-bottom: 0;
}
.letter-student-photo-wrap {
  max-width: 320px;
  margin: 2.5rem auto 0;
}
.letter-student-photo {
  width: 100%;
  height: auto;
  display: block;
}
.letter-handwritten {
  width: 100%;
  height: auto;
  display: block;
}
.letter-portrait {
  display: block;
  width: 200px;
  height: auto;
  margin: 0 auto 1.2rem;
}
.letter-student-label {
  color: #fff;
  font-size: 0.95rem;
  font-weight: 500;
  margin-bottom: 1.2rem;
  line-height: 1.5;
}
@media (max-width: 768px) {
  .letter-entry,
  .letter-entry--reverse {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 0 1.5rem;
    margin-bottom: 3.5rem;
  }
  .letter-entry--reverse .letter-img-col { order: -1; }
}

/* ---- LATEST NEWS ---- */
.news-page-bg {
  background-color: #2a2a2a;
  background-image: url('/assets/images/organizations-supported-donate-bg-768x1891.jpg');
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
}
.news-hero {
  min-height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6rem 2rem 3rem;
}
.news-hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  color: #fff;
}
.news-hero-content h1 {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.75rem;
}
.news-hero-content p {
  font-size: 1rem;
  color: rgba(255,255,255,0.85);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.7;
}
.news-hero--article { min-height: 120px; padding: 5rem 2rem 1.5rem; }
.news-back {
  display: inline-flex;
  align-items: center;
  color: var(--gold);
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: opacity var(--transition);
}
.news-back:hover { opacity: 0.75; }

.news-section { padding: 4rem 0 5rem; background: transparent; }
.news-section--top { padding-top: 8rem; }
.news-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  margin-bottom: 3rem;
}
.news-card {
  background: #fff;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.07);
  transition: transform var(--transition), box-shadow var(--transition);
}
.news-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0,0,0,0.12); }
.news-card-link { display: block; text-decoration: none; color: inherit; height: 100%; }
.news-card-img { aspect-ratio: 16/10; overflow: hidden; background: #eee; }
.news-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.4s ease; }
.news-card:hover .news-card-img img { transform: scale(1.04); }
.news-card-body { padding: 1.4rem 1.5rem 1.6rem; }
.news-card-date { font-size: 0.75rem; color: var(--gold); letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 0.5rem; }
.news-card-body h3 { font-family: var(--font-serif); font-size: 1rem; font-weight: 600; color: var(--navy); line-height: 1.5; margin-bottom: 0.6rem; }
.news-card-body p { font-size: 0.85rem; color: var(--text-light); line-height: 1.75; margin-bottom: 0.8rem; }
.news-card-body .read-more { font-size: 0.8rem; color: var(--gold); font-weight: 600; letter-spacing: 0.05em; }

.news-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}
.page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.2rem;
  height: 2.2rem;
  padding: 0 0.6rem;
  border: 1.5px solid var(--gold);
  border-radius: 4px;
  color: var(--gold);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transition: background var(--transition), color var(--transition);
}
.page-btn:hover, .page-btn.active { background: var(--gold); color: #fff; }

/* ---- NEWS ARTICLE ---- */
.article-section { padding: 4rem 0 6rem; background: transparent; }
.article-container { max-width: 860px; margin: 0 auto; padding: 0 2rem; }
.article-thumb { margin-top: 4rem; margin-bottom: 1.5rem; border-radius: 6px; overflow: hidden; }
.article-thumb img { width: 100%; height: auto; display: block; max-height: 480px; object-fit: cover; }
.article-meta { display: flex; align-items: center; gap: 1.5rem; margin-bottom: 1.5rem; }
.article-date { font-size: 0.8rem; color: var(--gold); letter-spacing: 0.1em; text-transform: uppercase; }
.article-title { font-family: var(--font-serif); font-size: clamp(1.5rem, 3vw, 2.2rem); font-weight: 700; color: #fff; line-height: 1.35; margin-bottom: 2rem; }
.article-body p { font-size: 1rem; color: #fff; line-height: 1.9; margin-bottom: 1.2rem; }
.article-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.75rem;
  margin-top: 2.5rem;
}
.article-gallery-item { border-radius: 4px; overflow: hidden; aspect-ratio: 4/3; }
.article-gallery-item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.3s ease; }
.article-gallery-item:hover img { transform: scale(1.05); }
.article-gallery-item img {
  cursor: pointer;
}

.image-modal {
  display: none;
  position: fixed;
  z-index: 9999;
  inset: 0;
  background: rgba(0,0,0,0.94);
  padding: 2rem;
  align-items: center;
  justify-content: center;
}
.image-modal.active { display: flex; }
.article-gallery-item img { cursor: pointer; }

.image-modal-content {
  display: block;
  margin: auto;
  max-width: 92%;
  max-height: 92vh;
  object-fit: contain;
  border-radius: 8px;
}

.image-modal-close {
  position: absolute;
  top: 18px;
  right: 28px;
  color: #fff;
  font-size: 42px;
  font-weight: 300;
  line-height: 1;
  cursor: pointer;
  transition: opacity 0.25s ease;
}

.image-modal-close:hover {
  opacity: 0.7;
}

@media (max-width: 768px) {
  .image-modal {
    padding: 1rem;
  }

  .image-modal-content {
    max-width: 100%;
    max-height: 88vh;
  }

  .image-modal-close {
    top: 14px;
    right: 18px;
    font-size: 34px;
  }
}
.article-nav {
  display: flex;
  gap: 1rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,0.15);
}
.article-nav-btn {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  padding: 0.55rem 1.4rem;
  background: var(--gold);
  border: 1.5px solid var(--gold);
  border-radius: 999px;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  transition: background var(--transition), border-color var(--transition);
  white-space: nowrap;
}

.institutes-search {
  display: block;
  width: 100%;
  max-width: 400px;
  margin: 0 0 24px;
  padding: 10px 14px;
  font-size: 15px;
  border: 1px solid #ccc;
  border-radius: 6px;
}

.article-nav-btn:hover { background: var(--gold-dark); border-color: var(--gold-dark); }
.article-nav-next { margin-left: auto; }

@media (min-width: 1200px) {
  .news-page-bg { background-image: url('/assets/images/organizations-supported-donate-bg.jpg'); }
}

/* ---- RESPONSIVE ---- */
@media (max-width: 1024px) {
  .pillars-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .story-row { grid-template-columns: 1fr 1fr; gap: 2.5rem; }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .philosophy-grid, .apply-grid, .help-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .history-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .news-grid { grid-template-columns: 1fr; }
  .article-nav { flex-direction: column; }
  .nav-toggle { display: flex; position: relative; z-index: 160; }
  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    bottom: 0;
    height: 100vh;      /* ADD — fallback */
    height: 100dvh;     /* ADD — full mobile viewport height */
    width: min(300px, 85vw);
    background: rgba(var(--dark-rgb), 0.9);
    box-shadow: -8px 0 30px rgba(0,0,0,0.15);
    padding: 5rem 2rem 2rem;
    overflow-y: auto;
    transition: right 0.35s ease;
    z-index: 150;
  }
  .nav-menu .nav-link {
    color: var(--white);
    text-shadow: none;
  }
  .nav-menu .nav-link.nav-highlight {
    color: var(--white);
  }
  .nav-menu.open { right: 0; }
  .nav-list { flex-direction: column; align-items: flex-start; gap: 0.2rem; }
  .dropdown { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: none; border-left: 2px solid var(--gold); border-top: none; display: none; margin: 0.3rem 0 0.3rem 1rem; background: transparent; }
  .has-dropdown.open .dropdown { display: block; }
  .nav-menu .dropdown li a { color: rgba(255,255,255,0.85); border-bottom-color: rgba(255,255,255,0.15); }
  .stats-grid, .pillars-grid { grid-template-columns: 1fr; gap: 2rem; }
  .story-row { grid-template-columns: 1fr; gap: 1.5rem; }
  .story-row.story-left { direction: ltr; }
  .footer-top { grid-template-columns: 1fr; gap: 2rem; }
  .history-grid, .trustees-grid { grid-template-columns: 1fr; }
  .newsletter-form, .footer-form { flex-direction: column; }
  .newsletter-form input, .footer-form input { border-radius: 4px; }
  .newsletter-form button, .footer-form button { border-radius: 4px; }
}

@media (max-width: 480px) {
  .container { padding: 0 1rem; }
  .hero-content { padding: 5rem 1.2rem 3rem; }
  .nav-inner { padding: 0.7rem 1.2rem; }
}

/* ============================================
   OUR STORY SLIDER (full-width, click-driven)
   ============================================ */
.our-story-section {
  background: var(--off-white);
  padding: 5rem 0 0;
  overflow: hidden;
}
.story-header {
  margin-bottom: 3rem;
}

.story-slider {
  position: relative;
  width: 100%;
  background: var(--navy);
}

/* Slides: stacked, only .active visible. Height is dynamic via aspect-ratio of the image. */
.story-slides {
  position: relative;
  width: 100%;
}
.story-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.6s ease, visibility 0.6s ease;
  pointer-events: none;
}
.story-slide img {
  width: 100%;
  height: auto;            /* dynamic height — keeps natural aspect ratio */
  display: block;
  object-fit: contain;
}
.story-slide.active {
  position: relative;       /* first/visible slide takes up the space; others stack on it */
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  animation: storyFadeIn 0.6s ease;
}
.story-slide:not(.active) {
  position: absolute;
}
@keyframes storyFadeIn {
  from { opacity: 0; transform: scale(1.01); }
  to   { opacity: 1; transform: scale(1); }
}

/* Progress overlay sits across the bottom of the slider */
.story-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 2rem clamp(1rem, 5vw, 4rem) 1.6rem;
  background: linear-gradient(to top, rgba(0,0,0,0.65) 0%, rgba(0,0,0,0.25) 60%, transparent 100%);
  z-index: 5;
}
.story-progress-track {
  position: relative;
  width: 100%;
  height: 2px;
  background: rgba(255,255,255,0.25);
  margin-bottom: 1rem;
  border-radius: 1px;
}
.story-progress-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: var(--gold);
  width: 0%;
  border-radius: 1px;
  transition: width 0.5s ease;
}

.story-dots {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  width: 100%;
  gap: 0.5rem;
}
.story-dot {
  position: relative;
  flex: 1;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.4rem 0.25rem 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: rgba(255,255,255,0.6);
  font-family: var(--font-sans);
  transition: color var(--transition);
}
.story-dot-circle {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--white);
  border: 2px solid transparent;
  transition: background var(--transition), border-color var(--transition), transform var(--transition);
}
.story-dot-label {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  font-family: var(--font-serif);
  color: var(--white);
  transition: color var(--transition), transform var(--transition);
}
.story-dot:hover .story-dot-circle {
  background: rgba(255,255,255,0.85);
}
.story-dot:hover {
  color: var(--white);
}
.story-dot.active {
  color: var(--gold);
}
.story-dot.active .story-dot-circle {
  background: var(--gold);
  border-color: rgba(184,161,106,0.35);
  transform: scale(1.25);
  box-shadow: 0 0 0 4px rgba(184,161,106,0.15);
}
.story-dot.active .story-dot-label {
  color: var(--gold);
  transform: translateY(1px);
}

/* Make progress bar align dot centers — pad track so first/last align with first/last dot */
@media (max-width: 768px) {
  .story-progress {
    padding: 1.5rem 1rem 1rem;
  }
  .story-dot-label { font-size: 0.72rem; letter-spacing: 0.06em; }
  .story-dot-circle { width: 10px; height: 10px; }
}
@media (max-width: 480px) {
  .story-dot-label { font-size: 0.65rem; }
}

/* ============================================
   APPLY PAGE TABLE
   ============================================ */
.apply-table-wrap {
  overflow-x: auto;
  border-radius: 8px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.25);
}
.apply-table {
  width: 100%;
  border-collapse: collapse;
  background: rgba(255,255,255,0.1);
  font-size: 0.92rem;
  color: #fff;
}
.apply-table thead { background: rgba(0,0,0,0.5); color: var(--white); }
.apply-table th {
  padding: 1rem 1.2rem;
  text-align: left;
  font-weight: 600;
  letter-spacing: 0.05em;
  font-size: 0.82rem;
  text-transform: uppercase;
}
.apply-table td {
  padding: 1rem 1.2rem;
  border-bottom: 1px solid rgba(255,255,255,0.12);
  vertical-align: top;
  line-height: 1.6;
}
.apply-table tr:hover td { background: rgba(255,255,255,0.08); }
.apply-table a { color: var(--gold); }
.apply-table a:hover { color: var(--gold-dark); text-decoration: underline; }

@media (max-width: 768px) {
  .apply-table { font-size: 0.82rem; }
  .apply-table th, .apply-table td { padding: 0.7rem 0.8rem; }
}

/* ============================================
   HOME MID — stretched background wrapping
   video → pillars → futures → gallery
   ============================================ */
.home-mid {
  position: relative;
  overflow: hidden;
  background-color: var(--off-white);
}
.home-mid-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
}
.home-mid-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
.home-mid-content {
  position: relative;
  z-index: 1;
}

/* Improve readability slightly for cards on top of the photo */
.pillar-card { background: transparent; }
.pillar-card h3 { color: var(--white); }
.pillar-card p { color: rgba(255,255,255,0.92); }

.story-content { background: transparent; padding: 0; }
.story-content p { color: rgba(255,255,255,0.95); }

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

/* ============================================
   ABOUT PAGE — backgrounds & hero
   ============================================ */

/* About hero: full image shown, no crop, natural aspect ratio */
.about-hero {
  min-height: 0;
  display: block;
  overflow: hidden;
}
.about-hero-bg {
  display: block;
  width: 100%;
  line-height: 0;
}
.about-hero-bg img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
}
.about-hero .page-hero-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: left;
}
/* re-anchor: hero is position relative so absolute content centers within it */
.about-hero { position: relative; }

/* Philosophy + Story shared background */
.about-mid {
  position: relative;
  overflow: hidden;
  background-color: var(--off-white);
}
.about-mid-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
}
.about-mid-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
.about-mid-content { position: relative; z-index: 1; }

/* Make the wrapped sections transparent + white text over the photo */
.about-mid .philosophy-section { background: transparent; }
.about-mid .section-label { color: var(--white); }
.about-mid .section-title-block h2 {
  color: var(--white);
  text-align: center;
  font-weight: 700;
}
.about-mid .philosophy-text p,
.about-mid .philosophy-text ol li { color: rgba(255,255,255,0.92) !important; }
.about-mid .our-story-section { background: transparent; }

/* History section background */
.history-wrap {
  position: relative;
  overflow: hidden;
  background-color: var(--off-white);
}
.history-wrap-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
}
.history-wrap-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
.history-wrap-content { position: relative; z-index: 1; }
.history-wrap .philosophy-section { background: transparent; }
.history-wrap .section-label { color: var(--dark); }
.history-wrap .section-title-block h2 {
  color: var(--dark);
  text-align: center;
  font-weight: 700;
}
.history-wrap .history-block p,
.history-wrap p { color: var(--text); }

/* Trustees section background */
.trustees-wrap {
  position: relative;
  overflow: hidden;
  background-color: var(--off-white);
}
.trustees-wrap-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
}
.trustees-wrap-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
.trustees-wrap-content { position: relative; z-index: 1; }
.trustees-wrap .trustees-section { background: transparent; }
.trustees-wrap .section-label { color: var(--white); }
.trustees-wrap .section-title-block h2 {
  color: var(--white);
  text-align: center;
  font-weight: 700;
}
.trustees-wrap .trustee-card h3 { color: var(--white); }
.trustees-wrap .trustee-card .role { color: var(--white); }
.trustees-wrap .trustee-card p { color: rgba(255,255,255,0.9); }

/* ============================================
   STORY TIMELINE — dots positioned by year
   ============================================ */
.story-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 2rem clamp(2rem, 6vw, 5rem) 2.5rem;
  background: none;          /* overlay removed */
  z-index: 5;
}
.story-timeline {
  position: relative;
  width: 50%;
  max-width: 680px;
  min-width: 300px;
  margin: 0 auto;
  height: 60px;
}
.story-timeline .story-progress-track {
  position: absolute;
  top: 6px;
  left: 0;
  right: 0;
  height: 2px;
  background: rgba(255,255,255,0.35);
  border-radius: 1px;
}
.story-timeline .story-progress-fill {
  position: absolute;
  top: 6px;
  left: 0;
  height: 2px;
  background: var(--gold);
  width: 0%;
  border-radius: 1px;
  transition: width 0.5s ease;
}
.story-timeline .story-dot {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  color: rgba(255,255,255,0.7);
  font-family: var(--font-sans);
}

/* Dots that have been passed (at or before the active year) show gold */
.story-dot.passed .story-dot-circle {
  background: var(--gold) !important;
}
.story-dot.passed .story-dot-label {
  color: var(--gold) !important;
}

/* About hero title: make the accent line white like the rest */
.about-hero .page-hero-content h1,
.about-hero .page-hero-content h1 .accent {
  color: var(--white) !important;
}

.pdetail-sidebar-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 14px 18px;
    background-color: var(--gold);
    color: #fff !important;
    text-decoration: none;
    text-align: center;
    font-weight: 600;
    font-size: 15px;
    border: 2px solid var(--gold);
    border-radius: 10px;
    box-sizing: border-box;
    transition: all .25s ease;
    cursor: pointer;
}

.pdetail-sidebar-btn:hover {
    background-color: var(--gold-dark);
    border-color: var(--gold-dark);
    color: #fff !important;
}

.pdetail-sidebar-btn:active {
    transform: scale(0.98);
}