:root {
  --primary: #b8122a;
  --primary-dark: #801020;
  --accent: #f6bf23;
  --accent-soft: #fff1bd;
  --ink: #20242b;
  --muted: #6c737f;
  --line: #e8eaee;
  --surface: #ffffff;
  --soft: #f6f7f9;
  --shadow: 0 18px 50px rgba(23, 27, 34, .12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--surface);
  font-family: "Noto Sans Arabic", "Inter", system-ui, sans-serif;
  line-height: 1.75;
}

html[dir="ltr"] body {
  font-family: "Inter", "Noto Sans Arabic", system-ui, sans-serif;
}

a {
  text-decoration: none;
}

.preloader {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  place-items: center;
  background: var(--surface);
  transition: opacity .35s ease, visibility .35s ease;
}

.preloader.is-hidden {
  opacity: 0;
  visibility: hidden;
}

.loader-box {
  display: grid;
  gap: .75rem;
  min-width: 210px;
  text-align: center;
  color: var(--primary);
  font-weight: 800;
}

.loader-line {
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--accent-soft);
}

.loader-line::before {
  content: "";
  display: block;
  width: 42%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  animation: loading 1s infinite ease-in-out;
}

@keyframes loading {
  0% { transform: translateX(-110%); }
  100% { transform: translateX(245%); }
}

.site-header {
  background: rgba(255, 255, 255, .95);
  box-shadow: 0 6px 26px rgba(23, 27, 34, .08);
  backdrop-filter: blur(14px);
}

.navbar {
  padding: .85rem 0;
}

.brand-mark,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  color: var(--ink);
}

.brand-icon,
.footer-brand i {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  color: var(--surface);
  background: linear-gradient(135deg, var(--primary), #e24931);
  border-radius: 8px;
}

.brand-copy {
  display: grid;
  line-height: 1.2;
}

.brand-copy strong {
  font-size: 1.04rem;
}

.brand-copy small {
  color: var(--muted);
  font-size: .76rem;
}

.nav-link {
  color: var(--ink);
  font-weight: 700;
  padding-inline: .85rem !important;
}

.nav-link.active,
.nav-link:hover {
  color: var(--primary);
}

.btn {
  border-radius: 8px;
  font-weight: 800;
}

.btn-primary {
  --bs-btn-bg: var(--primary);
  --bs-btn-border-color: var(--primary);
  --bs-btn-hover-bg: var(--primary-dark);
  --bs-btn-hover-border-color: var(--primary-dark);
}

.btn-warning {
  --bs-btn-bg: var(--accent);
  --bs-btn-border-color: var(--accent);
  --bs-btn-color: var(--ink);
  --bs-btn-hover-bg: #e3aa12;
  --bs-btn-hover-border-color: #e3aa12;
}

.btn-danger-soft {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  color: var(--primary);
  background: #fff0f2;
  border: 1px solid #ffd5db;
}

.language-toggle {
  min-width: 108px;
  border-color: var(--line);
}

.section-anchor {
  scroll-margin-top: 88px;
}

.section-padding {
  padding: 96px 0;
}

.page-hero {
  position: relative;
  overflow: hidden;
  padding: 150px 0 72px;
  color: var(--surface);
  background:
    linear-gradient(90deg, rgba(17, 21, 27, .92), rgba(128, 16, 32, .78)),
    url("../images/swift-route-hero.png") center/cover no-repeat;
}

.page-hero::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  height: 6px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
}

.page-hero .container {
  position: relative;
  z-index: 1;
}

.page-hero .eyebrow {
  color: var(--accent);
}

.page-hero h1 {
  max-width: 820px;
  font-size: clamp(2rem, 4vw, 4rem);
  font-weight: 800;
  line-height: 1.15;
}

.page-hero p {
  max-width: 720px;
  color: rgba(255, 255, 255, .84);
  font-size: 1.08rem;
}

.hero-section {
  position: relative;
  overflow: hidden;
  color: var(--surface);
  background: #11151b;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(17, 21, 27, .9) 0%, rgba(17, 21, 27, .78) 38%, rgba(17, 21, 27, .25) 70%),
    url("../images/swift-route-hero.png") center/cover no-repeat;
}

