/* ============================================================
   CricketGroundGuide.co.uk — shared stylesheet
   Used by: index.html + all grounds/[slug]/index.html pages
   ============================================================ */

:root {
  --green: #1a6b3a;
  --green-dark: #104827;
  --green-light: #e8f5ee;
  --gold: #c9a84c;
  --gold-light: #f5e9cc;
  --cream: #faf8f3;
  --text: #1c1c1c;
  --text-muted: #5a5a5a;
  --border: #ddd8cc;
  --white: #fff;
  --shadow: 0 2px 12px rgba(0,0,0,0.08);
  --shadow-hover: 0 6px 24px rgba(0,0,0,0.14);
  --radius: 10px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Georgia', serif;
  background: var(--cream);
  color: var(--text);
  line-height: 1.7;
}

/* ── NAV ── */
nav {
  background: var(--green-dark);
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}
.nav-logo {
  color: var(--gold);
  font-size: 1.05rem;
  font-weight: bold;
  letter-spacing: 0.03em;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav-links { display: flex; gap: 20px; list-style: none; }
.nav-links a {
  color: rgba(255,255,255,0.82);
  text-decoration: none;
  font-family: 'Arial', sans-serif;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--gold); }

/* ── BREADCRUMB ── */
.breadcrumb {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 10px 24px;
  font-family: 'Arial', sans-serif;
  font-size: 0.78rem;
  color: var(--text-muted);
}
.breadcrumb a { color: var(--green); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }

/* ── HOMEPAGE HERO ── */
.hero {
  background: linear-gradient(135deg, var(--green-dark) 0%, var(--green) 60%, #2d8a56 100%);
  color: white;
  padding: 64px 24px 56px;
  text-align: center;
}
.hero-badge {
  display: inline-block;
  background: var(--gold);
  color: var(--green-dark);
  font-family: 'Arial', sans-serif;
  font-size: 0.7rem;
  font-weight: bold;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 14px;
  border-radius: 20px;
  margin-bottom: 18px;
}
.hero h1 { font-size: clamp(1.8rem, 4vw, 3rem); font-weight: normal; margin-bottom: 12px; }
.hero h1 em { color: var(--gold); font-style: normal; }
.hero p { font-size: 1.05rem; color: rgba(255,255,255,0.8); max-width: 560px; margin: 0 auto 28px; font-family: 'Arial', sans-serif; }
.hero-stats { display: flex; justify-content: center; gap: 32px; flex-wrap: wrap; }
.stat { text-align: center; background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.15); border-radius: 8px; padding: 12px 20px; }
.stat-num { font-size: 1.6rem; color: var(--gold); line-height: 1; }
.stat-label { font-family: 'Arial', sans-serif; font-size: 0.72rem; color: rgba(255,255,255,0.7); text-transform: uppercase; letter-spacing: 0.05em; margin-top: 2px; }

/* ── SEARCH BAR ── */
.search-wrap {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 14px 24px;
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}
.search-wrap input {
  border: 1.5px solid var(--border);
  border-radius: 6px;
  padding: 8px 14px;
  font-size: 0.9rem;
  font-family: 'Arial', sans-serif;
  width: 260px;
  outline: none;
  transition: border-color 0.2s;
}
.search-wrap input:focus { border-color: var(--green); }
.filter-btns { display: flex; gap: 6px; flex-wrap: wrap; }
.filter-btn {
  border: 1.5px solid var(--border);
  background: var(--white);
  border-radius: 6px;
  padding: 7px 14px;
  font-family: 'Arial', sans-serif;
  font-size: 0.78rem;
  cursor: pointer;
  color: var(--text-muted);
  transition: all 0.2s;
}
.filter-btn:hover, .filter-btn.active { background: var(--green); border-color: var(--green); color: white; }

/* ── HOMEPAGE MAIN ── */
main { max-width: 1160px; margin: 0 auto; padding: 36px 20px 60px; }

