/* ============================================================
   Al-Rawabi Transport — Custom Styles
   Bootstrap 5 RTL overrides & section styling
   ============================================================ */

/* --- CSS Custom Properties --- */
:root {
  --rawabi-primary: #0d233a;
  --rawabi-primary-dark: #081726;
  --rawabi-primary-light: #1a4a7a;
  --rawabi-accent: #25d366;
  --rawabi-accent-hover: #1da851;
  --rawabi-light: #f8f9fa;
  --rawabi-white: #ffffff;

  /* Bootstrap overrides */
  --bs-primary: #0d233a;
  --bs-primary-rgb: 13, 35, 58;
  --bs-body-font-family: 'Cairo', sans-serif;
  --bs-link-color: #0d233a;
  --bs-link-hover-color: #1a4a7a;
}

/* --- Base & Reset --- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: 'Cairo', sans-serif;
  color: #333;
  overflow-x: hidden;
}

/* Skip link (accessibility) */
.skip-link {
  position: absolute;
  top: -100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--rawabi-primary);
  color: var(--rawabi-white);
  padding: 0.75rem 1.5rem;
  z-index: 10000;
  border-radius: 0 0 0.5rem 0.5rem;
  text-decoration: none;
  transition: top 0.3s;
}

.skip-link:focus {
  top: 0;
  color: var(--rawabi-white);
}

/* --- Section Titles --- */
.section-title {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  color: var(--rawabi-primary);
}

.section-underline {
  width: 60px;
  height: 4px;
  background: var(--rawabi-primary);
  border-radius: 2px;
}

.section-underline-light {
  background: var(--rawabi-white);
}

.section-subtitle {
  max-width: 600px;
}

/* ============================================================
   A. NAVBAR
   ============================================================ */
.navbar-rawabi {
  background: var(--rawabi-white);
  box-shadow: 0 2px 12px rgba(13, 35, 58, 0.08);
  transition: background 0.35s ease, box-shadow 0.35s ease, padding 0.35s ease;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

.navbar-rawabi.scrolled {
  background: var(--rawabi-white);
  box-shadow: 0 4px 20px rgba(13, 35, 58, 0.12);
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.navbar-logo {
  height: 48px;
  width: auto;
  object-fit: contain;
}

.navbar-rawabi .nav-link {
  color: var(--rawabi-primary);
  font-weight: 600;
  padding: 0.5rem 1rem;
  position: relative;
  transition: color 0.25s ease;
}

.navbar-rawabi .nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 50%;
  width: 0;
  height: 2px;
  background: var(--rawabi-primary);
  transition: width 0.3s ease, right 0.3s ease;
}

.navbar-rawabi .nav-link:hover,
.navbar-rawabi .nav-link:focus {
  color: var(--rawabi-primary-light);
}

.navbar-rawabi .nav-link:hover::after {
  width: 60%;
  right: 20%;
}

.navbar-rawabi .navbar-toggler {
  color: var(--rawabi-primary);
}

.navbar-rawabi .navbar-toggler-icon {
  filter: none;
}

.nav-cta {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.nav-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Mobile navbar collapse */
@media (max-width: 991.98px) {
  .navbar-rawabi .navbar-collapse {
    background: var(--rawabi-light);
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 0.5rem;
    border: 1px solid rgba(13, 35, 58, 0.08);
  }

  .navbar-logo {
    height: 40px;
  }
}

/* ============================================================
   B. HERO SECTION
   ============================================================ */
.hero-section {
  position: relative;
  min-height: 100vh;
  padding-top: 100px;
  padding-bottom: 80px;
  /* Gradient fallback + optional hero image */
  background:
    linear-gradient(135deg, rgba(13, 35, 58, 0.92) 0%, rgba(8, 23, 38, 0.88) 100%),
    url('/images/hero-bg.jpg') center/cover no-repeat;
  background-color: var(--rawabi-primary-dark);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 30% 50%, rgba(26, 74, 122, 0.2) 0%, transparent 70%);
  pointer-events: none;
}

.hero-title {
  font-size: clamp(1.75rem, 4vw, 3.25rem);
  line-height: 1.3;
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.25rem);
  max-width: 650px;
  line-height: 1.8;
}

@media (min-width: 992px) {
  .hero-subtitle {
    margin-right: 0;
    margin-left: auto;
  }
}

/* WhatsApp button */
.btn-whatsapp {
  background: var(--rawabi-accent);
  color: var(--rawabi-white);
  border: none;
  font-weight: 700;
  transition: background 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.btn-whatsapp:hover,
.btn-whatsapp:focus {
  background: var(--rawabi-accent-hover);
  color: var(--rawabi-white);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
}

/* Floating WhatsApp */
.whatsapp-float {
  position: fixed;
  bottom: 24px;
  left: 24px;
  width: 56px;
  height: 56px;
  background: var(--rawabi-accent);
  color: var(--rawabi-white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.5);
  z-index: 999;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-decoration: none;
  animation: whatsapp-pulse 2.5s infinite;
}

.whatsapp-float:hover {
  color: var(--rawabi-white);
  transform: scale(1.1);
  box-shadow: 0 6px 24px rgba(37, 211, 102, 0.6);
}

@keyframes whatsapp-pulse {
  0%, 100% { box-shadow: 0 4px 16px rgba(37, 211, 102, 0.5); }
  50% { box-shadow: 0 4px 24px rgba(37, 211, 102, 0.8); }
}

/* ============================================================
   C. TRUST & STATISTICS
   ============================================================ */
.stats-section {
  background: var(--rawabi-light);
  margin-top: -40px;
  position: relative;
  z-index: 2;
  padding-top: 3rem !important;
}

.stat-card {
  border: 1px solid rgba(13, 35, 58, 0.06);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(13, 35, 58, 0.1) !important;
}

.stat-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto;
  background: rgba(13, 35, 58, 0.08);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  color: var(--rawabi-primary);
}

