/* ===================================================
   Global Restoration Institute — Clean Stylesheet
   Design tokens extracted from original Elementor theme
   =================================================== */

/* ---------- Design Tokens ---------- */
:root {
  /* Colors */
  --color-primary: #00253F;
  --color-secondary: #02597D;
  --color-accent: #10ACC5;
  --color-text: #3D3D3D;
  --color-light: #f7f9fb;
  --color-white: #ffffff;
  --color-border: #e0e0e0;

  /* Typography */
  --font-heading: "Cormorant", Georgia, serif;
  --font-body: "Rubik", "Segoe UI", Roboto, sans-serif;

  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 4rem;
  --space-xl: 6rem;

  /* Layout */
  --max-width: 1140px;
  --header-height: 80px;
}

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

html {
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 400;
  color: var(--color-text);
  background-color: var(--color-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

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

ul {
  list-style: none;
}

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

h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 600;
}

h2 {
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  font-weight: 600;
}

h3 {
  font-size: clamp(1.25rem, 2.5vw, 2rem);
  font-weight: 600;
}

h4 {
  font-size: 1.25rem;
  font-weight: 600;
}

p {
  margin-bottom: var(--space-sm);
  line-height: 1.7;
}

/* ---------- Utility ---------- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.section {
  padding: var(--space-lg) 0;
}

.section--light {
  background-color: var(--color-light);
}

.text-center {
  text-align: center;
}

.section-title {
  font-family: var(--font-heading);
  color: var(--color-secondary);
  text-align: center;
  margin-bottom: var(--space-lg);
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  font-weight: 600;
}

.section-title::after {
  content: "";
  display: block;
  width: 60px;
  height: 3px;
  background: var(--color-accent);
  margin: var(--space-sm) auto 0;
  border-radius: 2px;
}

.section-subtitle {
  color: var(--color-secondary);
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-style: italic;
  margin-bottom: var(--space-md);
}

/* ---------- Header / Navigation ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: #ffffff;
  z-index: 1000;
  display: flex;
  align-items: center;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-logo img {
  height: 80px;
  width: auto;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.nav-links a {
  color: var(--color-primary);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--color-accent);
}

.btn {
  display: inline-block;
  padding: 0.6rem 1.5rem;
  border-radius: 4px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: background 0.2s, color 0.2s;
  cursor: pointer;
  border: none;
}

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

.btn--accent:hover {
  background: var(--color-secondary);
  color: var(--color-white);
}

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

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

/* Hamburger menu for mobile */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-xs);
  z-index: 1100;
}

.menu-toggle span {
  display: block;
  width: 28px;
  height: 3px;
  background: var(--color-primary);
  margin: 5px 0;
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

.menu-toggle.active span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: var(--color-primary);
    flex-direction: column;
    padding: calc(var(--header-height) + var(--space-md)) var(--space-md) var(--space-md);
    gap: var(--space-sm);
    transition: right 0.3s ease;
    z-index: 1050;
    overflow-y: auto;
    align-items: flex-start;
  }

  .nav-links a {
    color: var(--color-white);
  }

  .nav-links.open {
    right: 0;
  }

  .nav-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1040;
  }

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

/* ---------- Hero Section ---------- */
/* Only the home page gets the full-height hero with background */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: left;
  color: var(--color-white);
  padding: var(--header-height) var(--space-md) var(--space-md);
  /* Background image is set inline for each page */
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(0, 37, 63, 0.75) 0%,
    rgba(2, 89, 125, 0.6) 100%
  );
}

.hero-content {
  position: relative;
  max-width: 800px;
}

.hero h1 {
  color: var(--color-white);
  margin-bottom: var(--space-md);
  font-weight: 600;
}

.hero-accent {
  color: #fcdc9f;
}

.hero-subtitle {
  font-size: 1.15rem;
  line-height: 1.8;
  opacity: 0.95;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-family: var(--font-body);
  font-weight: 400;
}

.hero p {
  font-size: 1.15rem;
  line-height: 1.8;
  opacity: 0.95;
}

/* ---------- Page Title + Divider (subpages) ---------- */
/* Replicate Elementor ekit-dotted / elementskit-border-divider */
.page-title {
  font-family: var(--font-heading);
  color: var(--color-primary);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 600;
  margin-bottom: var(--space-xs);
}

