/* ========================
   Root Variables
========================= */
:root {
  --gold: #d4af37;
  --brown: #a0522d;
  --light: #fdfaf6;
  --dark: #2e1d14;
}

/* ========================
   Global Reset & Typography
========================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: var(--light);
  color: var(--dark);
  line-height: 1.6;
  margin: 0;
}

/* ========================
   Layout Containers
========================= */
main, section, footer, header, nav {
  padding: 2rem;
  scroll-margin-top: 80px;
}

section:nth-of-type(even) {
  background-color: #f9f5eb;
  border-radius: 10px;
}

/* ========================
   Header & Branding
========================= */
.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(to right, var(--brown), var(--gold));
}

.logo-section {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logo-section img {
  width: 60px;
}

.logo-section h1, .logo-section p {
  color: var(--light);
}

/* ========================
   Navigation Bar
========================= */
nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
  background-color: var(--gold);
  transition: 0.3s;
}

nav a {
  color: var(--brown);
  text-decoration: none;
  font-weight: bold;
  font-size: 1rem;
}

nav a:hover {
  text-decoration: underline;
}

.donate-button {
  background-color: var(--brown);
  color: var(--light);
  padding: 0.5rem 1rem;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
}

.nav-toggle {
  display: none;
  background: var(--gold);
  border: none;
  font-size: 1.25rem;
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 102;
  cursor: pointer;
  color: var(--brown);
  padding: 0.4rem 0.8rem;
  border-radius: 4px;
}

.nav-toggle.open::after {
  content: "✕";
}

.nav-toggle::after {
  content: "☰";
}

.nav-backdrop {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.4);
  z-index: 98;
}

@media (max-width: 768px) {
  nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 75%;
    height: auto;
    flex-direction: column;
    align-items: flex-start;
    padding-top: 4rem;
    padding-left: 2rem;
    background-color: var(--gold);
    transition: right 0.3s ease-in-out;
    z-index: 100;
  }

  nav.open {
    right: 0;
  }

  .nav-toggle {
    display: block;
  }

  .nav-backdrop.show {
    display: block;
  }

  .nav-backdrop {
    display: none;
  }
}

/* ========================
   Homepage Programmes Preview
========================= */
.homepage-programmes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.homepage-programme-tile {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 8px;
  padding: 1rem;
  text-align: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
  transition: transform 0.2s ease;
}

.homepage-programme-tile:hover {
  transform: translateY(-5px);
}

.homepage-programme-tile img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: 1rem;
}

/* ========================
   Programme & Gallery
========================= */
.programmes-grid {
  display: flex;
  flex-direction: column;
  gap: 2rem; /* spacing between each tile */
}

.programme-tile {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 2rem;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.programme-tile:nth-of-type(even) {
  flex-direction: row-reverse;
}

.programme-image {
  flex: 0 0 40%;
}

.programme-image img {
  width: 100%;
  height: auto;
  border-radius: 6px;
  object-fit: cover;
}

.programme-content {
  flex: 1;
}

@media (max-width: 768px) {
  .programme-tile,
  .programme-tile:nth-of-type(even) {
    flex-direction: column !important;
    text-align: center;
  }

  .programme-image,
  .programme-content {
    flex: 1 1 100%;
  }
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.gallery img {
  width: 100%;
  height: auto;
  border-radius: 6px;
}

/* ========================
   Video & Testimonial Sections
========================= */
.video-spotlight {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  align-items: center;
}

.video-spotlight video {
  flex: 1 1 45%;
  max-width: 50%;
  border-radius: 6px;
}

.video-spotlight .description {
  flex: 1 1 45%;
}

.testimonial-carousel {
  overflow: hidden;
  position: relative;
}

.testimonial-track {
  display: flex;
  transition: transform 0.5s ease-in-out;
}

.testimonial-tile {
  min-width: 50%;
  box-sizing: border-box;
  padding: 1rem;
  text-align: center;
}

.testimonial-tile img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 0.5rem;
}

.carousel-buttons {
  text-align: center;
  margin-top: 1rem;
}

.carousel-buttons button {
  margin: 0 0.8rem;
  padding: 0.75rem 1.5rem;
  cursor: pointer;
  background-color: var(--brown);
  color: var(--light);
  border: none;
  border-radius: 5px;
}

/* ========================
   Impact and CTAs
========================= */
.impact-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1.5rem;
  text-align: center;
}

.impact-stats div {
  background: #fff3d4;
  padding: 1rem;
  border-radius: 6px;
}

.cta {
  background-color: var(--gold);
  text-align: center;
  padding: 2rem;
  border-radius: 8px;
}

.cta a {
  display: inline-block;
}

/* ========================
   Trustees & Team Profiles
========================= */
.trustees {
  display: grid;
  gap: 2rem;
  margin-top: 2rem;
}

.trustee {
  display: flex;
  flex-direction: row;
  gap: 1.5rem;
  align-items: flex-start;
  background: #fff;
  padding: 1.5rem;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  flex-wrap: wrap;
}

.trustee img {
  flex: 0 0 150px;
  max-width: 40%;
  height: 200px;
  border-radius: 8px;
  object-fit: cover;
  aspect-ratio: 1 / 1;
}

.trustee div {
  flex: 1 1 300px;
}

@media (max-width: 768px) {
  .trustee {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .trustee div {
    text-align: left;
  }
}

/* ========================
   Contact Form
========================= */
.contact-section {
  background-color: #fff;
  padding: 2rem;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  max-width: 800px;
  margin: auto;
}

form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 600px;
  margin: auto;
}

input, textarea, button {
  padding: 0.8rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 1rem;
}

button {
  background-color: var(--brown);
  color: var(--light);
  border: none;
  cursor: pointer;
  font-weight: bold;
}

.contact-details {
  margin-top: 2rem;
}

/* ========================
   Footer & Social
========================= */
footer {
  background-color: var(--brown);
  color: var(--light);
  text-align: center;
  font-size: 0.9rem;
}

.footer-links a {
  color: var(--light);
  text-decoration: underline;
  display: block;
  margin: 0.3rem 0;
}

.social-links {
  text-align: center;
  margin-top: 2rem;
}

.social-links a {
  margin: 0 0.5rem;
  color: var(--gold);
  font-size: 1.5rem;
}

/* ========================
   Utility & Misc
========================= */
.values ul {
  list-style: inside disc;
  padding-left: 1rem;
}

.extras {
  text-align: center;
  margin-top: 3rem;
}

.extras a {
  display: inline-block;
  margin: 1rem;
  padding: 0.75rem 1.5rem;
  background-color: var(--gold);
  color: var(--dark);
  text-decoration: none;
  border-radius: 5px;
  font-weight: bold;
}
