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

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: #f1f5f9;
  min-height: 100vh;
  background-color: #0b0d10; /* Fallback for slow image loads */
}

/* 1. Fixed Porsche Image */
.fixed-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-image: url('PorscheGT3R992.jpg');
  background-size: cover;
  background-position: center 30%; /* Focus slightly higher on the car's body */
  background-repeat: no-repeat;
  z-index: -1;
}

/* Optional vignette layer to enhance text readability at the edges */
.fixed-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.65) 100%);
}

/* 2. Scroll Layout */
.content-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem 1.5rem;
}

.spacer-section {
  min-height: 55vh; /* Adjusts how much car is revealed between text blocks */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.hero h1 {
  font-size: clamp(2.5rem, 7vw, 5rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.8);
}

.hero .subtitle {
  font-size: 1.25rem;
  color: #94a3b8;
  margin-top: 0.5rem;
  text-shadow: 0 2px 8px rgba(0,0,0,0.8);
}

.badge {
  background: #d90429; /* Porsche Guards Red inspired */
  color: #ffffff;
  padding: 0.35rem 0.85rem;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  border-radius: 4px;
  margin-bottom: 1rem;
}

/* 3. Dark Carbon Glassmorphism Cards */
.glass-card {
  position: relative;
  width: 100%;
  max-width: 680px;
  padding: 2.5rem;
  margin: 1.5rem 0;
  
  /* Deep semi-transparent tint designed to match the dark studio background */
  background: rgba(15, 17, 21, 0.75); 
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6);
}

/* Porsche Red subtle accent indicator on card edge */
.accent-line {
  position: absolute;
  top: 0;
  left: 2.5rem;
  width: 40px;
  height: 3px;
  background: #d90429;
}

.glass-card h2 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: #ffffff;
}

.glass-card p {
  font-size: 1.05rem;
  line-height: 1.7;
  color: #cbd5e1;
}

/* Specs List styling */
.spec-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
  margin-top: 1rem;
}

.spec-list li {
  background: rgba(255, 255, 255, 0.03);
  padding: 0.85rem 1rem;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.95rem;
}

.spec-list strong {
  display: block;
  color: #d90429;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}

/* Mobile Responsiveness */
@media (max-width: 640px) {
  .glass-card {
    padding: 1.75rem;
  }
  .spacer-section {
    min-height: 40vh;
  }
  .spec-list {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   Standalone Gallery Card Styles
   ========================================================================== */

.gallery-card {
  max-width: 900px;
  /* Lower the alpha value from 0.75 down to 0.35 or 0.25 for higher transparency */
  background: rgba(15, 17, 21, 0.35);
  
  /* Optional: Lighten blur slightly to let the fixed Porsche background show through more sharply */
  backdrop-filter: blur(10px) saturate(130%);
  -webkit-backdrop-filter: blur(10px) saturate(130%);
}

.gallery-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.gallery-subtitle {
  font-size: 0.85rem;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Horizontal Gallery Container & Track */
.horizontal-gallery-wrapper {
  width: 100%;
  overflow: hidden;
  border-radius: 8px;
}

.gallery-track {
  display: flex;
  gap: 1.25rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 0.75rem;
  -webkit-overflow-scrolling: touch;
}

/* Custom Scrollbar Styling */
.gallery-track::-webkit-scrollbar {
  height: 6px;
}

.gallery-track::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
}

.gallery-track::-webkit-scrollbar-thumb {
  background: rgba(217, 4, 41, 0.6);
  border-radius: 10px;
}

.gallery-track::-webkit-scrollbar-thumb:hover {
  background: #d90429;
}

/* Doubled Gallery Item Dimensions */
.gallery-item {
  flex: 0 0 560px; /* Width doubled from 280px */
  scroll-snap-align: start;
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.3);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.gallery-item:hover {
  transform: translateY(-2px);
  border-color: rgba(217, 4, 41, 0.5);
}

.gallery-item img {
  width: 100%;
  height: 340px; /* Height doubled from 170px */
  object-fit: cover;
  display: block;
}

.gallery-item figcaption {
  padding: 0.65rem 0.85rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: #e2e8f0;
  letter-spacing: 0.03em;
  background: rgba(15, 17, 21, 0.85);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

/* Responsive adjustment for mobile viewports */
@media (max-width: 640px) {
  .gallery-item {
    flex: 0 0 85vw; /* Fluid width on small phones */
  }
  .gallery-item img {
    height: 240px;
  }
}
/* Navigation Controls Container */
.gallery-controls {
  display: flex;
  gap: 0.5rem;
}

/* Glassmorphism Arrow Buttons */
.nav-arrow {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.nav-arrow:hover {
  background: #d90429; /* Porsche Red on hover */
  border-color: #d90429;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(217, 4, 41, 0.4);
}

.nav-arrow:active {
  transform: translateY(0);
}

/* Responsive adjustment for small screens */
@media (max-width: 640px) {
  .nav-arrow {
    width: 36px;
    height: 36px;
    font-size: 0.85rem;
  }
}
/* ==========================================================================
   Hover Glow Effects
   ========================================================================== */

/* Outer red glow on card hover */
.glass-card {
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:hover {
  transform: translateY(-3px);
  border-color: rgba(217, 4, 41, 0.4); /* Match Porsche Guards Red */
  box-shadow: 0 0 25px rgba(217, 4, 41, 0.25), 0 20px 40px rgba(0, 0, 0, 0.7);
}

/* Enhanced glow for horizontal gallery thumbnails on hover */
.gallery-item {
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.gallery-item:hover {
  transform: translateY(-4px);
  border-color: rgba(217, 4, 41, 0.6);
  box-shadow: 0 0 18px rgba(217, 4, 41, 0.35);
}

/* ==========================================================================
   Video Card & Responsive Embed Styles
   ========================================================================== */

.video-card {
  max-width: 840px;
}

.video-subtitle {
  margin-bottom: 1.25rem;
  font-size: 0.95rem;
  color: #cbd5e1;
}

/* 16:9 Responsive Aspect Ratio Container */
.video-container {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
  height: 0;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}