/**
 * ============================================
 * CUSTOM STYLES - CAR COMPANY WEBSITE
 * ============================================
 * Organized CSS with Tailwind CSS enhancements
 * 
 * TABLE OF CONTENTS:
 * 1. CSS Variables
 * 2. Dark Mode
 * 3. Base Styles
 * 4. Typography
 * 5. Navbar
 * 6. Hero Section
 * 7. Carousel
 * 8. Cards & Components
 * 9. Buttons
 * 10. Forms
 * 11. Animations
 * 12. Utilities
 * 13. Accessibility
 * 14. Print Styles
 * 15. Responsive
 */
/* ============================================
   1. CSS VARIABLES
   ============================================ */
:root {
  /* Primary Colors */
  --primary: #1a1a2e;
  --primary-light: #16213e;
  --accent: #8b9868ff;
  --accent-dark: #8b9868ff;
  --gold: #d4a574;
  --gold-light: #e5c4a1;
  /* Neutral Colors */
  --text-dark: #1f2937;
  --text-light: #6b7280;
  --bg-light: #f8fafc;
  --white: #ffffff;
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1),
    0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1),
    0 8px 10px -6px rgb(0 0 0 / 0.1);
  /* Transitions */
  --transition-fast: 150ms ease;
  --transition: 300ms ease;
  --transition-slow: 500ms ease;
  /* Border Radius */
  --radius-sm: 0.25rem;
  --radius: 0.5rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
  --radius-full: 9999px;
}
/* ============================================
   2. DARK MODE
   ============================================ */
.dark {
  --primary: #0f172a;
  --primary-light: #1e293b;
  --bg-light: #111827;
  --text-dark: #f1f5f9;
  --text-light: #94a3b8;
}
/* Dark mode body */
.dark body,
html.dark body {
  background-color: #0f172a;
}
/* Dark mode overrides for Tailwind classes */
.dark .bg-gray-50 {
  background-color: #111827 !important;
}
.dark .bg-white {
  background-color: #1e293b !important;
}
.dark .bg-gray-100 {
  background-color: #1f2937 !important;
}
/* Dark mode text */
.dark .text-gray-600 {
  color: #9ca3af !important;
}
.dark .text-gray-500 {
  color: #9ca3af !important;
}
.dark .text-gray-400 {
  color: #d1d5db !important;
}
.dark .text-primary {
  color: #f1f5f9 !important;
}
/* Dark mode shadows */
.dark .shadow-sm,
.dark .shadow-md,
.dark .shadow-lg,
.dark .shadow-xl {
  --tw-shadow-color: rgba(0, 0, 0, 0.4);
}
/* Dark mode borders */
.dark .border-gray-100,
.dark .border-gray-200 {
  border-color: #374151 !important;
}
/* Dark mode forms */
.dark input,
.dark textarea,
.dark select {
  background-color: #1f2937;
  border-color: #374151;
  color: #f1f5f9;
}
.dark input:focus,
.dark textarea:focus,
.dark select:focus {
  border-color: var(--accent);
}
/* Dark mode scrollbar */
.dark ::-webkit-scrollbar-track {
  background: #1f2937;
}
.dark ::-webkit-scrollbar-thumb {
  background: #4b5563;
}
.dark ::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}
/* ============================================
   3. BASE STYLES
   ============================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: var(--primary) var(--bg-light);
  overflow-x: hidden;
}
body {
  font-family: "Noto Kufi Arabic", sans-serif;
  overflow-x: hidden;
  line-height: 1.6;
}
/* Selection */
::selection {
  background: var(--accent);
  color: var(--white);
}
/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: var(--bg-light);
}
::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}
/* Hide scrollbar utility */
.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}
/* ============================================
   4. TYPOGRAPHY
   ============================================ */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 700;
  line-height: 1.3;
}
/* ============================================
   5. NAVBAR
   ============================================ */
#mainNav {
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
/* Scrolled state */
#mainNav.navbar-scrolled {
  margin-top: 0 !important;
  background: rgba(26, 26, 46, 0.98) !important;
  backdrop-filter: blur(20px);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}
