/* ==========================================
   iomotorsport - Global Styles
   ========================================== */

/* Custom Properties */
:root {
  --primary: #e63946;
  --primary-light: #ff6b6b;
  --primary-dark: #c62828;
  --bg-dark: #0a0a0a;
  --bg-card: rgba(255, 255, 255, 0.03);
  --bg-glass: rgba(255, 255, 255, 0.05);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(230, 57, 70, 0.4);
  --text-primary: #ffffff;
  --text-secondary: #b0b0b0;
  --text-muted: #888888;
  --text-dim: #666666;
  --shadow-glow: 0 0 40px rgba(230, 57, 70, 0.15);
  --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.3);
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    sans-serif;
  background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 50%, #0f0f1a 100%);
  background-attachment: fixed;
  color: #e0e0e0;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(
      ellipse at 20% 20%,
      rgba(230, 57, 70, 0.08) 0%,
      transparent 50%
    ),
    radial-gradient(
      ellipse at 80% 80%,
      rgba(230, 57, 70, 0.05) 0%,
      transparent 50%
    );
  pointer-events: none;
  z-index: -1;
  animation: ambientShift 20s ease-in-out infinite;
}

@keyframes ambientShift {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.1);
  }
}

/* Noise texture overlay */
body::after {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.015;
  pointer-events: none;
  z-index: 9999;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

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

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

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

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

/* Focus styles for accessibility */
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}

/* Skip Link for Accessibility */
.skip-link {
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: #fff;
  padding: 12px 24px;
  border-radius: 0 0 8px 8px;
  z-index: 10001;
  font-weight: 600;
  text-decoration: none;
  transition: top 0.3s ease;
}

.skip-link:focus {
  top: 0;
  outline: 2px solid #fff;
  outline-offset: 2px;
}

/* Selection styling */
::selection {
  background: rgba(230, 57, 70, 0.3);
  color: #fff;
}

/* Container */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ==========================================
   Typography
   ========================================== */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Orbitron", monospace;
  font-weight: 700;
  line-height: 1.2;
}

