@charset "utf-8";

/* ================== Base Reset ================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ================== Root Variables ================== */
:root {
  --primary: #005fcc;
  --background: #fafafa;
  --heading: #222;
}

/* ================== Typography ================== */
body {
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #fff;
  padding: 1rem;
}

html {
  scroll-behavior: smooth;
}

h1, h2, h3 {
  color: var(--heading);
  margin-bottom: 0.5em;
}

h1 {
  font-size: 2rem;
}

h2 {
  font-size: 1.5rem;
  margin-top: 1.5rem;
}

h3 {
  font-size: 1.25rem;
  margin-top: 1rem;
}

/* ================== Links ================== */
a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

a:focus {
  outline: 2px dashed var(--primary);
  outline-offset: 2px;
}

/* ================== Layout ================== */
/*
 * The SSI navigation (#navBar) is a sibling of #content on the full pages,
 * not a child of it.  The page shell therefore owns the two-column grid.
 * This keeps the main content on the left and the navigation on the right
 * regardless of whether a page includes the navigation before or after
 * #content in the source.
 */
body {
  display: grid;
  grid-template-columns: minmax(0, 1200px) 250px;
  grid-template-areas:
    "header header"
    "main sidebar"
    "footer footer";
  column-gap: 2rem;
  row-gap: 1rem;
  justify-content: center;
}

#masthead {
  grid-area: header;
}

#content {
  grid-area: main;
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 1200px;
  margin: 0;
}

#navBar {
  grid-area: sidebar;
  width: 100%;
  align-self: start;
}

#siteInfo {
  grid-area: footer;
}

@media (max-width: 900px) {
  body {
    grid-template-columns: 1fr;
    grid-template-areas:
      "header"
      "main"
      "sidebar"
      "footer";
    padding: 0.75rem;
  }

  #navBar {
    max-width: 100%;
  }
}

/* ================== Navigation ================== */
nav {
  background-color: #f5f5f5;
  padding: 1rem;
  border-radius: 8px;
}

#navBar ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

#navBar a {
  display: block;
  padding: 0.4rem 0;
}

/* Emphasize the NARCOA membership callout in the sidebar. */
#advert1 {
  margin-top: 1.5rem;
  padding: 1rem 0.75rem;
  text-align: center;
  background-color: #fff;
  border: 3px solid #c8102e;
  border-radius: 8px;
}

#advert1 p {
  margin: 0.75rem 0 0;
}

#advert1 p a {
  display: block;
  color: #c8102e;
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.25;
}

#advert1 img {
  width: 125px;
  max-width: 100%;
  height: auto;
}

/* ================== Main Content ================== */
main {
  padding: 1rem;
}

/* ================== Paragraphs ================== */
p {
  margin-bottom: 1rem;
}

/* ================== Images ================== */
.photoleft,
.photoright {
  display: block;
  margin: 2rem 0;
  text-align: center;
}

.photoleft img,
.photoright img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

/* Maps, logos, and other content images must also shrink on narrow screens. */
#content img {
  max-width: 100%;
  height: auto;
}

/* Preserve video proportions while preventing fixed-width embeds from
   producing horizontal scrolling on phones and tablets. */
#content iframe {
  display: block;
  width: 100%;
  max-width: 640px;
  height: auto;
  aspect-ratio: 16 / 9;
  margin: 1.5rem auto;
  border: 0;
}

#content video {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 1.5rem auto;
}

.frame-pic {
  max-width: 100%;
  height: auto;
}

/* Restore the printed 8.5-by-11-inch proportion of the distorted cover scan. */
.setoff-cover {
  aspect-ratio: 17 / 22;
}

figure {
  margin: 2rem 0;
  text-align: center;
}

figcaption {
  font-style: italic;
  margin-top: 0.5rem;
  color: #555;
  font-size: 0.95em;
}

/* ================== Feature Blocks ================== */
.feature,
.story {
  background: var(--background);
  padding: 1rem 1.5rem;
  border-left: 4px solid var(--primary);
  margin: 1.5rem 0;
  border-radius: 4px;
}

/* Allow long web addresses to wrap instead of widening the page. */
#content a {
  overflow-wrap: anywhere;
}

/* ================== Dashboard ================== */
.dashboard-block {
  margin-left: auto;
  margin-right: auto;
  margin-top: 3rem;
  margin-bottom: 3rem;
  background-color: #ffffff; /* Stronger contrast to background */
  border: 3px solid var(--primary); /* Slightly thicker and uses your theme color */
  border-radius: 16px; /* More rounded */
  padding: 2.5rem;
  max-width: 800px; /* Limit width for better centering */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); /* Slightly deeper shadow */
  text-align: center; /* Center all text inside */
}

.dashboard-block h3 {
  font-size: 2rem; /* Bigger title */
  margin-bottom: 2rem;
  color: var(--heading);
  text-align: center;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 2rem;
}

.stat-card {
  background-color: #fafafa;
  padding: 1.2rem;
  border-radius: 12px;
  text-align: center;
  border: 2px solid var(--primary);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
}

.stat-card h4 {
  font-size: 1.2rem;
  color: var(--heading);
  margin-bottom: 0.5rem;
}

.stat-card p {
  font-size: 1.8rem;
  font-weight: bold;
  color: var(--primary);
  margin: 0;
}

/* ================== Helpers ================== */
.margin-top-xl {
  margin-top: 2rem;
}

/* Accessibility and semantic-maintenance additions */
.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
  width: auto;
  height: auto;
  padding: 0.5rem 0.75rem;
  background: #fff;
  color: #000;
  z-index: 1000;
}

a:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

.disc-list {
  list-style-type: disc;
}


/* ================== Batch 3 semantic navigation ================== */
.legacy-section-title {
  font-size: 2rem;
  margin-top: 1rem;
}

.article-intro {
  font-weight: 600;
}

.excursion-nav .nav-year {
  font-size: 1.25rem;
  margin-top: 1rem;
  margin-bottom: 0.5em;
}

.excursion-nav ul {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
}

.excursion-nav li {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.2;
  margin: 1rem 0 0.5em;
}

@media (max-width: 600px) {
  h1 {
    font-size: 1.65rem;
    line-height: 1.2;
  }

  h2 {
    font-size: 1.3rem;
  }

  h3 {
    font-size: 1.15rem;
  }

  .feature,
  .story {
    padding: 0.9rem 1rem;
  }

  .dashboard-block {
    padding: 1.25rem 0.75rem;
  }

  .stats-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}
