/* =======================
   CSS VARIABLES & ROOT STYLES
   ======================= */
:root {
  /* Color Palette - Dark Luxury Theme */
  --primary-color: #00d4ff; /* Ice Blue */
  --primary-dark: #00a8cc;
  --secondary-color: #ff6b35; /* Accent Orange */
  --background-dark: #0a0a0a; /* Deep Black */
  --background-grey: #1a1a1a; /* Charcoal */
  --background-light: #2a2a2a; /* Gunmetal */
  --text-white: #ffffff;
  --text-grey: #b8b8b8;
  --text-dark: #333333;
  --glass-bg: rgba(255, 255, 255, 0.05);
  --glass-border: rgba(255, 255, 255, 0.1);
  --shadow-light: rgba(0, 212, 255, 0.2);
  --shadow-dark: rgba(0, 0, 0, 0.5);

  /* Typography */
  --font-primary: "Inter", sans-serif;
  --font-secondary: "Poppins", sans-serif;

  /* Spacing */
  --container-padding: 2rem;
  --section-padding: 5rem 0;
  --border-radius: 12px;
  --border-radius-lg: 20px;

  /* Animations */
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: all 0.2s ease;

  /* Z-index layers */
  --z-navbar: 1000;
  --z-floating: 999;
  --z-modal: 1100;
  --z-overlay: 100;

  /* Layout */
  --navbar-height: 85px;
}

/* Light Theme Variables */
body.light-theme {
  --background-dark: #ffffff;
  --background-grey: #f8f9fa;
  --background-light: #e9ecef;
  --text-white: #212529; /* Main text color for light theme */
  --text-grey: #6c757d;
  --glass-bg: rgba(255, 255, 255, 0.8);
  --glass-border: rgba(0, 0, 0, 0.1);
  --shadow-dark: rgba(0, 0, 0, 0.1);
}

/* Additional overrides for light theme readability */
body.light-theme .section-title {
  background: linear-gradient(135deg, var(--text-dark), var(--primary-color));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
body.light-theme h1,
body.light-theme h2,
body.light-theme h3,
body.light-theme h4,
body.light-theme h5,
body.light-theme h6 {
  color: var(--text-dark, #121212);
}
body.light-theme .nav-logo .logo-link,
body.light-theme .feature-item,
body.light-theme .timeline-content h4,
body.light-theme .service-card h3,
body.light-theme .gallery-overlay h4,
body.light-theme .modal-vehicle-info h2,
body.light-theme .service-description h4,
body.light-theme .modal-images h4,
body.light-theme .author-info h4,
body.light-theme .badge-item,
body.light-theme .contact-item h4,
body.light-theme .form-success h3 {
  color: var(--text-dark, #121212);
}
body.light-theme .nav-toggle .bar {
  background: var(--text-dark);
}
body.light-theme .btn-secondary {
  color: var(--text-dark);
}
body.light-theme .btn-secondary:hover {
  color: var(--text-white);
}

/* =======================
   RESET & BASE STYLES
   ======================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  background-color: var(--background-dark);
  color: var(--text-white);
  font-family: var(--font-primary);
  line-height: 1.6;
  scroll-behavior: smooth;
  overflow-x: hidden;
}

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

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

button {
  border: none;
  background: none;
  cursor: pointer;
  font-family: inherit;
  transition: var(--transition-smooth);
}

ul {
  list-style: none;
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

/* Section Styling */
section {
  padding: var(--section-padding);
  position: relative;
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-title {
  font-family: var(--font-secondary);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--text-white), var(--primary-color));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.section-subtitle {
  font-size: 1.2rem;
  color: var(--text-grey);
  max-width: 600px;
  margin: 0 auto;
}

/* Glass Effect */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--border-radius);
  box-shadow: 0 8px 32px var(--shadow-dark);
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 1rem 2rem;
  border-radius: var(--border-radius);
  font-weight: 600;
  font-size: 1rem;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  border: none;
}

.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,
    var(--primary-color),
    var(--primary-dark)
  );
  color: var(--text-white);
  box-shadow: 0 4px 20px var(--shadow-light);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px var(--shadow-light);
}

.btn-secondary {
  background: transparent;
  color: var(--text-white);
  border: 2px solid var(--primary-color);
}

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

/* =======================
   NAVIGATION
   ======================= */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  height: var(--navbar-height);
  min-height: var(--navbar-height); /* Prevent height collapse */
  background: rgba(10, 10, 10, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border);
  z-index: var(--z-navbar);
  transition: var(--transition-smooth);
}

.navbar.scrolled {
  background: rgba(10, 10, 10, 0.98);
  box-shadow: 0 4px 20px var(--shadow-dark);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 var(--container-padding);
  max-width: 1200px;
  margin: 0 auto;
  height: 100%;
}

.nav-logo .logo-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-secondary);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-white);
}

.logo-image {
  height: 50px;
  width: auto;
  object-fit: contain;
  transition: var(--transition-smooth);
  filter: drop-shadow(0 2px 8px rgba(0, 212, 255, 0.3));
}

.logo-image:hover {
  transform: scale(1.1) rotate(2deg);
  filter: drop-shadow(0 4px 16px rgba(0, 212, 255, 0.5));
}

.logo-link {
  display: inline-block;
  transition: var(--transition-smooth);
}

.logo-link:hover {
  transform: translateY(-2px);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-link {
  font-weight: 500;
  color: var(--text-grey);
  transition: var(--transition-smooth);
  position: relative;
}

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

.nav-link::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary-color);
  transition: width 0.3s;
}

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

.nav-cta-btn {
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--primary-dark)
  );
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: var(--border-radius);
  font-weight: 600;
  transition: var(--transition-smooth);
}

.nav-cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--shadow-light);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
}

.nav-toggle .bar {
  width: 25px;
  height: 3px;
  background: var(--text-white);
  margin: 3px 0;
  transition: var(--transition-smooth);
}

.theme-toggle {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 50%;
  width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-color);
  font-size: 1.1rem;
  transition: var(--transition-smooth);
}

