/* ============================================================
   BK PARTIZAN — Biciklistički Klub Partizan
   Official Stylesheet
   Design: Dark theme, high contrast sporty aesthetic
   Fonts: Bebas Neue (headings), Inter (body), Oswald (subhead)
   Colors: Black #000, White #FFF, Red #DC2626, Gold #939C78
   ============================================================ */

/* ----- CSS Custom Properties ----- */
:root {
  /* Primary colors */
  --color-black: #000000;
  --color-white: #FFFFFF;
  --color-red: #DC2626;
  --color-gold: #939C78;

  /* Extended palette */
  --color-off-black: #1A1A1A;
  --color-off-white: #F5F5F5;
  --color-light-gray: #E5E5E5;
  --color-mid-gray: #A3A3A3;
  --color-red-dark: #991B1B;
  --color-red-light: #FCA5A5;
  --color-gray-50: #F8F9FA;
  --color-gray-200: #E5E7EB;
  --color-gray-500: #6B7280;
  --color-gray-800: #1F2937;

  /* Typography */
  --font-heading: 'Bebas Neue', 'Arial Narrow', Arial, sans-serif;
  --font-subhead: 'Oswald', 'Arial Narrow', Arial, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Courier New', monospace;
  --font-display: 'Play', sans-serif;

  /* Type scale */
  --text-h1: clamp(3rem, 8vw, 6rem);
  --text-h2: clamp(2rem, 4vw, 3.5rem);
  --text-h3: clamp(1.5rem, 3vw, 2.5rem);
  --text-h4: clamp(1.25rem, 2vw, 1.75rem);
  --text-h5: 1.25rem;
  --text-h6: 1rem;
  --text-body: 1rem;
  --text-body-large: 1.125rem;
  --text-small: 0.875rem;
  --text-xs: 0.75rem;

  /* Spacing (4px base) */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;

  /* Layout */
  --max-width: 1280px;
  --gutter: 24px;
  --sidebar-margin-mobile: 24px;
  --sidebar-margin-tablet: 48px;
  --sidebar-margin-desktop: 80px;
  --nav-height: 72px;

  /* Borders */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 400ms ease;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);
  --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.3);
  --shadow-card-hover: 0 8px 32px rgba(220, 38, 38, 0.2);
}

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

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

body {
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: 1.6;
  color: var(--color-white);
  background-color: var(--color-black);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* ----- Skip to Content (a11y) ----- */
.skip-to-content {
  position: absolute;
  top: -100%;
  left: 0;
  z-index: 9999;
  padding: 12px 24px;
  background: var(--color-red);
  color: var(--color-white);
  font-weight: 700;
  text-decoration: none;
  font-family: var(--font-body);
  font-size: 1rem;
  transition: top var(--transition-fast);
}

.skip-to-content:focus {
  top: 0;
  outline: 3px solid var(--color-white);
  outline-offset: 2px;
}

/* ----- Typography ----- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--color-white);
}

h1 { font-size: var(--text-h1); }
h2 { font-size: var(--text-h2); line-height: 1.0; }
h3 { font-size: var(--text-h3); line-height: 1.1; }
h4 { font-size: var(--text-h4); line-height: 1.2; }
h5 { font-size: var(--text-h5); font-family: var(--font-subhead); font-weight: 600; letter-spacing: 0.05em; }
h6 { font-size: var(--text-h6); font-family: var(--font-subhead); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }

p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

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

a:hover { color: var(--color-red-dark); }

.subtitle {
  font-family: var(--font-subhead);
  font-size: var(--text-h5);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-red);
  margin-bottom: var(--space-4);
}

.section-label {
  font-family: var(--font-subhead);
  font-size: var(--text-small);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--color-mid-gray);
  margin-bottom: var(--space-2);
}

.text-gradient-red {
  background: linear-gradient(135deg, var(--color-red), var(--color-red-dark));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Focus styles */
:focus-visible {
  outline: 2px solid var(--color-red);
  outline-offset: 2px;
}

/* Selection */
::selection {
  background: var(--color-red);
  color: var(--color-white);
}

/* ----- Container ----- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding-left: var(--sidebar-margin-mobile);
  padding-right: var(--sidebar-margin-mobile);
}

@media (min-width: 768px) {
  .container {
    padding-left: var(--sidebar-margin-tablet);
    padding-right: var(--sidebar-margin-tablet);
  }
}

@media (min-width: 1024px) {
  .container {
    padding-left: var(--sidebar-margin-desktop);
    padding-right: var(--sidebar-margin-desktop);
  }
}

/* ----- Section Styling ----- */
.section {
  padding-top: var(--space-16);
  padding-bottom: var(--space-16);
}

.section-dark { background: var(--color-black); }
.section-dark-alt { background: var(--color-off-black); }
.section-light { background: var(--color-white); color: var(--color-black); }
.section-light h1, .section-light h2, .section-light h3,
.section-light h4, .section-light h5, .section-light h6 { color: var(--color-black); }
.section-light .subtitle { color: var(--color-red); }
.section-red { background: var(--color-red); }

.section-header {
  text-align: center;
  margin-bottom: var(--space-12);
}

.section-header h2 {
  margin-bottom: var(--space-3);
}

.section-header p {
  max-width: 600px;
  margin: 0 auto;
  color: var(--color-mid-gray);
  font-size: var(--text-body-large);
}

.section-light .section-header p { color: var(--color-gray-500); }

/* ----- Navigation ----- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-height);
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  transition: background var(--transition-base);
}

.nav-scrolled {
  background: rgba(0, 0, 0, 0.98);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
}

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

.nav-logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
  color: var(--color-white);
}

.nav-logo img {
  height: 48px;
  width: auto;
  filter: drop-shadow(0 0 4px rgba(255,255,255,0.15));
}

.nav-logo-text {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  letter-spacing: 0.05em;
  line-height: 1;
}

.nav-logo-text span {
  color: var(--color-red);
}

.nav-links {
  display: none;
  align-items: center;
  gap: var(--space-1);
  list-style: none;
}

.nav-links a {
  padding: var(--space-2) var(--space-3);
  font-family: var(--font-subhead);
  font-size: var(--text-small);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-mid-gray);
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: color var(--transition-fast), background var(--transition-fast);
  position: relative;
}

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

.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 2px;
  background: var(--color-red);
  border-radius: 1px;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.lang-switcher {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.lang-switcher a {
  font-family: var(--font-subhead);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-mid-gray);
  text-decoration: none;
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-sm);
  transition: color var(--transition-fast), background var(--transition-fast);
}

.lang-switcher a:hover,
.lang-switcher a.active {
  color: var(--color-white);
  background: rgba(255, 255, 255, 0.1);
}

.lang-switcher a.active {
  color: var(--color-red);
}

.lang-divider {
  width: 1px;
  height: 16px;
  background: rgba(255, 255, 255, 0.2);
}

/* Hamburger */
.hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  gap: 5px;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-white);
  border-radius: 2px;
  transition: transform var(--transition-base), opacity var(--transition-base);
}

