/* ==========================================================================
   Redneck Masters Tournament — Rustic / Country Club Theme
   ========================================================================== */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;700;900&family=Lora:wght@400;500;600&family=Open+Sans:wght@400;600&display=swap');

/* --- CSS Variables --- */
:root {
  /* Greens */
  --green-deep: #1a3a1a;
  --green-dark: #2d5016;
  --green-mid: #3d6b2e;
  --green-light: #5a8a3c;
  --green-pale: #e8f0e0;

  /* Warm tones */
  --brown-dark: #3e2a1a;
  --brown-mid: #6b4c30;
  --brown-light: #a07850;
  --gold: #c8a84e;
  --gold-light: #e8d48a;
  --gold-pale: #f5ecd0;

  /* Backgrounds */
  --cream: #faf6ef;
  --cream-dark: #f0e8d8;
  --parchment: #f5f0e5;

  /* Text */
  --text-dark: #1a1a1a;
  --text-body: #333;
  --text-muted: #6b6b6b;
  --text-light: #f5e6c8;

  /* Accents */
  --red-muted: #8b3a3a;
  --border-light: #d4c5a0;
  --shadow-soft: rgba(0, 0, 0, 0.08);
  --shadow-mid: rgba(0, 0, 0, 0.15);
}

/* --- Base Reset & Body --- */
*, *::before, *::after {
  box-sizing: border-box;
}

body {
  font-family: 'Open Sans', sans-serif;
  color: var(--text-body);
  margin: 0;
  padding: 0;
  min-height: 100vh;
}

/* --- Typography --- */
h1, h2, h3, h4 {
  font-family: 'Playfair Display', Georgia, serif;
  color: var(--green-deep);
  font-weight: 700;
}

h1 { font-size: 2.2rem; }
h2 { font-size: 1.6rem; }
h5, h6 {
  font-family: 'Lora', Georgia, serif;
  color: var(--brown-dark);
}

p, li, label, input, select, textarea, button {
  font-family: 'Open Sans', sans-serif;
}

/* --- Shared Page Wrapper --- */
.page-wrapper {
  background-color: var(--cream);
  min-height: 100vh;
}

/* Background image pages (index, signup, rules) */
.page-bg {
  background: linear-gradient(rgba(26, 58, 26, 0.65), rgba(26, 58, 26, 0.75)),
              url('images/background.jpg') no-repeat center center fixed;
  background-size: cover;
  min-height: 100vh;
  color: var(--text-light);
}

.page-bg h1, .page-bg h2, .page-bg p, .page-bg li {
  color: var(--text-light);
}

/* --- Navbar / Header --- */
.site-header {
  background: linear-gradient(135deg, var(--green-deep) 0%, var(--green-dark) 100%);
  padding: 12px 0;
  border-bottom: 3px solid var(--gold);
  box-shadow: 0 2px 8px var(--shadow-mid);
}

