/* ==========================================================================
   SKI NOCKSPITZ - Modern Responsive Stylesheet
   Mutters & Natters | ski-nockspitz.at
   ========================================================================== */

:root {
  --primary: #026aa7;
  --primary-dark: #014d7a;
  --primary-light: #e0f2fe;
  --accent: #0284c7;
  --accent-hover: #0369a1;
  --highlight: #f59e0b;
  --highlight-bg: #fef3c7;
  --success: #10b981;
  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --bg-subtle: #f1f5f9;
  --text-main: #0f172a;
  --text-muted: #475569;
  --text-light: #94a3b8;
  --border-color: #e2e8f0;
  --border-focus: #38bdf8;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 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.1), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-full: 9999px;
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --max-width: 1140px;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ==========================================================================
   Typography & Utilities
   ========================================================================== */

h1, h2, h3, h4 {
  color: var(--text-main);
  font-weight: 700;
  line-height: 1.25;
}

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

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

.container {
  width: 100%;
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-primary {
  background: var(--primary-light);
  color: var(--primary-dark);
}

.badge-gold {
  background: var(--highlight-bg);
  color: #92400e;
}

.badge-success {
  background: #dcfce7;
  color: #166534;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4.5rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
}

.brand-logo {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: var(--shadow-sm);
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--primary-dark);
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.brand-subtitle {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  list-style: none;
}

.nav-link {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-muted);
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.nav-link:hover, .nav-link.active {
  color: var(--primary);
  background: var(--primary-light);
}

.nav-cta {
  background: var(--primary);
  color: #ffffff !important;
  font-weight: 600;
  padding: 0.55rem 1.15rem;
  border-radius: var(--radius-full);
  box-shadow: 0 2px 4px rgba(2, 106, 167, 0.25);
  transition: var(--transition);
}

.nav-cta:hover {
  background: var(--accent);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(2, 106, 167, 0.35);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--text-main);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */

.hero {
  position: relative;
  background: linear-gradient(135deg, #024570 0%, #0369a1 50%, #0ea5e9 100%);
  color: #ffffff;
  padding: 4.5rem 0 4rem;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40px;
  background: var(--bg-main);
  clip-path: polygon(0 100%, 100% 100%, 100% 0);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 3rem;
  align-items: center;
}

.hero-badge-wrap {
  margin-bottom: 1.25rem;
}

.hero-badge {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(8px);
}

.hero-title {
  font-size: 3rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.15;
  margin-bottom: 1rem;
  letter-spacing: -0.03em;
}

.hero-title span {
  color: #7dd3fc;
}

.hero-lead {
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 2rem;
  max-width: 600px;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.75rem 1.4rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition);
  border: none;
  text-decoration: none;
}

.btn-white {
  background: #ffffff;
  color: var(--primary-dark);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.btn-white:hover {
  background: #f1f5f9;
  color: var(--primary);
  transform: translateY(-2px);
}

.btn-glass {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(8px);
}

.btn-glass:hover {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--primary);
  color: #ffffff;
}

.btn-primary:hover {
  background: var(--accent);
  color: #ffffff;
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 1.5px solid var(--primary);
}

.btn-outline:hover {
  background: var(--primary-light);
  color: var(--primary-dark);
}

.btn-success {
  background: #166534;
  color: #ffffff;
}

.btn-success:hover {
  background: #14532d;
  color: #ffffff;
  transform: translateY(-1px);
}

.btn-sm {
  padding: 0.45rem 1rem;
  font-size: 0.85rem;
}

.level-card .btn-kurs {
  margin-top: auto;
  padding-top: 0.55rem;
  padding-bottom: 0.55rem;
  width: 100%;
}

.hero-partners {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.8);
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding-top: 1.25rem;
}

.hero-partners strong {
  color: #ffffff;
}

.hero-card {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  backdrop-filter: blur(12px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.hero-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.hero-card-title {
  font-size: 1.1rem;
  color: #ffffff;
}

.hero-events-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.hero-event-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: rgba(255, 255, 255, 0.12);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  transition: var(--transition);
}

.hero-event-item:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateX(4px);
}

.hero-event-date {
  background: #ffffff;
  color: var(--primary-dark);
  font-weight: 800;
  font-size: 0.75rem;
  padding: 0.4rem 0.6rem;
  border-radius: var(--radius-sm);
  text-align: center;
  min-width: 58px;
  line-height: 1.1;
}

.hero-event-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: #ffffff;
}

/* ==========================================================================
   Sections General
   ========================================================================== */

section {
  padding: 4.5rem 0;
}

.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 3rem;
}

.section-tag {
  color: var(--accent);
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
  display: block;
}

.section-title {
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}

.section-subtitle {
  font-size: 1.05rem;
  color: var(--text-muted);
}

/* ==========================================================================
   Termine / Events Grid
   ========================================================================== */

.events-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.event-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.75rem 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.event-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--primary);
}

.event-card.featured {
  border-color: #fde68a;
  background: linear-gradient(180deg, #fffbeb 0%, #ffffff 100%);
}

.event-card.featured::before {
  background: var(--highlight);
}

.event-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-focus);
}

