/* ======================================
   Custom Styles — LTR base
   ====================================== */

/* --- Hero Section --- */
.hero-section {
  display: flex;
  flex-direction: column;
}

.hero-content-area {
  flex: 1 1 auto;
}

@media (max-width: 767.98px) {
  /* Reduce the filter bar translateY so it doesn't create a large empty gap */
  .hero-section > .position-relative {
    transform: translateY(20%) !important;
  }
  /* Adjust the next section's top padding to match the reduced overflow */
  .hero-section + section {
    padding-top: 5rem !important;
  }
}

/* --- Hero Filter Bar --- */
.hero-filter-bar {
  overflow: hidden;
}

.hero-badge {
  background: rgba(212, 168, 68, 0.15);
  color: var(--bs-yellow);
  border: 1px solid rgba(212, 168, 68, 0.35);
}

.hero-title {
  font-size: clamp(1.2rem, 2.8vw, 1.8rem);
}

.hero-accent-bar {
  width: 56px;
  height: 4px;
  background: var(--bs-yellow);
}

.hero-stat-number {
  font-size: 1.8rem;
  line-height: 1.1;
}

.hero-stat-label {
  color: rgba(255, 255, 255, 0.6);
}

.hero-stat-divider {
  width: 1px;
  height: 44px;
  background: rgba(255, 255, 255, 0.2);
  flex-shrink: 0;
}

.hero-avatar-label {
  color: rgba(255, 255, 255, 0.65);
}

.hero-avatars {
  direction: ltr;
}

.hero-avatar-img {
  width: 34px;
  height: 34px;
  object-fit: cover;
  margin-left: -10px;
}

.hero-avatar-more {
  font-size: 0.7rem;
}

/* ======================================
   Chalet Cards
   ====================================== */
.chalet-card h6 a {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chalet-card {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.07);
  transition:
    box-shadow 0.3s ease,
    transform 0.3s ease;
}

.chalet-card:hover {
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.13);
  transform: translateY(-4px);
}

.chalet-card > .position-relative {
  height: 200px;
  flex-shrink: 0;
}

.chalet-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.chalet-card:hover .chalet-card-img {
  transform: scale(1.05);
}

.chalet-card-fav {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  transition: background 0.2s ease;
}

.chalet-card-fav:hover {
  background: var(--bs-primary) !important;
}

.chalet-card-fav:hover i {
  color: #fff !important;
}

/* ======================================
   Browse by Type — Category Cards
   ====================================== */
.category-card {
  background: #fff;
  border: 2px solid #f0f0f0;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
  transition:
    transform 0.28s ease,
    border-color 0.28s ease,
    box-shadow 0.28s ease;
  cursor: pointer;
}

.category-card:hover {
  transform: translateY(-6px);
  border-color: var(--bs-primary);
  box-shadow: 0 16px 40px rgba(44, 107, 79, 0.14);
}

.category-icon {
  font-size: 2.6rem;
  line-height: 1;
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(44, 107, 79, 0.08);
  border-radius: 50%;
  transition: background 0.28s ease;
}

.category-card:hover .category-icon {
  background: rgba(44, 107, 79, 0.16);
}

/* ======================================
   Flatpickr — primary colour theme
   ====================================== */
.flatpickr-months .flatpickr-month,
.flatpickr-weekdays,
.flatpickr-weekday {
  background: var(--bs-primary) !important;
  color: #fff !important;
}

.flatpickr-current-month .flatpickr-monthDropdown-months,
.flatpickr-current-month input.cur-year {
  color: #fff;
}

.flatpickr-months .flatpickr-prev-month svg,
.flatpickr-months .flatpickr-next-month svg {
  fill: #fff;
}

.flatpickr-months .flatpickr-prev-month:hover svg,
.flatpickr-months .flatpickr-next-month:hover svg {
  fill: var(--bs-yellow);
}

.flatpickr-day.selected,
.flatpickr-day.startRange,
.flatpickr-day.endRange,
.flatpickr-day.selected:hover,
.flatpickr-day.startRange:hover,
.flatpickr-day.endRange:hover,
.flatpickr-day.selected:focus,
.flatpickr-day.startRange:focus,
.flatpickr-day.endRange:focus {
  background: var(--bs-primary);
  border-color: var(--bs-primary);
  color: #fff;
}

.flatpickr-day.inRange {
  background: rgba(44, 107, 79, 0.12);
  border-color: rgba(44, 107, 79, 0.12);
  box-shadow:
    -5px 0 0 rgba(44, 107, 79, 0.12),
    5px 0 0 rgba(44, 107, 79, 0.12);
}

.flatpickr-day.today {
  border-color: var(--bs-primary);
}

.flatpickr-day.today:hover {
  background: var(--bs-primary);
  color: #fff;
}

.flatpickr-calendar {
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
  border: none;
  font-family: "Cairo", sans-serif !important;
}

/* ======================================
   Font Override — Cairo
   ====================================== */