.site-header .container {
  display: flex;
  justify-content: center;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.site-header .brand {
  display: none;
}

.site-header nav a {
  display: inline-block;
  background: transparent;
  border: 1px solid var(--gold);
  color: var(--gold-light);
  padding: 8px 20px;
  margin: 0 4px;
  border-radius: 6px;
  text-decoration: none;
  font-family: 'Lora', Georgia, serif;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.2s;
}

.site-header nav a:hover,
.site-header nav a.active {
  background: var(--gold);
  color: var(--green-deep);
  text-decoration: none;
}

/* --- Main Content Container --- */
.main-content {
  max-width: 1300px;
  margin: 0 auto;
  padding: 30px 20px;
}

.main-content-narrow {
  max-width: 650px;
  margin: 0 auto;
  padding: 30px 20px;
}

/* --- Cards --- */
.card {
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  box-shadow: 0 2px 6px var(--shadow-soft);
  overflow: hidden;
  margin-bottom: 24px;
  transition: box-shadow 0.2s;
}

.card:hover {
  box-shadow: 0 4px 12px var(--shadow-mid);
}

.card-header {
  background: linear-gradient(135deg, var(--green-dark) 0%, var(--green-mid) 100%);
  color: var(--text-light);
  font-family: 'Lora', Georgia, serif;
  font-weight: 600;
  font-size: 1.05rem;
  padding: 14px 20px;
  border-bottom: 2px solid var(--gold);
}

.card-body {
  padding: 24px;
  background: #fff;
}

/* Card variant for dark/glass pages */
.card-glass {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
}

.card-glass .card-header {
  background: rgba(45, 80, 22, 0.8);
  border-bottom: 2px solid var(--gold);
}

.card-glass .card-body {
  background: rgba(255, 255, 255, 0.92);
  color: var(--text-dark);
}

.card-glass .list-group-item {
  background: rgba(255, 255, 255, 0.95);
  color: var(--text-dark);
  border-color: var(--border-light);
}

/* --- Tournament Hero Section --- */
.tournament-hero {
  background: linear-gradient(135deg, rgba(26, 58, 26, 0.9), rgba(45, 80, 22, 0.85));
  border: 2px solid var(--gold);
  border-radius: 12px;
  padding: 40px 30px;
  text-align: center;
  margin-bottom: 30px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.tournament-hero img {
  max-height: 180px;
  width: auto;
  margin-bottom: 15px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.tournament-hero h2 {
  color: var(--gold-light);
  font-size: 2rem;
  margin-bottom: 15px;
  font-weight: 900;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.tournament-hero p {
  color: var(--cream);
  font-size: 1.05rem;
  margin-bottom: 8px;
}

.tournament-hero strong {
  color: var(--gold-light);
}

/* --- Buttons --- */
.btn-primary {
  background: linear-gradient(135deg, var(--green-dark) 0%, var(--green-mid) 100%);
  border: 1px solid var(--green-dark);
  color: #fff;
  font-weight: 600;
  padding: 10px 24px;
  border-radius: 6px;
  transition: all 0.2s;
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--green-mid) 0%, var(--green-light) 100%);
  border-color: var(--green-mid);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(45, 80, 22, 0.3);
}

.btn-secondary {
  background: var(--brown-mid);
  border: 1px solid var(--brown-dark);
  color: #fff;
  font-weight: 600;
  padding: 10px 24px;
  border-radius: 6px;
  transition: all 0.2s;
}

.btn-secondary:hover {
  background: var(--brown-light);
  border-color: var(--brown-mid);
}

.btn-warning {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
  border: 1px solid var(--gold);
  color: var(--brown-dark);
  font-weight: 600;
  padding: 10px 24px;
  border-radius: 6px;
}

.btn-warning:hover {
  background: var(--gold-light);
  transform: translateY(-1px);
}

.btn-danger {
  background: var(--red-muted);
  border: 1px solid var(--red-muted);
  color: #fff;
  font-weight: 600;
}

.btn-danger:hover {
  background: #a04040;
}

.btn-link {
  color: var(--gold-light);
  font-weight: 600;
  text-decoration: none;
}

.btn-link:hover {
  color: var(--gold);
  text-decoration: underline;
}

/* --- Forms --- */
.form-control, .form-select {
  border: 1px solid var(--border-light);
  border-radius: 6px;
  padding: 10px 14px;
  font-size: 0.95rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  background: #fff;
}

.form-control:focus, .form-select:focus {
  border-color: var(--green-mid);
  box-shadow: 0 0 0 3px rgba(61, 107, 46, 0.15);
  outline: none;
}

.form-label {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-body);
  margin-bottom: 6px;
}

/* Form labels on dark backgrounds */
.page-bg .form-label,
.card-glass .form-label {
  color: var(--text-light);
}

/* --- Alerts --- */
.alert {
  border-radius: 8px;
  border: none;
  font-weight: 500;
  padding: 14px 20px;
}

.alert-info {
  background: var(--green-pale);
  color: var(--green-deep);
  border-left: 4px solid var(--green-mid);
}

.alert-success {
  background: #e8f5e9;
  color: #1b5e20;
  border-left: 4px solid #4caf50;
}

.alert-warning {
  background: var(--gold-pale);
  color: var(--brown-dark);
  border-left: 4px solid var(--gold);
}

.alert-danger {
  background: #fde8e8;
  color: #8b3a3a;
  border-left: 4px solid var(--red-muted);
}

/* --- Lists --- */
.list-group-item {
  border: 1px solid var(--border-light);
  padding: 12px 18px;
  font-size: 0.95rem;
  transition: background 0.15s;
}

.list-group-item:hover {
  background: var(--cream-dark);
}

/* --- Badge --- */
.badge.bg-primary {
  background: var(--green-dark) !important;
}

/* --- Carousel --- */
.carousel {
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 12px var(--shadow-mid);
  border: 2px solid var(--gold);
}

.carousel-inner {
  max-height: 420px;
  overflow: hidden;
}

.carousel-item img {
  max-height: 420px;
  width: 100%;
  object-fit: cover;
}

.carousel-caption {
  background: linear-gradient(transparent, rgba(26, 58, 26, 0.85));
  padding: 20px;
  bottom: 0;
  left: 0;
  right: 0;
  border-radius: 0;
}

/* --- Footer --- */
.site-footer {
  background: var(--green-deep);
  border-top: 3px solid var(--gold);
  padding: 20px 0;
  text-align: center;
  color: var(--text-light);
  font-size: 0.85rem;
  margin-top: 40px;
}

.site-footer a {
  color: var(--gold-light);
  text-decoration: none;
}

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

/* --- Waiver Section --- */
.waiver {
  background: rgba(0, 0, 0, 0.65);
  border: 1px solid rgba(200, 168, 78, 0.4);
  border-radius: 8px;
  padding: 30px;
  margin-top: 24px;
}

.waiver h5 {
  color: var(--gold-light);
  font-family: 'Lora', Georgia, serif;
  font-size: 1.3rem;
  margin-bottom: 15px;
}

.waiver p {
  font-size: 1.05rem;
  line-height: 1.7;
  color: #fff;
}

.waiver strong {
  color: var(--gold-light);
}

/* --- Rules Page --- */
.rules-card {
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(200, 168, 78, 0.3);
  border-radius: 8px;
  margin-bottom: 20px;
}

.rules-card .card-header {
  background: rgba(45, 80, 22, 0.9);
  color: var(--gold-light);
  font-size: 1.15rem;
  border-bottom: 2px solid var(--gold);
}

.rules-card .card-body {
  background: rgba(0, 0, 0, 0.3);
  padding: 20px;
}

.rules-card ul {
  list-style-type: disc;
  padding-left: 20px;
}

.rules-card li {
  color: var(--cream);
  margin-bottom: 10px;
  line-height: 1.6;
}

/* --- Admin Dashboard Specific --- */
.admin-dashboard {
  background: linear-gradient(rgba(26, 58, 26, 0.65), rgba(26, 58, 26, 0.75)),
              url('images/background.jpg') no-repeat center center fixed;
  background-size: cover;
  min-height: 100vh;
  color: var(--text-light);
}

.admin-dashboard h1 {
  color: var(--gold-light);
  border-bottom: 3px solid var(--gold);
  padding-bottom: 15px;
  margin-bottom: 30px;
}

.admin-dashboard h5 {
  color: var(--gold-light);
}

.admin-dashboard .form-label {
  color: var(--text-body);
}

.admin-dashboard .card {
  background: rgba(255, 255, 255, 0.95);
}

.admin-dashboard .card-body {
  background: rgba(255, 255, 255, 0.95);
  color: var(--text-dark);
}

.admin-dashboard .list-group-item {
  background: rgba(255, 255, 255, 0.95);
  color: var(--text-dark);
}

.admin-dashboard .alert-info {
  background: rgba(232, 240, 224, 0.95);
}

.admin-dashboard .alert-danger {
  background: rgba(253, 232, 232, 0.95);
}

.admin-dashboard .alert-success {
  background: rgba(232, 245, 233, 0.95);
}

.admin-dashboard .table {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 6px;
  overflow: hidden;
}

.admin-dashboard .table th {
  font-family: 'Lora', Georgia, serif;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 12px 16px;
}

.admin-dashboard .table td {
  padding: 10px 16px;
  color: var(--text-dark);
}

.admin-dashboard .table-striped > tbody > tr:nth-of-type(odd) {
  background-color: rgba(232, 240, 224, 0.5);
}

.admin-dashboard .table-hover > tbody > tr:hover {
  background-color: rgba(200, 168, 78, 0.15);
}

/* --- Utility --- */
.text-gold { color: var(--gold-light); }
.bg-green-deep { background: var(--green-deep); }
.border-gold { border-color: var(--gold) !important; }

/* --- Responsive --- */
@media (max-width: 768px) {
  h1 { font-size: 1.6rem; }
  h2 { font-size: 1.3rem; }
  .tournament-hero { padding: 25px 15px; }
  .tournament-hero h2 { font-size: 1.5rem; }
  .main-content { padding: 15px; }
  .site-header .container { flex-direction: column; gap: 10px; }
  .site-header nav a { margin-left: 4px; padding: 6px 12px; font-size: 0.8rem; }
}