.section-title {
  font-size: 1.35rem;
  color: var(--green-dark);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-title::after {
  content: '';
  flex: 1;
  height: 2px;
  background: linear-gradient(to right, var(--gold), transparent);
  border-radius: 2px;
}
.section-sub { font-family: 'Arial', sans-serif; font-size: 0.85rem; color: var(--text-muted); margin-bottom: 24px; }

/* ── FEATURED CARD (homepage) ── */
.featured-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-bottom: 40px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--border);
  transition: box-shadow 0.25s;
}
.featured-card:hover { box-shadow: var(--shadow-hover); }
.featured-image {
  min-height: 280px;
  background: linear-gradient(135deg, var(--green-dark) 0%, #2d7a4e 100%);
  position: relative;
  overflow: hidden;
}
.featured-image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.featured-body { padding: 32px; display: flex; flex-direction: column; justify-content: center; }
.featured-tag {
  display: inline-block;
  background: var(--gold-light);
  color: #8a6a1a;
  font-family: 'Arial', sans-serif;
  font-size: 0.68rem;
  font-weight: bold;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 20px;
  margin-bottom: 12px;
}
.featured-body h2 { font-size: 1.7rem; color: var(--green-dark); margin-bottom: 4px; }
.featured-body .team { font-family: 'Arial', sans-serif; font-size: 0.85rem; color: var(--text-muted); margin-bottom: 14px; }
.featured-body p { font-size: 0.92rem; color: var(--text-muted); margin-bottom: 18px; line-height: 1.75; }
.meta-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 20px; }
.meta-item { background: var(--green-light); border-radius: 6px; padding: 9px 12px; }
.meta-label { font-family: 'Arial', sans-serif; font-size: 0.67rem; color: var(--green); text-transform: uppercase; letter-spacing: 0.05em; }
.meta-val { font-size: 0.88rem; font-weight: bold; color: var(--green-dark); }

/* ── GROUNDS GRID (homepage) ── */
.grounds-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 22px;
  margin-bottom: 48px;
}
.ground-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: box-shadow 0.25s, transform 0.2s;
}
.ground-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-3px); }
.card-header { height: 140px; position: relative; overflow: hidden; }
.card-header img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.35s ease; }
.ground-card:hover .card-header img { transform: scale(1.04); }
.card-header-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.1) 60%, transparent 100%);
  display: flex; align-items: flex-end; padding: 10px 12px;
}
.card-badge {
  background: rgba(255,255,255,0.92);
  border-radius: 5px;
  font-family: 'Arial', sans-serif;
  font-size: 0.68rem;
  font-weight: bold;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 3px 9px;
  color: var(--green-dark);
}