.dark #mainNav.navbar-scrolled {
  background: rgba(17, 24, 39, 0.98) !important;
}
#mainNav.navbar-scrolled .nav-content {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}
#mainNav.navbar-scrolled .nav-logo {
  height: 2.5rem;
}
#mainNav.navbar-scrolled .nav-link {
  padding-left: 0.25rem;
  padding-right: 0.25rem;
}
#mainNav.navbar-scrolled .nav-text {
  color: white;
}
#mainNav.navbar-scrolled .nav-subtext {
  color: rgba(255, 255, 255, 0.7);
}
#mainNav:not(.navbar-scrolled) .nav-link,
#mainNav.navbar-scrolled .nav-link {
  color: rgba(255, 255, 255, 0.9);
}
#mainNav.navbar-scrolled .nav-link:hover {
  color: var(--accent);
}
#mainNav.navbar-scrolled .nav-mobile-btn {
  color: white;
}
#mainNav.navbar-scrolled .nav-mobile-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* Mobile Menu - Force solid background with highest priority */
#mobileMenu {
  background-color: #ffffff !important;
  z-index: 99999 !important;
  isolation: isolate;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
#mobileMenu,
#mobileMenu > div,
#mobileMenu > div > div,
#mobileMenu .flex-1,
#mobileMenu .p-4 {
  background-color: #ffffff !important;
}
/* Dark mode support for mobile menu */
.dark #mobileMenu,
html.dark #mobileMenu,
.dark #mobileMenu > div,
.dark #mobileMenu > div > div,
.dark #mobileMenu .flex-1,
.dark #mobileMenu .p-4,
html.dark #mobileMenu > div,
html.dark #mobileMenu > div > div,
html.dark #mobileMenu .flex-1,
html.dark #mobileMenu .p-4 {
  background-color: #1f2937 !important;
}
.dark #mobileMenu .text-gray-700,
.dark #mobileMenu .text-gray-900,
.dark #mobileMenu .text-gray-600 {
  color: #e5e7eb !important;
}
#mobileMenuOverlay {
  z-index: 99998 !important;
}

/* Nav link underline animation */
.nav-link {
  position: relative;
}
.nav-link::after {
  content: "";
  position: absolute;
  bottom: 0;
  right: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width var(--transition);
}
[dir="ltr"] .nav-link::after {
  right: auto;
  left: 0;
}
.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}
/* ============================================
   6. HERO SECTION
   ============================================ */
.hero-gradient {
  background: linear-gradient(
    135deg,
    var(--primary) 0%,
    var(--primary-light) 100%
  );
}
.hero-pattern {
  background-image: radial-gradient(
      circle at 25% 25%,
      rgba(233, 69, 96, 0.1) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 75% 75%,
      rgba(212, 165, 116, 0.1) 0%,
      transparent 50%
    );
}
/* ============================================
   7. CAROUSEL
   ============================================ */
.carousel-slides {
  position: relative;
  width: 100%;
}
.carousel-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
  z-index: 1;
}
.carousel-slide.active {
  opacity: 1;
  z-index: 2;
  animation: carouselFadeIn 0.5s ease-out;
}
.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
@keyframes carouselFadeIn {
  from {
    opacity: 0;
    transform: scale(1.02);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
/* Carousel navigation */
.carousel-dot {
  transition: all 0.3s ease;
  cursor: pointer;
}
.carousel-dot:hover {
  transform: scale(1.2);
}
.carousel-thumbnails {
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.carousel-thumbnails::-webkit-scrollbar {
  display: none;
}
.carousel-thumb {
  cursor: pointer;
  transition: all 0.3s ease;
}
.carousel-thumb:hover {
  transform: scale(1.05);
}
#carouselPrev,
#carouselNext {
  transition: all 0.3s ease;
}
#carouselPrev:active,
#carouselNext:active {
  transform: translateY(-50%) scale(0.95);
}
/* Dark mode carousel */
.dark #carouselSlider {
  background-color: #0f172a;
}
/* ============================================
   8. CARDS & COMPONENTS
   ============================================ */
