/*
Theme Name: Fairway
Description: A modern, elegant theme for golf courses. Edit CSS variables at the top of this file to change colours, fonts and spacing site-wide.
Version: 1.0
Author: Claude
*/

/* ============================================================
   EASY EDIT — change these variables to restyle the whole site
   ============================================================ */
:root {
  /* Colours */
  --green-dark:   #1a3a2a;   /* nav, footer background */
  --green-mid:    #2d6a4f;   /* buttons, accents */
  --green-light:  #52b788;   /* hover states, highlights */
  --gold:         #c9a84c;   /* decorative accents, borders */
  --cream:        #f8f5f0;   /* page background */
  --white:        #ffffff;
  --text-dark:    #1c1c1c;
  --text-mid:     #4a4a4a;
  --text-light:   #7a7a7a;

  /* Typography */
  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body:    'Inter', 'Segoe UI', sans-serif;
  --font-nav:     'Inter', 'Segoe UI', sans-serif;

  /* Sizing */
  --max-width:    1200px;
  --radius:       6px;
  --radius-lg:    14px;
  --shadow:       0 4px 24px rgba(0,0,0,0.10);
  --shadow-lg:    0 8px 40px rgba(0,0,0,0.16);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--cream);
  color: var(--text-dark);
  line-height: 1.7;
  font-size: 16px;
}

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

a { color: var(--green-mid); text-decoration: none; transition: color .2s; }
a:hover { color: var(--green-light); }

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--green-dark);
  line-height: 1.2;
  font-weight: 700;
}
h1 { font-size: clamp(2.2rem, 5vw, 3.8rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.6rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.8rem); }
h4 { font-size: 1.2rem; }
p  { margin-bottom: 1.2rem; color: var(--text-mid); }

/* ============================================================
   LAYOUT HELPERS
   ============================================================ */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}
.section { padding: 80px 0; }
.section-sm { padding: 48px 0; }
.text-center { text-align: center; }

.section-label {
  display: inline-block;
  font-family: var(--font-nav);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 12px;
}
.section-title { margin-bottom: 16px; }
.section-intro {
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto 48px;
}
.gold-rule {
  width: 56px;
  height: 3px;
  background: var(--gold);
  margin: 16px auto 32px;
  border: none;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-block;
  padding: 14px 32px;
  border-radius: var(--radius);
  font-family: var(--font-nav);
  font-size: .9rem;
  font-weight: 600;
  letter-spacing: .04em;
  cursor: pointer;
  transition: all .2s;
  border: 2px solid transparent;
}
.btn-primary {
  background: var(--green-mid);
  color: var(--white);
  border-color: var(--green-mid);
}
.btn-primary:hover {
  background: var(--green-dark);
  border-color: var(--green-dark);
  color: var(--white);
}
.btn-outline {
  background: transparent;
  color: var(--white);
  border-color: var(--white);
}
.btn-outline:hover {
  background: var(--white);
  color: var(--green-dark);
}
.btn-gold {
  background: var(--gold);
  color: var(--green-dark);
  border-color: var(--gold);
}
.btn-gold:hover {
  background: #b8923f;
  border-color: #b8923f;
  color: var(--white);
}

/* ============================================================
   HEADER & NAV
   ============================================================ */
#site-header {
  background: var(--green-dark);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 12px rgba(0,0,0,.25);
}

/* Two-row layout: logo row + nav row when menu is long */
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  max-width: var(--max-width);
  margin: 0 auto;
  min-height: 64px;
  flex-wrap: wrap;
  gap: 0;
}

/* Logo */
.site-logo {
  display: flex;
  flex-direction: column;
  line-height: 1;
  text-decoration: none;
  padding: 12px 0;
  flex-shrink: 0;
}
.logo-name {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: .02em;
}
.logo-tagline {
  font-family: var(--font-nav);
  font-size: .6rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--gold);
  margin-top: 3px;
}

