/* ============================================================
   SSYVI – Global Stylesheet
   ============================================================ */

/* ---------- Google Fonts ---------- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Outfit:wght@400;500;600;700;800;900&display=swap');

/* ---------- CSS Variables ---------- */
:root {
  /* Brand colours */
  --primary: #111111;
  /* deep black */
  --primary-light: #2c2c2c;
  --primary-dark: #000000;
  --accent: #2e8b57;
  /* soft green sustainability */
  --accent-light: #3cb371;
  --accent-dark: #20623e;

  /* Neutrals */
  --white: #ffffff;
  --off-white: #f7f9fa;
  --light-grey: #e9ecef;
  --mid-grey: #868e96;
  --dark-grey: #343a40;
  --text: #212529;

  /* Typography */
  --font-body: 'Inter', sans-serif;
  --font-heading: 'Outfit', sans-serif;

  /* Spacing */
  --section-padding: 90px 0;
  --container-max: 1180px;

  /* Effects */
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, .04);
  --shadow-md: 0 8px 32px rgba(0, 0, 0, .08);
  --shadow-lg: 0 16px 56px rgba(0, 0, 0, .12);
  --radius: 10px;
  --radius-lg: 20px;
  --transition: 0.35s ease;
}

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

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

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--white);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

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

ul {
  list-style: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

/* ---------- Typography ---------- */
h1,
h2,
h3,
h4,
h5 {
  font-family: var(--font-heading);
  line-height: 1.2;
  color: var(--primary-dark);
}

h1 {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
}

h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
}

h3 {
  font-size: clamp(1.2rem, 2.5vw, 1.6rem);
}

h4 {
  font-size: 1.15rem;
}

p {
  color: var(--dark-grey);
  font-size: 1.05rem;
  line-height: 1.75;
}

/* ---------- Layout ---------- */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: var(--section-padding);
}

.section--grey {
  background: var(--off-white);
}

.section--primary {
  background: var(--primary-dark);
  color: var(--white);
}

.section--primary h2,
.section--primary h3,
.section--primary p {
  color: var(--white);
}

.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-header h2 {
  margin-bottom: 16px;
}

.section-header p {
  max-width: 640px;
  margin: 0 auto;
  color: var(--mid-grey);
  font-size: 1.1rem;
}

.section-header--left {
  text-align: left;
}

.section-header--left p {
  margin: 0;
}

/* ---------- Section Label ---------- */
.section-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 30px;
  border-radius: 50px;
  font-size: 0.92rem;
  font-weight: 600;
  font-family: var(--font-body);
  letter-spacing: 0.4px;
  transition: all var(--transition);
}

.btn-primary {
  background: var(--accent);
  color: var(--white);
  box-shadow: 0 4px 16px rgba(40, 180, 99, .35);
}

.btn-primary:hover {
  background: var(--accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(40, 180, 99, .4);
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border: 2px solid var(--white);
}

.btn-outline:hover {
  background: var(--white);
  color: var(--primary);
}

.btn-outline-dark {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn-outline-dark:hover {
  background: var(--primary);
  color: var(--white);
}

/* ---------- Cards ---------- */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
}

.card-body {
  padding: 28px;
}

.card-body h3 {
  margin-bottom: 10px;
}

.card-body p {
  font-size: 0.97rem;
}

/* ---------- HEADER / NAV ---------- */
#site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  transition: background var(--transition), box-shadow var(--transition);
}

#site-header.scrolled {
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

#site-header.scrolled .logo-text {
  color: var(--primary);
}

#site-header.scrolled .logo-sub {
  color: var(--mid-grey);
}

#site-header.scrolled .nav-link {
  color: var(--text);
}

#site-header.scrolled .nav-link:hover {
  color: var(--accent);
}

#site-header.scrolled .nav-cta {
  color: var(--white) !important;
}

#site-header.scrolled .hamburger span {
  background: var(--text);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  max-width: var(--container-max);
  margin: 0 auto;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 14px;
}

.logo-icon {
  width: 46px;
  height: 46px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 800;
  font-size: 1rem;
  flex-shrink: 0;
}

.logo-img {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: #000;
}

.logo-text {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--white);
  transition: color var(--transition);
}

.logo-sub {
  font-size: 0.68rem;
  color: rgba(255, 255, 255, .7);
  letter-spacing: 0.5px;
  transition: color var(--transition);
}

