/* ============================================================
   دليلك — styles.css
   ============================================================ */

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

:root {
  /* 🇲🇾 هوية الألوان الماليزية: أزرق كحلي + أحمر + أصفر ذهبي */
  --brand-blue: #010066;
  --brand-blue-dark: #00004D;
  --brand-red: #CC0001;
  --accent: #FFCC00;
  --accent-dark: #E6B800;
  --ink: #0A0E2E;
  --bg-main: #F6F7FB;
  --bg-soft: #EEF1F8;
  --text-primary: #1A1F35;
  --text-secondary: #4A5168;
  --text-muted: #8B91A8;
  --border-color: #E2E6F0;
  --shadow-sm: 0 1px 3px rgba(15,20,56,0.08);
  --shadow-md: 0 4px 12px rgba(15,20,56,0.1);
  --shadow-lg: 0 10px 30px rgba(15,20,56,0.15);
  --shadow-blue: 0 6px 20px rgba(42,63,184,0.25);
  --shadow-yellow: 0 6px 20px rgba(242,201,76,0.35);
  --header-height: 86px;
  --ticker-height: 38px;
  --banner-height: 60px;
  --transition: all 0.2s ease;
}

* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  font-family: 'Cairo', system-ui, sans-serif;
  background: var(--bg-main);
  color: var(--text-primary);
  height: 100vh;
  overflow: hidden;
}

/* =========== الهيدر =========== */
.top-header {
  height: var(--header-height);
  background: #fff;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  box-shadow: var(--shadow-sm);
}
.logo { display: flex; align-items: center; gap: 14px; }
.logo-img { height: 72px; width: auto; display: block; }

.header-actions { display: flex; align-items: center; gap: 16px; }

.subscribe-btn {
  background: var(--accent);
  color: var(--ink);
  border: 2px solid var(--accent);
  border-radius: 11px;
  padding: 9px 18px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  box-shadow: var(--shadow-yellow);
}
.subscribe-btn:hover {
  background: var(--brand-blue);
  color: var(--accent);
  border-color: var(--brand-blue);
  transform: translateY(-2px);
}
.subscribe-btn svg { width: 16px; height: 16px; }