.page-divider {
  margin-bottom: var(--space-md);
}

.page-divider__bar {
  height: 4px;
  width: 35px;
  background: var(--color-accent);
  border-radius: 2px;
  position: relative;
  margin-left: 27px;
}

.page-divider__bar::before {
  content: "";
  position: absolute;
  left: -27px;
  top: 0;
  display: inline-block;
  height: 4px;
  width: 4px;
  border-radius: 50%;
  background-color: var(--color-accent);
  box-shadow: 9px 0 0 0 var(--color-accent), 18px 0 0 0 var(--color-accent);
}

.page-subtitle {
  color: var(--color-secondary);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: var(--space-xs);
}

/* ---------- Content Sections ---------- */
.about-intro {
  max-width: 800px;
  margin: 0 auto;
}

.about-intro p {
  font-size: 1.1rem;
  line-height: 1.8;
}

/* Two-column layout */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
  align-items: start;
}

@media (max-width: 768px) {
  .two-col {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }
}

/* ---------- People Grid (Team / Advisory) ---------- */
.people-grid {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  justify-content: center;
}

.person-card {
  text-align: center;
  width: 220px;
}

.person-card img {
  width: 200px;
  height: 200px;
  object-fit: cover;
  border-radius: 50%;
  margin: 0 auto var(--space-sm);
  transition: transform 0.2s;
}

.person-card:hover img {
  transform: scale(1.05);
}

.person-card h3 {
  font-size: 1.2rem;
  color: var(--color-primary);
}

.person-card h3 a {
  color: var(--color-primary);
}

.person-card h3 a:hover {
  color: var(--color-accent);
}

.person-card .role {
  font-size: 0.9rem;
  color: var(--color-secondary);
  font-style: italic;
}

/* ---------- Bio Page ---------- */
.bio-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: var(--space-lg);
  align-items: start;
}

.bio-photo img {
  width: 100%;
  max-width: 300px;
  border-radius: 8px;
}

.bio-content h1 {
  margin-bottom: var(--space-xs);
}

.bio-content .bio-role {
  font-size: 1.1rem;
  color: var(--color-secondary);
  font-style: italic;
  margin-bottom: var(--space-md);
  font-family: var(--font-heading);
}

/* Bio page divider (ekit-dotted / elementskit-border-divider) */
.bio-divider {
  margin-bottom: var(--space-md);
}

.bio-divider__bar {
  height: 4px;
  width: 35px;
  background: var(--color-accent);
  border-radius: 2px;
  position: relative;
  margin-left: 27px;
}

.bio-divider__bar::before {
  content: "";
  position: absolute;
  left: -27px;
  top: 0;
  display: inline-block;
  height: 4px;
  width: 4px;
  border-radius: 50%;
  background-color: var(--color-accent);
  box-shadow: 9px 0 0 0 var(--color-accent), 18px 0 0 0 var(--color-accent);
}

.bio-content p {
  font-size: 1.05rem;
  line-height: 1.8;
}

@media (max-width: 768px) {
  .bio-layout {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }

  .bio-photo {
    text-align: center;
  }

  .bio-photo img {
    max-width: 250px;
    margin: 0 auto;
  }
}

/* ---------- Partners ---------- */
.partners-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-md);
}

.partner-card {
  padding: var(--space-md);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  transition: box-shadow 0.2s;
}

.partner-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.partner-card h4 {
  color: var(--color-primary);
  margin-bottom: var(--space-xs);
}

.partner-card p {
  font-size: 0.95rem;
}

.partner-card a {
  font-size: 0.9rem;
  font-weight: 500;
}

.partner-logo {
  max-height: 60px;
  width: auto;
  margin-bottom: var(--space-sm);
}

/* ---------- Vision / Mission Cards ---------- */
.vision-mission {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}

.vm-card {
  padding: var(--space-md);
  background: var(--color-white);
  border-left: 4px solid var(--color-accent);
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.vm-card h3 {
  color: var(--color-secondary);
  margin-bottom: var(--space-sm);
}

@media (max-width: 768px) {
  .vision-mission {
    grid-template-columns: 1fr;
  }
}

/* ---------- Focus Areas (Our Work) ---------- */
/* Work Pillars Overview Section */
.work-pillars {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  padding: var(--space-md) 0;
}

.work-pillars__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
  text-align: center;
}

