/* Hilltop Clubs Directory — shared styles.
   Type scale bumped a touch over the Pickleball site since the audience skews older. */

:root {
  --primary-color: #4a90e2;
  --secondary-color: #16a34a;
  --accent-color: #f59e0b;
  --dark: #1e293b;
  --light: #f8fafc;
  --gray: #64748b;
  --gray-light: #e2e8f0;
  --danger: #dc2626;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 4px 12px rgba(0, 0, 0, 0.04);
  --shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.08), 0 8px 24px rgba(0, 0, 0, 0.06);
}

* { box-sizing: border-box; }

html { font-size: 18px; } /* Older audience — bigger base */

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--dark);
  background: var(--light);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary-color); text-decoration: none; }
a:hover { text-decoration: underline; }

header.site-header {
  background: linear-gradient(135deg, #4a90e2 0%, #5b6bd1 100%);
  color: white;
  padding: 1.4rem 1.25rem;
  box-shadow: var(--shadow);
  text-align: center;
}
header.site-header h1 {
  margin: 0;
  font-size: 2.2rem;
  letter-spacing: -0.02em;
  font-weight: 700;
}
@media (min-width: 768px) { header.site-header h1 { font-size: 2.6rem; } }
header.site-header h1 a { color: white; text-decoration: none; }
header.site-header .tagline {
  font-size: 1rem;
  opacity: 0.9;
  margin-top: 0.25rem;
}

/* Landing hero — slim, search-forward. The site header carries the title and
   tagline, so the hero just needs a search bar, a soft frame, and an opt-in
   note. */
.hero {
  background:
    radial-gradient(1200px 280px at 80% -10%, rgba(255,255,255,0.55), transparent 60%),
    linear-gradient(135deg, #e0ecff 0%, #f0e7ff 60%, #fff5e6 100%);
  border-radius: 18px;
  padding: 1.75rem 1.5rem 1.5rem;
  margin-bottom: 2rem;
  text-align: center;
  border: 1px solid rgba(74, 144, 226, 0.12);
}
@media (min-width: 768px) { .hero { padding: 2.25rem 2.5rem 1.75rem; } }
.hero .opt-in-note {
  margin: 0.85rem auto 0.5rem;
  max-width: 38rem;
  color: var(--gray);
  font-size: 0.95rem;
  font-style: italic;
  opacity: 0.85;
}
.hero .stats {
  display: inline-flex;
  gap: 1.5rem;
  margin: 0.25rem 0 0;
  font-size: 0.85rem;
  color: var(--gray);
  flex-wrap: wrap;
  justify-content: center;
}
.hero .stats strong { color: var(--primary-color); font-size: 1rem; font-weight: 700; }
.hero .search-wrap {
  position: relative;
  max-width: 38rem;
  margin: 0 auto;
}
.hero .search-wrap::before {
  content: "🔍";
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.1rem;
  pointer-events: none;
  opacity: 0.6;
}
.hero .search-bar {
  margin: 0;
  padding-left: 2.75rem;
  border-color: white;
  box-shadow: 0 4px 20px rgba(74, 144, 226, 0.12), 0 1px 3px rgba(0,0,0,0.04);
  background: white;
}
.hero .search-bar:focus { box-shadow: 0 4px 24px rgba(74, 144, 226, 0.22); }

/* Section heading used between hero, categories, featured, etc. */
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin: 0 0 1rem;
}
.section-head h3 { margin: 0; font-size: 1.35rem; letter-spacing: -0.01em; }
.section-head .hint { color: var(--gray); font-size: 0.9rem; }

main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.25rem;
}

h2 { font-size: 1.3rem; margin: 0 0 0.75rem; }
h3 { font-size: 1.2rem; margin: 0 0 0.5rem; }

.search-bar {
  width: 100%;
  padding: 0.85rem 1rem;
  font-size: 1.05rem;
  border: 2px solid var(--gray-light);
  border-radius: var(--radius);
  background: white;
  margin-bottom: 1.5rem;
}
.search-bar:focus {
  outline: none;
  border-color: var(--primary-color);
}

.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
@media (min-width: 640px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 960px) {
  .grid.grid-3 { grid-template-columns: repeat(3, 1fr); }
}

