:root{
  --bg:#0b1220;
  --panel: rgba(255,255,255,.08);
  --panel2: rgba(255,255,255,.10);
  --card: rgba(255,255,255,.12);
  --stroke: rgba(255,255,255,.16);
  --text:#eaf0ff;
  --muted: rgba(234,240,255,.72);
  --brand:#f2b14b;
  --brand2:#7dd3fc;
  --danger:#fb7185;
  --ok:#34d399;
  --shadow: 0 18px 55px rgba(0,0,0,.35);
  --radius: 20px;
  --radius2: 28px;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Arial, "Cairo", "IBM Plex Sans Arabic", sans-serif;
}

*{box-sizing:border-box}
html{height:100%}
body{min-height:100%}
body{
      direction: rtl;
  text-align: right;

  margin:0;
  font-family:var(--font);
  color:var(--text);
  background:
    radial-gradient(900px 450px at 70% 15%, rgba(125,211,252,.18), transparent 55%),
    radial-gradient(650px 350px at 25% 30%, rgba(242,177,75,.18), transparent 55%),
    linear-gradient(180deg, #081025 0%, #050914 100%);
}

a{color:inherit; text-decoration:none}
.container{width:min(1100px, 92vw); margin:0 auto}
.row{display:flex; gap:16px; flex-wrap:wrap}
.hidden{display:none !important}

.topbar{
  position:sticky; top:0; z-index:50;
  backdrop-filter: blur(12px);
  background: rgba(5,9,20,.55);
  border-bottom:1px solid rgba(255,255,255,.08);
}
.topbar .inner{
  display:flex; align-items:center; justify-content:space-between;
  padding:14px 0;
}
.brand{
  display:flex; align-items:center; gap:10px;
}
.logo{
  width:36px; height:36px; border-radius:12px;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand2) 100%);
  box-shadow: 0 10px 35px rgba(242,177,75,.18);
}
.brand h1{font-size:16px; margin:0; letter-spacing:.2px}
.brand p{margin:0; font-size:12px; color:var(--muted)}
.nav{
  display:flex; gap:8px; align-items:center; flex-wrap:wrap;
}
.chip{
  padding:10px 12px;
  background: rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.10);
  border-radius:999px;
  font-size:12px;
  color:var(--muted);
  cursor: pointer;
  transition: all .2s ease;
}
.chip:hover{
  background: rgba(255,255,255,.10);
}
.chip.active{background: rgba(242,177,75,.14); border-color: rgba(242,177,75,.35); color: var(--text)}
.btn{
  border:none; cursor:pointer;
  padding:12px 16px;
  border-radius:999px;
  background: rgba(255,255,255,.08);
  color:var(--text);
  border:1px solid rgba(255,255,255,.14);
  transition:.15s transform ease, .15s opacity ease;
}
.btn:hover{transform: translateY(-1px)}
.btn.primary{
  background: linear-gradient(135deg, rgba(242,177,75,.95) 0%, rgba(242,177,75,.75) 100%);
  border-color: rgba(242,177,75,.50);
  color:#161616;
  font-weight:700;
}
.btn.ghost{background: rgba(255,255,255,.06)}
.btn.danger{background: rgba(251,113,133,.16); border-color: rgba(251,113,133,.35)}
.btn.small{padding:8px 12px; font-size:12px}

.heroLite{
  padding:26px 0 16px;
}
.heroLite h1{margin:0 0 8px; font-size:26px}
.heroLite p{margin:0; color:var(--muted); font-size:13px}
.summary{
  display:flex; gap:10px; flex-wrap:wrap; margin-top:14px;
}
.badge{
  padding:10px 12px;
  border-radius:999px;
  background: rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.10);
  font-size:12px;
  color:var(--muted);
}
.badge b{color:var(--text)}
.layout2{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:16px;
}
@media (max-width: 980px){
  .layout2{grid-template-columns: 1fr}
}
.card{
  background: rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.10);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card .head{
  padding:14px 14px 10px;
  display:flex; justify-content:space-between; align-items:center;
  border-bottom:1px solid rgba(255,255,255,.10);
}
.card .head h3{margin:0; font-size:14px}
.card .head small{color:var(--muted)}
.card .body{padding:14px}