.event-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.event-date-badge {
  background: var(--primary-light);
  color: var(--primary-dark);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-sm);
}

.event-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.event-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.event-footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ==========================================================================
   Derby Feature Banner
   ========================================================================== */

.derby-feature {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  color: #ffffff;
  border-radius: var(--radius-lg);
  padding: 3rem 2.5rem;
  box-shadow: var(--shadow-xl);
  margin-bottom: 3rem;
  position: relative;
  overflow: hidden;
}

.tauschboerse-feature {
  background: linear-gradient(135deg, #0c4a6e 0%, #0369a1 100%) !important;
  background-color: #0369a1 !important;
  color: #ffffff !important;
  border-radius: var(--radius-lg);
  padding: 3rem 2.5rem;
  box-shadow: var(--shadow-xl);
  position: relative;
  overflow: hidden;
}

.tauschboerse-feature h3 {
  color: #ffffff !important;
}

.tauschboerse-feature p {
  color: #f0f9ff !important;
}

.tauschboerse-feature .derby-detail-item {
  background: rgba(15, 23, 42, 0.3) !important;
  border: 1px solid rgba(255, 255, 255, 0.22) !important;
}

.tauschboerse-feature .derby-detail-label {
  color: #bae6fd !important;
}

.tauschboerse-feature .derby-detail-value {
  color: #ffffff !important;
}

.tauschboerse-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.25rem 0;
}

.tauschboerse-cat-pill {
  background: rgba(255, 255, 255, 0.22) !important;
  border: 1px solid rgba(255, 255, 255, 0.35) !important;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  color: #ffffff !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}

.derby-feature::before {
  content: "";
  position: absolute;
  top: -50px;
  right: -50px;
  width: 250px;
  height: 250px;
  background: radial-gradient(circle, rgba(2, 106, 167, 0.4) 0%, transparent 70%);
  border-radius: 50%;
}

.derby-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.9fr;
  gap: 2.5rem;
  align-items: center;
}

.derby-info h3 {
  font-size: 2rem;
  color: #ffffff;
  margin-bottom: 0.5rem;
}

.derby-subtitle {
  color: #38bdf8;
  font-weight: 600;
  font-size: 1.1rem;
  margin-bottom: 1.25rem;
}

.derby-details-list {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 2rem;
}

.derby-detail-item {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 0.85rem 1rem;
  border-radius: var(--radius-md);
}

.derby-detail-label {
  font-size: 0.75rem;
  color: #94a3b8;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 0.2rem;
}

.derby-detail-value {
  font-size: 0.95rem;
  color: #ffffff;
  font-weight: 600;
}

.derby-flyer-box {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  border: 2px solid rgba(255, 255, 255, 0.15);
  cursor: pointer;
  transition: var(--transition);
}

.derby-flyer-box:hover {
  transform: scale(1.02);
  border-color: #38bdf8;
}

.derby-flyer-img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  max-height: 380px;
}

.derby-flyer-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: var(--transition);
  color: #ffffff;
  font-weight: 600;
  gap: 0.5rem;
}

.derby-flyer-box:hover .derby-flyer-overlay {
  opacity: 1;
}

/* ==========================================================================
   Rennanmeldung Tabs & Google Forms
   ========================================================================== */

.registration-section {
  background: var(--bg-subtle);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.tabs-wrapper {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.tabs-header {
  display: flex;
  background: #f8fafc;
  border-bottom: 1px solid var(--border-color);
  overflow-x: auto;
}

.tab-btn {
  flex: 1;
  min-width: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 1.15rem 1.5rem;
  background: transparent;
  border: none;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
  border-bottom: 3px solid transparent;
}

.tab-btn:hover {
  color: var(--primary);
  background: rgba(2, 106, 167, 0.04);
}

.tab-btn.active {
  color: var(--primary);
  background: var(--bg-card);
  border-bottom-color: var(--primary);
}

.tab-badge {
  font-size: 0.75rem;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
  background: #e2e8f0;
  color: #475569;
}

.tab-btn.active .tab-badge {
  background: var(--primary-light);
  color: var(--primary-dark);
}

.tab-pane {
  display: none;
  padding: 2rem;
}

.tab-pane.active {
  display: block;
}

.form-info-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: var(--primary-light);
  border: 1px solid #bae6fd;
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
}

.form-info-text {
  font-size: 0.95rem;
  color: var(--primary-dark);
}

.iframe-container {
  position: relative;
  width: 100%;
  min-height: 600px;
  background: #ffffff;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  overflow: hidden;
}

.form-iframe {
  width: 100%;
  height: 1000px;
  border: none;
  display: block;
}

.form-iframe.iframe-derby {
  height: 620px;
}

/* ==========================================================================
   Race Registration Placeholder
   ========================================================================== */

.registration-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3.5rem 2rem;
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
  border: 2px dashed #cbd5e1;
  border-radius: var(--radius-lg);
  margin-top: 0.5rem;
}

.placeholder-icon-wrap {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.placeholder-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.4rem;
}