.card {
  background: white;
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: box-shadow 0.15s, transform 0.15s;
}
.card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
  text-decoration: none;
}
.card .icon {
  font-size: 2rem;
  line-height: 1;
}

/* Category cards — each category gets a tinted gradient + accent stripe via
   --c1/--c2/--accent custom properties keyed off data-slug. Defaults below
   keep things readable if a slug is unrecognized. */
.category-card {
  --c1: #eef2ff;
  --c2: #ffffff;
  --accent: var(--primary-color);
  gap: 0.85rem;
  padding: 1.5rem 1.25rem 1.35rem;
  background: linear-gradient(160deg, var(--c1), var(--c2) 75%);
  border: 1px solid rgba(15, 23, 42, 0.05);
  position: relative;
  overflow: hidden;
}
.category-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 5px;
  background: var(--accent);
  opacity: 0.85;
}
.category-card[data-slug="sports-fitness"]      { --c1: #d1fae5; --c2: #ecfdf5; --accent: #16a34a; }
.category-card[data-slug="games-cards"]         { --c1: #ede9fe; --c2: #f5f3ff; --accent: #7c3aed; }
.category-card[data-slug="arts-crafts"]         { --c1: #fce7f3; --c2: #fdf2f8; --accent: #db2777; }
.category-card[data-slug="civic"]               { --c1: #dbeafe; --c2: #eff6ff; --accent: #2563eb; }
.category-card[data-slug="learning-discussion"] { --c1: #fef3c7; --c2: #fffbeb; --accent: #d97706; }
.category-card[data-slug="social-cultural"]     { --c1: #ccfbf1; --c2: #f0fdfa; --accent: #0d9488; }
.category-card[data-slug="service-volunteer"]   { --c1: #ffedd5; --c2: #fff7ed; --accent: #ea580c; }
.category-card[data-slug="special-interests"]   { --c1: #e0e7ff; --c2: #eef2ff; --accent: #6366f1; }

.category-card .icon {
  width: 4.25rem;
  height: 4.25rem;
  font-size: 2.6rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.06);
  line-height: 1;
}
.category-card .row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.category-card .count {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(255, 255, 255, 0.7);
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  white-space: nowrap;
  border: 1px solid rgba(15, 23, 42, 0.06);
}
.category-card .count.zero { color: var(--gray); background: rgba(255, 255, 255, 0.55); }
.category-card .name { font-size: 1.3rem; font-weight: 700; letter-spacing: -0.01em; }
.category-card .blurb {
  color: #334155;
  font-size: 1rem;
  line-height: 1.45;
}

.card .name { font-size: 1.2rem; font-weight: 600; }
.card .blurb { color: var(--gray); font-size: 0.95rem; }
.card .meeting { font-size: 0.9rem; color: var(--gray); }
.card .thumbnail {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 8px;
  background: var(--gray-light);
}
.thumbnail-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: var(--gray);
  background: linear-gradient(135deg, #fef3c7, #fce7f3);
}

/* Recently-updated cards — warm cream tone + small badge to differentiate
   from category cards above. */
.featured-card {
  background: linear-gradient(180deg, #fffaf0 0%, #fff5e3 100%);
  border: 1px solid rgba(245, 158, 11, 0.22);
  position: relative;
}
.featured-card .featured-chip {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.92);
  color: #b45309;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  border: 1px solid rgba(245, 158, 11, 0.28);
  margin-top: 0.1rem;
}

.tags { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.tag {
  background: var(--gray-light);
  color: var(--dark);
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.8rem;
}

.club-detail {
  background: white;
  border-radius: var(--radius);
  padding: 0;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.club-banner {
  width: 100%;
  height: auto;
  display: block;
  background: var(--gray-light);
}

.club-body {
  padding: 1.75rem;
}
@media (min-width: 768px) {
  .club-body { padding: 2.25rem 2.5rem; }
}

.club-eyebrow {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--primary-color);
  margin-bottom: 0.4rem;
}
.club-eyebrow a { color: inherit; }

.club-detail h2 {
  font-size: 2rem;
  line-height: 1.2;
  margin: 0 0 0.5rem;
  letter-spacing: -0.01em;
}
@media (min-width: 768px) {
  .club-detail h2 { font-size: 2.4rem; }
}

.club-blurb {
  font-size: 1.15rem;
  color: var(--gray);
  margin: 0 0 1.5rem;
  line-height: 1.5;
}

.meeting-strip {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  background: var(--light);
  border-radius: var(--radius);
  border: 1px solid var(--gray-light);
  margin: 0 0 1.5rem;
  overflow: hidden;
}
@media (min-width: 560px) { .meeting-strip { grid-template-columns: 1fr 1fr; } }
@media (min-width: 880px) { .meeting-strip { grid-template-columns: repeat(4, 1fr); } }

.meeting-cell {
  padding: 0.9rem 1rem;
  border-top: 1px solid var(--gray-light);
}
@media (min-width: 560px) {
  .meeting-cell:nth-child(-n+2) { border-top: 0; }
  .meeting-cell:nth-child(odd) { border-right: 1px solid var(--gray-light); }
}
@media (min-width: 880px) {
  .meeting-cell { border-top: 0 !important; border-right: 1px solid var(--gray-light); }
  .meeting-cell:last-child { border-right: 0; }
}
.meeting-cell .label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gray);
  margin-bottom: 0.15rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.meeting-cell .value {
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--dark);
}

.club-description {
  font-size: 1.05rem;
  line-height: 1.7;
  margin: 0 0 1.5rem;
}

.vibe {
  background: #fffbea;
  border-left: 4px solid var(--accent-color);
  padding: 1rem 1.15rem;
  border-radius: 8px;
  margin: 0 0 1.5rem;
  font-style: italic;
  font-size: 1.05rem;
  color: #78350f;
}
.vibe::before {
  content: "❝ ";
  color: var(--accent-color);
  font-style: normal;
  font-weight: 700;
}

.club-footer {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--gray-light);
}
@media (min-width: 720px) {
  .club-footer {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}
.club-footer-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.4rem;
  align-items: center;
  color: var(--gray);
  font-size: 0.95rem;
}
.club-footer-meta strong { color: var(--dark); font-weight: 600; }
.club-footer-actions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.video-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin: 1.25rem 0;
}
@media (min-width: 768px) {
  .video-grid.has-multiple { grid-template-columns: repeat(2, 1fr); }
}
.video-grid iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  border-radius: 8px;
}

button, .btn {
  font-family: inherit;
  font-size: 1rem;
  padding: 0.85rem 1.5rem;
  border-radius: var(--radius);
  border: 0;
  cursor: pointer;
  font-weight: 600;
  min-height: 44px;
}
.btn-primary {
  background: var(--secondary-color);
  color: white;
}
.btn-primary:hover { filter: brightness(0.95); }
.btn-secondary {
  background: white;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.breadcrumb {
  margin-bottom: 1rem;
  font-size: 0.95rem;
  color: var(--gray);
}
.breadcrumb a { color: var(--gray); }

.back-button {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0 0 1.25rem;
  padding: 0.55rem 1.1rem;
  background: white;
  color: var(--primary-color);
  border: 1.5px solid var(--primary-color);
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  transition: background 0.15s, color 0.15s, transform 0.15s;
}
.back-button:hover {
  background: var(--primary-color);
  color: white;
  text-decoration: none;
  transform: translateX(-2px);
}

.empty, .loading, .error {
  text-align: center;
  padding: 2rem;
  color: var(--gray);
}
.error { color: var(--danger); }

form.leader-form { display: flex; flex-direction: column; gap: 1rem; }
form.leader-form label { display: flex; flex-direction: column; gap: 0.35rem; font-weight: 600; }
form.leader-form input, form.leader-form select, form.leader-form textarea {
  font-family: inherit;
  font-size: 1rem;
  padding: 0.65rem;
  border: 2px solid var(--gray-light);
  border-radius: 8px;
  background: white;
  font-weight: normal;
}
form.leader-form textarea { min-height: 6rem; resize: vertical; }
form.leader-form input:focus, form.leader-form select:focus, form.leader-form textarea:focus {
  outline: none;
  border-color: var(--primary-color);
}
.form-status { padding: 0.75rem; border-radius: 8px; }
.form-status.success { background: #ecfdf5; color: #065f46; }
.form-status.error { background: #fef2f2; color: var(--danger); }

footer.site-footer {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--gray);
  font-size: 0.9rem;
}
