/*
Theme Name: Ubiq Racing
Theme URI: https://ubiq-racing.com
Author: Ubiq Racing GmbH
Description: Professional Kart Racing Team Theme - Modern, 2026 State of the Art
Version: 4.1.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: Private
Text Domain: ubiq-racing
*/

/* ============================================================
   DESIGN TOKENS
   Royal Blue: #1B3A8C | Accent Blue: #2554C7 | Electric: #4A7FF5
   Black: #0A0A0F | Surface: #111118 | Card: #16161F
   White: #FFFFFF | Muted: #8A8A9A | Border: #2A2A3A
   ============================================================ */

/* Fonts: Archivo wird in functions.php geladen */


:root {
  /* Palette */
  --royal:    #1B3A8C;
  --accent:   #2554C7;
  --electric: #4A7FF5;
  --black:    #0A0A0F;
  --surface:  #111118;
  --card:     #16161F;
  --white:    #FFFFFF;
  --muted:    #8A8A9A;
  --border:   #2A2A3A;
  --danger:   #E84040;
  --success:  #2EC77A;

  /* Typography */
  --font-display: 'Barlow Condensed', sans-serif;
  --font-body:    'Barlow', sans-serif;
  --font-mono:    'Space Mono', monospace;

  /* Sizes */
  --max-w: 1280px;
  --header-h: 80px;

  /* Transitions */
  --ease: cubic-bezier(0.23, 1, 0.32, 1);
}

/* ============================================================
   RESET & BASE
   ============================================================ */

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

button {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font: inherit;
  color: inherit;
  -webkit-appearance: none;
  appearance: none;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  overflow-x: hidden;
}

body {
  background: var(--black);
  color: var(--white);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.6;
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ============================================================
   TYPOGRAPHY SCALE
   ============================================================ */

.display-xl {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 10vw, 9rem);
  font-weight: 900;
  line-height: 0.9;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

.display-lg {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 5.5rem);
  font-weight: 800;
  line-height: 0.95;
  text-transform: uppercase;
  letter-spacing: -0.01em;
}

.display-md {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 3.5rem);
  font-weight: 700;
  line-height: 1;
  text-transform: uppercase;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--electric);
}

.body-lg { font-size: 1.125rem; line-height: 1.7; color: rgba(255,255,255,0.75); }
.body-md { font-size: 1rem; line-height: 1.6; color: rgba(255,255,255,0.7); }
.body-sm { font-size: 0.875rem; line-height: 1.5; color: var(--muted); }

/* ============================================================
   LAYOUT UTILITIES
   ============================================================ */

.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 clamp(1rem, 4vw, 3rem);
}

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }

.section { padding: clamp(4rem, 8vw, 8rem) 0; }
.section--sm { padding: clamp(2rem, 4vw, 4rem) 0; }
.section--dark { background: var(--surface); }
.section--card { background: var(--card); }

.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }
.gap-4 { gap: 2rem; }

/* ============================================================
   BUTTONS
   ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 2rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
  transition: all 0.25s var(--ease);
  position: relative;
  overflow: hidden;
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
}

.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.1);
  transform: translateX(-100%);
  transition: transform 0.3s var(--ease);
}
.btn:hover::before { transform: translateX(0); }

.btn-primary {
  background: var(--royal);
  color: #FFFFFF !important;
}
.btn-primary:hover { background: var(--accent); transform: translateY(-2px); }
[data-theme="light"] .btn-primary { color: #FFFFFF !important; }

.btn-electric {
  background: var(--electric);
  color: #FFFFFF !important;
}
.btn-electric:hover { background: #3a6fe5; transform: translateY(-2px); }
[data-theme="light"] .btn-electric { color: #FFFFFF !important; }

.btn-outline {
  background: transparent;
  color: var(--white);
  border: 1px solid var(--border);
}
.btn-outline:hover { border-color: var(--electric); color: var(--electric); }

.btn-ghost {
  background: transparent;
  color: var(--electric);
  padding-left: 0;
  clip-path: none;
}
.btn-ghost:hover { color: var(--white); gap: 1rem; }

.btn-arrow::after {
  content: '→';
  font-size: 1.1em;
}

/* ============================================================
   HEADER & NAVIGATION
   ============================================================ */

#site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--header-h);
  background: transparent;
  transition: background 0.4s var(--ease), backdrop-filter 0.4s;
}

/* Inner pages — always show dark header */
body:not(.home) #site-header {
  background: rgba(10, 10, 15, 0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

#site-header.scrolled {
  background: rgba(10, 10, 15, 0.95);
  backdrop-filter: blur(20px) saturate(1.5);
  border-bottom: 1px solid var(--border);
}

/* Light mode inner pages */
[data-theme="light"] body:not(.home) #site-header,
body[data-theme="light"]:not(.home) #site-header {
  background: rgba(255,255,255,0.97);
  border-bottom-color: #D0D0DC;
}

.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0;
}

/* Logo */
.site-logo {
  display: flex;
  align-items: center;
  gap: 0;
  z-index: 10;
  flex-shrink: 0;
  margin: 0;
  padding: 0;
  line-height: 0;
}

.logo-mark {
  width: 44px;
  height: 44px;
  background: var(--royal);
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1rem;
  color: var(--white);
  flex-shrink: 0;
}

.logo-text {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.4rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1;
}

.logo-sub {
  font-family: var(--font-mono);
  font-size: 0.5rem;
  letter-spacing: 0.25em;
  color: var(--electric);
  text-transform: uppercase;
  margin-top: 2px;
}