.work-pillars__item h2 {
  color: var(--color-white);
  font-size: clamp(1.2rem, 2vw, 1.4rem);
  font-weight: 600;
  line-height: 1.4;
  text-transform: uppercase;
  margin-bottom: 0;
}

/* Work pillar brightened boxes */
.work-pillars__box {
  position: relative;
  background: rgba(200, 216, 236, 0.2);
  padding: 40px;
  border-radius: 4px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 768px) {
  .work-pillars__grid {
    grid-template-columns: 1fr;
    gap: var(--space-sm);
  }
}

/* Work Focus Hero (image sections between text) */
.work-focus-hero {
  position: relative;
  width: 100%;
  aspect-ratio: 1047 / 370;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  align-items: center;
}

.work-focus-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(279deg, #014079 0%, #FFA81C 100%);
  mix-blend-mode: screen;
  opacity: 0.89;
  display: flex;
  align-items: center;
}

.work-focus-hero__content {
  position: relative;
  z-index: 1;
  width: 100%;
  display: flex;
  align-items: center;
}

.work-focus-hero h2 {
  color: var(--color-white);
  font-size: clamp(1.5rem, 4vw, 3rem);
  font-weight: 600;
}

.focus-area {
  padding: var(--space-md) 0;
  border-bottom: 1px solid var(--color-border);
}

.focus-area:last-child {
  border-bottom: none;
}

.focus-area h3 {
  color: var(--color-secondary);
  margin-bottom: var(--space-sm);
}

/* ---------- Contact / Get Involved ---------- */
.contact-section .container {
  max-width: 700px;
}

.contact-info {
  margin-bottom: var(--space-md);
}

.contact-info li {
  padding: var(--space-xs) 0;
  font-size: 1.05rem;
}

.contact-info li::before {
  content: "→ ";
  color: var(--color-accent);
  font-weight: 600;
}

/* ---------- Donate ---------- */
.donate-section .container {
  max-width: 700px;
}

.donate-highlights {
  margin: var(--space-md) 0;
}

.donate-highlights li {
  padding: var(--space-xs) 0;
  font-size: 1.05rem;
}

.donate-highlights li strong {
  color: var(--color-primary);
}

.donate-limits {
  margin: var(--space-md) 0;
  padding: var(--space-md);
  background: var(--color-light);
  border-radius: 8px;
}

.donate-limits h4 {
  margin-bottom: var(--space-sm);
}

.donate-limits li {
  padding: var(--space-xs) 0;
}

/* ---------- Footer ---------- */
.site-footer {
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  color: var(--color-white);
  padding: var(--space-lg) 0 var(--space-md);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: var(--space-lg);
  margin-bottom: var(--space-md);
}

.footer-about img {
  height: 70px;
  width: auto;
  max-width: 100%;
  margin-bottom: var(--space-sm);
}

.footer-about p {
  font-size: 0.95rem;
  opacity: 0.9;
  line-height: 1.7;
}

.footer-nav h4 {
  color: var(--color-white);
  margin-bottom: var(--space-sm);
  font-size: 1.1rem;
}

.footer-nav ul {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.footer-nav a {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.95rem;
  transition: color 0.2s;
}

.footer-nav a:hover {
  color: var(--color-white);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding-top: var(--space-sm);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  opacity: 0.8;
}

.footer-credit a {
  color: var(--color-white);
}

.footer-credit a:hover {
  color: rgba(255, 255, 255, 0.8);
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }

  .footer-bottom {
    flex-direction: column;
    gap: var(--space-xs);
    text-align: center;
  }
}

/* ---------- Image cards (home page) ---------- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-md);
}

.feature-card {
  text-align: center;
  padding: var(--space-md);
}

.feature-card img {
  width: 100%;
  max-width: 300px;
  margin: 0 auto var(--space-sm);
  border-radius: 8px;
}

.feature-card h3 {
  color: var(--color-secondary);
  margin-bottom: var(--space-xs);
}

/* ---------- Home Page Two-Column Layout ---------- */
.home-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
  align-items: center;
}

.home-two-col h2 {
  color: var(--color-secondary);
}

.home-two-col__image img {
  width: 100%;
  border-radius: 8px;
}

@media (max-width: 768px) {
  .home-two-col {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }
}

