/* ===================================
   MB-CarRental — Dark Premium Theme
   =================================== */

:root {
  --bg-base: #0a0a0f;
  --bg-surface: #12121a;
  --bg-elevated: #1a1a26;
  --bg-glass: rgba(255, 255, 255, 0.035);
  --bg-glass-hover: rgba(255, 255, 255, 0.06);

  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-medium: rgba(255, 255, 255, 0.1);
  --border-accent: rgba(59, 130, 246, 0.3);

  --accent: #3b82f6;
  --accent-light: #60a5fa;
  --accent-dark: #2563eb;
  --accent-glow: rgba(59, 130, 246, 0.15);

  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --success: #22c55e;
  --error: #ef4444;
  --whatsapp: #25d366;

  --radius: 1rem;
  --radius-lg: 1.5rem;
}

/* ── Base ────────────────────────── */
* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  scroll-padding-top: 88px;
}

body {
  background: var(--bg-base);
  color: var(--text-primary);
  font-feature-settings: "rlig" 1, "calt" 1;
  overflow-x: hidden;
  touch-action: pan-y;
}

/* Subtle noise texture overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.018;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 200px 200px;
}

/* ── Typography ──────────────────── */
.gradient-text-accent {
  background: linear-gradient(135deg, var(--accent-light), var(--accent), var(--accent-dark));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.gradient-text {
  background: linear-gradient(135deg, var(--accent-light), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-shadow {
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.5);
}

/* ── Glass Card ──────────────────── */
.glass-card {
  background: var(--bg-glass);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
  background: var(--bg-glass-hover);
  border-color: var(--border-medium);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.3);
}

.glass-card-accent:hover {
  border-color: var(--border-accent);
  box-shadow: 0 8px 40px var(--accent-glow), 0 0 0 1px var(--border-accent);
}

.glass-effect {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* ── Buttons ─────────────────────── */
.premium-button {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #ffffff;
  font-weight: 600;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 20px rgba(59, 130, 246, 0.2);
  position: relative;
  overflow: hidden;
}

.premium-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
  transition: left 0.5s ease;
}

.premium-button:hover::before {
  left: 100%;
}

.premium-button:hover {
  background: linear-gradient(135deg, var(--accent-light), var(--accent));
  box-shadow: 0 8px 32px rgba(59, 130, 246, 0.35);
  transform: translateY(-2px);
}

/* ── Vehicle Cards ───────────────── */
.vehicle-card {
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.vehicle-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-accent);
  box-shadow:
    0 25px 60px rgba(0, 0, 0, 0.4),
    0 0 0 1px var(--border-accent),
    0 0 40px var(--accent-glow);
}

/* ── Price Badge ─────────────────── */
.price-highlight {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #ffffff;
  padding: 0.6rem 1rem;
  border-radius: 10px;
  font-weight: 700;
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.2);
  transition: all 0.3s ease;
}

.price-highlight:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(59, 130, 246, 0.3);
}

/* ── Navigation ──────────────────── */
#navigation {
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

#navigation[data-scrolled="true"] {
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* Nav link hover underline */
.nav-link {
  position: relative;
  transition: color 0.3s ease;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-light));
  transition: width 0.3s ease;
  border-radius: 1px;
}

.nav-link:hover {
  color: var(--accent) !important;
}

.nav-link:hover::after {
  width: 100%;
}