.theme-toggle:hover {
  background: var(--primary-color);
  color: white;
  transform: rotate(180deg);
}

/* =======================
   HERO SECTION
   ======================= */
.hero {
  position: relative;
  z-index: 1;
  padding: calc(var(--section-padding) + var(--navbar-height)) 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* =======================
   INTRO OVERLAY SYSTEM
   ======================= */
.intro-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--background-dark);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.8s ease-out;
  /* GPU optimized overlay */
  transform: translate3d(0, 0, 0);
  backface-visibility: hidden;
  contain: layout style paint;
}

.intro-overlay.fade-out {
  opacity: 0;
  pointer-events: none;
}

.intro-overlay.hidden {
  display: none;
}

.intro-video-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  /* GPU optimized video container */
  transform: translate3d(0, 0, 0);
  backface-visibility: hidden;
  contain: layout style paint;
}

.intro-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  /* GPU optimized video rendering */
  transform: translate3d(0, 0, 0);
  backface-visibility: hidden;
  contain: layout style paint;
}

/* Ken Burns effect for intro video when paused on final frame */
.intro-video.final-frame {
  animation: kenBurnsEffect 18s ease-in-out infinite alternate;
  transform-origin: center center;
}

/* Final frame background for smooth transitions */
.intro-final-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: 0;
  will-change: opacity, transform;
  backface-visibility: hidden;
  /* Ken Burns effect - subtle zoom and pan for depth */
  animation: kenBurnsEffect 15s ease-out infinite alternate;
  transform-origin: center center;
}

.intro-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 2rem;
  padding: 2rem;
  height: 100%;
  max-width: 900px;
  margin: 0 auto;
}

/* Position intro logo to match hero logo position */
.intro-logo-container {
  position: relative;
  margin-bottom: 1rem;
  animation: logoFloat 3s ease-in-out infinite;
  /* Optimized GPU acceleration */
  transform: translate3d(0, 0, 0);
  backface-visibility: hidden;
  contain: layout style paint;
  z-index: 3;
}

.intro-logo-container model-viewer {
  width: 150px !important;
  height: 150px !important;
  /* GPU optimized 3D model transitions */
  transform: translate3d(0, 0, 0);
  backface-visibility: hidden;
  contain: layout style paint;
  transition: opacity 0.3s ease-out, transform 0.3s ease-out;
}

.intro-logo-container model-viewer {
  --focus-visible-outline: none;
  --progress-bar-color: transparent;
  --progress-mask: transparent;
}

/* Hero logo optimized transitions */
.hero-logo-model {
  transform: translate3d(0, 0, 0);
  backface-visibility: hidden;
  contain: layout style paint;
  position: relative;
  z-index: 2;
}

.hero-logo-model model-viewer {
  /* GPU optimized 3D model transitions */
  transform: translate3d(0, 0, 0) scale(0.8);
  backface-visibility: hidden;
  contain: layout style paint;
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
  /* Ensure logo is visible during transition */
  opacity: 0;
}

.intro-logo-container model-viewer:focus,
.intro-logo-container model-viewer:focus-visible {
  outline: none !important;
  box-shadow: none !important;
}

/* Also fix the hero logo */
.hero-logo-model model-viewer {
  --focus-visible-outline: none;
  --progress-bar-color: transparent;
  --progress-mask: transparent;
}

.hero-logo-model model-viewer:focus,
.hero-logo-model model-viewer:focus-visible {
  outline: none !important;
  box-shadow: none !important;
}

@keyframes logoFloat {
  0%, 100% { transform: translate3d(0, 0px, 0); }
  50% { transform: translate3d(0, -20px, 0); }
}

/* Ken Burns effect for cinematic depth on final frame - GPU optimized */
@keyframes kenBurnsEffect {
  0% { 
    transform: scale3d(1.0, 1.0, 1) translate3d(0px, 0px, 0);
  }
  20% { 
    transform: scale3d(1.015, 1.015, 1) translate3d(-3px, -2px, 0);
  }
  40% { 
    transform: scale3d(1.03, 1.03, 1) translate3d(2px, -3px, 0);
  }
  60% { 
    transform: scale3d(1.025, 1.025, 1) translate3d(-1px, 1px, 0);
  }
  80% { 
    transform: scale3d(1.04, 1.04, 1) translate3d(1px, -1px, 0);
  }
  100% { 
    transform: scale3d(1.05, 1.05, 1) translate3d(-2px, 0px, 0);
  }
}

.intro-enter-button {
  position: relative;
  margin-top: 1rem;
}

