/* ============================================================
   Double Eagles Golf League — Main Stylesheet
   Aesthetic: Refined luxury golf club — hunter green, ivory, gold
   Fonts: Cormorant Garamond (display) + DM Sans (body)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400;1,600&family=DM+Sans:ital,wght@0,300;0,400;0,500;0,700;1,400&display=swap');

/* ── Custom Properties ─────────────────────────────────────── */
:root {
  --green-deep:    #1B4332;
  --green-mid:     #2D6A4F;
  --green-light:   #52B788;
  --green-pale:    #D8F3DC;
  --gold:          #C9A84C;
  --gold-light:    #E8C97A;
  --gold-dark:     #9B7A28;
  --ivory:         #F8F4EC;
  --cream:         #EDE8DC;
  --charcoal:      #1C1C1C;
  --text-muted:    #5A5A4A;
  --white:         #FFFFFF;
  --border:        #D5CDB8;
  --shadow-sm:     0 2px 8px rgba(27,67,50,0.10);
  --shadow-md:     0 6px 24px rgba(27,67,50,0.14);
  --shadow-lg:     0 16px 48px rgba(27,67,50,0.18);
  --radius:        4px;
  --radius-lg:     10px;
  --transition:    0.25s ease;
}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: 'DM Sans', sans-serif;
  font-weight: 400;
  color: var(--charcoal);
  background-color: var(--ivory);
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--green-mid); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--gold-dark); }
ul { list-style: none; }

/* ── Typography ────────────────────────────────────────────── */
h1,h2,h3,h4,h5,h6 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 600;
  line-height: 1.2;
  color: var(--green-deep);
}
h1 { font-size: clamp(2.4rem, 5vw, 4rem); }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.8rem); }
h3 { font-size: clamp(1.3rem, 2.5vw, 1.9rem); }
h4 { font-size: 1.25rem; }
p { margin-bottom: 1em; }

.display-serif {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 300;
  letter-spacing: 0.02em;
}
.label-caps {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-dark);
}

/* ── Layout ────────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 1.5rem;
}
.container-narrow {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 1.5rem;
}
main { flex: 1; }

/* ── Navigation ────────────────────────────────────────────── */
.site-nav {
  background: var(--green-deep);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 16px rgba(0,0,0,0.25);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: 1rem;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}
.nav-brand-icon {
  width: 42px;
  height: 42px;
  background: var(--gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--green-deep);
  flex-shrink: 0;
}
.nav-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.nav-brand-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--ivory);
  letter-spacing: 0.01em;
}
.nav-brand-sub {
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-light);
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.nav-links a {
  color: rgba(248,244,236,0.85);
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius);
  transition: all var(--transition);
}
.nav-links a:hover,
.nav-links a.active {
  background: rgba(255,255,255,0.12);
  color: var(--ivory);
}
.nav-links a.btn-gold {
  background: var(--gold);
  color: var(--green-deep);
  font-weight: 700;
  padding: 0.45rem 1rem;
}
.nav-links a.btn-gold:hover { background: var(--gold-light); }
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  flex-direction: column;
  gap: 5px;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--ivory);
  border-radius: 2px;
  transition: all var(--transition);
}

/* ── Hero ──────────────────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, var(--green-deep) 0%, var(--green-mid) 60%, #3a7a5c 100%);
  color: var(--ivory);
  padding: 5rem 0 4rem;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}

/* Two-column hero layout */
.hero-inner {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 3rem;
}
.hero-content {
  flex: 1;
  min-width: 0;
}
.hero-logo-wrap {
  flex: 0 0 45%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-logo {
  width: 100%;
  max-width: 480px;
  height: auto;
  display: block;
}
.hero-eyebrow {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-light);
  margin-bottom: 0.75rem;
}
.hero h1 {
  color: var(--ivory);
  margin-bottom: 1rem;
  text-shadow: 0 2px 12px rgba(0,0,0,0.25);
}
.hero p {
  font-size: 1.15rem;
  color: rgba(248,244,236,0.85);
  margin-bottom: 2rem;
}
.hero-divider {
  width: 60px;
  height: 3px;
  background: var(--gold);
  margin: 1.25rem 0;
  border-radius: 2px;
}
.hero-stats {
  display: flex;
  gap: 2.5rem;
  flex-wrap: wrap;
  margin-top: 2.5rem;
}
.hero-stat { text-align: center; }
.hero-stat-num {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2.6rem;
  font-weight: 700;
  color: var(--gold-light);
  line-height: 1;
}
.hero-stat-label {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(248,244,236,0.65);
  margin-top: 0.25rem;
}