.hamburger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile Menu */
.mobile-menu {
  display: none;
  position: fixed;
  top: var(--nav-height);
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.98);
  backdrop-filter: blur(20px);
  z-index: 999;
  padding: var(--space-8) var(--space-6);
  flex-direction: column;
  gap: var(--space-2);
  overflow-y: auto;
}

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

.mobile-menu a {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  text-transform: uppercase;
  color: var(--color-white);
  text-decoration: none;
  padding: var(--space-3) 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  transition: color var(--transition-fast);
}

.mobile-menu a:hover { color: var(--color-red); }

@media (min-width: 1024px) {
  .nav-links { display: flex; }
  .hamburger { display: none; }
  .mobile-menu { display: none !important; }
}

/* ----- Hero Section ----- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--color-black);
}

/* ===== Hero styles are defined in HERO section below ===== */


/* Hero page (inner pages) */
.hero-page {
  min-height: 40vh;
  padding: var(--nav-height) 0 var(--space-12);
  display: flex;
  align-items: flex-end;
}

.hero-page .hero-title {
  font-size: clamp(2.5rem, 6vw, 5rem);
}

/* ----- Buttons ----- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 14px 32px;
  font-family: var(--font-body);
  font-size: var(--text-body);
  font-weight: 700;
  line-height: 1;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
  text-align: center;
}

.btn:focus-visible {
  outline: 3px solid var(--color-white);
  outline-offset: 2px;
}

.btn-primary {
  background: var(--color-red);
  color: var(--color-white);
}

.btn-primary:hover {
  background: var(--color-red-dark);
  color: var(--color-white);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.4);
}

.btn-secondary {
  background: transparent;
  color: var(--color-white);
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.btn-secondary:hover {
  background: var(--color-white);
  color: var(--color-black);
  border-color: var(--color-white);
  transform: translateY(-1px);
}

.btn-dark {
  background: var(--color-white);
  color: var(--color-black);
}

.btn-dark:hover {
  background: var(--color-light-gray);
  color: var(--color-black);
  transform: translateY(-1px);
}

.btn-sm {
  padding: 8px 20px;
  font-size: var(--text-small);
  font-weight: 600;
}

.btn-lg {
  padding: 18px 40px;
  font-size: var(--text-body-large);
}

.btn-icon {
  font-size: 1.2em;
}

/* ----- Cards ----- */
.card {
  background: var(--color-off-black);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: all var(--transition-base);
}

.card:hover {
  border-color: rgba(220, 38, 38, 0.3);
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-4px);
}

.card-image {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
  display: block;
}

.card-image-portrait {
  aspect-ratio: 3/4;
}

.card-body {
  padding: var(--space-6);
}

.card-tag {
  display: inline-block;
  padding: 4px 12px;
  background: var(--color-red);
  color: var(--color-white);
  font-family: var(--font-subhead);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-3);
}

.card-title {
  font-family: var(--font-heading);
  font-size: var(--text-h4);
  line-height: 1.2;
  margin-bottom: var(--space-2);
  text-transform: uppercase;
  color: var(--color-white);
}

.card-title a {
  color: var(--color-white);
}

.card-title a:hover {
  color: var(--color-red);
}

.card-text {
  color: var(--color-mid-gray);
  font-size: var(--text-small);
  line-height: 1.6;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--text-xs);
  color: var(--color-gray-500);
  margin-top: var(--space-4);
  font-family: var(--font-body);
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-4);
  font-weight: 600;
  font-size: var(--text-small);
  color: var(--color-red);
}

.card-link:hover {
  gap: var(--space-3);
}

/* Card light mode (on white backgrounds) */
.section-light .card {
  background: var(--color-white);
  border-color: var(--color-gray-200);
}

.section-light .card-title { color: var(--color-black); }
.section-light .card-title a { color: var(--color-black); }
.section-light .card-title a:hover { color: var(--color-red); }
.section-light .card-text { color: var(--color-gray-500); }

/* ----- Grids ----- */
.grid-1 {
  display: grid;
  gap: var(--space-6);
  grid-template-columns: 1fr;
}

.grid-2 {
  display: grid;
  gap: var(--space-6);
  grid-template-columns: 1fr;
}

.grid-3 {
  display: grid;
  gap: var(--space-6);
  grid-template-columns: 1fr;
}

