/* ============================================
	   Al Zamzam Car Rental — Design System
	   ============================================ */

/* --- Font Definitions (swap these to change fonts globally) --- */
:root {
  --font-display: 'IBM Plex Sans Arabic', sans-serif;
  --font-body: 'Tajawal', sans-serif;

  /* --- Brand Colors --- */
  --color-primary: #101518;
  --color-accent: #F9BB27;
  --color-white: #FFFFFF;
  --color-tint: #F7F9FB;
  --color-border: #E0DCD6;
  --color-muted: #666666;
  --color-accent-hover: #E5A81F;
  --color-success: #27AE60;
  --color-error: #C0392B;
  --color-whatsapp: #25D366;

  /* --- Typography Scale --- */
  --text-hero: clamp(2rem, 5vw, 3rem);
  --text-h1: clamp(2rem, 5vw, 3rem);
  --text-h2: clamp(1.6rem, 4vw, 2rem);
  --text-h3: clamp(1.1rem, 3vw, 1.25rem);
  --text-h4: clamp(0.95rem, 2.5vw, 1rem);
  --text-body: clamp(0.875rem, 2vw, 1rem);
  --text-body-lg: clamp(1rem, 2.5vw, 1.125rem);
  --text-body-sm: clamp(0.75rem, 2vw, 0.875rem);
  --text-caption: 0.75rem;
  --text-price: clamp(1.75rem, 4vw, 2.25rem);

  /* --- Spacing --- */
  --space-2xs: 2px;
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;
  --space-4xl: 96px;
  --section-padding: 80px;
  --section-padding-mobile: 48px;

  /* --- Layout --- */
  --max-width: 1200px;
  --container-padding: 24px;

  /* --- Shadows --- */
  --shadow-subtle: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-raised: 0 8px 24px rgba(0, 0, 0, 0.10);
  --shadow-elevated: 0 16px 48px rgba(0, 0, 0, 0.14);
  --shadow-nav: 0 4px 16px rgba(0, 0, 0, 0.12);

  /* --- Transitions --- */
  --transition-fast: 150ms ease-out;
  --transition-base: 300ms ease-out;
  --transition-slow: 500ms ease-out;

  /* --- Border Radius --- */
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-pill: 20px;
  --radius-full: 9999px;

  /* --- Logo --- */
  --logo-url: url('../../logo.png');
}

/* --- Reset --- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  direction: rtl;
  overflow-x: hidden;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-body);
  font-weight: 400;
  line-height: 1.75;
  color: var(--color-primary);
  background-color: var(--color-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-accent-hover);
}

ul,
ol {
  list-style: none;
}

/* --- Typography --- */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.25;
  color: var(--color-primary);
  letter-spacing: 0.01em;
}

h1 {
  font-size: var(--text-hero);
  font-weight: 700;
  line-height: 1.2;
}

h2 {
  font-size: var(--text-h2);
  font-weight: 600;
}

h3 {
  font-size: var(--text-h3);
}

h4 {
  font-size: var(--text-h4);
}

p {
  margin-bottom: 1rem;
}

p:last-child {
  margin-bottom: 0;
}

.text-accent {
  color: var(--color-accent);
}

.text-white {
  color: var(--color-white);
}

.text-muted {
  color: var(--color-muted);
}

.text-success {
  color: var(--color-success);
}

.text-error {
  color: var(--color-error);
}

/* --- Labels / Overlines --- */
.label {
  font-family: var(--font-body);
  font-size: var(--text-caption);
  font-weight: 500;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: var(--color-accent);
}

/* --- Container --- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

/* --- Section --- */
.section {
  padding: var(--section-padding) 0;
}

.section--dark {
  background-color: var(--color-primary);
  color: var(--color-white);
}

.section--dark h1,
.section--dark h2,
.section--dark h3,
.section--dark h4 {
  color: var(--color-white);
}

.section--dark p {
  color: var(--color-white);
  opacity: 0.85;
}

.section--tint {
  background-color: var(--color-tint);
}

.section--white {
  background-color: var(--color-white);
}

/* --- Buttons --- */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-size: var(--text-body);
  font-weight: 700;
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: all var(--transition-base);
  border-radius: var(--radius-md);
  padding: 14px 32px;
  min-width: 140px;
}

.btn--primary {
  background-color: var(--color-accent);
  color: var(--color-primary);
}

.btn--primary:hover {
  background-color: var(--color-accent-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-raised);
}

.btn--primary:active {
  background-color: #CC9420;
  transform: scale(0.97);
}

.btn--secondary {
  background-color: var(--color-primary);
  color: var(--color-white);
}

.btn--secondary:hover {
  background-color: #211F1D;
  color: var(--color-white);
}

.btn--whatsapp {
  background-color: var(--color-whatsapp);
  color: var(--color-white);
}

.btn--whatsapp:hover {
  background-color: #20bd5a;
  transform: translateY(-2px);
}

.btn--ghost {
  background-color: transparent;
  color: var(--color-primary);
  border: 1px solid var(--color-primary);
}

.btn--ghost:hover {
  background-color: var(--color-tint);
  color: var(--color-primary);
}

.btn--full {
  width: 100%;
  padding-left: 0;
  padding-right: 0;
}

.btn--sm {
  padding: 10px 20px;
  font-size: var(--text-body-sm);
}