.gradient-text {
  background: linear-gradient(135deg, #e63946 0%, #ff6b6b 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ==========================================
   Header & Navigation
   ========================================== */
header {
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgba(230, 57, 70, 0.3);
  padding: 15px 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: all var(--transition-normal);
}

header::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
  opacity: 0.5;
}

header.scrolled {
  background: rgba(10, 10, 10, 0.95);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

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

.logo {
  font-size: 1.6rem;
  font-weight: 900;
  color: #fff;
  text-transform: lowercase;
  letter-spacing: 2px;
  font-family: "Orbitron", monospace;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo-icon {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, #e63946, #ff6b6b);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  box-shadow: 0 4px 15px rgba(230, 57, 70, 0.3);
  transition: transform var(--transition-normal),
    box-shadow var(--transition-normal);
}

.logo:hover .logo-icon {
  transform: rotate(-5deg) scale(1.05);
  box-shadow: 0 6px 20px rgba(230, 57, 70, 0.5);
}

.logo span {
  color: #e63946;
}

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

.nav-links {
  display: flex;
  gap: 30px;
  list-style: none;
}

.nav-links a {
  color: #b0b0b0;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  transition: all 0.3s;
  position: relative;
  padding: 8px 0;
}

.nav-links a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: #e63946;
  transition: width 0.3s;
}

.nav-links a:hover,
.nav-links a.active {
  color: #fff;
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.nav-cta {
  background: #e63946 !important;
  color: #fff !important;
  padding: 10px 20px !important;
  border-radius: 6px;
  font-weight: 600 !important;
  transition: all 0.3s;
}

.nav-cta::after {
  display: none !important;
}

.nav-cta:hover {
  background: #ff6b6b !important;
  transform: translateY(-2px);
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 8px;
}

.mobile-nav {
  display: none;
  flex-direction: column;
  gap: 10px;
  padding: 20px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 15px;
}

.mobile-nav.active {
  display: flex;
}

.mobile-nav a {
  color: #b0b0b0;
  text-decoration: none;
  padding: 10px 0;
  font-weight: 500;
  transition: color 0.3s;
}

.mobile-nav a:hover,
.mobile-nav a.active {
  color: #e63946;
}

/* ==========================================
   Buttons
   ========================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: all var(--transition-normal);
  cursor: pointer;
  border: 2px solid transparent;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.5s;
}

.btn:hover::before {
  left: 100%;
}

.btn-primary {
  background: linear-gradient(135deg, #e63946, #ff6b6b);
  color: #fff;
  border-color: #e63946;
  box-shadow: 0 4px 15px rgba(230, 57, 70, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(230, 57, 70, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.btn-primary:active {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(230, 57, 70, 0.4);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.03);
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
}

.btn-secondary:hover {
  border-color: #e63946;
  color: #e63946;
  background: rgba(230, 57, 70, 0.1);
  box-shadow: 0 0 20px rgba(230, 57, 70, 0.2);
}

.btn-secondary:active {
  transform: scale(0.98);
}

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

/* ==========================================
   Hero Section
   ========================================== */
.hero {
  text-align: center;
  padding: 100px 0 80px;
  position: relative;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 800px;
  height: 800px;
  background: radial-gradient(
    circle,
    rgba(230, 57, 70, 0.12) 0%,
    transparent 60%
  );
  animation: heroGlow 4s ease-in-out infinite;
  pointer-events: none;
}

@keyframes heroGlow {
  0%,
  100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.6;
  }
  50% {
    transform: translate(-50%, -50%) scale(1.2);
    opacity: 1;
  }
}

/* Hero Particles */
.hero-particles {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: var(--primary);
  border-radius: 50%;
  opacity: 0.6;
  animation: floatParticle 15s infinite;
}

.particle:nth-child(1) {
  left: 10%;
  animation-delay: 0s;
  animation-duration: 12s;
}
.particle:nth-child(2) {
  left: 30%;
  animation-delay: 2s;
  animation-duration: 18s;
}
.particle:nth-child(3) {
  left: 50%;
  animation-delay: 4s;
  animation-duration: 14s;
}
.particle:nth-child(4) {
  left: 70%;
  animation-delay: 1s;
  animation-duration: 16s;
}
.particle:nth-child(5) {
  left: 90%;
  animation-delay: 3s;
  animation-duration: 20s;
}

@keyframes floatParticle {
  0% {
    transform: translateY(100vh) scale(0);
    opacity: 0;
  }
  10% {
    opacity: 0.6;
  }
  90% {
    opacity: 0.6;
  }
  100% {
    transform: translateY(-100px) scale(1);
    opacity: 0;
  }
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(230, 57, 70, 0.15);
  border: 1px solid rgba(230, 57, 70, 0.4);
  padding: 10px 24px;
  border-radius: 50px;
  margin-bottom: 30px;
  font-size: 0.85rem;
  color: #e63946;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.live-dot {
  width: 8px;
  height: 8px;
  background: #e63946;
  border-radius: 50%;
  animation: livePulse 2s infinite;
}

@keyframes livePulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.5;
    transform: scale(1.5);
  }
}

.hero h1,
.hero .hero-title {
  font-size: 4rem;
  font-weight: 900;
  margin-bottom: 25px;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 3px;
  line-height: 1.1;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: #888;
  max-width: 700px;
  margin: 0 auto 40px;
  font-weight: 400;
}

/* Hero Scroll Indicator */
.hero-scroll-indicator {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  opacity: 0.6;
  transition: opacity 0.3s;
  cursor: pointer;
}

.hero-scroll-indicator:hover {
  opacity: 1;
}

.scroll-arrow {
  font-size: 1.5rem;
  color: var(--primary);
  animation: scrollBounce 2s ease-in-out infinite;
}

.scroll-text {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #666;
}

@keyframes scrollBounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(8px);
  }
}

.hero-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  margin-top: 60px;
  padding: 40px;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}

.hero-stats::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(230, 57, 70, 0.5),
    transparent
  );
}

.stat-item {
  text-align: center;
  position: relative;
  padding: 10px 0;
}

.stat-item:not(:last-child)::after {
  content: "";
  position: absolute;
  right: -15px;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 60%;
  background: linear-gradient(
    180deg,
    transparent,
    rgba(255, 255, 255, 0.1),
    transparent
  );
}

.stat-number {
  display: block;
  font-size: 2.5rem;
  font-weight: 900;
  color: #e63946;
  font-family: "Orbitron", monospace;
  margin-bottom: 5px;
  text-shadow: 0 0 30px rgba(230, 57, 70, 0.5);
}

