/* ============================================
   GOLF COURSE GUIDE — STYLESHEET
   Aesthetic: Refined luxury golf editorial
   ============================================ */

:root {
  --green-dark: #1a2e1a;
  --green-mid: #2d5a27;
  --green-light: #4a8c3f;
  --green-pale: #e8f0e6;
  --gold: #c9a84c;
  --gold-light: #f0d080;
  --cream: #f9f6f0;
  --white: #ffffff;
  --gray-100: #f4f4f2;
  --gray-300: #d0cfc8;
  --gray-500: #8a8880;
  --gray-800: #2a2a28;
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'DM Sans', system-ui, sans-serif;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-md: 0 8px 32px rgba(0,0,0,0.12);
  --shadow-lg: 0 24px 64px rgba(0,0,0,0.18);
  --radius: 12px;
  --radius-sm: 6px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--cream);
  color: var(--gray-800);
  line-height: 1.6;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---- HEADER ---- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(26, 46, 26, 0.97);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(201, 168, 76, 0.2);
}

.nav {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--white);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.logo span { color: var(--gold); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-links a {
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 400;
  transition: color 0.2s;
}

.nav-links a:hover { color: var(--white); }

.nav-cta {
  background: var(--gold) !important;
  color: var(--green-dark) !important;
  padding: 8px 18px;
  border-radius: 50px;
  font-weight: 500 !important;
  transition: background 0.2s !important;
}

.nav-cta:hover { background: var(--gold-light) !important; }

/* ---- HERO ---- */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  background: var(--green-dark);
  padding: 80px 24px 60px;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(74, 140, 63, 0.25) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(201, 168, 76, 0.1) 0%, transparent 50%),
    radial-gradient(ellipse at 60% 80%, rgba(45, 90, 39, 0.3) 0%, transparent 50%);
}

/* Fairway texture lines */
.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    90deg,
    transparent,
    transparent 60px,
    rgba(255,255,255,0.015) 60px,
    rgba(255,255,255,0.015) 61px
  );
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 720px;
}

.hero-eyebrow {
  display: inline-block;
  background: rgba(201, 168, 76, 0.15);
  border: 1px solid rgba(201, 168, 76, 0.3);
  color: var(--gold-light);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  padding: 6px 16px;
  border-radius: 50px;
  margin-bottom: 24px;
  animation: fadeUp 0.6s ease both;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 900;
  color: var(--white);
  line-height: 1.0;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
  animation: fadeUp 0.6s ease 0.1s both;
}

.hero-sub {
  color: rgba(255,255,255,0.65);
  font-size: 1.05rem;
  font-weight: 300;
  line-height: 1.7;
  margin-bottom: 36px;
  animation: fadeUp 0.6s ease 0.2s both;
}

/* Search Bar */
.search-bar {
  display: flex;
  max-width: 540px;
  margin: 0 auto 20px;
  border-radius: 50px;
  overflow: hidden;
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(201,168,76,0.3);
  animation: fadeUp 0.6s ease 0.3s both;
}

.search-bar input {
  flex: 1;
  padding: 16px 24px;
  border: none;
  outline: none;
  font-family: var(--font-body);
  font-size: 1rem;
  background: rgba(255,255,255,0.97);
  color: var(--gray-800);
}

.search-bar button {
  padding: 16px 28px;
  background: var(--gold);
  border: none;
  color: var(--green-dark);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
}

.search-bar button:hover { background: var(--gold-light); }

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  animation: fadeUp 0.6s ease 0.4s both;
}

.hero-tags span {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.7);
  padding: 6px 14px;
  border-radius: 50px;
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.2s;
}

.hero-tags span:hover {
  background: rgba(201,168,76,0.2);
  border-color: rgba(201,168,76,0.4);
  color: var(--gold-light);
}

.hero-scroll {
  position: absolute;
  bottom: 32px;
  color: rgba(255,255,255,0.35);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  animation: bounce 2s infinite;
}