.enter-btn {
  position: relative;
  background: linear-gradient(135deg, #0a0a0a 0%, #1a2f4a 30%, #2a4a6b 60%, var(--primary-color) 100%);
  border: 2px solid transparent;
  background-clip: padding-box;
  color: var(--text-white);
  font-family: var(--font-secondary);
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: 2px;
  padding: 1rem 3rem;
  border-radius: 50px;
  cursor: pointer;
  overflow: visible;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease-out;
  transform: perspective(1000px) rotateX(0deg) rotateY(0deg) translate3d(0, 0, 0);
  box-shadow: 
    0 10px 30px rgba(10, 10, 10, 0.6),
    0 5px 15px rgba(0, 212, 255, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    inset 0 -1px 0 rgba(0, 0, 0, 0.3);
  /* GPU optimized button */
  backface-visibility: hidden;
  contain: layout style paint;
  /* Enable 3D space for children */
  transform-style: preserve-3d;
}

.enter-btn:hover {
  background: linear-gradient(135deg, #0a0a0a 0%, #2a4a6b 25%, #1a3d5c 50%, var(--primary-color) 100%);
  box-shadow: 
    0 15px 40px rgba(10, 10, 10, 0.8),
    0 8px 25px rgba(0, 212, 255, 0.4),
    0 0 20px rgba(0, 212, 255, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    inset 0 -1px 0 rgba(0, 0, 0, 0.4);
  transform: perspective(1000px) rotateX(2deg) rotateY(2deg) translate3d(0, -2px, 0);
}

.enter-btn:active {
  transform: perspective(1000px) scale3d(0.98, 0.98, 1) rotateX(1deg) rotateY(1deg) translate3d(0, 0, 0);
  background: linear-gradient(135deg, #000000 0%, #1a2f4a 30%, #0a3d5c 60%, #00a8cc 100%);
  box-shadow: 
    0 5px 15px rgba(10, 10, 10, 0.7),
    0 2px 8px rgba(0, 212, 255, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    inset 0 -1px 0 rgba(0, 0, 0, 0.5);
}

/* Enhanced focus state for keyboard navigation */
.enter-btn:focus {
  outline: none;
  background: linear-gradient(135deg, #0a0a0a 0%, #2a4a6b 25%, #1a3d5c 50%, var(--primary-color) 100%);
  box-shadow: 
    0 15px 40px rgba(10, 10, 10, 0.8),
    0 8px 25px rgba(0, 212, 255, 0.4),
    0 0 20px rgba(0, 212, 255, 0.3),
    0 0 0 3px rgba(0, 212, 255, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    inset 0 -1px 0 rgba(0, 0, 0, 0.4);
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
  .enter-btn:hover {
    background: linear-gradient(135deg, #0a0a0a 0%, #1a3d5c 30%, #2a4a6b 60%, var(--primary-color) 100%);
    transform: perspective(1000px) scale(1.02);
  }
  
  .enter-btn:active {
    background: linear-gradient(135deg, #000000 0%, #1a2f4a 30%, #0a3d5c 60%, #00a8cc 100%);
    transform: perspective(1000px) scale(0.95);
  }
}

/* Enhanced interaction feedback */
.enter-btn {
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

/* Pointer device enhancements */
@media (pointer: fine) {
  .enter-btn:hover {
    cursor: pointer;
  }
  
  .enter-btn:hover .btn-3d-text {
    transform: translateZ(18px);
    text-shadow: 
      0 1px 0 rgba(0, 0, 0, 0.5),
      0 2px 0 rgba(0, 0, 0, 0.4),
      0 3px 0 rgba(0, 0, 0, 0.3),
      0 5px 10px rgba(0, 212, 255, 0.3),
      0 0 15px rgba(255, 255, 255, 0.15);
  }
  
  .enter-btn:hover .btn-3d-shadow {
    transform: translateZ(-8px) translateY(3px) translateX(2px);
    opacity: 1;
  }
}

/* Subtle pulse animation when button is ready */
.enter-btn:not(:hover):not(:active) {
  animation: subtlePulse 4s ease-in-out infinite;
}

@keyframes subtlePulse {
  0%, 100% {
    transform: perspective(1000px) rotateX(0deg) rotateY(0deg) translate3d(0, 0, 0) scale3d(1, 1, 1);
    box-shadow: 
      0 10px 30px rgba(10, 10, 10, 0.6),
      0 5px 15px rgba(0, 212, 255, 0.2),
      inset 0 1px 0 rgba(255, 255, 255, 0.1),
      inset 0 -1px 0 rgba(0, 0, 0, 0.3);
  }
  50% {
    transform: perspective(1000px) rotateX(0deg) rotateY(0deg) translate3d(0, 0, 0) scale3d(1.005, 1.005, 1);
    box-shadow: 
      0 12px 35px rgba(10, 10, 10, 0.7),
      0 6px 18px rgba(0, 212, 255, 0.25),
      0 0 10px rgba(0, 212, 255, 0.1),
      inset 0 1px 0 rgba(255, 255, 255, 0.12),
      inset 0 -1px 0 rgba(0, 0, 0, 0.35);
  }
}

.btn-glow {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.2), rgba(255, 255, 255, 0.1), transparent);
  border-radius: 50px;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.enter-btn:hover .btn-glow {
  opacity: 1;
}

/* Add animated border effect */
.enter-btn::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(45deg, transparent, rgba(0, 212, 255, 0.4), transparent, rgba(0, 212, 255, 0.4), transparent);
  background-size: 400% 400%;
  border-radius: 50px;
  opacity: 0;
  z-index: -1;
  animation: borderGlow 3s ease-in-out infinite;
  transition: opacity 0.4s ease;
}

.enter-btn:hover::before {
  opacity: 1;
}

@keyframes borderGlow {
  0%, 100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

/* 3D Text Container */
.btn-3d-container {
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.3s ease;
}

/* 3D Text Main */
.btn-3d-text {
  position: relative;
  z-index: 2;
  display: inline-block;
  transform: translate3d(0, 0, 15px);
  text-shadow: 
    0 1px 0 rgba(0, 0, 0, 0.4),
    0 2px 0 rgba(0, 0, 0, 0.3),
    0 3px 0 rgba(0, 0, 0, 0.2),
    0 4px 8px rgba(0, 212, 255, 0.2),
    0 0 10px rgba(255, 255, 255, 0.1);
  contain: layout style paint;
  filter: drop-shadow(0 0 3px rgba(0, 212, 255, 0.3));
}

/* 3D Text Shadow/Depth */
.btn-3d-shadow {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
  color: rgba(0, 0, 0, 0.6);
  transform: translate3d(1px, 2px, -5px);
  opacity: 0.8;
  pointer-events: none;
  contain: layout style paint;
  text-shadow: 
    0 1px 2px rgba(0, 212, 255, 0.3),
    0 2px 4px rgba(10, 10, 10, 0.5);
}

/* Enhanced 3D perspective for intro container */
.intro-enter-button {
  perspective: 1000px;
  perspective-origin: center center;
}

/* Remove old pulse animation since GSAP handles animation now */
.enter-btn {
  /* Animation now handled by GSAP */
}

/* Body scroll lock */
body.intro-active {
  overflow: hidden;
  height: 100%;
}

/* Hero content initially hidden during intro */
body.intro-active .hero-content {
  opacity: 0;
  transform: translate3d(0, 30px, 0);
  transition: opacity 1s ease-out, transform 1s ease-out;
  /* GPU optimized content transitions */
  backface-visibility: hidden;
  contain: layout style paint;
}

.hero-content.revealed {
  opacity: 1 !important;
  transform: translate3d(0, 0, 0) !important;
}

/* Ensure hero content is visible by default when intro is not active */
.hero-content {
  opacity: 1;
  transform: translate3d(0, 0, 0);
  transition: opacity 1s ease-out, transform 1s ease-out;
  /* GPU optimized content transitions */
  backface-visibility: hidden;
  contain: layout style paint;
}

/* Ensure CTA buttons are always visible when hero content is revealed */
.hero-content.revealed .hero-cta,
.hero-content.revealed .hero-stats {
  opacity: 1 !important;
  transform: translate3d(0, 0, 0) !important;
  visibility: visible !important;
}

/* Header initially hidden during intro */
body.intro-active #header-container {
  opacity: 0;
  transform: translate3d(0, -20px, 0);
  transition: opacity 1s ease-out, transform 1s ease-out;
  /* GPU optimized header transitions */
  backface-visibility: hidden;
  contain: layout style paint;
  height: var(--navbar-height); /* Maintain height even when hidden */
  min-height: var(--navbar-height); /* Prevent height collapse */
}

#header-container.revealed {
  opacity: 1 !important;
  transform: translate3d(0, 0, 0) !important;
  visibility: visible !important;
  display: block !important;
  height: var(--navbar-height) !important; /* Force proper height when revealed */
  min-height: var(--navbar-height) !important; /* Prevent any height collapse */
}

/* Ensure header is visible by default when intro is not active */
#header-container {
  opacity: 1;
  transform: translate3d(0, 0, 0);
  transition: opacity 1s ease-out, transform 1s ease-out;
  /* GPU optimized header transitions */
  backface-visibility: hidden;
  contain: layout style paint;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  display: block;
  visibility: visible;
  height: var(--navbar-height); /* Ensure header has proper height */
  min-height: var(--navbar-height); /* Prevent height collapse during animations */
}

/* Ensure proper header positioning during intro reveal */
#header-container.revealed {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  z-index: 1000 !important;
  display: block !important;
  visibility: visible !important;
  height: var(--navbar-height) !important; /* Ensure consistent height */
  min-height: var(--navbar-height) !important; /* Prevent height collapse */
}

.hero-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
}

.hero-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* GPU optimized video rendering */
  transform: translate3d(0, 0, 0);
  backface-visibility: hidden;
  contain: layout style paint;
  transition: opacity 0.8s ease-in-out;
}

/* Ken Burns effect for hero video when paused on final frame */
.hero-video.final-frame {
  animation: kenBurnsEffect 25s ease-in-out infinite alternate;
  transform-origin: center center;
}

/* Hero final background for smooth transitions */
.hero-final-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: -2;
  transform: translate3d(0, 0, 0);
  backface-visibility: hidden;
  contain: layout style paint;
  /* Ken Burns effect - subtle zoom and pan for depth */
  animation: kenBurnsEffect 20s ease-in-out infinite alternate;
  transform-origin: center center;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    rgba(10, 10, 10, 0.8) 0%,
    rgba(26, 26, 26, 0.6) 50%,
    rgba(0, 212, 255, 0.1) 100%
  );
  z-index: -1;
}

.hero-content {
  text-align: center;
  z-index: 1;
  max-width: 900px;
  margin: 0 auto;
  padding: 80px var(--container-padding) 0;
}

.hero-title {
  font-family: var(--font-secondary);
  font-size: clamp(3rem, 6vw, 5rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 1.5rem;
}

.hero-title .highlight {
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--secondary-color)
  );
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1.3rem;
  color: var(--text-grey);
  margin-bottom: 3rem;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 3rem;
  margin-bottom: 3rem;
  flex-wrap: wrap;
}

.stat-item {
  text-align: center;
}

.stat-number {
  display: block;
  font-size: 3rem;
  font-weight: 700;
  color: var(--primary-color);
  font-family: var(--font-secondary);
}

.stat-label {
  font-size: 0.9rem;
  color: var(--text-grey);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.hero-cta {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

.scroll-indicator {
  position: absolute;
  bottom: 4rem;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  color: var(--text-grey);
  font-size: 0.9rem;
  z-index: 10;
}

.scroll-indicator-positioned {
  bottom: 1.5rem;
}

.scroll-mouse {
  width: 24px;
  height: 40px;
  border: 2px solid var(--primary-color);
  border-radius: 20px;
  margin: 0 auto 0.5rem;
  position: relative;
}

.scroll-wheel {
  width: 4px;
  height: 8px;
  background: var(--primary-color);
  border-radius: 2px;
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translate3d(-50%, 0, 0);
  animation: scroll-wheel 2s infinite;
  contain: layout style paint;
}

@keyframes scroll-wheel {
  0%,
  100% {
    transform: translate3d(-50%, 0, 0);
    opacity: 1;
  }
  50% {
    transform: translate3d(-50%, 12px, 0);
    opacity: 0.5;
  }
}

/* =======================
   ABOUT SECTION
   ======================= */
.about {
  background: var(--background-grey);
}

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

.about-text h3 {
  font-family: var(--font-secondary);
  font-size: 2rem;
  margin-bottom: 1.5rem;
  color: var(--primary-color);
}

.about-text p {
  margin-bottom: 1.5rem;
  color: var(--text-grey);
  line-height: 1.8;
}

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

.feature-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--text-white);
}

.feature-item i {
  color: var(--primary-color);
  font-size: 1.2rem;
  width: 20px;
}

.about-timeline {
  position: relative;
  padding-left: 2rem;
}

.about-timeline::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 2px;
  height: 100%;
  background: linear-gradient(
    to bottom,
    var(--primary-color),
    var(--secondary-color)
  );
}

