/* ==========================================================================
   Oral History Archives Project (OHAP) / Peace Corps Oral History
   Static site stylesheet
   ========================================================================== */

:root {
  --accent: #f9a11b;
  --dark: #30373a;
  --white: #ffffff;
  --gray-bg: #f5f5f3;
  --gray-text: #5a6165;
  --max-width: 1100px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Roboto', Arial, sans-serif;
  color: var(--dark);
  background: var(--white);
  line-height: 1.6;
}

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

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { font-weight: 500; line-height: 1.25; }

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

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
  background: var(--dark);
  color: var(--white);
  padding: 10px 16px;
  z-index: 1000;
}
.skip-link:focus { left: 10px; top: 10px; }

/* ---------- Header / Nav ---------- */
.site-header {
  background: var(--white);
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  position: relative;
  z-index: 50;
}
.nav-wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 10px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { height: 64px; width: auto; }
.brand-text { font-size: 1.1rem; font-weight: 700; color: var(--dark); line-height: 1.2; }
.brand-text small { display: block; font-weight: 400; font-size: 0.75rem; color: var(--gray-text); }

.nav-toggle {
  display: none;
  background: none;
  border: 2px solid var(--dark);
  border-radius: 4px;
  padding: 6px 10px;
  font-size: 1.2rem;
  cursor: pointer;
}

nav.main-nav ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 0;
}
nav.main-nav > ul > li { position: relative; }
nav.main-nav a.top-link,
nav.main-nav button.top-link {
  display: inline-block;
  padding: 10px 14px;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--dark);
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
}
nav.main-nav a.top-link:hover,
nav.main-nav button.top-link:hover { color: var(--accent); text-decoration: none; }

/* "Be Interviewed" nav button — dark fill, light text */
nav.main-nav a.top-link.nav-cta {
  background: var(--dark);
  color: var(--white);
  border-radius: 4px;
  padding: 9px 16px;
  margin-left: 8px;
  text-transform: uppercase;
  font-size: 0.82rem;
  letter-spacing: 0.03em;
}
nav.main-nav a.top-link.nav-cta:hover { background: var(--accent); color: var(--white); }

nav.main-nav ul.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--white);
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
  min-width: 260px;
  padding: 8px 0;
  border-radius: 4px;
  list-style: none;
  margin: 0;
}
nav.main-nav ul.dropdown-menu.show { display: block; }

/* Desktop: open dropdowns on hover (and keyboard focus) */
@media (min-width: 701px) and (hover: hover) {
  nav.main-nav > ul > li:hover > ul.dropdown-menu,
  nav.main-nav > ul > li:focus-within > ul.dropdown-menu { display: block; }
}

.dropdown-menu li a {
  display: block;
  padding: 9px 18px;
  color: var(--dark);
  font-size: 0.92rem;
  white-space: normal;
}
.dropdown-menu li a:hover { background: var(--gray-bg); color: var(--accent); text-decoration: none; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background-size: cover;
  background-position: center;
  min-height: 340px;
  display: flex;
  align-items: flex-end;
  border-bottom: 6px solid var(--accent);
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(48,55,58,0.35) 0%, rgba(48,55,58,0.75) 100%);
}
.hero-inner {
  position: relative;
  z-index: 1;
  padding: 40px 24px 32px;
  max-width: var(--max-width);
  margin: 0 auto;
  width: 100%;
}
.hero h1 {
  color: var(--white);
  font-size: 2.2rem;
  font-weight: 300;
  margin: 0 0 6px;
}
.hero p.tagline {
  color: var(--white);
  font-size: 1.1rem;
  margin: 0;
}
.hero.hero-small { min-height: 400px; }

/* ---------- Sections ---------- */
section { padding: 48px 0; }
section.alt-bg { background: var(--gray-bg); }
.section-title {
  text-align: center;
  margin-bottom: 32px;
}
.section-title h2 { font-size: 1.6rem; margin-bottom: 8px; }
.section-title .rule {
  width: 60px;
  height: 3px;
  background: var(--accent);
  margin: 0 auto;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  background: var(--dark);
  color: var(--white) !important;
  padding: 12px 26px;
  border-radius: 4px;
  font-weight: 500;
  text-decoration: none !important;
  transition: background 0.2s ease;
  border: none;
  cursor: pointer;
  font-size: 0.95rem;
}
.btn:hover { background: var(--accent); }
.btn-outline {
  background: transparent;
  color: var(--dark) !important;
  border: 2px solid var(--dark);
}
.btn-outline:hover { background: var(--dark); color: var(--white) !important; }

