/* ============================================================
   MyTennisRating — Wimbledon Design System
   Dark Green + Purple | Shared across all pages
   ============================================================ */

/* ── DESIGN TOKENS ── */
:root {
  /* Wimbledon Greens (from original homepage) */
  --green-900: #0f2b1a;
  --green-800: #1a4a2e;
  --green-700: #1e5c38;
  --green-600: #2d8b57;
  --green-500: #34a565;
  --green-400: #4dc880;
  --green-100: #e8f5ec;
  --green-50:  #f0faf3;

  /* Wimbledon Purple */
  --purple-900: #2d1a4e;
  --purple-700: #4B2D73;
  --purple-600: #5e3a8a;
  --purple-500: #7B5EA7;
  --purple-400: #9b7ec8;
  --purple-300: #bca5dc;
  --purple-100: #ede5f7;
  --purple-50:  #f8f4fc;

  /* Neutrals */
  --gray-900: #1a1a1a;
  --gray-700: #4a4a4a;
  --gray-600: #5a5a5a;
  --gray-500: #7a7a7a;
  --gray-400: #9a9a9a;
  --gray-300: #c0c0c0;
  --gray-200: #e0e0e0;
  --gray-100: #f5f5f5;
  --gray-50:  #fafafa;
  --white:    #ffffff;

  /* Semantic */
  --red-500:  #c0392b;
  --red-100:  #fde8e8;
  --amber-500: #b45309;
  --amber-100: #fffbeb;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);

  /* Radii */
  --radius:    12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 70px; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--gray-50);
  color: var(--gray-900);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ============================================================
   NAVIGATION — Dark green bar, consistent on every page
   ============================================================ */
nav {
  background: var(--green-900);
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.nav-logo {
  width: 36px;
  height: 36px;
  background: var(--green-500);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  color: var(--white);
}

.nav-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--white);
  letter-spacing: -0.3px;
}
.nav-title span { color: var(--purple-400); }

.nav-links { display: flex; gap: 20px; }
.nav-links a {
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--white); }
.nav-links a.active { color: var(--purple-400); }

/* Hamburger toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  flex-direction: column;
  gap: 5px;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: 0.3s;
}

/* ============================================================
   FOOTER — Dark green, consistent on every page
   ============================================================ */
footer {
  background: var(--green-900);
  color: rgba(255,255,255,0.6);
  padding: 32px 24px;
  text-align: center;
  font-size: 14px;
}
footer a {
  color: var(--purple-300);
  text-decoration: none;
}
footer a:hover { text-decoration: underline; }

.footer-inner {
  max-width: 800px;
  margin: 0 auto;
}

.footer-links {
  margin-bottom: 12px;
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-legal {
  margin-top: 8px;
  font-size: 12px;
  color: rgba(255,255,255,0.4);
}

/* ============================================================
   HERO — Dark green gradient, used on tool/feature pages
   ============================================================ */
.hero {
  background: linear-gradient(135deg, var(--green-800) 0%, var(--green-700) 50%, var(--green-600) 100%);
  padding: 48px 24px 56px;
  text-align: center;
  color: var(--white);
}
.hero h1 {
  font-size: clamp(28px, 5vw, 42px);
  font-weight: 800;
  margin-bottom: 12px;
  letter-spacing: -0.5px;
}
.hero h1 span { color: var(--purple-400); }
.hero p {
  font-size: clamp(16px, 2.5vw, 19px);
  color: rgba(255,255,255,0.85);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.5;
}

/* Hero — Light variant for content/legal pages */
.hero-light {
  background: linear-gradient(135deg, #2d1a4e 0%, #4B2D73 50%, #5e3a8a 100%);
  padding: 64px 24px 40px;
  text-align: center;
  color: var(--white);
}
.hero-light h1 {
  font-size: clamp(28px, 5vw, 42px);
  font-weight: 800;
  margin-bottom: 12px;
  letter-spacing: -0.5px;
  color: var(--white);
}
.hero-light p {
  font-size: clamp(16px, 2.5vw, 18px);
  color: rgba(255,255,255,0.8);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Hero badge pill */
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  background: rgba(123,94,167,0.15);
  border: 1px solid rgba(123,94,167,0.3);
  color: var(--purple-400);
  font-size: 13px;
  font-weight: 600;
  border-radius: 100px;
  margin-bottom: 20px;
}
.hero-light .hero-badge {
  background: rgba(255,255,255,0.15);
  border-color: rgba(255,255,255,0.25);
  color: rgba(255,255,255,0.9);
}

/* ============================================================
   COMMON CONTAINER
   ============================================================ */
.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}
.container-narrow {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn-primary {
  display: inline-block;
  padding: 14px 32px;
  background: var(--green-600);
  color: var(--white);
  border: none;
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  text-decoration: none;
}
.btn-primary:hover { background: var(--green-700); }
.btn-primary:active { transform: scale(0.98); }

.btn-accent {
  display: inline-block;
  padding: 14px 36px;
  background: var(--purple-600);
  color: var(--white);
  font-size: 16px;
  font-weight: 700;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, transform 0.1s;
}
.btn-accent:hover { background: var(--purple-700); }

/* ============================================================
   CARDS
   ============================================================ */
.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
  padding: 28px;
}
.card h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--green-800);
  margin-bottom: 12px;
}
.card p {
  font-size: 15px;
  color: var(--gray-700);
  line-height: 1.6;
}