body,
h1,
h2,
h3,
h4,
h5,
h6,
p,
a,
span,
div,
li,
ul {
  font-family: "Cairo", sans-serif !important;
}

/* ======================================
   Double Range Slider
   ====================================== */
.price-range-slider {
  position: relative;
  width: 100%;
}

.range-container {
  position: relative;
  width: 100%;
  height: 24px;
  display: flex;
  align-items: center;
  direction: ltr;
}

.thumb {
  position: absolute;
  width: 100%;
  height: 24px;
  top: 0;
  background: none;
  pointer-events: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

.thumb::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--bs-primary);
  cursor: pointer;
  pointer-events: all;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  border: 2px solid #fff;
  transition:
    background 0.3s ease,
    box-shadow 0.3s ease;
}

.thumb::-webkit-slider-thumb:hover {
  background: #0d7e3a;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.thumb::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--bs-primary);
  cursor: pointer;
  pointer-events: all;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  border: 2px solid #fff;
  transition:
    background 0.3s ease,
    box-shadow 0.3s ease;
}

.thumb::-moz-range-thumb:hover {
  background: #0d7e3a;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.thumb::-webkit-slider-runnable-track,
.thumb::-moz-range-track {
  background: none;
  border: none;
}

.range-track {
  position: absolute;
  left: 0;
  right: 0;
  height: 5px;
  border-radius: 3px;
  background: #e9ecef;
  pointer-events: none;
  z-index: 1;
  top: 50%;
  transform: translateY(-50%);
}

.range-progress {
  position: absolute;
  height: 5px;
  border-radius: 3px;
  background: linear-gradient(90deg, #0b9a4a, #0d7e3a);
  pointer-events: none;
  z-index: 2;
  top: 50%;
  transform: translateY(-50%);
}

.thumb--min {
  z-index: 5;
}
.thumb--max {
  z-index: 4;
}

/* ======================================
   Chalet Detail — Tabs
   ====================================== */
#chaletTabs .nav-link {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: #4a5568;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease;
}

#chaletTabs .nav-link i {
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

#chaletTabs .nav-link:hover:not(.active) {
  background: #e8f0fe;
  border-color: var(--bs-primary);
  color: var(--bs-primary);
}

#chaletTabs .nav-link:hover:not(.active) i,
#chaletTabs .nav-link.active i {
  opacity: 1;
}

#chaletTabs .nav-link.active {
  background: var(--bs-primary);
  border-color: var(--bs-primary);
  color: #fff;
}

.chalet-tab-item {
  flex: 1 1 0;
  min-width: 0;
}

.chalet-tab-btn {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  white-space: nowrap;
}

@media (max-width: 575.98px) {
  .chalet-tab-btn {
    font-size: 11px !important;
    padding: 6px 4px !important;
    gap: 3px;
  }

  .chalet-tab-btn i {
    font-size: 13px;
  }
}

/* ======================================
   Mega Menu
   ====================================== */
.dropdown-menu.mega-menu .dropdown-item {
  white-space: normal !important;
  word-break: break-word;
}

/* ======================================
   Mobile — Fixed bottom CTA
   ====================================== */
@media (max-width: 991.98px) {
  body {
    padding-bottom: 76px;
  }
}

/* ======================================
   Font Override — Cairo
   ====================================== */
body,
h1,
h2,
h3,
h4,
h5,
h6,
p,
a,
span,
div,
li,
ul {
  font-family: "Cairo", sans-serif !important;
}

/* ======================================
   Mega Menu — Dropdown Items
   ====================================== */
.dropdown-menu.mega-menu .dropdown-item {
  white-space: normal !important;
  word-wrap: break-word;
  line-height: 1.6;
}


.select2-container--bootstrap-5 .select2-dropdown .select2-results__options .select2-results__option {
  padding: .250rem .75rem !important;
  font-size: 0.7rem !important;
  font-weight: 400 !important;
  line-height: 1.2 !important;
}

.select2-container--bootstrap-5 .select2-dropdown .select2-search .select2-search__field
{
  padding: .250rem .75rem !important;
  height: 33px !important;
}

/* ======================================
   Booking Widget — Slot Chips & Date Field
   (Compact horizontal slot picker + prominent date input)
   ====================================== */

/* -- Slot Chips Container -- */
.slot-chips {
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 2px;
}
.slot-chips::-webkit-scrollbar { height: 4px; }
.slot-chips::-webkit-scrollbar-thumb { background: var(--bs-primary); border-radius: 4px; }

/* -- Single Slot Chip -- */
.slot-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.45rem 0.8rem;
  border: 1.5px solid #dce0e6;
  border-radius: 999px;
  background: #fff;
  color: #4a5360;
  font-size: 0.7rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
  white-space: nowrap;
  user-select: none;
  margin: 0;
}
.slot-chip:hover {
  border-color: var(--bs-primary);
  color: var(--bs-primary);
  transform: translateY(-1px);
}
.slot-chip.active {
  background: var(--bs-primary);
  border-color: var(--bs-primary);
  color: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}