/* ── Buttons ───────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.6rem;
  border-radius: var(--radius);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: all var(--transition);
  border: none;
  text-decoration: none;
}
.btn-primary { background: var(--gold); color: var(--green-deep); }
.btn-primary:hover { background: var(--gold-light); color: var(--green-deep); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-outline { background: transparent; border: 2px solid var(--ivory); color: var(--ivory); }
.btn-outline:hover { background: rgba(255,255,255,0.1); color: var(--ivory); }
.btn-green { background: var(--green-deep); color: var(--ivory); }
.btn-green:hover { background: var(--green-mid); color: var(--ivory); transform: translateY(-1px); }
.btn-sm { padding: 0.45rem 1rem; font-size: 0.8rem; }
.btn-danger { background: #c0392b; color: #fff; }
.btn-danger:hover { background: #e74c3c; color: #fff; }

/* ── Cards ─────────────────────────────────────────────────── */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform var(--transition);
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.card-body { padding: 1.75rem; }
.card-img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }

/* ── Section ───────────────────────────────────────────────── */
.section { padding: 4rem 0; }
.section-lg { padding: 6rem 0; }
.section-sm { padding: 2.5rem 0; }
.section-dark { background: var(--green-deep); color: var(--ivory); }
.section-dark h2, .section-dark h3 { color: var(--ivory); }
.section-cream { background: var(--cream); }
.section-header { text-align: center; margin-bottom: 3rem; }
.section-header .label-caps { margin-bottom: 0.75rem; display: block; }

.ornament {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1rem 0 1.5rem;
}
.ornament::before, .ornament::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--gold);
  opacity: 0.5;
}

/* ── Grid ──────────────────────────────────────────────────── */
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 1.5rem; }
.grid-2 { display: grid; grid-template-columns: repeat(2,1fr); gap: 1.5rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4,1fr); gap: 1.25rem; }

/* ── News Card ─────────────────────────────────────────────── */
.news-card-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.6rem;
}
.news-card-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--green-deep);
  margin-bottom: 0.6rem;
  line-height: 1.3;
}
.news-card-excerpt { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 1rem; }