/* Home "What Is GRI?" distinguished section */
.what-is-gri {
  background: var(--color-white);
  padding: var(--space-lg);
  box-shadow: 0px 12px 13px -11px rgba(0, 0, 0, 0.5);
  border-radius: 4px;
}

/* Home Mission Section (peach/warm background) */
.home-mission-section {
  background: linear-gradient(135deg, #fce4c4 0%, #f8d8b0 100%);
}

.home-mission-inner {
  max-width: 600px;
  margin-left: auto;
}

.home-mission-inner h2 {
  color: var(--color-secondary);
}

/* Home Approach Section */
.home-approach {
  max-width: 600px;
}

.home-approach h2 {
  color: var(--color-secondary);
}

/* ---------- Work Page Lists ---------- */
.work-list {
  margin: var(--space-sm) 0 var(--space-md);
  padding-left: var(--space-md);
}

.work-list li {
  padding: var(--space-xs) 0;
  font-size: 1.05rem;
  list-style: disc;
}

/* ---------- Founder Detail (About Page) ---------- */
.founder-detail {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: var(--space-lg);
  align-items: start;
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid var(--color-border);
}

.founder-detail:last-of-type {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.founder-detail__photo img {
  width: 250px;
  height: 250px;
  object-fit: cover;
  border-radius: 50%;
}

.founder-detail__info h3 {
  color: var(--color-primary);
  margin-bottom: 0;
}

.founder-detail__info .role {
  font-size: 0.95rem;
  color: var(--color-secondary);
  font-style: italic;
  margin-bottom: var(--space-sm);
}

.founder-detail__info h4 {
  color: var(--color-secondary);
  margin-bottom: var(--space-xs);
  margin-top: var(--space-sm);
}

.founder-list {
  margin: var(--space-xs) 0 var(--space-sm);
  padding-left: var(--space-md);
}

.founder-list li {
  padding: var(--space-xs) 0;
  font-size: 0.95rem;
  list-style: disc;
  line-height: 1.6;
}

@media (max-width: 768px) {
  .founder-detail {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }

  .founder-detail__photo {
    text-align: center;
  }

  .founder-detail__photo img {
    margin: 0 auto;
  }
}

/* ---------- Newsletter ---------- */
.newsletter {
  background: var(--color-light);
  padding: var(--space-lg) 0;
  text-align: center;
}

.newsletter h3 {
  color: var(--color-secondary);
  margin-bottom: var(--space-sm);
}

.newsletter p {
  margin-bottom: var(--space-md);
  font-size: 0.95rem;
}

.newsletter-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 500px;
  margin: 0 auto;
}

.newsletter-form input,
.contact-form input,
.contact-form textarea {
  padding: 10px;
  font-size: 1em;
  font-family: var(--font-body);
  border: 1px solid var(--color-border);
  border-radius: 4px;
  width: 100%;
}

.newsletter-form input:focus,
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 2px rgba(16, 172, 197, 0.2);
}

.newsletter-form button,
.contact-form button {
  padding: 10px 24px;
  font-size: 1em;
  cursor: pointer;
}

.newsletter-dialog {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border: none;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
  width: min(520px, calc(100% - 48px));
  max-height: min(90vh, 720px);
  overflow: auto;
  padding: 0;
}

.newsletter-dialog::backdrop {
  background: rgba(0, 0, 0, 0.55);
}

.newsletter-dialog__form {
  padding: 32px 28px;
  display: grid;
  gap: 16px;
}

.newsletter-dialog__close {
  justify-self: end;
  background: transparent;
  border: none;
  color: var(--color-text);
  font-size: 1.8rem;
  line-height: 1;
  padding: 0;
  cursor: pointer;
}

.newsletter-dialog h2 {
  margin: 0;
  font-size: 1.4rem;
}

@media (max-width: 640px) {
  .newsletter-dialog__form {
    padding: 24px 18px;
  }
}
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 600px;
  margin: 0 auto;
}

.contact-form__newsletter-opt-in {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9em;
  color: var(--color-text);
  cursor: pointer;
}

.contact-form__newsletter-opt-in input[type="checkbox"] {
  width: auto;
  margin: 0;
  accent-color: var(--color-accent);
  cursor: pointer;
}

.contact-form-section {
  max-width: 700px;
}

/* ---------- Donate iframe ---------- */
.donate-iframe {
  margin-top: var(--space-md);
}

