/* Portofino Chalets — Mobile Luxury Theme */
:root {
  --navy: #0c1829;
  --navy-soft: #152a45;
  --burgundy: #9b1538;
  --burgundy-light: #e84a72;
  --burgundy-dark: #6e0f2a;
  --burgundy-shine: #c41e4a;
  --gold: var(--burgundy);
  --gold-light: var(--burgundy-light);
  --gold-dark: var(--burgundy-dark);
  --white: #ffffff;
  --cream: #faf5f6;
  --text-muted: #5c6d88;
  --shadow: 0 8px 32px rgba(155, 21, 56, 0.14);
  --radius-lg: 20px;
  --radius-xl: 28px;
  --header-h: 64px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --transition: 0.2s ease;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: auto;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
}

body {
  font-family: "Cairo", "Tajawal", system-ui, sans-serif;
  background: var(--cream);
  color: var(--navy);
  direction: rtl;
  overflow-x: hidden;
  min-height: 100dvh;
  min-height: 100svh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

main {
  position: relative;
  z-index: 1;
  background: var(--cream);
}

/* خلفية متدرجة — ألوان متحركة */
.ambient-bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  background: linear-gradient(
    125deg,
    #faf5f6 0%,
    #f5e2ec 12%,
    #ecd8e6 24%,
    #e6dff2 38%,
    #f0dce8 52%,
    #f8e6ee 66%,
    #efe8e2 80%,
    #f6f0f4 92%,
    #faf5f6 100%
  );
  background-size: 400% 400%;
  animation: ambientFlow 32s ease-in-out infinite;
}

.ambient-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 45% at 15% 25%, rgba(196, 42, 82, 0.09), transparent 55%),
    radial-gradient(ellipse 55% 40% at 85% 75%, rgba(15, 31, 61, 0.07), transparent 50%),
    radial-gradient(ellipse 40% 30% at 50% 50%, rgba(214, 169, 68, 0.05), transparent 60%);
  animation: ambientGlow 38s ease-in-out infinite alternate;
  pointer-events: none;
}

.ambient-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    225deg,
    rgba(155, 21, 56, 0.05) 0%,
    transparent 30%,
    rgba(12, 24, 41, 0.04) 50%,
    rgba(232, 74, 114, 0.06) 72%,
    transparent 100%
  );
  background-size: 300% 300%;
  animation: ambientFlow 48s ease-in-out infinite reverse;
  pointer-events: none;
}

@keyframes ambientFlow {
  0%, 100% { background-position: 0% 50%; }
  33% { background-position: 100% 0%; }
  66% { background-position: 50% 100%; }
}

@keyframes ambientGlow {
  0% { opacity: 0.85; transform: scale(1); }
  100% { opacity: 1; transform: scale(1.04); }
}

@media (max-width: 900px), (prefers-reduced-motion: reduce) {
  .ambient-bg {
    animation: none;
    background-size: 100% 100%;
    background-position: center;
  }

  .ambient-bg::before,
  .ambient-bg::after {
    animation: none;
    background-size: 100% 100%;
    background-position: center;
    transform: none;
  }
}

#experience {
  background: var(--cream);
  isolation: isolate;
}

img, video {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  transition: background var(--transition), box-shadow var(--transition), backdrop-filter var(--transition);
}

.site-header.scrolled {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
}

.site-header.hero-overlay {
  background: transparent;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.menu-btn {
  width: 44px;
  height: 44px;
  border: none;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transition: transform 0.2s, background var(--transition);
}

.menu-btn span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: var(--transition);
}

.site-header.scrolled .menu-btn {
  background: rgba(15, 31, 61, 0.08);
}

.site-header.scrolled .menu-btn span {
  background: var(--navy);
}

.menu-btn:active {
  transform: scale(0.95);
}

.btn-messenger-header,
.btn-whatsapp-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: linear-gradient(135deg, var(--burgundy-shine), var(--burgundy-dark));
  color: var(--white);
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  box-shadow: 0 4px 16px rgba(123, 30, 58, 0.4);
  transition: transform 0.2s, box-shadow var(--transition);
}