.timeline-item {
  position: relative;
  margin-bottom: 2rem;
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--border-radius);
  padding: 1.5rem;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -2.5rem;
  top: 1.5rem;
  width: 12px;
  height: 12px;
  background: var(--primary-color);
  border-radius: 50%;
  border: 3px solid var(--background-grey);
}

.timeline-year {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.timeline-content h4 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  color: var(--text-white);
}

.timeline-content p {
  color: var(--text-grey);
}

/* =======================
   SERVICES SECTION
   ======================= */
.services {
  background: var(--background-dark);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-bottom: 4rem;
}

.service-card {
  padding: 2.5rem;
  text-align: center;
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.service-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px var(--shadow-dark);
}

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

.service-card:hover::before {
  left: 100%;
}

.service-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--primary-dark)
  );
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  font-size: 2rem;
  color: white;
}

.service-card h3 {
  font-family: var(--font-secondary);
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--text-white);
}

.service-card p {
  color: var(--text-grey);
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.service-price {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 1.5rem;
}

.service-features {
  text-align: left;
  margin-bottom: 2rem;
}

.service-features li {
  padding: 0.5rem 0;
  color: var(--text-grey);
  position: relative;
  padding-left: 1.5rem;
}

.service-features li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--primary-color);
  font-weight: bold;
}

