/* ============================================================
   Wain · AI Bar + Hero AI Pill + City Chips
   ============================================================ */

/* ============================================================
   Busy States — منع الـ spam وإظهار حالة البحث
   ============================================================ */

/* ── شريط AI داخل المدينة وهو busy ── */
.city-ai-bar.is-busy {
  opacity: 0.7;
  pointer-events: none;
}
.city-ai-bar input:disabled,
.city-ai-bar button:disabled {
  cursor: wait;
  opacity: 0.6;
}
.city-ai-chip:disabled {
  opacity: 0.5;
  cursor: wait;
  pointer-events: none;
}

/* ── FAB في وضع التحميل ── */
#wain-chat-fab.is-loading {
  animation: wainFabPulse 1.2s ease-in-out infinite;
}
#wain-chat-fab.is-loading .wain-chat-fab__icon {
  animation: wainSpin 1s linear infinite;
}
@keyframes wainFabPulse {
  0%, 100% { box-shadow: 0 14px 36px -10px rgba(14, 54, 41, 0.55), 0 0 0 0 rgba(194, 162, 105, 0.4); }
  50%      { box-shadow: 0 14px 36px -10px rgba(14, 54, 41, 0.55), 0 0 0 12px rgba(194, 162, 105, 0); }
}
@keyframes wainSpin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* ── إدخال الشات وهو معطّل ── */
#wain-chat-input:disabled {
  background: #f3eee3;
  color: #8a6a40;
  cursor: wait;
}
#wain-chat-send:disabled {
  background: #b8b0a0;
  cursor: wait;
  transform: none;
}
.wain-chat__suggestions button:disabled {
  opacity: 0.45;
  cursor: wait;
}

/* ── شارة "جاري البحث" أعلى الشات ── */
#wain-chat-panel.is-open #wain-chat-root.is-busy::after,
#wain-chat-root.is-busy #wain-chat-panel.is-open .wain-chat__header::after {
  content: '';
}
#wain-chat-root.is-busy #wain-chat-panel .wain-chat__title::after {
  content: ' · جاري البحث...';
  font-size: 11px;
  font-weight: 600;
  color: #d4bd93;
  letter-spacing: 0;
}

/* ── اهتزاز الـ input عند محاولة الـspam ── */
@keyframes wainShake {
  0%, 100% { transform: translateX(0); }
  20%      { transform: translateX(-4px); }
  40%      { transform: translateX(4px); }
  60%      { transform: translateX(-3px); }
  80%      { transform: translateX(3px); }
}
#wain-chat-input.shake {
  animation: wainShake 0.4s ease;
  border-color: #ef4444 !important;
}

/* ── Toast (رسالة عابرة) ── */
.wain-toast {
  align-self: center;
  padding: 8px 14px;
  background: rgba(7, 35, 27, 0.85);
  color: #fff7e6;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  animation: wainToastIn .3s ease, wainToastOut .3s ease 2.2s forwards;
}
@keyframes wainToastIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes wainToastOut {
  to { opacity: 0; transform: translateY(-8px); }
}

/* ── رسالة "اختر تصنيف" ── */
.category-prompt {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 24px;
}
.category-prompt__hex {
  filter: drop-shadow(0 14px 30px rgba(194, 162, 105, 0.4));
  animation: wainBob 2.2s ease-in-out infinite;
}
@keyframes wainBob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); }
}
.category-prompt__title {
  font-size: 18px;
  font-weight: 900;
  color: #07231b;
}
.category-prompt__desc {
  font-size: 13.5px;
  color: #6b5233;
  text-align: center;
}

/* ============================================================
   AI Banner — لما النتائج تطلع داخل صفحة المدينة
   ============================================================ */