/* ---------- Legal Pages (Imprint, Privacy) ---------- */
.legal-page {
  max-width: 800px;
  margin: 0 auto;
}

.legal-page h2 {
  margin-top: var(--space-lg);
  color: var(--color-secondary);
}

.legal-page h3 {
  margin-top: var(--space-md);
  color: var(--color-primary);
}

.legal-list {
  margin: var(--space-sm) 0 var(--space-md);
  padding-left: var(--space-md);
}

.legal-list li {
  padding: var(--space-xs) 0;
  list-style: disc;
  font-size: 1.05rem;
}

/* ---------- Accessibility ---------- */
.skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  padding: var(--space-xs) var(--space-sm);
  background: var(--color-accent);
  color: var(--color-white);
  z-index: 9999;
}

.skip-link:focus {
  top: 0;
}

/* Page offset for fixed header */
main {
  padding-top: var(--header-height);
}

/* Pages with hero don't need the offset on main */
.has-hero main {
  padding-top: 0;
}

/* Hero already has its own top padding */
.hero {
  margin-top: 0;
}

/* ---------- Founders Section ---------- */
.founders-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
}

.founder-card {
  text-align: center;
}

.founder-card img {
  width: 250px;
  height: 250px;
  object-fit: cover;
  border-radius: 50%;
  margin: 0 auto var(--space-sm);
}

.founder-card h3 {
  color: var(--color-primary);
  margin-bottom: 0;
}

.founder-card .role {
  font-size: 0.95rem;
  color: var(--color-secondary);
  font-style: italic;
  margin-bottom: var(--space-sm);
}

.founder-card p {
  font-size: 0.95rem;
  text-align: left;
}

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

/* Board of Directors - single card */
.board-card {
  text-align: center;
  max-width: 400px;
  margin: 0 auto;
}

.board-card img {
  width: 200px;
  height: 200px;
  object-fit: cover;
  border-radius: 50%;
  margin: 0 auto var(--space-sm);
}

.board-card h3 a {
  color: var(--color-primary);
}

.board-card h3 a:hover {
  color: var(--color-accent);
}

/* ---------- Nav Dropdown (Streams) ---------- */
.nav-dropdown {
  position: relative;
}

.nav-dropdown__trigger-row {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-dropdown__trigger {
  cursor: pointer;
}

.nav-dropdown__toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.4rem;
  height: 1.4rem;
  border: 0;
  border-radius: 2px;
  background: transparent;
  color: var(--color-primary);
  cursor: pointer;
  padding: 0;
}

.nav-dropdown__caret {
  font-size: 1.3rem;
  line-height: 1;
  transition: transform 0.2s;
}

.nav-dropdown__toggle[aria-expanded="true"] .nav-dropdown__caret {
  transform: rotate(180deg);
}

.nav-dropdown__panel {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  min-width: 220px;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-top: 3px solid var(--color-accent);
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
  border-radius: 0 0 4px 4px;
  padding: var(--space-sm) 0;
  z-index: 2000;
}

.nav-dropdown__panel.open {
  display: block;
}

.nav-dropdown__label {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-secondary);
  padding: 0 var(--space-sm) var(--space-xs);
  margin: 0;
}

.nav-dropdown__section {
  padding: var(--space-xs) 0;
}

.nav-dropdown__section + .nav-dropdown__section {
  border-top: 1px solid var(--color-border);
}

.nav-dropdown__link {
  display: block;
  padding: 0.45rem var(--space-sm);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--color-primary);
  text-transform: none;
  letter-spacing: 0;
  transition: background 0.15s, color 0.15s;
}

.nav-dropdown__link:hover {
  background: var(--color-light);
  color: var(--color-accent);
}

/* Mobile: show dropdown inline */
@media (max-width: 768px) {
  .nav-dropdown {
    width: 100%;
  }

  .nav-dropdown__trigger-row {
    width: 100%;
    justify-content: flex-start;
    gap: 0.6rem;
  }

  .nav-dropdown__toggle {
    color: var(--color-white);
    width: 2rem;
    height: 2rem;
    border: 1px solid rgba(255,255,255,0.35);
  }

  .nav-dropdown__caret {
    font-size: 1.5rem;
    line-height: 1;
    font-weight: 700;
  }

  .nav-dropdown__panel {
    position: static;
    transform: none;
    box-shadow: none;
    border: none;
    border-top: none;
    border-left: 2px solid var(--color-accent);
    margin-left: var(--space-sm);
    padding: 0;
    background: transparent;
  }

  .nav-dropdown__panel.open {
    display: block;
  }

  .nav-dropdown__link {
    color: rgba(255,255,255,0.85);
    font-size: 0.85rem;
  }

  .nav-dropdown__link:hover {
    background: rgba(255,255,255,0.1);
    color: var(--color-white);
  }

  .nav-dropdown__label {
    color: rgba(255,255,255,0.5);
  }
}