/* Nav */
.nav-menu {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-link {
  padding: 8px 14px;
  font-size: 0.9rem;
  font-weight: 500;
  color: rgba(255, 255, 255, .9);
  border-radius: 6px;
  transition: color var(--transition);
}

.nav-link:hover,
.nav-link.active {
  color: var(--accent-light);
}

.nav-cta {
  margin-left: 8px;
  padding: 10px 22px !important;
  background: var(--accent) !important;
  color: var(--white) !important;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all var(--transition);
}

.nav-cta:hover {
  background: var(--accent-dark) !important;
  transform: translateY(-1px);
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  cursor: pointer;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: all var(--transition);
}

.hamburger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

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

.hamburger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile nav */
@media (max-width: 900px) {
  .hamburger {
    display: flex;
  }

  .nav-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    align-items: stretch;
    padding: 16px 0;
    gap: 0;
    box-shadow: var(--shadow-md);
    display: none;
  }

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

  .nav-link {
    color: var(--text) !important;
    padding: 12px 24px;
    border-radius: 0;
  }

  .nav-link:hover {
    background: var(--off-white);
    color: var(--accent) !important;
  }

  .nav-cta {
    margin: 8px 24px 4px;
    background: var(--accent) !important;
    color: white !important;
    border-radius: 50px;
    text-align: center;
  }
}

/* ---------- HERO ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--primary-dark);
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: brightness(0.45);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(21, 67, 96, .6) 0%, rgba(27, 79, 114, .2) 60%, transparent 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 760px;
  padding: 0 24px;
  margin: 0 auto;
  animation: fadeUp .9s ease both;
}

.hero-content .section-label {
  color: var(--accent-light);
}

.hero-content h1 {
  color: var(--white);
  margin-bottom: 24px;
}

.hero-content p {
  color: rgba(255, 255, 255, .85);
  font-size: 1.15rem;
  margin-bottom: 40px;
  max-width: 580px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

/* Hero stats bar — rendered as standalone section BELOW hero */
.hero-stats-section {
  background: var(--primary-dark);
  border-top: 3px solid var(--accent);
}

.hero-stats-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  flex-wrap: wrap;
}

.hero-stat {
  flex: 1;
  min-width: 160px;
  padding: 28px 20px;
  text-align: center;
  border-right: 1px solid rgba(255, 255, 255, .12);
}

.hero-stat:last-child {
  border: none;
}

.hero-stat strong {
  display: block;
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--accent-light);
}

.hero-stat span {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, .7);
  letter-spacing: 0.5px;
}

/* ---------- IMPACT NUMBERS ---------- */
.impact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 32px;
  text-align: center;
}

.impact-item {
  padding: 20px;
}

.impact-icon {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, var(--primary-light), var(--accent));
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  font-size: 1.8rem;
}

.impact-item h3 {
  font-size: 2.4rem;
  color: var(--primary);
  margin-bottom: 6px;
}

.impact-item p {
  font-size: 0.93rem;
}

/* ---------- PROGRAMS GRID ---------- */
.programs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 28px;
}

.program-card {
  border-left: 4px solid var(--accent);
}

.program-card .card-body .program-icon {
  width: 52px;
  height: 52px;
  background: var(--off-white);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 16px;
}

/* ---------- NEWS GRID ---------- */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 28px;
}

.news-card .news-img {
  height: 220px;
  background: var(--light-grey);
  overflow: hidden;
}

.news-card .news-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}

.news-card:hover .news-img img {
  transform: scale(1.04);
}

.news-meta {
  font-size: 0.8rem;
  color: var(--mid-grey);
  margin-bottom: 10px;
}

.news-tag {
  display: inline-block;
  padding: 3px 12px;
  background: var(--primary);
  color: white;
  border-radius: 50px;
  font-size: 0.72rem;
  font-weight: 600;
  margin-right: 8px;
  letter-spacing: 0.5px;
}