.ai-banner {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, #0e3629 0%, #154838 50%, #1f5e46 100%);
  border-radius: 20px;
  padding: 22px 24px;
  color: #fff7e6;
  position: relative;
  overflow: hidden;
  box-shadow: 0 20px 50px -20px rgba(7, 35, 27, 0.55);
  margin-bottom: 6px;
  animation: aiBannerIn .4s ease-out;
}
@keyframes aiBannerIn {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.ai-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at top right, rgba(194,162,105,0.22), transparent 60%),
    radial-gradient(ellipse at bottom left, rgba(212,189,147,0.12), transparent 50%);
  pointer-events: none;
}
.ai-banner::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 60'%3E%3Cpath d='M30 4 L52 17 V43 L30 56 L8 43 V17 Z' fill='none' stroke='%23c2a269' stroke-width='0.5' opacity='0.15'/%3E%3C/svg%3E");
  background-size: 80px 80px;
  opacity: 0.4;
  pointer-events: none;
}
.ai-banner__head {
  display: flex;
  align-items: center;
  gap: 14px;
  position: relative;
  z-index: 1;
}
.ai-banner__icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, #c2a269 0%, #d4bd93 100%);
  color: #07231b;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 8px 20px -8px rgba(194, 162, 105, 0.6);
}
.ai-banner__title { flex: 1; min-width: 0; }
.ai-banner__label {
  font-size: 11px;
  font-weight: 800;
  color: #d4bd93;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 2px;
}
.ai-banner__query {
  font-size: 17px;
  font-weight: 800;
  color: #fff7e6;
  line-height: 1.4;
}
.ai-banner__status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: rgba(212, 189, 147, 0.15);
  color: #d4bd93;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}
.ai-banner__dots { display: inline-flex; gap: 3px; }
.ai-banner__dots span {
  width: 5px; height: 5px;
  background: #d4bd93;
  border-radius: 50%;
  animation: aiDot 1.2s infinite ease-in-out;
}
.ai-banner__dots span:nth-child(2) { animation-delay: .15s; }
.ai-banner__dots span:nth-child(3) { animation-delay: .3s; }
@keyframes aiDot {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.5; }
  40%           { transform: scale(1);   opacity: 1; }
}
.ai-banner__close {
  width: 32px; height: 32px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(212, 189, 147, 0.25);
  color: #fff7e6;
  border-radius: 50%;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all .2s;
  flex-shrink: 0;
}
.ai-banner__close:hover {
  background: rgba(212, 189, 147, 0.2);
  transform: rotate(90deg);
}
.ai-banner__text {
  position: relative;
  z-index: 1;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px dashed rgba(212, 189, 147, 0.25);
  font-size: 14.5px;
  line-height: 1.85;
  color: #e8d9b8;
}
.ai-banner__text strong {
  color: #fff7e6;
  font-weight: 800;
}
.ai-banner__text em {
  color: #b8a98a;
  font-style: normal;
  font-size: 12.5px;
}