.grid-4 {
  display: grid;
  gap: var(--space-6);
  grid-template-columns: 1fr;
}

.grid-auto {
  display: grid;
  gap: var(--space-6);
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

@media (min-width: 480px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 768px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

/* ----- Counter Strip ----- */
.counter-strip {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-6);
  padding: var(--space-12) 0;
}

.counter-item {
  text-align: center;
  padding: var(--space-6);
}

.counter-number {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 6vw, 5rem);
  line-height: 1;
  color: var(--color-white);
}

.counter-number.red { color: var(--color-red); }
.counter-number.gold { color: var(--color-gold); }

.counter-label {
  font-family: var(--font-subhead);
  font-size: var(--text-small);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-mid-gray);
  margin-top: var(--space-2);
}

@media (min-width: 768px) {
  .counter-strip { grid-template-columns: repeat(4, 1fr); }
}

/* ----- Partner Grid ----- */
.partner-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-6);
  align-items: center;
}

.partner-item {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-8);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-lg);
  min-height: 100px;
  transition: all var(--transition-base);
}

.partner-item:hover {
  border-color: rgba(220, 38, 38, 0.3);
  background: rgba(220, 38, 38, 0.05);
}

.partner-name {
  font-family: var(--font-heading);
  font-size: var(--text-h4);
  color: var(--color-mid-gray);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

@media (min-width: 768px) {
  .partner-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 1024px) {
  .partner-grid { grid-template-columns: repeat(4, 1fr); }
}

/* ----- Timeline ----- */
.timeline {
  position: relative;
  padding-left: var(--space-8);
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--color-red), transparent);
}

.timeline-item {
  position: relative;
  padding-bottom: var(--space-10);
  padding-left: var(--space-6);
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: calc(-1 * var(--space-8) + 4px);
  top: 4px;
  width: 12px;
  height: 12px;
  background: var(--color-red);
  border-radius: 50%;
  border: 3px solid var(--color-black);
}

.timeline-year {
  font-family: var(--font-heading);
  font-size: var(--text-h3);
  color: var(--color-red);
  line-height: 1;
  margin-bottom: var(--space-2);
}

.timeline-text {
  color: var(--color-mid-gray);
}

/* ----- Racer Cards ----- */
.rider-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--color-off-black);
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: all var(--transition-base);
}

.rider-card:hover {
  border-color: rgba(220, 38, 38, 0.4);
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
}

.rider-card-image {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  display: block;
}

.rider-card-body {
  padding: var(--space-5) var(--space-6) var(--space-6);
}

.rider-card-name {
  font-family: var(--font-heading);
  font-size: var(--text-h4);
  text-transform: uppercase;
  color: var(--color-white);
  margin-bottom: var(--space-1);
}

.rider-card-role {
  font-family: var(--font-subhead);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-red);
  margin-bottom: var(--space-3);
}

.rider-card-stats {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
  margin-bottom: var(--space-3);
}

.rider-stat {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-mid-gray);
}

.rider-stat-icon {
  width: 14px;
  height: 14px;
}

.rider-card-text {
  color: var(--color-mid-gray);
  font-size: var(--text-small);
  line-height: 1.6;
}

/* ----- Table Styles ----- */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-body);
}

thead {
  background: var(--color-off-black);
}

th {
  padding: var(--space-4) var(--space-5);
  font-family: var(--font-subhead);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-mid-gray);
  text-align: left;
  border-bottom: 2px solid rgba(255, 255, 255, 0.06);
}

td {
  padding: var(--space-4) var(--space-5);
  font-size: var(--text-small);
  color: var(--color-white);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.status-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: var(--radius-sm);
  font-family: var(--font-subhead);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.status-upcoming { background: rgba(220, 38, 38, 0.15); color: var(--color-red); }
.status-completed { background: rgba(147, 156, 120, 0.15); color: var(--color-gold); }
.status-live { background: rgba(220, 38, 38, 0.25); color: var(--color-red); animation: pulse-bg 2s ease-in-out infinite; }

@keyframes pulse-bg {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

/* ----- Forms ----- */
.form-group {
  margin-bottom: var(--space-6);
}

.form-label {
  display: block;
  font-family: var(--font-body);
  font-size: var(--text-small);
  font-weight: 600;
  color: var(--color-white);
  margin-bottom: var(--space-2);
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: 12px 16px;
  font-family: var(--font-body);
  font-size: var(--text-body);
  color: var(--color-white);
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  outline: none;
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--color-gray-500);
}

.form-input:hover,
.form-textarea:hover {
  border-color: rgba(255, 255, 255, 0.2);
}

.form-input:focus,
.form-textarea:focus {
  border-color: var(--color-red);
  background: rgba(220, 38, 38, 0.05);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.form-textarea {
  min-height: 140px;
  resize: vertical;
}

.form-error {
  font-size: var(--text-xs);
  color: var(--color-red);
  margin-top: var(--space-1);
}

.form-success {
  text-align: center;
  padding: var(--space-10);
  color: var(--color-gold);
}

.form-success-icon {
  font-size: 3rem;
  margin-bottom: var(--space-4);
}

/* Light form (on white sections) */
.section-light .form-label { color: var(--color-black); }
.section-light .form-input,
.section-light .form-textarea {
  color: var(--color-black);
  background: var(--color-white);
  border-color: var(--color-gray-200);
}
.section-light .form-input:focus,
.section-light .form-textarea:focus {
  border-color: var(--color-red);
}

/* ----- Gallery ----- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-4);
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-md);
  cursor: pointer;
}

.gallery-item img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  display: block;
  transition: transform var(--transition-slow);
}

.gallery-item:hover img {
  transform: scale(1.05);
}

.gallery-item:nth-child(3n+1) {
  grid-column: span 2;
}

.gallery-item:nth-child(3n+1) img {
  aspect-ratio: 16/7;
}

@media (min-width: 768px) {
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ----- Footer ----- */
.footer {
  background: var(--color-off-black);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding: var(--space-16) 0 var(--space-8);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-10);
  margin-bottom: var(--space-12);
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.footer-logo {
  font-family: var(--font-heading);
  font-size: 2rem;
  color: var(--color-white);
  letter-spacing: 0.03em;
}

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

.footer-desc {
  color: var(--color-mid-gray);
  font-size: var(--text-small);
  max-width: 320px;
}

.footer-heading {
  font-family: var(--font-subhead);
  font-size: var(--text-small);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-white);
  margin-bottom: var(--space-4);
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.footer-links a {
  color: var(--color-mid-gray);
  font-size: var(--text-small);
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: var(--color-white);
}

.footer-social {
  display: flex;
  gap: var(--space-3);
  margin-top: var(--space-4);
}

.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  color: var(--color-mid-gray);
  font-size: 1.25rem;
  transition: all var(--transition-fast);
}

.footer-social a:hover {
  background: var(--color-red);
  color: var(--color-white);
}

.footer-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
  padding-top: var(--space-8);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  text-align: center;
}