.stat-number {
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  color: var(--rawabi-primary);
}

.stat-label {
  font-size: 0.9rem;
}

/* ============================================================
   D. SERVICES
   ============================================================ */
.services-section {
  background: var(--rawabi-white);
}

.service-card {
  overflow: hidden;
  border-radius: 0.75rem !important;
}

.card-hover {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card-hover:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(13, 35, 58, 0.12) !important;
}

.card-icon-header {
  background: linear-gradient(135deg, rgba(13, 35, 58, 0.08) 0%, rgba(26, 74, 122, 0.06) 100%);
  padding: 2rem;
  text-align: center;
  font-size: 2.5rem;
  color: var(--rawabi-primary);
}

.service-card .card-title {
  color: var(--rawabi-primary);
}

/* ============================================================
   E. ABOUT / VALUE PROPOSITION
   ============================================================ */
.about-section {
  background: var(--rawabi-light);
}

.about-illustration {
  background: var(--rawabi-white);
  border-radius: 1rem;
  padding: 2rem;
  box-shadow: 0 4px 24px rgba(13, 35, 58, 0.08);
}

.about-features li {
  font-size: 1.05rem;
  line-height: 1.6;
}

.about-features .bi-check-circle-fill {
  font-size: 1.25rem;
}

/* ============================================================
   E2. CLIENTS
   ============================================================ */
.clients-section {
  background: var(--rawabi-white);
}

.client-card {
  padding: 0.5rem;
}

.client-logo-ring {
  width: 140px;
  height: 140px;
  margin: 0 auto 1rem;
  border: 3px solid var(--rawabi-accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--rawabi-white);
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.client-card:hover .client-logo-ring {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.2);
}

.client-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 0.5rem;
}

.client-name {
  font-size: 0.95rem;
  color: var(--rawabi-primary);
}

@media (max-width: 575.98px) {
  .client-logo-ring {
    width: 110px;
    height: 110px;
  }

  .client-name {
    font-size: 0.85rem;
  }
}

/* ============================================================
   F. QUOTE FORM
   ============================================================ */
.quote-section {
  background: linear-gradient(135deg, var(--rawabi-primary) 0%, var(--rawabi-primary-dark) 100%);
}

.quote-section .section-title {
  color: var(--rawabi-white);
}

.quote-card {
  border-radius: 1rem !important;
}

.quote-card .form-control,
.quote-card .form-select {
  border: 1px solid #dee2e6;
  border-radius: 0.5rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.quote-card .form-control:focus,
.quote-card .form-select:focus {
  border-color: var(--rawabi-primary);
  box-shadow: 0 0 0 0.2rem rgba(13, 35, 58, 0.15);
}

.quote-card .btn-primary {
  background: var(--rawabi-primary);
  border-color: var(--rawabi-primary);
  font-weight: 700;
  padding: 0.875rem 1.5rem;
  transition: background 0.25s ease, transform 0.2s ease;
}

.quote-card .btn-primary:hover {
  background: var(--rawabi-primary-light);
  border-color: var(--rawabi-primary-light);
  transform: translateY(-1px);
}

/* ============================================================
   G. FOOTER
   ============================================================ */
.footer-section {
  background: var(--rawabi-primary-dark);
  color: rgba(255, 255, 255, 0.85);
}

.footer-logo {
  filter: brightness(1.1);
}

.footer-heading {
  color: var(--rawabi-white);
  font-size: 1.1rem;
}

.footer-text {
  font-size: 0.95rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.7);
}

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  transition: color 0.2s ease, padding-right 0.2s ease;
  display: inline-block;
}

.footer-links a:hover {
  color: var(--rawabi-white);
  padding-right: 4px;
}

.footer-contact a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-contact a:hover {
  color: var(--rawabi-white);
}

.footer-contact i {
  color: var(--rawabi-accent);
}

.footer-bottom {
  border-color: rgba(255, 255, 255, 0.15) !important;
}

.footer-copyright {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.6);
}

/* ============================================================
   RESPONSIVE TWEAKS
   ============================================================ */

/* Extra small (320px+) */
@media (max-width: 575.98px) {
  .hero-section {
    padding-top: 90px;
    min-height: auto;
    padding-bottom: 60px;
  }

  .stats-section {
    margin-top: 0;
    padding-top: 2rem !important;
  }

  .whatsapp-float {
    width: 48px;
    height: 48px;
    font-size: 1.5rem;
    bottom: 16px;
    left: 16px;
  }

  .quote-card .card-body {
    padding: 1.5rem !important;
  }
}

/* Large screens (1200px+) */
@media (min-width: 1200px) {
  .hero-section {
    padding-top: 120px;
  }

  section.py-5 {
    padding-top: 5rem !important;
    padding-bottom: 5rem !important;
  }
}

/* 4K / ultra-wide (1920px+) */
@media (min-width: 1920px) {
  .hero-subtitle {
    max-width: 750px;
  }

  .section-subtitle {
    max-width: 700px;
  }
}

/* Primary button global override */
.btn-primary {
  --bs-btn-bg: var(--rawabi-primary);
  --bs-btn-border-color: var(--rawabi-primary);
  --bs-btn-hover-bg: var(--rawabi-primary-light);
  --bs-btn-hover-border-color: var(--rawabi-primary-light);
  --bs-btn-active-bg: var(--rawabi-primary-dark);
  --bs-btn-active-border-color: var(--rawabi-primary-dark);
}
