/*
Theme Name: Flying Eagles Golf Club
Theme Author: FEGC
Description: Custom theme for Flying Eagles Golf Club with user registration, photo gallery, and events management
Version: 2.0.0
Text Domain: flying-eagles-golf
Domain Path: /languages
License: GPL2
License URI: https://www.gnu.org/licenses/gpl-2.0.html
*/

/* ── Custom Properties ── */
:root {
  --color-primary: #166534;
  --color-primary-light: #22c55e;
  --color-primary-dark: #14532d;
  --color-accent: #059669;
  --color-surface: #ffffff;
  --color-surface-dim: #f8faf9;
  --color-background: #f0fdf4;
  --color-text: #1e293b;
  --color-text-muted: #64748b;
  --color-border: #e2e8f0;
  --color-header: #0f172a;
  --color-danger: #dc2626;
  --color-danger-hover: #ef4444;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --max-width: 1200px;
}

/* ── Reset & Base ── */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-background);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

body > .container {
  flex: 1;
}

img {
  max-width: 100%;
  height: auto;
}

/* ── Typography ── */
h1, h2, h3, h4, h5, h6 {
  color: var(--color-primary-dark);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.02em;
  margin: 1.5em 0 0.5em;
}

h1 { font-size: 2.25rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.375rem; }
h4 { font-size: 1.125rem; }

p {
  margin-bottom: 1em;
  line-height: 1.75;
  color: var(--color-text);
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-accent);
}

/* ── Header ── */
.site-header {
  background: var(--color-header);
  color: white;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.site-header a {
  color: white;
}

.site-header a:hover {
  color: var(--color-primary-light);
}

.header-content {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 1.5rem;
  height: 72px;
}

.site-title {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.site-title a {
  color: white;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 12px;
}

.site-logo {
  height: 44px;
  width: auto;
  max-height: 44px;
  display: block;
  object-fit: contain;
  flex-shrink: 0;
  border-radius: 6px;
}

/* ── Navigation ── */
.main-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.main-nav > a,
nav > a {
  color: rgba(255, 255, 255, 0.8);
  font-weight: 500;
  font-size: 0.9rem;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.main-nav > a:hover,
nav > a:hover {
  color: white;
  background: rgba(255, 255, 255, 0.08);
  text-decoration: none;
}

nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-auth-links {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: 8px;
  padding-left: 12px;
  border-left: 1px solid rgba(255, 255, 255, 0.12);
}

.nav-user-greeting {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.85rem;
  font-weight: 400;
}

.nav-auth-links .auth-btn {
  color: white;
  padding: 7px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 500;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.nav-auth-links .auth-btn {
  background: var(--color-primary);
}

.nav-auth-links .auth-btn:hover {
  background: var(--color-accent);
  color: white;
  text-decoration: none;
  transform: translateY(-1px);
}

.nav-auth-links .auth-btn.auth-btn-logout {
  background: rgba(220, 38, 38, 0.15);
  color: #fca5a5;
  border: 1px solid rgba(220, 38, 38, 0.3);
}

.nav-auth-links .auth-btn.auth-btn-logout:hover {
  background: var(--color-danger);
  color: white;
  border-color: var(--color-danger);
  text-decoration: none;
}

/* ── Mobile Menu Toggle ── */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: var(--radius-sm);
  transition: background var(--transition-fast);
}

.mobile-menu-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
}

.mobile-menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: white;
  border-radius: 2px;
  transition: all var(--transition-base);
  position: relative;
}

.mobile-menu-toggle span::before,
.mobile-menu-toggle span::after {
  content: '';
  position: absolute;
  left: 0;
  width: 22px;
  height: 2px;
  background: white;
  border-radius: 2px;
  transition: all var(--transition-base);
}

.mobile-menu-toggle span::before { top: -7px; }
.mobile-menu-toggle span::after { top: 7px; }

.mobile-menu-toggle.active span { background: transparent; }
.mobile-menu-toggle.active span::before { top: 0; transform: rotate(45deg); }
.mobile-menu-toggle.active span::after { top: 0; transform: rotate(-45deg); }

/* ── Footer ── */
.site-footer {
  background: var(--color-header);
  color: rgba(255, 255, 255, 0.7);
  margin-top: auto;
}

.footer-content {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 0 1.5rem;
  height: 72px;
  flex-wrap: wrap;
}

.site-footer a {
  color: rgba(255, 255, 255, 0.8);
  transition: color var(--transition-fast);
}

.site-footer a:hover {
  color: var(--color-primary-light);
}

.footer-site-name {
  color: white;
  font-weight: 600;
  font-size: 0.9rem;
}

.footer-site-tagline {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.85rem;
}

.footer-contact-email {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.85rem;
}

.footer-sep {
  color: rgba(255, 255, 255, 0.2);
  font-size: 0.85rem;
}

.footer-copyright {
  color: rgba(255, 255, 255, 0.35);
  font-size: 0.8rem;
  margin-left: auto;
}

/* ── Main Container ── */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

main {
  background: var(--color-surface);
  margin: 1.5rem 0;
  padding: 2.5rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--color-border);
}

