:root{
  --page-max: 1300px;
  --gap: 1rem;
  --pad: 1rem;
  --bg: #94bc44;   /* page background */
  --fg: #222;
  --card: #ffffff; /* card background */
  --border: #ddd;
}

/* Reset & base */
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font: 16px/1.5 system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--fg);
  background: var(--bg);
}

/* Page grid */
.page {
  display: grid;
  grid-template-columns: 1fr 1fr;              /* equal widths for main and sidebar */
  grid-template-rows: auto 1fr auto;           /* header auto, middle grows, footer auto */
  grid-template-areas:
    "header header"
    "main   sidebar"
    "footer footer";
  gap: var(--gap);
  min-height: 100svh;
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 10px;
}

/* Grid regions */
header { grid-area: header; }
main   { grid-area: main; }
aside  { grid-area: sidebar; }
footer { grid-area: footer; }

/* Blocks: default single-card areas */
header, main, aside > .sidebar-card, footer {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: var(--pad);
}

/* ---------- Header layout ---------- */
header .header-inner {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo { height: 44px; width: auto; vertical-align: middle; }

header h1 {
  margin: 0;
  font-size: clamp(1.2rem, 2vw + 0.6rem, 2rem);
  font-weight: 800;
}
header h1 a { color: inherit; text-decoration: none; }
header h1 a:hover { text-decoration: underline; }

/* Main nav + CTA */
.main-nav {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: auto;    /* push nav + button + icons to the right */
}
/* Bigger, bolder header links */
.main-nav a {
  font-size: 1.1rem;
  font-weight: 700;
  color: #222;
  text-decoration: none;
  line-height: 1.2;
  padding: 2px 0;
}
.main-nav a:hover,
.main-nav a:focus { text-decoration: underline; }

/* Newsletter button */
.newsletter-button {
  display: inline-block;
  background: #76a736;
  color: #fff;
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 6px;
  font-weight: 700;
  margin-left: 8px;
}
.newsletter-button:hover,
.newsletter-button:focus { background: #5f8b2b; }

/* Social / contact icons */
.social-icons {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: 8px;
}
.social-icons a {
  display: inline-flex;
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
}
.social-icons img,
.social-icons svg {
  width: 24px !important;
  height: 24px !important;
  display: block;
}

/* Typography */
h2 { margin: 0 0 0.5rem; font-size: clamp(1.3rem, 1.2vw + 0.8rem, 1.8rem); }
h3 { margin: 0 0 0.5rem; font-size: clamp(1.1rem, 0.9vw + 0.7rem, 1.3rem); }
.highlight { color: #6aa10f; font-weight: 800; }

p { margin: 0 0 0.75rem; }
ul { margin: 0.5rem 0 0.75rem 1.25rem; }

/* Sidebar column: stack cards with a gap */
aside { 
  display: flex;
  flex-direction: column;
  gap: var(--gap);              /* ensures the RHS bubbles have a gap */
}
aside > .sidebar-card h3 { margin-bottom: 0.25rem; }

/* ---------- Index-only split layout ---------- */
/* Remove card from <main> and apply to child cards */
.split-main {
  background: transparent;
  border: 0;
  padding: 0;

  display: flex;                /* stack the two left cards */
  flex-direction: column;
  gap: var(--gap);              /* same gap as sidebar */
}

/* The two left bubbles */
.split-main > .main-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: var(--pad);
}

/* Make bottom cards flex so column bottoms align */
.split-main > .main-card:last-child,
aside > .sidebar-card:last-child {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
}

/* ---------- Full-width main (pages without a sidebar, e.g. 404) ---------- */
main.full-main {
  grid-column: 1 / -1;          /* span both columns */
}

/* Buttons (shared) */
.button-link {
  display: inline-block;
  padding: 10px 14px;
  background: #76a736;
  color: #fff;
  text-decoration: none;
  border-radius: 6px;
  font-weight: 600;
  transition: background 0.2s ease-in-out;
}
.button-link:hover { background: #5f8b2b; }

/* ---------- Footer (match header link style) ---------- */
footer {
  font-size: 1.1rem;
  font-weight: 700;
  color: #222;
  text-align: center;
}
footer .footer-top,
footer .footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin: 6px 0;
}
footer a {
  color: #222;
  text-decoration: none;
  font-weight: 700;
}
footer a:hover,
footer a:focus { text-decoration: underline; }

/* ---------- About page portraits: consistent thumbnail size (240px) ---------- */
.about-profile-row {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}
.about-profile-row img {
  width: 240px;
  height: 240px;
  flex: 0 0 240px;     /* keep column width fixed */
  object-fit: cover;   /* crop to square nicely */
  border-radius: 6px;
}

/* ---------- Sponsor logos grid ---------- */
.sponsor-logos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
  align-items: center;
  justify-items: center;
  margin-top: 0.5rem;
}
.sponsor-logos img {
  display: block;
  max-width: 100%;
  height: 60px;          /* uniform height for all logos */
  object-fit: contain;   /* keep aspect ratio without cropping */
}

/* ---------- Vertically center the YouTube video in #video-box ---------- */
#video-box {
  display: flex;          /* already flex due to last-child rule, but explicit here */
  flex-direction: column;
}
/* Center ONLY the responsive iframe wrapper (last child),
   leaving the heading at the top of the card */
#video-box > :last-child {
  margin-top: auto;
  margin-bottom: auto;   /* shorthand: margin-block: auto; */
}

/* Optional legacy portrait styles */
.featured-speaker {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 12px 0;
}
.featured-speaker img {
  display: inline-block;
  max-height: 420px;
  width: auto;
  min-height: 300px;
  border-radius: 10px;
  border: 1px solid var(--border);
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

/* Responsive */
@media (max-width: 900px) {
  .page {
    grid-template-columns: 1fr;
    grid-template-areas:
      "header"
      "main"
      "sidebar"
      "footer";
  }
  .main-nav { flex-wrap: wrap; }
  header .header-inner { align-items: flex-start; gap: 8px; }
}