/* ── Schedule Table ────────────────────────────────────────── */
.schedule-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.schedule-table th {
  background: var(--green-deep);
  color: var(--ivory);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.85rem 1.25rem;
  text-align: left;
}
.schedule-table td { padding: 1rem 1.25rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
.schedule-table tr:last-child td { border-bottom: none; }
.schedule-table tr:hover td { background: var(--ivory); }
.schedule-table .event-name { font-weight: 600; color: var(--green-deep); }
.schedule-table .event-date { color: var(--text-muted); white-space: nowrap; }
.format-badge {
  display: inline-block;
  padding: 0.2rem 0.65rem;
  border-radius: 99px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.format-stroke     { background: #e8f4fd; color: #1a6fa0; }
.format-scramble   { background: #fef3cd; color: #856404; }
.format-match      { background: #d1e7dd; color: #0f5132; }
.format-stableford { background: #f8d7da; color: #842029; }
.format-best_ball  { background: #e2d9f3; color: #432874; }

/* ── Leaderboard Table ─────────────────────────────────────── */
.standings-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.standings-table th {
  background: var(--green-deep);
  color: var(--ivory);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.85rem 1rem;
  text-align: left;
}
.standings-table th:not(:first-child) { text-align: center; }
.standings-table td { padding: 0.85rem 1rem; border-bottom: 1px solid var(--border); }
.standings-table td:not(:first-child) { text-align: center; }
.standings-table tr:hover td { background: var(--green-pale); }
.standings-table .rank { font-family: 'Cormorant Garamond', serif; font-size: 1.4rem; font-weight: 700; color: var(--gold-dark); }
.standings-table .player-name { font-weight: 600; color: var(--green-deep); }
.standings-table .handicap-badge {
  display: inline-block;
  background: var(--green-deep);
  color: var(--ivory);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.15rem 0.55rem;
  border-radius: 4px;
}

/* ── Forms ─────────────────────────────────────────────────── */
.form-group { margin-bottom: 1.25rem; }
.form-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}
.form-control {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  color: var(--charcoal);
  background: var(--white);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form-control:focus {
  outline: none;
  border-color: var(--green-mid);
  box-shadow: 0 0 0 3px rgba(45,106,79,0.15);
}
.form-control::placeholder { color: #aaa; }
select.form-control { cursor: pointer; }
textarea.form-control { resize: vertical; min-height: 110px; }
.form-hint { font-size: 0.78rem; color: var(--text-muted); margin-top: 0.35rem; }

/* ── Alerts ────────────────────────────────────────────────── */
.alert {
  padding: 0.9rem 1.25rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
  border-left: 4px solid;
}
.alert-success { background: #d1fae5; border-color: #10b981; color: #065f46; }
.alert-danger   { background: #fee2e2; border-color: #ef4444; color: #7f1d1d; }
.alert-warning  { background: #fef3c7; border-color: #f59e0b; color: #78350f; }
.alert-info     { background: var(--green-pale); border-color: var(--green-mid); color: var(--green-deep); }

/* ── Auth Pages ────────────────────────────────────────────── */
.auth-wrap {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.5rem;
}
.auth-box {
  width: 100%;
  max-width: 480px;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.auth-header {
  background: var(--green-deep);
  padding: 2.25rem 2rem;
  text-align: center;
}
.auth-header h2 { color: var(--ivory); margin-bottom: 0.25rem; }
.auth-header p { color: rgba(248,244,236,0.7); font-size: 0.9rem; margin: 0; }
.auth-body { padding: 2rem; }

/* ── Admin ─────────────────────────────────────────────────── */
.admin-layout { display: flex; min-height: calc(100vh - 68px); }
.admin-sidebar {
  width: 240px;
  flex-shrink: 0;
  background: var(--green-deep);
  padding: 1.5rem 0;
}
.admin-sidebar-title {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(248,244,236,0.4);
  padding: 0 1.25rem 0.75rem;
  margin-top: 1.25rem;
}
.admin-sidebar a {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 1.25rem;
  color: rgba(248,244,236,0.8);
  font-size: 0.88rem;
  font-weight: 500;
  transition: all var(--transition);
  border-left: 3px solid transparent;
}
.admin-sidebar a:hover,
.admin-sidebar a.active {
  background: rgba(255,255,255,0.08);
  color: var(--ivory);
  border-left-color: var(--gold);
}
.admin-sidebar a svg { width: 16px; height: 16px; opacity: 0.7; }
.admin-main { flex: 1; padding: 2rem 2.5rem; overflow-x: auto; }
.admin-page-title { font-family: 'Cormorant Garamond', serif; font-size: 2rem; color: var(--green-deep); margin-bottom: 0.25rem; }
.admin-page-sub { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 2rem; }
.admin-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
}
.admin-stat-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 1rem; margin-bottom: 2rem; }
.admin-stat {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow-sm);
}
.admin-stat-label { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); }
.admin-stat-value { font-family: 'Cormorant Garamond', serif; font-size: 2.4rem; font-weight: 700; color: var(--green-deep); line-height: 1.1; margin: 0.15rem 0; }
.admin-stat-sub { font-size: 0.78rem; color: var(--gold-dark); }

/* ── Upload Zone ───────────────────────────────────────────── */
.upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  background: var(--ivory);
}
.upload-zone:hover, .upload-zone.dragover { border-color: var(--green-mid); background: var(--green-pale); }
.upload-zone p { color: var(--text-muted); font-size: 0.9rem; margin: 0.5rem 0 0; }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px,1fr)); gap: 1rem; margin-top: 1.5rem; }
.media-item { position: relative; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); }
.media-item img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.media-item-overlay {
  position: absolute;
  inset: 0;
  background: rgba(27,67,50,0.7);
  opacity: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: opacity var(--transition);
}
.media-item:hover .media-item-overlay { opacity: 1; }

/* ── Footer logo ────────────────────────────────────────────── */
.footer-logo-img {
  width: 160px;
  height: auto;
  display: block;
  margin-bottom: 1.25rem;
  mix-blend-mode: lighten;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.4));
}

/* ── Footer ────────────────────────────────────────────────── */
.site-footer {
  background: var(--green-deep);
  color: rgba(248,244,236,0.7);
  padding: 3.5rem 0 1.5rem;
  margin-top: auto;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}
.footer-brand h3 { color: var(--ivory); font-size: 1.4rem; margin-bottom: 0.6rem; }
.footer-brand p { font-size: 0.875rem; line-height: 1.65; }
.footer-col h4 {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-light);
  margin-bottom: 1rem;
}
.footer-col a {
  display: block;
  color: rgba(248,244,236,0.65);
  font-size: 0.875rem;
  padding: 0.2rem 0;
  transition: color var(--transition);
}
.footer-col a:hover { color: var(--ivory); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.footer-gold-bar {
  width: 40px;
  height: 3px;
  background: var(--gold);
  margin-bottom: 1.25rem;
  border-radius: 2px;
}

/* ── Utilities ─────────────────────────────────────────────── */
.text-center { text-align: center; }
.text-muted  { color: var(--text-muted); }
.text-gold   { color: var(--gold-dark); }
.text-green  { color: var(--green-deep); }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.w-100 { width: 100%; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2,1fr); }
  .admin-stat-grid { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 768px) {
  .nav-links { display: none; flex-direction: column; position: absolute; top: 68px; left: 0; right: 0; background: var(--green-deep); padding: 1rem; gap: 0.25rem; box-shadow: 0 8px 24px rgba(0,0,0,0.3); }
  .nav-links.open { display: flex; }
  .nav-toggle { display: flex; }
  .grid-3, .grid-2, .grid-4 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .admin-layout { flex-direction: column; }
  .admin-sidebar { width: 100%; }
  .admin-main { padding: 1.5rem; }
  .hero-stats { gap: 1.5rem; }
  .hero-inner { flex-direction: column-reverse; gap: 2rem; }
  .hero-logo-wrap { flex: 0 0 auto; width: 100%; }
  .hero-logo { max-width: 260px; margin: 0 auto; }
}
@media (max-width: 480px) {
  .admin-stat-grid { grid-template-columns: 1fr; }
  .schedule-table { font-size: 0.8rem; }
  .schedule-table th, .schedule-table td { padding: 0.65rem 0.75rem; }
}