/* ============================================================
   CTA BANNER
   ============================================================ */
.cta-banner {
  background: linear-gradient(135deg, var(--green-800), var(--green-600));
  border-radius: var(--radius);
  padding: 40px 32px;
  text-align: center;
  margin: 48px 0;
  color: var(--white);
}
.cta-banner h2 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 12px;
}
.cta-banner p {
  font-size: 16px;
  color: rgba(255,255,255,0.85);
  margin-bottom: 24px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

/* ============================================================
   TABLE STYLES
   ============================================================ */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}
table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  font-size: 15px;
}
thead th {
  background: var(--green-900);
  color: var(--white);
  padding: 14px 20px;
  text-align: left;
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}
tbody td {
  padding: 14px 20px;
  border-bottom: 1px solid var(--gray-200);
  vertical-align: top;
}
tbody tr:nth-child(even) { background: var(--green-50); }
tbody tr:hover { background: var(--green-100); }
tbody td:first-child { font-weight: 700; color: var(--green-800); }

/* Level tags */
.level-tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.level-beginner     { background: #e8f5ec; color: #1a5632; }
.level-intermediate { background: var(--purple-100); color: var(--purple-700); }
.level-advanced     { background: #fde8e8; color: #922; }
.level-elite        { background: var(--purple-50); color: var(--purple-900); }

/* ============================================================
   FAQ
   ============================================================ */
.faq-section { margin: 48px 0 60px; }
.faq-section h2 {
  font-size: 24px;
  font-weight: 700;
  color: var(--green-800);
  margin-bottom: 24px;
}
.faq-item {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  overflow: hidden;
}
.faq-question {
  padding: 18px 24px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  font-size: 15px;
  color: var(--gray-900);
  transition: background 0.2s;
}
.faq-question:hover { background: var(--gray-50); }
.faq-question .arrow {
  transition: transform 0.3s;
  font-size: 12px;
  color: var(--gray-500);
}
.faq-item.open .faq-question .arrow { transform: rotate(180deg); }
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
}
.faq-item.open .faq-answer {
  max-height: 300px;
  padding: 0 24px 18px;
}
.faq-answer p {
  font-size: 15px;
  color: var(--gray-700);
  line-height: 1.6;
}

/* ============================================================
   INFO GRID (for three-up cards)
   ============================================================ */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  margin: 48px 0;
}
.info-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
}
.info-card h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--green-800);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.info-card h3 .icon {
  width: 32px; height: 32px;
  background: var(--green-100);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}
.info-card p, .info-card ul {
  font-size: 15px;
  color: var(--gray-700);
  line-height: 1.6;
}
.info-card ul { list-style: none; padding: 0; }
.info-card ul li {
  padding: 6px 0 6px 20px;
  position: relative;
}
.info-card ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 14px;
  width: 8px;
  height: 8px;
  background: var(--purple-500);
  border-radius: 50%;
}

/* ============================================================
   ARTICLE / LEGAL BODY (about, blog, privacy, terms)
   ============================================================ */