/* Custom Logo uploaded via WordPress */
.site-logo .custom-logo-link,
.site-logo a {
  display: flex !important;
  align-items: center;
  padding: 0 !important;
  margin: 0 !important;
  line-height: 0;
  font-size: 0;
  text-decoration: none;
  border: none;
  outline: none;
}
.site-logo .custom-logo,
.site-logo img {
  height: 44px !important;
  width: auto !important;
  max-width: 200px;
  object-fit: contain;
  display: block !important;
  padding: 0 !important;
  margin: 0 !important;
}
.site-logo figure,
.site-logo p,
.site-logo div:not(.logo-mark):not(.logo-text):not(.logo-sub) { 
  padding: 0 !important; 
  margin: 0 !important;
  line-height: 0;
}
/* Override WP default logo link style */
.wp-block-site-logo { margin: 0 !important; }


/* Primary nav */
#primary-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

#primary-nav > li {
  position: relative;
}

#primary-nav > li > a {
  display: block;
  padding: 0.6rem 1rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.8);
  transition: color 0.2s;
  position: relative;
}

#primary-nav > li > a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 1rem;
  right: 1rem;
  height: 2px;
  background: var(--electric);
  transform: scaleX(0);
  transition: transform 0.25s var(--ease);
}

#primary-nav > li:hover > a,
#primary-nav > li.current-menu-item > a {
  color: var(--white);
}

#primary-nav > li:hover > a::after,
#primary-nav > li.current-menu-item > a::after {
  transform: scaleX(1);
}

/* Dropdowns */
.dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 220px;
  background: rgba(17, 17, 24, 0.98);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-top: 2px solid var(--royal);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all 0.25s var(--ease);
  pointer-events: none;
}

#primary-nav > li:hover .dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: all;
}

.dropdown a {
  display: block;
  padding: 0.75rem 1.25rem;
  font-family: var(--font-body);
  font-size: 0.875rem;
  color: rgba(255,255,255,0.7);
  border-bottom: 1px solid var(--border);
  transition: all 0.2s;
}

.dropdown a:last-child { border-bottom: none; }

.dropdown a:hover {
  color: var(--white);
  background: rgba(37, 84, 199, 0.15);
  padding-left: 1.75rem;
}

/* Hamburger */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 0.5rem;
  background: none;
  border: none;
  z-index: 10;
}

.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: rgba(255,255,255,0.45);
  transition: all 0.3s var(--ease);
}

/* Light mode — darker stripes */
[data-theme="light"] .menu-toggle span,
body[data-theme="light"] .menu-toggle span {
  background: rgba(10,10,15,0.7);
}

.menu-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.menu-toggle.active span:nth-child(2) { opacity: 0; }
.menu-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ============================================================
   MOBILE NAVIGATION — SLIDE-IN PANEL
   ============================================================ */

/* Backdrop */
#mobile-nav-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  z-index: 998;
  opacity: 0;
  transition: opacity 0.3s var(--ease);
}
#mobile-nav-backdrop.active {
  display: block;
  opacity: 1;
}

/* Panel */
#mobile-nav-overlay {
  position: fixed;
  top: 0;
  right: 0;
  width: min(340px, 88vw);
  height: 100%;
  background: var(--surface);
  border-left: 1px solid var(--border);
  z-index: 999;
  display: flex;
  flex-direction: column;
  padding: 0;
  transform: translateX(100%);
  transition: transform 0.35s var(--ease);
  overflow-y: auto;
  overflow-x: hidden;
}

#mobile-nav-overlay.active {
  transform: translateX(0);
}

/* Close button */
#mobileNavClose {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  width: 40px;
  height: 40px;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 0;
  padding: 0;
  transition: background 0.2s;
  flex-shrink: 0;
  z-index: 2;
}
#mobileNavClose:hover { background: rgba(255,255,255,0.1); }
#mobileNavClose span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--white);
  position: absolute;
}
#mobileNavClose span:first-child { transform: rotate(45deg); }
#mobileNavClose span:last-child  { transform: rotate(-45deg); }

/* Logo area */
.mobile-nav-logo {
  padding: 1.75rem 1.75rem 1.5rem;
  border-bottom: 1px solid var(--border);
  min-height: 72px;
  display: flex;
  align-items: center;
}
.mobile-nav-logo .custom-logo {
  height: 36px;
  width: auto;
}

/* Nav links */
.mobile-nav-links {
  display: flex;
  flex-direction: column;
  padding: 0.5rem 0;
  flex: 1;
}

.mobile-nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.75rem;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255,255,255,0.7);
  border-bottom: 1px solid var(--border);
  transition: all 0.2s;
  text-decoration: none;
}

.mobile-nav-link:hover,
.mobile-nav-link:active {
  color: var(--white);
  background: rgba(255,255,255,0.04);
  padding-left: 2.25rem;
}

.mobile-nav-link.active {
  color: var(--electric);
  border-left: 3px solid var(--electric);
  padding-left: calc(1.75rem - 3px);
}

.mobile-nav-arrow {
  font-size: 0.9rem;
  color: var(--electric);
  opacity: 0;
  transition: opacity 0.2s, transform 0.2s;
}
.mobile-nav-link:hover .mobile-nav-arrow { opacity: 1; transform: translateX(4px); }

/* Bottom CTA */
.mobile-nav-bottom {
  padding: 1.5rem 1.75rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.mobile-nav-phone {
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: var(--muted);
  transition: color 0.2s;
}
.mobile-nav-phone:hover { color: var(--electric); }

/* Header controls group */
.header-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: none;
}

/* Light mode overrides for mobile nav */
[data-theme="light"] #mobile-nav-overlay {
  background: #FFFFFF;
  border-left-color: #D0D0DC;
}
[data-theme="light"] #mobile-nav-backdrop {
  background: rgba(0,0,0,0.4);
}
[data-theme="light"] .mobile-nav-link {
  color: rgba(10,10,15,0.7);
  border-bottom-color: #E0E0E8;
}
[data-theme="light"] .mobile-nav-link:hover {
  color: var(--royal);
  background: rgba(27,58,140,0.05);
}
[data-theme="light"] .mobile-nav-link.active {
  color: var(--royal);
  border-left-color: var(--royal);
}
[data-theme="light"] .mobile-nav-bottom {
  border-top-color: #E0E0E8;
}
[data-theme="light"] #mobileNavClose {
  background: rgba(0,0,0,0.05);
  border-color: #D0D0DC;
}
[data-theme="light"] #mobileNavClose span { background: #0A0A0F; }