.stat-label {
  font-size: 0.8rem;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 2px;
}

/* ==========================================
   Sections
   ========================================== */
.section {
  padding: 100px 0;
}

.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-tag {
  display: inline-block;
  background: rgba(230, 57, 70, 0.15);
  color: #e63946;
  padding: 8px 20px;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 3px;
  margin-bottom: 20px;
}

.section-header h2 {
  font-size: 2.8rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 15px;
}

.section-header p {
  color: #888;
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto;
}

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

.feature-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 35px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(10px);
}

.feature-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #e63946, #ff6b6b);
  opacity: 0;
  transition: opacity 0.3s;
}

.feature-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    600px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
    rgba(230, 57, 70, 0.1),
    transparent 40%
  );
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}

.feature-card:hover {
  transform: translateY(-10px) scale(1.02);
  border-color: rgba(230, 57, 70, 0.4);
  box-shadow: 0 25px 50px rgba(230, 57, 70, 0.2),
    0 0 0 1px rgba(230, 57, 70, 0.1);
}

.feature-card:hover::before {
  opacity: 1;
}

.feature-card:hover::after {
  opacity: 1;
}

.feature-large {
  grid-column: span 2;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 30px;
  align-items: center;
}

.feature-icon {
  font-size: 3rem;
  margin-bottom: 20px;
}

.feature-large .feature-icon {
  font-size: 4rem;
  margin-bottom: 0;
}

.feature-content h3 {
  font-size: 1.4rem;
  color: #fff;
  margin-bottom: 10px;
}

.feature-content p {
  color: #888;
  font-size: 0.95rem;
  margin-bottom: 15px;
}

.feature-link {
  color: #e63946;
  font-weight: 600;
  font-size: 0.9rem;
  transition: gap 0.3s;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.feature-card:hover .feature-link {
  gap: 10px;
}

.feature-tags {
  display: flex;
  gap: 10px;
  margin-top: 15px;
}

.tag {
  background: rgba(230, 57, 70, 0.15);
  border: 1px solid rgba(230, 57, 70, 0.4);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #e63946;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ==========================================
   Upcoming Race Banner
   ========================================== */
.upcoming-section {
  padding: 60px 0;
}

.upcoming-banner {
  background: linear-gradient(
    135deg,
    rgba(230, 57, 70, 0.15) 0%,
    rgba(230, 57, 70, 0.05) 100%
  );
  border: 1px solid rgba(230, 57, 70, 0.3);
  border-radius: 24px;
  padding: 50px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 40px;
  align-items: center;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(10px);
}

.upcoming-banner::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(230, 57, 70, 0.6),
    transparent
  );
}

.upcoming-banner::after {
  content: "🏁";
  position: absolute;
  right: -30px;
  bottom: -30px;
  font-size: 15rem;
  opacity: 0.05;
  pointer-events: none;
}

.upcoming-tag {
  display: inline-block;
  background: #e63946;
  color: #fff;
  padding: 6px 14px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 15px;
}

.upcoming-content h3 {
  font-size: 2.2rem;
  color: #fff;
  margin-bottom: 10px;
}

.upcoming-content p {
  color: #888;
  font-size: 1.1rem;
  margin-bottom: 20px;
}

.upcoming-details {
  display: flex;
  gap: 25px;
  flex-wrap: wrap;
  color: #b0b0b0;
  font-size: 0.95rem;
}

.countdown-wrapper {
  text-align: center;
}

.countdown {
  display: flex;
  gap: 15px;
  margin-bottom: 25px;
}

.countdown-item {
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(230, 57, 70, 0.3);
  border-radius: 14px;
  padding: 20px 25px;
  min-width: 80px;
  position: relative;
  overflow: hidden;
  transition: all var(--transition-normal);
}

.countdown-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
  opacity: 0.5;
}

.countdown-item:hover {
  transform: translateY(-3px);
  border-color: rgba(230, 57, 70, 0.5);
  box-shadow: 0 10px 30px rgba(230, 57, 70, 0.2);
}

.countdown-number {
  display: block;
  font-size: 2rem;
  font-weight: 900;
  color: #e63946;
  font-family: "Orbitron", monospace;
  text-shadow: 0 0 20px rgba(230, 57, 70, 0.5);
  animation: countdownPulse 1s ease-in-out infinite;
}