/* Nav takes remaining space and wraps its items */
#primary-nav {
  flex: 1;
  min-width: 0;
}
.nav-menu {
  display: flex;
  flex-wrap: wrap;          /* items wrap to a 2nd line if needed */
  list-style: none;
  margin: 0;
  padding: 0;
  justify-content: flex-end;
  align-items: center;
}

/* Each top-level item */
.nav-item {
  position: relative;
}
.nav-item > a {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 20px 11px;
  font-family: var(--font-nav);
  font-size: .82rem;
  font-weight: 500;
  color: rgba(255,255,255,.85);
  letter-spacing: .02em;
  white-space: nowrap;
  transition: color .2s, background .2s;
  text-decoration: none;
}
.nav-item > a:hover,
.nav-item.active > a {
  color: var(--white);
  background: rgba(255,255,255,.08);
}
.nav-arrow {
  font-size: .55rem;
  opacity: .7;
  transition: transform .2s;
}
.nav-item.has-dropdown:hover .nav-arrow,
.nav-item.has-dropdown.open .nav-arrow {
  transform: rotate(180deg);
}

/* ── Dropdown sub-menu ─────────────────────────────── */
.sub-menu {
  display: none;
  position: absolute;
  top: calc(100% + 2px);
  left: 0;
  min-width: 200px;
  background: var(--green-dark);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: 0 8px 24px rgba(0,0,0,.3);
  list-style: none;
  padding: 6px 0;
  z-index: 100;
}
/* Show on hover (desktop) */
.nav-item.has-dropdown:hover > .sub-menu,
.nav-item.has-dropdown.open > .sub-menu {
  display: block;
}
.sub-menu li a {
  display: block;
  padding: 9px 18px;
  font-family: var(--font-nav);
  font-size: .82rem;
  color: rgba(255,255,255,.78);
  white-space: nowrap;
  transition: background .15s, color .15s;
  text-decoration: none;
}
.sub-menu li a:hover {
  background: rgba(255,255,255,.08);
  color: var(--white);
}
/* Right-align dropdowns that would overflow viewport */
.nav-item:last-child .sub-menu,
.nav-item:nth-last-child(2) .sub-menu {
  left: auto;
  right: 0;
}

/* Mobile hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  flex-shrink: 0;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: all .3s;
}
/* Animated X when open */
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 90vh;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, var(--green-dark) 0%, #2d5a3d 60%, #3a7d55 100%);
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background-image: url('assets/hero.jpg');
  background-size: cover;
  background-position: center;
  opacity: .35;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(26,58,42,.85) 40%, rgba(26,58,42,.3) 100%);
}
.hero-content {
  position: relative;
  z-index: 1;
  max-width: 680px;
}
.hero .section-label { color: var(--gold); }
.hero h1 { color: var(--white); margin-bottom: 20px; }
.hero p {
  font-size: 1.15rem;
  color: rgba(255,255,255,.85);
  margin-bottom: 36px;
  max-width: 520px;
}
.hero-btns { display: flex; gap: 16px; flex-wrap: wrap; }

.hero-scroll {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: rgba(255,255,255,.6);
  font-size: .75rem;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.hero-scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, rgba(255,255,255,.6), transparent);
  animation: scrollBounce 1.8s ease-in-out infinite;
}
@keyframes scrollBounce {
  0%, 100% { transform: scaleY(1); opacity: .6; }
  50% { transform: scaleY(.6); opacity: .2; }
}

/* ============================================================
   STATS BAR
   ============================================================ */
.stats-bar { background: var(--green-dark); padding: 28px 0; }
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.stat-item {
  text-align: center;
  padding: 12px 16px;
  border-right: 1px solid rgba(255,255,255,.1);
}
.stat-item:last-child { border-right: none; }
.stat-number {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--gold);
  line-height: 1;
}
.stat-label {
  font-size: .78rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(255,255,255,.65);
  margin-top: 6px;
}