.ai-banner--error {
  background: linear-gradient(135deg, #4a1f1f, #2e1414);
}
.ai-banner--error .ai-banner__icon {
  background: #ef4444;
  color: #fff;
}

/* ============================================================
   Page Transitions — انتقالات فورية بدون فلاش
   ============================================================ */
.page-transition { display: none; }
/* لا تستخدم scroll-behavior: smooth — يسبب سكرول ثانوي غير مرغوب */

/* ============================================================
   صفحة "كل المدن" — All Cities Page
   ============================================================ */

/* إخفاء بقية الأقسام عند فتح صفحة كل المدن (الهيدر يبقى) */
body.show-all-cities > section:not(#allCitiesPage):not(#cityDetail),
body.show-all-cities > footer {
  display: none !important;
}

/* انتقال الصفحة يُدار من JS عبر Web Animations API */
body.page-sliding { overflow: hidden; }

/* ============ تحسينات أداء حادة أثناء الانتقال ============ */
/* أعطّل backdrop-filter (مكلف جداً) — يحل التهنيق */
body.page-sliding #siteHeader,
body.page-sliding #siteHeader.scrolled {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
/* أعطّل أي blur على cards/chips أثناء الانتقال */
body.page-sliding *,
body.page-sliding *::before,
body.page-sliding *::after {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
/* أعطّل أنيميشن خلفية body — يقلل repaint */
body.page-sliding {
  background-attachment: scroll;
}

/* overlay صفحة المدن أثناء العرض — تطبق على #allCitiesPage */
.page-overlay {
  position: fixed !important;
  inset: 0 !important;
  z-index: 30 !important;
  overflow-y: auto !important;
  background-color: var(--wain-bg-color, #e8ece9) !important;
  background-image: var(--wain-pattern) !important;
  background-size: 320px 320px !important;
  background-repeat: repeat !important;
  box-shadow: 12px 0 40px -4px rgba(7, 35, 27, 0.3);
}

/* إخفاء زر "استكشف المدن" بالهيدر — نخفيه بصرياً مع الإبقاء على مساحته
   حتى لا ينزاح الـnav */
body.cities-open #headerCitiesCTA {
  visibility: hidden;
  pointer-events: none;
}

/* ── Hero علوي ── */
.all-cities-hero {
  position: relative;
  background: linear-gradient(135deg, #07231b 0%, #0e3629 45%, #154838 100%);
  color: #fff7e6;
  overflow: hidden;
}
.all-cities-hero__pattern {
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 80 80'%3E%3Cpath d='M40 6 L68 22 V58 L40 74 L12 58 V22 Z' fill='none' stroke='%23c2a269' stroke-width='0.7' opacity='0.18'/%3E%3C/svg%3E");
  background-size: 100px 100px;
  opacity: 0.6;
  pointer-events: none;
}
.all-cities-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 40% at 80% 20%, rgba(194,162,105,0.2), transparent 60%),
    radial-gradient(ellipse 50% 40% at 10% 90%, rgba(212,189,147,0.1), transparent 60%);
  pointer-events: none;
}

/* ── Toolbar (بحث + عداد) ── */
.all-cities-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 20px 50px -20px rgba(7, 35, 27, 0.4);
  border: 1px solid rgba(194, 162, 105, 0.25);
}
.all-cities-search {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: #fbfaf6;
  border-radius: 12px;
  border: 1px solid transparent;
  transition: border-color .2s;
}
.all-cities-search:focus-within {
  border-color: #c2a269;
  background: #fff;
}
.all-cities-search input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-family: inherit;
  font-size: 14.5px;
  color: #07231b;
  font-weight: 600;
}
.all-cities-search input::placeholder { color: #a89880; font-weight: 500; }

.all-cities-stat {
  display: flex;
  align-items: baseline;
  gap: 4px;
  padding: 0 14px;
  border-right: 1px dashed rgba(194, 162, 105, 0.4);
  flex-shrink: 0;
}
.all-cities-stat span:first-child {
  font-size: 24px;
  font-weight: 900;
  color: #07231b;
  line-height: 1;
}
.all-cities-stat__label {
  font-size: 12px;
  font-weight: 700;
  color: #8a6a40;
}

/* ── شرائح المناطق ── */
.all-cities-regions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}
.region-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: #fff;
  border: 1px solid rgba(194, 162, 105, 0.3);
  border-radius: 999px;
  color: #07231b;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: all .2s;
}
.region-chip:hover {
  border-color: #c2a269;
  transform: translateY(-1px);
}
.region-chip.is-active {
  background: #0e3629;
  color: #fff7e6;
  border-color: #0e3629;
}
.region-chip__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 18px;
  padding: 0 6px;
  background: rgba(194, 162, 105, 0.2);
  color: #8a6a40;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
}
.region-chip.is-active .region-chip__count {
  background: rgba(255, 247, 230, 0.2);
  color: #d4bd93;
}