@keyframes countdownPulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.8;
  }
}

.countdown-label {
  font-size: 0.7rem;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ==========================================
   Updates Grid
   ========================================== */
.updates-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 25px;
}

.update-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(10px);
}

.update-card:hover {
  transform: translateY(-8px);
  border-color: rgba(230, 57, 70, 0.4);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.update-card.featured {
  grid-row: span 3;
}

.update-image {
  height: 200px;
  background: linear-gradient(135deg, #e63946, #ff6b6b);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  position: relative;
  overflow: hidden;
}

.update-image::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    45deg,
    transparent 0%,
    rgba(255, 255, 255, 0.1) 50%,
    transparent 100%
  );
  transform: translateX(-100%);
  transition: transform 0.6s;
}

.update-card:hover .update-image::before {
  transform: translateX(100%);
}

.update-image.small {
  height: 100px;
  font-size: 2rem;
}

.update-card.featured .update-image {
  height: 250px;
  font-size: 5rem;
}

.update-category {
  position: absolute;
  top: 15px;
  left: 15px;
  background: rgba(0, 0, 0, 0.8);
  color: #fff;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.update-content {
  padding: 25px;
}

.update-meta {
  display: block;
  font-size: 0.8rem;
  color: #666;
  margin-bottom: 10px;
}

.update-content h3 {
  font-size: 1.2rem;
  color: #fff;
  margin-bottom: 10px;
  line-height: 1.4;
  font-family: "Inter", sans-serif;
  font-weight: 600;
}

.update-card.featured .update-content h3 {
  font-size: 1.5rem;
}

.update-content p {
  color: #888;
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 15px;
}

.update-link {
  color: #e63946;
  font-weight: 600;
  font-size: 0.85rem;
  text-decoration: none;
  transition: gap 0.3s;
  display: inline-flex;
  align-items: center;
}

.update-link:hover {
  text-decoration: underline;
}

/* ==========================================
   Series Grid
   ========================================== */
.series-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 25px;
}

.series-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 35px;
  text-align: center;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.series-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(230, 57, 70, 0.1) 0%,
    transparent 50%
  );
  opacity: 0;
  transition: opacity 0.4s;
}

.series-card:hover {
  transform: translateY(-10px) scale(1.02);
  border-color: rgba(230, 57, 70, 0.5);
  box-shadow: 0 20px 40px rgba(230, 57, 70, 0.15);
}

.series-card:hover::before {
  opacity: 1;
}

.series-logo {
  font-size: 2rem;
  font-weight: 900;
  color: #e63946;
  font-family: "Orbitron", monospace;
  margin-bottom: 20px;
  letter-spacing: 3px;
  position: relative;
  display: inline-block;
  text-shadow: 0 0 30px rgba(230, 57, 70, 0.5);
  transition: transform 0.3s;
}

.series-card:hover .series-logo {
  transform: scale(1.1);
}

.series-card h3 {
  font-size: 1rem;
  color: #fff;
  margin-bottom: 10px;
  font-family: "Inter", sans-serif;
  font-weight: 600;
}

.series-card p {
  color: #888;
  font-size: 0.85rem;
  margin-bottom: 20px;
}

.series-stats {
  display: flex;
  justify-content: center;
  gap: 20px;
  font-size: 0.8rem;
  color: #666;
}

/* ==========================================
   CTA Section
   ========================================== */
.cta-section {
  padding: 80px 0;
}

.cta-card {
  background: linear-gradient(
    135deg,
    rgba(230, 57, 70, 0.12) 0%,
    rgba(230, 57, 70, 0.05) 100%
  );
  border: 1px solid rgba(230, 57, 70, 0.3);
  border-radius: 24px;
  padding: 70px 60px;
  text-align: center;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(10px);
}

.cta-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(230, 57, 70, 0.6),
    transparent
  );
}

.cta-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse at 50% 0%,
    rgba(230, 57, 70, 0.15) 0%,
    transparent 50%
  );
  pointer-events: none;
}

.cta-card h2 {
  font-size: 2.5rem;
  color: #fff;
  margin-bottom: 15px;
  position: relative;
  z-index: 1;
}

