/* Shrewsbury Scouts - shared styles */
:root {
  --navy: #003f87;
  --gold: #fdc116;
  --green: #4a5a2a;
  --tan: #d6cbb0;
  --ink: #1f2933;
  --muted: #5b6770;
  --bg: #f7f7f4;
  --card: #ffffff;
  --accent: var(--navy);
  --accent-2: var(--gold);
}

body.troop {
  --accent: var(--green);
  --accent-2: var(--tan);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
}

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

header.site {
  background: var(--accent);
  color: #fff;
  border-bottom: 6px solid var(--accent-2);
}

header.site .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

header.site .brand {
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.25rem;
}

nav a {
  color: #fff;
  text-decoration: none;
  margin-left: 1rem;
  font-weight: 500;
}

nav a:hover, nav a:focus { text-decoration: underline; }

.wrap {
  max-width: 960px;
  margin: 0 auto;
  padding: 1rem 1.25rem;
}

.hero {
  background: var(--accent);
  color: #fff;
  text-align: center;
  padding: 3rem 1.25rem;
}

.hero h1 { margin: 0 0 0.5rem; font-size: 2.25rem; }
.hero p { margin: 0 auto; max-width: 640px; font-size: 1.1rem; }

section { padding: 1.5rem 0; }
section h2 {
  color: var(--accent);
  border-bottom: 3px solid var(--accent-2);
  padding-bottom: 0.25rem;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
  margin: 2rem 0;
}

.card {
  background: var(--card);
  border-radius: 10px;
  padding: 1.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  border-top: 6px solid var(--navy);
}

.card.troop { border-top-color: var(--green); }
.card h2 { margin-top: 0; border: none; }
.card .ages { color: var(--muted); font-weight: 600; margin-top: -0.5rem; }

.button {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 0.6rem 1.2rem;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
}

.card .button { background: var(--navy); }
.card.troop .button { background: var(--green); }
.button:hover, .button:focus { opacity: 0.9; }

table.info { border-collapse: collapse; width: 100%; }
table.info th, table.info td {
  text-align: left;
  padding: 0.5rem;
  border-bottom: 1px solid #ddd;
  vertical-align: top;
}
table.info th { width: 30%; color: var(--muted); }

/* Placeholder text that still needs real content. Remove the class once filled in. */
.todo {
  background: #fff3b0;
  color: #6b4e00;
  padding: 0 0.25rem;
  border-radius: 3px;
}

/* Home page: hometown photos */
.hero-photo {
  background-size: cover;
  background-position: center;
  padding: 6rem 1.25rem;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
}

.caption, .credit {
  color: var(--muted);
  font-size: 0.8rem;
}
.caption { margin-top: 0.25rem; }

.feature {
  display: grid;
  grid-template-columns: 2fr 3fr;
  gap: 1.5rem;
  align-items: center;
  margin: 2rem 0;
}
.feature.reverse { grid-template-columns: 3fr 2fr; }
.feature.reverse img { order: 2; }
.feature img, .gallery img {
  width: 100%;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}
.feature img { max-height: 420px; object-fit: cover; }
.feature h3 { color: var(--navy); margin-top: 0; font-size: 1.4rem; }

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
}
.gallery figure { margin: 0; }
.gallery img { height: 200px; object-fit: cover; }
.gallery figcaption { font-size: 0.95rem; margin-top: 0.5rem; }

@media (max-width: 700px) {
  .feature, .feature.reverse { grid-template-columns: 1fr; }
  .feature.reverse img { order: 0; }
}

footer {
  background: #2b2f33;
  color: #d5d9dc;
  font-size: 0.9rem;
  margin-top: 2rem;
}
footer a { color: #fff; }

@media (max-width: 600px) {
  nav a { margin: 0 1rem 0 0; }
  .hero h1 { font-size: 1.75rem; }
}