/* ── شبكة البطاقات ── */
.all-cities-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.ac-card {
  position: relative;
  background: #fff;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(194, 162, 105, 0.2);
  cursor: pointer;
  font-family: inherit;
  text-align: right;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s;
  animation: acCardIn .4s ease-out backwards;
  /* عزل الرسم — يقلل تكلفة الـpaint */
  contain: layout paint style;
  /* البطاقات خارج الشاشة ما ترسم — يحل تهنيق الانتقال */
  content-visibility: auto;
  contain-intrinsic-size: 360px;
}
@keyframes acCardIn {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
/* ألغِ أنيميشن دخول البطاقات أثناء انتقال الصفحة — يمنع التهنيق */
body.page-sliding .ac-card {
  animation: none !important;
}
.ac-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 30px 60px -25px rgba(7, 35, 27, 0.4);
  border-color: var(--city, #154838);
}

.ac-card__image {
  position: relative;
  height: 180px;
  background-size: cover;
  background-position: center;
  background-color: var(--city);
}
.ac-card__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(7,35,27,0) 30%, rgba(7,35,27,0.7) 100%);
}
.ac-card__region {
  position: absolute;
  top: 12px;
  right: 12px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: rgba(255, 247, 230, 0.95);
  backdrop-filter: blur(6px);
  color: #07231b;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
}

.ac-card__body {
  padding: 18px 18px 16px;
}
.ac-card__name {
  font-size: 22px;
  font-weight: 900;
  color: #07231b;
  margin-bottom: 4px;
}
.ac-card__tagline {
  font-size: 13px;
  color: #6b5233;
  margin-bottom: 12px;
  line-height: 1.5;
  min-height: 38px;
}
.ac-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 14px;
}
.ac-card__tag {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  background: #fbfaf6;
  color: #8a6a40;
  border-radius: 999px;
  border: 1px solid rgba(194, 162, 105, 0.25);
}
.ac-card__cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding-top: 10px;
  border-top: 1px dashed rgba(194, 162, 105, 0.3);
  color: var(--city, #0e3629);
  font-size: 13px;
  font-weight: 800;
  transition: gap .2s;
  width: 100%;
}
.ac-card:hover .ac-card__cta {
  gap: 10px;
}

@media (max-width: 640px) {
  .all-cities-grid { grid-template-columns: 1fr; }
  .all-cities-toolbar { flex-direction: column; }
  .all-cities-stat { border-right: none; border-top: 1px dashed rgba(194,162,105,0.4); padding: 8px 0 0; }
}

/* ── Hero AI Pill ── */
.hero-ai-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  background: linear-gradient(135deg, #c2a269 0%, #d4bd93 100%);
  color: #07231b;
  border-radius: 999px;
  font-weight: 800;
  font-size: 11px;
  letter-spacing: 0.2px;
}

/* ── City AI Bar (داخل صفحة المدينة) ── */
.city-ai-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border-radius: 999px;
  padding: 6px 8px 6px 20px;
  box-shadow: 0 20px 50px -18px rgba(7, 35, 27, 0.45), 0 4px 12px rgba(0,0,0,0.08);
  border: 1px solid rgba(194, 162, 105, 0.35);
  position: relative;
  overflow: hidden;
}
.city-ai-bar::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 40%, rgba(194, 162, 105, 0.12) 50%, transparent 60%);
  background-size: 200% 100%;
  animation: cityAiShine 4s linear infinite;
  pointer-events: none;
}
@keyframes cityAiShine {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.city-ai-bar__badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  background: linear-gradient(135deg, #0e3629 0%, #154838 100%);
  color: #d4bd93;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.5px;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.city-ai-bar input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  color: #07231b;
  padding: 10px 0;
  position: relative;
  z-index: 1;
}
.city-ai-bar input::placeholder {
  color: #8a6a40;
  opacity: 0.7;
}

.city-ai-bar button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  background: linear-gradient(135deg, #154838 0%, #1f5e46 100%);
  color: #fff7e6;
  border: none;
  border-radius: 999px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  transition: transform .2s, box-shadow .2s;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}
.city-ai-bar button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px -10px rgba(14, 54, 41, 0.5);
}

