/* ============================================================
   DidYouGolf.com — MAIN STYLESHEET
   ============================================================
   Design tokens live in :root below. To re-theme the site
   around your logo, adjust the color variables in one place.
   ============================================================ */

/* ---------- DESIGN TOKENS (EDIT COLORS HERE) ---------- */
:root {
  /* Golf-inspired palette */
  --green-deep:   #163a26;  /* deep golf green — headers, footer, hero */
  --green:        #1e5233;  /* primary green — buttons, links, accents */
  --green-soft:   #4e7c57;  /* muted fairway green — secondary accents */
  --green-tint:   #e7efe6;  /* pale green tint — chips, hovers */
  --cream:        #faf6ea;  /* warm cream — alternating sections */
  --gold:         #c2a14d;  /* soft gold accent — highlights, CTAs */
  --gold-soft:    #e9dcb8;  /* pale gold — chip borders, details */
  --gray-light:   #f1f2ee;  /* light neutral gray — backgrounds */
  --charcoal:     #262b24;  /* dark charcoal — body text */
  --muted:        #5c6357;  /* secondary text */
  --white:        #ffffff;

  /* Type */
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Inter", -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  /* Layout */
  --container: 1120px;
  --radius: 10px;
  --shadow: 0 2px 10px rgba(22, 58, 38, 0.08);
  --shadow-lg: 0 10px 30px rgba(22, 58, 38, 0.14);
}

/* ---------- RESET & BASE ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--charcoal);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.2;
  color: var(--green-deep);
  margin: 0 0 0.6em;
}

h1 { font-size: clamp(2rem, 4.5vw, 3.1rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1em; }

a { color: var(--green); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--green-deep); }

ul { padding-left: 1.3em; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--gold);
  color: var(--green-deep);
  padding: 0.6rem 1rem;
  z-index: 200;
  border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus { left: 0; }

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

/* ---------- SIGNATURE: TEE-LINE DIVIDER ----------
   A dashed "shot line" that ends in a golf-ball dot,
   used under section headings across the site. */
.tee-line {
  display: block;
  width: 96px;
  height: 12px;
  margin: 0.25rem 0 1.5rem;
  background:
    radial-gradient(circle 5px at calc(100% - 6px) 50%, var(--gold) 98%, transparent) no-repeat,
    repeating-linear-gradient(90deg, var(--green-soft) 0 8px, transparent 8px 14px) no-repeat left 50% / calc(100% - 18px) 2px;
}
.tee-line.center { margin-left: auto; margin-right: auto; }

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.97rem;
  padding: 0.75rem 1.4rem;
  border-radius: 999px;
  border: 2px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}
.btn:hover { transform: translateY(-1px); }

.btn-primary { background: var(--green); color: var(--white); }
.btn-primary:hover { background: var(--green-deep); color: var(--white); }

.btn-gold { background: var(--gold); color: var(--green-deep); }
.btn-gold:hover { background: #b3913e; color: var(--green-deep); }

.btn-outline { background: transparent; color: var(--white); border-color: rgba(255,255,255,0.65); }
.btn-outline:hover { background: rgba(255,255,255,0.12); color: var(--white); }

.btn-outline-green { background: transparent; color: var(--green); border-color: var(--green); }
.btn-outline-green:hover { background: var(--green-tint); color: var(--green-deep); }

.btn-ghost {
  background: var(--gray-light);
  color: var(--muted);
  cursor: default;
  font-size: 0.85rem;
  padding: 0.55rem 1rem;
}
.btn-ghost:hover { transform: none; }

/* ---------- HEADER / NAV ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 1px solid #e4e6df;
  box-shadow: 0 1px 0 rgba(22,58,38,0.03);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 72px;
}

.brand { display: inline-flex; align-items: center; }
.brand-logo { height: 46px; width: auto; }

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav a {
  display: block;
  padding: 0.55rem 0.7rem;
  font-size: 0.93rem;
  font-weight: 500;
  color: var(--charcoal);
  text-decoration: none;
  border-radius: 6px;
}

.site-nav a:hover { background: var(--green-tint); color: var(--green-deep); }

.site-nav a.active {
  color: var(--green-deep);
  background: var(--green-tint);
  font-weight: 600;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: none;
  border: 1px solid #dfe2da;
  border-radius: 8px;
  cursor: pointer;
}
.nav-toggle-bar {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--green-deep);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- HERO ---------- */
.hero {
  position: relative;
  background:
    linear-gradient(115deg, rgba(20,46,30,0.94) 0%, rgba(30,82,51,0.88) 55%, rgba(30,82,51,0.72) 100%),
    url("../images/hero.jpg") center / cover no-repeat;
  color: var(--white);
  padding: clamp(4rem, 9vw, 7rem) 0;
  overflow: hidden;
}

/* Faint fairway contour lines over the hero */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='900' height='600' viewBox='0 0 900 600'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='0.06' stroke-width='2'%3E%3Cpath d='M-50 480 C 200 380, 500 560, 950 430'/%3E%3Cpath d='M-50 530 C 220 430, 520 610, 950 480'/%3E%3Cpath d='M-50 580 C 240 480, 540 660, 950 530'/%3E%3C/g%3E%3C/svg%3E") bottom center / cover no-repeat;
  pointer-events: none;
}

