/* ============================================================
   CodeLearn NG — components.css
   Reusable UI components: nav, footer, cards, stats, badges
   ============================================================ */

/* ── NAVIGATION ─────────────────────────────────────────── */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--deep-navy);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  gap: 24px;
}

.nav-logo {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.nav-logo img,
.nav-logo svg {
  height: 52px;
  width: auto;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
}

.nav-links li a {
  display: block;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 500;
  color: rgba(255,255,255,0.72);
  border-radius: 6px;
  transition: all 0.18s ease;
  white-space: nowrap;
}

.nav-links li a:hover,
.nav-links li a.active {
  color: var(--white);
  background: rgba(255,255,255,0.08);
}

.nav-links li a.active {
  color: var(--harvest-gold);
}

.nav-donate {
  flex-shrink: 0;
}

/* Mobile hamburger */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  cursor: pointer;
  border: none;
  background: none;
  border-radius: 6px;
}

.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.nav-hamburger.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.nav-hamburger.open span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.nav-hamburger.open span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile overlay */
.nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--deep-navy);
  z-index: 99;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 40px 32px;
}

.nav-overlay.open {
  display: flex;
}

.nav-overlay a {
  font-size: 28px;
  font-family: 'Fraunces', serif;
  font-weight: 700;
  color: rgba(255,255,255,0.8);
  text-align: center;
  padding: 8px;
  transition: color 0.2s;
}

.nav-overlay a:hover {
  color: var(--harvest-gold);
}

.nav-overlay .btn--gold {
  margin-top: 16px;
  font-size: 18px;
  padding: 16px 40px;
}

.nav-overlay-close {
  position: absolute;
  top: 20px;
  right: 24px;
  background: none;
  border: none;
  color: rgba(255,255,255,0.6);
  font-size: 32px;
  cursor: pointer;
  line-height: 1;
  padding: 8px;
}

@media (max-width: 900px) {
  .nav-links,
  .nav-donate {
    display: none;
  }

  .nav-hamburger {
    display: flex;
  }
}

/* ── FOOTER ─────────────────────────────────────────────── */
.site-footer {
  background: var(--deep-navy);
  padding: 64px 0 0;
  color: rgba(255,255,255,0.72);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 56px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-brand .footer-logo {
  height: 56px;
  width: auto;
  margin-bottom: 20px;
}

.footer-tagline {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-size: 16px;
  color: rgba(255,255,255,0.68);
  line-height: 1.6;
  margin-bottom: 20px;
  max-width: 280px;
}

.footer-social {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}

.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.7);
  font-size: 16px;
  transition: all 0.2s;
  text-decoration: none;
}

.footer-social a:hover {
  background: var(--harvest-gold);
  color: var(--deep-navy);
}

.footer-col h4 {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  margin-bottom: 20px;
}

.footer-col ul li {
  margin-bottom: 10px;
}

.footer-col ul li a {
  color: rgba(255,255,255,0.65);
  font-size: 14px;
  transition: color 0.2s;
  text-decoration: none;
}

.footer-col ul li a:hover {
  color: var(--white);
}

.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 14px;
  color: rgba(255,255,255,0.65);
  font-size: 14px;
  line-height: 1.5;
}

.footer-contact-item .icon {
  color: var(--harvest-gold);
  font-size: 16px;
  flex-shrink: 0;
  margin-top: 1px;
}

.footer-bottom {
  padding: 20px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 12px;
  color: rgba(255,255,255,0.35);
  flex-wrap: wrap;
}

.footer-bottom a {
  color: rgba(255,255,255,0.35);
  transition: color 0.2s;
  text-decoration: none;
}

.footer-bottom a:hover {
  color: rgba(255,255,255,0.7);
}

@media (max-width: 900px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 580px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

/* ── STAT CARDS ─────────────────────────────────────────── */
.stat-card {
  background: var(--white);
  border: var(--card-border);
  border-left: 3px solid var(--harvest-gold);
  border-radius: var(--card-radius);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.stat-card__number {
  font-family: 'Fraunces', serif;
  font-size: 52px;
  font-weight: 700;
  color: var(--deep-navy);
  line-height: 1;
}

.stat-card__label {
  font-size: var(--fs-sm);
  color: var(--muted);
  line-height: 1.5;
  max-width: 180px;
}

/* ── PROGRAMME CARDS ────────────────────────────────────── */
.programme-card {
  background: var(--cloud-tint);
  border: var(--card-border);
  border-radius: var(--card-radius);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: border-color 0.2s ease;
  text-decoration: none;
}

.programme-card:hover {
  border-color: var(--brand-blue);
}

.programme-card__tag {
  font-size: var(--fs-label);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brand-blue);
}

.programme-card__title {
  font-family: 'Fraunces', serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--deep-navy);
  line-height: 1.2;
  margin: 0;
}