.footer-bottom-text {
  font-size: var(--text-xs);
  color: var(--color-gray-500);
}

.footer-bottom-links {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
  justify-content: center;
}

.footer-bottom-links a {
  font-size: var(--text-xs);
  color: var(--color-mid-gray);
}

.footer-bottom-links a:hover {
  color: var(--color-white);
}

@media (min-width: 768px) {
  .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; }
  .footer-bottom { flex-direction: row; justify-content: space-between; }
}

/* ----- Instagram Feed Area ----- */
.insta-placeholder {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
}

.insta-item {
  aspect-ratio: 1;
  background: var(--color-off-black);
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
}

.insta-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.insta-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(0,0,0,0.8));
  opacity: 0;
  transition: opacity var(--transition-base);
  display: flex;
  align-items: flex-end;
  padding: var(--space-4);
}

.insta-item:hover .insta-overlay {
  opacity: 1;
}

.insta-handle {
  font-family: var(--font-subhead);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-white);
}

@media (min-width: 768px) {
  .insta-placeholder { grid-template-columns: repeat(4, 1fr); }
}

/* ----- Contact Section ----- */
.contact-info-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
  margin-bottom: var(--space-10);
}

.contact-info-item {
  display: flex;
  gap: var(--space-4);
  align-items: flex-start;
}

.contact-info-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(220, 38, 38, 0.1);
  border-radius: var(--radius-md);
  font-size: 1.25rem;
  color: var(--color-red);
  flex-shrink: 0;
}

.contact-info-label {
  font-family: var(--font-subhead);
  font-size: var(--text-small);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-white);
  margin-bottom: var(--space-1);
}

.contact-info-value {
  color: var(--color-mid-gray);
  font-size: var(--text-small);
}

.contact-info-value a {
  color: var(--color-mid-gray);
}

.contact-info-value a:hover {
  color: var(--color-red);
}

/* Map placeholder */
.map-wrap {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.06);
  height: 400px;
  background: var(--color-off-black);
}

.map-wrap iframe {
  width: 100%;
  height: 100%;
  border: none;
}

@media (min-width: 768px) {
  .contact-info-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .contact-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-12);
  }
}

/* ----- Google Maps Container ----- */
.map-section {
  padding: var(--space-12) 0;
  background: var(--color-black);
}
.map-container-dark {
  max-width: 900px;
  margin: 0 auto;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow-lg);
}
.map-container-dark iframe {
  display: block;
  width: 100%;
  height: 350px;
  border: none;
}
@media (min-width: 768px) {
  .map-container-dark iframe {
    height: 400px;
  }
}

/* ----- 404 Page ----- */
.page-404 {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-8);
  background: var(--color-black);
}

.page-404-content {
  max-width: 600px;
}

.page-404-code {
  font-family: var(--font-heading);
  font-size: clamp(8rem, 20vw, 15rem);
  line-height: 0.8;
  color: var(--color-red);
  margin-bottom: var(--space-4);
}

.page-404-title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4vw, 3rem);
  text-transform: uppercase;
  color: var(--color-white);
  margin-bottom: var(--space-4);
}

.page-404-text {
  color: var(--color-mid-gray);
  font-size: var(--text-body-large);
  margin-bottom: var(--space-8);
}

/* ----- Partner Tiers ----- */
.tier-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-8);
}

.tier-card {
  text-align: center;
  padding: var(--space-10) var(--space-8);
  background: var(--color-off-black);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-lg);
  transition: all var(--transition-base);
}

.tier-card:hover {
  border-color: rgba(220, 38, 38, 0.3);
  transform: translateY(-4px);
}

.tier-card.featured {
  border-color: var(--color-gold);
  position: relative;
}

.tier-card.featured::before {
  content: '★ Preporučeno';
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-gold);
  color: var(--color-black);
  padding: 4px 16px;
  border-radius: var(--radius-xl);
  font-family: var(--font-subhead);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.tier-name {
  font-family: var(--font-heading);
  font-size: var(--text-h3);
  color: var(--color-white);
  margin-bottom: var(--space-2);
}

.tier-price {
  font-family: var(--font-heading);
  font-size: var(--text-h4);
  color: var(--color-gold);
  margin-bottom: var(--space-4);
}

.tier-features {
  list-style: none;
  margin-bottom: var(--space-6);
}