html[dir="rtl"] .hero-bg {
  transform: scaleX(-1);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 700px;
  padding-top: 96px;
}

.eyebrow,
.section-heading span {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  color: var(--primary);
  font-weight: 800;
  margin-bottom: .8rem;
}

.hero-content .eyebrow {
  color: var(--accent);
}

.hero-content h1 {
  margin-bottom: 1rem;
  font-size: clamp(2.15rem, 4.4vw, 4.8rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: 0;
}

.hero-content p {
  max-width: 650px;
  color: rgba(255, 255, 255, .84);
  font-size: 1.12rem;
}

.hero-track-form {
  max-width: 720px;
  margin-top: 2rem;
  padding: .7rem;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 8px;
  background: rgba(255, 255, 255, .12);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.hero-track-form .input-group-text,
.hero-track-form .form-control {
  border: 0;
}

.form-error {
  display: block;
  margin-top: .55rem;
  color: #ffe3e8;
  font-weight: 700;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .85rem;
  margin-top: 1.2rem;
}

.section-heading {
  max-width: 760px;
  margin: 0 auto 2.5rem;
}

.section-heading.text-start {
  margin-inline: 0;
}

.section-heading h2 {
  font-size: clamp(1.8rem, 3vw, 3rem);
  font-weight: 800;
  margin-bottom: .75rem;
}

.section-heading p {
  color: var(--muted);
  margin-bottom: 0;
}

.tracking-section,
.quote-section,
.faq-section {
  background: var(--soft);
}

.tracking-panel,
.form-card,
.contact-card {
  padding: clamp(1.2rem, 3vw, 2.25rem);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.form-control,
.form-select,
.input-group-text {
  min-height: 52px;
  border-color: var(--line);
  border-radius: 8px;
}

.result-card,
.quote-result {
  margin-top: 1.35rem;
  padding: 1.35rem;
  border: 1px solid #ffdf88;
  border-radius: 8px;
  background: #fff9e7;
}

.result-label {
  display: block;
  color: var(--muted);
  font-size: .9rem;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  height: 38px;
  padding: 0 .9rem;
  color: #12613a;
  background: #e7f8ee;
  border-radius: 999px;
  font-weight: 800;
}

.shipment-progress {
  height: 18px;
  background: #f1dca1;
}

.shipment-progress .progress-bar {
  background: linear-gradient(90deg, var(--primary), var(--accent));
  font-weight: 800;
}

.service-card,
.step-card,
.mini-card,
.stat-card,
.why-card {
  height: 100%;
  padding: 1.35rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.service-card:hover,
.why-card:hover {
  transform: translateY(-5px);
  border-color: #ffd66f;
  box-shadow: var(--shadow);
}

.icon-box {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  margin-bottom: 1rem;
  color: var(--primary);
  background: var(--accent-soft);
  border-radius: 8px;
  font-size: 1.45rem;
}

.service-card h3,
.step-card h3,
.mini-card h3,
.why-card h3 {
  font-size: 1.15rem;
  font-weight: 800;
}

.service-card p,
.step-card p,
.mini-card p,
.why-card p {
  color: var(--muted);
}

.step-card {
  position: relative;
  overflow: hidden;
}

.step-number {
  display: inline-grid;
  width: 42px;
  height: 42px;
  place-items: center;
  margin-bottom: 1rem;
  color: var(--surface);
  background: var(--primary);
  border-radius: 8px;
  font-weight: 800;
}

.quote-note {
  display: flex;
  gap: .8rem;
  padding: 1rem;
  color: #12613a;
  background: #e7f8ee;
  border-radius: 8px;
  font-weight: 700;
}

.image-stack img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  box-shadow: var(--shadow);
}

.mini-card {
  background: #fffaf0;
}

.stat-card {
  text-align: center;
  background: linear-gradient(180deg, #ffffff, #fff8df);
}

.stat-card strong {
  display: block;
  color: var(--primary);
  font-size: 2rem;
  font-weight: 800;
}

.accordion {
  max-width: 920px;
  margin: 0 auto;
}

.accordion-item {
  border-color: var(--line);
}

.accordion-button {
  font-weight: 800;
}

.accordion-button:not(.collapsed) {
  color: var(--primary);
  background: #fff4d1;
}

.contact-detail {
  display: flex;
  gap: .8rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
}

.contact-detail i {
  color: var(--primary);
  font-size: 1.25rem;
}

.contact-detail strong {
  display: block;
}

.contact-detail span {
  color: var(--muted);
}

.map-placeholder {
  display: grid;
  min-height: 220px;
  place-items: center;
  margin-top: 1.25rem;
  padding: 1.5rem;
  color: var(--muted);
  text-align: center;
  background:
    linear-gradient(135deg, rgba(184, 18, 42, .08), rgba(246, 191, 35, .18)),
    repeating-linear-gradient(45deg, #f7f7f7 0 12px, #efefef 12px 24px);
  border: 1px dashed #cfd3da;
  border-radius: 8px;
}

.map-placeholder i {
  color: var(--primary);
  font-size: 2.3rem;
}

.site-footer {
  padding-top: 68px;
  color: rgba(255, 255, 255, .8);
  background: #171b22;
}

.site-footer h3 {
  color: var(--surface);
  font-size: 1.05rem;
  font-weight: 800;
  margin-bottom: 1rem;
}

.footer-brand {
  color: var(--surface);
  font-size: 1.2rem;
  font-weight: 800;
  margin-bottom: 1rem;
}

.footer-links {
  display: grid;
  gap: .55rem;
  padding: 0;
  margin: 0;
  list-style: none;
}

.footer-links a,
.footer-contact {
  color: rgba(255, 255, 255, .78);
}

.footer-links a:hover,
.social-links a:hover {
  color: var(--accent);
}

.social-links {
  display: flex;
  gap: .65rem;
}

.social-links a {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: var(--surface);
  background: rgba(255, 255, 255, .08);
  border-radius: 8px;
}

.footer-bottom {
  margin-top: 48px;
  padding: 20px 0;
  color: rgba(255, 255, 255, .68);
  border-top: 1px solid rgba(255, 255, 255, .12);
  text-align: center;
}

.back-to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 1000;
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  color: var(--surface);
  background: var(--primary);
  border: 0;
  border-radius: 8px;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transition: .2s ease;
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
}

html[dir="rtl"] .ms-auto {
  margin-right: auto !important;
  margin-left: 0 !important;
}

html[dir="rtl"] .input-group > :not(:first-child):not(.dropdown-menu):not(.valid-tooltip):not(.valid-feedback):not(.invalid-tooltip):not(.invalid-feedback) {
  margin-right: calc(var(--bs-border-width) * -1);
  margin-left: 0;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  border-top-left-radius: 8px;
  border-bottom-left-radius: 8px;
}

html[dir="rtl"] .input-group > :not(:last-child):not(.dropdown-toggle):not(.dropdown-menu):not(.form-floating) {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  border-top-right-radius: 8px;
  border-bottom-right-radius: 8px;
}

@media (max-width: 991.98px) {
  .navbar-collapse {
    padding-top: 1rem;
  }

  .hero-section .min-vh-100 {
    min-height: 780px !important;
  }

  .hero-bg {
    background:
      linear-gradient(180deg, rgba(17, 21, 27, .92) 0%, rgba(17, 21, 27, .72) 54%, rgba(17, 21, 27, .46) 100%),
      url("../images/swift-route-hero.png") center/cover no-repeat;
  }
}

@media (max-width: 575.98px) {
  .brand-copy small {
    display: none;
  }

  .brand-icon {
    width: 40px;
    height: 40px;
  }

  .language-toggle {
    min-width: auto;
    padding-inline: .55rem;
  }

  .section-padding {
    padding: 72px 0;
  }

  .hero-content {
    padding-top: 112px;
  }

  .hero-track-form {
    padding: .55rem;
  }

  .hero-track-form .input-group {
    display: grid;
    gap: .55rem;
  }

  .hero-track-form .input-group > * {
    width: 100%;
    border-radius: 8px !important;
    margin: 0 !important;
  }

  .hero-actions .btn {
    width: 100%;
  }
}