.service-btn {
  background: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
  padding: 0.75rem 1.5rem;
  border-radius: var(--border-radius);
  font-weight: 600;
  transition: var(--transition-smooth);
  width: 100%;
}

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

.service-calculator {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--border-radius-lg);
  padding: 3rem;
  text-align: center;
  margin-top: 4rem;
}

.service-calculator h3 {
  font-family: var(--font-secondary);
  font-size: 2rem;
  margin-bottom: 2rem;
  color: var(--primary-color);
}

.calculator-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.calculator-form select,
.calculator-form input {
  padding: 1rem;
  border: 2px solid var(--glass-border);
  border-radius: var(--border-radius);
  background: var(--glass-bg);
  color: var(--text-white);
  font-family: inherit;
  transition: var(--transition-smooth);
}

.calculator-form select:focus,
.calculator-form input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
}

.quote-result {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--border-radius);
  padding: 2rem;
  margin-top: 2rem;
  display: none;
}

/* =======================
   GALLERY SECTION
   ======================= */
.gallery {
  background: var(--background-grey);
}

.gallery-tabs {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 3rem;
  flex-wrap: wrap;
}

.tab-btn {
  padding: 0.75rem 1.5rem;
  background: transparent;
  color: var(--text-grey);
  border: 2px solid var(--glass-border);
  border-radius: var(--border-radius);
  font-weight: 600;
  transition: var(--transition-smooth);
}

.tab-btn.active,
.tab-btn:hover {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.gallery-item {
  position: relative;
  border-radius: var(--border-radius);
  overflow: hidden;
  aspect-ratio: 4/3;
  cursor: pointer;
  transition: var(--transition-smooth);
}

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

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-smooth);
}

.gallery-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    rgba(0, 0, 0, 0.6) 0%,
    rgba(0, 212, 255, 0.3) 100%
  );
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 2rem;
  opacity: 0;
  transition: var(--transition-smooth);
}

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

.gallery-overlay h4 {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
  color: var(--text-white);
}

.gallery-overlay p {
  color: var(--text-grey);
  margin-bottom: 1rem;
}

.gallery-btn {
  background: var(--primary-color);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: var(--border-radius);
  font-weight: 600;
  transition: var(--transition-smooth);
}

.gallery-btn:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
}

/* =======================
   MODAL STYLES
   ======================= */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: var(--z-modal);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.service-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  width: 90%;
  max-width: 900px;
  max-height: 90vh;
  background: var(--background-dark);
  border-radius: var(--border-radius-lg);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  z-index: calc(var(--z-modal) + 1);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.service-modal.active {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
}

.modal-content {
  height: 100%;
  overflow-y: auto;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 40px;
  height: 40px;
  background: rgba(0, 0, 0, 0.5);
  color: var(--text-white);
  border: none;
  border-radius: 50%;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  z-index: 10;
  transition: var(--transition-smooth);
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover {
  background: var(--primary-color);
  transform: scale(1.1);
}

.modal-header {
  position: relative;
  height: 300px;
  overflow: hidden;
}

.modal-main-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal-vehicle-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.9),
    rgba(0, 0, 0, 0.6),
    transparent
  );
  color: var(--text-white);
  padding: 2rem;
}

.modal-vehicle-info h2 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  font-family: var(--font-secondary);
}

.vehicle-details {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.service-type,
.vehicle-year {
  background: var(--primary-color);
  color: var(--text-white);
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
}

.vehicle-year {
  background: var(--secondary-color);
}

.modal-body {
  padding: 2rem;
}

.service-description h3 {
  font-size: 1.5rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
  font-family: var(--font-secondary);
}

.service-description p {
  color: var(--text-grey);
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.service-description h4 {
  color: var(--text-white);
  margin: 1.5rem 0 1rem;
  font-size: 1.2rem;
}

.service-list {
  list-style: none;
  margin-bottom: 2rem;
}

.service-list li {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 0.8rem;
  color: var(--text-grey);
}

.service-list li i {
  color: var(--primary-color);
  font-size: 0.9rem;
}

.modal-images h4 {
  color: var(--text-white);
  margin-bottom: 1rem;
  font-size: 1.2rem;
}

.image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.image-grid img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: var(--border-radius);
  transition: var(--transition-smooth);
}

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

.modal-cta {
  background: var(--background-grey);
  padding: 2rem;
  text-align: center;
  border-top: 1px solid var(--glass-border);
}

.cta-button {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--primary-dark)
  );
  color: var(--text-white);
  padding: 1rem 2rem;
  border-radius: var(--border-radius);
  font-weight: 600;
  font-size: 1.1rem;
  text-decoration: none;
  transition: var(--transition-smooth);
  margin-bottom: 1rem;
  box-shadow: 0 4px 20px var(--shadow-light);
}

.cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px var(--shadow-light);
}

.cta-button i {
  font-size: 1.2rem;
}

.modal-cta p {
  color: var(--text-grey);
  font-size: 0.9rem;
}

/* =======================
   REVIEWS SECTION
   ======================= */
.reviews {
  background: var(--background-dark);
}

.reviews-carousel {
  display: flex;
  gap: 2rem;
  overflow-x: auto;
  padding: 1rem 0;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
  margin-bottom: 2rem;
}

.reviews-carousel::-webkit-scrollbar {
  display: none;
}

.review-card {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--border-radius-lg);
  padding: 2rem;
  text-align: left;
  transition: var(--transition-smooth);
  min-width: 350px;
  max-width: 400px;
  height: auto;
  min-height: 400px;
  flex-shrink: 0;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.review-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px var(--shadow-dark);
}

.review-stars {
  margin-bottom: 1.5rem;
  text-align: center;
}

.review-stars i {
  color: #ffd700;
  font-size: 1.2rem;
  margin: 0 0.1rem;
}

.review-text {
  font-size: 0.95rem;
  color: var(--text-grey);
  line-height: 1.6;
  margin-bottom: 1.5rem;
  font-style: italic;
  flex: 1;
  overflow-wrap: break-word;
  word-wrap: break-word;
  hyphens: auto;
  display: -webkit-box;
  -webkit-line-clamp: 8;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.review-author {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--glass-border);
}

.author-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--glass-bg);
  border: 3px solid var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-color);
  font-size: 1.5rem;
}

.author-info h4 {
  color: var(--text-white);
  margin-bottom: 0.25rem;
}

.author-info span {
  color: var(--text-grey);
  font-size: 0.9rem;
}

.trust-badges {
  display: flex;
  justify-content: center;
  gap: 3rem;
  flex-wrap: wrap;
}

.badge-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-white);
}

.badge-item i {
  font-size: 2rem;
  color: var(--primary-color);
}

.badge-item span {
  font-weight: 600;
  text-align: center;
}

/* Reviews Navigation */
.reviews-navigation {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  margin-bottom: 3rem;
}

.nav-dots {
  display: flex;
  gap: 0.5rem;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--glass-border);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.dot.active,
.dot:hover {
  background: var(--primary-color);
  transform: scale(1.2);
}

.nav-arrows {
  display: flex;
  gap: 1rem;
}

.nav-arrow {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.nav-arrow:hover {
  background: var(--primary-color);
  color: white;
  transform: translateY(-2px);
}

.nav-arrow:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* =======================
   CONTACT SECTION
   ======================= */
.contact {
  background: var(--background-grey);
}

.contact-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  margin-bottom: 4rem;
}

.contact-info h3 {
  font-family: var(--font-secondary);
  font-size: 2rem;
  margin-bottom: 1rem;
  color: var(--primary-color);
}

.contact-info p {
  color: var(--text-grey);
  margin-bottom: 2rem;
  line-height: 1.6;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 2rem;
}

.contact-item i {
  color: var(--primary-color);
  font-size: 1.5rem;
  margin-top: 0.25rem;
  width: 30px;
}

.contact-item h4 {
  color: var(--text-white);
  margin-bottom: 0.25rem;
}

.contact-item a {
  color: var(--primary-color);
  transition: var(--transition-smooth);
}

.contact-item a:hover {
  color: var(--primary-dark);
}

.contact-social {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
}

.social-link {
  width: 50px;
  height: 50px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-color);
  font-size: 1.2rem;
  transition: var(--transition-smooth);
}

.social-link:hover {
  background: var(--primary-color);
  color: white;
  transform: translateY(-3px);
}

.social-link.whatsapp:hover {
  background: #25d366;
}

.contact-form-container {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--border-radius-lg);
  padding: 3rem;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-group {
  position: relative;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 1.2rem;
  background: var(--glass-bg);
  border: 2px solid var(--glass-border);
  border-radius: var(--border-radius);
  color: var(--text-white);
  font-family: inherit;
  font-size: 1rem;
  transition: var(--transition-smooth);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
}

.form-group label {
  position: absolute;
  top: 1rem;
  left: 1rem;
  transform: translateY(0);
  color: var(--text-grey);
  pointer-events: none;
  transition: all 0.2s ease;
}

.form-group input:focus + label,
.form-group input:not(:placeholder-shown) + label,
.form-group textarea:focus + label,
.form-group textarea:not(:placeholder-shown) + label,
.form-group select:focus + label,
.form-group select:not(:placeholder-shown) + label {
  top: -0.5rem;
  left: 1rem;
  font-size: 0.8rem;
  color: var(--primary-color);
  background: var(--background-grey);
  padding: 0 0.5rem;
}

.submit-btn {
  position: relative;
  overflow: hidden;
}

.btn-loading {
  display: none;
}

.submit-btn.loading .btn-text {
  display: none;
}

.submit-btn.loading .btn-loading {
  display: inline-block;
}

.form-success {
  display: none;
  text-align: center;
  padding: 2rem;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--border-radius);
  margin-top: 2rem;
}

.form-success i {
  font-size: 3rem;
  color: #00ff88;
  margin-bottom: 1rem;
}

.form-success h3 {
  color: var(--text-white);
  margin-bottom: 0.5rem;
}

.form-success p {
  color: var(--text-grey);
}

.map-container {
  position: relative;
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: 0 10px 30px var(--shadow-dark);
}

.map-overlay {
  position: absolute;
  top: 2rem;
  left: 2rem;
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  color: var(--text-white);
  z-index: var(--z-overlay);
}

.map-overlay h4 {
  margin-bottom: 0.5rem;
  color: var(--primary-color);
}

/* =======================
   FOOTER
   ======================= */
.footer {
  background: var(--background-dark);
  border-top: 1px solid var(--glass-border);
  padding: 3rem 0 1rem;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 3rem;
  margin-bottom: 2rem;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-secondary);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.footer-logo-image {
  height: 50px;
  width: auto;
  object-fit: contain;
}