/* ============================================================
   FEATURES
   ============================================================ */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-top: 48px;
}
.feature-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 36px 28px;
  box-shadow: var(--shadow);
  border-bottom: 3px solid transparent;
  transition: all .3s;
}
.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-bottom-color: var(--green-mid);
}
.feature-icon { font-size: 2.2rem; margin-bottom: 20px; line-height: 1; }
.feature-card h3 { margin-bottom: 10px; font-size: 1.2rem; }
.feature-card p { font-size: .95rem; margin: 0; }

/* ============================================================
   COURSE SECTION
   ============================================================ */
.course-section { background: var(--white); }
.course-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}
.course-image {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  aspect-ratio: 4/3;
  background: var(--green-mid);
}
.course-image img { width: 100%; height: 100%; object-fit: cover; }
.course-image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  background: linear-gradient(135deg, #2d6a4f, #52b788);
}
.course-features {
  list-style: none;
  margin: 24px 0 32px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.course-features li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: .95rem;
  color: var(--text-mid);
}
.course-features li::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
  flex-shrink: 0;
}

/* ============================================================
   MEMBERSHIP
   ============================================================ */
.membership-section { background: var(--cream); }
.membership-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-top: 48px;
}
.membership-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 40px 32px;
  box-shadow: var(--shadow);
  text-align: center;
  position: relative;
  transition: all .3s;
}
.membership-card.featured {
  background: var(--green-dark);
  transform: scale(1.04);
  box-shadow: var(--shadow-lg);
}
.membership-card.featured h3,
.membership-card.featured .price { color: var(--white); }
.membership-card.featured p { color: rgba(255,255,255,.75); }
.featured-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--gold);
  color: var(--green-dark);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 5px 16px;
  border-radius: 20px;
  white-space: nowrap;
}
.membership-card h3 { font-size: 1.3rem; margin-bottom: 8px; }
.price {
  font-family: var(--font-heading);
  font-size: 2.8rem;
  font-weight: 700;
  color: var(--green-dark);
  line-height: 1;
  margin: 16px 0 4px;
}
.price-period { font-size: .85rem; color: var(--text-light); margin-bottom: 20px; }
.membership-features {
  list-style: none;
  text-align: left;
  margin: 20px 0 28px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.membership-features li {
  font-size: .9rem;
  color: var(--text-mid);
  padding-left: 20px;
  position: relative;
}
.membership-card.featured .membership-features li { color: rgba(255,255,255,.8); }
.membership-features li::before {
  content: '\2713';
  position: absolute;
  left: 0;
  color: var(--green-light);
  font-weight: 700;
}
.membership-card.featured .membership-features li::before { color: var(--gold); }

/* ============================================================
   TESTIMONIALS
   ============================================================ */
.testimonials-section { background: var(--green-dark); }
.testimonials-section .section-label { color: var(--gold); }
.testimonials-section .section-title { color: var(--white); }
.testimonials-section .gold-rule { margin: 16px auto 48px; }
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.testimonial-card {
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--radius-lg);
  padding: 32px;
}
.testimonial-stars { color: var(--gold); font-size: 1rem; margin-bottom: 16px; }
.testimonial-text {
  color: rgba(255,255,255,.85);
  font-size: .95rem;
  line-height: 1.7;
  margin-bottom: 24px;
  font-style: italic;
}
.testimonial-author { display: flex; align-items: center; gap: 12px; }
.author-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--green-mid);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 1.1rem;
  color: var(--white);
  flex-shrink: 0;
}
.author-name { font-weight: 600; color: var(--white); font-size: .9rem; }
.author-detail { font-size: .8rem; color: rgba(255,255,255,.5); }

/* ============================================================
   CTA BANNER
   ============================================================ */
