/* ScoutBall USA - Main Stylesheet */
:root {
  --primary: #0a1e5e;
  --primary-light: #1a3a8f;
  --accent: #c8102e;
  --accent-dark: #a00d24;
  --gold: #d4a843;
  --white: #ffffff;
  --light: #f4f6fa;
  --gray: #6b7280;
  --dark: #111827;
  --border: #e5e7eb;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--dark);
  line-height: 1.6;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--accent); }

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

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* Header */
header {
  background: var(--primary);
  color: var(--white);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,0.3);
}

.header-top {
  background: var(--dark);
  padding: 6px 0;
  font-size: 0.85rem;
  text-align: right;
}

.header-top .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-top a { color: var(--gold); }
.header-top a:hover { color: var(--white); }

.header-main {
  padding: 0;
}

.header-main .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 70px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--white);
  font-weight: 800;
  font-size: 1.5rem;
  letter-spacing: -0.5px;
}

.logo-icon {
  width: 48px;
  height: 48px;
  background: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: 900;
  border: 2px solid var(--gold);
}

.logo span { color: var(--gold); }

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

nav a {
  color: var(--white);
  padding: 8px 16px;
  border-radius: 6px;
  font-weight: 500;
  font-size: 0.95rem;
  transition: background 0.2s;
}

nav a:hover, nav a.active {
  background: rgba(255,255,255,0.12);
  color: var(--white);
}

nav a.cta-btn {
  background: var(--accent);
  color: var(--white);
  font-weight: 600;
  margin-left: 8px;
}

nav a.cta-btn:hover {
  background: var(--accent-dark);
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--white);
  font-size: 1.8rem;
  cursor: pointer;
  padding: 4px;
}

/* Hero */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 50%, var(--accent) 100%);
  color: var(--white);
  padding: 80px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 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.04'%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");
  opacity: 0.5;
}

.hero h1 {
  font-size: 3.2rem;
  font-weight: 900;
  margin-bottom: 16px;
  position: relative;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.hero h1 span { color: var(--gold); }

.hero p {
  font-size: 1.3rem;
  opacity: 0.9;
  max-width: 700px;
  margin: 0 auto 32px;
  position: relative;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  position: relative;
}

.btn {
  display: inline-block;
  padding: 14px 32px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn-primary {
  background: var(--accent);
  color: var(--white);
}
.btn-primary:hover {
  background: var(--accent-dark);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(200,16,46,0.4);
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border: 2px solid var(--white);
}
.btn-outline:hover {
  background: var(--white);
  color: var(--primary);
  transform: translateY(-2px);
}

/* Stats bar */
.stats-bar {
  background: var(--dark);
  padding: 24px 0;
  color: var(--white);
}

.stats-bar .container {
  display: flex;
  justify-content: center;
  gap: 60px;
}

.stat { text-align: center; }
.stat-number {
  font-size: 2.4rem;
  font-weight: 900;
  color: var(--gold);
}
.stat-label {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: 0.7;
}

/* Section */
.section {
  padding: 70px 0;
}

.section-dark {
  background: var(--light);
}

.section-title {
  text-align: center;
  margin-bottom: 48px;
}

.section-title h2 {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 8px;
}

.section-title p {
  color: var(--gray);
  font-size: 1.1rem;
}

.section-title .accent-line {
  width: 60px;
  height: 4px;
  background: var(--accent);
  margin: 12px auto 0;
  border-radius: 2px;
}

/* Tournament Cards */
.tournament-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 24px;
}

.tournament-card {
  background: var(--white);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  transition: transform 0.2s, box-shadow 0.2s;
  border: 1px solid var(--border);
}

.tournament-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}

.card-header {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: var(--white);
  padding: 20px 24px;
  position: relative;
}

.card-header h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.card-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  background: var(--accent);
  color: var(--white);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.card-body { padding: 24px; }

.card-meta {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

.card-meta-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
  color: var(--gray);
}

.card-meta-item strong { color: var(--dark); }