/* ---------- GALLERY GRID ---------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 260px;
  gap: 12px;
}

.gallery-item {
  overflow: hidden;
  border-radius: var(--radius);
  position: relative;
}

.gallery-item.tall {
  grid-row: span 2;
}

.gallery-item.wide {
  grid-column: span 2;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}

.gallery-item:hover img {
  transform: scale(1.06);
}

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(21, 67, 96, .6), transparent);
  opacity: 0;
  transition: opacity var(--transition);
  display: flex;
  align-items: flex-end;
  padding: 20px;
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

.gallery-overlay span {
  color: white;
  font-size: 0.9rem;
  font-weight: 500;
}

/* ---------- CONTACT ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 60px;
  align-items: start;
}

.contact-info-item {
  display: flex;
  gap: 16px;
  margin-bottom: 28px;
}

.contact-info-icon {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  background: var(--primary);
  color: white;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.contact-info-text h4 {
  color: var(--primary);
  margin-bottom: 4px;
  font-family: var(--font-body);
  font-weight: 600;
}

.contact-info-text p {
  font-size: 0.95rem;
}

.contact-form {
  background: var(--off-white);
  padding: 40px;
  border-radius: var(--radius-lg);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--dark-grey);
  margin-bottom: 6px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--light-grey);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.95rem;
  background: var(--white);
  transition: border-color var(--transition);
  color: var(--text);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-light);
}

.form-group textarea {
  resize: vertical;
  min-height: 140px;
}

/* ---------- PAGE HERO (inner pages) ---------- */
.page-hero {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 60%, var(--primary-light) 100%);
  padding: 160px 0 80px;
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(40, 180, 99, .15) 0%, transparent 70%);
  border-radius: 50%;
}

.page-hero-content {
  position: relative;
  z-index: 1;
}

.page-hero h1 {
  color: var(--white);
  margin-bottom: 16px;
}

.page-hero p {
  color: rgba(255, 255, 255, .8);
  font-size: 1.1rem;
  max-width: 600px;
}

.breadcrumb {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 20px;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, .6);
}

.breadcrumb a {
  color: rgba(255, 255, 255, .6);
  transition: color var(--transition);
}

.breadcrumb a:hover {
  color: var(--accent-light);
}

.breadcrumb-sep {
  color: rgba(255, 255, 255, .3);
}

/* ---------- FOOTER ---------- */
#site-footer {
  background: var(--primary-dark);
  color: rgba(255, 255, 255, .8);
  padding: 72px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer-brand .logo-text {
  color: var(--white);
  font-size: 1.2rem;
}

.footer-brand .logo-sub {
  color: rgba(255, 255, 255, .5);
}

.footer-brand p {
  color: rgba(255, 255, 255, .6);
  font-size: 0.9rem;
  margin-top: 16px;
  line-height: 1.7;
}

.footer-col h4 {
  color: var(--white);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 18px;
}

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

.footer-col ul li a {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, .55);
  transition: color var(--transition);
}

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

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, .08);
  padding: 20px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, .4);
  flex-wrap: wrap;
  gap: 12px;
}

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

.footer-social a {
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, .08);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, .6);
  font-size: 0.9rem;
  transition: all var(--transition);
}

.footer-social a:hover {
  background: var(--accent);
  color: white;
}

/* ---------- UTILITY ---------- */
.text-center {
  text-align: center;
}

.text-accent {
  color: var(--accent);
}

.text-primary {
  color: var(--primary);
}

.mt-8 {
  margin-top: 8px;
}

.mt-12 {
  margin-top: 12px;
}

.mt-16 {
  margin-top: 16px;
}

.mt-24 {
  margin-top: 24px;
}

.mt-32 {
  margin-top: 32px;
}

.mt-48 {
  margin-top: 48px;
}

.mb-8 {
  margin-bottom: 8px;
}

.mb-16 {
  margin-bottom: 16px;
}

.mb-24 {
  margin-bottom: 24px;
}

.mb-32 {
  margin-bottom: 32px;
}

.tag {
  display: inline-block;
  padding: 4px 14px;
  background: rgba(27, 79, 114, .1);
  color: var(--primary);
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.divider {
  width: 56px;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
  margin: 16px 0 28px;
}

/* ---------- ANIMATIONS ---------- */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .6s ease, transform .6s ease;
}

.fade-up.visible {
  opacity: 1;
  transform: none;
}

/* If JS hasn't run yet, show everything — progressive enhancement */
.no-js .fade-up {
  opacity: 1;
  transform: none;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 36px;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .gallery-item.wide {
    grid-column: span 1;
  }
}

@media (max-width: 768px) {
  :root {
    --section-padding: 60px 0;
  }

  .hero-stats-inner {
    flex-direction: column;
  }

  .hero-stat {
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, .1);
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .gallery-item.tall {
    grid-row: span 1;
  }

  .hero-actions {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  .header-inner {
    padding: 14px 16px;
  }

  .container {
    padding: 0 16px;
  }
}