/* ============================================================
   HERO SECTION
   ============================================================ */

.hero {
  position: relative;
  height: 100svh;
  min-height: 650px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.hero-slides {
  position: absolute;
  inset: 0;
}

.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center center; /* overridden by inline style per slide */
  opacity: 0;
  transition: opacity 1.2s var(--ease);
  transform: scale(1.04);
  transition: opacity 1.2s var(--ease), transform 6s linear;
}

.hero-slide.active {
  opacity: 1;
  transform: scale(1);
}

/* Gradient overlays */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to right, rgba(10,10,15,0.85) 0%, rgba(10,10,15,0.3) 60%, transparent 100%),
    linear-gradient(to top, rgba(10,10,15,0.95) 0%, rgba(10,10,15,0.4) 40%, transparent 70%);
  z-index: 1;
}

/* Blue speed stripe — the signature element */
.hero-stripe {
  position: absolute;
  top: 0;
  right: 0;
  width: 6px;
  height: 100%;
  background: linear-gradient(to bottom, var(--electric), var(--royal), transparent);
  z-index: 2;
}

.hero-stripe::before {
  content: '';
  position: absolute;
  top: 0;
  right: 12px;
  width: 2px;
  height: 70%;
  background: rgba(74, 127, 245, 0.3);
}

.hero-content {
  position: relative;
  z-index: 3;
  padding-bottom: clamp(3rem, 7vw, 6rem);
  padding-left: 0;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.hero-eyebrow::before {
  content: '';
  display: block;
  width: 40px;
  height: 2px;
  background: var(--electric);
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(4rem, 12vw, 11rem);
  font-weight: 900;
  line-height: 0.85;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
}

.hero-title .outline {
  -webkit-text-stroke: 2px rgba(255,255,255,0.3);
  color: transparent;
}

.hero-title .blue { color: var(--electric); }

.hero-sub {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: rgba(255,255,255,0.7);
  max-width: 520px;
  margin-bottom: 2.5rem;
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}

/* Scrolling ticker */
.hero-ticker {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 3;
  background: var(--royal);
  overflow: hidden;
  height: 36px;
  display: flex;
  align-items: center;
}

.ticker-track {
  display: flex;
  gap: 3rem;
  animation: ticker 30s linear infinite;
  white-space: nowrap;
}

.ticker-track span {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.7);
}

.ticker-track .sep {
  color: var(--electric);
}

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

/* ============================================================
   SECTION HEADERS
   ============================================================ */

.section-header {
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.section-header.centered { text-align: center; }

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 800;
  text-transform: uppercase;
  line-height: 0.95;
  margin-top: 0.5rem;
}

.section-title .blue { color: var(--electric); }

.section-line {
  display: inline-block;
  width: 60px;
  height: 3px;
  background: linear-gradient(to right, var(--royal), var(--electric));
  margin-top: 1.25rem;
}

/* ============================================================
   CARDS & TILES
   ============================================================ */

.card {
  background: var(--card);
  border: 1px solid var(--border);
  padding: 2rem;
  position: relative;
  overflow: hidden;
  transition: border-color 0.3s, transform 0.3s var(--ease);
}

.card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 3px;
  height: 0;
  background: var(--electric);
  transition: height 0.4s var(--ease);
}

.card:hover {
  border-color: rgba(74, 127, 245, 0.3);
  transform: translateY(-4px);
}

.card:hover::before { height: 100%; }

.card-icon {
  width: 52px;
  height: 52px;
  background: rgba(37, 84, 199, 0.15);
  border: 1px solid rgba(37, 84, 199, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  font-size: 1.4rem;
}

.card-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.75rem;
}

/* Stat card */
.stat-card {
  text-align: center;
  padding: 2rem 1.5rem;
  border: 1px solid var(--border);
  background: var(--card);
}

.stat-number {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 900;
  color: var(--electric);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.stat-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Service card */
.service-card {
  background: var(--card);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: all 0.35s var(--ease);
}

.service-card:hover {
  border-color: rgba(74, 127, 245, 0.4);
  transform: translateY(-6px);
}

.service-card-img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  filter: brightness(0.7);
  transition: filter 0.4s;
}

.service-card:hover .service-card-img { filter: brightness(0.9); }

.service-card-body {
  padding: 1.75rem;
}

/* ============================================================
   PHILOSOPHY SECTION
   ============================================================ */

.philosophy-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  min-height: 500px;
}

.philosophy-text {
  padding: clamp(3rem, 6vw, 5rem);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.philosophy-visual {
  position: relative;
  overflow: hidden;
  min-height: 400px;
}

.philosophy-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.philosophy-list {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.philosophy-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}

.philosophy-item::before {
  content: '';
  width: 8px;
  height: 8px;
  background: var(--electric);
  flex-shrink: 0;
  clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
}

/* ============================================================
   TEAM / DRIVER SECTION
   ============================================================ */

.driver-card {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3/4;
  background: var(--card);
}

.driver-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(20%);
  transition: filter 0.5s, transform 0.5s var(--ease);
}

.driver-card:hover img {
  filter: grayscale(0%);
  transform: scale(1.04);
}

.driver-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 2rem 1.75rem;
  background: linear-gradient(to top, rgba(10,10,15,0.95), transparent);
}

.driver-number {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--electric);
  text-transform: uppercase;
  margin-bottom: 0.25rem;
}

.driver-name {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 800;
  text-transform: uppercase;
  line-height: 1;
  margin-bottom: 0.5rem;
}

.driver-role {
  font-size: 0.8rem;
  color: var(--muted);
  letter-spacing: 0.1em;
}

/* ============================================================
   MOTORS / SERVICES LIST
   ============================================================ */

