/* ========================================
   CRITICAL: Base Styles OHNE JavaScript
   ======================================== */

html,
body {
  max-width: 100%;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background: radial-gradient(circle at 10% 20%, rgba(56, 189, 248, 0.12), transparent 25%), #020617;
  color: #f9fafb;
  line-height: 1.6;
}

/* Typografie */
h1,h2,h3,h4,h5,h6 {
  letter-spacing: -0.02em;
  font-weight: 800;
  line-height: 1.2;
}

/* ========================================
   Glass-Effekt IMMER sichtbar
   ======================================== */
.glass {
  background: radial-gradient(circle at 0% 0%, rgba(56, 189, 248, 0.18), transparent 60%), rgba(15, 23, 42, 0.96);
  border: 1px solid rgba(148, 163, 184, 0.35);
  backdrop-filter: blur(16px);
  opacity: 1 !important;
  visibility: visible !important;
}

/* ========================================
   Service Cards OHNE JavaScript
   ======================================== */
.service-card {
  background: radial-gradient(circle at 0% 0%, rgba(56, 189, 248, 0.18), transparent 55%), radial-gradient(circle at 100% 100%, rgba(15, 23, 42, 0.9), transparent 60%), #020617;
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 1rem;
  padding: 1.25rem;
  display: flex ! important;
  flex-direction: column;
  min-height: 300px;
  opacity: 1 !important;
  visibility: visible !important;
  transform: none !important;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.2s ease;
  position: relative;
}

.service-card::before {
  content: '';
  position: absolute;
  inset: -20%;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.22), transparent 55%);
  opacity: 0.35;
  pointer-events: none;
}

.service-card:hover {
  border-color: rgba(56, 189, 248, 0.9);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.9);
  transform: translateY(-2px);
}

/* Service CTA immer sichtbar */
.service-cta {
  opacity: 1 !important;
  transform: translateY(0) !important;
  display: flex !important;
  margin-top: auto;
}

/* Service Pills */
.service-pill {
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

.service-pill:hover {
  background-color: rgba(56, 189, 248, 0.14);
  color: #38bdf8;
  transform: translateY(-1px);
}

/* ========================================
   Navigation
   ======================================== */
.nav-link {
  position: relative;
  color: #94a3b8;
  transition: color 0.2s ease;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.5rem 0;
  text-decoration: none;
  display: inline-block;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #38bdf8, #0ea5e9);
  transition: width 0.3s ease;
  border-radius: 1px;
}

.nav-link:hover,
.nav-link:focus {
  color: #f1f5f9;
}

.nav-link:hover::after,
.nav-link:focus::after {
  width: 100%;
}

.nav-link.active {
  color: #38bdf8;
}

.nav-link.active::after {
  width: 100%;
}

/* ========================================
   Hero Section
   ======================================== */
.hero-overlay {
  background: radial-gradient(circle at 30% 30%, rgba(56, 189, 248, 0.12), transparent 35%), rgba(2, 6, 23, 0.86);
}

#heroImage {
  opacity: 1;
  display: block;
  will-change: transform;
  transition: transform 0.25s ease-out;
}

.hero-title {
  animation: heroIntro 1s ease-out both;
}

@keyframes heroIntro {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ========================================
   Gradient Text
   ======================================== */
.gradient-text {
  background: linear-gradient(135deg, #38bdf8 0%, #0ea5e9 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  /* Fallback für Browser ohne Support */
  color: #38bdf8;
}

@supports (-webkit-background-clip: text) {
  .gradient-text {
    color: transparent;
  }
}

/* ========================================
   Buttons (Progressive Enhancement)
   ======================================== */
.btn-primary-glow {
  position: relative;
  box-shadow: 0 4px 15px rgba(56, 189, 248, 0.3), 0 1px 3px rgba(0, 0, 0, 0.2);
  transition: box-shadow 0.3s ease, transform 0.2s ease, background-color 0.2s ease;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-primary-glow::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 ease;
}

.btn-primary-glow:hover {
  box-shadow: 0 8px 30px rgba(56, 189, 248, 0.5), 0 4px 10px rgba(0, 0, 0, 0.2);
  transform: translateY(-2px);
}

.btn-primary-glow:hover::before {
  left: 100%;
}

.btn-primary-glow:active {
  transform: translateY(0);
  box-shadow: 0 2px 10px rgba(56, 189, 248, 0.3), 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* ========================================
   Step Flow (1-2-3 System)
   ======================================== */
.step-flow {
  position: relative;
}

.step-item {
  position: relative;
  overflow: hidden;
  opacity: 1 !important;
  visibility: visible !important;
  display: block !important;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.step-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.85);
  border-color: rgba(56, 189, 248, 0.9);
}

.step-number {
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  color: #e5e7eb;
  background: radial-gradient(circle at 30% 30%, rgba(56, 189, 248, 0.25), transparent 65%);
  box-shadow: 0 0 0 rgba(56, 189, 248, 0.0);
  transition: box-shadow 0.22s ease, transform 0.22s ease, border-color 0.22s ease, color 0.22s ease;
}

.step-item:hover .step-number {
  box-shadow: 0 0 18px rgba(56, 189, 248, 0.55);
  border-color: #38bdf8;
  color: #f9fafb;
  transform: translateY(-1px);
}

.step-line {
  flex: 1;
  width: 2px;
  margin-top: 0.35rem;
  background: linear-gradient(to bottom, rgba(148, 163, 184, 0.6), transparent);
}

/* ========================================
   Formulare
   ======================================== */
#contactForm {
  display: block ! important;
  opacity: 1 !important;
  visibility: visible !important;
}

#contactForm input,
#contactForm select,
#contactForm textarea {
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
  display: block;
  width: 100%;
}