.btn-messenger-header:active,
.btn-whatsapp-header:active {
  transform: scale(0.97);
}

.btn-messenger-header svg,
.btn-whatsapp-header svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.logo {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--white);
  letter-spacing: -0.02em;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.site-header.scrolled .logo {
  color: var(--navy);
  text-shadow: none;
}

.logo span {
  color: var(--gold-light);
}

.site-header.scrolled .logo span {
  color: var(--gold);
}

/* Slide-out nav */
.nav-drawer {
  position: fixed;
  inset: 0;
  z-index: 2000;
  pointer-events: none;
  visibility: hidden;
}

.nav-drawer.open {
  pointer-events: auto;
  visibility: visible;
}

.nav-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 31, 61, 0.5);
  opacity: 0;
  transition: opacity var(--transition);
}

.nav-drawer.open .nav-backdrop {
  opacity: 1;
}

.nav-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: min(300px, 85vw);
  height: 100%;
  background: var(--white);
  box-shadow: -8px 0 40px rgba(0, 0, 0, 0.15);
  transform: translateX(100%);
  transition: transform var(--transition);
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
}

.nav-drawer.open .nav-panel {
  transform: translateX(0);
}

.nav-close {
  align-self: flex-start;
  width: 40px;
  height: 40px;
  border: none;
  background: var(--cream);
  border-radius: 10px;
  font-size: 1.4rem;
  cursor: pointer;
  color: var(--navy);
  margin-bottom: 24px;
}

.nav-links {
  list-style: none;
  flex: 1;
}

.nav-links li {
  border-bottom: 1px solid rgba(15, 31, 61, 0.06);
}

.nav-links a {
  display: block;
  padding: 16px 8px;
  font-weight: 600;
  font-size: 1.05rem;
  transition: color 0.2s, padding-right 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--gold-dark);
  padding-right: 16px;
}

/* Hero */
.hero {
  position: relative;
  min-height: 92dvh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
}

.hero-media {
  position: absolute;
  inset: 0;
}

.hero-media img,
.hero-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(15, 31, 61, 0.85) 0%,
    rgba(15, 31, 61, 0.35) 40%,
    rgba(15, 31, 61, 0.15) 70%,
    transparent 100%
  );
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: calc(var(--header-h) + 48px) 20px 56px;
  text-align: center;
}

.hero-title {
  font-size: clamp(1.75rem, 6vw, 2.25rem);
  font-weight: 800;
  color: var(--white);
  line-height: 1.35;
  margin-bottom: 12px;
}

.hero-title .gold {
  color: var(--gold-light);
  display: block;
}

.hero-subtitle {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 0;
  font-weight: 400;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 36px;
  background: linear-gradient(
    135deg,
    var(--burgundy-shine) 0%,
    var(--burgundy) 40%,
    var(--burgundy-dark) 100%
  );
  color: var(--white);
  font-size: 1.05rem;
  font-weight: 700;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  box-shadow:
    0 8px 28px rgba(155, 21, 56, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
  transition: transform 0.2s, box-shadow var(--transition);
}

.btn-primary:active {
  transform: scale(0.98);
}

/* Sections */
.section {
  padding: 48px 0;
  position: relative;
}

.section-header {
  text-align: center;
  padding: 0 20px 28px;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--navy);
}

.section-subtitle {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 8px;
}

/* قسم الشاليهات — خلفية شبكية */
.section-chalets {
  overflow: hidden;
  background: #f8f2f5;
  border-block: 1px solid rgba(155, 21, 56, 0.07);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.chalets-neural-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.9;
}

.section-chalets .amenities-strip,
.section-chalets .section-header,
.section-chalets .carousel-wrap {
  position: relative;
  z-index: 1;
}

/* Chalet carousel */
.carousel-wrap {
  overflow: hidden;
  padding: 0 0 8px;
}

.carousel-track {
  display: flex;
  gap: 12px;
  padding: 0 16px 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scroll-padding-inline: 16px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
  touch-action: pan-x pinch-zoom;
}

.carousel-track::-webkit-scrollbar {
  display: none;
}