.placeholder-meta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #f1f5f9;
  border: 1px solid var(--border-color);
  color: #0369a1;
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0.35rem 0.9rem;
  border-radius: var(--radius-full);
  margin-bottom: 1.25rem;
}

.placeholder-desc {
  max-width: 560px;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 1.75rem;
}

.placeholder-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
  margin-bottom: 1rem;
}

.placeholder-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

/* ==========================================================================
   Trainingsangebot Section
   ========================================================================== */

.training-highlight-box {
  background: linear-gradient(135deg, #026aa7 0%, #0369a1 100%);
  color: #ffffff;
  padding: 2rem;
  border-radius: var(--radius-md);
  margin-bottom: 2.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  box-shadow: var(--shadow-md);
}

.training-highlight-text h3 {
  color: #ffffff;
  font-size: 1.4rem;
  margin-bottom: 0.35rem;
}

.training-highlight-text p {
  color: #e0f2fe;
  font-size: 0.95rem;
  max-width: 650px;
}

.training-levels-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.level-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: var(--transition);
}

.level-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent);
}

.level-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-color);
}

.level-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--primary-dark);
}

.level-price {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--primary);
  background: var(--primary-light);
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-sm);
}

.level-detail {
  font-size: 0.88rem;
  margin-bottom: 0.5rem;
  color: var(--text-muted);
}

.level-detail strong {
  color: var(--text-main);
}

.training-flyer-section {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 2rem;
  text-align: center;
}

.flyer-preview-img {
  max-width: 100%;
  max-height: 450px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  cursor: pointer;
  margin-top: 1.5rem;
  transition: var(--transition);
}

.flyer-preview-img:hover {
  transform: scale(1.01);
  box-shadow: var(--shadow-lg);
}

/* ==========================================================================
   Media / Video Section
   ========================================================================== */

.video-section {
  background: #0f172a;
  color: #ffffff;
}

.video-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.video-content h2 {
  color: #ffffff;
  font-size: 2.2rem;
  margin-bottom: 1rem;
}

.video-content p {
  color: #cbd5e1;
  font-size: 1.05rem;
  margin-bottom: 1.5rem;
  line-height: 1.7;
}

.video-player-wrap {
  position: relative;
  max-width: 400px;
  margin: 0 auto;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
  border: 2px solid rgba(255, 255, 255, 0.15);
}

.video-player {
  width: 100%;
  height: auto;
  display: block;
}

/* ==========================================================================
   Community & Links
   ========================================================================== */

.community-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.community-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 2rem 1.75rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.community-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}

.community-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  font-size: 1.5rem;
}

.community-card h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.community-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

/* ==========================================================================
   Modal / Lightbox
   ========================================================================== */

.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(6px);
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.modal.active {
  display: flex;
  opacity: 1;
}

.modal-content {
  background: #ffffff;
  border-radius: var(--radius-md);
  max-width: 900px;
  max-height: 90vh;
  width: 100%;
  overflow-y: auto;
  position: relative;
  box-shadow: var(--shadow-xl);
  display: flex;
  flex-direction: column;
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(0, 0, 0, 0.6);
  color: #ffffff;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: var(--transition);
}

.modal-close:hover {
  background: rgba(0, 0, 0, 0.85);
  transform: scale(1.1);
}

.modal-img {
  width: 100%;
  height: auto;
  display: block;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  background: #0b1e33;
  color: #94a3b8;
  padding: 4rem 0 2rem;
  margin-top: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-brand h4 {
  color: #ffffff;
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

.footer-brand p {
  font-size: 0.9rem;
  line-height: 1.6;
  max-width: 380px;
}

.footer-col h5 {
  color: #ffffff;
  font-size: 1rem;
  margin-bottom: 1rem;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer-link {
  color: #94a3b8;
  font-size: 0.9rem;
  transition: var(--transition);
}

.footer-link:hover {
  color: #38bdf8;
  padding-left: 4px;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.85rem;
}

.back-to-top {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  border: none;
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  cursor: pointer;
  transition: var(--transition);
}

.back-to-top:hover {
  background: var(--primary);
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */

@media (max-width: 992px) {
  .hero-grid,
  .derby-grid,
  .video-grid,
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .hero-title {
    font-size: 2.5rem;
  }

  .derby-details-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #ffffff;
    flex-direction: column;
    padding: 1.5rem;
    box-shadow: var(--shadow-lg);
    border-bottom: 1px solid var(--border-color);
    gap: 0.75rem;
  }

  .nav-menu.open {
    display: flex;
  }

  .nav-toggle {
    display: block;
  }

  .hero {
    padding: 3rem 0;
  }

  .hero-title {
    font-size: 2.1rem;
  }

  .hero-actions {
    flex-direction: column;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .tabs-header {
    flex-direction: column;
  }

  .tab-btn {
    border-bottom: none;
    border-left: 3px solid transparent;
    justify-content: flex-start;
  }

  .tab-btn.active {
    border-left-color: var(--primary);
  }

  .tab-pane {
    padding: 1rem;
  }

  .form-iframe {
    height: 800px;
  }
}