/* ===== SAFAREJA — BASE STYLES ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  direction: rtl;
  text-align: right;
  transition: background 0.3s ease, color 0.3s ease;
  overscroll-behavior: none;
}

a { text-decoration: none; color: inherit; }
button { cursor: pointer; border: none; outline: none; font-family: var(--font); }
input { font-family: var(--font); outline: none; border: none; background: transparent; }
img { display: block; width: 100%; object-fit: cover; }

/* ===== TOPBAR ===== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--top-height);
  padding: 0 20px;
  background: var(--bg-nav);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.topbar__logo {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--text);
  letter-spacing: -0.5px;
}
.topbar__logo span {
  color: var(--accent);
}

.topbar__actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: var(--ease);
  position: relative;
}
.icon-btn:hover { background: var(--accent); color: white; transform: scale(1.05); }

.notification-btn { position: relative; }
.notif-dot {
  position: absolute;
  top: 7px; right: 7px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent-warm);
  border: 2px solid var(--bg-card);
}

/* ===== MAIN SCROLL ===== */
.main-scroll {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
}
.main-scroll::-webkit-scrollbar { display: none; }

/* ===== HERO ===== */
.hero-section {
  padding: 28px 20px 20px;
  background: linear-gradient(160deg, var(--accent) 0%, var(--accent-light) 60%, var(--bg) 100%);
  position: relative;
  overflow: hidden;
}
.hero-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 80% 20%, rgba(255,255,255,0.15) 0%, transparent 60%);
  pointer-events: none;
}

.hero-sub {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.75);
  margin-bottom: 4px;
  font-weight: 400;
}

.hero-title {
  font-size: 1.65rem;
  font-weight: 900;
  color: #fff;
  line-height: 1.3;
  margin-bottom: 22px;
}

/* ===== SEARCH CARD ===== */
.search-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 6px;
  box-shadow: var(--shadow-lg);
  margin-bottom: -24px;
  position: relative;
  z-index: 2;
}

.search-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
}

.search-icon { font-size: 1.1rem; flex-shrink: 0; }

.search-input {
  flex: 1;
  font-size: 0.9rem;
  color: var(--text);
  background: transparent;
}
.search-input::placeholder { color: var(--text-light); }

.search-divider {
  height: 1px;
  background: var(--border);
  margin: 0 14px;
}

.search-btn {
  width: 100%;
  padding: 14px;
  background: var(--accent);
  color: white;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 700;
  margin-top: 6px;
  transition: var(--ease);
  letter-spacing: 0.3px;
}
.search-btn:hover { background: var(--accent-light); transform: translateY(-1px); }
.search-btn:active { transform: translateY(0); }

/* ===== SECTIONS ===== */
.section-wrap { padding: 32px 20px 0; }

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.section-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text);
}

.see-all {
  font-size: 0.8rem;
  color: var(--accent);
  font-weight: 500;
}

/* ===== FILTER CHIPS ===== */
.filter-scroll {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 6px;
  -webkit-overflow-scrolling: touch;
  flex-direction: row-reverse;
}
.filter-scroll::-webkit-scrollbar { display: none; }

.filter-chip {
  flex-shrink: 0;
  padding: 8px 18px;
  border-radius: 30px;
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: var(--ease);
  white-space: nowrap;
}
.filter-chip:hover,
.filter-chip.active {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

/* ===== VILLA CARDS ===== */
.villa-scroll {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 4px;
  flex-direction: row-reverse;
  -webkit-overflow-scrolling: touch;
}
.villa-scroll::-webkit-scrollbar { display: none; }

.villa-card {
  flex-shrink: 0;
  width: 220px;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  cursor: pointer;
}
.villa-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }

.villa-img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-warm) 100%);
  position: relative;
  overflow: hidden;
}

.villa-img-placeholder {
  width: 100%;
  height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
}

.villa-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--accent-warm);
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
}

.villa-fav {
  position: absolute;
  top: 8px;
  left: 10px;
  font-size: 1.2rem;
  cursor: pointer;
}

.villa-body { padding: 14px; }

.villa-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.villa-loc {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 10px;
}
.villa-loc::before { content: '📍 '; }

.villa-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.villa-price {
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--accent);
}
.villa-price span { font-size: 0.7rem; font-weight: 400; color: var(--text-muted); }

.villa-rating {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: 0.78rem;
  color: var(--text-muted);
}
.villa-rating::before { content: '⭐'; font-size: 0.75rem; }

/* ===== DESTINATIONS GRID ===== */
.dest-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.dest-card {
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
  aspect-ratio: 4/3;
  cursor: pointer;
}
.dest-card:first-child {
  grid-column: span 2;
  aspect-ratio: 16/7;
}

.dest-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.dest-card:hover .dest-img { transform: scale(1.05); }

.dest-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.65) 0%, transparent 50%);
  display: flex;
  align-items: flex-end;
  padding: 14px;
}

.dest-name {
  font-size: 0.95rem;
  font-weight: 800;
  color: white;
}
.dest-count {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.75);
}

/* ===== BOTTOM NAV ===== */
.bottom-nav {
  position: sticky;
  bottom: 0;
  z-index: 50;
  display: flex;
  background: var(--bg-nav);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  height: var(--nav-height);
  padding-bottom: env(safe-area-inset-bottom);
}

.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: var(--text-muted);
  transition: var(--ease);
  position: relative;
}

.nav-icon { font-size: 1.3rem; transition: var(--transition); }
.nav-label { font-size: 0.68rem; font-weight: 500; }

.nav-item.active { color: var(--accent); }
.nav-item.active .nav-icon { transform: scale(1.15); }
.nav-item.active::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 32px;
  height: 3px;
  background: var(--accent);
  border-radius: 0 0 4px 4px;
}

.nav-item:hover { color: var(--accent); }
.nav-item:hover .nav-icon { transform: scale(1.1) translateY(-2px); }
