/* Golfers Society – design system */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700&family=DM+Sans:ital,wght@0,400;0,500;0,600;1,400&display=swap');

:root {
  --bg: #f0f9f7;
  --bg-alt: #e8f5f1;
  --fg: #0c2e2a;
  --fg-soft: #1a4d45;
  --muted: #5a7a73;
  --primary: #0d9488;
  --primary-dark: #0f766e;
  --primary-light: #14b8a6;
  --accent: #059669;
  --border: #c5e0da;
  --card: #ffffff;
  --shadow: 0 1px 3px rgba(15, 118, 110, 0.08);
  --shadow-lg: 0 10px 40px rgba(15, 118, 110, 0.12);
  --radius: 12px;
  --radius-sm: 8px;
  --touch: 44px;
  --font-head: 'Outfit', system-ui, sans-serif;
  --font-body: 'DM Sans', system-ui, sans-serif;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--fg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 600; }
a { color: var(--primary-dark); text-decoration: none; }
a:hover { color: var(--primary); text-decoration: underline; }
img { max-width: 100%; height: auto; }

.btn, button, .nav a { min-height: var(--touch); min-width: var(--touch); display: inline-flex; align-items: center; justify-content: center; padding: 0 1.25rem; font-family: var(--font-body); font-weight: 500; }
input, textarea, select { font-family: var(--font-body); font-size: 16px; padding: 0.6rem 0.75rem; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--card); }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.15); }

