/* Doha Picklers Club — visual identity
   A soft nod to Qatar: pastel dusty maroon (echoing the flag, muted rather
   than bold) paired with warm desert sand and a muted champagne-gold accent.
   Headline face: Space Grotesk (confident, geometric — reads like
   scoreboard type). Body: Inter.
   Note: custom property names below (--court-teal, --ball, etc.) are kept
   from the original palette for stability — only their color values changed. */

:root {
  --court-teal: #8B4A56;
  --court-teal-dark: #4E2029;
  --ball: #C9A97E;
  --ball-dark: #B3925F;
  --sand: #F3EEDD;
  --sand-deep: #E9E1C8;
  --ink: #2E1620;
  --white: #FFFFFF;
  --line: rgba(243, 238, 221, 0.35);
  --radius: 10px;
  --max-width: 1120px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--sand);
  color: var(--ink);
  line-height: 1.55;
}

h1, h2, h3, h4, .headline {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-weight: 600;
  line-height: 1.1;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}

p { max-width: 62ch; }

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

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

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Nav ---------- */
.site-nav {
  background: var(--court-teal-dark);
  color: var(--sand);
}
.site-nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  padding-bottom: 14px;
}
.brand {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--white);
  display: flex;
  align-items: center;
  gap: 8px;
}
.brand .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--ball); display: inline-block; }
.brand-logo { height: 32px; width: auto; display: block; }
.admin-sidebar .brand-logo { height: 28px; }
.site-nav nav { display: flex; gap: 22px; align-items: center; }
.site-nav nav a { color: var(--sand); opacity: 0.88; font-size: 0.95rem; }
.site-nav nav a:hover { opacity: 1; text-decoration: none; color: var(--ball); }
.nav-cta {
  background: var(--ball);
  color: var(--court-teal-dark) !important;
  padding: 8px 16px;
  border-radius: 999px;
  font-weight: 600;
  opacity: 1 !important;
}
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--sand);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  padding: 4px 6px;
}

/* ---------- Hero with drawn court ---------- */
.hero {
  position: relative;
  background: linear-gradient(135deg, var(--court-teal) 0%, var(--court-teal-dark) 100%);
  color: var(--sand);
  overflow: hidden;
  padding: 72px 0 96px;
}
.hero .wrap { position: relative; z-index: 2; }
.hero-eyebrow {
  font-size: 0.95rem;
  color: var(--ball);
  font-weight: 600;
  margin-bottom: 14px;
}
.hero h1 {
  font-size: clamp(2.4rem, 5.2vw, 4rem);
  color: var(--white);
  max-width: 14ch;
}
.hero p.lead {
  font-size: 1.15rem;
  max-width: 46ch;
  color: var(--sand);
  opacity: 0.92;
}
.hero-actions { display: flex; gap: 14px; margin-top: 28px; flex-wrap: wrap; }

.btn {
  display: inline-block;
  padding: 13px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.98rem;
  border: 2px solid transparent;
  cursor: pointer;
  font-family: inherit;
}
.btn-primary { background: var(--ball); color: var(--court-teal-dark); }
.btn-primary:hover { background: var(--ball-dark); text-decoration: none; }
.btn-ghost { background: transparent; color: var(--white); border-color: rgba(243,238,221,0.55); }
.btn-ghost:hover { border-color: var(--white); text-decoration: none; }
.btn-dark { background: var(--court-teal-dark); color: var(--sand); }
.btn-dark:hover { background: var(--ink); text-decoration: none; }
.btn-small { padding: 8px 16px; font-size: 0.88rem; }
.btn-outline { background: transparent; border-color: var(--court-teal); color: var(--court-teal); }

.hero-stats {
  display: flex;
  gap: 40px;
  margin-top: 52px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  flex-wrap: wrap;
}
.hero-stat .num { font-family: 'Space Grotesk', sans-serif; font-size: 2.1rem; font-weight: 700; color: var(--ball); display:block; }
.hero-stat .label { font-size: 0.88rem; opacity: 0.85; }

/* ---------- Sections ---------- */
section { padding: 72px 0; }
.section-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--court-teal);
  margin-bottom: 8px;
}
.section-head { max-width: 60ch; margin-bottom: 40px; }
.section-head h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }

.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: start;
}
.about-figure {
  background: var(--court-teal);
  border-radius: var(--radius);
  aspect-ratio: 4/3;
  position: relative;
  overflow: hidden;
}
.about-figure img { width: 100%; height: 100%; object-fit: cover; }
.about-figure .placeholder-fill {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: var(--sand); opacity: 0.6; font-size: 0.9rem; text-align: center; padding: 20px;
}