/* ---------- Post Cards (Homepage + Stream page) ---------- */
.latest-posts .section-title {
  margin-bottom: var(--space-md);
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-md);
}

.post-card {
  border: 1px solid var(--color-border);
  border-top: 3px solid var(--color-accent);
  border-radius: 4px;
  padding: var(--space-md);
  background: var(--color-white);
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  transition: box-shadow 0.2s;
}

.post-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

.post-card__meta {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

.post-card__stream {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-white);
  background: var(--color-secondary);
  padding: 2px 8px;
  border-radius: 2px;
  text-decoration: none;
  transition: background 0.2s;
}

.post-card__stream:hover {
  background: var(--color-accent);
  color: var(--color-white);
}

.post-card__date {
  font-family: var(--font-body);
  font-size: 0.8rem;
  color: #888;
}

.post-card__title {
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  font-weight: 600;
  margin-bottom: 0;
  line-height: 1.3;
}

.post-card__title a {
  color: var(--color-primary);
  text-decoration: none;
}

.post-card__title a:hover {
  color: var(--color-accent);
}

.post-card__author {
  font-size: 0.85rem;
  color: var(--color-secondary);
  font-weight: 500;
  margin: 0;
}

.post-card__excerpt {
  font-size: 0.9rem;
  color: var(--color-text);
  line-height: 1.6;
  flex: 1;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card__read-more {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--color-accent);
  text-decoration: none;
  margin-top: auto;
}

.post-card__read-more:hover {
  color: var(--color-secondary);
}

/* ---------- Stream Page ---------- */
.stream-hero {
  border-bottom: 1px solid var(--color-border);
}

.stream-eyebrow {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--color-accent);
  margin-bottom: var(--space-xs);
}

.stream-description {
  font-size: 1.1rem;
  color: var(--color-text);
  max-width: 700px;
  margin-top: var(--space-sm);
}

/* ---------- Blog Post ---------- */
.blog-post__container {
  max-width: 760px;
}

.blog-post__header {
  margin-bottom: var(--space-md);
  border-bottom: 1px solid var(--color-border);
  padding-bottom: var(--space-md);
}

.blog-post__stream-tag {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-white);
  background: var(--color-secondary);
  padding: 2px 10px;
  border-radius: 2px;
  text-decoration: none;
  margin-bottom: var(--space-xs);
  transition: background 0.2s;
}

.blog-post__stream-tag:hover {
  background: var(--color-accent);
  color: var(--color-white);
}

.blog-post__title {
  margin-top: var(--space-xs);
  margin-bottom: var(--space-xs);
}

.blog-post__byline {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--font-body);
  font-size: 0.875rem;
  color: #888;
  flex-wrap: wrap;
}

.blog-post__author {
  font-weight: 500;
  color: var(--color-secondary);
}

.blog-post__body {
  margin-bottom: var(--space-lg);
}

.blog-post__footer {
  padding-top: var(--space-md);
  border-top: 1px solid var(--color-border);
}

/* Rich text (blog post body) */
.rich-text p {
  margin-bottom: var(--space-sm);
  line-height: 1.75;
}

.rich-text h1,
.rich-text h2,
.rich-text h3 {
  margin-top: var(--space-md);
  margin-bottom: var(--space-xs);
}

.rich-text strong {
  font-weight: 600;
  color: var(--color-primary);
}

.rich-text em {
  font-style: italic;
  color: #555;
}

.rich-text blockquote {
  border-left: 3px solid var(--color-accent);
  padding-left: var(--space-sm);
  margin: var(--space-md) 0;
  color: #555;
  font-style: italic;
}

.blog-post__hero,
.blog-post__gallery,
.blog-post__image-pair,
.blog-post__custom-grid,
.blog-post__videos,
.body-image,
.body-video,
.body-gallery {
  margin: var(--space-md) 0;
}