#contactForm input:hover,
#contactForm select:hover,
#contactForm textarea:hover {
  border-color: rgba(148, 163, 184, 0.4);
}

#contactForm input:focus,
#contactForm select:focus,
#contactForm textarea:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.15), 0 1px 2px rgba(0, 0, 0, 0.1);
  background-color: rgba(15, 23, 42, 0.8);
  outline: none;
}

/* Placeholder-Styling */
#contactForm input::placeholder,
#contactForm textarea::placeholder {
  color: rgba(148, 163, 184, 0.6);
  transition: opacity 0.2s ease;
}

#contactForm input:focus::placeholder,
#contactForm textarea:focus::placeholder {
  opacity: 0.4;
}

/* Label Animation */
#contactForm label span {
  display: block;
  margin-bottom: 0.25rem;
  transition: color 0.2s ease;
}

#contactForm label:focus-within span {
  color: #38bdf8;
}

/* ========================================
   Datum & Zeit Inputs
   ======================================== */
input[type="date"],
input[type="time"] {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  max-width: 100%;
  position: relative;
  min-height: 48px;
}

/* Kalender-Icon */
input[type="date"]::-webkit-calendar-picker-indicator {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20' fill='none'%3E%3Crect x='3' y='4' width='14' height='13' rx='2' stroke='%23f1f5f9' stroke-width='1.5' fill='none'/%3E%3Cline x1='3' y1='8' x2='17' y2='8' stroke='%23f1f5f9' stroke-width='1.5'/%3E%3Cline x1='7' y1='2' x2='7' y2='6' stroke='%23f1f5f9' stroke-width='1.5' stroke-linecap='round'/%3E%3Cline x1='13' y1='2' x2='13' y2='6' stroke='%23f1f5f9' stroke-width='1.5' stroke-linecap='round'/%3E%3Ccircle cx='7' cy='11' r='0.8' fill='%23f1f5f9'/%3E%3Ccircle cx='10' cy='11' r='0.8' fill='%23f1f5f9'/%3E%3Ccircle cx='13' cy='11' r='0.8' fill='%23f1f5f9'/%3E%3Ccircle cx='7' cy='14' r='0.8' fill='%23f1f5f9'/%3E%3Ccircle cx='10' cy='14' r='0.8' fill='%23f1f5f9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 18px 18px;
  cursor: pointer;
  padding: 8px;
  margin-right: 4px;
  opacity: 0.9;
  transition: opacity 0.2s ease;
  width: 20px;
  height: 20px;
  filter: brightness(1.2);
}

input[type="date"]::-webkit-calendar-picker-indicator:hover {
  opacity: 1;
  filter: brightness(1.5);
}

/* Uhr-Icon */
input[type="time"]::-webkit-calendar-picker-indicator {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20' fill='none'%3E%3Ccircle cx='10' cy='10' r='8' stroke='%23f1f5f9' stroke-width='1.5' fill='none'/%3E%3Cline x1='10' y1='10' x2='10' y2='5' stroke='%23f1f5f9' stroke-width='2' stroke-linecap='round'/%3E%3Cline x1='10' y1='10' x2='14' y2='10' stroke='%23f1f5f9' stroke-width='1.5' stroke-linecap='round'/%3E%3Ccircle cx='10' cy='10' r='1' fill='%23f1f5f9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 18px 18px;
  cursor: pointer;
  padding: 8px;
  margin-right: 4px;
  opacity: 0.9;
  transition: opacity 0.2s ease;
  width: 20px;
  height: 20px;
  filter: brightness(1.2);
}

input[type="time"]::-webkit-calendar-picker-indicator:hover {
  opacity: 1;
  filter: brightness(1.5);
}

/* Firefox Anpassung */
input[type="date"]::-moz-calendar-picker-indicator,
input[type="time"]::-moz-calendar-picker-indicator {
  cursor: pointer;
  padding: 8px;
  filter: brightness(1.2);
}

/* Fokus-Zustand */
input[type="date"]:focus,
input[type="time"]:focus {
  outline: none;
  border-color: #38bdf8;
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.2);
}

/* Dropdown-Pfeil */
#rentalCategory {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23f1f5f9' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M1.646 4.646a.5. 5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3E%3C/svg%3E") ! important;
  background-repeat: no-repeat ! important;
  background-position: right 1rem center !important;
  background-size: 12px ! important;
  padding-right: 2. 5rem !important;
}

