/* AURUM MOTORS - Main Stylesheet */
/* Sunset Gold & Natural Luxury Theme */
/* Safari-optimized */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
  -webkit-text-size-adjust: 100%;
  -webkit-overflow-scrolling: touch;
}

body {
  background: #0A0A0A;
  color: #e0e0e0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* ===== SAFARI iOS SAFE AREA ===== */
@supports (padding: env(safe-area-inset-top)) {
  body {
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
  }
}

/* ===== SCROLLBAR (WebKit) ===== */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: #0A0A0A;
}
::-webkit-scrollbar-thumb {
  background: #C8A45C33;
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: #C8A45C66;
}

/* ===== SELECTION ===== */
::-webkit-selection {
  background: #C8A45C33;
  color: #E8D5A3;
}
::selection {
  background: #C8A45C33;
  color: #E8D5A3;
}

/* ===== SCROLL REVEAL ANIMATION ===== */
.scroll-reveal {
  opacity: 0;
  -webkit-transform: translateY(30px);
  transform: translateY(30px);
  -webkit-transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              -webkit-transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: opacity, transform;
}

.scroll-reveal.revealed {
  opacity: 1;
  -webkit-transform: translateY(0);
  transform: translateY(0);
}

/* ===== HERO ANIMATIONS ===== */
.animate-fade-in {
  -webkit-animation: fadeIn 1s ease-out forwards;
  animation: fadeIn 1s ease-out forwards;
}

.animate-fade-in-up {
  -webkit-animation: fadeInUp 1s ease-out 0.2s forwards;
  animation: fadeInUp 1s ease-out 0.2s forwards;
  opacity: 0;
}

.animate-fade-in-up-delay {
  -webkit-animation: fadeInUp 1s ease-out 0.5s forwards;
  animation: fadeInUp 1s ease-out 0.5s forwards;
  opacity: 0;
}

.animate-fade-in-up-delay-2 {
  -webkit-animation: fadeInUp 1s ease-out 0.8s forwards;
  animation: fadeInUp 1s ease-out 0.8s forwards;
  opacity: 0;
}

.animate-fade-in-up-delay-3 {
  -webkit-animation: fadeInUp 1s ease-out 1.1s forwards;
  animation: fadeInUp 1s ease-out 1.1s forwards;
  opacity: 0;
}

@-webkit-keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@-webkit-keyframes fadeInUp {
  from {
    opacity: 0;
    -webkit-transform: translateY(30px);
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    -webkit-transform: translateY(0);
    transform: translateY(0);
  }
}
@keyframes fadeInUp {
  from {
    opacity: 0;
    -webkit-transform: translateY(30px);
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    -webkit-transform: translateY(0);
    transform: translateY(0);
  }
}

/* ===== BOUNCE SLOW ===== */
.animate-bounce-slow {
  -webkit-animation: bounceSlow 2.5s ease-in-out infinite;
  animation: bounceSlow 2.5s ease-in-out infinite;
}

@-webkit-keyframes bounceSlow {
  0%, 100% { -webkit-transform: translateX(-50%) translateY(0); transform: translateX(-50%) translateY(0); }
  50% { -webkit-transform: translateX(-50%) translateY(8px); transform: translateX(-50%) translateY(8px); }
}
@keyframes bounceSlow {
  0%, 100% { -webkit-transform: translateX(-50%) translateY(0); transform: translateX(-50%) translateY(0); }
  50% { -webkit-transform: translateX(-50%) translateY(8px); transform: translateX(-50%) translateY(8px); }
}

/* ===== GOLD BUTTON HOVER EFFECT ===== */
.btn-gold {
  position: relative;
  overflow: hidden;
}

.btn-gold::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: -webkit-linear-gradient(left,
    transparent,
    rgba(200, 164, 92, 0.15),
    transparent
  );
  background: linear-gradient(
    90deg,
    transparent,
    rgba(200, 164, 92, 0.15),
    transparent
  );
  -webkit-transition: left 0.6s ease;
  transition: left 0.6s ease;
}

