/* صفحة المدينة: تعديلات فوق تنسيقات المرجع (city.css) */

/* المسارات بدل مكتبة slick: تمرير أفقي بالسحب أو الأسهم */
[data-track] { display: flex; gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none; }
[data-track]::-webkit-scrollbar { display: none; }
[data-track] > .item-slider__item, [data-track] > .main-slider__item { display: block !important; }
.item-slider__items[data-track] > .item-slider__item { flex: 0 0 calc((100% - 60px) / 4); width: auto; scroll-snap-align: start; float: none; }
.carousel-item--city, .carousel-item--artist { width: 100%; }
[data-near] .item-slider__items[data-track] > .item-slider__item,
.city-sections .section [data-track] > .item-slider__item:has(.carousel-item--city, .carousel-item--artist) { flex-basis: calc((100% - 100px) / 6); }
.item-slider__arrow { display: block; cursor: pointer; }
.main-slider__items[data-track] { gap: 0; }
.main-slider__items[data-track] > .main-slider__item { flex: 0 0 100%; scroll-snap-align: start; float: none; position: relative; }
.picture-container img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* الشريط الرئيسي: تنسيقات النص والفيديو من ref-slider.css؛ هنا الفيديو فوق صورة البانر بنفس المقاس */
.main-slider__item > .picture-container { position: relative; }
.main-slider__video { inset: 0; z-index: 1; border-radius: inherit; }
.main-slider__video-inner { width: 100%; height: 100%; object-fit: cover; display: block; }
.main-slider__overlay { z-index: 2; }
.main-slider__footer-content { text-decoration: none; pointer-events: all; }
.main-slider__control { pointer-events: all; }
.main-slider__sound-control { border: 0; cursor: pointer; padding: 0; }
.main-slider__sound-control.is-unmuted .main-slider__sound-icon { display: block; }
.main-slider__sound-control.is-unmuted .main-slider__sound-muted-icon { display: none; }