.tier-features li {
  padding: var(--space-2) 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: var(--color-mid-gray);
  font-size: var(--text-small);
}

@media (min-width: 768px) {
  .tier-grid { grid-template-columns: repeat(3, 1fr); }
}

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

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes counterAnim {
  from { opacity: 0; transform: scale(0.5); }
  to { opacity: 1; transform: scale(1); }
}

.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

.animate-fade-in {
  animation: fadeIn 0.8s ease forwards;
}

.animate-slide-up {
  animation: fadeInUp 0.6s ease forwards;
}

.stagger-1 { animation-delay: 0.1s; }
.stagger-2 { animation-delay: 0.2s; }
.stagger-3 { animation-delay: 0.3s; }
.stagger-4 { animation-delay: 0.4s; }

/* ----- Breadcrumbs ----- */
.breadcrumbs {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
  margin-bottom: var(--space-6);
  font-size: var(--text-xs);
}

.breadcrumbs a {
  color: var(--color-mid-gray);
}

.breadcrumbs a:hover {
  color: var(--color-white);
}

.breadcrumbs .separator {
  color: var(--color-mid-gray);
  font-size: var(--text-xs);
}

.breadcrumbs .current {
  color: var(--color-red);
  font-weight: 600;
}

/* ----- Miscellaneous Utilities ----- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.text-center { text-align: center; }
.text-red { color: var(--color-red); }
.text-gold { color: var(--color-gold); }
.text-muted { color: var(--color-mid-gray); }

.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }
.mt-10 { margin-top: var(--space-10); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }

.gap-4 { gap: var(--space-4); }

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ----- Loading Skeleton ----- */
.skeleton {
  background: linear-gradient(90deg, rgba(255,255,255,0.04) 25%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.04) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-md);
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ----- Blog Article Full ----- */
.article-header {
  margin-bottom: var(--space-8);
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  font-family: var(--font-body);
  font-size: var(--text-small);
  color: var(--color-mid-gray);
  margin-bottom: var(--space-4);
}

.article-meta span {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.article-featured-image {
  width: 100%;
  max-height: 500px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-8);
}

.article-body {
  max-width: 720px;
  margin: 0 auto;
  font-size: var(--text-body);
  line-height: 1.8;
}

.article-body h2 {
  font-family: var(--font-heading);
  font-size: var(--text-h3);
  margin-top: var(--space-10);
  margin-bottom: var(--space-4);
  text-transform: uppercase;
}

.article-body h3 {
  font-family: var(--font-heading);
  font-size: var(--text-h4);
  margin-top: var(--space-8);
  margin-bottom: var(--space-3);
}

.article-body p {
  margin-bottom: 1.25rem;
}

.article-body ul {
  margin-bottom: 1.25rem;
  padding-left: var(--space-6);
}

.article-body li {
  margin-bottom: var(--space-2);
}

.article-body blockquote {
  border-left: 3px solid var(--color-red);
  padding: var(--space-4) var(--space-6);
  margin: var(--space-6) 0;
  background: rgba(220, 38, 38, 0.05);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-style: italic;
  color: var(--color-mid-gray);
}

/* ---- About Intro ----- */
.about-intro {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-10);
  align-items: center;
}

.about-intro-image {
  width: 100%;
  border-radius: var(--radius-lg);
  object-fit: cover;
}

@media (min-width: 768px) {
  .about-intro { grid-template-columns: 1fr 1fr; }
}

/* ----- Responsive helpers ----- */
@media (max-width: 479px) {
  .hero-title { font-size: clamp(2.5rem, 12vw, 3.5rem); }
  .hide-mobile { display: none !important; }
}

@media (min-width: 480px) {
  .hide-tablet { display: none !important; }
}

@media (min-width: 1024px) {
  .hide-desktop { display: none !important; }
}

/* ----- Print ----- */
@media print {
  .nav, .mobile-menu, .footer-social, .btn, .hamburger { display: none !important; }
  body { background: white; color: black; }
  a { color: black; }
}

/* Page-specific: Vercel JSON compatibility */
.page-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.page-wrapper main {
  flex: 1;
}

/* ==============================
   HERO — DARK FULLSCREEN
   ============================== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: #050505;
  overflow: hidden;
}

#hero-particles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.hero-bg-overlay {
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(ellipse 80% 60% at 20% 50%, rgba(220, 38, 38, 0.08) 0%, transparent 70%),
    radial-gradient(ellipse 60% 80% at 80% 20%, rgba(255, 255, 255, 0.03) 0%, transparent 70%),
    linear-gradient(180deg, #050505 0%, #0a0a0a 50%, #050505 100%);
  z-index: 1;
}

/* Speed lines */
.hero-speed-lines {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  overflow: hidden;
}

.hero-speed-lines div {
  position: absolute;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
  animation: speed-line-scroll 2.5s linear infinite;
}

.speed-line-1 { width: 60%; top: 20%; right: -60%; animation-duration: 2.5s; }
.speed-line-2 { width: 40%; top: 35%; right: -40%; animation-duration: 3s; animation-delay: 0.5s; }
.speed-line-3 { width: 50%; top: 55%; right: -50%; animation-duration: 2.8s; animation-delay: 1s; }
.speed-line-4 { width: 35%; top: 70%; right: -35%; animation-duration: 3.2s; animation-delay: 0.3s; }
.speed-line-5 { width: 45%; top: 85%; right: -45%; animation-duration: 2.6s; animation-delay: 0.8s; }

@keyframes speed-line-scroll {
  0% { transform: translateX(0); opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { transform: translateX(-200vw); opacity: 0; }
}

.hero-content {
  position: relative;
  z-index: 3;
  width: 100%;
  padding-top: 80px;
}

.hero .container {
  max-width: 900px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 100px;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.6);
  margin-bottom: var(--space-5);
}