/* --- Cards --- */
.card {
  background-color: var(--color-white);
  border: 1px solid var(--color-border);
  padding: var(--space-lg);
  transition: all var(--transition-base);
  border-radius: var(--radius-lg);
}

.card:hover {
  border-color: var(--color-accent);
  transform: translateY(-4px);
  box-shadow: var(--shadow-raised);
}

.card__icon {
  width: 48px;
  height: 48px;
  border: 2px solid var(--color-accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-md);
}

.card__title {
  font-family: var(--font-display);
  font-size: var(--text-h3);
  color: var(--color-primary);
  margin-bottom: var(--space-sm);
}

.card__text {
  font-size: var(--text-body-sm);
  color: var(--color-muted);
  line-height: 1.6;
}

.card--vip {
  background-color: #FFF3D6;
  border-inline-start: 3px solid var(--color-accent);
}

.card--vip .card__price {
  color: var(--color-accent);
}

/* --- Divider --- */
.divider {
  width: 40px;
  height: 1px;
  background-color: var(--color-border);
  margin: var(--space-lg) 0;
}

.divider--center {
  margin-left: auto;
  margin-right: auto;
}

/* --- Grid --- */
.grid {
  display: grid;
  gap: var(--space-lg);
}

.grid--2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid--3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid--4 {
  grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 1023px) {
  .grid--4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 767px) {

  .grid--2,
  .grid--3,
  .grid--4 {
    grid-template-columns: 1fr;
  }

  :root {
    --section-padding: var(--section-padding-mobile);
    --container-padding: 16px;
  }
}

/* --- Ghost Number Stats --- */
.stat-card {
  position: relative;
  padding: var(--space-xl) var(--space-lg);
  overflow: hidden;
}

.stat-card__ghost {
  position: absolute;
  font-family: var(--font-display);
  font-size: 120px;
  font-weight: 700;
  color: var(--color-primary);
  opacity: 0.08;
  top: -10px;
  left: 10px;
  line-height: 1;
  pointer-events: none;
  user-select: none;
}

.stat-card__label {
  font-family: var(--font-body);
  font-size: var(--text-caption);
  font-weight: 500;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin-bottom: var(--space-xs);
  position: relative;
  z-index: 1;
}

.stat-card__number {
  font-family: var(--font-display);
  font-size: 3.5rem;
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1;
  margin-bottom: var(--space-xs);
  position: relative;
  z-index: 1;
}

.stat-card__description {
  font-size: var(--text-body-sm);
  color: var(--color-muted);
  max-width: 200px;
  position: relative;
  z-index: 1;
}

/* --- Accordion / FAQ --- */
.accordion__item {
  border-bottom: 1px solid var(--color-border);
}

.accordion__question {
  width: 100%;
  background: none;
  border: none;
  padding: var(--space-md) 0;
  text-align: start;
  font-family: var(--font-body);
  font-size: var(--text-body);
  font-weight: 500;
  color: var(--color-primary);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: color var(--transition-fast);
}

.accordion__question:hover {
  color: var(--color-accent);
}

.accordion__icon {
  font-size: 1.5rem;
  color: var(--color-accent);
  transition: transform var(--transition-base);
}

.accordion__item.active .accordion__icon {
  transform: rotate(45deg);
}

.accordion__answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-base);
}

.accordion__item.active .accordion__answer {
  max-height: 500px;
}

.accordion__answer p {
  padding-bottom: var(--space-md);
  font-size: var(--text-body-sm);
  color: var(--color-muted);
}

/* --- Form Elements --- */
.form-group {
  margin-bottom: var(--space-md);
}

.form-label {
  display: block;
  font-size: var(--text-body-sm);
  font-weight: 500;
  color: var(--color-primary);
  margin-bottom: var(--space-xs);
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: 14px 16px;
  font-family: var(--font-body);
  font-size: var(--text-body);
  color: var(--color-primary);
  background-color: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(249, 187, 39, 0.15);
}

.form-textarea {
  resize: vertical;
  min-height: 150px;
}

/* --- Utility --- */
.text-center {
  text-align: center;
}

.text-start {
  text-align: start;
}

.mb-xs { margin-bottom: var(--space-xs); }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }
.mb-2xl { margin-bottom: var(--space-2xl); }

.mt-xs { margin-top: var(--space-xs); }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }

/* --- Logo --- */
.nav__logo-img,
.footer__logo-img {
  display: block;
  width: 160px;
  height: auto;
  object-fit: contain;
  object-position: left center;
}

.footer__logo-img {
  margin-bottom: var(--space-md);
}

/* --- Animations --- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in-up {
  animation: fadeInUp var(--transition-slow) ease-out forwards;
}

/* --- Floating WhatsApp Button --- */
.whatsapp-fab {
  position: fixed;
  bottom: 24px;
  left: 24px;
  width: 56px;
  height: 56px;
  background-color: var(--color-whatsapp);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-elevated);
  z-index: 9999;
  transition: transform 0.3s ease-in-out;
  opacity: 0;
}

.whatsapp-fab.is-visible {
  opacity: 1;
}

.whatsapp-fab:hover {
  transform: scale(1.05);
}

.whatsapp-fab svg {
  width: 28px;
  height: 28px;
  fill: var(--color-white);
}

/* --- Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }
}