.hero-inner { position: relative; z-index: 1; max-width: 720px; }

.hero-eyebrow {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-soft);
  margin-bottom: 1rem;
}

.hero h1 { color: var(--white); margin-bottom: 0.5em; }

.hero-sub {
  font-size: 1.18rem;
  color: rgba(255,255,255,0.88);
  max-width: 560px;
  margin-bottom: 1.8rem;
}

.hero-buttons { display: flex; flex-wrap: wrap; gap: 0.75rem; }

/* ---------- PAGE HERO (interior pages) ---------- */
.page-hero {
  background: linear-gradient(115deg, var(--green-deep), var(--green));
  color: var(--white);
  padding: clamp(2.5rem, 6vw, 4rem) 0;
}
.page-hero h1 { color: var(--white); margin-bottom: 0.3em; }
.page-hero p { color: rgba(255,255,255,0.88); max-width: 680px; margin-bottom: 0; font-size: 1.1rem; }

/* ---------- SECTIONS ---------- */
.section { padding: clamp(3rem, 6vw, 4.5rem) 0; }
.section-cream { background: var(--cream); }
.section-gray { background: var(--gray-light); }
.section-green { background: var(--green-deep); color: var(--white); }
.section-green h2, .section-green h3 { color: var(--white); }
.section-green p { color: rgba(255,255,255,0.88); }

.section-head { max-width: 680px; margin-bottom: 2rem; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head p { color: var(--muted); margin-bottom: 0; }

.section-footer-link { margin-top: 2rem; text-align: center; }

/* ---------- CARD GRIDS ---------- */
.grid {
  display: grid;
  gap: 1.4rem;
}
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--white);
  border: 1px solid #e6e8e1;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }

.card-link {
  display: block;
  padding: 1.5rem;
  height: 100%;
  color: inherit;
  text-decoration: none;
}

.card-title { margin: 0.6rem 0 0.45rem; font-size: 1.18rem; }
.card-excerpt { color: var(--muted); font-size: 0.95rem; margin-bottom: 0.9rem; }

.card-more {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--green);
}
.card:hover .card-more { color: var(--green-deep); text-decoration: underline; }

/* Category chip — styled like a scorecard tag */
.chip {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--green);
  background: var(--green-tint);
  border: 1px solid var(--gold-soft);
  border-radius: 4px;
  padding: 0.22rem 0.55rem;
}

/* Category feature cards (homepage) */
.cat-card .card-link { padding-top: 1.7rem; }
.cat-icon {
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  background: var(--green-tint);
  border-radius: 50%;
  margin-bottom: 0.9rem;
  font-size: 1.3rem;
}

/* Gear cards */
.gear-card { padding: 1.5rem; display: flex; flex-direction: column; }
.gear-card h3 { margin-bottom: 0.4rem; }
.gear-card p { color: var(--muted); font-size: 0.94rem; flex-grow: 1; }
.gear-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.75rem; }

/* Resource cards */
.resource-card { padding: 1.5rem; }
.resource-card .chip { margin-bottom: 0.7rem; }
.resource-card p { color: var(--muted); font-size: 0.94rem; margin-bottom: 0; }

/* ---------- AFFILIATE DISCLOSURE NOTICE ---------- */
.disclosure {
  background: var(--cream);
  border: 1px solid var(--gold-soft);
  border-left: 4px solid var(--gold);
  border-radius: 8px;
  padding: 0.9rem 1.1rem;
  font-size: 0.9rem;
  color: var(--muted);
  margin: 1.25rem 0;
}

/* ---------- ARTICLE PAGE ---------- */
.article-header { max-width: 760px; }
.article-header .chip { margin-bottom: 0.9rem; }
.article-meta-excerpt { font-size: 1.15rem; color: rgba(255,255,255,0.88); }

