/* 
 * Pemai Rent A Car - Custom Styles
 * Modern, Mobile-First, Accessible
 */

/* 1. GLOBAL DEFAULTS & SMOOTHING */
html {
  scroll-behavior: smooth;
  /* Verhindert Text-Größenänderungen bei Orientierungswechsel auf Mobilgeräten */
  -webkit-text-size-adjust: 100%;
}

body {
  /* Verbessert die Schriftdarstellung auf Retina/Mac Displays */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/*1 A. Skip */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* 2. NAVIGATION: SLIDE-IN UNDERLINE */
.nav-link {
  position: relative;
  padding-bottom: 4px;
}

.nav-link::after {
  content: "";
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 0;
  background-color: #00aeef; /* Sky Blue */
  transition: width 0.3s cubic-bezier(0.65, 0.05, 0.36, 1);
}

.nav-link:hover::after {
  width: 100%;
}

/* HIGHLIGHT THE ACTIVE LANGUAGE */
.lang-btn.active svg {
  outline: 2px solid #00aeef;
  outline-offset: 3px;
  transform: scale(1.1);
}

.lang-btn:not(.active) {
  opacity: 0.6;
}

.lang-btn:hover {
  opacity: 1;
}

/* --- HERO SECTION STYLES (Rule 8 & 11) --- */

.hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  width: 100%;
  overflow: hidden;
  background-color: #000;
}

/* Gallery Container */
.hero-gallery {
  position: absolute;
  inset: 0;
  z-index: 0;
}

/* Individual Slides */
.hero-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.2s ease-in-out; /* Smooth crossfade from PRD */
}

.hero-slide.active {
  opacity: 1;
  z-index: 1;
}

/* Dark Gradient Overlay for Readability */
.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 10;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.3) 0%,
    rgba(0, 0, 0, 0) 50%,
    rgba(0, 0, 0, 0.7) 100%
  );
}

/* Content Positioning */
.hero-content {
  position: relative;
  z-index: 20;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
}

/* Funky Typography with clamp() */
.hero-title {
  font-family: "Poppins", sans-serif;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.3));
  font-size: clamp(2.5rem, 8vw, 5rem);
}

.hero-title .highlight {
  color: var(--color-pemai-yellow, #ffd700);
}

.hero-subtitle {
  font-size: clamp(1rem, 3vw, 1.5rem);
  max-width: 700px;
  margin-bottom: 2.5rem;
  opacity: 0.9;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* Navigation Dots */
.hero-dots {
  position: absolute;
  bottom: 120px; /* Space for the overlapping booking box */
  left: 50%;
  transform: translateX(-50%);
  z-index: 30;
  display: flex;
  gap: 0.75rem;
}

.hero-dot {
  width: 12px;
  height: 12px;
  border-radius: 99px;
  border: 2px solid #fff;
  background: transparent;
  cursor: pointer;
  transition: all 0.3s ease;
}

.hero-dot.active {
  background: #fff;
  transform: scale(1.2);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .hero-dots {
    bottom: 40px; /* On mobile the form is below, so dots can be lower */
  }
}

/* 4. CAR CARDS: BOUNCY LIFT EFFECT */
.car-card {
  transition:
    transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275),
    box-shadow 0.4s ease;
}

.car-card:hover {
  transform: translateY(-12px);
}

/* 5. ANIMATIONS: PULSING GOLD BUTTON */
@keyframes pulse-gold {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 215, 0, 0.6);
  }
  70% {
    box-shadow: 0 0 0 20px rgba(255, 215, 0, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 215, 0, 0);
  }
}

.pulse-gold {
  animation: pulse-gold 2s infinite;
}

/* 6. ACCESSIBILITY: REDUCED MOTION */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .hero-slide,
  .car-card,
  .nav-link::after {
    transition: none !important;
  }
  .pulse-gold {
    animation: none !important;
  }
}

/* 7. CUSTOM SCROLLBAR (Optional but Funky) */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #f1f1f1;
}
::-webkit-scrollbar-thumb {
  background: #00aeef;
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: #0081b0;
}