.timeline{
  display:flex; flex-direction:column; gap:10px;
}
.step{
  display:grid;
  grid-template-columns: 34px 1fr auto;
  gap:12px;
  padding:12px;
  border-radius: 18px;
  background: rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.10);
  align-items: center;
}
.dot{
  width:34px; height:34px; border-radius:14px;
  display:grid; place-items:center;
  background: rgba(125,211,252,.12);
  border:1px solid rgba(125,211,252,.28);
  color:var(--text);
  font-weight:700;
}
.step .meta{
  display:flex; gap:8px; flex-wrap:wrap; margin-top:6px;
  color:var(--muted); font-size:12px;
}
.step .actions{
  display:flex; gap:6px; align-items:center;
}
.iconBtn{
  width:32px; height:32px;
  display:grid; place-items:center;
  border-radius:10px;
  background: rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.12);
  cursor:pointer;
  transition: all .2s ease;
}
.iconBtn:hover{opacity:.9; background: rgba(255,255,255,.10)}
.iconBtn.x{border-color: rgba(251,113,133,.35); color: var(--danger)}
.iconBtn.up{border-color: rgba(125,211,252,.35); color: var(--brand2)}
.iconBtn.down{border-color: rgba(125,211,252,.35); color: var(--brand2)}

.mapContainer{
  height:400px;
  border-radius: 18px;
  background: rgba(255,255,255,.03);
  border:1px solid rgba(255,255,255,.10);
  position:relative;
  overflow:hidden;
}

.footer{
  padding:22px 0 44px;
  color: rgba(234,240,255,.52);
  font-size:12px;
}

/* Loading Overlay */
.loading-overlay{
  position: fixed;
  inset: 0;
  background: rgba(5,9,20,.85);
  backdrop-filter: blur(8px);
  display: grid;
  place-items: center;
  z-index: 9999;
  visibility: hidden;
  opacity: 0;
  transition: all .3s ease;
}
.loading-overlay.show{
  visibility: visible;
  opacity: 1;
}
.spinner{
  width: 50px;
  height: 50px;
  border: 4px solid rgba(242,177,75,.2);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
@keyframes spin{
  to{transform: rotate(360deg)}
}

/* Error Message */
.error-message{
  display: none;
  padding: 20px;
  text-align: center;
  color: var(--danger);
  font-size: 14px;
}
.error-message.show{
  display: block;
}

/* Leaflet Map Overrides */
.leaflet-container{
  background: rgba(255,255,255,.03);
  border-radius: 18px;
}
.leaflet-popup-content-wrapper{
  background: rgba(11,18,32,.95);
  color: var(--text);
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.12);
}
.leaflet-popup-tip{
  background: rgba(11,18,32,.95);
}
/* RTL Support */
.topbar .inner{
  flex-direction: row-reverse;
}
.nav{
  flex-direction: row-reverse;
}
.brand{
  flex-direction: row-reverse;
}
.step{
  direction: rtl;
}
.step .meta{
  flex-direction: row-reverse;
}
.step .actions{
  flex-direction: row-reverse;
}
.summary{
  flex-direction: row-reverse;
}
/* ===== BOOKING BANNER ===== */
/* Old booking-banner kept for backwards compat but hidden */
.booking-banner{ display:none !important; }