body.page-login main {
  max-width: 420px;
  margin: 2rem auto;
  padding: 2rem;
}

body.page-about main {
  background: var(--color-surface);
}

/* ── Home Page ── */
.home-page {
  padding: 1.5rem 0;
}

main.home-page {
  background: var(--color-surface);
  padding: 1.25rem 2rem;
}

main.photos-page {
  background: var(--color-surface);
}

.home-page .container {
  max-width: 100%;
  padding: 0;
}

.latest-post {
  max-width: 100%;
  margin: 0 auto;
}

.post-header {
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--color-border);
}

.post-title {
  color: var(--color-text);
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.post-meta {
  color: var(--color-text-muted);
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.post-meta .post-date::after {
  content: "·";
  margin: 0 0.5rem;
  color: var(--color-text-muted);
}

.post-thumbnail {
  margin: 1.5rem 0;
  text-align: center;
}

.post-thumbnail img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
}

.post-content {
  font-size: 1rem;
  line-height: 1.75;
  margin: 1.5rem 0;
}

.post-content h2,
.post-content h3,
.post-content h4 {
  color: var(--color-primary-dark);
  margin: 2rem 0 0.75rem;
}

.post-content p {
  margin-bottom: 1rem;
}

.post-content ul,
.post-content ol {
  margin: 1rem 0;
  padding-left: 1.5rem;
}

.post-content li {
  margin-bottom: 0.5rem;
}

.post-content blockquote {
  border-left: 3px solid var(--color-primary);
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
  background: var(--color-surface-dim);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-style: italic;
  color: var(--color-text-muted);
}

.post-footer {
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--color-border);
  color: var(--color-text-muted);
  font-size: 0.85rem;
}

.post-categories,
.post-tags {
  margin: 0.5rem 0;
}

/* Home-page post: compact header */
.home-page .post-header {
  margin-bottom: 0.5rem;
  padding-bottom: 0.4rem;
}

.home-page .post-title {
  font-size: 1.15rem;
  margin-bottom: 0.2rem;
  line-height: 1.25;
}

.home-page .post-meta {
  font-size: 0.75rem;
}

/* Home-page post: compact footer */
.home-page .post-footer {
  margin-top: 0.75rem;
  padding-top: 0.5rem;
  font-size: 0.75rem;
}

.home-page .post-categories,
.home-page .post-tags {
  margin: 0.15rem 0;
}

.home-page .post-footer .btn {
  padding: 0.3rem 0.75rem;
  font-size: 0.75rem;
}

.home-page .post-comments-link {
  margin-top: 0.4rem;
  gap: 0.35rem;
}

.home-page .comment-count-label {
  font-size: 0.75rem;
}

.page-links {
  margin: 2rem 0;
  text-align: center;
  display: flex;
  justify-content: center;
  gap: 0.5rem;
}

.page-links a {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: var(--color-primary);
  color: white;
  text-decoration: none;
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-size: 0.9rem;
  transition: all var(--transition-fast);
}

.page-links a:hover {
  background: var(--color-primary-dark);
  transform: translateY(-1px);
}

/* ── Page Template Variants ── */
.page-auth-main {
  max-width: 420px;
  margin: 2rem auto;
  padding: 2rem;
}

.page-about-main {
  background: var(--color-surface);
}

