/* ==========================================================================
   Awija Motorz - Custom Dark Luxury Automotive Styling
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;500;600;700;800;900&family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
  --color-electric-blue: #0DAB45;
  --color-electric-hover: #00c24e;
  --color-electric-glow: rgba(13, 171, 69, 0.3);
  --color-mercedes-silver: #475569;
  --bg-deep-carbon: #EEF2F6; /* Soft Slate / Smoke Gray */
  --bg-card-glass: rgba(255, 255, 255, 0.92);
  --border-glass: rgba(203, 213, 225, 0.85);
  --border-glass-hover: rgba(13, 171, 69, 0.55);
}

/* Fallback base styles for resilient offline & local rendering */
*, *::before, *::after {
  box-sizing: border-box;
}

.hidden {
  display: none !important;
}

.block { display: block; }
.inline-block { display: inline-block; }
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.grid { display: grid; }
.fixed { position: fixed; }
.absolute { position: absolute; }
.relative { position: relative; }
.sticky { position: sticky; }
.inset-0 { top: 0; right: 0; bottom: 0; left: 0; }
.w-full { width: 100%; }
.h-full { height: 100%; }
.min-h-screen { min-height: 100vh; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.z-50 { z-index: 50; }
.z-40 { z-index: 40; }
.overflow-hidden { overflow: hidden; }
.overflow-x-auto { overflow-x: auto; }

/* Typography defaults & Mobile Viewport Protection */
html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  overflow-x: clip;
  max-width: 100%;
  width: 100%;
}

body {
  background-color: var(--bg-deep-carbon);
  color: #1e293b;
  overflow-x: hidden;
  overflow-x: clip;
  max-width: 100%;
  width: 100%;
  position: relative;
  font-family: 'Cairo', system-ui, -apple-system, sans-serif;
  -webkit-text-size-adjust: 100%;
}

body[dir="ltr"] {
  font-family: 'Outfit', system-ui, -apple-system, sans-serif;
}

/* Touch-optimized horizontal scrolling without page bleed */
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.no-scrollbar::-webkit-scrollbar {
  display: none;
}

/* Glassmorphism Cards for Soft Slate Smoke Gray */
.glass-panel {
  background: var(--bg-card-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.05), 0 2px 6px -1px rgba(15, 23, 42, 0.03);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-panel:hover {
  border-color: var(--border-glass-hover);
  box-shadow: 0 12px 30px -5px rgba(13, 171, 69, 0.15), 0 4px 12px -2px rgba(15, 23, 42, 0.05);
}

.glass-panel-elevated {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(203, 213, 225, 0.9);
  box-shadow: 0 10px 30px -4px rgba(15, 23, 42, 0.08);
}

/* Electric Glow Accents */
.text-glow {
  text-shadow: 0 0 15px var(--color-electric-glow);
}

.border-glow {
  box-shadow: 0 0 15px var(--color-electric-glow);
}

.btn-electric {
  background: linear-gradient(135deg, #0DAB45 0%, #059669 100%);
  color: #ffffff !important;
  font-weight: 700;
  box-shadow: 0 4px 16px rgba(13, 171, 69, 0.35);
  transition: all 0.3s ease;
}

.btn-electric:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(13, 171, 69, 0.5);
  background: linear-gradient(135deg, #10C952 0%, #047857 100%);
}

.btn-electric:active {
  transform: translateY(0);
}

.btn-glass {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(203, 213, 225, 0.9);
  color: #1e293b;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
  transition: all 0.3s ease;
}

.btn-glass:hover {
  background: rgba(13, 171, 69, 0.08);
  border-color: rgba(13, 171, 69, 0.5);
  color: #047857;
}

/* Automotive Grid Background Pattern */
.bg-grid-pattern {
  background-image: radial-gradient(rgba(13, 171, 69, 0.18) 1px, transparent 1px),
                    radial-gradient(rgba(148, 163, 184, 0.35) 1px, transparent 1px);
  background-size: 40px 40px, 10px 10px;
  background-position: 0 0, 20px 20px;
}

/* Hero Radial Glow */
.hero-glow-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.16;
  pointer-events: none;
}

/* Custom Range Slider for EV Calculator */
input[type=range] {
  -webkit-appearance: none;
  width: 100%;
  height: 8px;
  background: #CBD5E1;
  border-radius: 9999px;
  outline: none;
}

input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #0DAB45;
  cursor: pointer;
  box-shadow: 0 0 15px rgba(13, 171, 69, 0.7);
  border: 2px solid #ffffff;
  transition: transform 0.15s ease;
}

input[type=range]::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

input[type=range]::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #0DAB45;
  cursor: pointer;
  box-shadow: 0 0 15px rgba(13, 171, 69, 0.7);
  border: 2px solid #ffffff;
}

/* Modal animation */
.modal-overlay {
  animation: fadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-content {
  animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

@keyframes slideUp {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #E2E8F0;
}

::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.6);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #0DAB45;
}

/* Pulse badge animation */
@keyframes pulseGlow {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(13, 171, 69, 0.4);
  }
  50% {
    box-shadow: 0 0 0 10px rgba(13, 171, 69, 0);
  }
}

.pulse-badge {
  animation: pulseGlow 2.5s infinite;
}