/* ── Chips (الاقتراحات السريعة) ── */
.city-ai-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.city-ai-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: #fff;
  border: 1px solid rgba(194, 162, 105, 0.4);
  border-radius: 999px;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  color: #154838;
  cursor: pointer;
  transition: all .2s;
}
.city-ai-chip:hover {
  background: #154838;
  color: #fff7e6;
  border-color: #154838;
  transform: translateY(-2px);
  box-shadow: 0 8px 18px -10px rgba(14, 54, 41, 0.5);
}

/* ── Hero AI Action ── */
.hero-result--ai {
  background: linear-gradient(120deg, rgba(212,189,147,0.12), rgba(21,72,56,0.06));
  border-bottom: 1px solid rgba(194, 162, 105, 0.3);
}
.hero-result--ai:hover {
  background: linear-gradient(120deg, rgba(212,189,147,0.25), rgba(21,72,56,0.12));
}

/* ============================================================
   Hero Dropdown — التصميم الجديد للقائمة المنسدلة
   ============================================================ */
.hero-dd {
  padding: 6px;
  background: #fff;
}
.hero-dd__section {
  padding: 10px 6px 4px;
}
.hero-dd__heading {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px 10px;
  font-size: 11px;
  font-weight: 800;
  color: #8a6a40;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.hero-dd__heading svg { color: #c2a269; }
.hero-dd__divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(194,162,105,0.3), transparent);
  margin: 4px 12px;
}

/* أزرار الأسئلة الذكية */
.hero-dd__prompts {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.hero-prompt {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 12px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 12px;
  cursor: pointer;
  text-align: right;
  font-family: inherit;
  transition: all .18s ease;
}
.hero-prompt:hover {
  background: #fbfaf6;
  border-color: rgba(194, 162, 105, 0.3);
  transform: translateX(-2px);
}
.hero-prompt__icon {
  width: 30px; height: 30px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform .18s ease;
}
.hero-prompt:hover .hero-prompt__icon { transform: scale(1.08); }
.hero-prompt__text {
  flex: 1;
  font-size: 14px;
  font-weight: 600;
  color: #07231b;
}

/* بطاقات المدن (Grid) */
.hero-dd__cities {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  padding: 0 6px 6px;
}
.hero-city {
  position: relative;
  padding: 12px 14px;
  background: #fbfaf6;
  border: 1px solid rgba(194, 162, 105, 0.25);
  border-radius: 12px;
  text-align: right;
  cursor: pointer;
  font-family: inherit;
  transition: all .2s ease;
  overflow: hidden;
}
.hero-city::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--city, #154838);
  opacity: 0;
  transition: opacity .25s;
}
.hero-city:hover {
  border-color: var(--city, #154838);
  transform: translateY(-2px);
  box-shadow: 0 10px 20px -10px rgba(7, 35, 27, 0.35);
}
.hero-city:hover::before { opacity: 1; }
.hero-city:hover .hero-city__name,
.hero-city:hover .hero-city__region {
  color: #fff7e6;
  position: relative;
  z-index: 1;
}
.hero-city__name {
  font-weight: 800;
  font-size: 14px;
  color: #07231b;
  position: relative;
  z-index: 1;
  transition: color .2s;
}
.hero-city__region {
  font-size: 11px;
  color: #6b5233;
  margin-top: 2px;
  position: relative;
  z-index: 1;
  transition: color .2s;
}

/* تحسين زر الـ AI Action للسؤال الطويل */
.hero-result--ai {
  background: linear-gradient(120deg, rgba(212,189,147,0.18), rgba(21,72,56,0.1));
  border-bottom: 1px solid rgba(194, 162, 105, 0.35);
  padding: 14px 14px;
}
.hero-result--ai::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 40%, rgba(255,255,255,0.4) 50%, transparent 60%);
  background-size: 200% 100%;
  animation: cityAiShine 3s linear infinite;
  pointer-events: none;
}
.hero-result {
  position: relative;
  overflow: hidden;
}