.article-body {
  max-width: 720px;
  margin: 0 auto;
}
.article-body h2 {
  font-size: 1.45rem;
  margin-top: 1.8em;
}
.article-body ul li { margin-bottom: 0.45em; }
.article-body a { font-weight: 600; }

.back-link {
  display: inline-block;
  margin-top: 2rem;
  font-weight: 600;
}

/* ---------- CTA BAND ---------- */
.cta-band {
  text-align: center;
}
.cta-band .hero-buttons { justify-content: center; margin-top: 1.5rem; }

/* ---------- FOOTER NEWSLETTER STRIP ---------- */
.footer-cta { background: var(--green); color: var(--white); padding: 2.5rem 0; }
.footer-cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}
.footer-cta-title { color: var(--white); font-size: 1.4rem; margin-bottom: 0.25em; }
.footer-cta-text { color: rgba(255,255,255,0.85); margin: 0; font-size: 0.95rem; max-width: 480px; }

.newsletter-form { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.newsletter-form input[type="email"] {
  padding: 0.7rem 1rem;
  border: none;
  border-radius: 999px;
  font-size: 0.95rem;
  min-width: 240px;
  font-family: var(--font-body);
}

/* ---------- FOOTER ---------- */
.site-footer {
  background: var(--green-deep);
  color: rgba(255,255,255,0.82);
  padding: 3rem 0 1.5rem;
  font-size: 0.93rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255,255,255,0.14);
}

.footer-brand {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 0.5em;
}

.footer-heading {
  font-weight: 700;
  color: var(--gold-soft);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
  margin-bottom: 0.8em;
}

.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 0.5em; }
.site-footer a { color: rgba(255,255,255,0.82); text-decoration: none; }
.site-footer a:hover { color: var(--white); text-decoration: underline; }

.footer-bottom { padding-top: 1.5rem; }
.footer-disclosure { font-size: 0.82rem; color: rgba(255,255,255,0.6); margin-bottom: 0.6em; }
.footer-copyright { font-size: 0.85rem; margin: 0; color: rgba(255,255,255,0.7); }

/* ---------- FORMS (contact) ---------- */
.form-wrap { max-width: 640px; }

.form-group { margin-bottom: 1.2rem; }
.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.93rem;
  margin-bottom: 0.35rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border: 1px solid #d4d8cd;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 1rem;
  background: var(--white);
  color: var(--charcoal);
}
.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--green);
  outline: 2px solid var(--green-tint);
}

/* Honeypot field — hidden from humans, visible to bots */
.hp-field {
  position: absolute !important;
  left: -9999px !important;
  height: 1px; width: 1px;
  overflow: hidden;
}

.form-errors {
  background: #fbeeed;
  border: 1px solid #e5b8b3;
  border-left: 4px solid #c0574c;
  border-radius: 8px;
  padding: 0.9rem 1.1rem;
  margin-bottom: 1.4rem;
  color: #7a2e26;
  font-size: 0.95rem;
}
.form-errors ul { margin: 0.4em 0 0; }

/* ---------- AD SLOTS (Google AdSense) ----------
   Only rendered once ADSENSE_CLIENT + slot IDs are set
   in includes/config.php. */
.ad-slot {
  margin: 1.75rem 0;
  text-align: center;
}
.ad-slot .ad-label {
  display: block;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #a7ab9f;
  margin-bottom: 0.35rem;
}
.ad-slot .adsbygoogle {
  min-height: 90px;
}

/* ---------- CHECKLIST STYLE (resources) ---------- */
.check-list { list-style: none; padding: 0; }
.check-list li {
  padding-left: 1.7em;
  position: relative;
  margin-bottom: 0.5em;
}
.check-list li::before {
  content: "\2713";
  position: absolute;
  left: 0;
  color: var(--green-soft);
  font-weight: 700;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 960px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-about { grid-column: 1 / -1; }
}

@media (max-width: 860px) {
  .nav-toggle { display: flex; }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    border-bottom: 1px solid #e4e6df;
    box-shadow: var(--shadow-lg);
    display: none;
  }
  .site-nav.open { display: block; }

  .site-nav ul {
    flex-direction: column;
    gap: 0;
    padding: 0.5rem 1.25rem 1rem;
  }
  .site-nav a { padding: 0.8rem 0.5rem; font-size: 1rem; border-radius: 8px; }
}

@media (max-width: 640px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 1.8rem; }
  .footer-cta-inner { flex-direction: column; align-items: flex-start; }
  .newsletter-form input[type="email"] { min-width: 0; flex: 1; }
  .hero-buttons .btn { width: 100%; text-align: center; }
}

/* ---------- REDUCED MOTION ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    transition: none !important;
    animation: none !important;
  }
}