.cta-card p {
  color: #888;
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto 30px;
  position: relative;
  z-index: 1;
}

.cta-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

/* ==========================================
   Footer
   ========================================== */
footer {
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.8) 0%,
    rgba(0, 0, 0, 0.95) 100%
  );
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 80px 0 40px;
  margin-top: 0;
  position: relative;
}

footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(230, 57, 70, 0.5),
    transparent
  );
}

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

.footer-brand p {
  color: #888;
  margin: 20px 0;
  font-size: 0.95rem;
  line-height: 1.7;
}

.social-links {
  display: flex;
  gap: 12px;
}

.social-link {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #888;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 1rem;
}

.social-link:hover {
  background: linear-gradient(135deg, #e63946, #ff6b6b);
  border-color: transparent;
  color: #fff;
  transform: translateY(-3px) scale(1.1);
  box-shadow: 0 8px 25px rgba(230, 57, 70, 0.4);
}

.footer-links h4 {
  color: #fff;
  font-size: 1rem;
  margin-bottom: 20px;
  font-family: "Inter", sans-serif;
  font-weight: 600;
}

.footer-links a {
  display: block;
  color: #888;
  text-decoration: none;
  padding: 8px 0;
  font-size: 0.9rem;
  transition: color 0.3s;
}

.footer-links a:hover {
  color: #e63946;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 30px;
  text-align: center;
  color: #666;
  font-size: 0.9rem;
}

/* ==========================================
   Page Hero (for inner pages)
   ========================================== */
.page-hero {
  text-align: center;
  padding: 80px 0 60px;
  position: relative;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(230, 57, 70, 0.05) 100%
  );
  overflow: hidden;
}

.page-hero::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(
    circle,
    rgba(230, 57, 70, 0.08) 0%,
    transparent 60%
  );
  pointer-events: none;
  animation: heroGlow 4s ease-in-out infinite;
}

.page-hero h1 {
  font-size: 3.5rem;
  font-weight: 900;
  color: #fff;
  margin-bottom: 15px;
  text-transform: uppercase;
  letter-spacing: 3px;
  position: relative;
  animation: fadeInUp 0.8s ease-out;
}

.page-hero p {
  font-size: 1.2rem;
  color: #888;
  max-width: 600px;
  margin: 0 auto;
  position: relative;
  animation: fadeInUp 0.8s ease-out 0.2s backwards;
}

/* ==========================================
   Cards (Generic)
   ========================================== */
.card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 30px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.1),
    transparent
  );
}

.card:hover {
  border-color: rgba(230, 57, 70, 0.4);
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(230, 57, 70, 0.1);
}

/* Glass Card Variant */
.card-glass {
  background: rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Card with Gradient Border */
.card-gradient {
  position: relative;
  background: var(--bg-dark);
}

.card-gradient::before {
  content: "";
  position: absolute;
  inset: -1px;
  background: linear-gradient(135deg, var(--primary), transparent 50%);
  border-radius: inherit;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.3s;
}

.card-gradient:hover::before {
  opacity: 1;
}

/* ==========================================
   Tables
   ========================================== */
.data-table {
  width: 100%;
  border-collapse: collapse;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 12px;
  overflow: hidden;
}

.data-table th {
  background: rgba(0, 0, 0, 0.4);
  padding: 18px 20px;
  text-align: left;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #888;
  font-weight: 600;
}

.data-table td {
  padding: 18px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.95rem;
}

.data-table tr:hover {
  background: rgba(230, 57, 70, 0.05);
}

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

/* ==========================================
   Tabs
   ========================================== */
.tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}

.tab-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #b0b0b0;
  padding: 12px 24px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-weight: 500;
  font-size: 0.9rem;
  position: relative;
  overflow: hidden;
}

.tab-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #e63946, #ff6b6b);
  opacity: 0;
  transition: opacity 0.3s;
}

.tab-btn span {
  position: relative;
  z-index: 1;
}

.tab-btn:hover {
  border-color: rgba(230, 57, 70, 0.5);
  color: #fff;
  transform: translateY(-2px);
}

.tab-btn:hover::before {
  opacity: 0.2;
}