/* ---------- CTA banner ---------- */
.cta-banner {
  background: var(--dark);
  color: var(--white);
  text-align: center;
  padding: 48px 24px;
}
.cta-banner h2 { color: var(--white); margin-top: 0; }
.cta-banner p { max-width: 700px; margin: 0 auto 20px; }
/* Button shares the banner's dark background, so outline it */
.cta-banner .btn { border: 2px solid var(--white); }

/* ---------- Feature rows (home) ---------- */
.feature-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  padding: 40px 0;
  border-bottom: 1px solid #e4e4e2;
}
.feature-row:last-child { border-bottom: none; }
.feature-row .video-wrap {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: 6px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.15);
}
.feature-row .video-wrap iframe {
  position: absolute; inset: 0; width: 100%; height: 100%; border: 0;
}
.feature-row h3 { font-size: 0.95rem; text-transform: uppercase; letter-spacing: 0.03em; color: var(--accent); margin: 0 0 6px; }
.feature-row h4 { font-size: 1.4rem; margin: 0 0 12px; }
.feature-row.reverse .text-col { order: 2; }
.feature-row.reverse .video-col { order: 1; }

/* Standalone responsive video embed (content pages) */
.video-frame {
  max-width: 720px;
  margin: 0 auto 24px;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 6px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.15);
}
.video-frame iframe { display: block; width: 100%; height: 100%; border: 0; }

/* Inline screenshot / figure image (content pages) */
.screenshot {
  max-width: 640px;
  margin: 8px auto 4px;
  border: 1px solid #e4e4e2;
  border-radius: 6px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.12);
}

/* ---------- News list ---------- */
.news-list { list-style: none; margin: 0; padding: 0; }
.news-list li {
  padding: 18px 0;
  border-bottom: 1px solid #e4e4e2;
}
.news-list li:last-child { border-bottom: none; }
.news-list .news-date { font-size: 0.85rem; color: var(--gray-text); display: block; margin-top: 4px; }
.news-list a { font-weight: 500; font-size: 1.05rem; }

/* ---------- Vision / Mission ---------- */
.vm-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}
.vm-grid h3 { color: var(--accent); text-transform: uppercase; font-size: 1rem; letter-spacing: 0.04em; margin-bottom: 10px; }

/* ---------- Affiliate blurb ---------- */
.affiliate {
  display: flex;
  gap: 28px;
  align-items: center;
  background: var(--gray-bg);
  padding: 32px;
  border-radius: 8px;
}
.affiliate img { width: 110px; flex-shrink: 0; }

/* ---------- Team grid ---------- */
.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  text-align: center;
}
.team-photo {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 14px;
  border: 4px solid var(--gray-bg);
}
.team-grid h3 { margin: 0 0 4px; font-size: 1.1rem; }
.team-grid .role { color: var(--gray-text); font-size: 0.88rem; margin-bottom: 10px; }
.bio-link { font-weight: 500; }

/* ---------- Team full bios (linkable/shareable fallback for the modal) ---------- */
.team-bios { margin-top: 56px; padding-top: 40px; border-top: 1px solid #e4e4e2; }
.team-bio {
  display: flex;
  gap: 24px;
  padding: 26px 0;
  border-bottom: 1px solid #e4e4e2;
  text-align: left;
  scroll-margin-top: 20px;
}
.team-bio:last-child { border-bottom: none; }
.team-bio-photo {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 4px solid var(--gray-bg);
}
.team-bio-text h3 { margin: 0 0 2px; font-size: 1.15rem; }
.team-bio-text .role { color: var(--gray-text); font-size: 0.85rem; margin-bottom: 10px; }
.bio-content p:last-child { margin-bottom: 0; }
@media (max-width: 600px) {
  .team-bio { flex-direction: column; text-align: center; }
  .team-bio-photo { margin: 0 auto; }
}

/* ---------- Bio modal ---------- */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-overlay.show { display: flex; }
.modal-box {
  background: var(--white);
  border-radius: 8px;
  max-width: 560px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  padding: 28px 32px;
  position: relative;
}
.modal-box h3 { margin-top: 0; }
.modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: none;
  border: none;
  font-size: 1.4rem;
  cursor: pointer;
  color: var(--gray-text);
  line-height: 1;
}