.social-icons { display: flex; gap: 8px; }
.social-link {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--bg-soft);
  display: flex; align-items: center; justify-content: center;
  color: var(--brand-blue);
  transition: var(--transition);
  text-decoration: none;
}
.social-link:hover { background: var(--brand-blue); color: #fff; transform: translateY(-2px); }
.social-link svg { width: 16px; height: 16px; }

/* =========== شريط الأخبار المتحرك =========== */
.news-ticker-wrap {
  position: fixed;
  top: var(--header-height);
  left: 0; right: 0;
  height: var(--ticker-height);
  background: var(--ink);
  display: flex;
  align-items: center;
  z-index: 999;
  border-bottom: 1px solid #000;
}
.ticker-label {
  background: var(--accent);
  color: var(--ink);
  padding: 8px 18px;
  font-weight: 800;
  font-size: 13px;
  height: 100%;
  display: flex;
  align-items: center;
  white-space: nowrap;
  border-left: 2px solid var(--ink);
}
.news-ticker {
  flex: 1;
  overflow: hidden;
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  position: relative;
}
.ticker-track {
  display: inline-block;
  padding-right: 100%;
  animation: tickerScroll 90s linear infinite;
  white-space: nowrap;
}
.ticker-track:hover { animation-play-state: paused; }
.ticker-link {
  color: var(--accent);
  text-decoration: none;
  cursor: pointer;
  transition: color 0.2s;
}
.ticker-link:hover {
  color: #FFFFFF;
  text-decoration: underline;
}
.ticker-event { color: var(--accent); }
.ticker-offer { color: #FFD96B; font-weight: 700; }
@keyframes tickerScroll {
  0% { transform: translateX(100%); }
  100% { transform: translateX(-100%); }
}

/* =========== بانر الإعلانات =========== */
.ads-banner {
  position: fixed;
  top: calc(var(--header-height) + var(--ticker-height));
  left: 0; right: 0;
  height: var(--banner-height);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 24px;
  z-index: 998;
  font-weight: 700;
  transition: background 0.5s, color 0.5s;
}
.banner-icon { font-size: 24px; }
.banner-text { flex: 1; }
.banner-title { font-size: 15px; font-weight: 800; }
.banner-subtitle { font-size: 12px; opacity: 0.85; }

/* =========== الحاوية الرئيسية =========== */
.main-container {
  position: fixed;
  top: calc(var(--header-height) + var(--ticker-height) + var(--banner-height));
  left: 0; right: 0; bottom: 0;
  display: flex;
}

/* =========== الشريط الجانبي =========== */
.sidebar {
  width: 280px;
  background: #fff;
  overflow-y: auto;
  border-left: 1px solid var(--border-color);
  padding: 16px;
}
.sidebar-section { margin-bottom: 18px; }
.sidebar-title {
  font-size: 12px;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 10px;
  padding-right: 8px;
  border-right: 3px solid var(--accent);
}

.mobile-close { display: none; }

.style-buttons, .layer-buttons { display: flex; flex-direction: column; gap: 6px; }
.style-buttons { flex-direction: row; gap: 8px; }
.style-btn {
  flex: 1;
  background: var(--bg-soft);
  border: 1.5px solid transparent;
  border-radius: 13px;
  padding: 14px 8px;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
}
.style-btn svg { width: 24px; height: 24px; }
.style-btn:hover { background: #fff; border-color: var(--brand-blue); color: var(--brand-blue); }
.style-btn.active {
  background: var(--brand-blue);
  color: #fff;
  border-color: var(--brand-blue);
  box-shadow: 0 4px 12px rgba(42,63,184,0.3);
}

.layer-btn {
  background: var(--bg-soft);
  border: 1px solid transparent;
  border-radius: 11px;
  padding: 11px 14px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: right;
  width: 100%;
}
.layer-btn svg { width: 18px; height: 18px; }
.layer-btn:hover { background: #fff; border-color: var(--brand-blue); color: var(--brand-blue); }
.layer-btn.active { background: var(--brand-blue); color: #fff; }
.layer-btn.active svg { stroke: var(--accent); }

/* ✨ زر "دليلك للرحلات" - تصميم خاص جذاب */
.layer-btn-tours {
  position: relative;
  background: linear-gradient(135deg, rgba(242,201,76,0.15), rgba(42,63,184,0.08));
  border: 1px solid rgba(242,201,76,0.4);
}
.layer-btn-tours .layer-btn-badge {
  position: absolute;
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--accent);
  color: var(--ink);
  font-size: 9px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 6px;
  letter-spacing: 0.3px;
}
.layer-btn-tours:hover {
  background: linear-gradient(135deg, rgba(242,201,76,0.25), rgba(42,63,184,0.12));
  border-color: var(--accent);
}
.layer-btn-tours.active {
  background: linear-gradient(135deg, var(--brand-blue), var(--brand-blue-dark, #1E2C8E));
  color: #fff;
}
.layer-btn-tours.active .layer-btn-badge {
  background: var(--accent);
  color: var(--ink);
}

/* ✨ سيارة الرحلة المتحركة (Leaflet marker) */
.tour-car-marker {
  width: 44px !important;
  height: 44px !important;
  margin-left: -22px !important;
  margin-top: -22px !important;
}
.tour-car-marker .car-body {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--accent, #F2C94C), #E5B83C);
  border: 3px solid var(--brand-blue, #2A3FB8);
  border-radius: 12px 12px 14px 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  box-shadow: 0 6px 18px rgba(42,63,184,0.45), 0 2px 6px rgba(0,0,0,0.3);
  animation: tourCarBob 1.4s ease-in-out infinite;
  position: relative;
}
.tour-car-marker .car-body::before {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 22px;
  height: 8px;
  background: rgba(15,20,56,0.30);
  border-radius: 50%;
  filter: blur(3px);
}
@keyframes tourCarBob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

/* ✨ نقاط محطات الرحلة */
.tour-stop-marker {
  width: 38px !important;
  height: 38px !important;
  margin-left: -19px !important;
  margin-top: -38px !important;
}
.tour-stop-marker .stop-pin {
  width: 38px;
  height: 38px;
  background: var(--brand-blue, #2A3FB8);
  border: 3px solid var(--accent, #F2C94C);
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(42,63,184,0.4);
}
.tour-stop-marker .stop-pin .stop-num {
  color: var(--accent, #F2C94C);
  font-weight: 900;
  font-size: 15px;
  transform: rotate(45deg);
  font-family: 'Cairo', sans-serif;
}

/* ✨ خط مسار الرحلة (يُطبَّق على leaflet polyline عبر className) */
.tour-route-path {
  filter: drop-shadow(0 0 6px rgba(255,204,0,0.6));
}

/* ✨✨ أيقونة الشخص المتحرك (بديلاً عن السيارة) باللون الأصفر */
.tour-walker-marker {
  width: 44px !important;
  height: 44px !important;
  margin-left: -22px !important;
  margin-top: -22px !important;
}
.tour-walker-marker .walker-body {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  animation: walkerBob 0.9s ease-in-out infinite;
}
.tour-walker-marker .walker-body svg {
  width: 30px;
  height: 30px;
  fill: #FFCC00;
  stroke: var(--brand-blue, #010066);
  stroke-width: 0.9px;
  filter: drop-shadow(0 4px 8px rgba(1,1,102,0.5)) drop-shadow(0 0 5px rgba(255,204,0,0.7));
}
.tour-walker-marker .walker-body::after {
  content: '';
  position: absolute;
  bottom: 2px; left: 50%;
  transform: translateX(-50%);
  width: 20px; height: 7px;
  background: rgba(1,1,102,0.30);
  border-radius: 50%;
  filter: blur(3px);
}
@keyframes walkerBob {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50% { transform: translateY(-4px) rotate(2deg); }
}

/* ====== محطات وخطوط القطارات / الباصات ====== */
.transit-station-marker .ts-dot {
  width: 14px; height: 14px; border-radius: 50%;
  background: #fff; border: 3px solid var(--line-color, #010066);
  box-shadow: 0 2px 6px rgba(0,0,0,.35);
}
.transit-station-marker.interchange .ts-dot {
  width: 18px; height: 18px; border-radius: 50%;
  background: #fff; border: 4px solid #0A0E2E;
  box-shadow: 0 0 0 3px var(--line-color, #010066), 0 2px 8px rgba(0,0,0,.4);
}
.transit-line-path { filter: drop-shadow(0 1px 3px rgba(0,0,0,.3)); }
.transit-popup h4 { margin: 0 0 4px; font-size: 15px; color: var(--brand-blue); }
.transit-popup .tp-line { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 20px; color:#fff; display:inline-block; }

/* لوحة جانبية للقطارات/الباصات */
.transit-panel {
  position: fixed;
  top: calc(var(--header-height,60px) + var(--ticker-height,36px) + var(--banner-height,48px) + 16px);
  right: 20px; width: 340px; max-width: calc(100vw - 40px);
  max-height: 70vh; overflow-y: auto;
  background: #fff; border-radius: 16px; box-shadow: var(--shadow-lg);
  z-index: 1200; display: none; padding: 0;
  border: 2px solid var(--brand-blue);
}
.transit-panel.open { display: block; }
.transit-panel-head {
  position: sticky; top: 0; background: var(--brand-blue); color: #fff;
  padding: 14px 16px; border-radius: 14px 14px 0 0;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.transit-panel-head h3 { margin: 0; font-size: 16px; display:flex; align-items:center; gap:8px; }
.transit-panel-head .tp-close { background: rgba(255,255,255,.2); border: none; color: #fff; width: 30px; height: 30px; border-radius: 50%; font-size: 20px; cursor: pointer; }
.transit-panel-body { padding: 12px; }
.transit-line-item {
  border: 1.5px solid var(--border-color); border-radius: 12px;
  padding: 10px 12px; margin-bottom: 10px; cursor: pointer; transition: var(--transition);
  display: flex; align-items: center; gap: 10px;
}
.transit-line-item:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.transit-line-item.active { border-color: var(--brand-blue); background: var(--bg-soft); }
.transit-line-swatch { width: 10px; height: 38px; border-radius: 6px; flex-shrink: 0; }
.transit-line-meta { flex: 1; min-width: 0; }
.transit-line-meta .tl-name { font-weight: 800; font-size: 14px; color: var(--text-primary); }
.transit-line-meta .tl-sub { font-size: 12px; color: var(--text-muted); }
.transit-line-code { font-size: 11px; font-weight: 800; color: #fff; padding: 2px 8px; border-radius: 20px; }
.transit-src { font-size: 11px; color: var(--text-muted); text-align: center; padding: 8px 0 2px; }

/* ====== تذاكر مخفضة ====== */
.tickets-overlay {
  position: fixed; inset: 0; background: rgba(10,14,46,.55);
  z-index: 1400; display: none; align-items: center; justify-content: center; padding: 20px;
  backdrop-filter: blur(3px);
}
.tickets-overlay.open { display: flex; }
.tickets-modal {
  background: var(--bg-main); border-radius: 20px; width: 920px; max-width: 100%;
  max-height: 88vh; overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow-lg);
}
.tickets-modal-head {
  background: linear-gradient(135deg, var(--brand-blue), var(--brand-red));
  color: #fff; padding: 18px 22px; display: flex; align-items: center; justify-content: space-between;
}
.tickets-modal-head h2 { margin: 0; font-size: 20px; display:flex; align-items:center; gap:10px; }
.tickets-modal-head .tm-close { background: rgba(255,255,255,.2); border: none; color:#fff; width:34px;height:34px;border-radius:50%;font-size:22px;cursor:pointer; }
.tickets-grid { padding: 18px; display: grid; grid-template-columns: repeat(auto-fill,minmax(240px,1fr)); gap: 14px; overflow-y: auto; }
.ticket-card {
  background: #fff; border-radius: 16px; overflow: hidden; box-shadow: var(--shadow-sm);
  border: 1.5px solid var(--border-color); display: flex; flex-direction: column; transition: var(--transition);
}
.ticket-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); border-color: var(--accent); }
.ticket-card-top { padding: 14px 14px 8px; position: relative; }
.ticket-badge { position: absolute; top: 12px; left: 12px; background: var(--brand-red); color:#fff; font-weight:800; font-size:12px; padding:4px 10px; border-radius:20px; }
.ticket-cat { font-size: 11px; color: var(--text-muted); font-weight: 700; }
.ticket-name { font-size: 15px; font-weight: 800; color: var(--text-primary); margin: 4px 0; line-height:1.4; }
.ticket-city { font-size: 12px; color: var(--text-secondary); display:flex; align-items:center; gap:4px; }
.ticket-desc { font-size: 12px; color: var(--text-secondary); padding: 0 14px 8px; line-height: 1.6; }
.ticket-card-bottom { margin-top: auto; padding: 12px 14px; border-top: 1px dashed var(--border-color); display:flex; align-items:center; justify-content:space-between; }
.ticket-price { font-size: 18px; font-weight: 900; color: var(--brand-blue); }
.ticket-old { font-size: 12px; color: var(--text-muted); text-decoration: line-through; margin-inline-start: 6px; }
.ticket-map-btn { background: var(--accent); color: var(--ink); border:none; font-weight:800; font-size:12px; padding:7px 12px; border-radius:10px; cursor:pointer; }
.ticket-map-btn:hover { background: var(--accent-dark); }
@media (max-width: 600px){ .tickets-grid{ grid-template-columns: 1fr; } }

/* ✨ بانل اختيار المسارات */
.tours-panel {
  position: fixed;
  /* احسبها من أعلى عبر CSS vars التي يضبطها الـ JS */
  top: calc(var(--header-height, 60px) + var(--ticker-height, 36px) + var(--banner-height, 48px) + 16px);
  right: 20px;
  width: 360px;
  max-width: calc(100vw - 40px);
  max-height: calc(100vh - var(--header-height, 60px) - var(--ticker-height, 36px) - var(--banner-height, 48px) - 40px);
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 14px 50px rgba(0,0,0,0.18), 0 2px 8px rgba(0,0,0,0.08);
  z-index: 900;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border: 2px solid rgba(242,201,76,0.3);
}
.tours-panel-header {
  background: linear-gradient(135deg, var(--brand-blue, #2A3FB8), var(--brand-blue-dark, #1E2C8E));
  color: #fff;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.tours-panel-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 8px;
}
.tours-panel-header h3 .accent-dot { color: var(--accent, #F2C94C); }
.tours-panel-close {
  background: rgba(255,255,255,0.15);
  border: none;
  color: #fff;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}
.tours-panel-close:hover { background: rgba(255,255,255,0.28); }
.tours-panel-body {
  padding: 14px;
  overflow-y: auto;
  flex: 1;
}
/* ✨ حاوية تبديل الدولة في الأسفل — أقل بروزاً، صغيرة الحجم */
.tours-country-tabs-wrap {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--border, #E5E7EB);
}
.tours-country-tabs-label {
  font-size: 11px;
  font-weight: 800;
  color: var(--text-muted, #6B7280);
  margin-bottom: 8px;
  letter-spacing: 0.3px;
}
.tours-country-tabs {
  display: flex;
  gap: 6px;
  /* قابل للتمرير الأفقي على كل المنصات */
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 6px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  /* إخفاء scrollbar على معظم المتصفحات */
  scrollbar-width: thin;
}
.tours-country-tabs::-webkit-scrollbar { height: 4px; }
.tours-country-tabs::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.15); border-radius: 4px; }
.tours-country-tab {
  background: var(--bg-soft, #F3F4F6);
  border: 1px solid transparent;
  padding: 6px 12px;
  border-radius: 8px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  color: var(--text-secondary, #4B5563);
  transition: var(--transition, all 0.2s);
  white-space: nowrap;
  flex-shrink: 0;
  scroll-snap-align: start;
}
.tours-country-tab:hover {
  background: #fff;
  border-color: var(--brand-blue, #2A3FB8);
  color: var(--brand-blue, #2A3FB8);
}
.tours-country-tab.active {
  background: var(--brand-blue, #2A3FB8);
  color: #fff;
}

/* بطاقة المسار */
.tour-route-card {
  background: var(--bg-soft, #F9FAFB);
  border: 1px solid var(--border, #E5E7EB);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.tour-route-card:hover {
  border-color: var(--accent, #F2C94C);
  box-shadow: 0 6px 18px rgba(42,63,184,0.10);
  transform: translateY(-2px);
}
.tour-route-card.active {
  background: linear-gradient(135deg, rgba(242,201,76,0.12), rgba(42,63,184,0.06));
  border-color: var(--accent, #F2C94C);
}
.tour-route-card-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--ink, #0F1438);
  margin: 0 0 6px;
  line-height: 1.4;
}
.tour-route-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}
.tour-route-card-tag {
  background: rgba(42,63,184,0.10);
  color: var(--brand-blue, #2A3FB8);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
}
.tour-route-card-tag.accent {
  background: rgba(242,201,76,0.20);
  color: #8B6914;
}
.tour-route-card-desc {
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--text-secondary, #4B5563);
  margin: 0 0 10px;
}
.tour-route-card-path {
  font-size: 12px;
  color: var(--brand-blue, #2A3FB8);
  font-weight: 700;
  background: #fff;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px dashed rgba(42,63,184,0.25);
  margin-bottom: 10px;
}
.tour-route-card-btn {
  width: 100%;
  background: var(--brand-blue, #2A3FB8);
  color: #fff;
  border: none;
  border-radius: 9px;
  padding: 9px;
  font-family: inherit;
  font-weight: 800;
  font-size: 12.5px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.tour-route-card-btn:hover {
  background: var(--brand-blue-dark, #1E2C8E);
}
.tour-route-card.active .tour-route-card-btn {
  background: var(--accent, #F2C94C);
  color: var(--ink, #0F1438);
}

/* بانل تفاصيل المحطة (Popup داخل الخريطة) — تصميم محدّث بصورة */
.tour-stop-popup .leaflet-popup-content-wrapper {
  border-radius: 18px;
  box-shadow: 0 12px 32px rgba(0,0,0,0.22);
  padding: 0;
  overflow: hidden;
}
.tour-stop-popup .leaflet-popup-content {
  margin: 0;
  font-family: 'Cairo', sans-serif;
  min-width: 280px;
  width: 300px !important;
}
.tour-stop-popup .leaflet-popup-close-button {
  z-index: 5;
  color: #fff !important;
  width: 28px !important;
  height: 28px !important;
  font-size: 20px !important;
  background: rgba(15,20,56,0.55) !important;
  border-radius: 50% !important;
  top: 8px !important;
  left: 8px !important;
  right: auto !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  line-height: 1 !important;
}
/* ✨ صورة المحطة في الأعلى — مع بديل متدرّج اللون واسم المدينة */
.tour-stop-content { direction: rtl; text-align: right; }
.tour-stop-img {
  width: 100%;
  height: 150px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  /* البديل الافتراضي: تدرّج أزرق-ذهبي أنيق */
  background-image: linear-gradient(135deg, #2A3FB8 0%, #1E2C8E 60%, #F2C94C 200%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.tour-stop-img-label {
  color: #fff;
  font-size: 20px;
  font-weight: 900;
  text-shadow: 0 2px 8px rgba(0,0,0,0.4);
  font-family: 'Cairo', sans-serif;
  transition: opacity 0.3s;
  padding: 0 12px;
  text-align: center;
}
/* عند تحميل صورة حقيقية، نخفي الاسم النصّي ونضيف تظليلاً سفلياً */
.tour-stop-img.has-image .tour-stop-img-label { opacity: 0; }
.tour-stop-img.has-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.25), transparent 50%);
}
.tour-stop-body { padding: 12px 16px 16px; }
.tour-stop-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  flex-direction: row-reverse;
}
.tour-stop-content h4 {
  margin: 0;
  color: var(--brand-blue, #2A3FB8);
  font-size: 16px;
  font-weight: 800;
}
.tour-stop-content .stop-duration {
  font-size: 11px;
  background: var(--accent, #F2C94C);
  color: var(--ink, #0F1438);
  padding: 3px 9px;
  border-radius: 7px;
  font-weight: 800;
  display: inline-block;
  white-space: nowrap;
}
.tour-stop-content p {
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--text, #1F2937);
  margin: 0 0 10px;
  text-align: right;
}
/* ✨ قائمة المعالم: نقاط صفراء + أسماء بالأزرق الداكن العريض */
.tour-stop-highlights {
  margin: 0;
  padding: 0;
  list-style: none;
}
.tour-stop-highlights li {
  position: relative;
  padding-right: 18px;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 800;
  color: var(--brand-blue, #2A3FB8);
  line-height: 1.5;
  text-align: right;
}
.tour-stop-highlights li::before {
  content: '';
  position: absolute;
  right: 0;
  top: 7px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent, #F2C94C);
  box-shadow: 0 1px 3px rgba(242,201,76,0.5);
}

@media (max-width: 600px) {
  /* ✨ على الموبايل: البانل يصبح bottom-sheet في الأسفل بدلاً من تغطية الشاشة */
  .tours-panel {
    top: auto;
    bottom: 0;
    right: 0;
    left: 0;
    width: 100%;
    max-width: none;
    max-height: 50vh;
    border-radius: 18px 18px 0 0;
    border: none;
    border-top: 2px solid rgba(242,201,76,0.3);
    box-shadow: 0 -10px 30px rgba(0,0,0,0.25);
    transition: transform 0.3s ease-out, max-height 0.3s ease-out;
  }
  /* الحالة المطوية: يبقى الهيدر فقط في الأسفل ليُعاد فتحه بالضغط */
  .tours-panel.collapsed {
    max-height: 56px;
    overflow: hidden;
  }
  .tours-panel.collapsed .tours-panel-body { display: none; }
  .tours-panel.collapsed .tours-panel-collapse-icon { transform: rotate(180deg); }
  /* مقبض البانل (handle bar) في أعلى البانل على الموبايل */
  .tours-panel::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 44px;
    height: 4px;
    background: rgba(255,255,255,0.35);
    border-radius: 2px;
    z-index: 2;
    pointer-events: none;
  }
  .tours-panel-header {
    padding-top: 18px;
    cursor: pointer;
  }
  .tours-country-grid { grid-template-columns: 1fr 1fr !important; }
}

/* زر المطّ/الطيّ (يظهر بجانب X) */
.tours-panel-collapse {
  display: none;
  background: rgba(255,255,255,0.15);
  border: none;
  color: #fff;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 14px;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  margin-left: 6px;
}
.tours-panel-collapse:hover { background: rgba(255,255,255,0.28); }
.tours-panel-collapse-icon {
  display: inline-block;
  transition: transform 0.25s ease;
}
@media (max-width: 600px) {
  .tours-panel-collapse { display: inline-flex; }
}

/* ✨ شبكة بطاقات الدول داخل بانل اختيار الدولة */
.tours-country-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.tours-country-card {
  background: linear-gradient(135deg, var(--bg-soft, #F9FAFB), #fff);
  border: 2px solid var(--border, #E5E7EB);
  border-radius: 14px;
  padding: 14px 12px;
  cursor: pointer;
  transition: all 0.25s ease;
  text-align: center;
  position: relative;
}
.tours-country-card:hover {
  border-color: var(--accent, #F2C94C);
  box-shadow: 0 8px 22px rgba(42,63,184,0.18);
  transform: translateY(-3px);
  background: linear-gradient(135deg, rgba(242,201,76,0.10), #fff);
}
.tours-country-card .tcc-flag {
  font-size: 36px;
  line-height: 1;
  margin-bottom: 6px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.15));
}
.tours-country-card .tcc-name {
  font-size: 13px;
  font-weight: 800;
  color: var(--ink, #0F1438);
  margin-bottom: 4px;
}
.tours-country-card .tcc-count {
  font-size: 10.5px;
  color: var(--brand-blue, #2A3FB8);
  background: rgba(42,63,184,0.10);
  padding: 2px 8px;
  border-radius: 6px;
  display: inline-block;
  font-weight: 700;
}

/* ✨ زر "دليل رحلتك التفاعلي" داخل رأس بطاقة الدولة — حجم مدمج */
.country-card-tours-cta {
  background: linear-gradient(135deg, var(--accent, #F2C94C), #E5B83C);
  color: var(--ink, #0F1438);
  border: 1.5px solid rgba(255,255,255,0.4);
  border-radius: 9px;
  padding: 6px 11px;
  width: 100%;
  font-family: inherit;
  font-weight: 800;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(242,201,76,0.4), 0 0 0 0 rgba(242,201,76,0.6);
  position: relative;
  overflow: hidden;
  animation: cccPulse 2.5s ease-in-out infinite;
  -webkit-tap-highlight-color: rgba(242,201,76,0.3);
  line-height: 1.2;
}
@keyframes cccPulse {
  0%, 100% { box-shadow: 0 2px 8px rgba(242,201,76,0.4), 0 0 0 0 rgba(242,201,76,0.5); }
  50%      { box-shadow: 0 2px 8px rgba(242,201,76,0.5), 0 0 0 5px rgba(242,201,76,0); }
}
.country-card-tours-cta:hover {
  transform: translateY(-1px);
  background: linear-gradient(135deg, #F4D366, #EAB939);
  animation: none;
  box-shadow: 0 4px 14px rgba(242,201,76,0.55);
}
.country-card-tours-cta:active { transform: translateY(0); }
.country-card-tours-cta .ccc-icon {
  font-size: 14px;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.15));
  flex-shrink: 0;
}
.country-card-tours-cta .ccc-arrow {
  font-size: 13px;
  opacity: 0.7;
  margin-right: auto;
  transition: transform 0.2s, opacity 0.2s;
  flex-shrink: 0;
}
.country-card-tours-cta:hover .ccc-arrow {
  opacity: 1;
  transform: translateX(-2px);
}
[dir="ltr"] .country-card-tours-cta .ccc-arrow {
  transform: rotate(180deg);
  margin-right: 0;
  margin-left: auto;
}
[dir="ltr"] .country-card-tours-cta:hover .ccc-arrow {
  transform: rotate(180deg) translateX(-2px);
}
/* في الموبايل، تصغير أكثر */
@media (max-width: 600px) {
  .country-card-tours-cta {
    font-size: 11px;
    padding: 5px 9px;
    border-radius: 8px;
  }
  .country-card-tours-cta .ccc-icon { font-size: 13px; }
  .country-card-tours-cta .ccc-arrow { font-size: 12px; }
}

.countries-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
}
.country-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 8px;
  border-radius: 10px;
  cursor: pointer;
  transition: var(--transition);
  min-width: 0;
}
.country-item:hover { background: var(--bg-soft); transform: translateX(-3px); }
.country-flag { font-size: 20px; flex-shrink: 0; }
.country-info { flex: 1; min-width: 0; overflow: hidden; }
.country-name { font-weight: 700; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.country-capital { font-size: 11px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.stat-mini {
  background: var(--bg-soft);
  border-radius: 11px;
  padding: 12px 8px;
  text-align: center;
  border-right: 3px solid var(--accent);
}
.stat-mini .num {
  font-size: 22px;
  font-weight: 900;
  color: var(--brand-blue);
  line-height: 1;
  font-family: 'Cairo', sans-serif;
}
.stat-mini .lbl { font-size: 11px; color: var(--text-muted); margin-top: 4px; }

/* ✨ تمييز إحصائية السكان (الأرقام الكبيرة) */
.stat-mini.stat-highlight {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, var(--brand-blue), #1E2C8E);
  border-right: 3px solid var(--accent);
  border-left: 3px solid var(--accent);
  padding: 14px 10px;
}
.stat-mini.stat-highlight .num {
  color: var(--accent);
  font-size: 26px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.stat-mini.stat-highlight .lbl {
  color: rgba(255,255,255,0.85);
  font-weight: 700;
  font-size: 12px;
}

/* ✨ بطاقة الإحصائيات التسويقية الكبيرة */
.stat-mini.stat-hero {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, var(--brand-blue) 0%, #1E2C8E 50%, var(--brand-blue) 100%);
  border: 3px solid var(--accent);
  border-radius: 14px;
  padding: 22px 16px;
  text-align: center;
  box-shadow: 0 8px 24px rgba(42,63,184,0.25);
  position: relative;
  overflow: hidden;
}
.stat-mini.stat-hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 80%;
  height: 200%;
  background: radial-gradient(circle, rgba(242,201,76,0.15), transparent 70%);
  pointer-events: none;
}
.stat-mini.stat-hero .num-big {
  position: relative;
  font-size: 30px;
  font-weight: 900;
  color: var(--accent);
  text-shadow: 0 3px 10px rgba(0,0,0,0.3);
  line-height: 1;
  font-family: 'Cairo', sans-serif;
  margin-bottom: 8px;
}
.stat-mini.stat-hero .lbl-big {
  position: relative;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  line-height: 1.4;
  margin-bottom: 6px;
}
.stat-mini.stat-hero .lbl-tagline {
  position: relative;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.5px;
  opacity: 0.9;
}

/* =========== حاوية الخريطة =========== */
.map-container {
  flex: 1;
  position: relative;
  overflow: hidden;
}
#map { width: 100%; height: 100%; }

/* تنسيق Popups الخريطة */
.leaflet-popup-content-wrapper {
  border-radius: 14px;
  padding: 4px;
  font-family: 'Cairo', sans-serif;
}
.leaflet-popup-content {
  margin: 12px 14px;
  font-size: 13px;
  direction: rtl;
}
.leaflet-popup-content h3 {
  margin: 0 0 8px;
  color: var(--brand-blue);
  font-size: 15px;
  font-weight: 800;
}
.leaflet-popup-content p { margin: 4px 0; font-size: 12px; }
.popup-nav-btn {
  background: var(--brand-blue);
  color: #fff;
  border: none;
  padding: 9px 14px;
  border-radius: 9px;
  font-family: inherit;
  font-weight: 800;
  font-size: 12px;
  cursor: pointer;
  margin-top: 10px;
  width: 100%;
  transition: var(--transition);
}
.popup-nav-btn:hover { background: var(--brand-blue-dark); transform: translateY(-1px); }

/* ماركرات الدول */
.country-marker-wrapper {
  background: transparent !important;
  border: none !important;
  /* مهم: يسمح للمحتوى بأن يتجاوز حجم iconSize ليظهر الاسم كاملاً */
  overflow: visible !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.country-marker {
  background: var(--accent);
  color: var(--ink);
  padding: 5px 11px;
  border-radius: 18px;
  border: 2.5px solid var(--brand-blue);
  font-weight: 800;
  font-size: 11.5px;
  font-family: 'Cairo', sans-serif;
  white-space: nowrap;
  box-shadow: 0 3px 10px rgba(42, 63, 184, 0.35);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  transition: transform 0.2s, background 0.2s, color 0.2s;
  /* يجعل الماركر يتمركز فوق الإحداثيات تماماً */
  position: relative;
  pointer-events: auto;
  user-select: none;
  -webkit-tap-highlight-color: rgba(42, 63, 184, 0.2);
  /* ضمان عدم التداخل مع الحاوي */
  width: max-content;
}
.country-marker:hover {
  transform: scale(1.08);
  background: var(--brand-blue);
  color: var(--accent);
  z-index: 1000;
}
.country-marker:active {
  transform: scale(0.95);
}
.country-marker .flag-emoji { font-size: 14px; }

/* ماركرات عامة */
.custom-marker-wrapper { background: transparent !important; border: none !important; }
.custom-marker {
  width: 36px; height: 36px;
  border-radius: 50% 50% 50% 0;
  background: var(--brand-blue);
  border: 3px solid var(--accent);
  transform: rotate(-45deg);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-blue);
}
.custom-marker.marker-yellow { background: var(--accent); border-color: var(--brand-blue); }
.custom-marker.marker-dark { background: var(--ink); border-color: var(--accent); }
.custom-marker-icon {
  transform: rotate(45deg);
  color: #fff;
  font-size: 14px;
}
.custom-marker.marker-yellow .custom-marker-icon { color: var(--ink); }

/* =========== زر الموبايل =========== */
.mobile-toggle {
  display: none;
  position: absolute;
  top: 74px;        /* ✨ أسفل زر "استكشف ماليزيا" حتى لا يغطّيه */
  left: 16px;       /* ✨ من اليسار حتى لا يتداخل مع أدوات اليمين */
  width: 46px; height: 46px;
  border-radius: 12px;
  background: var(--brand-blue);
  color: var(--accent);
  border: none;
  font-size: 22px;
  cursor: pointer;
  z-index: 850;     /* ✨ فوق زر الاستكشاف لضمان قابلية النقر */
  box-shadow: var(--shadow-blue);
  font-weight: bold;
}
.mobile-toggle:active {
  transform: scale(0.95);
}

/* =========== أدوات الخريطة (يمين) =========== */
.map-tools {
  position: absolute;
  top: 16px;
  right: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 400;
}
.map-tool-btn {
  width: 46px; height: 46px;
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  cursor: pointer;
  color: var(--brand-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: var(--transition);
  box-shadow: var(--shadow-md);
}
.map-tool-btn svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 2; }
.map-tool-btn:hover { background: var(--brand-blue); color: #fff; transform: translateY(-2px); }
.map-tool-btn.active { background: var(--accent); color: var(--ink); border-color: var(--accent); }
.tool-label {
  position: absolute;
  right: 100%;
  top: 50%;
  transform: translateY(-50%) translateX(-8px);
  background: var(--ink);
  color: #fff;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 12px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
  font-weight: 600;
}
.map-tool-btn:hover .tool-label { opacity: 1; transform: translateY(-50%) translateX(-12px); }
.tools-divider { height: 1px; background: var(--border-color); margin: 4px 0; }

/* ✨ زر "دليلك للرحلات" المميّز في الأدوات العائمة */
.map-tool-btn-tours {
  background: linear-gradient(135deg, var(--brand-blue, #2A3FB8), var(--brand-blue-dark, #1E2C8E)) !important;
  color: #fff !important;
  border-color: var(--accent, #F2C94C) !important;
  border-width: 2px !important;
  box-shadow: 0 4px 16px rgba(42,63,184,0.35), 0 0 0 3px rgba(242,201,76,0.15) !important;
  animation: toursButtonPulse 2.6s ease-in-out infinite;
}
.map-tool-btn-tours:hover {
  background: linear-gradient(135deg, var(--accent, #F2C94C), #E5B83C) !important;
  color: var(--ink, #0F1438) !important;
  transform: translateY(-3px) scale(1.05) !important;
  box-shadow: 0 8px 22px rgba(242,201,76,0.5) !important;
}
.map-tool-btn-tours.active {
  background: linear-gradient(135deg, var(--accent, #F2C94C), #E5B83C) !important;
  color: var(--ink, #0F1438) !important;
}
.map-tool-btn-tours svg { stroke-width: 2.2 !important; }
.map-tool-btn-tours .tool-badge-new {
  position: absolute;
  top: -7px;
  left: -10px;
  background: var(--accent, #F2C94C);
  color: var(--ink, #0F1438);
  font-size: 9px;
  font-weight: 900;
  padding: 2px 7px;
  border-radius: 8px;
  letter-spacing: 0.2px;
  border: 2px solid #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  font-family: 'Cairo', sans-serif;
  animation: toursBadgeBob 1.8s ease-in-out infinite;
}
@keyframes toursButtonPulse {
  0%, 100% { box-shadow: 0 4px 16px rgba(42,63,184,0.35), 0 0 0 3px rgba(242,201,76,0.15); }
  50% { box-shadow: 0 4px 18px rgba(42,63,184,0.45), 0 0 0 6px rgba(242,201,76,0.25); }
}
@keyframes toursBadgeBob {
  0%, 100% { transform: translateY(0) rotate(-3deg); }
  50% { transform: translateY(-2px) rotate(3deg); }
}

/* =========== نوافذ الأدوات (تظهر يمين، بجانب الأدوات) =========== */
.popup-panel {
  position: absolute;
  top: 16px;
  right: 76px;
  width: 340px;
  max-height: calc(100vh - var(--header-height) - var(--ticker-height) - var(--banner-height) - 32px);
  overflow-y: auto;
  background: #fff;
  border-radius: 16px;
  padding: 22px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-color);
  z-index: 500;
  display: none;
}
.popup-panel.active { display: block; }
.popup-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.popup-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 17px;
  font-weight: 800;
  color: var(--brand-blue);
}
.popup-title-icon {
  width: 34px; height: 34px;
  background: var(--accent);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}
.popup-close {
  background: var(--bg-soft);
  border: none;
  width: 30px; height: 30px;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  color: var(--text-secondary);
  font-weight: 800;
}
.popup-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  margin: 10px 0 4px;
}
.popup-panel select, .popup-panel input {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid var(--border-color);
  border-radius: 9px;
  font-family: inherit;
  font-size: 13px;
  background: var(--bg-soft);
  margin-bottom: 8px;
  font-weight: 600;
}
.popup-panel select:focus, .popup-panel input:focus {
  outline: none;
  border-color: var(--brand-blue);
  background: #fff;
}
.hint { font-size: 11px; color: var(--text-muted); margin-top: 10px; text-align: center; }
.hint-small { font-size: 11px; opacity: 0.8; }

/* البوصلة */
.compass-circle {
  display: flex; justify-content: center; padding: 18px 0;
}
.compass-rose {
  width: 180px; height: 180px;
  border: 3px solid var(--brand-blue);
  border-radius: 50%;
  position: relative;
  background: var(--bg-soft);
}
.dir {
  position: absolute;
  font-weight: 800;
  color: var(--brand-blue);
}
.dir.n { top: 8px; left: 50%; transform: translateX(-50%); color: #DC2626; }
.dir.s { bottom: 8px; left: 50%; transform: translateX(-50%); }
.dir.e { right: 10px; top: 50%; transform: translateY(-50%); }
.dir.w { left: 10px; top: 50%; transform: translateY(-50%); }
.compass-needle {
  position: absolute;
  top: 50%; left: 50%;
  width: 4px; height: 70px;
  background: linear-gradient(to top, transparent 0%, transparent 50%, #DC2626 50%, #DC2626 100%);
  transform-origin: 50% 100%;
  transform: translate(-50%, -100%);
  transition: transform 0.3s;
}
.compass-info { text-align: center; }
.compass-info strong { color: var(--brand-blue); font-size: 18px; }

/* القبلة */
.qibla-display {
  text-align: center;
  background: var(--bg-soft);
  padding: 18px;
  border-radius: 12px;
  margin-top: 12px;
}
.qibla-arrow-wrap {
  width: 120px; height: 120px;
  margin: 0 auto 12px;
  border: 3px dashed var(--brand-blue);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.qibla-arrow {
  font-size: 50px;
  transition: transform 0.5s;
}
.qibla-info { display: flex; justify-content: space-around; font-size: 13px; }
.qibla-info strong { color: var(--brand-blue); font-weight: 800; }

/* العملات */
.currency-row {
  display: flex;
  align-items: end;
  gap: 8px;
  margin-bottom: 10px;
}
.currency-field { flex: 1; }
.currency-field label {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 3px;
  display: block;
  font-weight: 700;
}
.currency-field select, .currency-field input { margin-bottom: 0; }
.swap-currencies {
  background: var(--accent);
  border: none;
  width: 36px; height: 36px;
  border-radius: 50%;
  font-size: 16px;
  cursor: pointer;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 0;
}
.currency-rate-info {
  background: var(--ink);
  color: #fff;
  padding: 10px 14px;
  border-radius: 10px;
  text-align: center;
  font-size: 13px;
  margin-top: 6px;
}
.currency-rate-info strong { color: var(--accent); font-weight: 800; }

/* قياس المسافة / الوقود / الطقس */
.distance-result, .weather-result {
  background: var(--ink);
  color: #fff;
  border-radius: 12px;
  padding: 16px;
  text-align: center;
  margin-top: 10px;
}
.distance-result .big, .weather-result .big {
  font-size: 30px;
  font-weight: 900;
  color: var(--accent);
  margin: 4px 0;
  font-family: 'Cairo', sans-serif;
}
.distance-result .lbl, .weather-result .lbl {
  font-size: 12px;
  opacity: 0.85;
}
.weather-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
}
.weather-cell {
  background: var(--bg-soft);
  padding: 12px;
  border-radius: 10px;
  text-align: center;
  border-right: 3px solid var(--accent);
}
.weather-cell .ico { font-size: 22px; margin-bottom: 4px; }
.weather-cell .val { font-weight: 800; color: var(--brand-blue); font-size: 15px; }
.weather-cell .lbl { font-size: 11px; color: var(--text-muted); }

.fuel-list { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.fuel-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-soft);
  padding: 12px 14px;
  border-radius: 10px;
  border-right: 4px solid var(--brand-blue);
}
.fuel-row.premium { border-right-color: var(--accent); }
.fuel-row.diesel { border-right-color: var(--ink); }
.fuel-row .name { font-weight: 700; font-size: 13px; }
.fuel-row .price { font-weight: 900; color: var(--brand-blue); font-size: 18px; font-family: 'Cairo'; }
.fuel-row .unit { font-size: 11px; color: var(--text-muted); margin-right: 4px; }

/* ============================================================
   بطاقة الدولة (تظهر على اليسار - الجهة المقابلة للأدوات)
   ============================================================ */
.country-card {
  position: absolute;
  top: 16px;
  left: 16px;
  bottom: 16px;
  width: 460px;
  background: #fff;
  border-radius: 18px;
  box-shadow: var(--shadow-lg);
  z-index: 600;
  display: flex;
  flex-direction: column;
  transform: translateX(-100%) translateX(-30px);
  opacity: 0;
  pointer-events: none;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  overflow: hidden;
}
.country-card.active {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
}
.card-header {
  background: var(--brand-blue);
  color: #fff;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 3px solid var(--accent);
}
.card-flag {
  font-size: 30px;
  flex-shrink: 0;
  line-height: 1;
}
.card-title-block {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.card-name {
  font-size: 16px;
  font-weight: 900;
  color: var(--accent);
  line-height: 1.15;
}
.card-capital { display: none; } /* تمت إزالته توفيراً للمساحة */
.card-close {
  background: rgba(255,255,255,0.15);
  border: none;
  width: 28px; height: 28px;
  border-radius: 50%;
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  transition: var(--transition);
  font-weight: 800;
  flex-shrink: 0;
  align-self: flex-start;
  line-height: 1;
}
.card-close:hover { background: var(--accent); color: var(--ink); }

/* التبويبات */
.card-tabs {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  padding: 10px 14px 0;
  background: #fff;
  border-bottom: 2px solid var(--border-color);
  /* ✨ سطر واحد قابل للتمرير الأفقي */
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--brand-blue) transparent;
}
.card-tabs::-webkit-scrollbar {
  height: 4px;
}
.card-tabs::-webkit-scrollbar-thumb {
  background: var(--brand-blue);
  border-radius: 4px;
}
.card-tabs::-webkit-scrollbar-track {
  background: transparent;
}
.card-tab {
  background: var(--bg-soft);
  border: 1.5px solid transparent;
  border-radius: 10px 10px 0 0;
  padding: 8px 12px;
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  margin-bottom: -2px;
  flex-shrink: 0; /* لا يتقلّص داخل الـ flex */
}
.card-tab:hover { background: #fff; color: var(--brand-blue); }
.card-tab.active {
  background: #fff;
  color: var(--brand-blue);
  border-color: var(--border-color);
  border-bottom-color: #fff;
  font-weight: 800;
}

.card-body {
  flex: 1;
  overflow-y: auto;
  padding: 18px 22px;
}

/* نظرة عامة */
.overview-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 18px;
}
.ov-cell {
  background: var(--bg-soft);
  border-radius: 12px;
  padding: 14px;
  text-align: center;
  border-right: 3px solid var(--brand-blue);
}
.ov-icon { font-size: 24px; margin-bottom: 6px; }
.ov-label { font-size: 11px; color: var(--text-muted); margin-bottom: 4px; }
.ov-value { font-weight: 800; color: var(--brand-blue); font-size: 13px; }

/* ✨ نسخة مدمجة (بطاقات صغيرة) — للنظرة العامة بعد زر السفر */
.overview-grid-compact {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 14px;
}
.ov-cell-mini {
  background: var(--bg-soft);
  border-radius: 8px;
  padding: 8px 6px;
  text-align: center;
  border-right: 2px solid var(--brand-blue);
}
.ov-icon-mini { font-size: 18px; margin-bottom: 2px; }
.ov-label-mini { font-size: 9px; color: var(--text-muted); margin-bottom: 2px; line-height: 1.2; }
.ov-value-mini { font-weight: 800; color: var(--brand-blue); font-size: 11px; line-height: 1.2; }

/* ✨ زر متطلبات السفر */
.travel-req-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(42,63,184,0.35) !important;
}

@media (max-width: 500px) {
  .overview-grid-compact { grid-template-columns: repeat(2, 1fr); }
  .ov-cell-mini { padding: 6px 4px; }
  .ov-icon-mini { font-size: 16px; }
  .ov-label-mini { font-size: 8px; }
  .ov-value-mini { font-size: 10px; }
}

.ov-section-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--brand-blue);
  margin-bottom: 10px;
}
.ov-cities-list { display: flex; flex-wrap: wrap; gap: 6px; }
.city-chip {
  background: var(--accent);
  color: var(--ink);
  padding: 6px 12px;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}
.city-chip:hover { background: var(--brand-blue); color: var(--accent); transform: translateY(-1px); }

/* قائمة العناصر (سياحة، مطاعم، ...) */
.list-items { display: flex; flex-direction: column; gap: 10px; }
.list-card {
  background: var(--bg-soft);
  border-radius: 12px;
  overflow: hidden;
  transition: var(--transition);
  border: 1px solid transparent;
}
.list-card:hover {
  background: #fff;
  border-color: var(--brand-blue);
  box-shadow: var(--shadow-md);
}
.list-card-body {
  padding: 12px 14px;
  cursor: pointer;
}
.list-title {
  font-weight: 800;
  font-size: 14px;
  color: var(--text-primary);
  margin-bottom: 6px;
}
.list-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  font-size: 11px;
  color: var(--text-secondary);
}
.list-meta .tag {
  background: var(--brand-blue);
  color: #fff;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 700;
}
.list-meta .tag-soft {
  background: #fff;
  padding: 2px 8px;
  border-radius: 10px;
  border: 1px solid var(--border-color);
}
.rating-stars {
  background: var(--accent) !important;
  color: var(--ink) !important;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 800;
}
.goto-btn {
  width: 100%;
  background: var(--brand-blue);
  color: #fff;
  border: none;
  padding: 11px;
  font-family: inherit;
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--transition);
}
.goto-btn:hover { background: var(--brand-blue-dark); }
.goto-btn svg { width: 16px; height: 16px; }

.empty-state {
  padding: 40px 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
}

/* الهواتف */
.phones-grid { display: flex; flex-direction: column; gap: 8px; }
.phone-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-soft);
  padding: 14px;
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
  border-right: 4px solid var(--accent);
}
.phone-card:hover { background: #fff; transform: translateX(-3px); box-shadow: var(--shadow-md); }
.phone-icon { font-size: 26px; }
.phone-info { flex: 1; }
.phone-name { font-weight: 800; font-size: 14px; }
.phone-cat { font-size: 11px; color: var(--text-muted); }
.phone-num {
  font-weight: 900;
  font-size: 18px;
  color: var(--brand-blue);
  font-family: 'Cairo';
}

/* العروض */
.offers-grid { display: flex; flex-direction: column; gap: 10px; }
.offer-card {
  background: var(--accent);
  color: var(--ink);
  border-radius: 12px;
  padding: 16px;
  position: relative;
  overflow: hidden;
}
.offer-discount {
  position: absolute;
  top: 12px;
  left: 14px;
  background: var(--ink);
  color: var(--accent);
  padding: 4px 12px;
  border-radius: 18px;
  font-size: 13px;
  font-weight: 900;
}
.offer-title {
  font-weight: 800;
  font-size: 15px;
  margin-bottom: 10px;
  margin-left: 70px;
}
.offer-meta {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
}
.offer-meta .tag {
  background: var(--ink);
  color: var(--accent);
  padding: 2px 10px;
  border-radius: 10px;
  font-weight: 700;
}
.offer-valid { font-weight: 700; }

/* مواقيت الصلاة */
.prayer-wrap { }
.prayer-header {
  background: var(--brand-blue);
  color: #fff;
  border-radius: 12px;
  padding: 16px;
  text-align: center;
  margin-bottom: 14px;
}
.prayer-city { font-size: 17px; font-weight: 800; color: var(--accent); }
.prayer-date { font-size: 12px; opacity: 0.9; margin-top: 4px; }
.prayer-list { display: flex; flex-direction: column; gap: 8px; }
.prayer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-soft);
  padding: 14px 16px;
  border-radius: 11px;
  border-right: 3px solid var(--brand-blue);
  transition: var(--transition);
}
.prayer-row.prayer-active {
  background: var(--accent);
  color: var(--ink);
  border-right-color: var(--ink);
  transform: scale(1.02);
  box-shadow: var(--shadow-yellow);
}
.prayer-row .p-name { font-weight: 800; font-size: 14px; }
.prayer-row .p-time {
  font-weight: 900;
  font-size: 16px;
  color: var(--brand-blue);
  font-family: 'Cairo';
}
.prayer-row.prayer-active .p-time { color: var(--ink); }
.prayer-note {
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
  margin-top: 14px;
}

/* =========== Responsive (موبايل) =========== */
@media (max-width: 900px) {
  .top-header { padding: 0 12px; }
  .logo-img { height: 56px; }
  .subscribe-btn { padding: 7px 12px; font-size: 12px; }
  .subscribe-btn svg { width: 13px; height: 13px; }
  .social-icons { display: none; }

  .sidebar {
    position: fixed;
    top: calc(var(--header-height) + var(--ticker-height) + var(--banner-height));
    bottom: 0;
    right: -300px;
    width: 280px;
    transition: right 0.3s;
    z-index: 800;
    box-shadow: -10px 0 30px rgba(0,0,0,0.2);
  }
  .sidebar.mobile-open { right: 0; }
  .mobile-close {
    display: block;
    position: absolute;
    top: 10px; left: 10px;
    background: var(--ink); color: #fff;
    width: 32px; height: 32px;
    border-radius: 50%;
    border: none;
    font-size: 20px;
    cursor: pointer;
    font-weight: 800;
  }
  .mobile-toggle { display: flex; align-items: center; justify-content: center; }

  /* ✨ بطاقة الدولة على الموبايل: مساحة أصغر للبطاقة، مساحة أكبر للخريطة */
  .country-card {
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    width: auto;
    max-height: 42vh;
    height: 42vh;
    border-radius: 18px 18px 0 0;
    transform: translateY(100%);
    box-shadow: 0 -10px 30px rgba(0,0,0,0.25);
  }
  .country-card.active {
    transform: translateY(0);
  }
  /* مقبض السحب في الأعلى (من ناحية الخريطة) */
  .country-card::after {
    content: '';
    position: absolute;
    top: 5px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 3px;
    background: rgba(15,20,56,0.2);
    border-radius: 3px;
  }
  /* ✨ هيدر بطاقة الدولة على الموبايل: مدمج جداً */
  .card-header {
    padding: 12px 14px 8px;
    gap: 8px;
  }
  .card-flag { font-size: 24px; }
  .card-name { font-size: 14px; }
  .card-close { width: 26px; height: 26px; font-size: 16px; }
  .card-body { padding: 10px 14px 14px; }
  /* تبويبات أصغر للموبايل */
  .card-tabs { padding: 5px 10px 0; gap: 3px; }
  .card-tab { padding: 5px 9px; font-size: 11px; }

  .popup-panel {
    width: calc(100vw - 90px);
    max-width: 340px;
  }
  .ads-banner { padding: 0 12px; }
  .banner-title { font-size: 13px; }
  .banner-subtitle { font-size: 11px; }
}

@media (max-width: 500px) {
  :root { --banner-height: 50px; }
  .ticker-label { padding: 8px 12px; font-size: 12px; }

  /* ✨ البانر على الموبايل: الأيقونة + النص في سطر واحد، بدون تجاوز للخريطة */
  .ads-banner {
    flex-direction: row;
    align-items: center;
    gap: 8px;
    padding: 4px 12px;
    height: var(--banner-height);
    overflow: hidden;
  }
  .banner-icon {
    font-size: 18px;
    flex-shrink: 0;
  }
  .banner-text {
    flex: 1;
    min-width: 0;
    overflow: hidden;
  }
  .banner-title {
    font-size: 12px;
    line-height: 1.2;
    font-weight: 800;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .banner-subtitle {
    font-size: 10px;
    line-height: 1.2;
    opacity: 0.9;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .country-card {
    max-height: 48vh;
    height: 48vh;
  }
}

/* ============================================================
   تنسيقات إضافية: أرقام هاتف بالاتجاه الصحيح + أزرار الأدوات
   ============================================================ */
.phone-num bdi, .phone-tag bdi, p bdi {
  direction: ltr;
  unicode-bidi: embed;
  font-family: 'Cairo', monospace;
}

.popup-hint {
  font-size: 12px;
  color: var(--text-muted);
  background: var(--bg-soft);
  border-right: 3px solid var(--accent);
  padding: 8px 12px;
  border-radius: 8px;
  margin-bottom: 8px;
  line-height: 1.6;
}

.btn-tool {
  padding: 10px 14px;
  border: none;
  border-radius: 10px;
  font-family: inherit;
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.btn-tool.btn-primary {
  background: var(--brand-blue);
  color: var(--accent);
}
.btn-tool.btn-primary:hover {
  background: var(--brand-blue-dark);
  transform: translateY(-1px);
}
.btn-tool.btn-secondary {
  background: var(--bg-soft);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}
.btn-tool.btn-secondary:hover {
  background: #fff;
  border-color: var(--brand-blue);
}

/* ============================================================
   زر اللغة + الوضع الإنجليزي (LTR)
   ============================================================ */
.lang-toggle-btn {
  background: var(--accent);
  color: var(--brand-blue);
  border: 2px solid var(--brand-blue);
  font-family: 'Cairo', sans-serif;
  font-weight: 900;
  font-size: 14px;
  padding: 8px 14px;
  border-radius: 22px;
  cursor: pointer;
  margin-left: 8px;
  margin-right: 8px;
  transition: all 0.2s;
  min-width: 44px;
}
.lang-toggle-btn:hover {
  background: var(--brand-blue);
  color: var(--accent);
  transform: scale(1.05);
}

/* الوضع الإنجليزي: قلب الاتجاه */
body.lang-en {
  direction: ltr;
}
body.lang-en .country-card {
  right: auto;
  left: 24px;
}
body.lang-en .map-tools {
  right: auto;
  left: 16px;
}
body.lang-en .mobile-toggle {
  left: auto;
  right: 16px;
}
@media (max-width: 900px) {
  body.lang-en .country-card {
    left: 0;
    right: 0;
  }
}

/* ============================================================
   مواقيت الصلاة (كأداة عامة)
   ============================================================ */
.prayer-times-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 14px;
  margin-bottom: 12px;
}
.prayer-row-tool {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-soft);
  padding: 12px 14px;
  border-radius: 10px;
  border-right: 3px solid var(--accent);
  transition: var(--transition);
}
.prayer-row-tool .p-name {
  font-weight: 700;
  font-size: 14px;
  color: var(--text-primary);
}
.prayer-row-tool .p-time {
  font-weight: 900;
  font-size: 16px;
  color: var(--brand-blue);
  font-family: 'Cairo', sans-serif;
}
.prayer-row-tool.prayer-active {
  background: var(--brand-blue);
  border-right-color: var(--accent);
  box-shadow: var(--shadow-blue);
}
.prayer-row-tool.prayer-active .p-name,
.prayer-row-tool.prayer-active .p-time {
  color: var(--accent);
}
.prayer-note {
  background: rgba(242, 201, 76, 0.12);
  border: 1px dashed var(--accent);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 11.5px;
  color: var(--text-secondary);
  line-height: 1.7;
  text-align: center;
  margin-top: 8px;
}
.distance-total-box {
  background: var(--brand-blue);
  border-radius: 14px;
  padding: 30px 20px;
  text-align: center;
  margin: 16px 0 14px;
  box-shadow: var(--shadow-blue);
  border: 2px solid var(--accent);
}
.distance-total-value {
  font-size: 44px;
  font-weight: 900;
  color: var(--accent);
  font-family: 'Cairo', sans-serif;
  line-height: 1.1;
  margin-bottom: 6px;
  letter-spacing: -1px;
}
.distance-total-label {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.85);
  font-weight: 600;
}

.distance-hint-box {
  background: var(--bg-soft);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 14px;
  font-weight: 500;
}

.distance-clear-btn {
  width: 100%;
  background: var(--ink);
  color: var(--accent);
  border: 2px solid var(--ink);
  padding: 14px;
  border-radius: 12px;
  font-family: inherit;
  font-weight: 800;
  font-size: 15px;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.distance-clear-btn:hover {
  background: var(--accent);
  color: var(--ink);
  border-color: var(--accent);
  transform: translateY(-1px);
  box-shadow: var(--shadow-yellow);
}

/* النقاط على الخريطة */
.distance-marker {
  background: transparent !important;
  border: none !important;
}
.dist-point {
  background: var(--accent);
  color: var(--ink);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 3px solid var(--brand-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 13px;
  font-family: 'Cairo', sans-serif;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}

/* ملصقات المسافة على الخطوط */
.distance-label-wrapper {
  background: transparent !important;
  border: none !important;
}
.dist-segment-label {
  background: var(--brand-blue);
  color: var(--accent);
  padding: 4px 10px;
  border-radius: 14px;
  font-size: 11px;
  font-weight: 800;
  font-family: 'Cairo', sans-serif;
  white-space: nowrap;
  text-align: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  border: 1.5px solid var(--accent);
}

/* ====== GoMy — منتقي اللغة (4 لغات) ====== */
.lang-select {
  background: var(--accent);
  color: var(--brand-blue);
  border: 2px solid var(--brand-blue);
  font-family: 'Cairo', sans-serif;
  font-weight: 800;
  font-size: 13px;
  padding: 7px 12px;
  border-radius: 22px;
  cursor: pointer;
  margin-inline: 8px;
  transition: all 0.2s;
  outline: none;
}
.lang-select:hover { background: var(--brand-blue); color: var(--accent); }
.lang-select:focus { box-shadow: 0 0 0 3px rgba(1,0,102,.2); }

/* ألوان مميزة لأزرار النقل والتذاكر في شريط الأدوات */
.map-tool-btn-rail { --tool-accent: var(--brand-red); }
.map-tool-btn-bus  { --tool-accent: var(--brand-blue); }
.map-tool-btn-tickets { --tool-accent: var(--accent-dark); }
.map-tool-btn-rail:hover svg,
.map-tool-btn-bus:hover svg,
.map-tool-btn-tickets:hover svg { color: var(--tool-accent); }

/* ======================================================================
   GoMy — تخصيصات v2 (إعادة تصميم + ألوان العلم)
   الأحمر #CC0001 · الأزرق #010066 · الأصفر #FFCC00
   ====================================================================== */

/* 1) الشريط المتحرك أحمر + شارة "عروض" زرقاء */
.news-ticker-wrap { background: var(--brand-red) !important; border-bottom: 1px solid #9e0001 !important; }
.ticker-label { background: var(--brand-blue) !important; color: #fff !important; border-left: 2px solid #fff !important; }
.news-ticker, .news-ticker * { color: #fff !important; }
.ticker-link.ticker-offer strong { color: var(--accent) !important; }

/* 2) منتقي اللغة بالأحمر */
.lang-select {
  background: var(--brand-red) !important;
  color: #fff !important;
  border: 2px solid var(--brand-blue) !important;
}
.lang-select:hover { background: var(--brand-blue) !important; color: var(--accent) !important; }
.lang-select option { color: #111; background: #fff; }

/* 3) رؤوس اللوحات بالأحمر */
.transit-panel-head { background: var(--brand-red) !important; border-radius: 14px 14px 0 0; }
.transit-panel { border-color: var(--brand-red) !important; }
.tours-panel-header { background: var(--brand-red) !important; }
.tours-panel-header h3 .accent-dot { color: var(--accent) !important; }

/* 4) إعادة تصميم أزرار خيارات العرض (القائمة الجانبية) — مختلفة عن دليلك */
.layer-btn {
  background: #fff !important;
  border: 1.5px solid var(--border-color) !important;
  border-radius: 8px !important;
  position: relative;
  padding: 12px 16px 12px 14px !important;
  font-weight: 800 !important;
  color: var(--brand-blue) !important;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(1,0,102,.04);
}
.layer-btn::before {
  content: ""; position: absolute; inset-inline-start: 0; top: 0; bottom: 0;
  width: 5px; background: var(--accent); border-radius: 8px 0 0 8px;
  transition: var(--transition);
}
.layer-btn:hover { border-color: var(--brand-red) !important; background: #fff !important; color: var(--brand-red) !important; transform: translateX(-2px); }
.layer-btn:hover::before { background: var(--brand-red); }
.layer-btn.active { background: var(--brand-blue) !important; color: #fff !important; border-color: var(--brand-blue) !important; }
.layer-btn.active::before { background: var(--brand-red); width: 6px; }
.layer-btn.active svg { stroke: var(--accent) !important; }

/* 5) إعادة تصميم أزرار الأدوات العائمة — دائرية بحلقة، مختلفة عن دليلك */
.map-tool-btn {
  width: 50px !important; height: 50px !important;
  border-radius: 50% !important;
  background: #fff !important;
  border: 2px solid var(--brand-blue) !important;
  color: var(--brand-blue) !important;
  box-shadow: 0 4px 14px rgba(1,0,102,.18) !important;
}
.map-tool-btn:hover { background: var(--brand-blue) !important; color: #fff !important; transform: translateY(-2px) scale(1.05) !important; }
.map-tool-btn.active {
  background: var(--brand-red) !important; color: #fff !important;
  border-color: var(--brand-red) !important;
  box-shadow: 0 0 0 4px rgba(204,0,1,.18) !important;
}
.tool-label { background: var(--brand-blue) !important; }
/* أزرار النقل والتذاكر — تمييز لوني للأيقونة */
.map-tool-btn-rail { border-color: var(--brand-red) !important; }
.map-tool-btn-bus  { border-color: var(--brand-blue) !important; }
.map-tool-btn-tickets { border-color: var(--accent-dark) !important; }
/* زر الرحلات المميّز */
.map-tool-btn-tours {
  background: linear-gradient(135deg, var(--brand-blue), var(--brand-blue-dark)) !important;
  color: #fff !important; border: 2px solid var(--accent) !important;
  box-shadow: 0 4px 16px rgba(1,0,102,.35), 0 0 0 3px rgba(255,204,0,.18) !important;
}
.map-tool-btn-tours:hover { background: linear-gradient(135deg, var(--brand-red), #a30001) !important; color:#fff !important; }

/* 6) أزرار نمط الخريطة — أيقونات فقط (بدون نص) */
.style-btn { flex-direction: row; justify-content: center; padding: 14px 0 !important; }
.style-btn svg { width: 26px; height: 26px; }
.style-btn.active { background: var(--brand-blue) !important; color: #fff !important; border-color: var(--brand-blue) !important; }
.style-btn.active svg { stroke: var(--accent) !important; }

/* 7) طائر ماليزيا المتحرك على المسار */
.tour-bird-marker { background: none !important; border: none !important; }
.tour-bird-marker .bird-body {
  width: 56px; height: 48px;
  display: flex; align-items: center; justify-content: center;
  animation: birdFly 1.1s ease-in-out infinite;
  filter: drop-shadow(0 4px 6px rgba(0,0,0,.4));
}
.tour-bird-marker .bird-body img { width: 56px; height: auto; display: block; pointer-events: none; }
@keyframes birdFly {
  0%, 100% { transform: translateY(0) rotate(-3deg) scaleX(1); }
  50% { transform: translateY(-6px) rotate(3deg) scaleX(1.04); }
}

/* 8) ماركر التذاكر على الخريطة + بطاقة التفاصيل */
.ticket-marker { background: none !important; border: none !important; }
.ticket-marker .tm-pin {
  width: 40px; height: 40px; border-radius: 50% 50% 50% 6px;
  transform: rotate(45deg);
  background: var(--accent);
  border: 2.5px solid var(--brand-blue);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 3px 10px rgba(0,0,0,.35);
  animation: ticketPulse 2.2s ease-in-out infinite;
}
.ticket-marker .tm-pin svg { width: 20px; height: 20px; transform: rotate(-45deg); color: var(--brand-blue); }
@keyframes ticketPulse {
  0%,100% { box-shadow: 0 3px 10px rgba(0,0,0,.35), 0 0 0 0 rgba(204,0,1,.4); }
  50% { box-shadow: 0 3px 10px rgba(0,0,0,.35), 0 0 0 8px rgba(204,0,1,0); }
}
.ticket-popup-wrap .leaflet-popup-content-wrapper { border-radius: 16px; padding: 0; overflow: hidden; border: 2px solid var(--brand-blue); }
.ticket-popup-wrap .leaflet-popup-content { margin: 0; }
.ticket-popup { padding: 14px 14px 12px; position: relative; font-family: 'Cairo', sans-serif; }
.ticket-popup .ticket-badge { position: static; display: inline-block; background: var(--brand-red); color:#fff; font-weight:800; font-size:11px; padding:3px 10px; border-radius:20px; margin-bottom:6px; }
.ticket-popup .ticket-cat { font-size: 11px; color: var(--text-muted); font-weight: 700; }
.ticket-popup .ticket-name { font-size: 16px; font-weight: 900; color: var(--brand-blue); margin: 3px 0 4px; }
.ticket-popup .ticket-city { font-size: 12px; color: var(--text-secondary); margin-bottom: 6px; }
.ticket-popup .ticket-desc { font-size: 12px; color: var(--text-secondary); line-height: 1.6; margin: 0 0 8px; }
.ticket-popup .ticket-price-row { display:flex; align-items:baseline; gap:8px; margin-bottom: 10px; }
.ticket-popup .ticket-price { font-size: 19px; font-weight: 900; color: var(--brand-red); }
.ticket-popup .ticket-old { font-size: 12px; color: var(--text-muted); text-decoration: line-through; }
.ticket-buy-btn {
  display: block; text-align: center; text-decoration: none;
  background: var(--brand-blue); color: #fff !important; font-weight: 800; font-size: 13px;
  padding: 10px 12px; border-radius: 10px; transition: var(--transition);
}
.ticket-buy-btn:hover { background: var(--brand-red); transform: translateY(-1px); }

/* 9) زر الموقع الجانبي (يسار) — قابل للنقر بوضوح */
.location-fab {
  position: absolute; top: 18px;
  left: 18px !important; right: auto !important; z-index: 800;
  display: flex; align-items: center; gap: 8px;
  background: var(--brand-blue); color: #fff;
  border: 2px solid var(--accent); border-radius: 30px;
  padding: 9px 16px 9px 12px; cursor: pointer;
  font-family: 'Cairo', sans-serif; font-weight: 800; font-size: 14px;
  box-shadow: 0 6px 20px rgba(1,0,102,.3);
  animation: fabPulse 2.4s ease-in-out infinite;
  transition: var(--transition);
}
.location-fab svg { width: 22px; height: 22px; color: var(--accent); flex-shrink: 0; }
.location-fab .location-fab-label { white-space: nowrap; }
.location-fab:hover { background: var(--brand-red); border-color: #fff; transform: translateY(-2px) scale(1.03); }
@keyframes fabPulse {
  0%,100% { box-shadow: 0 6px 20px rgba(1,0,102,.3), 0 0 0 0 rgba(255,204,0,.5); }
  50% { box-shadow: 0 6px 20px rgba(1,0,102,.3), 0 0 0 10px rgba(255,204,0,0); }
}
@media (max-width: 600px){
  .location-fab { padding: 9px 12px; font-size: 12px; }
  .location-fab .location-fab-label span[data-i18n] { display: none; }
}

/* ✨ على سطح المكتب فقط: أخفِ زر "استكشف ماليزيا" أثناء فتح بطاقة الدولة
   حتى لا يغطّي زر إغلاق البطاقة (×). على الموبايل/الآيباد البطاقة سفلية فلا تداخل. */
@media (min-width: 901px){
  body.country-card-open .location-fab {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease;
  }
}

/* رأس بطاقة الوجهة (القائمة الرئيسية) بالأحمر */
.card-header { background: var(--brand-red) !important; border-bottom: 3px solid var(--accent) !important; }

/* ====== المدن الرئيسية: ماركر + بطاقة ====== */
.city-marker { background: none !important; border: none !important; display: flex; flex-direction: column; align-items: center; }
.city-marker .city-pin {
  width: 34px; height: 34px; border-radius: 50% 50% 50% 4px;
  transform: rotate(45deg);
  background: var(--brand-blue); border: 2.5px solid var(--accent);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 3px 9px rgba(0,0,0,.4);
}
.city-marker .city-pin svg { width: 18px; height: 18px; transform: rotate(-45deg); color: var(--accent); }
.city-marker .city-label {
  margin-top: 4px; background: rgba(255,255,255,.95); color: var(--brand-blue);
  font-family: 'Cairo', sans-serif; font-weight: 800; font-size: 12px;
  padding: 2px 9px; border-radius: 20px; white-space: nowrap;
  box-shadow: 0 2px 6px rgba(0,0,0,.25); border: 1.5px solid var(--brand-blue);
}
.city-popup-wrap .leaflet-popup-content-wrapper { border-radius: 16px; padding: 0; overflow: hidden; border: 2px solid var(--brand-blue); }
.city-popup-wrap .leaflet-popup-content { margin: 0; }
.city-popup { padding: 14px 16px 12px; font-family: 'Cairo', sans-serif; }
.city-popup h3 { margin: 0 0 8px; font-size: 17px; font-weight: 900; color: var(--brand-blue); border-bottom: 2px solid var(--accent); padding-bottom: 6px; }
.city-popup p { margin: 4px 0; font-size: 12.5px; color: var(--text-secondary); }
.city-popup p strong { color: var(--brand-blue); }
.city-popup .city-desc { line-height: 1.7; margin: 8px 0 10px; color: var(--text-primary); }
.city-popup .popup-nav-btn {
  display: block; width: 100%; text-align: center; margin-top: 6px;
  background: var(--brand-red); color: #fff; border: none; cursor: pointer;
  font-family: 'Cairo', sans-serif; font-weight: 800; font-size: 13px;
  padding: 9px 12px; border-radius: 10px; transition: var(--transition);
}
.city-popup .popup-nav-btn:hover { background: var(--brand-blue); }

/* ======================================================================
   GoMy — تخصيصات v3 (موبايل + شعار + لغة + لوحات النقل)
   ====================================================================== */

/* زر اللغة: أصغر مع رموز الأعلام */
.lang-select {
  font-size: 14px !important;
  font-weight: 800 !important;
  padding: 6px 8px !important;
  border-radius: 16px !important;
  min-width: 0 !important;
  width: auto !important;
  text-align: center;
  margin-inline: 4px !important;
}

/* لوحات القطارات/الباصات على الموبايل: bottom-sheet مرئية بوضوح */
@media (max-width: 600px) {
  .transit-panel {
    top: auto !important;
    bottom: 0 !important;
    right: 0 !important;
    left: 0 !important;
    width: 100% !important;
    max-width: none !important;
    max-height: 60vh !important;
    border-radius: 18px 18px 0 0 !important;
    border: none !important;
    border-top: 3px solid var(--brand-red) !important;
    box-shadow: 0 -10px 30px rgba(0,0,0,0.3) !important;
    z-index: 1600 !important;
  }
  .transit-panel::before {
    content: ''; position: absolute; top: 8px; left: 50%; transform: translateX(-50%);
    width: 44px; height: 4px; background: rgba(255,255,255,.4); border-radius: 2px; z-index: 2; pointer-events: none;
  }
  .transit-panel-head { padding-top: 16px !important; }
  /* الشعار أصغر قليلاً على الموبايل لكنه أكبر من السابق */
  .logo-img { height: 56px !important; }
  /* زر استكشف ماليزيا يبقى يساراً وبحجم مدمج */
  .location-fab { top: 12px; left: 12px !important; padding: 8px 12px; }
}

/* ✨ زر طيّ/فتح لوحة القطارات/الباصات (يظهر بجانب X على الموبايل) */
.transit-panel .tp-head-actions { display: flex; align-items: center; gap: 6px; }
.transit-panel .tp-collapse {
  display: none;
  background: rgba(255,255,255,.2); border: none; color: #fff;
  width: 30px; height: 30px; border-radius: 50%; cursor: pointer;
  font-size: 14px; align-items: center; justify-content: center; font-weight: 900;
}
.transit-panel .tp-collapse:hover { background: rgba(255,255,255,.32); }
.transit-panel .tp-collapse-icon { display: inline-block; transition: transform .25s ease; }
@media (max-width: 600px) {
  .transit-panel { transition: max-height .3s ease-out; }
  .transit-panel .tp-collapse { display: inline-flex; }
  .transit-panel-head { cursor: pointer; }
  /* الحالة المطوية: يبقى الهيدر فقط ظاهراً في الأسفل */
  .transit-panel.collapsed { max-height: 60px !important; overflow: hidden; }
  .transit-panel.collapsed .transit-panel-body,
  .transit-panel.collapsed .transit-src { display: none !important; }
  .transit-panel.collapsed .tp-collapse-icon { transform: rotate(180deg); }
}

/* ====== لوحة شرائح الاتصالات (SIM) ====== */
.map-tool-btn-sim { border-color: var(--brand-blue) !important; }
.sim-panel .transit-panel-body { padding: 12px; }
.sim-card {
  border: 1.5px solid var(--border-color); border-radius: 12px;
  padding: 12px; margin-bottom: 10px; background: #fff;
  box-shadow: 0 1px 3px rgba(1,0,102,.05);
}
.sim-card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.sim-card .sim-name { font-weight: 900; font-size: 15px; color: var(--brand-blue); }
.sim-card .sim-badge { font-size: 11px; font-weight: 800; padding: 3px 9px; border-radius: 20px; color: #fff; white-space: nowrap; }
.sim-card .sim-badge.tourist { background: var(--brand-red); }
.sim-card .sim-badge.prepaid { background: var(--brand-blue); }
.sim-card .sim-cov { font-size: 12px; color: var(--text-secondary); margin-bottom: 4px; }
.sim-card .sim-desc { font-size: 12px; color: var(--text-secondary); line-height: 1.6; margin: 4px 0 10px; }
.sim-card .sim-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.sim-card .sim-price { font-weight: 900; font-size: 14px; color: var(--brand-red); }
.sim-card .sim-buy {
  text-decoration: none; background: var(--brand-blue); color: #fff !important;
  font-weight: 800; font-size: 12px; padding: 7px 12px; border-radius: 10px; transition: var(--transition);
}
.sim-card .sim-buy:hover { background: var(--brand-red); }

/* ====== قسم المنح الجامعية ====== */
.sch-wrap { padding: 4px 2px; }
.sch-intro { font-size: 13px; color: var(--text-muted, #555); margin: 0 0 12px; line-height: 1.6; }
.sch-card {
  border: 1px solid var(--border-color, #e6e6ef);
  border-radius: 14px; padding: 12px; margin-bottom: 12px; background: #fff;
  box-shadow: 0 2px 10px rgba(1,0,102,.05);
}
.sch-uni-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.sch-uni-info { cursor: pointer; flex: 1 1 auto; min-width: 0; }
.sch-uni-name { font-weight: 800; font-size: 15px; color: var(--brand-blue, #010066); }
.sch-uni-sub { margin-top: 4px; display: flex; gap: 6px; flex-wrap: wrap; }
.sch-list { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.sch-item {
  padding: 8px 10px; border-radius: 10px;
  background: linear-gradient(135deg, rgba(1,0,102,.04), rgba(242,201,76,.08));
  border: 1px solid rgba(1,0,102,.06);
}
.sch-name { font-weight: 700; font-size: 13px; color: #1a1a2e; }
.sch-meta { margin-top: 4px; display: flex; gap: 6px; flex-wrap: wrap; }
.sch-note { font-size: 11.5px; color: var(--text-muted, #888); margin: 10px 0 0; line-height: 1.6; font-style: italic; }