.btn { border: none; border-radius: var(--radius-sm); font-weight: 600; cursor: pointer; transition: transform 0.15s, box-shadow 0.15s; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: linear-gradient(180deg, var(--primary) 0%, var(--primary-dark) 100%); color: #fff; box-shadow: var(--shadow); }
.btn-primary:hover { box-shadow: var(--shadow-lg); }
.btn-secondary { background: var(--card); color: var(--fg-soft); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--bg-alt); border-color: var(--primary); }
.btn-danger { background: #dc2626; color: #fff; }

.container { max-width: 960px; margin: 0 auto; padding: 1.5rem 1rem; }

/* Site header */
.site-header {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  padding: 0.875rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  box-shadow: var(--shadow);
}
.site-header h1 { margin: 0; font-size: 1.35rem; font-weight: 700; }
.site-header h1 a { color: var(--fg); }
.site-header h1 a:hover { color: var(--primary-dark); text-decoration: none; }
.site-header nav { display: flex; gap: 0.25rem; flex-wrap: wrap; }
.site-header nav a { border-radius: var(--radius-sm); padding: 0.5rem 0.75rem; }
.site-header nav a:hover { background: var(--bg); text-decoration: none; }

/* Hero */
.hero {
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3rem 1.5rem;
  background: linear-gradient(180deg, rgba(0,0,0,0.45) 0%, rgba(0,0,0,0.35) 100%),
    url('/assets/hero_bg.webp') center / cover no-repeat;
  border-bottom: 1px solid var(--border);
}
.hero h1 { font-size: clamp(2rem, 5vw, 3rem); margin: 0 0 0.75rem; color: #fff; letter-spacing: -0.02em; line-height: 1.2; text-shadow: 0 1px 2px rgba(0,0,0,0.4); }
.hero .tagline { font-size: 1.15rem; color: rgba(255,255,255,0.9); max-width: 480px; margin: 0 0 2rem; text-shadow: 0 1px 2px rgba(0,0,0,0.3); }
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; justify-content: center; margin-bottom: 2rem; }
.hero-sub { font-size: 0.9rem; color: rgba(255,255,255,0.85); }
.hero-sub a { margin: 0 0.5rem; color: rgba(255,255,255,0.95); }
.hero--short { min-height: 42vh; padding: 2.5rem 1.5rem; }
.hero--about { background: linear-gradient(180deg, rgba(0,0,0,0.45) 0%, rgba(0,0,0,0.35) 100%), url('/assets/about_bg.png') center / cover no-repeat; }
.hero--blog { background: linear-gradient(180deg, rgba(0,0,0,0.45) 0%, rgba(0,0,0,0.35) 100%), url('/assets/hero_bg.webp') center / cover no-repeat; }
.hero--full { min-height: 90vh; justify-content: flex-start; padding-top: 2rem; padding-bottom: 3rem; }
.hero-about-content {
  max-width: 640px;
  width: 100%;
  margin: 1.5rem auto 0;
  padding: 1.75rem 2rem;
  background: rgba(0,0,0,0.55);
  border-radius: var(--radius);
  text-align: left;
  color: rgba(255,255,255,0.95);
  box-shadow: var(--shadow-lg);
}
.hero-about-content h2 { color: #fff; font-size: 1.2rem; margin: 1.5rem 0 0.5rem; }
.hero-about-content h2:first-of-type { margin-top: 0; }
.hero-about-content p, .hero-about-content li { color: rgba(255,255,255,0.9); }
.hero-about-content a { color: rgba(255,255,255,0.98); }
.hero-about-content .btn-primary { background: var(--primary); color: #fff; }

.hero-blog-content {
  max-width: 640px;
  width: 100%;
  margin: 1.5rem auto 0;
  padding: 1.75rem 2rem;
  background: rgba(0,0,0,0.55);
  border-radius: var(--radius);
  text-align: left;
  color: rgba(255,255,255,0.95);
  box-shadow: var(--shadow-lg);
}
.hero-blog-content h2 { color: #fff; }
.hero-blog-content a { color: rgba(255,255,255,0.98); }
.hero-blog-content .post-list { list-style: none; padding: 0; margin: 0; }
.hero-blog-content .post-list li { padding: 1.25rem 0; border-bottom: 1px solid rgba(255,255,255,0.2); }
.hero-blog-content .post-list li:first-child { padding-top: 0; }
.hero-blog-content .post-list a { font-size: 1.1rem; font-weight: 500; }
.hero-blog-content .post-meta { font-size: 0.875rem; color: rgba(255,255,255,0.75); margin-top: 0.35rem; }
.hero-blog-content .post-excerpt { margin-top: 0.5rem; color: rgba(255,255,255,0.85); line-height: 1.5; }
.hero-blog-content .empty-state { text-align: center; padding: 2rem 0; color: rgba(255,255,255,0.9); }
.hero-blog-content .empty-state p { margin-bottom: 1rem; }
.hero-blog-content .btn-secondary { background: rgba(255,255,255,0.2); color: #fff; border-color: rgba(255,255,255,0.4); }

/* Features / cards grid */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.5rem; padding: 3rem 1rem; max-width: 960px; margin: 0 auto; }
.feature-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 1.75rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transition: box-shadow 0.2s, transform 0.2s;
}
.feature-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.feature-card h3 { margin: 0 0 0.5rem; font-size: 1.1rem; color: var(--fg-soft); }
.feature-card p { margin: 0; font-size: 0.95rem; color: var(--muted); line-height: 1.5; }
.feature-card a { font-weight: 500; margin-top: 0.75rem; display: inline-block; }

/* Footer */
.site-footer {
  background: var(--fg);
  color: rgba(255,255,255,0.85);
  padding: 2.5rem 1.5rem;
  margin-top: 3rem;
  text-align: center;
}
.site-footer a { color: rgba(255,255,255,0.9); }
.site-footer a:hover { color: #fff; text-decoration: none; }
.site-footer .footer-brand { font-family: var(--font-head); font-weight: 600; font-size: 1.1rem; margin-bottom: 0.5rem; }
.site-footer .footer-tagline { font-size: 0.9rem; opacity: 0.8; margin-bottom: 1.5rem; }
.site-footer .footer-links { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; margin-bottom: 1rem; }
.site-footer .footer-copy { font-size: 0.8rem; opacity: 0.7; }

/* Landing */
.page-landing .landing-main { min-height: 80vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 2rem 1rem; text-align: center; }
.page-landing h1 { font-size: clamp(1.75rem, 4vw, 2.25rem); margin-bottom: 0.5rem; }
.page-landing .landing-main .tagline { color: var(--muted); margin-bottom: 1.5rem; font-size: 1.05rem; }
.landing-actions { display: flex; gap: 1rem; flex-wrap: wrap; justify-content: center; }

/* Dashboard – premium UI */
.page-dashboard { background: #F4FBF9; min-height: calc(100vh - 1px); }
.dashboard-main { max-width: 1024px; margin: 0 auto; padding: 1.5rem 1rem; padding-left: clamp(1rem, 4vw, 1.5rem); padding-right: clamp(1rem, 4vw, 1.5rem); }

.dashboard-hero {
  position: relative;
  overflow: hidden;
  border-radius: 1.25rem;
  border: 1px solid rgba(0,0,0,0.05);
  background: linear-gradient(180deg, rgba(167, 243, 208, 0.4) 0%, #fff 100%);
  padding: 1.5rem 1.5rem;
  margin-bottom: 2rem;
}
@media (min-width: 640px) { .dashboard-hero { padding: 2rem 2rem; } }
.dashboard-hero-inner { position: relative; z-index: 1; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.25rem; }
.dashboard-hero-text { flex: 1 1 240px; }
.dashboard-hero-title { margin: 0 0 0.25rem; font-size: 1.25rem; font-weight: 700; color: #0F2A26; }
.dashboard-hero-greeting { margin: 0; font-size: 1.1rem; font-weight: 600; color: #0F2A26; }
.dashboard-hero-context { margin: 0.25rem 0 0; font-size: 0.95rem; color: rgba(15, 42, 38, 0.68); }
.dashboard-hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.dashboard-hero-actions .btn { text-decoration: none; }
.dashboard-hero-actions .btn-primary { background: #0E3B34; color: #fff; }
.dashboard-hero-actions .btn-primary:hover { background: #0c332c; }
.dashboard-hero-actions .btn-secondary { border: 1px solid rgba(0,0,0,0.1); color: #0F2A26; }
.dashboard-hero-actions .btn-secondary:hover { background: rgba(46, 125, 107, 0.08); border-color: rgba(46, 125, 107, 0.3); }
.dashboard-hero-contour { position: absolute; inset: 0; z-index: 0; pointer-events: none; display: flex; align-items: center; justify-content: center; color: #0F2A26; }
.dashboard-hero-contour svg { width: 100%; height: 100%; object-fit: cover; }

.dashboard-content-grid { display: grid; gap: 2rem; margin-bottom: 2rem; }
@media (min-width: 640px) { .dashboard-content-grid { grid-template-columns: 1fr 280px; } }
.dashboard-section-heading {
  font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: rgba(15, 42, 38, 0.7);
  margin: 0 0 1rem;
}
.dashboard-actions .action-cards { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.dashboard-account .action-cards { display: flex; flex-direction: column; gap: 1rem; }

.action-card {
  display: block;
  background: #fff;
  border: 1px solid rgba(16, 24, 40, 0.08);
  border-radius: 1rem;
  padding: 1.25rem 1.25rem;
  box-shadow: 0 1px 3px rgba(15, 118, 110, 0.08);
  transition: transform 0.2s ease-out, box-shadow 0.2s ease-out, border-color 0.2s;
  text-decoration: none;
  color: inherit;
}
.action-card:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(15, 118, 110, 0.12); border-color: rgba(14, 59, 52, 0.15); text-decoration: none; }
.action-card:focus-visible { outline: none; box-shadow: 0 0 0 2px #fff, 0 0 0 4px rgba(14, 59, 52, 0.3); }
.action-card[data-variant="primary"] { border-color: rgba(14, 59, 52, 0.2); }
.action-card[data-variant="primary"]:hover { border-color: rgba(14, 59, 52, 0.35); }
.action-card-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.5rem; height: 2.5rem;
  border-radius: 0.75rem;
  background: rgba(167, 243, 208, 0.4);
  color: #0F2A26;
  margin-bottom: 0.75rem;
}
.action-card[data-variant="primary"] .action-card-icon { background: rgba(14, 59, 52, 0.12); color: #0E3B34; }
.action-card-title { display: block; font-weight: 600; font-size: 1rem; color: #0F2A26; margin-bottom: 0.25rem; }
.action-card-desc { display: block; font-size: 0.875rem; color: rgba(15, 42, 38, 0.6); line-height: 1.4; }

.dashboard-stats { margin-top: 0.5rem; }
.dashboard-stats .dashboard-section-heading { margin-bottom: 1rem; }
.stat-chips {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 480px) { .stat-chips { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 900px) { .stat-chips { grid-template-columns: repeat(6, 1fr); } }
.stat-chip {
  background: #fff;
  border: 1px solid rgba(16, 24, 40, 0.08);
  border-radius: 0.75rem;
  padding: 0.875rem 1rem;
  box-shadow: 0 1px 2px rgba(15, 118, 110, 0.06);
  transition: box-shadow 0.2s, transform 0.2s;
}
.stat-chip:hover { box-shadow: 0 2px 8px rgba(15, 118, 110, 0.08); }
.stat-chip-label { display: block; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.04em; color: rgba(15, 42, 38, 0.6); margin-bottom: 0.25rem; }
.stat-chip-value { font-size: 1.1rem; font-weight: 700; color: #0F2A26; }

/* CMS content */
.cms-page, .cms-post { padding: 2rem 1rem; max-width: 720px; margin: 0 auto; }
.cms-page h1, .cms-post h1 { font-size: 1.75rem; margin-top: 0; color: var(--fg); }
.cms-body { margin-top: 1.5rem; }
.cms-body p { margin: 0 0 1rem; }
.cms-body img { border-radius: var(--radius); box-shadow: var(--shadow); }

/* Auth */
.auth-box {
  max-width: 400px;
  margin: 2rem auto;
  padding: 2rem;
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
}
.auth-box h1 { margin-top: 0; font-size: 1.35rem; }
.auth-box label { display: block; margin-top: 1rem; margin-bottom: 0.35rem; font-weight: 500; color: var(--fg-soft); }
.auth-box input { width: 100%; padding: 0.65rem; }
.auth-box .btn { width: 100%; margin-top: 1.25rem; }
.auth-tabs { display: flex; gap: 0; margin-bottom: 1.25rem; border-bottom: 1px solid var(--border); }
.auth-tabs a { padding: 0.5rem 1rem; color: var(--muted); text-decoration: none; border-radius: var(--radius-sm) var(--radius-sm) 0 0; }
.auth-tabs a.active { color: var(--primary-dark); font-weight: 600; border-bottom: 2px solid var(--primary); margin-bottom: -1px; background: var(--bg); }
.auth-form { display: none; }
.auth-form.active { display: block; }
.auth-error { color: #dc2626; font-size: 0.875rem; margin-top: 0.5rem; }

/* Admin */
.admin-layout { display: grid; grid-template-columns: 200px 1fr; gap: 1rem; min-height: 100vh; }
@media (max-width: 640px) { .admin-layout { grid-template-columns: 1fr; } }
.admin-sidebar { background: var(--card); border-right: 1px solid var(--border); padding: 1rem; box-shadow: var(--shadow); }
.admin-sidebar nav { display: flex; flex-direction: column; gap: 0.25rem; }
.admin-sidebar a { padding: 0.6rem; border-radius: var(--radius-sm); }
.admin-sidebar a:hover, .admin-sidebar a.active { background: var(--bg); text-decoration: none; }
.admin-main { padding: 1.5rem; }
.admin-toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; flex-wrap: wrap; gap: 0.5rem; }
.admin-list { list-style: none; padding: 0; margin: 0; }
.admin-list li { padding: 0.85rem; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.admin-list .slug { color: var(--muted); font-size: 0.875rem; }
.admin-form label { display: block; margin-top: 0.75rem; margin-bottom: 0.25rem; font-weight: 500; }
.admin-form input[type="text"], .admin-form input[type="url"], .admin-form textarea, .admin-form select { width: 100%; max-width: 480px; }
.admin-form textarea { min-height: 120px; resize: vertical; }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 0.75rem; }
.media-grid .item { border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; padding: 0.25rem; text-align: center; }
.media-grid .item img { width: 100%; height: 80px; object-fit: cover; border-radius: 4px; }
.media-grid .item .name { font-size: 0.75rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.badge { display: inline-block; padding: 0.25rem 0.5rem; border-radius: 6px; font-size: 0.75rem; font-weight: 500; }
.badge-draft { background: #fef3c7; color: #92400e; }
.badge-published { background: #d1fae5; color: #065f46; }
.error { color: #dc2626; margin-top: 0.5rem; }
.hidden { display: none !important; }

/* Blog list */
.post-list { list-style: none; padding: 0; margin: 0; }
.post-list li { padding: 1.25rem 0; border-bottom: 1px solid var(--border); }
.post-list li:first-child { padding-top: 0; }
.post-list a { font-size: 1.1rem; font-weight: 500; }
.post-list .post-meta { font-size: 0.875rem; color: var(--muted); margin-top: 0.35rem; }
.post-list .post-excerpt { margin-top: 0.5rem; color: var(--muted); line-height: 1.5; }
.empty-state { text-align: center; padding: 3rem 1rem; color: var(--muted); }
.empty-state p { margin-bottom: 1rem; }

/* Tables */
table { width: 100%; border-collapse: collapse; background: var(--card); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
thead { background: var(--bg-alt); }
th { text-align: left; padding: 0.75rem 1rem; font-family: var(--font-head); font-weight: 600; font-size: 0.85rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.03em; }
td { padding: 0.75rem 1rem; border-top: 1px solid var(--border); }
tr:hover td { background: var(--bg); }