/* ── Event Card Header ── */
.event-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.event-date-nodate {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

/* ── Dashboard ── */
.dashboard-row {
  margin-top: 2rem;
}

/* ── Buttons Variant ── */
.btn-danger {
  background: var(--color-danger);
}

.btn-danger:hover {
  background: var(--color-danger-hover);
}

.no-posts {
  text-align: center;
  padding: 4rem 1.5rem;
}

.no-posts h2 {
  color: var(--color-primary-dark);
  margin-bottom: 1rem;
}

/* ── Forms ── */
form {
  max-width: 500px;
  margin: 1.5rem 0;
}

label {
  display: block;
  margin: 1rem 0 0.375rem;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--color-text);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"],
textarea,
select {
  width: 100%;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-family: inherit;
  background: var(--color-surface);
  color: var(--color-text);
  transition: all var(--transition-fast);
  appearance: none;
}

textarea {
  resize: vertical;
  min-height: 120px;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(22, 101, 52, 0.12);
}

button,
input[type="submit"],
.btn {
  background: var(--color-primary);
  color: white;
  padding: 0.65rem 1.5rem;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: inherit;
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  line-height: 1.5;
}

button:hover,
input[type="submit"]:hover,
.btn:hover {
  background: var(--color-primary-dark);
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
  color: white;
}

button:active,
input[type="submit"]:active,
.btn:active {
  transform: translateY(0);
}

/* ── Layout ── */
.row {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.col-1-2 {
  flex: 1;
  min-width: 300px;
}

.col-1-3 {
  flex: 1;
  min-width: 250px;
}

/* ── Cards ── */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
}

.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

/* ── Events ── */
.events-subtitle {
  font-size: 1.125rem;
  margin: 1rem 0 0.75rem;
  font-weight: 600;
}

.events-scroll-wrapper {
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 1rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(22, 101, 52, 0.4) transparent;
}

.events-scroll-wrapper::-webkit-scrollbar {
  height: 6px;
}

.events-scroll-wrapper::-webkit-scrollbar-track {
  background: transparent;
  border-radius: 3px;
}

.events-scroll-wrapper::-webkit-scrollbar-thumb {
  background: rgba(22, 101, 52, 0.3);
  border-radius: 3px;
}

.events-scroll-wrapper::-webkit-scrollbar-thumb:hover {
  background: rgba(22, 101, 52, 0.5);
}

.events-grid {
  display: flex;
  flex-wrap: nowrap;
  gap: 1.25rem;
  margin: 1.5rem 0;
  width: max-content;
}

.event-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-primary);
  padding: 1.5rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  flex: 0 0 380px;
  transition: all var(--transition-base);
}

.event-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
  border-left-color: var(--color-primary-light);
}

.event-date {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.85rem;
  display: inline-block;
  margin-bottom: 0.75rem;
}

.event-title {
  font-size: 1.2rem;
  color: var(--color-text);
  margin: 0.75rem 0;
  font-weight: 700;
}

.event-title a {
  color: inherit;
  transition: color var(--transition-fast);
}

.event-title a:hover {
  color: var(--color-primary);
}

.event-description {
  color: var(--color-text-muted);
  margin: 0.75rem 0;
  font-size: 0.9rem;
  line-height: 1.6;
}

/* ── Photo Gallery ── */
.photo-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
  margin: 2rem 0;
}

.photo-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  aspect-ratio: 4 / 3;
}

.photo-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.photo-item:hover img {
  transform: scale(1.06);
}

.photo-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.75));
  color: white;
  padding: 2rem 1rem 1rem;
  transform: translateY(100%);
  transition: transform var(--transition-base);
}

.photo-item:hover .photo-caption {
  transform: translateY(0);
}

/* ── Login / Registration ── */
.login-form, .register-form {
  max-width: 400px;
  margin: 2rem auto;
}

.login-form {
  max-width: 320px;
  margin: 1rem auto;
}

.form-group {
  margin-bottom: 1.25rem;
}

.error {
  color: var(--color-danger);
  background-color: #fef2f2;
  padding: 1rem;
  border-radius: var(--radius-md);
  margin-bottom: 1.25rem;
  border: 1px solid #fecaca;
  font-size: 0.9rem;
}

.success {
  color: var(--color-primary);
  background-color: #f0fdf4;
  padding: 1rem;
  border-radius: var(--radius-md);
  margin-bottom: 1.25rem;
  border: 1px solid #bbf7d0;
  font-size: 0.9rem;
}

