/* Chalfont Table Tennis Club — site styles */
:root {
  --red: #d94a3f;
  --red-dark: #b83a31;
  --ink: #222;
  --muted: #555;
  --bg: #fff;
  --bg-alt: #f7f7f7;
  --max: 1100px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Open Sans", Arial, Helvetica, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
}
h1, h2, h3, .brand { font-family: "Oswald", "Arial Narrow", Arial, sans-serif; font-weight: 400; line-height: 1.15; margin: 0 0 .5em; }
a { color: var(--red); }
a:hover { color: var(--red-dark); }
img { max-width: 100%; height: auto; display: block; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }

/* Header / nav */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: #fff;
  border-bottom: 1px solid #eee;
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 64px; gap: 20px; }
.brand { font-size: 1.45rem; color: var(--red); text-decoration: none; letter-spacing: .3px; margin: 0; }
.nav { display: flex; gap: 6px; }
.nav a { text-decoration: none; color: var(--ink); padding: 8px 12px; border-radius: 4px; font-size: .95rem; }
.nav a:hover { background: var(--bg-alt); color: var(--ink); }
.nav a.active { background: var(--ink); color: #fff; }

/* Hero */
.hero {
  position: relative;
  min-height: 300px;
  display: flex; align-items: center; justify-content: center;
  text-align: center;
  color: #fff;
  background: #333 center/cover no-repeat;
  overflow: hidden;
}
.hero::before { content: ""; position: absolute; inset: 0; background: rgba(0,0,0,.28); }
.hero h1 {
  position: relative;
  font-size: clamp(2.2rem, 6vw, 3.6rem);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 0;
  padding: 0 20px 14px;
  text-shadow: 0 2px 8px rgba(0,0,0,.45);
}
.hero h1::after { content: ""; display: block; width: min(420px, 70%); height: 6px; background: var(--red); margin: 14px auto 0; }
.hero--home { background-image: url(home-hero.jpg); min-height: 400px; }
.hero--calendar { background-image: url(team.jpg); background-position: center 30%; }
.hero--contact { background-image: url(contact-hero.jpg); }

/* Sections */
.section { padding: 48px 0; }
.section--alt { background: var(--bg-alt); }
.section h2 { color: var(--red); font-size: 1.9rem; text-align: center; }
.intro { text-align: center; max-width: 780px; margin: 0 auto; }
.intro p { margin: .4em 0; }

.band { background: var(--red); color: #fff; text-align: center; padding: 18px 20px; }
.band a { color: #fff; font-weight: 600; text-decoration: underline; font-size: 1.05rem; }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px; }
.card { text-align: center; }
/* Card image files carry the sharp square in their top-left corner (706px of 1456px wide); crop to it. */
.card .pic { width: 100%; aspect-ratio: 1 / 1; overflow: hidden; border-radius: 4px; }
.card .pic img { width: 207%; max-width: none; }
.card h3 { color: var(--red); font-size: 1.5rem; margin: 18px 0 8px; }
.card h3 a { text-decoration: none; }
.card p { margin: 0; color: var(--muted); }

/* Calendar table */
.events { width: 100%; border-collapse: collapse; max-width: 780px; margin: 0 auto; font-size: 1.05rem; }
.events th, .events td { text-align: left; padding: 12px 14px; border-bottom: 1px solid #e5e5e5; vertical-align: top; }
.events th { color: var(--red); font-family: "Oswald", Arial, sans-serif; font-weight: 400; font-size: 1.15rem; border-bottom: 2px solid var(--red); }
.events td:first-child { white-space: nowrap; font-weight: 600; width: 34%; }

/* Two-column feature (David Swift, Location) */
.feature { display: grid; grid-template-columns: 1fr 1.6fr; gap: 40px; align-items: start; }
.feature img, .feature iframe { width: 100%; border-radius: 4px; }
.feature h2 { text-align: left; color: var(--ink); text-transform: uppercase; font-size: 2.2rem; }
.feature h2 small { font-size: 1.1rem; text-transform: uppercase; margin-left: 10px; color: var(--muted); }
.feature p { margin: 0 0 1em; }
.address { font-size: 1.1rem; }
.address p { margin: 0 0 .3em; }
.map { aspect-ratio: 4 / 3; border: 0; }

/* Footer */
.site-footer { background: var(--red); color: #fff; text-align: center; padding: 28px 20px; }
.site-footer p { margin: 4px 0; }
.site-footer a { color: #fff; }
.site-footer .small { font-size: .85rem; opacity: .85; margin-top: 14px; }

/* Responsive */
@media (max-width: 800px) {
  .cards { grid-template-columns: 1fr; max-width: 420px; margin: 0 auto; }
  .feature { grid-template-columns: 1fr; }
  .site-header .wrap { flex-wrap: wrap; justify-content: center; padding: 8px 20px; }
  .events td:first-child { white-space: normal; }
}