.slot-chip:focus-visible {
  outline: 2px solid var(--bs-primary);
  outline-offset: 2px;
}
.slot-chip .slot-chip-label { line-height: 1; }

/* -- Selected Slot Info Card -- */
.selected-slot-info {
  background: #f7f9fb;
  border: 1px dashed #d5dbe2;
  border-radius: 10px;
  padding: 0.5rem 0.75rem;
}

/* -- Prominent Date Field -- */
.date-field-wrapper {
  position: relative;
}
.date-field-icon {
  position: absolute;
  top: 50%;
  inset-inline-start: 0.9rem;
  transform: translateY(-50%);
  color: var(--bs-primary);
  font-size: 1.1rem;
  pointer-events: none;
  z-index: 2;
}
.date-field-input {
  padding-inline-start: 2.5rem !important;
  padding-inline-end: 0.9rem !important;
  height: 48px;
  font-size: 0.9rem;
  font-weight: 600;
  background: #fff !important;
  border: 1.5px solid #d5dbe2 !important;
  border-radius: 10px !important;
  cursor: pointer;
  color: #212529 !important;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.date-field-input::placeholder {
  color: #8a94a3;
  font-weight: 500;
}
.date-field-input:focus,
.date-field-input:hover {
  border-color: var(--bs-primary) !important;
  box-shadow: 0 0 0 0.15rem rgba(var(--bs-primary-rgb), 0.12) !important;
}

/* -- Mobile tweaks -- */
@media (max-width: 576px) {
  .slot-chip { padding: 0.4rem 0.75rem; font-size: 0.75rem; }
  .date-field-input { height: 46px; font-size: 0.88rem; }
}

/* ======================================
   Booking Start — Compact Property Summary Card
   (Small secondary card beside the main booking widget)
   ====================================== */
.property-mini-card .property-mini-thumb {
  width: 96px;
  height: 96px;
  object-fit: cover;
}
.property-mini-card .min-w-0 { min-width: 0; } /* يسمح بـ text-truncate داخل flex */

@media (max-width: 991.98px) {
  /* على الشاشات الأصغر من lg تظهر البطاقة بعرض كامل → صورة أطول قليلاً */
  .property-mini-card .property-mini-thumb {
    width: 110px;
    height: 110px;
  }
}

@media (max-width: 420px) {
  .property-mini-card .property-mini-thumb {
    width: 84px;
    height: 84px;
  }
}

/* -- Back-to-details button inside the mini card -- */
.property-mini-card .property-mini-back {
  background: #f7f9fb;
  color: var(--bs-primary);
  transition: background 0.18s ease, color 0.18s ease;
}
.property-mini-card .property-mini-back:hover,
.property-mini-card .property-mini-back:focus-visible {
  background: var(--bs-primary);
  color: #fff;
}

.form-label {
  margin-bottom: 0.5rem;
  color: #202020;
}

.form-select-sm~.select2-container--bootstrap-5 .select2-selection {
  min-height: calc(1.5em + .5rem + 2px);
  padding: .25rem .5rem;
  font-size: .725rem !important;
}

/* match select2 size to standard form-control */
.select2-container--bootstrap-5 .select2-selection {
  min-height: calc(1.5em + 0.75rem + 2px) !important;
  font-size: 0.875rem !important;
  padding-top: 0.375rem !important;
  padding-bottom: 0.375rem !important;
}
.select2-container--bootstrap-5 .select2-selection--single .select2-selection__rendered {
  font-size: 0.875rem !important;
  line-height: 1.5 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

.select2-container--bootstrap-5 .select2-selection--single .select2-selection__rendered .select2-selection__placeholder {
  color: #292929 !important;
}

@media (min-width: 992px) {
  .navbar-expand-lg .navbar-nav .nav-link {
      padding-left: 12px;
      padding-right: 12px;
      font-size: 14px;
  }
}

.form-check-input{
  border: 1px solid rgba(8, 130, 67, 0.761);
}


/* ======================================
   Frontend Forms — Compact Input Size
   تصغير الحقول لتتناسب مع تصميم الفرونت اند
   ====================================== */
.form-control,
.form-select,
.input-group-text {
  font-size: 0.875rem !important;
  padding: 0.375rem 0.75rem !important;
  height: auto !important;
  min-height: unset !important;
  line-height: 1.5 !important;
}

.input-group .form-control,
.input-group .input-group-text {
  font-size: 0.875rem !important;
  padding: 0.375rem 0.75rem !important;
}

/* Select2 — نفس حجم form-control */
.select2-container--bootstrap-5 .select2-selection {
  min-height: calc(1.5em + 0.75rem + 2px) !important;
  font-size: 0.875rem !important;
  padding: 0.375rem 0.75rem !important;
}
.select2-container--bootstrap-5 .select2-selection--single .select2-selection__rendered {
  font-size: 0.875rem !important;
  line-height: 1.5 !important;
  padding: 0 !important;
}
.select2-container--bootstrap-5 .select2-selection--single .select2-selection__arrow {
  top: 50% !important;
  transform: translateY(-50%) !important;
}