.blog-post__hero img,
.gallery-item img,
.image-pair__item img,
.custom-grid__item img,
.body-image img,
.body-gallery__item img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 4px;
}

.gallery-grid,
.image-pair,
.custom-grid,
.body-gallery {
  display: grid;
  gap: var(--space-sm);
}

.gallery-grid,
.custom-grid,
.body-gallery {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.custom-grid--cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.custom-grid--cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.custom-grid--cols-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.image-pair {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.video-embed {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  border-radius: 4px;
  overflow: hidden;
  background: #000;
}

/* ---------- Slideshow ---------- */
.body-slideshow {
  margin: var(--space-md) 0;
  background: var(--color-primary);
  border-radius: 4px;
  overflow: hidden;
}

/* viewport clips the sliding track; arrows are positioned inside here */
.body-slideshow__viewport {
  position: relative;
  overflow: hidden;
}

.body-slideshow__track {
  display: flex;
  align-items: flex-start;
  transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

.body-slideshow__slide {
  flex: 0 0 100%;
  min-width: 0;
  margin: 0;
}

/* All images shown at 16:9 with letterboxing — prevents height jumps */
.body-slideshow__slide img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  display: block;
  cursor: zoom-in;
  background: var(--color-primary);
}

.body-slideshow__slide figcaption {
  padding: 0.45rem 1rem;
  background: rgba(0, 0, 0, 0.55);
  color: var(--color-white);
  font-size: 0.85rem;
  text-align: center;
}

.body-slideshow__btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: var(--color-white);
  font-size: 2rem;
  line-height: 0;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: background 0.2s, border-color 0.2s;
}

.body-slideshow__btn:hover,
.body-slideshow__btn:focus-visible {
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.6);
  outline: none;
}

.body-slideshow__btn--prev { left: 0.75rem; }
.body-slideshow__btn--next { right: 0.75rem; }

.body-slideshow__dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 0;
  background: rgba(0, 0, 0, 0.35);
}

.body-slideshow__dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background 0.2s, transform 0.2s;
}

.body-slideshow__dot.active,
.body-slideshow__dot:hover {
  background: var(--color-accent);
  transform: scale(1.25);
}

@media (max-width: 640px) {
  .body-slideshow__btn {
    width: 2rem;
    height: 2rem;
    font-size: 1.4rem;
  }
}

/* ---------- Clickable images (inline + gallery) ---------- */
.body-image img,
.body-gallery__item img,
.blog-post__hero img,
.gallery-item img,
.image-pair__item img,
.custom-grid__item img {
  cursor: zoom-in;
}

/* ---------- Lightbox ---------- */
.gri-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9000;
  flex-direction: column;
}

.gri-lightbox.open {
  display: flex;
}

/* Full-viewport dark backdrop — clicking it closes the lightbox */
.gri-lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  z-index: 0;
  cursor: default;
}

/* ── Top bar: counter left, buttons right ── */
.gri-lightbox__bar {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.55rem 0.75rem;
  flex-shrink: 0;
}

.gri-lightbox__counter {
  color: rgba(255,255,255,0.55);
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  pointer-events: none;
}

.gri-lightbox__bar-actions {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.gri-lightbox__close {
  background: transparent;
  border: none;
  color: rgba(255,255,255,0.75);
  cursor: pointer;
  padding: 0;
  width: 2.2rem;
  height: 2.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: color 0.15s, background 0.15s;
}

.gri-lightbox__close:hover {
  color: var(--color-white);
  background: rgba(255,255,255,0.12);
}

/* ── Stage: prev | image | next ── */
.gri-lightbox__stage {
  position: relative;
  z-index: 2;
  flex: 1 1 auto;
  display: flex;
  align-items: stretch;
  min-height: 0;
}

.gri-lightbox__img-wrap {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  cursor: default;
}

.gri-lightbox__img-wrap img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
  user-select: none;
  transition: opacity 0.2s;
  border-radius: 2px;
}

.gri-lightbox__img-wrap img.fading {
  opacity: 0;
}

.gri-lightbox__prev,
.gri-lightbox__next {
  flex-shrink: 0;
  align-self: center;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: var(--color-white);
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 0.6rem;
  transition: background 0.2s, border-color 0.2s;
}