.motor-item {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: start;
  gap: 2rem;
  padding: 2.5rem 0;
  border-bottom: 1px solid var(--border);
}

.motor-item:first-child { border-top: 1px solid var(--border); }

.motor-badge {
  display: inline-block;
  background: rgba(27, 58, 140, 0.3);
  border: 1px solid var(--royal);
  padding: 0.2rem 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--electric);
  margin-bottom: 0.75rem;
}

/* ============================================================
   PRICING TABLE
   ============================================================ */

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

.price-card {
  background: var(--card);
  border: 1px solid var(--border);
  padding: 2rem 1.75rem;
  text-align: center;
  transition: all 0.3s var(--ease);
}

.price-card.featured {
  border-color: var(--royal);
  background: linear-gradient(135deg, rgba(27,58,140,0.25), var(--card));
}

.price-card:hover { transform: translateY(-4px); border-color: var(--electric); }

.price-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.75rem;
}

.price-amount {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--white);
  line-height: 1;
}

.price-unit {
  font-size: 0.9rem;
  color: var(--muted);
  margin-top: 0.25rem;
}

/* ============================================================
   EVENT BOOKING FORM
   ============================================================ */

.booking-wrapper {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 4rem;
  align-items: start;
}

.booking-form {
  background: var(--card);
  border: 1px solid var(--border);
  padding: clamp(1.5rem, 4vw, 3rem);
}

.booking-form .form-title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

/* ============================================================
   FORMS (global)
   ============================================================ */

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

.form-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.form-control {
  width: 100%;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  color: var(--white);
  padding: 0.85rem 1rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s, background 0.2s;
  appearance: none;
}

.form-control:focus {
  border-color: var(--electric);
  background: rgba(74, 127, 245, 0.05);
}

.form-control::placeholder { color: rgba(255,255,255,0.25); }

select.form-control {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%234A7FF5' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
  cursor: pointer;
}

select.form-control option {
  background: var(--surface);
  color: var(--white);
}

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

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

.form-check {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  cursor: pointer;
}

.form-check input[type="checkbox"] {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  accent-color: var(--electric);
  margin-top: 0.1rem;
  cursor: pointer;
}

.form-check-label {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.5;
}

.form-check-label a { color: var(--electric); }

/* Price display box */
.price-display {
  background: linear-gradient(135deg, rgba(27,58,140,0.3), rgba(74,127,245,0.1));
  border: 1px solid var(--royal);
  padding: 1.5rem;
  margin: 1.5rem 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.price-display-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
}

.price-display-amount {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--electric);
  line-height: 1;
}

.price-display-breakdown {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 0.25rem;
}

/* Payment method selector */
.payment-methods {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.payment-option {
  position: relative;
}

.payment-option input[type="radio"] {
  position: absolute;
  opacity: 0;
}

.payment-option label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.875rem;
}

.payment-option input:checked + label {
  border-color: var(--electric);
  background: rgba(74, 127, 245, 0.1);
  color: var(--white);
}

.payment-option label .icon { font-size: 1.3rem; }

/* Range input */
input[type="range"] {
  width: 100%;
  accent-color: var(--electric);
  height: 4px;
  cursor: pointer;
}

.range-display {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.range-value {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 900;
  color: var(--electric);
  line-height: 1;
}

/* Kart count options */
.kart-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.kart-option {
  padding: 0.4rem 0.85rem;
  border: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--muted);
}

.kart-option.selected, .kart-option:hover {
  border-color: var(--electric);
  color: var(--electric);
  background: rgba(74, 127, 245, 0.1);
}

/* ============================================================
   CALENDAR DATE PICKER
   ============================================================ */

.datepicker-wrapper {
  position: relative;
}

input[type="date"].form-control {
  color-scheme: dark;
}

/* ============================================================
   CTA BANNER
   ============================================================ */

.cta-banner {
  background: linear-gradient(135deg, var(--royal) 0%, rgba(27,58,140,0.8) 50%, var(--accent) 100%);
  position: relative;
  overflow: hidden;
  padding: clamp(3rem, 6vw, 5rem) 0;
}

.cta-banner::before {
  content: 'UBIQ';
  position: absolute;
  right: -2rem;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-display);
  font-size: 20vw;
  font-weight: 900;
  color: rgba(255,255,255,0.04);
  line-height: 1;
  pointer-events: none;
}

/* ============================================================
   FOOTER
   ============================================================ */

#site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding-top: 4rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--border);
}

.footer-brand p {
  font-size: 0.9rem;
  color: var(--muted);
  margin-top: 1rem;
  line-height: 1.7;
  max-width: 280px;
}

.footer-heading {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--electric);
  margin-bottom: 1.25rem;
}

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

.footer-links a {
  font-size: 0.875rem;
  color: var(--muted);
  transition: color 0.2s;
}

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

.footer-bottom {
  padding: 1.5rem 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: var(--muted);
}

/* Stats ticker in footer */
.footer-ticker {
  background: var(--card);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 0;
  overflow: hidden;
  margin-bottom: 3rem;
}

/* ============================================================
   PAGE HERO (inner pages)
   ============================================================ */

.page-hero {
  padding-top: calc(var(--header-h) + clamp(3rem, 7vw, 6rem));
  padding-bottom: clamp(3rem, 6vw, 5rem);
  background: var(--surface);
  position: relative;
  overflow: hidden;
}

.page-hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--electric), transparent);
}

.page-hero-bg {
  position: absolute;
  inset: 0;
  opacity: 0.12;
  background-size: cover;
  background-position: center;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
}

.breadcrumb a { color: var(--electric); }
.breadcrumb span { color: var(--border); }

/* ============================================================
   CONTACT PAGE
   ============================================================ */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 4rem;
  align-items: start;
}

.contact-info-item {
  display: flex;
  gap: 1.25rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border);
}

.contact-info-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
  color: var(--electric);
}

/* Tab system for contact forms */
.form-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