/* Ground colour fallbacks */
.g-lords       { background: linear-gradient(135deg, #1a3a6b, #2c5282); }
.g-oval        { background: linear-gradient(135deg, #5c1a1a, #8b3434); }
.g-headingley  { background: linear-gradient(135deg, #1a4a6b, #1a6b8a); }
.g-edgbaston   { background: linear-gradient(135deg, #1a6b3a, #104827); }
.g-oldtrafford { background: linear-gradient(135deg, #6b1a1a, #cc0000); }
.g-trentbridge { background: linear-gradient(135deg, #3d6b1a, #5a9e28); }
.g-ageasbowl   { background: linear-gradient(135deg, #1a3a5c, #1e6091); }
.g-sophia      { background: linear-gradient(135deg, #1c2e6e, #2b4eb8); }
.g-riverside   { background: linear-gradient(135deg, #1a4a6b, #1a6b8a); }
.g-hove        { background: linear-gradient(135deg, #1a3a5c, #1e6091); }
.g-bristol     { background: linear-gradient(135deg, #3d6b1a, #5a9e28); }
.g-taunton     { background: linear-gradient(135deg, #3d6b1a, #5a9e28); }

.card-body { padding: 16px; }
.card-body h3 { font-size: 1.05rem; color: var(--green-dark); margin-bottom: 2px; }
.card-team { font-family: 'Arial', sans-serif; font-size: 0.78rem; color: var(--text-muted); margin-bottom: 8px; }
.card-desc { font-size: 0.83rem; color: var(--text-muted); line-height: 1.55; margin-bottom: 12px; }
.card-meta { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.tag { background: var(--green-light); color: var(--green-dark); border-radius: 4px; font-family: 'Arial', sans-serif; font-size: 0.7rem; padding: 2px 8px; }
.tag.gold { background: var(--gold-light); color: #7a5a10; }
.card-footer {
  border-top: 1px solid var(--border);
  padding: 10px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: 'Arial', sans-serif;
  font-size: 0.75rem;
  color: var(--text-muted);
}
.rating { color: var(--gold); font-size: 0.8rem; }
.capacity-badge { background: var(--green-light); color: var(--green-dark); border-radius: 4px; padding: 2px 8px; font-size: 0.72rem; }

/* ── PITCH GUIDE (homepage) ── */
.pitch-section { margin-bottom: 48px; }
.pitch-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.pitch-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; text-align: center; box-shadow: var(--shadow); }
.pitch-icon { font-size: 2rem; margin-bottom: 8px; }
.pitch-card h3 { color: var(--green-dark); font-size: 0.92rem; margin-bottom: 6px; }
.pitch-card p { font-family: 'Arial', sans-serif; font-size: 0.78rem; color: var(--text-muted); line-height: 1.5; }

/* ── GROUND PAGE HERO ── */
.ground-hero { position: relative; height: 380px; overflow: hidden; background: linear-gradient(135deg, #1a3a6b, #2c5282); }
.ground-hero img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.75) 0%, rgba(0,0,0,0.2) 60%, transparent 100%);
  display: flex; align-items: flex-end; padding: 32px 40px;
}
.hero-text h1 { font-size: clamp(1.8rem, 3.5vw, 2.8rem); color: white; font-weight: normal; margin-bottom: 6px; }
.hero-text .subtitle { font-family: 'Arial', sans-serif; font-size: 0.95rem; color: rgba(255,255,255,0.8); }
.hero-badges { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.hero-badge {
  background: var(--gold);
  color: var(--green-dark);
  font-family: 'Arial', sans-serif;
  font-size: 0.68rem;
  font-weight: bold;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 20px;
}
.hero-badge.alt { background: rgba(255,255,255,0.2); color: white; border: 1px solid rgba(255,255,255,0.3); }

/* ── STATS BAR (ground pages) ── */
.stats-bar { background: var(--green-dark); display: flex; justify-content: center; flex-wrap: wrap; }
.stat-item { padding: 14px 28px; text-align: center; border-right: 1px solid rgba(255,255,255,0.1); }
.stat-item:last-child { border-right: none; }
.stat-num { font-size: 1.3rem; color: var(--gold); line-height: 1; }
.stat-lbl { font-family: 'Arial', sans-serif; font-size: 0.67rem; color: rgba(255,255,255,0.6); text-transform: uppercase; letter-spacing: 0.05em; margin-top: 2px; }

/* ── GROUND PAGE LAYOUT ── */
.page-wrap { max-width: 900px; margin: 0 auto; padding: 40px 24px 48px; }
.content-grid { display: grid; grid-template-columns: 1fr 280px; gap: 40px; align-items: start; }

.main-col h2 {
  font-size: 1.3rem;
  color: var(--green-dark);
  margin: 32px 0 12px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--gold-light);
}
.main-col h2:first-child { margin-top: 0; }
.main-col p { font-size: 0.95rem; color: var(--text-muted); margin-bottom: 14px; line-height: 1.75; }
.main-col ul { padding-left: 0; list-style: none; margin-bottom: 16px; }
.main-col ul li {
  font-family: 'Arial', sans-serif;
  font-size: 0.88rem;
  color: var(--text-muted);
  padding: 7px 0 7px 22px;
  border-bottom: 1px solid var(--border);
  position: relative;
  line-height: 1.5;
}
.main-col ul li:last-child { border-bottom: none; }
.main-col ul li::before { content: '🏏'; position: absolute; left: 0; font-size: 0.72rem; top: 9px; }

/* ── SEAT TABLE ── */
.seat-table { width: 100%; border-collapse: collapse; margin-bottom: 20px; font-family: 'Arial', sans-serif; font-size: 0.83rem; }
.seat-table th { background: var(--green-dark); color: white; padding: 8px 12px; text-align: left; font-weight: normal; letter-spacing: 0.03em; }
.seat-table td { padding: 9px 12px; border-bottom: 1px solid var(--border); color: var(--text-muted); vertical-align: top; }
.seat-table tr:nth-child(even) td { background: var(--green-light); }
.rec   { display: inline-block; background: var(--gold-light); color: #7a5a10; border-radius: 3px; padding: 1px 6px; font-size: 0.7rem; font-weight: bold; }
.avoid { display: inline-block; background: #fde8e8; color: #8b2222; border-radius: 3px; padding: 1px 6px; font-size: 0.7rem; font-weight: bold; }

/* ── HIGHLIGHT BOX ── */
.highlight-box {
  background: var(--green-light);
  border: 1px solid #b8d9c4;
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 20px;
}
.highlight-box h3 { color: var(--green-dark); font-size: 1rem; margin-bottom: 8px; }
.highlight-box p { font-size: 0.88rem; color: var(--text-muted); line-height: 1.65; margin: 0; }

/* ── SIDEBAR ── */
.sidebar { position: sticky; top: 72px; }
.sidebar-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); margin-bottom: 20px; }
.sidebar-card-head { background: var(--green); color: white; padding: 12px 16px; font-family: 'Arial', sans-serif; font-size: 0.8rem; font-weight: bold; letter-spacing: 0.04em; text-transform: uppercase; }
.sidebar-card-body { padding: 14px 16px; }
.sidebar-row { display: flex; justify-content: space-between; align-items: flex-start; padding: 7px 0; border-bottom: 1px solid var(--border); font-family: 'Arial', sans-serif; font-size: 0.82rem; }
.sidebar-row:last-child { border-bottom: none; }
.sidebar-row .lbl { color: var(--text-muted); }
.sidebar-row .val { color: var(--text); font-weight: bold; text-align: right; max-width: 55%; }
.nearby-link { display: block; padding: 8px 0; font-family: 'Arial', sans-serif; font-size: 0.83rem; color: var(--green); text-decoration: none; border-bottom: 1px solid var(--border); }
.nearby-link:last-child { border-bottom: none; }
.nearby-link:hover { color: var(--green-dark); }

/* ── FAQ ── */
.faq-item { border-bottom: 1px solid var(--border); padding: 16px 0; }
.faq-item:last-child { border-bottom: none; }
.faq-q { font-size: 0.95rem; color: var(--green-dark); cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 10px; list-style: none; }
.faq-q::after { content: '+'; font-size: 1.2rem; color: var(--gold); flex-shrink: 0; transition: transform 0.2s; }
.faq-item.open .faq-q::after { content: '−'; }
.faq-a { font-family: 'Arial', sans-serif; font-size: 0.88rem; color: var(--text-muted); line-height: 1.7; margin-top: 10px; display: none; }
.faq-item.open .faq-a { display: block; }

/* ── GROUND PAGER (prev/next) ── */
/* NOTE: use <div class="ground-pager"> in HTML — not <nav> — to avoid
   inheriting styles from the injected navigation <nav> element */
.ground-pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 32px;
}
.ground-pager a {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
  text-decoration: none;
  transition: box-shadow 0.2s;
  display: block;
  min-width: 0;
}
.ground-pager a:hover { box-shadow: var(--shadow); }
.ground-pager .dir {
  font-family: 'Arial', sans-serif;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.ground-pager .gname {
  font-size: 0.95rem;
  color: var(--green-dark);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ground-pager a:last-child { text-align: right; }

/* ── BUTTONS ── */
.btn-primary {
  display: inline-block;
  background: var(--green);
  color: white;
  padding: 9px 22px;
  border-radius: 6px;
  font-family: 'Arial', sans-serif;
  font-size: 0.82rem;
  text-decoration: none;
  font-weight: bold;
  letter-spacing: 0.03em;
  transition: background 0.2s;
}
.btn-primary:hover { background: var(--green-dark); }

/* ── FOOTER ── */
footer {
  background: var(--green-dark);
  color: rgba(255,255,255,0.7);
  text-align: center;
  padding: 28px 20px;
  font-family: 'Arial', sans-serif;
  font-size: 0.78rem;
}
footer a { color: var(--gold); text-decoration: none; }
.footer-logo { color: var(--gold); font-family: 'Georgia', serif; font-size: 1rem; margin-bottom: 8px; }

/* ── RESPONSIVE ── */
@media (max-width: 720px) {
  .featured-card { grid-template-columns: 1fr; }
  .featured-image { min-height: 200px; }
  .nav-links { display: none; }
  .content-grid { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .hero-overlay { padding: 20px; }
  .ground-pager { grid-template-columns: 1fr; }
  .ground-pager a:last-child { text-align: left; }
  .stat-item { padding: 10px 16px; }
}