.hero-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--clr-red);
  animation: badge-pulse 2s ease-in-out infinite;
}

@keyframes badge-pulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

.hero-title {
  margin-bottom: var(--space-4);
}

.hero-title-sub {
  display: block;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: clamp(1rem, 2vw, 1.3rem);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  margin-bottom: var(--space-2);
}

.hero-title-main {
  display: block;
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(4rem, 12vw, 9rem);
  line-height: 0.9;
  letter-spacing: 0.02em;
  color: #fff;
  text-shadow: 0 0 80px rgba(220,38,38,0.2);
}

.text-red { color: var(--clr-red); }

.hero-subtitle {
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  color: rgba(255,255,255,0.5);
  margin-bottom: var(--space-6);
  font-weight: 400;
}

.hero-actions {
  display: flex;
  gap: var(--space-3);
  margin-bottom: var(--space-8);
  flex-wrap: wrap;
}

.btn-outline-light {
  background: transparent;
  border: 2px solid rgba(255,255,255,0.2);
  color: #fff;
}
.btn-outline-light:hover {
  border-color: #fff;
  background: rgba(255,255,255,0.05);
}

.hero-stats {
  display: flex;
  gap: var(--space-6);
  flex-wrap: wrap;
}

.hero-stat-number {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  line-height: 1;
  letter-spacing: 0.02em;
}

.stat-plus {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(1.5rem, 3vw, 2.5rem);
}

.hero-stat-label {
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  margin-top: 4px;
}

@media (max-width: 768px) {
  .hero { min-height: 90vh; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; text-align: center; }
  .hero-stats { gap: var(--space-4); }
}

/* ==============================
   HERO RIDER PHOTO
   ============================== */
.hero-rider {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 65%;
  height: 95%;
  z-index: 2;
  pointer-events: none;
  overflow: hidden;
}

.hero-rider-image {
  position: absolute;
  inset: 0;
  background-size: contain;
  background-position: right bottom;
  background-repeat: no-repeat;
}

.hero-rider-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, #050505 0%, transparent 30%);
}

@media (max-width: 1024px) {
  .hero-rider { width: 55%; opacity: 0.65; }
}

@media (max-width: 768px) {
  .hero-rider { opacity: 0.3; width: 70%; }
}

/* ==============================
   SPONSOR LOGOS — Grayscale -> Color
   ============================== */
.sponsor-strip {
  padding: var(--space-6) 0;
  background: #050505;
  border-top: 1px solid rgba(255,255,255,0.05);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.sponsor-strip-inner {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--space-6);
  flex-wrap: wrap;
}

.sponsor-item {
  padding: var(--space-2) var(--space-4);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  transition: border-color 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sponsor-item:hover {
  border-color: rgba(220,38,38,0.4);
}

.sponsor-logo {
  height: 36px;
  width: auto;
  filter: grayscale(100%) brightness(1.5);
  opacity: 0.6;
  transition: all 0.4s ease;
}

.sponsor-item:hover .sponsor-logo {
  filter: grayscale(0%) brightness(1);
  opacity: 1;
}

@media (max-width: 640px) {
  .sponsor-logo { height: 28px; }
}

/* ==============================
   GALLERY PAGE
   ============================== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--space-4);
}

.gallery-item {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 3/4;
}

.gallery-item:nth-child(4n+1) { aspect-ratio: 4/3; grid-column: span 1; }
.gallery-item:nth-child(4n+4) { aspect-ratio: 16/9; grid-column: span 2; }

.gallery-link {
  display: block;
  width: 100%;
  height: 100%;
  position: relative;
}

.gallery-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.gallery-link:hover .gallery-image {
  transform: scale(1.08);
}

.gallery-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: var(--space-4);
  background: linear-gradient(transparent, rgba(0,0,0,0.85));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.gallery-link:hover .gallery-overlay {
  opacity: 1;
}

.gallery-title {
  color: white;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.5rem;
  letter-spacing: 0.05em;
}

@media (max-width: 768px) {
  .gallery-grid {
    grid-template-columns: 1fr;
  }
  .gallery-item,
  .gallery-item:nth-child(4n+1),
  .gallery-item:nth-child(4n+4) {
    aspect-ratio: 4/3;
    grid-column: span 1;
  }
}

/* ==============================
   PARTNERS PAGE
   ============================== */
.partner-hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-6);
  max-width: 800px;
  margin: 0 auto;
}

.partner-hero-card {
  text-align: center;
}

