/* ========================================
   PickleballHQ - Main Stylesheet
   Clean, fast, SEO-friendly content site
   ======================================== */

:root {
  --green: #3a7d44;
  --green-dark: #2c5f34;
  --green-light: #eaf4ec;
  --yellow: #f0c040;
  --yellow-dark: #d4a820;
  --text: #1a1a1a;
  --text-muted: #555;
  --bg: #ffffff;
  --bg-alt: #f8faf8;
  --border: #dde8dd;
  --max-width: 820px;
  --sidebar-width: 300px;
}

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

html { font-size: 17px; scroll-behavior: smooth; }

body {
  font-family: 'Georgia', 'Times New Roman', serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.75;
}

/* ---- TYPOGRAPHY ---- */
h1, h2, h3, h4, h5 {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text);
}
h1 { font-size: 2.1rem; margin-bottom: 0.6rem; }
h2 { font-size: 1.55rem; margin-top: 2.2rem; margin-bottom: 0.7rem; padding-bottom: 0.3rem; border-bottom: 2px solid var(--border); }
h3 { font-size: 1.2rem; margin-top: 1.6rem; margin-bottom: 0.5rem; color: var(--green-dark); }
p { margin-bottom: 1.1rem; }
a { color: var(--green); text-decoration: none; }
a:hover { text-decoration: underline; color: var(--green-dark); }
strong { font-weight: 700; }
ul, ol { padding-left: 1.5rem; margin-bottom: 1.1rem; }
li { margin-bottom: 0.4rem; }
img { max-width: 100%; height: auto; display: block; border-radius: 6px; }
blockquote {
  border-left: 4px solid var(--green);
  padding: 0.7rem 1.2rem;
  margin: 1.4rem 0;
  background: var(--green-light);
  border-radius: 0 6px 6px 0;
  font-style: italic;
  color: var(--text-muted);
}

/* ---- HEADER ---- */
header {
  background: var(--green);
  color: white;
  padding: 0 1.5rem;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 58px;
}
.logo {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 1.3rem;
  font-weight: 800;
  color: white;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.logo span { color: var(--yellow); }
nav { display: flex; gap: 0; }
nav a {
  color: rgba(255,255,255,0.9);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0 0.9rem;
  height: 58px;
  display: flex;
  align-items: center;
  text-decoration: none;
  border-bottom: 3px solid transparent;
  transition: all 0.15s;
}
nav a:hover, nav a.active {
  color: white;
  border-bottom-color: var(--yellow);
  background: rgba(255,255,255,0.08);
}
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 0.4rem; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: white; margin: 5px 0; border-radius: 2px; }

/* ---- HERO (homepage) ---- */
.hero {
  background:
    linear-gradient(rgba(20,60,25,0.72), rgba(20,60,25,0.72)),
    url('https://images.unsplash.com/photo-1626224583764-f87db24ac4ea?w=1400&h=600&fit=crop&auto=format&q=80') center/cover no-repeat;
  color: white;
  text-align: center;
  padding: 5rem 1.5rem 4.5rem;
  position: relative;
}
.hero h1 { color: white; font-size: 2.6rem; max-width: 720px; margin: 0 auto 1rem; text-shadow: 0 2px 8px rgba(0,0,0,0.3); }
.hero p { font-size: 1.18rem; max-width: 600px; margin: 0 auto 2rem; opacity: 0.95; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; text-shadow: 0 1px 4px rgba(0,0,0,0.25); }

/* ---- CARD IMAGE HEADERS ---- */
.card-img {
  width: 100%;
  height: 160px;
  background-size: cover;
  background-position: center;
  background-color: var(--green-light);
  position: relative;
  overflow: hidden;
}
.card-img::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 50%, rgba(0,0,0,0.18) 100%);
}

/* ---- ARTICLE HERO IMAGE ---- */
.article-hero-img {
  width: 100%;
  height: 260px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  display: block;
}
.btn {
  display: inline-block;
  background: var(--yellow);
  color: #1a1a1a;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  padding: 0.75rem 1.8rem;
  border-radius: 4px;
  text-decoration: none;
  transition: background 0.15s;
}
.btn:hover { background: var(--yellow-dark); color: #1a1a1a; text-decoration: none; }
.btn-outline {
  background: transparent;
  border: 2px solid white;
  color: white;
  margin-left: 0.8rem;
}
.btn-outline:hover { background: rgba(255,255,255,0.1); color: white; }

/* ---- CARD GRID ---- */
.card-section { padding: 3rem 1.5rem; max-width: 1100px; margin: 0 auto; }
.card-section h2 { border: none; font-size: 1.7rem; text-align: center; margin-bottom: 0.4rem; }
.section-sub { text-align: center; color: var(--text-muted); margin-bottom: 2rem; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.2rem; }
.card {
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  transition: box-shadow 0.2s, transform 0.2s;
  background: white;
}
.card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.1); transform: translateY(-2px); }
.card-body { padding: 1.2rem 1.4rem 1.4rem; }
.card-icon { font-size: 2rem; margin-bottom: 0.5rem; }
.card h3 { margin-top: 0; font-size: 1.05rem; color: var(--text); }
.card h3 a { color: var(--text); }
.card h3 a:hover { color: var(--green); text-decoration: none; }
.card p { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 0.8rem; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; line-height: 1.5; }
.card-link {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--green);
}