@media (max-width: 540px) {
  .hero-dd__cities {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   Wain · Chat UI Styles — المساعد الذكي
   ============================================================ */

#wain-chat-root { font-family: 'Tajawal', system-ui, sans-serif; }

#wain-chat-fab {
  position: fixed;
  bottom: calc(24px + env(safe-area-inset-bottom));
  left: calc(24px + env(safe-area-inset-left));
  z-index: 9999;
  padding: 14px 22px 14px 16px;
  border-radius: 999px;
  background: linear-gradient(135deg, #154838 0%, #1f5e46 100%);
  color: #fff7e6;
  font-weight: 700;
  font-size: 14px;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 14px 36px -10px rgba(14, 54, 41, 0.55), 0 4px 12px rgba(0,0,0,0.18);
  transition: transform .25s ease, box-shadow .25s ease, opacity .3s ease;
}
#wain-chat-fab:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 22px 50px -12px rgba(14, 54, 41, 0.65);
}
#wain-chat-fab.is-hidden {
  opacity: 0;
  pointer-events: none;
  transform: scale(.85);
}
.wain-chat-fab__icon {
  display: inline-flex;
  width: 30px; height: 30px;
  background: linear-gradient(135deg, #c2a269, #d4bd93);
  color: #0e3629;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
}
.wain-chat-fab__pulse {
  position: absolute;
  inset: -4px;
  border-radius: 999px;
  background: rgba(194, 162, 105, 0.4);
  z-index: -1;
  animation: wainPulse 2.4s ease-out infinite;
}
@keyframes wainPulse {
  0%   { transform: scale(0.95); opacity: 0.7; }
  100% { transform: scale(1.25); opacity: 0; }
}

#wain-chat-panel {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 9999;
  width: min(420px, calc(100vw - 32px));
  height: min(640px, calc(100vh - 48px));
  background: #fff;
  border-radius: 24px;
  box-shadow: 0 30px 80px -20px rgba(7, 35, 27, 0.55), 0 8px 24px rgba(0,0,0,0.12);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(20px) scale(0.96);
  opacity: 0;
  pointer-events: none;
  transition: transform .35s cubic-bezier(.2,.8,.2,1), opacity .25s ease;
  border: 1px solid rgba(194, 162, 105, 0.22);
}
#wain-chat-panel.is-open {
  transform: translateY(0) scale(1);
  opacity: 1;
  pointer-events: auto;
}

.wain-chat__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  background: linear-gradient(135deg, #0e3629 0%, #154838 100%);
  color: #fff7e6;
  flex-shrink: 0;
}
.wain-chat__brand { display: flex; align-items: center; gap: 12px; }
.wain-chat__avatar {
  width: 40px; height: 40px;
  background: rgba(255,255,255,0.1);
  border: 1.5px solid rgba(194, 162, 105, 0.4);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.wain-chat__title { font-weight: 800; font-size: 15px; }
.wain-chat__status {
  font-size: 11px;
  opacity: 0.7;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
}
.wain-chat__dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 8px #4ade80;
  animation: wainBlink 2s infinite;
}
@keyframes wainBlink { 50% { opacity: 0.4; } }
.wain-chat__actions { display: flex; gap: 6px; }
.wain-chat__actions button {
  width: 32px; height: 32px;
  background: rgba(255,255,255,0.08);
  border: none;
  border-radius: 50%;
  color: #fff7e6;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background .2s;
}
.wain-chat__actions button:hover { background: rgba(255,255,255,0.18); }