/* ===== BOOKING STRIP (compact single-line) ===== */
.booking-strip{
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px 14px;
  margin:6px 0 4px;
  border-radius:12px;
  background: rgba(0,53,128,.15);
  border:1px solid rgba(0,113,194,.18);
  text-decoration:none;
  color:var(--text);
  cursor:pointer;
  transition: all .2s ease;
  direction:rtl;
  min-height:44px;
}
.booking-strip:active{
  background: rgba(0,113,194,.22);
  transform: scale(0.98);
}
.booking-strip-icon{
  font-size:16px;
  flex-shrink:0;
  width:28px;
  height:28px;
  border-radius:8px;
  background: rgba(0,113,194,.15);
  display:grid;
  place-items:center;
}
.booking-strip-text{
  flex:1;
  font-size:12px;
  color:var(--muted);
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  line-height:1.5;
}
.booking-strip-text b{
  color:var(--text);
  font-weight:600;
}
.booking-strip-arrow{
  font-size:14px;
  color: rgba(125,211,252,.6);
  flex-shrink:0;
}
/* ===== UX ENHANCEMENTS ===== */

/* Step entrance animation */
@keyframes fadeSlideIn {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
.step {
  animation: fadeSlideIn 0.4s ease both;
}
.step:nth-child(1) { animation-delay: 0.05s }
.step:nth-child(2) { animation-delay: 0.1s }
.step:nth-child(3) { animation-delay: 0.15s }
.step:nth-child(4) { animation-delay: 0.2s }
.step:nth-child(5) { animation-delay: 0.25s }
.step:nth-child(6) { animation-delay: 0.3s }
.step:nth-child(7) { animation-delay: 0.35s }
.step:nth-child(8) { animation-delay: 0.4s }

/* Step hover glow */
.step {
  transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.2s ease;
}
.step:hover {
  border-color: rgba(125,211,252,.25);
  box-shadow: 0 4px 20px rgba(125,211,252,.08);
  transform: translateX(-3px);
}

/* Dot pulse on hover */
.step:hover .dot {
  background: rgba(125,211,252,.22);
  border-color: rgba(125,211,252,.45);
  transition: all 0.3s ease;
}

/* Badge entrance */
@keyframes popIn {
  from {
    opacity: 0;
    transform: scale(0.85);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
.badge {
  animation: popIn 0.35s ease both;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.badge:nth-child(1) { animation-delay: 0.1s }
.badge:nth-child(2) { animation-delay: 0.15s }
.badge:nth-child(3) { animation-delay: 0.2s }
.badge:hover {
  border-color: rgba(242,177,75,.30);
  transform: translateY(-2px);
}

/* Hero title entrance */
@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.heroLite h1 {
  animation: slideDown 0.5s ease both;
}
.heroLite p {
  animation: slideDown 0.5s ease 0.1s both;
}

/* Card entrance */
/* ===== CLS Fix: حجز مساحة للهيدر والبروجرس بار قبل ما يتحملون ===== */
body::before {
  content: '';
  display: block;
  height: 100px; /* ~44px header + ~56px progress bar */
}
body:has(.td-header)::before,
body:has(#tdProgressBar)::before {
  display: none; /* أزل الحجز لما العناصر الفعلية تظهر */
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.card {
  animation: fadeUp 0.45s ease both;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.card:nth-child(1) { animation-delay: 0.1s }
.card:nth-child(2) { animation-delay: 0.2s }
.card:hover {
  border-color: rgba(255,255,255,.16);
  box-shadow: 0 20px 60px rgba(0,0,0,.4);
}

/* Button improvements */
.btn {
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  font-size: 13px;
  font-weight: 600;
}
.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0,0,0,.25);
}
.btn:active {
  transform: translateY(0);
  box-shadow: none;
}
.btn.primary:hover {
  box-shadow: 0 6px 24px rgba(242,177,75,.30);
}

/* Icon button improvements */
.iconBtn {
  transition: all 0.2s ease;
}
.iconBtn:hover {
  transform: scale(1.1);
  opacity: 1;
}
.iconBtn:active {
  transform: scale(0.95);
}
.iconBtn.x:hover {
  background: rgba(251,113,133,.15);
  box-shadow: 0 0 12px rgba(251,113,133,.15);
}
.iconBtn.up:hover, .iconBtn.down:hover {
  background: rgba(125,211,252,.12);
  box-shadow: 0 0 12px rgba(125,211,252,.12);
}

/* Map card entrance */
.mapContainer {
  animation: fadeUp 0.5s ease 0.25s both;
}

/* Chip hover */
.chip {
  transition: all 0.25s ease;
}
.chip:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 12px rgba(0,0,0,.2);
}

/* Smooth loading overlay */
.loading-overlay {
  transition: visibility 0.3s, opacity 0.3s ease;
}

/* Topbar smooth shadow on scroll */
.topbar {
  transition: box-shadow 0.3s ease;
}

/* Nav link active glow */
.chip.active {
  box-shadow: 0 0 16px rgba(242,177,75,.12);
}
/* Fix background stretch */
#page.site,
.container.post-wrap,
.row.site-main,
main#primary,
main#primary > article,
.entry-content {
  background: transparent !important;
  min-height: 0 !important;
  height: auto !important;
  overflow: visible !important;
}
.site-footer,
footer {
  background: transparent !important;
}
body {
  background-attachment: fixed !important;
  background-repeat: no-repeat !important;
  background-size: cover !important;
}

/* ==========================================================
   MOBILE UX OVERHAUL - Touch, Readability, Budget, Map Lazy
   ========================================================== */

/* ===== READABILITY ===== */
body {
  font-size: 15px;
  line-height: 1.7;
}
.step b {
  font-size: 15px;
  line-height: 1.6;
}
.step .meta span {
  font-size: 13px;
  line-height: 1.6;
}

/* ===== TOUCH UX - min 44px, gap 8px ===== */
.iconBtn {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border-radius: 12px;
  font-size: 18px;
}
.iconBtn-spacer {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
}
.step .actions {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
}
.btn {
  min-height: 44px;
  padding: 12px 16px;
}
.chip {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

/* ===== BUDGET CARD (harmonized with dark theme) ===== */
.td-budget-card {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 16px;
  padding: 16px;
  margin-top: 16px;
  direction: rtl;
}
.td-budget-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  font-size: 14px;
  font-weight: 700;
  color: var(--muted);
}
.td-budget-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
}
.td-budget-item {
  text-align: center;
  padding: 14px 8px;
  border-radius: 12px;
}
.td-budget-low {
  background: rgba(52, 211, 153, 0.08);
  border: 1px solid rgba(52, 211, 153, 0.18);
}
.td-budget-mid {
  background: rgba(125, 211, 252, 0.10);
  border: 1px solid rgba(125, 211, 252, 0.22);
}
.td-budget-high {
  background: rgba(242, 177, 75, 0.08);
  border: 1px solid rgba(242, 177, 75, 0.18);
}
.td-budget-icon {
  font-size: 18px;
  margin-bottom: 4px;
}
.td-budget-label {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 4px;
  font-weight: 400;
}
.td-budget-value {
  font-size: 20px;
  font-weight: 800;
}
.td-budget-low .td-budget-value { color: #34d399; }
.td-budget-mid .td-budget-value { color: #7dd3fc; }
.td-budget-high .td-budget-value { color: #f2b14b; }

/* ===== MAP LAZY LOAD ===== */
.map-lazy-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 220px;
  height: 100%;
  gap: 10px;
  cursor: pointer;
  transition: background 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.map-lazy-placeholder:active {
  background: rgba(255,255,255,.04);
}
.map-lazy-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(125,211,252,.10);
  display: grid;
  place-items: center;
  font-size: 24px;
}
.map-lazy-text {
  font-size: 14px;
  color: var(--text);
  font-weight: 600;
}
.map-lazy-hint {
  font-size: 12px;
  color: var(--muted);
}

/* ===== STEP GRID FIX - actions always centered ===== */
.step {
  grid-template-columns: 34px 1fr auto;
  align-items: start;
  padding: 14px;
}

/* ===== MOBILE 360px ===== */
@media (max-width: 420px) {
  .container { width: 95vw; }
  
  .step {
    grid-template-columns: 30px 1fr;
    gap: 10px;
    padding: 12px;
  }
  .step .actions {
    grid-column: 1 / -1;
    justify-content: center;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(255,255,255,.06);
  }
  .dot {
    width: 30px;
    height: 30px;
    border-radius: 10px;
    font-size: 13px;
  }
  
  .td-budget-grid {
    gap: 6px;
  }
  .td-budget-value {
    font-size: 17px;
  }
  .td-budget-item {
    padding: 10px 4px;
  }
  
  .heroLite h1 {
    font-size: 22px;
  }
  
  .layout2 {
    grid-template-columns: 1fr;
  }
  
  .booking-strip {
    padding: 8px 12px;
    gap: 8px;
  }
  .booking-strip-text {
    font-size: 11px;
  }
  
  .badge {
    padding: 8px 10px;
    font-size: 11px;
  }
  
  .topbar .inner {
    padding: 10px 0;
  }
  .brand h1 { font-size: 14px; }
}

/* ===== CONTRAST AA compliance ===== */
.step .meta span {
  color: rgba(234,240,255,.72); /* ratio ~7:1 on dark bg */
}
.td-budget-label {
  color: rgba(234,240,255,.65); /* ratio ~5.5:1 */
}

/* ===== Reduced motion ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ==========================================================
   DATE UPDATE BANNER
   ========================================================== */
.td-date-banner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  margin-bottom: 14px;
  border-radius: 16px;
  background: rgba(242, 177, 75, 0.08);
  border: 1px solid rgba(242, 177, 75, 0.22);
  direction: rtl;
  position: relative;
}
.td-date-banner-icon {
  font-size: 22px;
  flex-shrink: 0;
  margin-top: 2px;
}
.td-date-banner-content {
  flex: 1;
}
.td-date-banner-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--brand);
  margin-bottom: 4px;
}
.td-date-banner-desc {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 12px;
  line-height: 1.6;
}
.td-date-banner-form {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.td-date-input {
  height: 44px;
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.06);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  min-width: 160px;
  -webkit-tap-highlight-color: transparent;
}
.td-date-input:focus {
  outline: none;
  border-color: rgba(242, 177, 75, 0.45);
}
.td-date-banner-close {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: rgba(255,255,255,.06);
  color: var(--muted);
  font-size: 14px;
  cursor: pointer;
  display: grid;
  place-items: center;
}

@media (max-width: 420px) {
  .td-date-banner {
    padding: 14px 12px;
    gap: 10px;
  }
  .td-date-banner-form {
    flex-direction: column;
    align-items: stretch;
  }
  .td-date-input {
    min-width: auto;
    width: 100%;
  }
}


/* ==========================================================
   STICKY CTA + SHARE MENU + TOAST
   انتقلت لـ td-sticky-bar.css المشترك
   ========================================================== */

/* Footer padding to prevent content overlap with sticky bar */
.footer {
  padding-bottom: 90px !important;
}

#mapContainer{height:400px;border-radius:16px;overflow:hidden;border:1px solid rgba(255,255,255,.1);margin:20px 0}
#timelineContainer{border:1px solid rgba(255,255,255,.1);border-radius:16px;overflow:hidden;margin:20px 0}

.car-cost-section{max-width:100%;box-sizing:border-box;margin:20px 0}
.cc-card{max-width:100%;box-sizing:border-box}


/* مسافة كافية لكل العناصر فوق sticky bar */
body {
  padding-bottom: 160px !important;
}

/* رفع البانر فوق sticky bar */
.sticky-cta ~ div,
.td-spots-banner,
[id*="spots-banner"],
[class*="spots-banner"] {
  margin-bottom: 100px;
}