/* ---- SECTIONS ---- */
.states-section,
.featured-section,
.how-section {
  padding: 80px 0;
}

.states-section { background: var(--cream); }
.featured-section { background: var(--white); }
.how-section { background: var(--green-dark); }

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
  color: inherit;
}

.how-section .section-title { color: var(--white); }

.section-sub {
  color: var(--gray-500);
  margin-bottom: 40px;
  font-size: 1rem;
}

.how-section .section-sub { color: rgba(255,255,255,0.5); }

/* States Grid */
.states-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
}

.state-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--white);
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-decoration: none;
  color: var(--gray-800);
  font-size: 0.88rem;
  font-weight: 500;
  transition: all 0.2s;
}

.state-chip:hover {
  border-color: var(--green-mid);
  background: var(--green-pale);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.state-chip .state-count {
  font-size: 0.75rem;
  color: var(--gray-500);
  background: var(--gray-100);
  padding: 2px 8px;
  border-radius: 50px;
}

/* Featured Grid */
.featured-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.course-card {
  background: var(--cream);
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  transition: all 0.25s;
  display: block;
}

.course-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--green-light);
}

.course-card-img {
  height: 120px;
  background: linear-gradient(135deg, var(--green-dark) 0%, var(--green-mid) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  position: relative;
  overflow: hidden;
}

.course-card-img::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 20px,
    rgba(255,255,255,0.03) 20px,
    rgba(255,255,255,0.03) 21px
  );
}

.course-card-body { padding: 16px; }

.course-card-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 4px;
  line-height: 1.3;
}

.course-card-loc {
  color: var(--gray-500);
  font-size: 0.82rem;
  margin-bottom: 10px;
}

.course-card-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.tag {
  font-size: 0.72rem;
  padding: 3px 8px;
  border-radius: 50px;
  background: var(--green-pale);
  color: var(--green-mid);
  font-weight: 500;
  border: 1px solid rgba(74,140,63,0.2);
}

/* How It Works */
.how-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px;
}

.how-card {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius);
  padding: 32px 24px;
  text-align: center;
}

.how-icon {
  font-size: 2.5rem;
  margin-bottom: 16px;
}

.how-card h3 {
  font-family: var(--font-display);
  color: var(--white);
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.how-card p {
  color: rgba(255,255,255,0.55);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* ---- BROWSE PAGE ---- */
.browse-hero {
  padding: 100px 0 40px;
  background: var(--green-dark);
}

.browse-hero h1 {
  font-family: var(--font-display);
  color: var(--white);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  margin-bottom: 24px;
}

.browse-search-wrap {
  display: flex;
  gap: 12px;
  max-width: 640px;
  flex-wrap: wrap;
}

.browse-search-wrap input {
  flex: 1;
  min-width: 200px;
  padding: 14px 20px;
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.08);
  color: var(--white);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.95rem;
  outline: none;
  transition: border 0.2s;
}

.browse-search-wrap input::placeholder { color: rgba(255,255,255,0.4); }
.browse-search-wrap input:focus { border-color: var(--gold); }

.browse-search-wrap select {
  padding: 14px 20px;
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.08);
  color: var(--white);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.95rem;
  outline: none;
  cursor: pointer;
}

.browse-search-wrap select option { background: var(--green-dark); }

.result-count {
  color: rgba(255,255,255,0.5);
  font-size: 0.85rem;
  margin-top: 12px;
}

.browse-results {
  padding: 40px 0 80px;
}

.courses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.no-results {
  text-align: center;
  padding: 60px;
  color: var(--gray-500);
}

/* ---- COURSE PAGE ---- */
.course-hero {
  padding: 100px 0 48px;
  background: linear-gradient(135deg, var(--green-dark) 0%, #243d22 100%);
  position: relative;
  overflow: hidden;
}

.course-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    90deg,
    transparent,
    transparent 80px,
    rgba(255,255,255,0.02) 80px,
    rgba(255,255,255,0.02) 81px
  );
}