/* ---------- Archive cards ---------- */
.archive-card {
  border: 1px solid #e4e4e2;
  border-radius: 8px;
  padding: 28px;
  margin-bottom: 24px;
}
.archive-card h3 { margin-top: 0; }
.archive-card .links { margin-top: 14px; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.archive-logo { height: 64px; width: auto; margin-bottom: 18px; padding-bottom: 18px; border-bottom: 1px solid #e4e4e2; }

/* map card: text on the left, a graphic filling the full height on the right */
.archive-card--map { padding: 0; display: flex; align-items: stretch; overflow: hidden; }
.archive-card--map .map-card-text { padding: 28px; flex: 1 1 auto; min-width: 0; }
.archive-card--map .map-card-graphic { flex: 0 0 260px; width: 260px; height: auto; object-fit: cover; margin: 0; }
@media (max-width: 600px) {
  .archive-card--map { flex-direction: column; }
  .archive-card--map .map-card-graphic { width: 100%; flex-basis: 160px; height: 160px; }
}

/* ---------- Get involved cards ---------- */
.involve-card {
  padding: 28px 0;
  border-bottom: 1px solid #e4e4e2;
}
.involve-card:last-child { border-bottom: none; }
.involve-card h3 { color: var(--accent); font-size: 1.3rem; }

/* ---------- Contact ---------- */
.contact-block { max-width: 640px; margin: 0 auto; text-align: center; }
.contact-block .email { font-size: 1.2rem; margin: 14px 0; }
.contact-block .btn { margin: 6px 0 22px; }
.contact-block h3 { margin-top: 36px; font-size: 1.1rem; }
.contact-block .social-list { justify-content: center; margin: 14px auto 0; }
.contact-block .social-list a { color: var(--dark); }
.contact-block .social-list a:hover { color: var(--accent); }
.subscribe-form {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  justify-content: center;
  gap: 10px;
  max-width: 420px;
  margin: 0 auto;
}
.subscribe-form input[type="email"] {
  flex: 1 1 220px;
  box-sizing: border-box;
  height: 46px;
  margin: 0;
  padding: 0 14px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 0.95rem;
  font-family: inherit;
  vertical-align: top;
}
.subscribe-form input[type="email"]:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.subscribe-form button.btn {
  flex: 0 0 auto;
  box-sizing: border-box;
  height: 46px;
  margin: 0;
  padding: 0 26px;
  border: 0;
  cursor: pointer;
  font-size: 0.95rem;
  line-height: 1;
  vertical-align: top;
  appearance: none;
  -webkit-appearance: none;
}
.subscribe-note {
  display: none;
  margin: 14px auto 0;
  max-width: 420px;
  padding: 12px 16px;
  border-radius: 4px;
  font-size: 0.95rem;
  font-weight: 500;
}
.subscribe-note.is-visible { display: block; }
.subscribe-note.is-success { background: #e6f4ea; color: #1e7e34; }
.subscribe-note.is-error { background: #fdecea; color: #b3261e; }

/* ---------- Google form embed ---------- */
.form-embed {
  max-width: 760px;
  margin: 0 auto;
}
.form-embed iframe {
  width: 100%;
  min-height: 900px;
  border: 0;
}

/* ---------- Footer ---------- */
footer.site-footer {
  background: var(--dark);
  color: var(--white);
  border-top: 6px solid var(--accent);
  padding: 40px 0 24px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 24px;
}
.footer-grid img { height: 70px; margin-bottom: 10px; }
.footer-grid h4 { color: var(--accent); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 10px; }
.footer-grid a { color: var(--white); }
.footer-grid a:hover { color: var(--accent); }
.social-list { list-style: none; display: flex; gap: 16px; padding: 0; margin: 0; }
.social-list a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #9aa0a2;
}
.social-list a:hover { color: var(--white); text-decoration: none; }
.social-list svg { width: 24px; height: 24px; display: block; }
.footer-bottom {
  text-align: center;
  font-size: 0.85rem;
  color: #b7bdc0;
  padding-top: 20px;
  border-top: 1px solid #454c4f;
}
.footer-bottom a { color: #b7bdc0; }

/* ---------- Utility ---------- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.small-note { font-size: 0.85rem; color: var(--gray-text); }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .feature-row, .vm-grid { grid-template-columns: 1fr; }
  .feature-row.reverse .text-col, .feature-row.reverse .video-col { order: initial; }
  .team-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; text-align: center; }
  /* the footer logo is a block-level img (site-wide `img{display:block}`), so
     the text-align:center above doesn't touch it — needs its own auto margins */
  .footer-grid img { margin-left: auto; margin-right: auto; }
  .social-list { justify-content: center; }
  .affiliate { flex-direction: column; text-align: center; }
}

@media (max-width: 700px) {
  .nav-toggle { display: inline-block; }
  nav.main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
  }
  nav.main-nav.open { display: block; }
  nav.main-nav ul { flex-direction: column; align-items: stretch; padding: 8px 0; }
  nav.main-nav > ul > li { width: 100%; }
  nav.main-nav a.top-link.nav-cta { display: inline-block; margin: 8px 14px; }
  /* Submenus expand inline (not as a floating overlay) so they stay readable */
  nav.main-nav ul.dropdown-menu {
    position: static;
    min-width: 0;
    border-radius: 0;
    box-shadow: none;
    padding-left: 16px;
    background: var(--white);
  }
  .team-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 1.6rem; }
}