.gri-lightbox__prev:hover,
.gri-lightbox__next:hover {
  background: rgba(255,255,255,0.25);
  border-color: rgba(255,255,255,0.5);
}

.gri-lightbox__prev[hidden],
.gri-lightbox__next[hidden] {
  visibility: hidden;
  pointer-events: none;
}

/* ── Caption ── */
.gri-lightbox__caption {
  position: relative;
  z-index: 2;
  flex-shrink: 0;
  color: rgba(255,255,255,0.7);
  font-size: 0.85rem;
  text-align: center;
  padding: 0.5rem 1rem 0.75rem;
  min-height: 2rem;
}

@media (max-width: 600px) {
  .gri-lightbox__prev,
  .gri-lightbox__next {
    width: 2.2rem;
    height: 2.2rem;
    font-size: 1.6rem;
    margin: 0 0.3rem;
  }
}
/* -------------------------------- */

.video-embed iframe,
.video-embed video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.body-image figcaption,
.body-video figcaption,
.blog-post__video figcaption {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: #666;
}

@media (max-width: 768px) {
  .image-pair {
    grid-template-columns: 1fr;
  }
}

/* ---------- CMS content (Payload page sections & rich text) ---------- */

/* Text colours editors pick in the rich-text editor (keys from cms/src/fields/richText.ts) */
.text-color-white { color: #ffffff; }
.text-color-gold { color: #fcdc9f; }
.text-color-navy { color: #00253F; }
.text-color-ocean { color: #02597D; }
.text-color-teal { color: #10ACC5; }

/* Section backgrounds */
.section--warm {
  background: linear-gradient(135deg, #fce4c4 0%, #f8d8b0 100%);
}

/* Text section widths and styles */
.content-narrow {
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.content-narrow p {
  font-size: 1.1rem;
  line-height: 1.8;
}

.content-card {
  background: var(--color-white);
  padding: var(--space-lg);
  box-shadow: 0px 12px 13px -11px rgba(0, 0, 0, 0.5);
  border-radius: 4px;
}

.content-box {
  padding: var(--space-md);
  background: var(--color-light);
  border-radius: 8px;
}

.content-box p {
  font-size: 1rem;
}

/* Sections that continue the one above (donation form, info boxes) sit closer to it */
.block-embed,
.block-text--box {
  padding-top: 0;
}

@media (max-width: 768px) {
  .content-card {
    padding: var(--space-md);
  }
}

/* Rich text elements */
.rich-text h2 { color: var(--color-secondary); }
.rich-text h3 { color: var(--color-primary); }
.content-narrow h2 { margin-top: var(--space-lg); }
.content-narrow h3 { margin-top: var(--space-md); }
.content-narrow > :first-child { margin-top: 0; }
.rich-text h4 { margin: var(--space-sm) 0 var(--space-xs); }

.rich-text ul,
.rich-text ol {
  margin: var(--space-sm) 0 var(--space-md);
  padding-left: var(--space-md);
}

.rich-text ul li { list-style: disc; }
.rich-text ol li { list-style: decimal; }
.rich-text li { padding: var(--space-xs) 0; font-size: 1.05rem; line-height: 1.6; }
.rich-text li.nested { list-style: none; }

.text-center.rich-text ul,
.text-center.rich-text ol {
  display: inline-block;
  text-align: left;
}

.rich-text hr {
  border: 0;
  border-top: 1px solid var(--color-border);
  margin: var(--space-md) 0;
}

.rich-text__button {
  margin: var(--space-md) 0;
}

/* Contact intro list keeps its arrow markers */
.contact-info ul {
  padding-left: 0;
}

.contact-info li {
  list-style: none;
}

/* Gallery layouts */
.body-gallery--grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.body-gallery--grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.body-gallery--grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.body-gallery--masonry {
  display: block;
  columns: 3 220px;
  column-gap: var(--space-sm);
}

.body-gallery--masonry .body-gallery__item {
  break-inside: avoid;
  margin-bottom: var(--space-sm);
}

.body-gallery__item figcaption {
  margin-top: 0.4rem;
  font-size: 0.85rem;
  color: #666;
}

@media (max-width: 640px) {
  .body-gallery--grid-3,
  .body-gallery--grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Embeds (donation form etc.) */
.embed-frame {
  position: relative;
  overflow: hidden;
  width: 100%;
}

.embed-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