.tab-btn.active {
  background: linear-gradient(135deg, #e63946, #ff6b6b);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 20px rgba(230, 57, 70, 0.4);
}

.tab-btn.active::before {
  opacity: 0;
}

.tab-content {
  display: none;
}

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

/* ==========================================
   Badges
   ========================================== */
.badge {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.badge-red {
  background: rgba(230, 57, 70, 0.2);
  color: #e63946;
}
.badge-blue {
  background: rgba(0, 123, 255, 0.2);
  color: #007bff;
}
.badge-green {
  background: rgba(40, 167, 69, 0.2);
  color: #28a745;
}
.badge-yellow {
  background: rgba(255, 193, 7, 0.2);
  color: #ffc107;
}
.badge-purple {
  background: rgba(156, 39, 176, 0.2);
  color: #9c27b0;
}

/* ==========================================
   Forms
   ========================================== */
.form-input {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 14px 18px;
  color: #fff;
  font-size: 1rem;
  width: 100%;
  transition: border-color 0.3s;
}

.form-input:focus {
  outline: none;
  border-color: #e63946;
}

.form-input::placeholder {
  color: #666;
}

.form-select {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 14px 18px;
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
}

/* ==========================================
   Responsive Design
   ========================================== */
@media (max-width: 1200px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .feature-large {
    grid-column: span 2;
  }

  .series-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 992px) {
  .hero h1 {
    font-size: 3rem;
  }

  .hero-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .upcoming-banner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .upcoming-details {
    justify-content: center;
  }

  .countdown-wrapper {
    margin-top: 20px;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .mobile-menu-btn {
    display: block;
  }

  .hero h1 {
    font-size: 2.2rem;
    letter-spacing: 1px;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .hero-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    padding: 25px;
  }

  .stat-number {
    font-size: 2rem;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .feature-large {
    grid-column: span 1;
    display: block;
  }

  .feature-large .feature-icon {
    margin-bottom: 20px;
  }

  .updates-grid {
    grid-template-columns: 1fr;
  }

  .update-card.featured {
    grid-row: span 1;
  }

  .series-grid {
    grid-template-columns: 1fr;
  }

  .section-header h2 {
    font-size: 2rem;
  }

  .page-hero h1 {
    font-size: 2.5rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .countdown {
    flex-wrap: wrap;
    justify-content: center;
  }

  .countdown-item {
    min-width: 70px;
    padding: 15px 20px;
  }

  .cta-card {
    padding: 40px 25px;
  }

  .cta-card h2 {
    font-size: 1.8rem;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 1.8rem;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }

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

  .cta-buttons {
    flex-direction: column;
  }
}

/* ==========================================
   Loading Animation
   ========================================== */
.page-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #0a0a0a;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  transition: opacity 0.5s, visibility 0.5s;
}

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

.loader-content {
  text-align: center;
}

.loader-logo {
  font-size: 3rem;
  animation: loaderPulse 1s ease-in-out infinite;
}

@keyframes loaderPulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.1);
    opacity: 0.7;
  }
}

.loader-bar {
  width: 200px;
  height: 3px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  margin-top: 20px;
  overflow: hidden;
}

.loader-bar::after {
  content: "";
  display: block;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  border-radius: 3px;
  animation: loaderBar 1s ease-in-out infinite;
}

@keyframes loaderBar {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(300%);
  }
}

/* ==========================================
   Smooth Transitions & Hover States
   ========================================== */
a,
button,
.btn,
.card,
.feature-card,
.series-card {
  -webkit-tap-highlight-color: transparent;
}

/* Link hover underline animation */
.footer-links a {
  position: relative;
}

.footer-links a::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--primary);
  transition: width 0.3s;
}

.footer-links a:hover::after {
  width: 100%;
}

/* Glow text effect */
.glow-text {
  text-shadow: 0 0 20px rgba(230, 57, 70, 0.5), 0 0 40px rgba(230, 57, 70, 0.3),
    0 0 60px rgba(230, 57, 70, 0.1);
}

/* Typing cursor animation */
.typing-cursor::after {
  content: "|";
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

/* Smooth image loading */
img {
  opacity: 1;
  transition: opacity 0.3s, transform 0.3s;
}

img:not([src]) {
  opacity: 0;
}

img:hover {
  transform: scale(1.02);
}

/* Loading skeleton for dynamic content */
.skeleton {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.03) 25%,
    rgba(255, 255, 255, 0.08) 50%,
    rgba(255, 255, 255, 0.03) 75%
  );
  background-size: 200% 100%;
  animation: skeleton 1.5s ease-in-out infinite;
}

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

