/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

:root {
  --blue-600: #2563eb;
  --blue-700: #1d4ed8;
  --indigo-600: #4f46e5;
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-500: #64748b;
  --slate-400: #94a3b8;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --slate-50: #f8fafc;
  --white: #ffffff;
  --red-500: #ef4444;
  --green-500: #22c55e;
  --purple-500: #a855f7;

  --header-h: 76px;
  --radius-lg: 1rem;
  --radius-md: 0.75rem;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 12px -2px rgb(0 0 0 / 0.08), 0 2px 4px -2px rgb(0 0 0 / 0.06);
  --shadow-lg: 0 12px 30px -8px rgb(0 0 0 / 0.15);
}

body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--slate-50);
  color: var(--slate-700);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3 { margin: 0; color: var(--slate-900); }
button { font: inherit; cursor: pointer; }

.container {
  width: 100%;
  max-width: 1120px;
  margin-inline: auto;
  padding-inline: 1.5rem;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--blue-700);
  color: #fff;
  padding: 0.75rem 1.25rem;
  z-index: 100;
  border-radius: 0 0 0.5rem 0;
}
.skip-link:focus { left: 0; }

section[id] { scroll-margin-top: var(--header-h); }

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  inset-inline: 0;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--slate-200);
}
.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--slate-900);
}
.brand-logo { width: 2.75rem; height: 2.75rem; flex-shrink: 0; border-radius: 50%; }

.nav-desktop { display: none; align-items: center; gap: 1.75rem; }
.nav-desktop a {
  font-weight: 500;
  color: var(--slate-600);
  transition: color 0.2s ease;
  white-space: nowrap;
}
.nav-desktop a:hover { color: var(--blue-700); }
.nav-desktop a.active,
.nav-mobile a.active {
  color: var(--blue-700);
  font-weight: 700;
}
.nav-highlight {
  color: var(--blue-700) !important;
  background: rgb(37 99 235 / 0.08);
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
}
.nav-highlight.active { background: rgb(37 99 235 / 0.16); }

.menu-toggle {
  background: none;
  border: none;
  color: var(--slate-700);
  padding: 0.4rem;
}
.menu-toggle svg { width: 1.75rem; height: 1.75rem; }

.nav-mobile {
  display: flex;
  flex-direction: column;
  padding: 0.5rem 1.5rem 1rem;
  border-top: 1px solid var(--slate-200);
  background: var(--white);
}
.nav-mobile a {
  padding: 0.75rem 0.25rem;
  font-weight: 500;
  color: var(--slate-700);
  border-bottom: 1px solid var(--slate-100);
}
.nav-mobile[hidden] { display: none; }

