* { box-sizing: border-box; }

:root {
  --primary-color: #165DFF;
  --secondary-color: #00B42A;
  --accent-color: #FF7D00;
  --danger-color: #F53F3F;
  --neutral-100: #F2F3F5;
  --neutral-200: #E5E6EB;
  --neutral-300: #C9CDD4;
  --neutral-400: #86909C;
  --neutral-500: #4E5969;
  --neutral-600: #272E3B;
  --neutral-700: #1D2129;
  --shadow-light: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-medium: 0 4px 16px rgba(0,0,0,0.12);
  --radius-lg: 12px;
  --radius-md: 8px;
  --radius-sm: 6px;
}

body {
  margin: 0;
  padding: 0;
  background-color: #ffffff;
  font-family: 'Roboto', sans-serif;
  font-size: large;
  color: var(--neutral-700);
}

/* ── Navbar ── */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #ffffff;
  color: #000;
  padding: 1rem 2%;
}

.title {
  margin: 0;
  font-size: 2rem;
  list-style: none;
  display: block;
  padding-left: 2%;
}

.title a {
  text-decoration: none;
  color: #000;
}

.navbar-links ul {
  margin: 0;
  padding: 0;
  display: flex;
  list-style: none;
  align-items: center;
}

.navbar-links li a {
  text-decoration: none;
  color: #000;
  padding: 0.5rem;
  display: block;
}

.navbar-links li:hover {
  background-color: #faf9f6;
}

.toggle-button {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 40px;
  height: 30px;
  cursor: pointer;
  position: absolute;
  margin: 0;
  padding: 0;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
}

.toggle-button .bar {
  height: 4px;
  width: 100%;
  background-color: #000;
  border-radius: 10px;
}

/* ── Dropdown ── */
.nav-dropdown { position: relative; }

.nav-dropdown-toggle {
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  text-decoration: none;
  color: #000;
  padding: 0.5rem;
  font-size: inherit;
  background: none;
  border: none;
  font-family: inherit;
  white-space: nowrap;
}

.nav-dropdown-toggle .chevron {
  width: 11px; height: 11px;
  transition: transform 0.2s ease;
  opacity: 0.55;
  flex-shrink: 0;
}

.nav-dropdown.open .nav-dropdown-toggle .chevron { transform: rotate(180deg); }

.nav-dropdown-panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(-4px);
  background: #fff;
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 28px rgba(0,0,0,0.10), 0 2px 8px rgba(0,0,0,0.06);
  padding: 0.4rem;
  min-width: 210px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
  z-index: 300;
}

.nav-dropdown-panel::before {
  content: '';
  position: absolute;
  top: -5px; left: 50%;
  width: 10px; height: 10px;
  background: #fff;
  border-left: 1px solid var(--neutral-200);
  border-top: 1px solid var(--neutral-200);
  transform: translateX(-50%) rotate(45deg);
}

.nav-dropdown.open .nav-dropdown-panel {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.nav-dropdown-item {
  display: block;
  padding: 0.5rem 0.8rem;
  border-radius: var(--radius-md);
  text-decoration: none;
  color: #000;
  font-size: inherit;
  transition: background 0.12s ease;
}

.nav-dropdown-item:hover { background: #faf9f6; }

.nav-dropdown-divider {
  height: 1px;
  background: var(--neutral-200);
  margin: 0.3rem 0.5rem;
}

/* ── Page Header ── */
.page-header {
  padding: 2rem 2.5rem 1.5rem;
  border-bottom: 1px solid var(--neutral-200);
}

.page-header h1 {
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--neutral-700);
  margin-bottom: 0.25rem;
}

.page-header p {
  color: var(--neutral-400);
  font-size: 0.9rem;
}

.status-bar {
  margin-top: 0.75rem;
  font-size: 0.78rem;
  color: var(--neutral-400);
}

.status-bar span { color: #00B42A; }

/* ── Controls ── */
.controls {
  padding: 1.25rem 2.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  border-bottom: 1px solid var(--neutral-200);
}

.controls input, .controls select {
  border: 1px solid var(--neutral-300);
  background: #fff;
  color: var(--neutral-700);
  padding: 8px 12px;
  border-radius: var(--radius-lg);
  font-size: 0.9rem;
  font-family: 'Roboto', sans-serif;
  outline: none;
  box-shadow: var(--shadow-light);
}

.controls input { width: 220px; }
.controls input:focus, .controls select:focus { border-color: var(--primary-color); }
.count { color: var(--neutral-400); font-size: 0.8rem; margin-left: auto; }

/* ── Grid ── */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.25rem;
  padding: 2rem 2.5rem;
}

/* ── Card ── */
.card {
  background: #fff;
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow-light);
  transition: box-shadow 0.2s, transform 0.2s;
}

.card:hover {
  box-shadow: var(--shadow-medium);
  transform: translateY(-2px);
}