.footer-section h4 {
  color: var(--primary-color);
  margin-bottom: 1rem;
  font-family: var(--font-secondary);
}

.footer-section ul {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-section ul li {
  color: var(--text-grey);
  transition: var(--transition-smooth);
}

.footer-section ul li:hover {
  color: var(--primary-color);
}

.footer-section ul li a {
  transition: var(--transition-smooth);
}

.footer-section ul li a:hover {
  color: var(--primary-color);
}

.footer-section p {
  color: var(--text-grey);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.footer-social {
  display: flex;
  gap: 1rem;
}

.footer-social a {
  width: 40px;
  height: 40px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-color);
  transition: var(--transition-smooth);
}

.footer-social a:hover {
  background: var(--primary-color);
  color: white;
  transform: translateY(-2px);
}

.footer-bottom {
  border-top: 1px solid var(--glass-border);
  padding-top: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-grey);
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-links {
  display: flex;
  gap: 2rem;
}

.footer-links a {
  color: var(--text-grey);
  transition: var(--transition-smooth);
}

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

.footer-credit {
  border-top: 1px solid var(--glass-border);
  padding-top: 1rem;
  margin-top: 1rem;
  text-align: center;
}

.footer-credit p {
  color: var(--text-grey);
  font-size: 0.9rem;
  margin: 0;
}

.footer-credit a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition-smooth);
}

.footer-credit a:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

/* =======================
   FLOATING BUTTONS
   ======================= */
.floating-buttons {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  z-index: var(--z-floating);
  /* Initially hidden during intro */
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: opacity 1s ease-out, visibility 1s ease-out, transform 1s ease-out;
}

/* Show floating buttons after intro */
body.intro-complete .floating-buttons {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.float-btn {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: white;
  box-shadow: 0 6px 20px var(--shadow-dark);
  transition: var(--transition-smooth);
  border: none;
  /* Initially hidden for staggered animation */
  opacity: 0;
  transform: translateY(20px) scale(0.8);
  will-change: opacity, transform;
}

.float-btn:hover {
  transform: translateY(-3px) scale(1.1);
}

.call-btn {
  background: linear-gradient(135deg, #00ff88, #00cc6a);
}

.whatsapp-btn {
  background: linear-gradient(135deg, #25d366, #1aaa4f);
}

.scroll-top {
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--primary-dark)
  );
  opacity: 0;
  visibility: hidden;
  transition: var(--transition-smooth);
}

.scroll-top.visible {
  opacity: 1;
  visibility: visible;
}

/* =======================
   RESPONSIVE DESIGN
   ======================= */
@media (max-width: 1024px) {
  .hero-stats {
    gap: 2rem;
  }

  .about-content {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .contact-content {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
}

/* Tablet styles */
@media (max-width: 1024px) and (min-width: 769px) {
  .intro-content {
    gap: 2.5rem;
  }
  
  .intro-logo-container model-viewer {
    width: 175px !important;
    height: 175px !important;
  }
  
  .enter-btn {
    font-size: 1.1rem;
    padding: 0.9rem 2.75rem;
  }
}

@media (max-width: 768px) {
  :root {
    --container-padding: 1rem;
    --section-padding: 3rem 0;
    --navbar-height: 85px;
  }

  /* Navigation Mobile */
  .nav-menu {
    position: fixed;
    top: var(--navbar-height);
    left: -100%;
    width: 100%;
    height: calc(100vh - var(--navbar-height));
    background: rgba(10, 10, 10, 0.98);
    backdrop-filter: blur(20px);
    flex-direction: column;
    justify-content: start;
    padding-top: 2rem;
    transition: var(--transition-smooth);
    z-index: var(--z-navbar);
    overflow-y: auto;
  }

  .nav-menu.active {
    left: 0;
  }

  .nav-toggle {
    display: flex;
    z-index: calc(var(--z-navbar) + 1);
  }

  .nav-toggle.active .bar:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .nav-toggle.active .bar:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle.active .bar:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
  }

  /* Mobile menu items */
  .nav-menu .nav-item {
    margin: 0.5rem 0;
    text-align: center;
  }

  .nav-menu .nav-link {
    font-size: 1.2rem;
    padding: 1rem;
    display: block;
    color: var(--text-white);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: var(--transition-smooth);
  }

  .nav-menu .nav-link:hover {
    color: var(--primary-color);
    background: rgba(255, 107, 53, 0.1);
  }

  .nav-menu .nav-cta-btn {
    background: var(--primary-color);
    color: var(--text-white);
    border-radius: 8px;
    padding: 1rem 2rem;
    margin: 1rem;
    display: inline-block;
    text-decoration: none;
    transition: var(--transition-smooth);
  }

  .nav-menu .nav-cta-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
  }

  /* Hero Mobile */
  .hero {
    padding-top: calc(
      var(--navbar-height) + 10px
    ); /* Account for fixed navbar height with buffer */
    min-height: 100vh;
    height: auto;
    box-sizing: border-box;
  }

  .hero-content {
    padding: 20px var(--container-padding) 0;
  }

  .hero-cta {
    flex-direction: column;
    align-items: center;
  }

  .hero-stats {
    flex-direction: column;
    gap: 1.5rem;
  }

  .scroll-indicator {
    bottom: 2rem;
  }

  /* Intro Overlay Mobile */
  .intro-content {
    gap: 2rem;
    padding: 1rem;
  }

  .intro-logo-container model-viewer {
    width: 150px !important;
    height: 150px !important;
  }

  .enter-btn {
    font-size: 1rem;
    padding: 0.8rem 2.5rem;
  }

  /* Services Mobile */
  .services-grid {
    grid-template-columns: 1fr;
  }

  .calculator-form {
    grid-template-columns: 1fr;
  }

  /* Gallery Mobile */
  .gallery-tabs {
    justify-content: start;
    overflow-x: auto;
    padding-bottom: 1rem;
  }

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

  /* Modal Responsive */
  .service-modal {
    width: 95%;
    max-height: 95vh;
  }

  .modal-header {
    height: 200px;
  }

  .modal-vehicle-info h2 {
    font-size: 1.5rem;
  }

  .modal-body {
    padding: 1.5rem;
  }

  .modal-cta {
    padding: 1.5rem;
  }

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

  .vehicle-details {
    flex-direction: column;
    gap: 0.5rem;
  }

  /* Reviews Mobile */
  .review-card {
    min-width: 280px;
    max-width: 320px;
    min-height: 350px;
    padding: 1.5rem;
  }

  .review-text {
    font-size: 0.9rem;
    -webkit-line-clamp: 6;
  }

  .reviews-navigation {
    flex-direction: column;
    gap: 1rem;
  }

  .trust-badges {
    gap: 1.5rem;
  }

  /* Footer Mobile */
  .footer-content {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }

  /* Floating Buttons Mobile */
  .floating-buttons {
    bottom: 1rem;
    right: 1rem;
  }

  .float-btn {
    width: 50px;
    height: 50px;
    font-size: 1.2rem;
  }
}

@media (max-width: 480px) {
  .hero {
    padding-top: calc(
      var(--navbar-height) + 10px
    ); /* Keep consistent navbar height account with buffer */
  }

  .hero-content {
    padding: 10px var(--container-padding) 0;
  }

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

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

  .section-title {
    font-size: 2rem;
  }

  .btn {
    padding: 0.8rem 1.5rem;
    font-size: 0.9rem;
  }

  .service-card,
  .contact-form-container {
    padding: 2rem;
  }

  .map-overlay {
    top: 1rem;
    left: 1rem;
    right: 1rem;
    padding: 1rem;
  }

  .scroll-indicator {
    bottom: 1rem;
  }
}

/* =======================
   ANIMATIONS & EFFECTS
   ======================= */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Loading Animation - GPU optimized */
@keyframes spin {
  to {
    transform: rotate3d(0, 0, 1, 360deg);
  }
}

.fa-spin {
  animation: spin 1s linear infinite;
}

/* Pulse Animation for CTA buttons */
@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(0, 212, 255, 0.7);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(0, 212, 255, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(0, 212, 255, 0);
  }
}