/* ---- ARTICLE LAYOUT ---- */
.article-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
  display: grid;
  grid-template-columns: 1fr var(--sidebar-width);
  gap: 3rem;
  align-items: start;
}
.article-main { min-width: 0; }
.article-meta {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.article-meta span { display: flex; align-items: center; gap: 0.3rem; }
.article-hero { background: var(--green-light); border-left: 4px solid var(--green); padding: 1rem 1.3rem; border-radius: 0 6px 6px 0; margin-bottom: 1.8rem; }
.article-hero p { margin-bottom: 0; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; font-size: 1.05rem; }

/* ---- TABLE OF CONTENTS ---- */
.toc {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.1rem 1.3rem;
  margin-bottom: 2rem;
}
.toc-title {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.7rem;
}
.toc ol { margin-bottom: 0; }
.toc li { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; font-size: 0.88rem; margin-bottom: 0.3rem; }

/* ---- INFO BOXES ---- */
.info-box {
  padding: 1rem 1.3rem;
  border-radius: 6px;
  margin: 1.5rem 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 0.93rem;
}
.info-box.tip { background: #e8f5e9; border-left: 4px solid #4caf50; }
.info-box.note { background: #fff8e1; border-left: 4px solid #ffc107; }
.info-box.rule { background: #e3f2fd; border-left: 4px solid #2196f3; }
.info-box strong { display: block; margin-bottom: 0.3rem; }

/* ---- TABLE ---- */
.table-wrap { overflow-x: auto; margin: 1.5rem 0; }
table { width: 100%; border-collapse: collapse; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; font-size: 0.9rem; }
th { background: var(--green); color: white; padding: 0.7rem 1rem; text-align: left; font-weight: 600; }
td { padding: 0.65rem 1rem; border-bottom: 1px solid var(--border); }
tr:nth-child(even) td { background: var(--bg-alt); }
tr:last-child td { border-bottom: none; }

/* ---- SIDEBAR ---- */
.sidebar { position: sticky; top: 75px; }
.sidebar-box {
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 1.4rem;
}
.sidebar-box-title {
  background: var(--green);
  color: white;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.6rem 1rem;
}
.sidebar-box-body { padding: 1rem; }
.sidebar-box-body ul { list-style: none; padding: 0; margin: 0; }
.sidebar-box-body li { padding: 0.35rem 0; border-bottom: 1px solid var(--border); font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; font-size: 0.88rem; }
.sidebar-box-body li:last-child { border-bottom: none; }
.sidebar-box-body a { color: var(--green); font-weight: 500; }

/* ---- AD PLACEHOLDERS ---- */
.ad-slot {
  background: #f0f0f0;
  border: 1px dashed #ccc;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #aaa;
  font-family: sans-serif;
  font-size: 0.75rem;
  text-align: center;
  margin: 1.5rem 0;
}
.ad-slot.leaderboard { height: 90px; }
.ad-slot.rectangle { height: 250px; }
.ad-slot.sidebar { height: 250px; }

/* ---- BREADCRUMB ---- */
.breadcrumb {
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
  padding: 0.55rem 1.5rem;
}
.breadcrumb-inner {
  max-width: 1100px;
  margin: 0 auto;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 0.8rem;
  color: var(--text-muted);
}
.breadcrumb-inner a { color: var(--green); }
.breadcrumb-inner span { margin: 0 0.4rem; }

/* ---- FAQ SECTION ---- */
.faq-item { border: 1px solid var(--border); border-radius: 6px; margin-bottom: 0.8rem; overflow: hidden; }
.faq-q {
  padding: 0.9rem 1.2rem;
  background: var(--bg-alt);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  user-select: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.faq-q::after { content: '+'; font-size: 1.2rem; color: var(--green); }
.faq-a { padding: 1rem 1.2rem; font-size: 0.93rem; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; }

/* ---- FOOTER ---- */
footer {
  background: #1e2e1f;
  color: rgba(255,255,255,0.8);
  padding: 2.5rem 1.5rem;
  margin-top: 3rem;
}
.footer-inner { max-width: 1100px; margin: 0 auto; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 2rem; margin-bottom: 2rem; }
.footer-col h4 { color: white; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.07em; margin-bottom: 0.8rem; }
.footer-col a { display: block; color: rgba(255,255,255,0.65); font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; font-size: 0.85rem; padding: 0.2rem 0; text-decoration: none; transition: color 0.15s; }
.footer-col a:hover { color: var(--yellow); text-decoration: none; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 1.5rem; display: flex; justify-content: space-between; align-items: center; flex-wrap: gap; }
.footer-bottom p { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; font-size: 0.82rem; color: rgba(255,255,255,0.5); margin: 0; }

/* ---- QUICK FACTS BOX ---- */
.quick-facts {
  background: var(--green-light);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.2rem 1.4rem;
  margin-bottom: 2rem;
}
.quick-facts h4 {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--green-dark);
  margin-bottom: 0.8rem;
}
.quick-facts ul { list-style: none; padding: 0; margin: 0; }
.quick-facts li {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 0.88rem;
  padding: 0.3rem 0;
  border-bottom: 1px solid rgba(0,0,0,0.07);
  display: flex;
  justify-content: space-between;
}
.quick-facts li:last-child { border-bottom: none; }
.quick-facts li strong { color: var(--green-dark); }

/* ---- RESPONSIVE ---- */
@media (max-width: 860px) {
  .article-wrap { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  h1 { font-size: 1.75rem; }
  .hero h1 { font-size: 1.9rem; }
  nav { display: none; flex-direction: column; position: absolute; top: 58px; left: 0; right: 0; background: var(--green-dark); padding: 0.5rem 0; }
  nav.open { display: flex; }
  nav a { height: auto; padding: 0.75rem 1.5rem; }
  .nav-toggle { display: block; }
}
@media (max-width: 500px) {
  html { font-size: 16px; }
  .hero { padding: 2.5rem 1rem 2rem; }
  .card-section { padding: 2rem 1rem; }
  .article-wrap { padding: 1.5rem 1rem 3rem; }
  .btn-outline { display: none; }
}