/* نتائج البحث/الفئة كشبكة */
.city-grid .item-slider__items[data-track] { flex-wrap: wrap; overflow: visible; }
.city-grid .item-slider__arrow { display: none; }
.city-empty { padding: 24px 0; color: var(--Content-secondary, #6e6e81); }
.city-empty a { color: var(--Content-accelerator, #7e05e8); text-decoration: underline; }

/* المفضلة */
.add-to-favorite.active .icon { fill: #ff3b5c; color: #ff3b5c; }

/* اللغة والعملة متل المرجع (localizationSwitcher): تبويبين «اللغة | العملة» وتحتهم القائمة */
.main-header__localization-switcher-container { position: relative; }
.loc-tab, .loc-item, .loc-sheet__close { border: 0; background: none; font: inherit; color: inherit; padding: 0; cursor: pointer; }
.loc-list { display: none; flex-direction: column; gap: 20px; }
.loc-list.is-active { display: flex; animation: loc-in .2s ease-out; }
@keyframes loc-in { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: none; } }
.loc-item { display: flex; align-items: center; gap: 20px; width: 100%; font-size: 16px; color: var(--Content-primary, #0f0f15); text-align: start; }
.loc-item:hover, .loc-item.is-on { color: var(--Interaction-Secondary-content, #7e05e8); }
.loc-item__icon { display: flex; width: 16px; height: 16px; flex: 0 0 auto; }
.loc-item__icon svg { width: 16px; height: 16px; }
.loc-item__title { width: 36px; flex: 0 0 auto; text-align: start; }
.loc-item__name { display: flex; flex: 1 1 auto; }

/* الشاشات الكبيرة: نافذة تحت الزر */
.loc-pop { display: none; position: absolute; top: calc(100% + 8px); inset-inline-end: 0; z-index: 200; }
.main-header__localization-switcher-container.open .loc-pop { display: block; }
.loc-pop__content { display: flex; flex-direction: column; min-width: 260px; border-radius: 12px; background: var(--Bg-floating, #fff); box-shadow: 0 4px 12px 0 rgba(0,0,0,.12); }
.loc-pop__tabs { display: flex; background: var(--Bg-ghost, #f5f5f8); border-radius: 12px 12px 0 0; }
.loc-pop__tabs .loc-tab { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 4px; padding: 12px 8px 8px; width: 50%; background: var(--Bg-secondary, #ececf1); }
.loc-pop__tabs .loc-tab:first-child { border-start-start-radius: 12px; }
.loc-pop__tabs .loc-tab:last-child { border-start-end-radius: 12px; }
.loc-pop__tabs .loc-tab.is-active { background: var(--Bg-floating, #fff); border-radius: 12px 12px 0 0; }
.loc-pop__tabs .loc-tab__top { font-size: 12px; letter-spacing: 1px; line-height: 1; color: var(--Content-secondary, #58585b); }
.loc-pop__tabs .loc-tab__bottom { font-size: 16px; line-height: 1; color: var(--Content-primary, #0f0f15); }
.loc-pop__tabs .loc-tab.is-active .loc-tab__bottom { color: var(--Interaction-Secondary-content, #7e05e8); }
.loc-pop__lists { max-height: 320px; overflow-y: auto; padding: 24px 24px 24px 16px; border-radius: 0 0 12px 12px; }
.loc-pop__lists::-webkit-scrollbar { width: 6px; }
.loc-pop__lists::-webkit-scrollbar-thumb { background: #d9d9d9; border-radius: 5px; }

/* الجوال: نافذة من تحت */
.loc-sheet { position: fixed; inset: 0; z-index: 10050; visibility: hidden; }
.loc-sheet.open { visibility: visible; }
.loc-sheet__backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.5); opacity: 0; transition: opacity .2s ease-out; }
.loc-sheet.open .loc-sheet__backdrop { opacity: 1; }
.loc-sheet__panel { position: absolute; inset-inline: 0; bottom: 0; display: flex; flex-direction: column; height: 80vh; background: var(--Bg-default, #fff); border-radius: 16px 16px 0 0; overflow: hidden; transform: translateY(100%); transition: transform .25s ease-out; }
.loc-sheet.open .loc-sheet__panel { transform: none; }
.loc-sheet__head { display: flex; justify-content: space-between; align-items: center; padding: 20px 24px 20px 20px; background: var(--Bg-ghost, #f5f5f8); font-size: 14px; line-height: 24px; }
.loc-sheet__title { font-size: 20px; font-weight: 700; color: var(--Content-primary, #0f0f15); }
.loc-sheet__close { font-size: 16px; color: var(--Interaction-Secondary-content, #7e05e8); }
.loc-sheet__content { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; padding: 24px 20px; }
.loc-sheet__tabs { position: relative; display: flex; background: var(--Bg-ghost, #f5f5f8); border-radius: 50px; padding: 3px; margin-bottom: 24px; }
.loc-sheet__tabs .loc-tab { display: flex; justify-content: center; align-items: center; gap: 4px; padding: 13px 8px; width: 50%; border-radius: 50px; font-size: 16px; line-height: 1; transition: background .2s ease-out; }
.loc-sheet__tabs .loc-tab.is-active { background: var(--Bg-default, #fff); box-shadow: 0 0 4px 0 rgba(0,0,0,.06), 0 3px 6px 0 rgba(0,0,0,.06); }
.loc-sheet__tabs .loc-tab__top { color: var(--Content-primary, #0f0f15); }
.loc-sheet__tabs .loc-tab.is-active .loc-tab__top { color: var(--Interaction-Secondary-content, #7e05e8); }
.loc-sheet__tabs .loc-tab__bottom { color: var(--Content-secondary, #58585b); }
.loc-sheet__lists { flex: 1 1 auto; overflow-y: auto; }
body.loc-sheet-open { overflow: hidden; }

.other-links__item.active .other-links__btn { background: #0f0f15; color: #fff; }

@media (max-width: 767px) {
  .item-slider__items[data-track] > .item-slider__item { flex-basis: 78%; }
  [data-near] .item-slider__items[data-track] > .item-slider__item,
  .city-sections .section [data-track] > .item-slider__item:has(.carousel-item--city, .carousel-item--artist) { flex-basis: 30%; }
  .city-grid .item-slider__items[data-track] > .item-slider__item { flex-basis: 100%; }
}
@media (min-width: 768px) and (max-width: 991px) {
  .item-slider__items[data-track] > .item-slider__item { flex-basis: calc((100% - 20px) / 2); }
}

/* شعار الموقع في الرأس */
.main-header-logo__link { width: auto !important; max-width: none; }
.main-header-logo .main-header-logo__image--light { display: inline-flex !important; }
.main-header-logo, .main-header-logo__desktop, .main-header-logo__mobile { width: auto !important; height: auto !important; }
.main-header-logo__link { justify-content: flex-start; }

/* الرأس الثابت: لا يتمدد بعرض قائمة الروابط */
.main-header { left: 0; right: 0; width: 100%; max-width: 100vw; }
.main-header-links { overflow: hidden; min-width: 0; }
.main-header-links__list { overflow-x: auto; scrollbar-width: none; flex-wrap: nowrap; }
.main-header-links__list::-webkit-scrollbar { display: none; }

/* شعار الصفحات الداخلية (المدن والفعاليات) بلون الموقع، والرئيسية تبقى بالأبيض */

/* بطاقات الفعاليات: صورة الجوال المربعة بإطار مربع، والفيديو فوق الصورة بيظهر ويختفي */
@media (max-width: 767px) {
  .picture-container--event.has-square { padding-top: 100% !important; height: 0 !important; }
  .picture-container--event.has-square img { position: absolute !important; inset: 0; top: 0 !important; height: 100% !important; }
}
.picture-container .card-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .5s; pointer-events: none; z-index: 1; }
.picture-container .card-video.is-on { opacity: 1; }
.carousel-item__image-top { z-index: 2; }

/* الشريط الرئيسي على الجوال متل المرجع: شرائح مربعة والشريحة الجاية باينة طرفها */
@media (max-width: 767px) {
  /* متل المرجع: الشريحة بعرض الشاشة ناقص 40px (مربعة)، وبينها وبين الجاية 8px */
  .main-slider__items[data-track] { gap: 8px; }
  .main-slider__items[data-track] > .main-slider__item { flex-basis: calc(100vw - 40px); max-width: calc(100vw - 40px); }
  /* الشريط بعرض الشاشة كلها حتى تبين أطراف الشرائح اللي جنبها */
  .top-featured .main-slider__items[data-track] { margin-inline: -16px; padding-inline: 16px; scroll-padding-inline: 16px; }
  /* كل الشرائح مربعة بنفس المقاس، والصورة والفيديو بيعبّوا المربع */
  .main-slider__items[data-track] { align-items: flex-start; }
  .main-slider__items[data-track] .picture-container--main-slider { padding-top: 100% !important; height: 0 !important; position: relative; overflow: hidden; }
  .main-slider__items[data-track] .picture-container--main-slider img { position: absolute !important; inset: 0; top: 0 !important; width: 100%; height: 100% !important; object-fit: cover; z-index: 1; }
  .main-slider__item--fit .picture-container--main-slider::before { content: ""; position: absolute; inset: -20px; background: var(--fit-bg) center / cover; filter: blur(22px) brightness(.75); }
  .main-slider__item--fit .picture-container--main-slider img { object-fit: contain; }
}

/* أقسام المرجع الأولى: بطاقات عادية على الشاشات الكبيرة، و3 بطاقات أفقية بكل شريحة على الجوال */
.city-rows { display: none; }
@media (max-width: 767px) {
  .city-cards { display: none !important; }
  .city-rows { display: block; }
  .city-rows .item-slider__items[data-track] > .item-slider__item { flex-basis: 88%; }
  .city-rows .content-wrapper { display: flex; flex-direction: column; gap: 12px; padding: 0 !important; }
  .city-rows .carousel-item--horizontal { display: flex; gap: 12px; align-items: center; position: relative; }
  .city-rows .carousel-item__image--horizontal { flex: 0 0 96px; width: 96px; }
  .city-rows .picture-container--event--horizontal { padding-top: 100% !important; height: 0 !important; }
  .city-rows .picture-container--event--horizontal img { position: absolute !important; inset: 0; top: 0 !important; width: 100%; height: 100% !important; object-fit: cover; }
  .city-rows .carousel-item__info--horizontal { flex: 1; min-width: 0; }
  .city-rows .carousel-item__rating--horizontal { position: absolute; top: 6px; inset-inline-start: 6px; z-index: 2; margin: 0; }
}

.top-caption__link { cursor: pointer; }

/* أيقونة التاريخ بالشريط الرئيسي (متل المرجع) */
.main-slider__calendar-icon { width: 16px; height: 16px; flex: none; fill: currentColor; color: #fff; }

/* روابط الرأس («اشترك في Plus»، «الفعاليات»، «المغامرات»...) كلها بنفس الحجم واللون والسماكة متل المرجع (600 بخط المرجع) */
.main-header-links__link { font-weight: 600; color: #0f0f15; color: var(--Content-primary, #0f0f15); }
.main-header-links__link.active, .main-header-links__link:hover { color: #6e6e81; color: var(--Interaction-Secondary-content_hover, #6e6e81); }

/* «اشترك في Plus» أول رابط بالرأس متل المرجع */
.main-header-links__link--membership { display: flex; align-items: center; gap: 6px; font-weight: 600; color: #0f0f15; white-space: nowrap; }
.main-header-links__membership-link-icon { width: 15px; height: 15px; flex: none; color: #0f0f15; }