.article-body h2 {
  font-size: 22px;
  font-weight: 800;
  color: var(--green-800);
  letter-spacing: -0.6px;
  margin: 48px 0 16px;
}
.article-body h2:first-child { margin-top: 0; }
.article-body p {
  font-size: 16px;
  color: var(--gray-600);
  line-height: 1.8;
  margin-bottom: 20px;
}
.article-body p:last-child { margin-bottom: 0; }
.article-body strong { color: var(--gray-900); font-weight: 600; }
.article-body a { color: var(--purple-600); font-weight: 600; text-decoration: none; }
.article-body a:hover { text-decoration: underline; }

.pullquote {
  border-left: 4px solid var(--purple-600);
  padding: 20px 28px;
  margin: 36px 0;
  background: var(--purple-50);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.pullquote p {
  font-size: 17px;
  font-weight: 600;
  color: var(--gray-900);
  line-height: 1.6;
  font-style: italic;
  margin-bottom: 0;
}

.legal-body h2 {
  font-size: 20px;
  font-weight: 800;
  color: var(--green-800);
  letter-spacing: -0.5px;
  margin: 40px 0 12px;
}
.legal-body h2:first-child { margin-top: 0; }
.legal-body p {
  font-size: 15px;
  color: var(--gray-600);
  line-height: 1.8;
  margin-bottom: 16px;
}
.legal-body strong { color: var(--gray-900); font-weight: 600; }
.legal-body a { color: var(--purple-600); font-weight: 600; text-decoration: none; }
.legal-body a:hover { text-decoration: underline; }

.legal-updated {
  display: inline-block;
  font-size: 13px;
  color: var(--gray-500);
  margin-bottom: 32px;
  padding: 6px 14px;
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
  border-radius: 100px;
}

/* ============================================================
   AUTHOR CARD
   ============================================================ */
.author-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  margin-bottom: 48px;
}
.author-avatar {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--green-700);
  color: var(--white);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 800;
  flex-shrink: 0;
}
.author-info h3 { font-size: 15px; font-weight: 700; color: var(--gray-900); }
.author-info p { font-size: 13px; color: var(--gray-500); line-height: 1.4; }

/* ============================================================
   ARTICLE CTA
   ============================================================ */
.article-cta {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 40px 32px;
  text-align: center;
  margin-bottom: 80px;
}
.article-cta h2 {
  font-size: 22px;
  font-weight: 800;
  color: var(--green-800);
  letter-spacing: -0.5px;
  margin-bottom: 8px;
}
.article-cta p {
  color: var(--gray-500);
  font-size: 15px;
  margin-bottom: 24px;
}

/* ============================================================
   CONTACT CARDS
   ============================================================ */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 48px;
}
.contact-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 28px 24px;
  text-align: center;
  transition: all 0.2s;
}
.contact-card:hover {
  border-color: var(--purple-500);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.contact-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  background: var(--green-100);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px;
  font-size: 22px;
}
.contact-card h3 { font-size: 15px; font-weight: 700; color: var(--gray-900); margin-bottom: 6px; }
.contact-card p { font-size: 14px; color: var(--gray-500); line-height: 1.5; margin-bottom: 16px; }
.contact-card a.contact-link {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--purple-600); font-size: 14px; font-weight: 600;
  text-decoration: none;
}
.contact-card a.contact-link:hover { color: var(--purple-700); }

/* ============================================================
   CONTACT NOTE
   ============================================================ */
.contact-note {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 32px;
  margin-bottom: 80px;
}
.contact-note h2 { font-size: 18px; font-weight: 800; color: var(--green-800); margin-bottom: 12px; }
.contact-note p { font-size: 15px; color: var(--gray-600); line-height: 1.7; }

/* ============================================================
   MOBILE RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    background: var(--green-900);
    flex-direction: column;
    padding: 12px 20px;
    gap: 4px;
    border-bottom: 2px solid var(--green-700);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 10px 14px; font-size: 15px; }

  .hero { padding: 32px 20px 44px; }
  .hero-light { padding: 40px 20px 32px; }

  .info-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }

  .faq-question { padding: 14px 18px; font-size: 14px; }

  .cta-banner { padding: 32px 20px; }
  .cta-banner h2 { font-size: 20px; }

  .author-card { flex-direction: column; text-align: center; }
  .article-cta { padding: 32px 20px; }

  footer .footer-links { gap: 16px; }

  thead th, tbody td { padding: 10px 12px; font-size: 13px; }
}