.meta-icon {
  width: 32px;
  height: 32px;
  background: var(--light);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.card-body p {
  color: var(--gray);
  font-size: 0.95rem;
  margin-bottom: 20px;
}

.card-actions {
  display: flex;
  gap: 10px;
}

.card-actions .btn {
  flex: 1;
  text-align: center;
  padding: 10px 16px;
  font-size: 0.85rem;
}

.btn-sm {
  padding: 8px 20px;
  font-size: 0.85rem;
}

.btn-secondary {
  background: var(--primary);
  color: var(--white);
}
.btn-secondary:hover {
  background: var(--primary-light);
  color: var(--white);
}

.btn-ghost {
  background: var(--light);
  color: var(--primary);
  border: 1px solid var(--border);
}
.btn-ghost:hover {
  background: var(--primary);
  color: var(--white);
}

/* Features */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.feature-card {
  text-align: center;
  padding: 40px 24px;
  background: var(--white);
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.feature-icon {
  width: 72px;
  height: 72px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-size: 2rem;
  color: var(--white);
}

.feature-card h3 {
  font-size: 1.2rem;
  margin-bottom: 8px;
  color: var(--primary);
}

.feature-card p {
  color: var(--gray);
  font-size: 0.95rem;
}

/* Schedule Table */
.schedule-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.schedule-table thead {
  background: var(--primary);
  color: var(--white);
}

.schedule-table th {
  padding: 16px 20px;
  text-align: left;
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.schedule-table td {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.schedule-table tbody tr:hover {
  background: var(--light);
}

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

/* Tournament detail page */
.tournament-hero {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: var(--white);
  padding: 60px 0;
}

.tournament-hero h1 {
  font-size: 2.6rem;
  font-weight: 900;
  margin-bottom: 8px;
}

.tournament-hero .subtitle {
  font-size: 1.2rem;
  opacity: 0.8;
}

.tournament-detail {
  padding: 50px 0;
}

.detail-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 40px;
}

.detail-sidebar {
  background: var(--light);
  border-radius: 12px;
  padding: 32px;
  height: fit-content;
  position: sticky;
  top: 100px;
}

.detail-sidebar h3 {
  font-size: 1.1rem;
  color: var(--primary);
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--accent);
}

.sidebar-item {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
}

.sidebar-item:last-child { border-bottom: none; }
.sidebar-item .label { color: var(--gray); }
.sidebar-item .value { font-weight: 600; color: var(--dark); }

/* Rules page */
.rules-content {
  max-width: 800px;
  margin: 0 auto;
}

.rules-content h3 {
  color: var(--primary);
  font-size: 1.3rem;
  margin: 32px 0 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--light);
}

.rules-content ul {
  padding-left: 24px;
  margin-bottom: 16px;
}

.rules-content li {
  margin-bottom: 8px;
  color: var(--gray);
}

/* Contact / Register */
.form-section {
  max-width: 700px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--dark);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(10,30,94,0.1);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* Footer */
footer {
  background: var(--dark);
  color: var(--white);
  padding: 50px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-about p {
  color: rgba(255,255,255,0.6);
  font-size: 0.95rem;
  margin-top: 12px;
}

footer h4 {
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 16px;
  color: var(--gold);
}

footer ul { list-style: none; }
footer ul li { margin-bottom: 8px; }
footer ul a {
  color: rgba(255,255,255,0.6);
  font-size: 0.9rem;
  transition: color 0.2s;
}
footer ul a:hover { color: var(--white); }

.footer-bottom {
  padding: 20px 0;
  text-align: center;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.4);
}

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

/* 404 */
.not-found {
  text-align: center;
  padding: 100px 20px;
}
.not-found h1 { font-size: 6rem; color: var(--primary); }
.not-found p { font-size: 1.2rem; color: var(--gray); margin-bottom: 24px; }

/* Responsive */
@media (max-width: 768px) {
  .nav-toggle { display: block; }
  
  nav {
    display: none;
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    background: var(--primary);
    flex-direction: column;
    padding: 16px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
  }
  
  nav.open { display: flex; }
  
  nav a { padding: 12px 16px; width: 100%; }
  
  .hero h1 { font-size: 2rem; }
  .hero p { font-size: 1.1rem; }
  .hero-buttons { flex-direction: column; align-items: center; }
  
  .stats-bar .container { gap: 24px; flex-wrap: wrap; }
  
  .features-grid { grid-template-columns: 1fr; }
  .tournament-grid { grid-template-columns: 1fr; }
  
  .detail-grid { grid-template-columns: 1fr; }
  
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
  
  .form-row { grid-template-columns: 1fr; }
  
  .schedule-table { font-size: 0.85rem; }
  .schedule-table th, .schedule-table td { padding: 10px 12px; }
}