@media (min-width: 860px) {
  .nav-desktop { display: flex; }
  .menu-toggle { display: none; }
  .nav-mobile { display: none !important; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.85rem 1.75rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 1rem;
  border: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--blue-600); color: #fff; box-shadow: var(--shadow-md); }
.btn-primary:hover { background: var(--blue-700); }
.btn-primary-inverse { background: #fff; color: var(--blue-700); box-shadow: var(--shadow-md); }
.btn-primary-inverse:hover { background: var(--slate-100); }
.btn-ghost-inverse { background: rgb(255 255 255 / 0.12); color: #fff; border: 1px solid rgb(255 255 255 / 0.45); }
.btn-ghost-inverse:hover { background: rgb(255 255 255 / 0.22); }
.btn-sm { padding: 0.55rem 1.1rem; font-size: 0.88rem; }
.btn-outline { background: transparent; color: var(--blue-700); border: 1.5px solid var(--blue-600); }
.btn-outline:hover { background: rgb(37 99 235 / 0.08); }
.btn-block { width: 100%; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: calc(var(--header-h) + 4rem) 0 4.5rem;
  background: #004b87;
  color: #fff;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 15% 20%, rgb(255 255 255 / 0.15), transparent 40%),
              radial-gradient(circle at 85% 80%, rgb(255 255 255 / 0.12), transparent 45%);
}
.hero-inner { position: relative; text-align: center; }
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  font-size: 0.85rem;
  opacity: 0.85;
  margin-bottom: 0.75rem;
}
.hero h1 {
  color: #fff;
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 1rem;
}
.hero-lede {
  font-size: 1.15rem;
  max-width: 40rem;
  margin: 0 auto 2rem;
  opacity: 0.95;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; }
.hero-stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2.5rem;
  margin: 3rem 0 0;
}
.hero-stats dt { font-size: 1.9rem; font-weight: 800; color: #fff; }
.hero-stats dd { margin: 0; opacity: 0.85; font-size: 0.9rem; }

/* ---------- Sections ---------- */
.section { padding: 4rem 0; }
.card-section { background: var(--white); }
.page-hero-section { padding-top: calc(var(--header-h) + 3rem); }
.section-title {
  font-size: clamp(1.7rem, 3vw, 2.2rem);
  font-weight: 800;
  text-align: center;
  margin-bottom: 0.75rem;
}
.section-title-left { text-align: left; }
.section-sub { text-align: center; color: var(--slate-500); margin: 0 auto 2.5rem; max-width: 34rem; }
.section-cta { text-align: center; margin-top: 2.5rem; }

/* About */
.about-grid { display: grid; gap: 2.5rem; align-items: center; margin-top: 2rem; }
.about-copy p { font-size: 1.05rem; margin-bottom: 1.25rem; }
.about-media img { border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); }
@media (min-width: 860px) {
  .about-grid { grid-template-columns: 1.1fr 1fr; }
}

/* Amenities */
.amenity-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-top: 1.5rem;
}
.amenity-card {
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}
.amenity-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.amenity-icon { font-size: 2rem; display: block; margin-bottom: 0.75rem; }
.amenity-card h3 { font-size: 1.1rem; margin-bottom: 0.5rem; }
.amenity-card p { font-size: 0.92rem; color: var(--slate-500); margin: 0; }
.amenity-featured {
  border-color: var(--blue-600);
  background: linear-gradient(160deg, rgb(37 99 235 / 0.06), var(--white) 60%);
}
.amenity-link { display: inline-block; margin-top: 0.75rem; color: var(--blue-700); font-weight: 600; font-size: 0.92rem; }

/* Pickleball */
.pickleball-section {
  background: var(--slate-900);
  color: var(--slate-200);
}
.pickleball-section .section-title,
.pickleball-copy h3 { color: #fff; }
.eyebrow-light { color: #93c5fd; }
.pickleball-grid { display: grid; gap: 2.5rem; align-items: center; }
.pickleball-copy p { font-size: 1.05rem; }
.pickleball-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1.25rem;
  margin: 1.75rem 0;
  padding: 1.5rem;
  background: rgb(255 255 255 / 0.06);
  border: 1px solid rgb(255 255 255 / 0.1);
  border-radius: var(--radius-md);
}
.pickleball-facts h3 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em; color: #93c5fd; margin-bottom: 0.35rem; }
.pickleball-facts p { margin: 0; font-size: 0.95rem; }
.pickleball-rules-title { margin: 1.5rem 0 0.75rem; font-size: 1.1rem; }
.pickleball-rules { display: flex; flex-direction: column; gap: 0.6rem; margin-bottom: 1.75rem; }
.pickleball-rules li {
  padding-left: 1.5rem;
  position: relative;
  font-size: 0.97rem;
}
.pickleball-rules li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #4ade80;
  font-weight: 700;
}
.pickleball-media img { border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); }
@media (min-width: 860px) {
  .pickleball-grid { grid-template-columns: 1.15fr 1fr; }
}

/* Card grid (announcements) */
.card-grid { display: grid; gap: 1.75rem; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); margin-top: 2rem; }
.post-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--slate-200);
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}
.post-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.post-card h3 { font-size: 1.15rem; margin-bottom: 0.4rem; }
.post-date { font-size: 0.85rem; color: var(--slate-500); margin: 0 0 0.75rem; }
.post-card p:not(.post-date) { margin: 0 0 1rem; }
.post-link { color: var(--blue-700); font-weight: 600; }
.post-link:hover { text-decoration: underline; }