.btn-gold:hover::before {
  left: 100%;
}

/* ===== CAR CARD STYLES ===== */
.car-card {
  -webkit-transition: -webkit-transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              box-shadow 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              box-shadow 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: transform;
}

.car-card:hover {
  -webkit-transform: translateY(-6px);
  transform: translateY(-6px);
  box-shadow: 0 20px 60px -15px rgba(200, 164, 92, 0.1),
              0 0 0 1px rgba(200, 164, 92, 0.15);
}

/* ===== FILTER BUTTON ACTIVE STATE ===== */
.filter-btn.active {
  border-color: #C8A45C;
  color: #C8A45C;
  background: rgba(200, 164, 92, 0.08);
}

/* ===== LINE CLAMP (WebKit) ===== */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ===== NAV LINK UNDERLINE EFFECT ===== */
.nav-link {
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: #C8A45C;
  -webkit-transition: width 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  transition: width 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

/* ===== FORM INPUT FOCUS GLOW ===== */
input:focus,
select:focus,
textarea:focus {
  box-shadow: 0 0 0 1px rgba(200, 164, 92, 0.2),
              0 0 20px -5px rgba(200, 164, 92, 0.1);
  outline: none;
}

/* ===== FORM ELEMENTS SAFARI FIX ===== */
input, select, textarea, button {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  font-family: inherit;
}

select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23C8A45C' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 12px;
  padding-right: 40px !important;
}

/* ===== DATE INPUT STYLING ===== */
input[type="date"] {
  color-scheme: dark;
}

input[type="date"]::-webkit-calendar-picker-indicator {
  -webkit-filter: invert(0.7) sepia(1) hue-rotate(10deg);
  filter: invert(0.7) sepia(1) hue-rotate(10deg);
  cursor: pointer;
}

/* ===== BACKDROP FILTER (Safari) ===== */
.-webkit-backdrop-blur-sm {
  -webkit-backdrop-filter: blur(4px);
}
.-webkit-backdrop-blur-xl {
  -webkit-backdrop-filter: blur(24px);
}

/* ===== IMAGE LOADING ===== */
img {
  background: -webkit-linear-gradient(135deg, #1A1410, #2A2520);
  background: linear-gradient(135deg, #1A1410, #2A2520);
}

/* ===== MODAL ANIMATION ===== */
#success-modal {
  -webkit-animation: modalFadeIn 0.3s ease-out;
  animation: modalFadeIn 0.3s ease-out;
}

@-webkit-keyframes modalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes modalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

#success-modal > div {
  -webkit-animation: modalSlideUp 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  animation: modalSlideUp 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

@-webkit-keyframes modalSlideUp {
  from {
    opacity: 0;
    -webkit-transform: translateY(20px) scale(0.98);
    transform: translateY(20px) scale(0.98);
  }
  to {
    opacity: 1;
    -webkit-transform: translateY(0) scale(1);
    transform: translateY(0) scale(1);
  }
}
@keyframes modalSlideUp {
  from {
    opacity: 0;
    -webkit-transform: translateY(20px) scale(0.98);
    transform: translateY(20px) scale(0.98);
  }
  to {
    opacity: 1;
    -webkit-transform: translateY(0) scale(1);
    transform: translateY(0) scale(1);
  }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 640px) {
  .car-card .aspect-\[16\/10\] {
    aspect-ratio: 16/9;
  }
}

/* ===== iOS SPECIFIC FIXES ===== */
@supports (-webkit-touch-callout: none) {
  /* iOS-specific styles */
  .min-h-screen {
    min-height: -webkit-fill-available;
  }
}

/* ===== PRINT STYLES ===== */
@media print {
  body {
    background: white;
    color: black;
  }
  #navbar, #booking, .scroll-reveal {
    display: none;
  }
}