.partner-logo-wrapper {
  background: white;
  border-radius: 16px;
  padding: var(--space-8);
  margin-bottom: var(--space-3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  min-height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.partner-logo-wrapper:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(220, 38, 38, 0.15);
}

.partner-logo-inner {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.partner-logo-text {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2.8rem;
  color: #000;
  letter-spacing: 0.08em;
}

.partner-hero-label {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1rem;
  color: var(--clr-red);
  letter-spacing: 0.15em;
  font-weight: 600;
}

/* Partner Scroller */
.partner-scroll-container {
  overflow: hidden;
  width: 100%;
  position: relative;
}

.partner-scroll-track {
  display: flex;
  gap: 0;
  animation: partner-scroll 25s linear infinite;
  width: fit-content;
}

.partner-scroll-group {
  display: flex;
  gap: var(--space-4);
  padding: var(--space-2) 0;
  flex-shrink: 0;
}

.partner-scroll-item {
  flex-shrink: 0;
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: 12px;
  padding: var(--space-4) var(--space-6);
  min-width: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.3s ease, transform 0.3s ease;
}

.partner-scroll-item:hover {
  border-color: var(--clr-red);
  transform: scale(1.05);
}

.partner-scroll-text {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.3rem;
  letter-spacing: 0.08em;
  color: var(--clr-text-muted);
  white-space: nowrap;
}

@keyframes partner-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* Partner logos - grayscale to color */
.partner-logo-img {
  max-width: 100%;
  height: 48px;
  filter: grayscale(100%) brightness(1.8);
  opacity: 0.6;
  transition: all 0.4s ease;
}

.partner-single-logo:hover .partner-logo-img,
.partner-card:hover .partner-logo-img,
.partner-scroll-item:hover .partner-logo-img {
  filter: grayscale(0%) brightness(1);
  opacity: 1;
}

/* Partner Scroll items with logos */
.partner-scroll-item .partner-logo-img {
  height: 32px;
}

.partner-card-logo .partner-logo-img {
  height: 38px;
}

.partner-single-logo .partner-logo-img {
  height: 60px;
}
.partner-single {
  display: flex;
  justify-content: center;
  max-width: 400px;
  margin: 0 auto;
}

.partner-single-card {
  text-align: center;
  width: 100%;
}

.partner-single-logo {
  background: #fff;
  border-radius: 16px;
  padding: var(--space-8);
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.partner-single-logo:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(220,38,38,0.2);
}

.partner-logo-display {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 3.5rem;
  color: #000;
  letter-spacing: 0.08em;
}

.partner-single-label {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1rem;
  color: var(--clr-red);
  letter-spacing: 0.15em;
  margin-top: var(--space-3);
}

/* Partner Grid 3 */
.partner-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
  max-width: 800px;
  margin: 0 auto;
}

.partner-card {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.3s ease, transform 0.3s ease;
}

.partner-card:hover {
  border-color: rgba(220,38,38,0.3);
  transform: translateY(-2px);
}

.partner-card-logo {
  padding: var(--space-6);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 120px;
}

.partner-card-text {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.6rem;
  letter-spacing: 0.08em;
  color: var(--clr-text-muted);
  transition: color 0.3s;
}

.partner-card:hover .partner-card-text {
  color: #fff;
}

@media (max-width: 768px) {
  .partner-grid-3 { grid-template-columns: repeat(2, 1fr); }
  .partner-logo-display { font-size: 2.5rem; }
  .partner-single-logo { min-height: 150px; padding: var(--space-6); }
}

@media (max-width: 768px) {
  .partner-hero-grid { grid-template-columns: 1fr; max-width: 400px; }
  .partner-scroll-item { padding: var(--space-3) var(--space-4); min-width: 100px; }
  .partner-scroll-text { font-size: 1rem; }
}

/* ==============================
   CONTACT PAGE
   ============================== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: var(--space-8);
  align-items: start;
}

.contact-info h2 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2.2rem;
  margin-bottom: var(--space-5);
}

.contact-item {
  display: flex;
  gap: var(--space-3);
  margin-bottom: var(--space-5);
  align-items: flex-start;
}

.contact-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  background: rgba(220, 38, 38, 0.1);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.contact-item strong {
  display: block;
  margin-bottom: 2px;
  font-weight: 600;
}

.contact-item p { margin: 0; color: var(--clr-text-muted); }

.contact-item a { color: var(--clr-text-muted); transition: color 0.2s; }
.contact-item a:hover { color: var(--clr-red); }

.contact-social { margin-top: var(--space-6); }
.contact-social h3 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.4rem;
  margin-bottom: var(--space-3);
}

.contact-form-wrapper h2 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2.2rem;
  margin-bottom: var(--space-5);
}

.contact-form .form-group {
  margin-bottom: var(--space-4);
}

.contact-form label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: var(--space-1);
}

.contact-form input,
.contact-form textarea,
.contact-form select {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: 10px;
  color: var(--clr-text);
  font-family: inherit;
  font-size: 1rem;
  transition: border-color 0.2s;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--clr-red);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15);
}

.contact-form textarea { resize: vertical; }

@media (max-width: 768px) {
  .contact-grid { grid-template-columns: 1fr; }
}

/* Contact Map */
.contact-map { margin-top: var(--space-6); }
.contact-map h3 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.4rem;
  margin-bottom: var(--space-3);
}
.map-container {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

/* ==============================
   RACE ARCHIVE (Calendar)
   ============================== */
.race-archive-card {
  margin-bottom: var(--space-4);
  border: 1px solid var(--clr-border);
  border-radius: 16px;
  overflow: hidden;
  transition: border-color 0.3s ease;
}

.race-archive-card:hover { border-color: rgba(220,38,38,0.3); }

.race-archive-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-4) var(--space-5);
  cursor: pointer;
  background: var(--clr-surface);
  transition: background 0.2s;
}

.race-archive-header:hover { background: var(--clr-surface-hover); }

.race-archive-header h3 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.4rem;
  margin: 0;
}

.race-archive-date {
  font-size: 0.85rem;
  color: var(--clr-text-muted);
  display: block;
  margin-top: 2px;
}

.race-archive-toggle {
  font-size: 0.9rem;
  transition: transform 0.3s ease;
  color: var(--clr-text-muted);
}

.race-archive-open .race-archive-toggle {
  transform: rotate(180deg);
}

.race-archive-body {
  max-height: 0;
  overflow: hidden;
  padding: 0 var(--space-5);
  transition: max-height 0.4s ease, padding 0.4s ease;
}

.race-archive-open .race-archive-body {
  max-height: 2000px;
  padding: var(--space-4) var(--space-5) var(--space-5);
}

.race-archive-meta {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
  padding: var(--space-3);
  background: rgba(220,38,38,0.05);
  border-radius: 10px;
}