.programme-card__body {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
  flex: 1;
}

.programme-card__img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 4px;
}

.programme-card__sdg {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
}

.sdg-pill {
  display: inline-block;
  background: var(--gold-light);
  color: #92630A;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  white-space: nowrap;
}

.programme-card__cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--brand-blue);
  margin-top: 8px;
  transition: gap 0.2s ease, color 0.2s ease;
}

.programme-card:hover .programme-card__cta {
  gap: 10px;
  color: var(--sky-blue);
}

/* ── INFO BOXES ─────────────────────────────────────────── */
.info-box {
  background: var(--gold-light);
  border-left: 3px solid var(--harvest-gold);
  border-radius: 0 8px 8px 0;
  padding: 28px 28px 28px 24px;
}

.info-box .label {
  display: block;
  margin-bottom: 12px;
  color: var(--harvest-gold);
}

.info-box p {
  font-size: 16px;
  line-height: 1.75;
  color: var(--ink);
}

.info-box--cloud {
  background: var(--cloud-tint);
  border-left-color: var(--brand-blue);
}

.info-box--cloud .label {
  color: var(--brand-blue);
}

/* ── PILLAR CARDS ───────────────────────────────────────── */
.pillar-card {
  background: var(--white);
  border: var(--card-border);
  border-radius: var(--card-radius);
  padding: 36px 28px;
  text-align: center;
  border-top: 4px solid var(--brand-blue);
}

.pillar-card__icon {
  font-size: 40px;
  margin-bottom: 16px;
}

.pillar-card__title {
  font-family: 'Fraunces', serif;
  font-size: 26px;
  font-weight: 700;
  color: var(--deep-navy);
  margin-bottom: 12px;
}

.pillar-card__body {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.7;
}

/* ── PATHWAY CARDS (Get Involved) ───────────────────────── */
.pathway-card {
  border-radius: var(--card-radius);
  padding: 48px 32px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}

.pathway-card--navy { background: var(--deep-navy); }
.pathway-card--gold { background: var(--harvest-gold); }
.pathway-card--blue { background: var(--brand-blue); }

.pathway-card__icon {
  font-size: 48px;
  line-height: 1;
}

.pathway-card__title {
  font-family: 'Fraunces', serif;
  font-size: 30px;
  font-weight: 700;
  color: var(--white);
  line-height: 1.1;
}

.pathway-card--gold .pathway-card__title {
  color: var(--deep-navy);
}

.pathway-card__body {
  font-size: 15px;
  color: rgba(255,255,255,0.8);
  line-height: 1.7;
}

.pathway-card--gold .pathway-card__body {
  color: rgba(15,45,94,0.78);
}

/* ── STREAMSIDE GRID ────────────────────────────────────── */
.streamside-grid {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 6px;
  margin-bottom: 16px;
}

.streamside-cell {
  background: var(--deep-navy);
  border-radius: 8px;
  padding: 20px 8px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  transition: background 0.2s ease;
}

.streamside-cell:hover {
  background: var(--brand-blue);
}

.streamside-cell__letter {
  font-family: 'Fraunces', serif;
  font-size: 32px;
  font-weight: 700;
  color: var(--harvest-gold);
  line-height: 1;
}

.streamside-cell__word {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.85);
  text-align: center;
  line-height: 1.3;
}

@media (max-width: 900px) {
  .streamside-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

@media (max-width: 480px) {
  .streamside-grid {
    grid-template-columns: repeat(5, 1fr);
    gap: 4px;
  }

  .streamside-cell {
    padding: 14px 6px 12px;
  }

  .streamside-cell__letter {
    font-size: 22px;
  }

  .streamside-cell__word {
    font-size: 7px;
  }
}

/* ── SDG TABLE ──────────────────────────────────────────── */
.sdg-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-sm);
}