/* Reduced motion for accessibility */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }
}

/* High contrast mode improvements */
@media (prefers-contrast: high) {
  .feature-card,
  .series-card,
  .card {
    border-width: 2px;
  }

  .btn {
    border-width: 2px;
  }
}

/* Print styles */
@media print {
  header,
  footer,
  .cta-section,
  .countdown-wrapper {
    display: none;
  }

  body {
    background: white;
    color: black;
  }

  .gradient-text {
    -webkit-text-fill-color: black;
    color: black;
  }
}

/* ==========================================
   Tooltips
   ========================================== */
[data-tooltip] {
  position: relative;
  cursor: pointer;
}

[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  background: rgba(0, 0, 0, 0.9);
  color: #fff;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 0.8rem;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s, transform 0.2s;
  z-index: 1000;
  pointer-events: none;
}

[data-tooltip]::before {
  content: "";
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: rgba(0, 0, 0, 0.9);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
  z-index: 1000;
}

[data-tooltip]:hover::after,
[data-tooltip]:hover::before {
  opacity: 1;
  visibility: visible;
}

[data-tooltip]:hover::after {
  transform: translateX(-50%) translateY(-12px);
}

/* ==========================================
   Notification Badge
   ========================================== */
.notification-badge {
  position: relative;
}

.notification-badge::after {
  content: attr(data-count);
  position: absolute;
  top: -8px;
  right: -8px;
  background: var(--primary);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg-dark);
}

/* ==========================================
   Text Utilities
   ========================================== */
.text-gradient {
  background: linear-gradient(
    135deg,
    var(--primary) 0%,
    var(--primary-light) 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-balance {
  text-wrap: balance;
}

.text-truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ==========================================
   Micro-interactions
   ========================================== */
.pulse-ring {
  position: relative;
}

.pulse-ring::before {
  content: "";
  position: absolute;
  inset: -4px;
  border: 2px solid var(--primary);
  border-radius: inherit;
  animation: pulseRing 2s ease-out infinite;
}

@keyframes pulseRing {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  100% {
    transform: scale(1.3);
    opacity: 0;
  }
}

/* Success/Error States */
.state-success {
  border-color: #28a745 !important;
  box-shadow: 0 0 20px rgba(40, 167, 69, 0.2);
}

.state-error {
  border-color: #dc3545 !important;
  box-shadow: 0 0 20px rgba(220, 53, 69, 0.2);
}

/* Button Loading State */
.btn.loading {
  pointer-events: none;
  opacity: 0.7;
}

.btn.loading::after {
  content: "";
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid transparent;
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-left: 8px;
}

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

/* ==========================================
   Image Styles & Containers
   ========================================== */

/* Base image styles */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Lazy loading fade-in */
img[loading="lazy"] {
  opacity: 0;
  transition: opacity 0.5s ease;
}

img[loading="lazy"].loaded,
img[loading="lazy"]:not([src=""]) {
  opacity: 1;
}

/* Image container with aspect ratio */
.img-container {
  position: relative;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
}

.img-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Aspect ratio variants */
.img-container.ratio-16-9 {
  aspect-ratio: 16 / 9;
}
.img-container.ratio-4-3 {
  aspect-ratio: 4 / 3;
}
.img-container.ratio-3-2 {
  aspect-ratio: 3 / 2;
}
.img-container.ratio-1-1 {
  aspect-ratio: 1 / 1;
}
.img-container.ratio-21-9 {
  aspect-ratio: 21 / 9;
}

/* Hero image with overlay */
.hero-image {
  position: relative;
  width: 100%;
  min-height: 500px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.hero-image::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(10, 10, 10, 0.3) 0%,
    rgba(10, 10, 10, 0.7) 50%,
    rgba(10, 10, 10, 0.95) 100%
  );
}

.hero-image-content {
  position: relative;
  z-index: 1;
}

/* Card with image */
.card-image {
  position: relative;
  overflow: hidden;
  border-radius: 16px 16px 0 0;
  aspect-ratio: 16 / 9;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover .card-image img,
.feature-card:hover .card-image img {
  transform: scale(1.08);
}

/* Image with gradient overlay */
.card-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    transparent 50%,
    rgba(10, 10, 10, 0.8) 100%
  );
  pointer-events: none;
}