.chalet-card {
  flex: 0 0 calc((100% - 12px) / 2.12);
  min-width: 148px;
  max-width: 175px;
  scroll-snap-align: center;
  scroll-snap-stop: always;
  background: var(--white);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid rgba(155, 21, 56, 0.06);
}

@media (min-width: 400px) {
  .chalet-card {
    flex: 0 0 calc((100% - 16px) / 2.08);
    max-width: 185px;
  }
}

.carousel-explore-card {
  flex: 0 0 calc((100% - 12px) / 2.12);
  min-width: 148px;
  max-width: 175px;
  scroll-snap-align: center;
  scroll-snap-stop: always;
  display: flex;
}

.carousel-explore-link {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 20px 14px;
  border-radius: 16px;
  background: linear-gradient(145deg, var(--burgundy-shine) 0%, var(--burgundy) 45%, var(--burgundy-dark) 100%);
  color: var(--white);
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(155, 21, 56, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.15);
  min-height: 100%;
}

.carousel-explore-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 120%, rgba(255, 255, 255, 0.25) 0%, transparent 55%);
  pointer-events: none;
}

.carousel-explore-icon {
  font-size: 1.5rem;
  opacity: 0.9;
  position: relative;
}

.carousel-explore-text {
  font-size: 0.95rem;
  font-weight: 800;
  position: relative;
}

.carousel-explore-sub {
  font-size: 0.72rem;
  opacity: 0.85;
  font-weight: 600;
  position: relative;
}

.carousel-explore-link:active {
  transform: scale(0.98);
}

.chalet-card.recommended {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.chalet-card-img {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
}

.chalet-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.badge-smart {
  position: absolute;
  top: 12px;
  right: 12px;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: var(--white);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: 8px;
}

.chalet-card-body {
  padding: 12px 10px 14px;
}

.chalet-name {
  font-size: 0.82rem;
  font-weight: 800;
  margin-bottom: 4px;
  line-height: 1.35;
}

.chalet-location-tag {
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.carousel-track .chalet-price-line {
  font-size: 0.72rem;
  margin-bottom: 4px;
}

.carousel-track .chalet-link {
  font-size: 0.72rem;
}

.chalets-list .chalet-card {
  flex: none;
  max-width: none;
  width: 100%;
}

.chalets-list .chalet-name {
  font-size: 1.1rem;
}

.chalets-list .chalet-card-body {
  padding: 18px;
}

.chalet-price {
  color: var(--gold-dark);
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 12px;
}

.chalet-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--gold-dark);
  font-weight: 700;
  font-size: 0.9rem;
}

.carousel-dots {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  padding: 14px 0;
  min-height: 28px;
}

.carousel-dots-liquid {
  position: absolute;
  top: 50%;
  left: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  box-shadow: 0 0 14px rgba(214, 169, 68, 0.55), 0 2px 6px rgba(155, 21, 56, 0.2);
  pointer-events: none;
  z-index: 2;
  will-change: transform;
  transition: width 0.35s cubic-bezier(0.34, 1.2, 0.64, 1), height 0.35s cubic-bezier(0.34, 1.2, 0.64, 1);
}

.carousel-dot {
  position: relative;
  z-index: 1;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  padding: 0;
  background: rgba(15, 31, 61, 0.18);
  cursor: pointer;
  transition: background 0.25s ease, transform 0.25s ease;
}

.carousel-dot.active {
  background: rgba(15, 31, 61, 0.08);
  transform: scale(1.05);
}

.carousel-dots:has(.carousel-dot:active) .carousel-dots-liquid {
  width: 12px;
  height: 12px;
}

/* Experience circles */
.experience-grid {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 0;
  padding: 20px 12px 0;
  max-width: 400px;
  margin: 0 auto;
}

.experience-item {
  flex: 1;
  text-align: center;
  position: relative;
  z-index: 1;
}

.experience-item:nth-child(2) {
  z-index: 3;
  margin-top: -12px;
}

.experience-item:nth-child(1),
.experience-item:nth-child(3) {
  z-index: 2;
}