.sdg-table th {
  background: var(--cloud-tint);
  color: var(--deep-navy);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.05em;
  padding: 12px 16px;
  text-align: left;
  border: 0.5px solid var(--border);
}

.sdg-table td {
  padding: 12px 16px;
  border: 0.5px solid var(--border);
  color: var(--ink);
  vertical-align: top;
  line-height: 1.5;
}

.sdg-table tr:nth-child(even) td {
  background: #fafafa;
}

/* ── COMMUNITY STORY CARD ───────────────────────────────── */
.story-card {
  background: var(--white);
  border: var(--card-border);
  border-radius: var(--card-radius);
  overflow: hidden;
}

.story-card__image {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.story-card__body {
  padding: 28px;
}

.story-card__meta {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--harvest-gold);
  margin-bottom: 10px;
}

.story-card__title {
  font-family: 'Fraunces', serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--deep-navy);
  margin-bottom: 12px;
  line-height: 1.3;
}

.story-card__excerpt {
  color: var(--muted);
  font-size: var(--fs-sm);
  line-height: 1.65;
}

/* ── BOOK FEATURE SECTION ───────────────────────────────── */
.book-feature {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 64px;
  align-items: center;
}

.book-cover-wrap {
  position: relative;
}

.book-cover-img {
  width: 100%;
  border-radius: 8px;
  display: block;
}

.book-cover-placeholder {
  width: 100%;
  aspect-ratio: 2/3;
  background: var(--harvest-gold);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
}

.book-cover-placeholder h3 {
  font-family: 'Fraunces', serif;
  color: var(--deep-navy);
  font-size: 18px;
  margin-bottom: 8px;
}

.book-cover-placeholder p {
  font-size: 12px;
  color: rgba(15,45,94,0.7);
}

.book-content .label {
  color: var(--harvest-gold);
  margin-bottom: 12px;
  display: block;
}

.book-content h2 {
  color: var(--white);
  font-size: clamp(28px, 4vw, 42px);
  margin-bottom: 16px;
}

.book-content p {
  color: rgba(255,255,255,0.75);
  font-size: 16px;
  line-height: 1.75;
  margin-bottom: 32px;
}

@media (max-width: 768px) {
  .book-feature {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .book-cover-wrap {
    max-width: 240px;
    margin: 0 auto;
  }
}

/* ── TEAM / BIO CARD ────────────────────────────────────── */
.bio-card {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 48px;
  align-items: start;
  background: var(--white);
  border: var(--card-border);
  border-radius: var(--card-radius);
  padding: 40px;
}

.bio-card__photo {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 8px;
  border: 3px solid var(--cloud-tint);
}

.bio-card__photo-placeholder {
  width: 100%;
  aspect-ratio: 1;
  background: var(--cloud-tint);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 64px;
}

.bio-card__name {
  font-family: 'Fraunces', serif;
  font-size: 26px;
  font-weight: 700;
  color: var(--deep-navy);
  margin-bottom: 4px;
}

.bio-card__role {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--brand-blue);
  letter-spacing: 0.06em;
  margin-bottom: 16px;
}

.bio-card__bio {
  font-size: 15px;
  line-height: 1.75;
  color: var(--muted);
}

@media (max-width: 640px) {
  .bio-card {
    grid-template-columns: 1fr;
    padding: 28px;
    gap: 24px;
  }

  .bio-card__photo,
  .bio-card__photo-placeholder {
    max-width: 160px;
  }
}

/* ── CONTACT INFO BLOCK ─────────────────────────────────── */
.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 20px 0;
  border-bottom: 0.5px solid var(--border);
}

.contact-item:last-child {
  border-bottom: none;
}

.contact-item__icon {
  width: 48px;
  height: 48px;
  background: var(--cloud-tint);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
  color: var(--brand-blue);
}

.contact-item__label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}

.contact-item__value {
  font-size: 16px;
  font-weight: 500;
  color: var(--ink);
}

.contact-item__value a {
  color: var(--brand-blue);
}

/* ── MAP EMBED ──────────────────────────────────────────── */
.map-wrap {
  border-radius: var(--card-radius);
  overflow: hidden;
  border: var(--card-border);
  height: 380px;
}

.map-wrap iframe {
  width: 100%;
  height: 100%;
  border: none;
}