/* Documents */
.doc-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--slate-50);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  transition: box-shadow 0.25s ease;
}
.doc-card:hover { box-shadow: var(--shadow-md); }
.doc-icon { width: 2.5rem; height: 2.5rem; flex-shrink: 0; }
.doc-icon svg { width: 100%; height: 100%; }
.doc-icon-red { color: var(--red-500); }
.doc-icon-green { color: var(--green-500); }
.doc-icon-purple { color: var(--purple-500); }
.doc-card h3 { font-size: 1rem; margin-bottom: 0.25rem; }
.doc-meta { color: var(--blue-700); font-size: 0.85rem; font-weight: 600; }

/* Contact */
.contact-grid { display: grid; gap: 2.5rem; margin-top: 2rem; }
.contact-info p { font-size: 1.05rem; margin-bottom: 1.5rem; }
.contact-list { display: flex; flex-direction: column; gap: 1rem; }
.contact-list li { display: flex; align-items: center; gap: 0.75rem; }
.contact-list svg { width: 1.4rem; height: 1.4rem; color: var(--blue-700); flex-shrink: 0; }
.contact-list a:hover { text-decoration: underline; }

.contact-form {
  background: var(--white);
  padding: 2rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--slate-200);
}
.form-field { margin-bottom: 1.25rem; }
.form-field label { display: block; font-size: 0.85rem; font-weight: 700; color: var(--slate-700); margin-bottom: 0.4rem; }
.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--slate-200);
  border-radius: 0.6rem;
  font: inherit;
  color: var(--slate-800);
  background: var(--white);
}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--blue-600);
  box-shadow: 0 0 0 3px rgb(37 99 235 / 0.25);
}
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form-note { margin: 0.85rem 0 0; font-size: 0.9rem; color: var(--green-500); font-weight: 600; min-height: 1.2em; }

/* Alerts & data tables (shared by public forms and the admin panel) */
.alert {
  padding: 0.85rem 1.1rem;
  border-radius: 0.6rem;
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
}
.alert-error { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.alert-success { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }

.admin-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.admin-table th, .admin-table td { text-align: left; padding: 0.75rem 0.6rem; border-bottom: 1px solid var(--slate-200); vertical-align: top; }
.admin-table th { color: var(--slate-500); font-weight: 600; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.03em; }
.admin-table tr:last-child td { border-bottom: none; }

@media (min-width: 860px) {
  .contact-grid { grid-template-columns: 1fr 1.1fr; }
}

/* ---------- Footer ---------- */
.site-footer { background: var(--slate-900); color: var(--slate-400); padding: 3.5rem 0 0; }
.footer-grid { display: grid; gap: 2.5rem; grid-template-columns: 1fr; text-align: center; }
.footer-grid h3 { color: #fff; font-size: 1.1rem; margin-bottom: 1rem; }
.footer-brand { display: flex; align-items: center; justify-content: center; gap: 0.65rem; margin-bottom: 1rem; }
.footer-brand img { border-radius: 50%; }
.footer-brand h3 { margin: 0; }
.footer-links { display: flex; flex-direction: column; gap: 0.6rem; }
.footer-links a:hover { color: #60a5fa; }
.footer-grid a:hover { color: #60a5fa; }
.social-links { display: flex; justify-content: center; gap: 1rem; margin-top: 1rem; }
.social-links svg { width: 1.4rem; height: 1.4rem; }
.footer-bottom {
  border-top: 1px solid var(--slate-700);
  margin-top: 2.5rem;
  padding: 1.5rem 0;
  text-align: center;
  font-size: 0.85rem;
}
@media (min-width: 860px) {
  .footer-grid { grid-template-columns: repeat(3, 1fr); text-align: left; }
  .social-links { justify-content: flex-start; }
  .footer-brand { justify-content: flex-start; }
}

/* ---------- Back to top ---------- */
.back-to-top {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  width: 3rem;
  height: 3rem;
  border-radius: 999px;
  background: var(--blue-600);
  color: #fff;
  border: none;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s ease, transform 0.2s ease, background 0.2s ease;
  z-index: 40;
}
.back-to-top:hover { background: var(--blue-700); transform: translateY(-2px); }
.back-to-top svg { width: 1.4rem; height: 1.4rem; }
.back-to-top[hidden] { display: none; }