.experience-circle {
  width: 100px;
  height: 100px;
  margin: 0 auto 12px;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid var(--white);
  box-shadow: var(--shadow);
  position: relative;
}

.experience-item:nth-child(2) .experience-circle {
  width: 115px;
  height: 115px;
  border-color: var(--gold-light);
}

.experience-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.experience-icon {
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: var(--white);
  border: 2px solid var(--white);
}

.experience-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.4;
  padding: 0 4px;
}

/* Smart finder widget */
.smart-finder {
  margin: 0 20px 32px;
  padding: 20px;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.smart-finder h3 {
  font-size: 1rem;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.smart-finder h3::before {
  content: "✦";
  color: var(--gold);
}

.preference-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.chip {
  padding: 8px 14px;
  border: 2px solid rgba(15, 31, 61, 0.12);
  border-radius: 999px;
  background: transparent;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--navy);
}

.chip.active {
  border-color: var(--gold);
  background: rgba(201, 168, 76, 0.12);
  color: var(--gold-dark);
}

.smart-result {
  font-size: 0.9rem;
  color: var(--text-muted);
  min-height: 1.5em;
}

.smart-result strong {
  color: var(--gold-dark);
}

/* Footer */
.site-footer {
  background: var(--white);
  border-top: 3px solid var(--gold);
  padding: 32px 20px calc(80px + var(--safe-bottom));
  text-align: center;
}

.footer-logo {
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 20px;
}

.footer-logo span {
  color: var(--gold);
}

.footer-contact h4 {
  font-size: 1rem;
  margin-bottom: 16px;
  color: var(--navy);
}

.contact-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 12px;
  font-weight: 600;
}

.contact-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 1rem;
}

/* أزرار عائمة — ماسنجر + مساعد */
.fab-dock {
  --fab-bottom-offset: 0px;
  position: fixed;
  bottom: calc(16px + var(--safe-bottom) + var(--fab-bottom-offset));
  left: max(16px, env(safe-area-inset-left, 0px));
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  backface-visibility: hidden;
  pointer-events: none;
}

.fab-dock > a {
  pointer-events: auto;
}

.fab-dock--detail {
  bottom: calc(20px + var(--safe-bottom) + var(--fab-bottom-offset));
}

.fab-dock--pulse .fab-messenger,
.fab-dock--pulse .fab-assistant {
  animation: fabTapPulse 0.38s ease;
}

@keyframes fabTapPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(0.92); }
}

.fab-messenger,
.fab-assistant {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.18);
  transition: transform 0.15s ease;
  position: relative;
}