.pill-list { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.pill {
  border: 1px solid var(--court-teal);
  color: var(--court-teal);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 0.86rem;
  font-weight: 500;
}

/* ---------- Gallery ---------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 160px;
  gap: 14px;
}
.gallery-grid figure {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--court-teal-dark);
  position: relative;
}
.gallery-grid figure img { width: 100%; height: 100%; object-fit: cover; }
.gallery-grid figure.wide { grid-column: span 2; }
.gallery-grid figure.tall { grid-row: span 2; }
.gallery-empty {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: var(--sand); opacity: 0.55; font-size: 0.82rem; text-align: center; padding: 10px;
}

/* ---------- Events ---------- */
.event-card {
  background: var(--white);
  border: 1px solid var(--sand-deep);
  border-radius: var(--radius);
  padding: 24px;
  display: grid;
  grid-template-columns: 90px 1fr auto;
  gap: 22px;
  align-items: center;
  margin-bottom: 16px;
}
.event-date-block {
  background: var(--sand);
  border-radius: 8px;
  text-align: center;
  padding: 10px 4px;
}
.event-date-block .day { font-family: 'Space Grotesk', sans-serif; font-size: 1.6rem; font-weight: 700; display: block; color: var(--court-teal-dark); }
.event-date-block .mon { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--court-teal); }
.event-type-badge {
  display: inline-block;
  font-size: 0.76rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--ball);
  color: var(--court-teal-dark);
  margin-bottom: 6px;
}
.event-meta { font-size: 0.88rem; color: #4b5a53; margin-top: 4px; }
.event-actions { text-align: right; }
.spots { font-size: 0.82rem; color: #4b5a53; margin-top: 6px; }

/* ---------- Forms ---------- */
.form-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 40px;
  max-width: 520px;
  margin: 0 auto;
  border: 1px solid var(--sand-deep);
  box-shadow: 0 12px 32px rgba(46, 22, 32, 0.18);
}
.field { margin-bottom: 20px; }
.field label { display: block; font-weight: 600; font-size: 0.9rem; margin-bottom: 6px; }
.field .hint { font-size: 0.82rem; color: #5b6a63; margin-top: 4px; }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=number], input[type=date], input[type=time], select, textarea {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid #cfd6cf;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.95rem;
  background: var(--white);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
textarea { resize: vertical; min-height: 90px; }
input[type=text]:focus, input[type=email]:focus, input[type=password]:focus, input[type=tel]:focus, input[type=number]:focus, input[type=date]:focus, input[type=time]:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--court-teal);
  box-shadow: 0 0 0 3px rgba(139, 74, 86, 0.15);
}

.skill-options { display: grid; gap: 10px; }
.skill-option {
  border: 1px solid #cfd6cf;
  border-radius: 8px;
  padding: 12px 14px;
  cursor: pointer;
  display: flex;
  gap: 10px;
}
.skill-option input { margin-top: 3px; }
.skill-option strong { display: block; font-size: 0.94rem; }
.skill-option span.desc { font-size: 0.84rem; color: #5b6a63; }
.skill-option:has(input:checked) { border-color: var(--court-teal); background: #F8EFEE; }

.alert { padding: 12px 16px; border-radius: 8px; font-size: 0.9rem; margin-bottom: 20px; }
.alert-error { background: #FBEAEA; color: #8a2c22; border: 1px solid #f0c4bf; }
.alert-success { background: #EAF6E9; color: #2b5c2a; border: 1px solid #c8e6c5; }

/* ---------- Footer ---------- */
footer {
  background: var(--court-teal-dark);
  color: var(--sand);
  padding: 44px 0;
  font-size: 0.9rem;
}
footer .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 20px; }
footer a { color: var(--ball); }
footer .footer-bottom {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 0.8rem;
  opacity: 0.75;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 24px;
}
footer .footer-bottom p { max-width: none; }

/* ---------- Admin ---------- */
.admin-shell { display: grid; grid-template-columns: 220px 1fr; min-height: 100vh; }
.admin-sidebar { background: var(--court-teal-dark); color: var(--sand); padding: 28px 20px; }
.admin-sidebar .brand { margin-bottom: 32px; }
.admin-sidebar a { display: block; color: var(--sand); opacity: 0.85; padding: 9px 10px; border-radius: 6px; font-size: 0.92rem; margin-bottom: 2px; }
.admin-sidebar a:hover, .admin-sidebar a.active { background: rgba(201,169,126,0.18); opacity: 1; color: var(--ball); text-decoration: none; }
.admin-main { padding: 36px 40px; background: var(--sand); }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 36px; }
.stat-card { background: var(--white); border-radius: var(--radius); padding: 20px; border: 1px solid var(--sand-deep); }
.stat-card .num { font-family: 'Space Grotesk', sans-serif; font-size: 2rem; font-weight: 700; color: var(--court-teal-dark); }
.stat-card .label { font-size: 0.85rem; color: #5b6a63; }

table.data-table { width: 100%; border-collapse: collapse; background: var(--white); border-radius: var(--radius); overflow: hidden; }
table.data-table th, table.data-table td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--sand-deep); font-size: 0.9rem; }
table.data-table th { background: var(--sand); font-family: 'Space Grotesk', sans-serif; font-weight: 600; }

.card-block { background: var(--white); border: 1px solid var(--sand-deep); border-radius: var(--radius); padding: 26px; margin-bottom: 24px; }

.court-result {
  border: 2px dashed var(--court-teal);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 14px;
  background: #F8EFEE;
}
.court-result .court-label { font-family: 'Space Grotesk', sans-serif; font-weight: 700; color: var(--court-teal-dark); margin-bottom: 8px; }
.vs { color: var(--ball-dark); font-weight: 700; margin: 0 8px; }

.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius);
}
.table-scroll table.data-table { min-width: 560px; }

@media (max-width: 780px) {
  .nav-toggle { display: block; }
  .site-nav .wrap { flex-wrap: wrap; }
  .site-nav nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    padding: 10px 0 16px;
  }
  .site-nav nav.nav-open { display: flex; }
  .site-nav nav a { width: 100%; padding: 10px 4px; }
  .site-nav nav .nav-cta { width: auto; margin-top: 6px; }
}

@media (max-width: 860px) {
  .about-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .event-card { grid-template-columns: 1fr; text-align: left; }
  .event-actions { text-align: left; }
  .admin-shell { grid-template-columns: 1fr; }
  .admin-sidebar { display: flex; overflow-x: auto; gap: 6px; padding: 14px; }
  .admin-sidebar .brand { display: none; }
  .admin-main { padding: 24px 18px; }
  .form-card { padding: 24px 20px; }
  section { padding: 48px 0; }
  .wrap { padding: 0 16px; }
  .hero { padding: 48px 0 64px; }
  .hero-stats { gap: 24px; }
  .card-block { padding: 18px; }
}