/* Race car card image */
.car-image {
  position: relative;
  background: linear-gradient(
    135deg,
    rgba(230, 57, 70, 0.1) 0%,
    rgba(0, 0, 0, 0.3) 100%
  );
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 12px;
}

.car-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 20px;
  filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.5));
  transition: transform 0.4s ease, filter 0.4s ease;
}

.car-image:hover img {
  transform: scale(1.05) translateY(-5px);
  filter: drop-shadow(0 20px 40px rgba(230, 57, 70, 0.3));
}

/* Driver portrait */
.driver-portrait {
  position: relative;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid rgba(230, 57, 70, 0.5);
  box-shadow: 0 0 30px rgba(230, 57, 70, 0.2);
  transition: all 0.3s ease;
}

.driver-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.driver-portrait:hover {
  border-color: var(--primary);
  transform: scale(1.05);
  box-shadow: 0 0 40px rgba(230, 57, 70, 0.4);
}

/* Driver card portrait (larger) */
.driver-card .driver-portrait {
  width: 150px;
  height: 150px;
  margin: 0 auto 20px;
}

/* Circuit map/image */
.circuit-image {
  position: relative;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 16px;
  overflow: hidden;
  padding: 30px;
}

.circuit-image img {
  width: 100%;
  height: auto;
  filter: brightness(0.9) contrast(1.1);
  transition: filter 0.3s ease;
}

.circuit-image:hover img {
  filter: brightness(1) contrast(1.2);
}

/* Manufacturer logo */
.manufacturer-logo {
  width: 60px;
  height: 60px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.manufacturer-logo img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: brightness(0) invert(1);
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

.manufacturer-logo:hover {
  background: rgba(230, 57, 70, 0.2);
}

.manufacturer-logo:hover img {
  opacity: 1;
}

/* Product image */
.product-image {
  position: relative;
  aspect-ratio: 1 / 1;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.05) 0%,
    rgba(0, 0, 0, 0.1) 100%
  );
  border-radius: 16px 16px 0 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-image img {
  max-width: 80%;
  max-height: 80%;
  object-fit: contain;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-card:hover .product-image img {
  transform: scale(1.1) rotate(-2deg);
}

/* Product badge overlay */
.product-image .product-badge {
  position: absolute;
  top: 15px;
  left: 15px;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  z-index: 2;
}

.product-badge.bestseller {
  background: var(--primary);
  color: #fff;
}
.product-badge.sale {
  background: #28a745;
  color: #fff;
}
.product-badge.limited {
  background: #9c27b0;
  color: #fff;
}
.product-badge.new {
  background: #007bff;
  color: #fff;
}

/* Gallery grid */
.image-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
}

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

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

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

.gallery-item::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(0, 0, 0, 0.7) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.gallery-item:hover::after {
  opacity: 1;
}

/* Background image section */
.bg-image-section {
  position: relative;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

.bg-image-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(2px);
}

.bg-image-section > * {
  position: relative;
  z-index: 1;
}

/* Image placeholder / skeleton */
.img-placeholder {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.03) 25%,
    rgba(255, 255, 255, 0.08) 50%,
    rgba(255, 255, 255, 0.03) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: inherit;
}

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

/* Fallback icon for missing images */
.img-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(230, 57, 70, 0.1);
  color: var(--primary);
  font-size: 3rem;
}

/* Series logo badges */
.series-logo-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
}

.series-logo-badge img {
  height: 20px;
  width: auto;
}

/* Responsive image utilities */
@media (max-width: 768px) {
  .hero-image {
    min-height: 350px;
  }

  .driver-portrait {
    width: 100px;
    height: 100px;
  }

  .driver-card .driver-portrait {
    width: 120px;
    height: 120px;
  }

  .car-image img {
    padding: 15px;
  }

  .bg-image-section {
    background-attachment: scroll;
  }
}

/* Image lightbox overlay */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

.lightbox.active {
  opacity: 1;
  visibility: visible;
}

.lightbox img {
  max-width: 90%;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 50%;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
  transition: background 0.3s;
}

.lightbox-close:hover {
  background: var(--primary);
}