.fab-messenger {
  background: linear-gradient(135deg, #0084ff, #006aff);
  color: #fff;
}

.fab-messenger svg {
  width: 26px;
  height: 26px;
}

.fab-assistant {
  background: linear-gradient(145deg, #9e2a50 0%, #5a1228 55%, #3d0d1c 100%);
  border: 2px solid rgba(255, 255, 255, 0.4);
  box-shadow:
    0 6px 22px rgba(123, 30, 58, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.fab-assistant svg {
  width: 28px;
  height: 28px;
}

.fab-messenger:active,
.fab-assistant:active {
  transform: scale(0.94);
}

.fab-assistant-label {
  display: none;
}

body.page-assistant .fab-dock {
  display: none;
}

body.page-chalet-detail {
  padding-bottom: 0;
}

/* Inner pages */
.page-hero-sm {
  padding: calc(var(--header-h) + 32px) 20px 32px;
  text-align: center;
  background: linear-gradient(180deg, var(--navy) 0%, var(--navy-soft) 100%);
  color: var(--white);
}

.page-hero-sm h1 {
  font-size: 1.6rem;
  font-weight: 800;
}

.page-hero-sm p {
  opacity: 0.85;
  margin-top: 8px;
  font-size: 0.95rem;
}

.container {
  padding: 0 20px;
  max-width: 480px;
  margin: 0 auto;
}

/* Gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  padding: 24px 0;
}

.gallery-item {
  border-radius: 14px;
  overflow: hidden;
  aspect-ratio: 1;
  position: relative;
  cursor: pointer;
  background: var(--navy);
}

.gallery-item.wide {
  grid-column: span 2;
  aspect-ratio: 16/9;
}

.gallery-item img,
.gallery-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-item .play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 31, 61, 0.35);
}

.play-overlay span {
  width: 48px;
  height: 48px;
  background: var(--gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 1.2rem;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 3000;
  background: rgba(0, 0, 0, 0.95);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.lightbox.open {
  display: flex;
}

.lightbox img,
.lightbox video {
  max-width: 100%;
  max-height: 90dvh;
  border-radius: 8px;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 44px;
  height: 44px;
  border: none;
  background: rgba(255, 255, 255, 0.15);
  color: white;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  z-index: 10;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border: none;
  background: linear-gradient(135deg, var(--burgundy-shine), var(--burgundy-dark));
  color: var(--white);
  font-size: 1.75rem;
  line-height: 1;
  border-radius: 50%;
  cursor: pointer;
  z-index: 10;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

.lightbox-nav:disabled {
  opacity: 0.35;
  cursor: default;
}

.lightbox-prev {
  right: 16px;
}

.lightbox-next {
  left: 16px;
}

.lightbox-counter {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--white);
  font-size: 0.9rem;
  background: rgba(0, 0, 0, 0.5);
  padding: 6px 14px;
  border-radius: 999px;
}

.chalet-notice-title {
  font-weight: 800;
  color: var(--burgundy);
  font-size: 1rem;
  margin: 16px 0 6px;
}

.chalet-notice-sub {
  font-size: 0.85rem;
  color: var(--burgundy);
  margin-bottom: 16px;
}

.families-only {
  font-weight: 700;
  color: var(--burgundy-dark);
  margin: 16px 0;
  padding: 10px 14px;
  background: rgba(123, 30, 58, 0.08);
  border-radius: 10px;
  border-right: 4px solid var(--burgundy);
}

.chalet-price-line {
  font-weight: 700;
  color: var(--navy);
  margin: 12px 0;
  font-size: 1rem;
}

.chalet-price-line .price-value {
  color: var(--burgundy);
  min-width: 2ch;
  display: inline-block;
}

.detail-price-box {
  margin: 16px 0;
  padding: 14px 18px;
  background: var(--white);
  border-radius: 12px;
  border: 2px solid rgba(123, 30, 58, 0.2);
  font-weight: 700;
}

.detail-price-box .price-value {
  color: var(--burgundy);
  font-size: 1.15rem;
}

.gallery-item-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  background: linear-gradient(135deg, var(--burgundy-shine), var(--burgundy-dark));
  color: var(--white);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 6px;
}

.gallery-loading,
.gallery-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 32px 16px;
  color: var(--text-muted);
}

.gallery-status {
  text-align: center;
  font-size: 0.85rem;
  color: var(--burgundy);
  margin-bottom: 16px;
  font-weight: 600;
}

/* Detail page */
.detail-hero {
  position: relative;
  height: 50dvh;
  min-height: 280px;
}

.detail-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-hero .back-btn {
  position: absolute;
  top: calc(var(--header-h) + 8px);
  right: 16px;
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  z-index: 10;
}

.detail-content {
  background: var(--white);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  margin-top: -24px;
  position: relative;
  padding: 28px 20px calc(96px + var(--safe-bottom));
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 16px 0;
}

.meta-tag {
  padding: 6px 12px;
  background: var(--cream);
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
}

.availability-bar {
  height: 8px;
  background: rgba(15, 31, 61, 0.1);
  border-radius: 4px;
  overflow: hidden;
  margin: 12px 0;
}

.availability-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold), #4caf50);
  border-radius: 4px;
  transition: width 0.8s ease;
}

.features-list {
  list-style: none;
  margin: 20px 0;
}

.features-list li {
  padding: 10px 0;
  border-bottom: 1px solid rgba(15, 31, 61, 0.06);
  display: flex;
  align-items: center;
  gap: 10px;
}

.features-list li::before {
  content: "✓";
  color: var(--gold);
  font-weight: 800;
}

.booking-sticky {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 16px 20px calc(16px + var(--safe-bottom));
  background: var(--white);
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  z-index: 100;
}

.booking-price {
  font-weight: 800;
  font-size: 1.1rem;
}

.booking-price small {
  display: block;
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--text-muted);
}

/* Filters */
.filter-bar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 16px 20px;
  scrollbar-width: none;
}