#rentalCategory:hover {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2338bdf8' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M1.646 4. 646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5. 5 0 0 1-. 708 0l-6-6a.5.5 0 0 1 0-.708z'/%3E%3C/svg%3E") !important;
}

/* ========================================
   Tabellen (Desktop & Mobile)
   ======================================== */
.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 0.75rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(56, 189, 248, 0.3) transparent;
}

.table-scroll::-webkit-scrollbar {
  height: 6px;
}

.table-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.table-scroll::-webkit-scrollbar-thumb {
  background-color: rgba(56, 189, 248, 0.3);
  border-radius: 3px;
}

.table-scroll table {
  min-width: 100%;
  white-space: normal;
}

/* Preistabellen Hover */
@media (min-width: 769px) {
  .table-scroll tbody tr {
    transition: background-color 0.15s ease;
  }
  
  .table-scroll tbody tr:hover {
    background-color: rgba(56, 189, 248, 0.08);
  }
  
  .table-scroll tbody tr:hover td:first-child {
    color: #38bdf8;
  }
}

/* Mobile Card-Layout */
@media (max-width: 768px) {
  .table-scroll {
    overflow-x: visible;
  }
  
  .table-scroll table,
  .table-scroll thead,
  .table-scroll tbody,
  .table-scroll th,
  .table-scroll td,
  .table-scroll tr {
    display: block;
  }
  
  .table-scroll thead {
    display: none;
  }
  
  .table-scroll tbody tr {
    margin-bottom: 1rem;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 0.75rem;
    padding: 0.75rem;
    background: rgba(15, 23, 42, 0.4);
  }
  
  .table-scroll tbody tr:hover {
    background: rgba(56, 189, 248, 0.08);
  }
  
  .table-scroll td {
    text-align: left;
    padding: 0.6rem 0;
    border: none;
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.25rem;
    word-break: break-word;
  }
  
  .table-scroll td::before {
    content: attr(data-label);
    font-weight: 600;
    color: #94a3b8;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    line-height: 1.3;
  }
  
  .table-scroll td:first-child {
    font-weight: 700;
    color: #f1f5f9;
    font-size: 1rem;
    padding-top: 0;
    margin-bottom: 0.5rem;
    padding-bottom: 0.75rem;
    border-bottom:1px solid rgba(148, 163, 184, 0.15);
  }
  
  .table-scroll td:first-child::before {
    font-size: 0.65rem;
    margin-bottom: 0.25rem;
  }
  
  .table-scroll td:last-child {
    padding-bottom: 0;
  }
  
  input[type="date"],
  input[type="time"] {
    font-size: 14px;
    padding-left: 0.5rem !important;
    padding-right: 0.5rem !important;
  }
}

/* ========================================
   Klickbare Preiszeilen
   ======================================== */
.price-row-clickable {
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.1s ease;
}

.price-row-clickable:hover {
  background-color: rgba(56, 189, 248, 0.12);
}

.price-row-clickable:active {
  transform: scale(0.995);
}

/* Highlight Animation */
.price-row-highlight {
  background-color: rgba(56, 189, 248, 0.25) !important;
  box-shadow: inset 4px 0 0 #38bdf8, 0 0 25px rgba(56, 189, 248, 0.2);
  animation: priceHighlight 0.5s ease;
  border-left: 3px solid #38bdf8 !important;
}

@keyframes priceHighlight {
  0% { 
    background-color: rgba(56, 189, 248, 0.4);
    transform: scale(1. 01);
  }
  100% { 
    background-color: rgba(56, 189, 248, 0.2);
    transform: scale(1);
  }
}

/* ========================================
   FAQ Akkordeon
   ======================================== */
.faq-item {
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.faq-item:hover {
  border-color: rgba(56, 189, 248, 0.3);
}

.faq-item[open] {
  border-color: rgba(56, 189, 248, 0.4);
  box-shadow: 0 4px 20px rgba(56, 189, 248, 0.1);
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::marker {
  display: none;
}

/* ========================================
   Overlay (Google Maps)
   ======================================== */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.lightbox-overlay.active {
  display: flex;
}

/* ========================================
   iOS Safari Fixes
   ======================================== */
@supports (-webkit-touch-callout: none) {
  input[type="date"],
  input[type="time"] {
    font-size: 16px ! important;
  }
  
  input[type="date"]::-webkit-date-and-time-value {
    text-align: left;
    padding-left: 8px;
  }
}

/* ========================================
   Tilt-Effekt (Progressive Enhancement)
   ======================================== */
.card-tilt {
  perspective: 1000px;
}

.card-tilt .tilt-inner {
  transition: transform.4s ease, box-shadow.4s ease;
  transform-style: preserve-3d;
}

/* ========================================
   Mobile Navigation
   ======================================== */
@media (max-width: 768px) {
  .nav-links {
    overflow-x: auto;
  }

  .nav-links::-webkit-scrollbar {
    display: none;
  }
}

/* ========================================
   Reduced Motion Support
   ======================================== */
@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;
  }
}