.race-archive-stat {
  font-size: 0.9rem;
  color: var(--clr-text-muted);
}

.race-table-compact {
  font-size: 0.875rem;
}

.race-table-compact th,
.race-table-compact td {
  padding: var(--space-2) var(--space-3);
}

.status-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.status-completed {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
}

.status-upcoming {
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
}

@media (max-width: 768px) {
  .race-table thead { display: none; }
  .race-table tr {
    display: block;
    margin-bottom: var(--space-3);
    border: 1px solid var(--clr-border);
    border-radius: 10px;
    padding: var(--space-3);
  }
  .race-table td {
    display: block;
    padding: 4px 0 !important;
    border: none !important;
  }
  .race-table td::before {
    content: attr(data-label);
    font-weight: 700;
    font-size: 0.75rem;
    display: block;
    color: var(--clr-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
  }
  .race-archive-gallery img { width: 100% !important; }
}

/* ==============================
   PAGE HEADERS (internal pages)
   ============================== */
.page-header {
  padding: 120px 0 60px;
  background: #050505;
  text-align: left;
}

.page-title {
  font-family: var(--font-heading);
  font-size: var(--text-h1);
  color: var(--color-white);
  line-height: 1;
  letter-spacing: 0.02em;
  margin: 0;
}

.page-subtitle {
  font-size: var(--text-body-large);
  color: rgba(255,255,255,0.5);
  margin-top: var(--space-4);
  max-width: 640px;
  line-height: 1.6;
}

/* ==============================
   ABOUT SECTION WITH SLIDER
   ============================== */
.about-with-slider {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-10);
  align-items: center;
}

.about-text {
  max-width: 540px;
}

.about-slider .ba-slider {
  max-width: 100%;
  margin: 0;
}

.about-slider .ba-slider-wrapper {
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-lg);
}

.about-slider .ba-labels {
  margin-top: var(--space-2);
}

@media (max-width: 1024px) {
  .about-with-slider {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }
  .about-text {
    max-width: 100%;
  }
}

/* ==============================
   BEFORE/AFTER SLIDER
   ============================== */
.ba-slider {
  max-width: 900px;
  margin: 0 auto;
  user-select: none;
  -webkit-user-select: none;
}

.ba-slider-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: #111;
  cursor: ew-resize;
}

.ba-slider-modern,
.ba-slider-archive {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* Modern (top layer) — shows right portion */
.ba-slider-modern {
  z-index: 2;
  clip-path: inset(0 0 0 50%);
  -webkit-clip-path: inset(0 0 0 50%);
}

/* Archive (bottom layer) — shows left portion */
.ba-slider-archive {
  z-index: 1;
}

.ba-slider-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  z-index: 10;
  transform: translateX(-50%);
  cursor: ew-resize;
  outline: none;
}

.ba-slider-handle:focus-visible {
  outline: 2px solid var(--color-red);
  outline-offset: 4px;
  border-radius: 4px;
}

.ba-slider-line {
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.6);
  width: 2px;
  left: 0;
}

.ba-slider-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(0,0,0,0.6);
  border: 2px solid rgba(255,255,255,0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  transition: transform 0.2s ease, background 0.2s ease;
}

.ba-slider-handle:hover .ba-slider-icon,
.ba-slider-handle:active .ba-slider-icon {
  transform: translate(-50%, -50%) scale(1.1);
  background: rgba(220,38,38,0.7);
  border-color: var(--color-red);
}

.ba-labels {
  display: flex;
  justify-content: space-between;
  margin-top: var(--space-3);
  padding: 0 var(--space-2);
}

.ba-label {
  font-size: var(--text-small);
  color: rgba(255,255,255,0.4);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.ba-label-right {
  text-align: right;
}

@media (max-width: 768px) {
  .ba-slider-icon { width: 36px; height: 36px; }
  .ba-slider-icon svg { width: 18px; height: 18px; }
  .ba-label { font-size: var(--text-xs); }
}

/* === BEFORE/AFTER SLIDER === */
.about-with-slider { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }
@media (max-width: 768px) { .about-with-slider { grid-template-columns: 1fr; gap: 2rem; } }
.about-slider { width: 100%; }
.ba-slider { width: 100%; user-select: none; -webkit-user-select: none; }
.ba-slider-wrapper { position: relative; width: 100%; aspect-ratio: 16/11; overflow: hidden; border-radius: 12px; cursor: ew-resize; }
.ba-slider-archive, .ba-slider-modern { position: absolute; inset: 0; background-size: cover; background-position: center; background-repeat: no-repeat; }
.ba-slider-modern { z-index: 2; clip-path: inset(0 0 0 50%); -webkit-clip-path: inset(0 0 0 50%); }
.ba-slider-archive { z-index: 1; }
.ba-slider-handle { position: absolute; top: 0; bottom: 0; left: 50%; width: 40px; z-index: 10; transform: translateX(-50%); cursor: ew-resize; display: flex; align-items: center; justify-content: center; pointer-events: none; }
.ba-slider-line { position: absolute; left: 50%; top: 0; bottom: 0; width: 3px; background: white; transform: translateX(-50%); box-shadow: 0 0 8px rgba(0,0,0,0.5); }
.ba-slider-icon { position: relative; z-index: 2; background: rgba(220,38,38,0.9); border-radius: 50%; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; box-shadow: 0 0 12px rgba(0,0,0,0.4); border: 2px solid white; pointer-events: auto; }
.ba-labels { display: flex; justify-content: space-between; margin-top: 0.75rem; padding: 0 0.5rem; }
.ba-label { font-family: 'Inter', sans-serif; font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; color: rgba(255,255,255,0.6); }