.btn-primary:hover {
  animation: pulse 2s infinite;
}

/* Parallax effect */
.parallax {
  transform: translateZ(0);
  will-change: transform;
}

/* Smooth transitions for all interactive elements */
* {
  transition: var(--transition-smooth);
}

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

/* Print styles */
@media print {
  .navbar,
  .floating-buttons,
  .hero-video,
  .map-container {
    display: none;
  }

  body {
    background: white;
    color: black;
  }

  .section-title {
    color: black;
  }
}

/* =======================
   PERFORMANCE OPTIMIZATIONS
   ======================= */

/* GPU-accelerated base transforms for all animated elements */
.intro-content,
.hero-content,
.service-card,
.gallery-item,
.review-card,
.float-btn {
  transform: translate3d(0, 0, 0);
  backface-visibility: hidden;
}

/* Optimize compositing layers for smooth animations */
.enter-btn,
.btn-3d-container,
.hero-video,
.intro-video,
model-viewer {
  will-change: auto; /* Let browser decide when to optimize */
}

/* Universal model-viewer focus/outline removal - Fixes boxes around 3D models when clicked */
model-viewer {
  --focus-visible-outline: none !important;
  --progress-bar-color: transparent !important;
  --progress-mask: transparent !important;
}

model-viewer:focus,
model-viewer:focus-visible,
model-viewer:active {
  outline: none !important;
  box-shadow: none !important;
  border: none !important;
}

/* Remove any webkit focus rings on model-viewer */
model-viewer::-webkit-focus-ring {
  display: none !important;
}

/* Progress bar styling for model-viewer loading */
.progress-bar {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 4px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 2px;
  overflow: hidden;
  z-index: 10;
}

.update-bar {
  height: 100%;
  background: linear-gradient(90deg, #ff6b35, #f7931e);
  border-radius: 2px;
  width: 0%;
  transition: width 0.3s ease;
  animation: progressGlow 1.5s ease-in-out infinite alternate;
}

@keyframes progressGlow {
  0% { box-shadow: 0 0 5px rgba(255, 107, 53, 0.5); }
  100% { box-shadow: 0 0 20px rgba(255, 107, 53, 0.8); }
}

/* Safari-specific model-viewer fixes */
@supports (-webkit-appearance: none) {
  model-viewer {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;
  }
}

/* WebGL fallback styles */
.no-webgl model-viewer {
  display: none;
}

.no-webgl model-viewer [slot="poster"] {
  display: block !important;
  opacity: 1 !important;
}

/* Enhanced fallback for devices with WebGL issues */
@media (max-width: 768px) {
  model-viewer {
    /* Reduce complexity on mobile */
    --min-hotspot-opacity: 0.5;
    --max-hotspot-opacity: 1;
  }
  
  /* Force poster display on very old mobile devices */
  .no-webgl model-viewer [slot="poster"] {
    position: relative;
    width: 100%;
    height: 100%;
    background: #f5f5f5;
    border-radius: 8px;
  }
}

/* Critical animations that need GPU acceleration */
.intro-overlay,
.hero-logo-model,
.intro-logo-container,
.hero-content,
#header-container {
  transform: translate3d(0, 0, 0);
  contain: layout style paint;
}

/* =======================
   PERFORMANCE MEDIA QUERIES
   ======================= */

/* Disable animations on low-end devices */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Optimize for low-performance devices */
@media (max-resolution: 1.5dppx) {
  .hero-video.final-frame,
  .intro-video.final-frame {
    animation: none; /* Disable Ken Burns on low-res displays */
  }
  
  .enter-btn::before {
    animation: none; /* Disable complex border animations */
  }
}

/* High refresh rate optimizations */
@media (min-resolution: 2dppx) {
  .enter-btn,
  .hero-video,
  .intro-video {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: optimize-contrast;
  }
}