.card-header { margin-bottom: 0.75rem; }

.card-header h2 {
  font-size: 1rem;
  font-weight: 900;
  color: var(--neutral-700);
  margin-bottom: 0.2rem;
}

.card-header .city {
  font-size: 0.75rem;
  color: var(--neutral-400);
  letter-spacing: 1px;
  text-transform: uppercase;
}

.card-meta { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 0.75rem; }

.badge {
  font-size: 0.72rem;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-sm);
  background: var(--neutral-100);
  border: 1px solid var(--neutral-200);
  color: var(--neutral-500);
}



/* ── Weather ── */
.weather {
  background: var(--neutral-100);
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  margin-bottom: 0.75rem;
}

.weather-current { display: flex; align-items: center; gap: 1rem; margin-bottom: 0.5rem; }
.weather-temp { font-size: 1.3rem; font-weight: 900; color: var(--neutral-700); }
.weather-details { font-size: 0.75rem; color: var(--neutral-400); }
.weather-details div { margin-bottom: 0.1rem; }

.weather-forecast { display: flex; gap: 0.4rem; margin-top: 0.5rem; }

.forecast-day {
  flex: 1;
  text-align: center;
  font-size: 0.7rem;
  color: var(--neutral-500);
  background: #fff;
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-sm);
  padding: 0.4rem;
}

.forecast-day .date { color: var(--neutral-400); margin-bottom: 0.2rem; }
.forecast-day .temps { color: var(--neutral-600); font-weight: 700; }

/* ── Tee Times ── */
.tee-times { margin-bottom: 0.75rem; }

.tee-times h4 {
  font-size: 0.7rem;
  letter-spacing: 1px;
  color: var(--neutral-400);
  text-transform: uppercase;
  margin-bottom: 0.4rem;
  font-weight: 800;
}

.booking-link {
  display: block;
  font-size: 0.8rem;
  color: var(--primary-color);
  text-decoration: none;
  padding: 0.3rem 0;
  border-bottom: 1px solid var(--neutral-100);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.2s;
}

.booking-link:hover { color: var(--neutral-700); }
.booking-link:last-child { border-bottom: none; }
.no-booking { font-size: 0.78rem; color: var(--neutral-300); font-style: italic; }

/* ── Card Footer ── */
.card-footer {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--neutral-200);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.phone { font-size: 0.75rem; color: var(--neutral-400); }

.visit-link {
  font-size: 0.72rem;
  color: var(--primary-color);
  text-decoration: none;
  letter-spacing: 0.5px;
  font-weight: 700;
  transition: color 0.2s;
}

.visit-link:hover { color: var(--neutral-700); }

/* ── State Messages ── */
.state-msg {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--neutral-400);
  font-size: 0.9rem;
}

.state-msg .spinner {
  width: 24px; height: 24px;
  border: 2px solid var(--neutral-200);
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 1rem;
}

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

/* ── Footer ── */
footer {
  text-align: center;
  padding: 2rem;
  border-top: 1px solid var(--neutral-200);
  font-size: 0.75rem;
  color: var(--neutral-400);
  margin-top: 2rem;
}

/* ── Desktop ── */
@media (min-width: 651px) {
  .navbar-content {
    display: flex;
    align-items: center;
    flex-grow: 1;
    justify-content: flex-end;
  }
}

/* ── Mobile ── */
@media (max-width: 650px) {
  .navbar {
    padding: 1rem;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    position: relative;
  }

  .toggle-button { display: flex; position: static; }

  .navbar-content {
    display: none;
    position: absolute;
    top: 100%; left: 0;
    width: 100%;
    background-color: #fff;
    padding: 1rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    z-index: 10;
  }

  .navbar-content.active { display: block; }

  .navbar-links ul { flex-direction: column; align-items: flex-start; }
  .navbar-links li { margin-left: 0; margin-bottom: 0.1rem; width: 100%; }
  .navbar-links li a { padding: 0.5rem 0; }

  .nav-dropdown-toggle { width: 100%; padding: 0.5rem 0; justify-content: flex-start; }

  .nav-dropdown-panel {
    position: static;
    transform: none;
    box-shadow: none;
    border: none;
    border-left: 2px solid var(--neutral-200);
    border-radius: 0;
    padding: 0.2rem 0 0.2rem 0.75rem;
    margin-left: 0.5rem;
    opacity: 1;
    pointer-events: none;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
  }

  .nav-dropdown-panel::before { display: none; }

  .nav-dropdown.open .nav-dropdown-panel {
    pointer-events: auto;
    max-height: 300px;
    transform: none;
  }

  .nav-dropdown-item { padding: 0.45rem 0.4rem; }

  .grid { padding: 1rem; gap: 1rem; }
  .controls { padding: 1rem; }
  .controls input { width: 100%; }
  .page-header { padding: 1.5rem 1rem 1rem; }
  .count { margin-left: 0; }
}