/* ── Hero Section ────────────────── */
.hero-content {
  animation: heroFadeIn 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes heroFadeIn {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Ken Burns effect */
@keyframes kenBurns {
  0% { transform: scale(1); }
  100% { transform: scale(1.08); }
}

.ken-burns {
  animation: kenBurns 12s ease-in-out infinite alternate;
}

.scroll-indicator {
  animation: gentleBounce 2.5s ease-in-out infinite;
}

.scroll-dot {
  animation: scrollDot 2s infinite;
}

@keyframes gentleBounce {
  0%, 100% { transform: translateY(0); opacity: 1; }
  50% { transform: translateY(-8px); opacity: 0.7; }
}

@keyframes scrollDot {
  0% { height: 12px; margin-top: 8px; }
  50% { height: 6px; margin-top: 10px; }
  100% { height: 12px; margin-top: 8px; }
}

/* ── Image Carousel ──────────────── */
.image-carousel {
  position: relative;
  overflow: hidden;
}

.carousel-container {
  position: relative;
  width: 100%;
  height: 16rem;
}

.carousel-image {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.6s ease-in-out;
}

.carousel-image.active {
  opacity: 1;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(10, 10, 15, 0.6);
  backdrop-filter: blur(8px);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 10px;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 10;
}

.carousel-btn:hover {
  background: rgba(59, 130, 246, 0.3);
  border-color: var(--border-accent);
  transform: translateY(-50%) scale(1.1);
}

.carousel-prev { left: 10px; }
.carousel-next { right: 10px; }

.carousel-dots {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 10;
}

.carousel-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

.carousel-dot.active,
.carousel-dot:hover {
  background: var(--accent);
  transform: scale(1.3);
  box-shadow: 0 0 8px rgba(59, 130, 246, 0.4);
}

/* ── Section Reveal ──────────────── */
.section-reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.section-reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children */
.stagger-children > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.stagger-children.revealed > *:nth-child(1) { transition-delay: 0.05s; }
.stagger-children.revealed > *:nth-child(2) { transition-delay: 0.12s; }
.stagger-children.revealed > *:nth-child(3) { transition-delay: 0.19s; }
.stagger-children.revealed > *:nth-child(4) { transition-delay: 0.26s; }
.stagger-children.revealed > *:nth-child(5) { transition-delay: 0.33s; }
.stagger-children.revealed > *:nth-child(6) { transition-delay: 0.40s; }

.stagger-children.revealed > * {
  opacity: 1;
  transform: translateY(0);
}

/* ── Floating Animation ──────────── */
.floating-animation {
  animation: float 4s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

/* ── Toast Notifications ─────────── */
.toast-container {
  position: fixed;
  top: 100px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  max-width: 400px;
  padding: 16px 20px;
  border-radius: 12px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  font-size: 0.9rem;
  line-height: 1.4;
  animation: toastIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.toast-success {
  background: rgba(34, 197, 94, 0.15);
  border-color: rgba(34, 197, 94, 0.3);
  color: #86efac;
}

.toast-error {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}

.toast-exit {
  animation: toastOut 0.3s ease forwards;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateX(40px) scale(0.95); }
  to { opacity: 1; transform: translateX(0) scale(1); }
}

@keyframes toastOut {
  from { opacity: 1; transform: translateX(0) scale(1); }
  to { opacity: 0; transform: translateX(40px) scale(0.95); }
}

/* ── Form Styles ─────────────────── */
.form-field {
  position: relative;
}

.form-error {
  display: none;
}

.form-field.error .form-error {
  display: block;
}

.form-field.error input,
.form-field.error select,
.form-field.error textarea {
  border-color: var(--error) !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15) !important;
}

/* Dark form inputs */
.dark-input {
  background: var(--bg-surface) !important;
  border: 1px solid var(--border-subtle) !important;
  color: var(--text-primary) !important;
  transition: all 0.3s ease;
}

.dark-input::placeholder {
  color: var(--text-muted);
}

.dark-input:focus {
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 3px var(--accent-glow) !important;
  outline: none;
}

/* ── Loading State ───────────────── */
.loading {
  opacity: 0.6;
  pointer-events: none;
}

.loading::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 15, 0.5);
  z-index: 999;
  border-radius: inherit;
}

/* ── Scrollbar ───────────────────── */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg-base);
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* ── Subtle Shimmer ──────────────── */
.subtle-shimmer {
  position: relative;
  overflow: hidden;
}

.subtle-shimmer::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.06), transparent);
  transition: left 0.6s ease;
}

.subtle-shimmer:hover::after {
  left: 100%;
}

/* ── Gold Divider ────────────────── */
.accent-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-accent), transparent);
}

/* ── Premium Card (for contact) ──── */
.premium-card {
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

/* ── Mobile Responsive ───────────── */
@media (max-width: 768px) {
  .container {
    max-width: 100%;
    padding-left: 1rem;
    padding-right: 1rem;
    margin-left: auto;
    margin-right: auto;
  }

  body {
    position: relative;
    touch-action: pan-y;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
    min-height: 100vh;
    min-height: -webkit-fill-available;
  }

  html {
    height: -webkit-fill-available;
  }

  p, h1, h2, h3, h4, h5, h6, span, div[class*="text"] {
    -webkit-user-select: text;
    user-select: text;
  }

  .vehicle-card, .carousel-container {
    touch-action: pan-y;
  }

  .mobile-footer {
    padding-bottom: calc(2rem + env(safe-area-inset-bottom, 2rem)) !important;
    margin-bottom: env(safe-area-inset-bottom, 0);
  }

  .floating-whatsapp {
    bottom: calc(1.5rem + env(safe-area-inset-bottom, 0)) !important;
  }

  #kontakt .max-w-6xl,
  #kontakt .max-w-7xl {
    max-width: calc(100vw - 2rem) !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  #kontakt .grid {
    margin-left: auto !important;
    margin-right: auto !important;
  }

  #kontakt input,
  #kontakt textarea,
  #kontakt .card,
  #kontakt [role="button"] {
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .min-h-screen {
    min-height: 100vh;
    min-height: -webkit-fill-available;
  }

  .toast-container {
    right: 12px;
    left: 12px;
  }

  .toast {
    max-width: 100%;
  }
}

/* ── Animation Utilities ─────────── */
.fade-in {
  animation: fadeIn 0.6s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