.form-tab-btn {
  padding: 0.85rem 1.5rem;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all 0.2s;
}

.form-tab-btn.active, .form-tab-btn:hover {
  color: var(--white);
  border-bottom-color: var(--electric);
}

.form-tab-panel { display: none; }
.form-tab-panel.active { display: block; }

/* ============================================================
   RACING SCHOOL PAGE
   ============================================================ */

.school-feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  overflow: hidden;
  margin-bottom: 2px;
}

.school-feature:nth-child(even) { direction: rtl; }
.school-feature:nth-child(even) > * { direction: ltr; }

.school-feature-img {
  min-height: 380px;
  background-size: cover;
  background-position: center;
  position: relative;
}

.school-feature-content {
  background: var(--card);
  padding: clamp(2.5rem, 5vw, 4rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* ============================================================
   NOTIFICATION / ALERT
   ============================================================ */

.alert {
  padding: 1rem 1.25rem;
  border-left: 3px solid;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.alert-success { border-color: var(--success); background: rgba(46, 199, 122, 0.08); color: var(--success); }
.alert-error   { border-color: var(--danger);  background: rgba(232, 64, 64, 0.08);  color: var(--danger);  }
.alert-info    { border-color: var(--electric); background: rgba(74, 127, 245, 0.08); color: var(--electric); }

/* ============================================================
   ANIMATIONS
   ============================================================ */

[data-reveal] {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

[data-reveal].revealed {
  opacity: 1;
  transform: none;
}

[data-reveal-delay="1"] { transition-delay: 0.1s; }
[data-reveal-delay="2"] { transition-delay: 0.2s; }
[data-reveal-delay="3"] { transition-delay: 0.3s; }
[data-reveal-delay="4"] { transition-delay: 0.4s; }

/* ============================================================
   PAGE LOADER
   ============================================================ */
.page-loader {
  position: fixed;
  inset: 0;
  background: var(--black);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s var(--ease), visibility 0.5s var(--ease);
}

.page-loader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  width: min(320px, 80vw);
}

/* Logo text fallback */
.loader-logo-text {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 900;
  font-size: 1.6rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--white);
}

/* Logo */
.loader-logo {
  display: flex;
  align-items: center;
  justify-content: center;
}

.loader-logo-img {
  height: 56px;
  width: auto;
  max-width: 220px;
  object-fit: contain;
}

.loader-logo .custom-logo {
  height: 56px;
  width: auto;
}

/* Track */
.loader-track-wrap {
  width: 100%;
  position: relative;
  height: 40px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.loader-track-line {
  position: absolute;
  bottom: 6px;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(to right, transparent, var(--border) 20%, var(--border) 80%, transparent);
}

/* Kart SVG */
.loader-kart {
  position: absolute;
  bottom: 8px;
  width: 80px;
  animation: kartDrive 1.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.loader-kart svg {
  width: 80px;
  height: auto;
  display: block;
}

@keyframes kartDrive {
  0%   { left: -90px;  opacity: 0; }
  10%  { opacity: 1; }
  80%  { opacity: 1; }
  100% { left: calc(100% + 10px); opacity: 0; }
}

/* Wheel spin effect via transform on circles */
.loader-kart circle:nth-child(4),
.loader-kart circle:nth-child(8) {
  animation: wheelSpin 0.3s linear infinite;
  transform-origin: center;
}

@keyframes wheelSpin {
  to { transform: rotate(360deg); }
}

/* Progress bar */
.loader-bar {
  width: 100%;
  height: 2px;
  background: var(--border);
  position: relative;
  overflow: hidden;
  border-radius: 2px;
}

.loader-bar::after {
  content: '';
  position: absolute;
  left: -100%;
  top: 0;
  height: 100%;
  width: 100%;
  background: linear-gradient(to right, var(--royal), var(--electric));
  animation: loaderProgress 1.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes loaderProgress {
  0%   { left: -100%; }
  60%  { left: -10%; }
  100% { left: 0%; }
}

/* ============================================================
   SCROLL PROGRESS BAR
   ============================================================ */

.scroll-progress {
  position: fixed;
  top: var(--header-h);
  left: 0;
  height: 3px;
  background: linear-gradient(to right, var(--royal), var(--electric));
  z-index: 999;
  width: 0%;
  transition: width 0.1s linear;
}

/* ============================================================
   BACK TO TOP
   ============================================================ */

.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 46px;
  height: 46px;
  background: var(--royal);
  color: var(--white);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
  z-index: 500;
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
}

.back-to-top.visible { opacity: 1; visibility: visible; }
.back-to-top:hover { background: var(--accent); }

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* ============================================================
   RESPONSIVE — TABLET & MOBILE
   ============================================================ */

@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .philosophy-grid { grid-template-columns: 1fr; }
  .booking-wrapper { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  /* Nav */
  #primary-nav { display: none; }
  #headerCta { display: none !important; }
  .menu-toggle { display: flex; }

  /* Grids → single column */
  .grid-2,
  .grid-3,
  .philosophy-text + .philosophy-visual,
  .school-feature { grid-template-columns: 1fr; }

  .school-feature:nth-child(even) { direction: ltr; }
  .contact-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .payment-methods { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .footer-bottom { flex-direction: column; gap: 0.5rem; text-align: center; }
  .motor-item { grid-template-columns: 1fr; }

  /* Force all inline grids to stack */
  [style*="grid-template-columns: 1fr 1fr"],
  [style*="grid-template-columns:1fr 1fr"],
  [style*="grid-template-columns: 1.2fr 1fr"],
  [style*="grid-template-columns: 1fr 1.5fr"],
  [style*="grid-template-columns: 1.5fr 1fr"],
  [style*="grid-template-columns: 1fr 2fr"],
  [style*="grid-template-columns: 2fr 1fr"] {
    grid-template-columns: 1fr !important;
  }

  /* Hero */
  .hero { min-height: 100svh; }
  .hero-title { font-size: clamp(3rem, 14vw, 5rem); }
  .hero-sub { font-size: 1rem; }
  .hero-actions { flex-direction: column; align-items: flex-start; }
  .hero-stripe { width: 4px; }

  /* Sections */
  .section { padding: 3rem 0; }
  .section--sm { padding: 2rem 0; }

  /* Booking */
  .booking-wrapper { gap: 2rem; }
  .booking-form { padding: 1.5rem; }

  /* Motor items */
  .motor-item > div:last-child { display: none; }

  /* Page hero */
  .page-hero { padding-top: calc(var(--header-h) + 2rem); padding-bottom: 2rem; }

  /* CTA banner */
  .cta-banner::before { display: none; }
}

@media (max-width: 480px) {
  /* Hide breadcrumbs on mobile */
  .breadcrumb { display: none; }

  /* Container padding */
  .container { padding: 0 1rem; }

  /* Buttons */
  .btn { padding: 0.75rem 1.25rem; font-size: 0.8rem; }

  /* Forms */
  .form-tabs { flex-wrap: wrap; }
  .form-tab-btn { font-size: 0.7rem; padding: 0.6rem 0.85rem; }
  .form-control { padding: 0.75rem 0.85rem; font-size: 0.9rem; }

  /* Hero */
  .hero-title { font-size: clamp(2.8rem, 16vw, 4rem); }
  .hero-ticker { height: 30px; }

  /* Cards */
  .card { padding: 1.5rem; }
  .booking-form { padding: 1.25rem; }

  /* Stats grid */
  .stat-card { padding: 1.5rem 1rem; }
  .stat-number { font-size: clamp(1.8rem, 8vw, 2.5rem); }

  /* Price display */
  .price-display { flex-direction: column; gap: 0.75rem; }
  .price-display-amount { font-size: 1.8rem; }

  /* Footer */
  .footer-ticker { display: none; }
  .back-to-top { bottom: 1rem; right: 1rem; width: 40px; height: 40px; }
}

/* ============================================================
   WOOCOMMERCE COMPATIBILITY
   ============================================================ */

.woocommerce-notices-wrapper,
.woocommerce-message,
.woocommerce-error { margin-bottom: 1.5rem; }

/* ============================================================
   ACCESSIBILITY
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .ticker-track { animation: none; }
}

:focus-visible {
  outline: 2px solid var(--electric);
  outline-offset: 3px;
}

/* SEO Keywords — visually hidden, readable by search engines */
.seo-keywords {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* Remove blue ticker animation — black bar stays */
.hero-ticker {
  background: var(--black);
}
.ticker-track {
  /* animation remains for footer ticker, removed here via override */
}

/* ============================================================
   LIGHT MODE
   ============================================================ */

[data-theme="light"] {
  --black:   #F4F4F6;
  --surface: #EAEAEF;
  --card:    #FFFFFF;
  --white:   #0A0A0F;
  --muted:   #555568;
  --border:  #D0D0DC;
  --royal:   #1B3A8C;
  --accent:  #2554C7;
  --electric:#2554C7;
}

[data-theme="light"] body {
  background: #F4F4F6;
  color: #0A0A0F;
}

[data-theme="light"] #site-header {
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(20px);
}
[data-theme="light"] #site-header.scrolled {
  background: rgba(255,255,255,0.97);
  border-bottom: 1px solid #D0D0DC;
}
[data-theme="light"] #primary-nav > li > a {
  color: rgba(10,10,15,0.8);
}
[data-theme="light"] #primary-nav > li > a::after {
  background: var(--royal);
}
[data-theme="light"] #primary-nav > li:hover > a,
[data-theme="light"] #primary-nav > li.current-menu-item > a { color: var(--royal); }
[data-theme="light"] .logo-text { color: #0A0A0F; }
[data-theme="light"] .logo-sub  { color: var(--royal); }

[data-theme="light"] .dropdown {
  background: rgba(255,255,255,0.98);
  border-color: #D0D0DC;
}

[data-theme="light"] .dropdown a { color: rgba(10,10,15,0.7); }
[data-theme="light"] .dropdown a:hover { color: #0A0A0F; background: rgba(37,84,199,0.08); }

[data-theme="light"] .hero::before {
  background:
    linear-gradient(to right, rgba(244,244,246,0.85) 0%, rgba(244,244,246,0.3) 60%, transparent 100%),
    linear-gradient(to top, rgba(244,244,246,0.95) 0%, rgba(244,244,246,0.4) 40%, transparent 70%);
}

[data-theme="light"] .hero-title { color: #0A0A0F; }
[data-theme="light"] .hero-sub   { color: rgba(10,10,15,0.7); }

[data-theme="light"] .section--dark { background: #EAEAEF; }
[data-theme="light"] .section--card { background: #FFFFFF; }

[data-theme="light"] .card {
  background: #FFFFFF;
  border-color: #D0D0DC;
}

[data-theme="light"] .stat-card { background: #FFFFFF; border-color: #D0D0DC; }
[data-theme="light"] .stat-number { color: var(--royal); }

[data-theme="light"] .page-hero { background: #EAEAEF; }

[data-theme="light"] .body-lg,
[data-theme="light"] .body-md { color: rgba(10,10,15,0.75); }
[data-theme="light"] .body-sm  { color: #555568; }

[data-theme="light"] .form-control {
  background: #FFFFFF;
  border-color: #D0D0DC;
  color: #0A0A0F;
}
[data-theme="light"] .form-control:focus {
  border-color: var(--royal);
  background: rgba(37,84,199,0.04);
}

[data-theme="light"] .btn-outline {
  border-color: #D0D0DC;
  color: #0A0A0F;
}
[data-theme="light"] .btn-outline:hover { border-color: var(--royal); color: var(--royal); }

[data-theme="light"] #site-footer { background: #EAEAEF; border-color: #D0D0DC; }
[data-theme="light"] .footer-grid { border-color: #D0D0DC; }
[data-theme="light"] .footer-links a { color: #555568; }
[data-theme="light"] .footer-links a:hover { color: #0A0A0F; }
[data-theme="light"] .footer-bottom { color: #555568; border-color: #D0D0DC; }
[data-theme="light"] .footer-ticker { background: #FFFFFF; border-color: #D0D0DC; }

[data-theme="light"] .motor-item { border-color: #D0D0DC; }
[data-theme="light"] .motor-badge {
  background: rgba(37,84,199,0.1);
  border-color: rgba(37,84,199,0.3);
}

[data-theme="light"] .philosophy-item { border-color: #D0D0DC; }
[data-theme="light"] .contact-info-item { border-color: #D0D0DC; }

[data-theme="light"] .booking-form { background: #FFFFFF; border-color: #D0D0DC; }
[data-theme="light"] .price-display {
  background: linear-gradient(135deg, rgba(37,84,199,0.1), rgba(37,84,199,0.05));
  border-color: var(--royal);
}

[data-theme="light"] #mobile-nav { background: #F4F4F6; }
[data-theme="light"] #mobile-nav a { color: rgba(10,10,15,0.6); border-color: #D0D0DC; }
[data-theme="light"] #mobile-nav a:hover { color: #0A0A0F; }

[data-theme="light"] .page-loader { background: #F4F4F6; }

/* Theme toggle button */
/* Theme Toggle — pill switch */
.theme-toggle {
  position: relative;
  width: 52px;
  height: 26px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 100px;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.3s var(--ease), border-color 0.3s;
  padding: 0;
  outline: none;
  box-shadow: none;
}
.theme-toggle:focus-visible {
  box-shadow: 0 0 0 2px var(--electric);
}
.theme-toggle-icons {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 6px;
  font-size: 0.65rem;
  pointer-events: none;
  color: rgba(255,255,255,0.4);
}
.theme-toggle-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  transition: transform 0.3s var(--ease), background 0.3s;
  pointer-events: none;
}

/* Light mode: toggle becomes visible/branded */
[data-theme="light"] .theme-toggle,
body[data-theme="light"] .theme-toggle {
  background: var(--royal);
  border-color: var(--royal);
}
[data-theme="light"] .theme-toggle-icons,
body[data-theme="light"] .theme-toggle-icons {
  color: rgba(255,255,255,0.7);
}
[data-theme="light"] .theme-toggle-thumb,
body[data-theme="light"] .theme-toggle-thumb {
  transform: translateX(26px);
  background: #fff;
}

/* Logo inversion for light mode */
[data-theme="light"] .site-logo .custom-logo {
  filter: invert(1) brightness(0.15);
}
[data-theme="light"] .logo-mark {
  background: var(--royal);
  color: #fff;
}

/* Ensure light mode works when set on body (mobile fallback) */
body[data-theme="light"] { background: #F4F4F6; color: #0A0A0F; }
body[data-theme="light"] #site-header { background: rgba(255,255,255,0.95); }
body[data-theme="light"] #site-header.scrolled { background: rgba(255,255,255,0.97); border-bottom-color: #D0D0DC; }
body[data-theme="light"] #primary-nav > li > a { color: rgba(10,10,15,0.8); }
body[data-theme="light"] .card { background: #FFFFFF; border-color: #D0D0DC; }
body[data-theme="light"] .section--dark { background: #EAEAEF; }
body[data-theme="light"] .page-hero { background: #EAEAEF; }
body[data-theme="light"] #site-footer { background: #EAEAEF; }
body[data-theme="light"] .footer-links a { color: #555568; }
body[data-theme="light"] .form-control { background: #FFFFFF; border-color: #D0D0DC; color: #0A0A0F; }
body[data-theme="light"] .theme-toggle { background: var(--royal); }
body[data-theme="light"] .theme-toggle-thumb { transform: translateX(28px); }

/* Logo switching — dark/light mode */

/* Dark mode: show dark logo (default WP logo), hide light logo */
.logo-light { display: none; }
.logo-dark  { display: block; }

/* Fix WP logo size override */
img.logo-dark,
img.logo-light {
  height: 44px !important;
  width: auto !important;
}

/* Light mode: show light logo, hide dark logo */
[data-theme="light"] .logo-dark,
body[data-theme="light"] .logo-dark  { display: none; }
[data-theme="light"] .logo-light,
body[data-theme="light"] .logo-light { display: block; }

/* Fallback: if no light logo set, invert the dark logo */
[data-theme="light"] .site-logo .custom-logo:not(.logo-dark):not(.logo-light),
body[data-theme="light"] .site-logo .custom-logo:not(.logo-dark):not(.logo-light) {
  filter: invert(1) brightness(0.15);
}

/* ============================================================
   EVENTS PAGE — MOBILE
   ============================================================ */

.events-info-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 5rem;
  align-items: start;
}

@media (max-width: 768px) {
  .events-info-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  /* Booking form full width */
  .booking-wrapper {
    grid-template-columns: 1fr !important;
    gap: 2rem !important;
  }

  /* Hide sticky sidebar summary on mobile — show inline price only */
  .booking-wrapper > div:last-child {
    display: none;
  }

  /* Payment methods stack */
  .payment-methods {
    grid-template-columns: 1fr !important;
  }

  /* Price display */
  .price-display {
    flex-direction: column;
    gap: 0.5rem;
    align-items: flex-start;
  }

  /* Kart options wrap */
  .kart-options {
    gap: 0.4rem;
  }
  .kart-option {
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
  }

  /* Form rows stack */
  .form-row {
    grid-template-columns: 1fr !important;
  }

  /* Facts grid stays 2 col — that's fine */
}

@media (max-width: 480px) {
  .events-info-grid {
    gap: 2rem;
  }
  .booking-form {
    padding: 1.25rem;
  }
}

/* ============================================================
   KONTAKT PAGE — MAP MOBILE
   ============================================================ */

.contact-map-grid {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 4rem;
  align-items: center;
}

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

  /* Map full width on mobile */
  .contact-map-grid > div:last-child {
    width: 100%;
  }

  /* Map iframe height smaller on mobile */
  .contact-map-grid iframe {
    height: 280px !important;
  }

  /* Map container height */
  #ubiq-map {
    height: 280px !important;
  }

  /* Contact info grid also stacks */
  .contact-grid {
    grid-template-columns: 1fr !important;
    gap: 2rem !important;
  }

  /* Form tabs wrap */
  .form-tabs {
    flex-wrap: wrap;
  }
  .form-tab-btn {
    font-size: 0.7rem;
    padding: 0.6rem 0.85rem;
  }
}

/* ============================================================
   LIGHT MODE — TEXT & CONTENT FIXES
   ============================================================ */

/* Body text in light mode — dark on light background */
[data-theme="light"] .body-md,
[data-theme="light"] .body-lg,
[data-theme="light"] .body-sm,
body[data-theme="light"] .body-md,
body[data-theme="light"] .body-lg,
body[data-theme="light"] .body-sm {
  color: rgba(10,10,15,0.75);
}

/* List items with › arrow — Rennteam, Werkstatt, Motoren */
[data-theme="light"] li,
[data-theme="light"] li span,
body[data-theme="light"] li,
body[data-theme="light"] li span {
  color: rgba(10,10,15,0.75) !important;
}

/* Inline styled text (rgba white) — override to dark */
[data-theme="light"] [style*="color:rgba(255,255,255"],
[data-theme="light"] [style*="color: rgba(255,255,255"],
body[data-theme="light"] [style*="color:rgba(255,255,255"],
body[data-theme="light"] [style*="color: rgba(255,255,255"] {
  color: rgba(10,10,15,0.72) !important;
}

/* Erfolge timeline text — Rennteam */
[data-theme="light"] .motor-item p,
[data-theme="light"] .motor-item div,
body[data-theme="light"] .motor-item p,
body[data-theme="light"] .motor-item div {
  color: rgba(10,10,15,0.75);
}

/* Cards in light mode */
[data-theme="light"] .card,
body[data-theme="light"] .card {
  background: #FFFFFF;
  border-color: #D0D0DC;
}

[data-theme="light"] .card .body-md,
[data-theme="light"] .card p,
body[data-theme="light"] .card .body-md,
body[data-theme="light"] .card p {
  color: rgba(10,10,15,0.72);
}

/* Section dark background in light mode — use lighter grey */
[data-theme="light"] .section--dark,
body[data-theme="light"] .section--dark {
  background: #EAEAEF;
}

/* All paragraph and span text inside sections */
[data-theme="light"] .section p,
[data-theme="light"] .section span:not(.seo-keywords),
[data-theme="light"] .section li,
body[data-theme="light"] .section p,
body[data-theme="light"] .section span:not(.seo-keywords),
body[data-theme="light"] .section li {
  color: rgba(10,10,15,0.75);
}

/* Motor badge */
[data-theme="light"] .motor-badge,
body[data-theme="light"] .motor-badge {
  color: var(--royal);
  background: rgba(27,58,140,0.1);
  border-color: rgba(27,58,140,0.3);
}

/* Muted text */
[data-theme="light"] .muted,
[data-theme="light"] [style*="color:var(--muted)"],
body[data-theme="light"] .muted,
body[data-theme="light"] [style*="color:var(--muted)"] {
  color: #555568 !important;
}

/* Map in light mode — remove dark filter */
[data-theme="light"] #ubiq-map iframe,
body[data-theme="light"] #ubiq-map iframe {
  filter: none !important;
}

/* Map overlay card in light mode */
[data-theme="light"] #ubiq-map > div:last-child,
body[data-theme="light"] #ubiq-map > div:last-child {
  background: rgba(255,255,255,0.95) !important;
  border-color: #D0D0DC !important;
}

/* Erfolge timeline in light mode */
[data-theme="light"] [style*="border-bottom:1px solid var(--border)"],
[data-theme="light"] [style*="border-bottom: 1px solid var(--border)"],
body[data-theme="light"] [style*="border-bottom:1px solid var(--border)"],
body[data-theme="light"] [style*="border-bottom: 1px solid var(--border)"] {
  border-color: #D0D0DC !important;
}

/* Contact info items */
[data-theme="light"] .contact-info-item,
body[data-theme="light"] .contact-info-item {
  border-bottom-color: #D0D0DC;
}

/* Override any remaining white text in light mode */
[data-theme="light"] .section--dark p,
[data-theme="light"] .section--dark li,
[data-theme="light"] .section--dark span:not(.seo-keywords):not(.motor-badge),
body[data-theme="light"] .section--dark p,
body[data-theme="light"] .section--dark li,
body[data-theme="light"] .section--dark span:not(.seo-keywords):not(.motor-badge) {
  color: rgba(10,10,15,0.75);
}

/* White text with inline styles from template */
[data-theme="light"] [style*="color:rgba(255,255,255,.7)"],
[data-theme="light"] [style*="color:rgba(255,255,255,.6)"],
[data-theme="light"] [style*="color:rgba(255,255,255,.65)"],
[data-theme="light"] [style*="color:rgba(255,255,255,0.7)"],
[data-theme="light"] [style*="color:rgba(255,255,255,0.6)"],
body[data-theme="light"] [style*="color:rgba(255,255,255,.7)"],
body[data-theme="light"] [style*="color:rgba(255,255,255,.6)"],
body[data-theme="light"] [style*="color:rgba(255,255,255,.65)"],
body[data-theme="light"] [style*="color:rgba(255,255,255,0.7)"],
body[data-theme="light"] [style*="color:rgba(255,255,255,0.6)"] {
  color: rgba(10,10,15,0.7) !important;
}

/* Section headings stay dark */
[data-theme="light"] .section-title,
body[data-theme="light"] .section-title {
  color: #0A0A0F;
}