.back-link {
  color: rgba(255,255,255,0.5);
  text-decoration: none;
  font-size: 0.85rem;
  display: inline-block;
  margin-bottom: 20px;
  transition: color 0.2s;
}

.back-link:hover { color: var(--gold); }

.course-hero-content { position: relative; z-index: 1; }

.course-badge {
  display: inline-block;
  background: rgba(201,168,76,0.15);
  border: 1px solid rgba(201,168,76,0.3);
  color: var(--gold-light);
  font-size: 0.8rem;
  font-weight: 500;
  padding: 4px 14px;
  border-radius: 50px;
  margin-bottom: 12px;
  letter-spacing: 0.05em;
}

.course-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.5rem);
  color: var(--white);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 12px;
}

.course-meta {
  color: rgba(255,255,255,0.6);
  font-size: 0.9rem;
  margin-bottom: 16px;
}

.course-tags { display: flex; gap: 8px; flex-wrap: wrap; }

.course-body { padding: 48px 0 80px; }

.course-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 32px;
  align-items: start;
}

.section-header { margin-bottom: 24px; }

.section-header h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.section-header p { color: var(--gray-500); font-size: 0.9rem; }

/* Videos Grid */
.videos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.video-thumb {
  background: var(--white);
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s;
}

.video-thumb:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.video-thumb iframe {
  width: 100%;
  aspect-ratio: 16/9;
  border: none;
  display: block;
}

.video-thumb-info { padding: 12px; }

.video-thumb-title {
  font-size: 0.88rem;
  font-weight: 500;
  line-height: 1.4;
  color: var(--gray-800);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.video-thumb-channel {
  font-size: 0.75rem;
  color: var(--gray-500);
  margin-top: 4px;
}

.video-loading {
  text-align: center;
  padding: 60px;
  color: var(--gray-500);
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--gray-300);
  border-top-color: var(--green-mid);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 16px;
}

.video-error {
  background: #fff8f0;
  border: 1px solid #f0d0a0;
  border-radius: var(--radius);
  padding: 24px;
  color: #a06020;
  font-size: 0.9rem;
}

/* Sidebar */
.course-sidebar { display: flex; flex-direction: column; gap: 20px; }

.sidebar-card {
  background: var(--white);
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  padding: 20px;
}

.sidebar-card h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--gray-300);
}

.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 7px 0;
  border-bottom: 1px solid var(--gray-100);
  font-size: 0.88rem;
}

.detail-row:last-child { border-bottom: none; }
.detail-label { color: var(--gray-500); }
.detail-value { font-weight: 500; text-align: right; }

.tee-time-card { border-color: var(--green-light); }
.tee-time-card h3 { color: var(--green-mid); }

.btn-tee-time {
  display: block;
  background: var(--green-mid);
  color: var(--white);
  text-decoration: none;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 500;
  text-align: center;
  margin-top: 12px;
  transition: background 0.2s;
}

.btn-tee-time:hover { background: var(--green-dark); }

.btn-gear {
  display: block;
  background: var(--gold);
  color: var(--green-dark);
  text-decoration: none;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 600;
  text-align: center;
  margin-top: 12px;
  transition: background 0.2s;
}

.btn-gear:hover { background: var(--gold-light); }

/* ---- FOOTER ---- */
.site-footer {
  background: var(--green-dark);
  color: rgba(255,255,255,0.5);
  padding: 40px 0;
  text-align: center;
}

.footer-logo {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--white);
  margin-bottom: 8px;
}

.footer-small { font-size: 0.8rem; margin-top: 8px; }

/* ---- ANIMATIONS ---- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

/* ---- RESPONSIVE ---- */
@media (max-width: 768px) {
  .course-layout {
    grid-template-columns: 1fr;
  }

  .course-sidebar {
    order: -1;
  }

  .nav-links a:not(.nav-cta) { display: none; }

  .states-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  }

  .videos-grid {
    grid-template-columns: 1fr;
  }
}