.filter-btn {
  flex-shrink: 0;
  padding: 10px 18px;
  border: 2px solid rgba(15, 31, 61, 0.12);
  border-radius: 999px;
  background: var(--white);
  font-family: inherit;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
}

.filter-btn.active {
  border-color: var(--gold);
  background: var(--gold);
  color: var(--white);
}

.chalets-list {
  padding: 0 20px calc(88px + var(--safe-bottom));
  display: flex;
  flex-direction: column;
  gap: 20px;
}

@media (max-width: 900px) {
  .chalets-neural-bg {
    opacity: 0.45;
  }

  .fab-messenger,
  .fab-assistant {
    width: 48px;
    height: 48px;
  }

  .site-footer {
    padding-bottom: calc(72px + var(--safe-bottom));
  }
}

/* إزالة أنيميشن الظهور عند السكرول */
.reveal,
.reveal.visible {
  opacity: 1;
  transform: none;
}

/* خانات الصور المرقّمة */
.chalet-photos-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 12px;
}

.chalet-photo-slot {
  position: relative;
  aspect-ratio: 1;
  border-radius: 14px;
  overflow: hidden;
  background: linear-gradient(145deg, var(--navy-soft), var(--navy));
  border: 2px dashed rgba(123, 30, 58, 0.4);
  cursor: pointer;
}

.chalet-photo-slot:first-child {
  grid-column: span 2;
  aspect-ratio: 16/9;
}

.chalet-photo-slot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.chalet-photo-slot img.is-hidden {
  display: none;
}

.photo-slot-num {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  min-width: 28px;
  height: 28px;
  padding: 0 8px;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: var(--white);
  font-weight: 800;
  font-size: 0.85rem;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.photo-slot-placeholder {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 12px;
  text-align: center;
  color: var(--gold-light);
  font-size: 0.8rem;
  gap: 6px;
}

.photo-slot-placeholder.show {
  display: flex;
}

.photo-slot-placeholder strong {
  color: var(--white);
  font-size: 1rem;
}

.photo-slot-placeholder small {
  font-size: 0.65rem;
  opacity: 0.7;
  word-break: break-all;
  direction: ltr;
}

.chalet-card-img .img-missing,
.detail-hero .img-missing {
  min-height: 200px;
  background: linear-gradient(145deg, var(--navy-soft), var(--navy));
}

/* Loading skeleton */
.skeleton {
  background: linear-gradient(90deg, #eee 25%, #f5f5f5 50%, #eee 75%);
  background-size: 200% 100%;
  animation: skeleton 1.2s ease-in-out infinite;
}

@keyframes skeleton {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* المساعد الذكي — شات بوب أب + كتابة */
.chat-page {
  padding-bottom: 100px;
}

.chat-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.chat-chip {
  padding: 8px 12px;
  border: 2px solid rgba(123, 30, 58, 0.25);
  border-radius: 999px;
  background: var(--white);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--burgundy-dark);
  cursor: pointer;
  transition: transform 0.15s, background 0.2s;
}

.chat-chip:active {
  transform: scale(0.97);
}

.chat-shell {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
  border: 1px solid rgba(123, 30, 58, 0.1);
}

.chat-log {
  min-height: 320px;
  max-height: 52dvh;
  overflow-y: auto;
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  scroll-behavior: smooth;
}

.chat-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: 92%;
}

.chat-row-user {
  align-self: flex-end;
  align-items: flex-end;
}

.chat-row-bot {
  align-self: flex-start;
  align-items: flex-start;
}

.chat-label {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-muted);
  padding: 0 6px;
}

.chat-row-user .chat-label {
  color: var(--burgundy);
}

.chat-bubble {
  padding: 12px 16px;
  border-radius: 18px;
  font-size: 0.95rem;
  line-height: 1.55;
  box-shadow: 0 4px 14px rgba(15, 31, 61, 0.08);
  white-space: pre-wrap;
  word-break: break-word;
  animation: chatPop 0.22s ease-out;
}