.wain-chat__messages {
  flex: 1;
  overflow-y: auto;
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: #fbfaf6;
  scroll-behavior: smooth;
}
.wain-chat__messages::-webkit-scrollbar { width: 6px; }
.wain-chat__messages::-webkit-scrollbar-thumb {
  background: rgba(14, 54, 41, 0.18);
  border-radius: 3px;
}

.wain-msg {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 92%;
  animation: wainSlideIn .35s ease;
}
@keyframes wainSlideIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.wain-msg--user { align-self: flex-end; align-items: flex-end; }
.wain-msg--assistant { align-self: flex-start; align-items: flex-start; }

.wain-msg__bubble {
  padding: 12px 16px;
  border-radius: 18px;
  font-size: 14.5px;
  line-height: 1.7;
  word-wrap: break-word;
  white-space: pre-wrap;
}
.wain-msg--user .wain-msg__bubble {
  background: linear-gradient(135deg, #154838 0%, #1f5e46 100%);
  color: #fff7e6;
  border-bottom-right-radius: 6px;
}
.wain-msg--assistant .wain-msg__bubble {
  background: #fff;
  color: #07231b;
  border: 1px solid rgba(194, 162, 105, 0.22);
  border-bottom-left-radius: 6px;
}
.wain-msg__bubble strong { color: #154838; font-weight: 800; }
.wain-msg--user .wain-msg__bubble strong { color: #d4bd93; }

.wain-thinking { display: inline-flex; align-items: center; gap: 10px; padding: 10px 14px; }
.wain-thinking__dots { display: inline-flex; gap: 4px; }
.wain-thinking__dots span {
  width: 7px; height: 7px;
  background: #154838;
  border-radius: 50%;
  display: inline-block;
  animation: wainBounce 1.2s infinite ease-in-out;
}
.wain-thinking__dots span:nth-child(2) { animation-delay: .15s; }
.wain-thinking__dots span:nth-child(3) { animation-delay: .3s; }
@keyframes wainBounce {
  0%, 80%, 100% { transform: scale(0.5); opacity: 0.5; }
  40% { transform: scale(1); opacity: 1; }
}
.wain-thinking__label { font-size: 13px; color: #4c3a24; font-weight: 600; }

.wain-msg__cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-top: 6px;
  width: 100%;
}
@media (min-width: 480px) {
  .wain-msg__cards { grid-template-columns: 1fr 1fr; }
}
.wain-place-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid rgba(194, 162, 105, 0.3);
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.wain-place-card:hover {
  transform: translateX(-3px);
  border-color: #c2a269;
  box-shadow: 0 6px 16px -8px rgba(14, 54, 41, 0.25);
}
.wain-place-card__icon {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, #d4bd93, #c2a269);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}
.wain-place-card__body { flex: 1; min-width: 0; }
.wain-place-card__name {
  font-weight: 700;
  font-size: 14px;
  color: #07231b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wain-place-card__type { font-size: 11px; color: #6b5233; margin-top: 2px; }
.wain-place-card__arrow { font-size: 18px; color: #c2a269; font-weight: 700; }

/* ─── بطاقة مكان v2 — شبيهة بـexp-card الموقع ─── */
.wain-place-card-v2 {
  display: flex;
  gap: 10px;
  background: #fff;
  border: 1.5px solid rgba(194,162,105,0.25);
  border-radius: 14px;
  padding: 8px;
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.wain-place-card-v2:hover {
  transform: translateY(-2px);
  border-color: #c2a269;
  box-shadow: 0 8px 20px -10px rgba(14,54,41,0.2);
}
.wain-card__img {
  width: 64px; height: 64px;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
  background: linear-gradient(135deg, #d4bd93, #8a6a40);
}
.wain-card__img img {
  width: 100%; height: 100%; object-fit: cover;
}
.wain-card__img--icon {
  display: flex; align-items: center; justify-content: center;
  color: #fff;
}
.wain-card__body {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column; gap: 3px;
}
.wain-card__name {
  font-weight: 800; font-size: 13.5px;
  color: #07231b;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.wain-card__tag {
  display: inline-block;
  font-size: 10.5px; font-weight: 700;
  color: #2f7658; background: #eef6f2;
  padding: 2px 8px; border-radius: 20px;
  width: fit-content;
}
.wain-card__addr {
  font-size: 11px; color: #8a6a40;
  display: flex; align-items: center; gap: 4px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.wain-card__map-btn {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 700;
  color: #0e3629; background: #e3e8e5;
  padding: 4px 10px; border-radius: 20px;
  margin-top: 2px; width: fit-content;
  text-decoration: none;
  transition: background .2s, color .2s;
}
.wain-card__map-btn:hover {
  background: #0e3629; color: #faf7f2;
}

.wain-chat__suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px 16px 0;
  flex-shrink: 0;
}
.wain-chat__suggestions.is-hidden { display: none; }
.wain-chat__suggestions button {
  padding: 7px 12px;
  background: #fff;
  border: 1px solid rgba(194, 162, 105, 0.35);
  border-radius: 999px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  color: #154838;
  cursor: pointer;
  transition: all .2s;
}
.wain-chat__suggestions button:hover {
  background: #154838;
  color: #fff7e6;
  border-color: #154838;
}

.wain-chat__form {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px 14px;
  background: #fff;
  border-top: 1px solid rgba(194, 162, 105, 0.18);
  flex-shrink: 0;
}
#wain-chat-input {
  flex: 1;
  padding: 12px 16px;
  border: 1.5px solid rgba(194, 162, 105, 0.3);
  border-radius: 999px;
  font-family: inherit;
  font-size: 14px;
  color: #07231b;
  background: #fbfaf6;
  outline: none;
  transition: border-color .2s, background .2s;
}
#wain-chat-input:focus { border-color: #154838; background: #fff; }
#wain-chat-send {
  width: 42px; height: 42px;
  background: linear-gradient(135deg, #154838, #1f5e46);
  color: #fff7e6;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform .2s;
  flex-shrink: 0;
}
#wain-chat-send:hover { transform: scale(1.06); }
#wain-chat-send:disabled { opacity: 0.5; cursor: wait; }

/* ── الموبايل ── */
@media (max-width: 640px) {
  .city-ai-bar {
    flex-wrap: wrap;
    padding: 10px;
    border-radius: 18px;
  }
  .city-ai-bar input { width: 100%; padding: 8px 6px; font-size: 14px; }
  .city-ai-bar button { width: 100%; justify-content: center; }
}
@media (max-width: 540px) {
  #wain-chat-fab { bottom: calc(16px + env(safe-area-inset-bottom)); left: calc(16px + env(safe-area-inset-left)); padding: 12px 18px 12px 14px; font-size: 13px; }
  #wain-chat-panel {
    bottom: 0; left: 0; right: 0;
    width: 100%;
    height: 92vh;
    border-radius: 24px 24px 0 0;
  }
  .wain-chat__header { padding: 12px 14px; }
  .wain-chat__avatar { width: 34px; height: 34px; }
  .wain-chat__title { font-size: 13.5px; }
  .wain-chat__messages { padding: 12px 12px; }
  .wain-msg__bubble { padding: 10px 14px; font-size: 13.5px; }
  .wain-msg__avatar { width: 26px; height: 26px; }
  .wain-place-card-v2 { padding: 6px; border-radius: 12px; }
  .wain-card__img { width: 52px; height: 52px; border-radius: 8px; }
  .wain-card__name { font-size: 12px; }
  .wain-card__tag { font-size: 9.5px; padding: 1px 6px; }
  .wain-card__addr { font-size: 10px; }
  .wain-card__map-btn { font-size: 10px; padding: 3px 8px; }
  .wain-chat__suggestions button { padding: 6px 10px; font-size: 12px; }
  #wain-chat-input { padding: 10px 12px; font-size: 14px; }
  #wain-chat-send { width: 38px; height: 38px; }
}