/* ── Notice / Flash Messages ── */
.notice {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.notice-success {
  background: #f0fdf4;
  border-left: 4px solid var(--color-primary);
  color: var(--color-primary-dark);
}

/* ── User Account / Dashboard ── */
.user-account {
  background: var(--color-surface);
  padding: 2rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
}

.user-menu {
  list-style: none;
  margin: 1.25rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.user-menu li {
  margin: 0;
}

.user-menu a {
  padding: 0.625rem 1rem;
  display: block;
  background: var(--color-surface-dim);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--color-text);
  transition: all var(--transition-fast);
}

.user-menu a:hover {
  background: var(--color-primary);
  color: white;
  text-decoration: none;
  border-color: var(--color-primary);
  transform: translateX(4px);
}

/* ── Event Registration Area ── */
.event-registration {
  margin: 1rem 0;
  padding: 1rem;
  background: var(--color-surface-dim);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
}

.event-registration .registered-msg {
  color: var(--color-primary);
  font-weight: 600;
  margin: 0;
}

.event-registration .attendee-count {
  color: var(--color-text-muted);
  margin: 0.25rem 0 0;
  font-size: 0.9rem;
}

/* ── Entrant Table ── */
.event-entrants {
  margin-top: 1rem;
}

.event-entrants h4 {
  margin: 0 0 0.75rem;
  font-size: 1rem;
}

.entrants-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.entrants-table th {
  text-align: left;
  border-bottom: 2px solid var(--color-border);
  padding: 0.625rem 0.75rem;
  font-weight: 600;
  color: var(--color-text-muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.entrants-table td {
  border-bottom: 1px solid var(--color-border);
  padding: 0.625rem 0.75rem;
}

.entrants-table tr:last-child td {
  border-bottom: none;
}

.entrants-table tr:hover td {
  background: var(--color-surface-dim);
}

/* ── Event Details (Single) ── */
.event-details {
  background: var(--color-surface-dim);
  padding: 1.5rem;
  border-radius: var(--radius-md);
  margin-top: 2rem;
  border: 1px solid var(--color-border);
}

.event-details h3 {
  margin: 0 0 1rem;
  font-size: 1.125rem;
}

/* ── Comments ── */
.post-comments-link {
  margin-top: 1rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.post-comments-link .btn {
  font-size: 0.85rem;
  padding: 0.5rem 1rem;
}

.comment-count-label {
  color: var(--color-text-muted);
  font-size: 0.85rem;
}

/* ── Standings ── */
.standings-upload {
  margin-bottom: 2rem;
  padding: 1.25rem;
  background: var(--color-surface-dim);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

.standings-upload h3 {
  margin: 0 0 0.75rem;
  font-size: 1rem;
}

.standings-upload form {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin: 0;
}

.standings-upload input[type="file"] {
  margin-bottom: 0;
  flex: 1;
  min-width: 200px;
}

main.standings-page {
  overflow: hidden;
  max-width: 100%;
  box-sizing: border-box;
}

.standings-table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  max-width: calc(100vw - 3rem - 5rem);
  box-sizing: border-box;
}

.standings-table {
  min-width: 800px;
  border-collapse: collapse;
  font-size: 0.9rem;
  white-space: nowrap;
}

.standings-table thead {
  background: var(--color-header);
  color: white;
}

.standings-table th {
  padding: 0.75rem 0.625rem;
  text-align: center;
  font-weight: 600;
  font-size: 0.8rem;
  vertical-align: bottom;
  line-height: 1.3;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.standings-table th:last-child {
  border-right: none;
}

.standings-table th.standings-name {
  text-align: left;
}

.standings-month {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.standings-course {
  display: block;
  font-size: 0.65rem;
  font-weight: 400;
  opacity: 0.65;
  white-space: normal;
  max-width: 90px;
  line-height: 1.2;
}

.standings-table td {
  padding: 0.6rem 0.625rem;
  text-align: center;
  border-bottom: 1px solid var(--color-border);
}

.standings-table td.standings-name {
  text-align: left;
  font-weight: 500;
  white-space: nowrap;
}

.standings-table td.standings-rank {
  font-weight: 700;
  color: var(--color-text-muted);
  width: 2.5rem;
}

.standings-table td.standings-total {
  font-weight: 700;
  background: var(--color-surface-dim);
  font-size: 1rem;
}

.standings-table td.standings-pts {
  color: var(--color-text-muted);
}

.standings-table td.standings-pts.has-points {
  color: var(--color-text);
  font-weight: 600;
}

.standings-table tbody tr:hover td {
  background: var(--color-surface-dim);
}

/* Top 3 rank highlight */
.standings-top-1 td.standings-rank {
  color: #ca8a04;
}

.standings-top-1 td.standings-name {
  color: var(--color-primary-dark);
}

.standings-top-2 td.standings-rank {
  color: #6b7280;
}

.standings-top-3 td.standings-rank {
  color: #b45309;
}

/* ── Animations ── */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.latest-post,
.event-card,
.photo-item,
.user-account {
  animation: fadeInUp 0.5s ease-out both;
}

.event-card:nth-child(2) { animation-delay: 0.1s; }
.event-card:nth-child(3) { animation-delay: 0.2s; }
.event-card:nth-child(4) { animation-delay: 0.3s; }

.photo-item:nth-child(2) { animation-delay: 0.05s; }
.photo-item:nth-child(3) { animation-delay: 0.1s; }
.photo-item:nth-child(4) { animation-delay: 0.15s; }
.photo-item:nth-child(5) { animation-delay: 0.2s; }
.photo-item:nth-child(6) { animation-delay: 0.25s; }

/* ── Responsive — Tablet ── */
@media (max-width: 1024px) {
  .header-content {
    padding: 0 1rem;
  }

  main {
    padding: 2rem;
    margin: 1rem 0;
  }
}

/* ── Responsive — Mobile ── */
@media (max-width: 768px) {
  html {
    overflow-x: hidden;
  }

  .mobile-menu-toggle {
    display: block;
  }

  .header-content {
    height: 64px;
  }

  nav {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--color-header);
    flex-direction: column;
    padding: 1rem 1.5rem 1.5rem;
    gap: 4px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: var(--shadow-xl);
  }

  nav.nav-open {
    display: flex;
  }

  nav > a {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
  }

  nav > a:hover {
    background: rgba(255, 255, 255, 0.06);
  }

  .nav-auth-links {
    margin-left: 0;
    padding-left: 0;
    border-left: none;
    padding-top: 0.75rem;
    margin-top: 0.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    width: 100%;
    justify-content: stretch;
  }

  .nav-auth-links .auth-btn {
    flex: 1;
    text-align: center;
    justify-content: center;
  }

  .site-title {
    font-size: 1.1rem;
  }

  .site-logo {
    height: 36px;
    max-height: 36px;
  }

  main {
    padding: 1.5rem;
    border-radius: var(--radius-md);
    overflow-x: hidden;
  }

  main.home-page {
    padding: 1.5rem;
  }

  .col-1-2,
  .col-1-3 {
    flex: 1 100%;
  }

  h1 { font-size: 1.5rem; }
  h2 { font-size: 1.25rem; }

  .post-title {
    font-size: 1.35rem;
  }

  .events-scroll-wrapper {
    margin: 0 -1rem;
    padding-left: 1rem;
    padding-right: 1rem;
    max-width: 100vw;
  }

  .event-card {
    flex: 0 0 85vw;
    max-width: 340px;
  }

  .photo-gallery {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.75rem;
  }

  .container {
    padding: 0 1rem;
  }

  .row {
    gap: 1rem;
  }

  .user-account {
    padding: 1.5rem;
  }

  .footer-content {
    height: auto;
    padding: 0.75rem 1rem;
    gap: 0.25rem 0.5rem;
    font-size: 0.8rem;
  }

  .footer-site-name { font-size: 0.8rem; }
  .footer-site-tagline,
  .footer-contact-email,
  .footer-sep { font-size: 0.75rem; }
  .footer-copyright {
    font-size: 0.7rem;
    margin-left: 0;
  }
}

/* ── Responsive — Small Mobile ── */
@media (max-width: 480px) {
  .header-content {
    height: 56px;
    padding: 0 0.75rem;
  }

  nav {
    top: 56px;
  }

  .site-title {
    font-size: 1rem;
  }

  .site-logo {
    height: 32px;
    max-height: 32px;
  }

  main {
    padding: 1.25rem;
    margin: 0.75rem 0;
  }

  h1 { font-size: 1.35rem; }

  .event-card {
    flex: 0 0 90vw;
  }

  .photo-gallery {
    grid-template-columns: 1fr;
  }

  .footer-content {
    flex-direction: column;
    height: auto;
    padding: 0.6rem 0.75rem;
    gap: 0.15rem;
    text-align: center;
  }

  .footer-sep { display: none; }
  .footer-copyright { margin-left: 0; }
}