.card-hover {
  transition: all var(--transition);
}
.card-hover:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-xl);
}
/* Vehicle card */
.vehicle-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
}
.vehicle-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(26, 26, 46, 0.9) 0%,
    transparent 100%
  );
  opacity: 0;
  transition: opacity var(--transition);
}
.vehicle-card:hover::before {
  opacity: 1;
}
/* Brand logos */
.brand-logo {
  filter: grayscale(100%);
  opacity: 0.5;
  transition: all var(--transition);
}
.brand-logo:hover {
  filter: grayscale(0%);
  opacity: 1;
  transform: scale(1.1);
}
/* Testimonial card */
.testimonial-card {
  position: relative;
}
.testimonial-card::before {
  content: '"';
  position: absolute;
  top: -10px;
  right: 20px;
  font-size: 6rem;
  font-family: serif;
  color: var(--accent);
  opacity: 0.1;
  line-height: 1;
}
[dir="ltr"] .testimonial-card::before {
  right: auto;
  left: 20px;
}
/* Stats */
.stat-number {
  background: linear-gradient(
    135deg,
    var(--white) 0%,
    rgba(255, 255, 255, 0.8) 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
/* ============================================
   9. BUTTONS
   ============================================ */
.btn-primary {
  background: var(--accent);
  color: var(--white);
  padding: 0.75rem 2rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  transition: all var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.btn-primary:hover {
  background: var(--accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(233, 69, 96, 0.3);
}
.btn-outline {
  border: 2px solid var(--white);
  color: var(--white);
  padding: 0.75rem 2rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  transition: all var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.btn-outline:hover {
  background: var(--white);
  color: var(--primary);
  transform: translateY(-2px);
}
/* ============================================
   10. FORMS
   ============================================ */
.form-input {
  transition: all var(--transition);
}
.form-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(233, 69, 96, 0.1);
}
/* ============================================
   11. ANIMATIONS
   ============================================ */
/* Floating animation */
.floating {
  animation: floating 3s ease-in-out infinite;
}
@keyframes floating {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-20px);
  }
}
/* Pulse animation */
.pulse {
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}
/* Hero text animation */
.hero-title {
  animation: fadeInUp 0.8s ease forwards;
}
.hero-subtitle {
  animation: fadeInUp 0.8s ease 0.2s forwards;
  opacity: 0;
}
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
/* Loader spinner */
.page-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}
.page-loader.hidden {
  opacity: 0;
  visibility: hidden;
}
.loader-spinner {
  width: 50px;
  height: 50px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
/* WhatsApp button pulse */
.whatsapp-float {
  animation: whatsapp-pulse 2s infinite;
}
@keyframes whatsapp-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.5);
  }
  70% {
    box-shadow: 0 0 0 15px rgba(37, 211, 102, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
  }
}
/* Back to top */
.back-to-top {
  transition: all var(--transition);
}
.back-to-top:hover {
  transform: translateY(-5px);
  background: var(--accent) !important;
}

/* AOS overflow fix - prevent horizontal scrolling during animations */
[data-aos] {
  pointer-events: none;
}
[data-aos].aos-animate {
  pointer-events: auto;
}
/* Prevent AOS from causing horizontal scroll */
[data-aos^="fade"][data-aos^="fade"].aos-animate,
[data-aos^="zoom"][data-aos^="zoom"].aos-animate {
  overflow: visible;
}

/* AOS custom */
[data-aos="fade-up-custom"] {
  transform: translateY(50px);
  opacity: 0;
  transition-property: transform, opacity;
}
[data-aos="fade-up-custom"].aos-animate {
  transform: translateY(0);
  opacity: 1;
}
/* ============================================
   12. UTILITIES
   ============================================ */
/* Gradients */
.gradient-primary {
  background: linear-gradient(
    135deg,
    var(--primary) 0%,
    var(--primary-light) 100%
  );
}
.gradient-accent {
  background: linear-gradient(
    135deg,
    var(--accent) 0%,
    var(--accent-dark) 100%
  );
}
.gradient-gold {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
}
/* Glass effect */
.glass {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}
.glass-dark {
  background: rgba(26, 26, 46, 0.8);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}
/* Image zoom */
.img-zoom {
  overflow: hidden;
}
.img-zoom img {
  transition: transform var(--transition-slow);
}
.img-zoom:hover img {
  transform: scale(1.1);
}
/* Parallax */
.parallax {
  background-attachment: fixed;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}
/* Map styles */
.map-container iframe {
  width: 100%;
  height: 100%;
  border: none;
}
/* Mobile nav */
.mobile-nav-item {
  transition: all var(--transition);
}
.mobile-nav-item:hover,
.mobile-nav-item.active {
  color: var(--accent);
}
.mobile-nav-item.active svg {
  transform: scale(1.1);
}
/* ============================================
   13. ACCESSIBILITY
   ============================================ */
/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
/* Focus visible */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
/* Skip link */
.skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  background: var(--accent);
  color: var(--white);
  padding: 0.5rem 1rem;
  z-index: 9999;
  transition: top var(--transition);
}
.skip-link:focus {
  top: 0;
}
/* ============================================
   14. PRINT STYLES
   ============================================ */
@media print {
  .no-print,
  .whatsapp-float,
  .back-to-top,
  .mobile-bottom-nav,
  #mainNav {
    display: none !important;
  }
  body {
    background: white !important;
    color: black !important;
  }
}
/* ============================================
   15. RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2rem;
  }
  .section-title {
    font-size: 1.75rem;
  }
  /* Disable parallax on mobile */
  .parallax {
    background-attachment: scroll;
  }
}
@media (max-width: 640px) {
  :root {
    --radius-xl: 1rem;
  }
}