.cta-banner {
  background: linear-gradient(135deg, var(--green-mid), var(--green-dark));
  padding: 80px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-banner::before {
  content: '\26F3';
  position: absolute;
  font-size: 18rem;
  opacity: .04;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  line-height: 1;
}
.cta-banner h2 { color: var(--white); margin-bottom: 12px; position: relative; }
.cta-banner p { color: rgba(255,255,255,.8); max-width: 500px; margin: 0 auto 36px; position: relative; }
.cta-btns { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; position: relative; }

/* ============================================================
   FOOTER
   ============================================================ */
#site-footer {
  background: var(--green-dark);
  color: rgba(255,255,255,.7);
  padding: 64px 0 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.footer-logo .logo-name { font-size: 1.4rem; }
.footer-tagline {
  font-size: .85rem;
  margin-top: 12px;
  margin-bottom: 20px;
  color: rgba(255,255,255,.55);
}
.footer-socials { display: flex; gap: 10px; }
.footer-social-link {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,.7);
  font-size: .85rem;
  transition: all .2s;
  text-decoration: none;
}
.footer-social-link:hover { background: var(--green-mid); color: var(--white); }
.footer-col h4 {
  font-family: var(--font-nav);
  font-size: .75rem;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 20px;
  font-weight: 700;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-col ul li a { color: rgba(255,255,255,.65); font-size: .9rem; transition: color .2s; }
.footer-col ul li a:hover { color: var(--white); }
.footer-contact p { font-size: .9rem; line-height: 1.8; margin: 0; color: rgba(255,255,255,.65); }
.footer-bottom {
  padding: 20px 24px;
  text-align: center;
  font-size: .82rem;
  color: rgba(255,255,255,.35);
  max-width: var(--max-width);
  margin: 0 auto;
}

/* ============================================================
   PAGE HERO (inner pages)
   ============================================================ */
.page-hero {
  background: linear-gradient(135deg, var(--green-dark), #2d5a3d);
  padding: 80px 0 60px;
  text-align: center;
}
.page-hero h1 { color: var(--white); }
.page-hero p { color: rgba(255,255,255,.75); max-width: 540px; margin: 12px auto 0; }

/* ============================================================
   CONTENT PAGES
   ============================================================ */
.content-wrap {
  max-width: 780px;
  margin: 0 auto;
  padding: 64px 24px;
}
.content-wrap h2, .content-wrap h3 { margin: 36px 0 12px; }
.content-wrap p { margin-bottom: 1.4rem; }
.content-wrap ul, .content-wrap ol { margin: 0 0 1.4rem 24px; }
.content-wrap li { margin-bottom: .5rem; color: var(--text-mid); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .course-grid { grid-template-columns: 1fr; gap: 40px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 36px; }
}

@media (max-width: 768px) {
  .section { padding: 56px 0; }

  /* Hide desktop nav, show hamburger */
  #primary-nav { display: none; width: 100%; order: 3; }
  #primary-nav.open { display: block; }
  .nav-toggle { display: flex; }

  /* Mobile nav — full-width dropdown panel */
  #primary-nav.open .nav-menu {
    flex-direction: column;
    align-items: stretch;
    background: #122a1e;
    border-top: 1px solid rgba(255,255,255,.1);
    padding: 8px 0;
    gap: 0;
  }
  #primary-nav.open .nav-item > a {
    padding: 12px 20px;
    justify-content: space-between;
    font-size: .9rem;
  }
  /* Mobile sub-menus: show inline when parent has .open class */
  #primary-nav.open .sub-menu {
    position: static;
    display: none;
    border: none;
    border-radius: 0;
    box-shadow: none;
    background: rgba(0,0,0,.2);
    padding: 0;
  }
  #primary-nav.open .nav-item.open > .sub-menu { display: block; }
  #primary-nav.open .sub-menu li a { padding: 10px 20px 10px 36px; }

  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-item:nth-child(2) { border-right: none; }
  .membership-grid { grid-template-columns: 1fr; }
  .membership-card.featured { transform: none; }
  .testimonials-grid { grid-template-columns: 1fr; }
  .features-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
}

@media (max-width: 480px) {
  .hero-btns { flex-direction: column; }
  .cta-btns { flex-direction: column; align-items: center; }
  h1 { font-size: 2rem; }
}