@keyframes chatPop {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.chat-user {
  background: linear-gradient(135deg, var(--burgundy-shine), var(--burgundy-dark));
  color: var(--white);
  border-bottom-left-radius: 4px;
}

.chat-bot {
  background: linear-gradient(180deg, #fff 0%, var(--cream) 100%);
  color: var(--navy);
  border: 1px solid rgba(123, 30, 58, 0.12);
  border-bottom-right-radius: 4px;
}

.chat-typing-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 0 14px 10px;
}

.chat-typing-row[hidden] {
  display: none !important;
}

.chat-typing-bubble {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
}

.typing-dots {
  display: flex;
  gap: 4px;
}

.typing-dots span {
  width: 7px;
  height: 7px;
  background: var(--burgundy);
  border-radius: 50%;
  animation: typingBounce 1s ease-in-out infinite;
}

.typing-dots span:nth-child(2) { animation-delay: 0.15s; }
.typing-dots span:nth-child(3) { animation-delay: 0.3s; }

@keyframes typingBounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
  30% { transform: translateY(-5px); opacity: 1; }
}

.typing-text {
  font-size: 0.8rem;
  color: var(--burgundy-dark);
  font-weight: 600;
}

.chat-form {
  display: flex;
  gap: 8px;
  padding: 12px 14px 14px;
  border-top: 1px solid rgba(123, 30, 58, 0.1);
  background: var(--cream);
}

.chat-form input {
  flex: 1;
  padding: 14px 16px;
  border: 2px solid rgba(123, 30, 58, 0.2);
  border-radius: 12px;
  font-family: inherit;
  font-size: 1rem;
  background: var(--white);
}

.chat-form input:focus {
  outline: none;
  border-color: var(--burgundy);
}

.chat-form input:disabled {
  opacity: 0.65;
}

.chat-form .btn-primary {
  padding: 14px 18px;
  flex-shrink: 0;
}

.chat-note {
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 12px;
}

/* مرافق المنتجع */
.amenities-strip {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin: 0 16px 20px;
  padding: 14px 12px;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  border: 1px solid rgba(123, 30, 58, 0.08);
}

.amenity-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--navy);
}

.amenity-icon {
  font-size: 1.25rem;
  line-height: 1;
}

/* معرض الصور — شاليه */
.photo-carousel {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

.photo-carousel-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.photo-carousel-viewport {
  flex: 1;
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 16/10;
  background: var(--navy-soft);
  cursor: pointer;
}

.photo-carousel-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-carousel-counter {
  position: absolute;
  bottom: 10px;
  left: 10px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
}

.photo-carousel-btn {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: var(--white);
  color: var(--burgundy);
  font-size: 1.4rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow);
  line-height: 1;
}

.photo-carousel-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  width: 100%;
  margin-top: 10px;
}

.photo-carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background: rgba(15, 31, 61, 0.2);
  cursor: pointer;
  padding: 0;
}

.photo-carousel-dot.active {
  background: var(--burgundy);
  transform: scale(1.15);
}

.detail-location-tag {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: -4px 0 12px;
}

.detail-subtitle {
  font-size: 1rem;
  margin: 8px 0 12px;
}

.detail-hint {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.detail-gallery-link {
  margin-top: 20px;
  font-size: 0.85rem;
}

.footer-phone {
  display: inline-block;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--burgundy);
  direction: ltr;
  unicode-bidi: embed;
}

.footer-phone:active {
  opacity: 0.8;
}

/* تحميل المعرض */
.gallery-loader {
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px 20px;
}

.gallery-loader-text {
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--navy);
}

.gallery-progress-track {
  height: 8px;
  background: rgba(15, 31, 61, 0.1);
  border-radius: 999px;
  overflow: hidden;
  max-width: 280px;
  margin: 0 auto 10px;
}

.gallery-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--burgundy), var(--burgundy-light));
  border-radius: 999px;
  transition: width 0.15s ease;
}

.gallery-progress-pct {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--burgundy);
}
