@import url('https://fonts.googleapis.com/css2?family=Heebo:wght@300;400;500;600;700;800&display=swap');

:root {
  --gold: #E76F51;
  --gold-light: #F4A261;
  --dark-blue: #FDF6EC;
  --navy: #FFFFFF;
  --navy-light: #F5EFE6;
  --white: #2C5F6E;
  --gray-light: #FDF6EC;
  --gray: #6B7F8D;
  --text: #2C5F6E;
  --card-bg: #FFFFFF;
  --success: #2A9D8F;
  --danger: #E76F51;
  --accent: #E9C46A;
  --radius: 16px;
  --shadow: 0 4px 20px rgba(0,0,0,0.08);
}

* { margin:0; padding:0; box-sizing:border-box; }

body {
  font-family: 'Heebo', sans-serif;
  background: var(--dark-blue);
  color: var(--text);
  direction: rtl;
  min-height: 100vh;
  overflow-x: hidden;
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
}
body::before {
  content:'';
  position:fixed; top:0; left:0; right:0;
  height: env(safe-area-inset-top);
  background:#000; z-index:10000;
}
html { scrollbar-width: none; -ms-overflow-style: none; }
html::-webkit-scrollbar, body::-webkit-scrollbar { display: none; width: 0; height: 0; }

/* ===== SPLASH SCREEN ===== */
.splash-screen {
  position: fixed; inset:0; z-index:9999;
  background: linear-gradient(135deg, #2C5F6E, #2A9D8F);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  transition: opacity 0.6s, visibility 0.6s;
}
.splash-screen.hidden { opacity:0; visibility:hidden; }
.splash-logo { font-size:3rem; font-weight:800; color:#E9C46A; margin-bottom:0.5rem; }
.splash-sub { color:rgba(255,255,255,0.7); font-size:1.1rem; margin-bottom:2rem; }
.splash-spinner { width:40px; height:40px; border:3px solid rgba(255,255,255,0.2); border-top-color:#E9C46A; border-radius:50%; animation:spin 0.8s linear infinite; }
@keyframes spin { to { transform:rotate(360deg); } }

/* ===== APP LAYOUT ===== */
.app { display:none; flex-direction:column; min-height:100vh; }
.app.active { display:flex; }

/* ===== TOP HEADER ===== */
.top-header {
  background: var(--navy);
  padding: 12px 20px;
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid #E5E7EB;
  position: sticky; top:0; z-index:100;
  backdrop-filter: blur(10px);
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.top-header .logo { font-size:1.3rem; font-weight:700; color:var(--gold); }
.top-header .logo span { color:#2C5F6E; font-weight:400; }
.header-actions { display:flex; gap:12px; align-items:center; }
.header-btn {
  background:none; border:none; color:var(--gray); font-size:1.2rem; cursor:pointer;
  width:36px; height:36px; display:flex; align-items:center; justify-content:center;
  border-radius:50%; transition:all 0.3s;
}
.header-btn:hover { color:var(--gold); background:rgba(212,168,67,0.1); }

/* ===== MAIN CONTENT ===== */
.main-content {
  flex:1; padding-bottom:80px; overflow-y:auto;
}

/* ===== HERO SECTION ===== */
.hero {
  position:relative; height:300px; overflow:hidden;
}
.hero-bg {
  position:absolute; inset:0;
  background-size:cover;
  background-position:center;
  transition: opacity 3s ease;
}
.hero-overlay {
  position:absolute; inset:0;
  background: linear-gradient(to bottom, transparent 40%, rgba(0,0,0,0.75) 100%);
}
.hero-content {
  position:relative; z-index:2; height:100%;
  display:flex; flex-direction:column; justify-content:flex-end;
  padding:30px 20px;
}
.hero-title { font-size:2rem; font-weight:800; color:#FFFFFF; margin-bottom:6px; text-shadow:0 3px 12px rgba(0,0,0,0.7), 0 1px 3px rgba(0,0,0,0.5); }
.hero-title span { color:#E76F51; }
.hero-subtitle { color:#E0E0E0; font-size:1rem; text-shadow:0 1px 4px rgba(0,0,0,0.5); }

/* ===== SEARCH BAR ===== */
.search-container { padding:16px 20px; }
.search-box {
  display:flex; align-items:center; gap:10px;
  background:var(--card-bg); border:1px solid #E5E7EB;
  border-radius:var(--radius); padding:12px 16px;
  transition: border-color 0.3s;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.search-box:focus-within { border-color:var(--gold); }
.search-box i { color:var(--gray); }
.search-box input {
  flex:1; background:none; border:none; outline:none;
  color:var(--text); font-family:'Heebo'; font-size:0.95rem;
  direction:rtl;
}
.search-box input::placeholder { color:var(--gray); }

/* ===== CATEGORIES GRID ===== */
.section-title {
  padding:20px 20px 12px;
  font-size:1.2rem; font-weight:700; color:#2C5F6E;
  display:flex; align-items:center; justify-content:space-between;
}
.section-title a { color:var(--gold); font-size:0.85rem; font-weight:500; text-decoration:none; }

.categories-grid {
  display:grid; grid-template-columns:repeat(4, 1fr);
  gap:12px; padding:0 20px;
}
.category-card {
  display:flex; flex-direction:column; align-items:center; gap:8px;
  padding:16px 8px; background:var(--card-bg);
  border-radius:var(--radius); cursor:pointer;
  transition:all 0.3s; border:1px solid #E5E7EB;
  text-decoration:none; color:inherit;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.category-card:hover { border-color:#E76F51; transform:translateY(-2px); box-shadow:0 4px 12px rgba(231,111,81,0.15); }
.category-icon {
  width:48px; height:48px; border-radius:12px;
  display:flex; align-items:center; justify-content:center;
  font-size:1.4rem;
  background:linear-gradient(135deg, rgba(44,95,110,0.1), rgba(42,157,143,0.08));
  color:#2C5F6E;
}
.category-card span { font-size:0.8rem; font-weight:500; color:var(--gray); text-align:center; }

/* ===== LISTING CARDS ===== */
.cards-scroll {
  display:flex; gap:14px; padding:0 20px;
  overflow-x:auto; scroll-snap-type:x mandatory;
  -webkit-overflow-scrolling:touch;
  scrollbar-width:none;
}
.cards-scroll::-webkit-scrollbar { display:none; }

.listing-card {
  min-width:260px; scroll-snap-align:start;
  background:var(--card-bg); border-radius:6px;
  overflow:hidden; cursor:pointer;
  transition:all 0.3s; border:1px solid #E5E7EB;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.listing-card:hover, .card-hover:hover { border-color:#E76F51 !important; transform:translateY(-3px); box-shadow:0 0 0 3px #E76F51, 0 6px 20px rgba(231,111,81,0.25) !important; }
.qt-card:hover, .qt-card:active { transform:translateY(-2px); box-shadow:0 8px 22px rgba(0,0,0,0.18) !important; }
@keyframes bounceDown { 0%,100% { transform: translateY(0); } 50% { transform: translateY(8px); } }
.no-scrollbar::-webkit-scrollbar { display: none; }
.add-trip-btn { transition: transform 0.2s; position: relative; }
.add-trip-btn:hover { transform: scale(1.15); }
.add-trip-btn:hover::after {
  content: "הוסף לטיול שלי";
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 4px;
  background: rgba(0,0,0,0.85);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 4px;
  white-space: nowrap;
  pointer-events: none;
}
.listing-card .card-img {
  width:100%; height:160px; object-fit:cover;
  background:#E5E7EB;
}
.listing-card .card-body { padding:14px; }
.listing-card .card-title { font-size:1rem; font-weight:600; color:var(--text); margin-bottom:4px; }
.listing-card .card-location { font-size:0.8rem; color:var(--gray); margin-bottom:8px; display:flex; align-items:center; gap:4px; }
.listing-card .card-footer { display:flex; align-items:center; justify-content:space-between; }
.listing-card .card-rating { display:flex; align-items:center; gap:4px; color:var(--gold); font-size:0.85rem; font-weight:600; }
.listing-card .card-price { color:var(--gold); font-size:0.85rem; font-weight:500; }

/* ===== PAGE LAYOUTS ===== */
.page { display:none; }
.page.active { display:block; }

.page-header {
  display:flex; align-items:center; gap:12px;
  padding:16px 20px; background:var(--navy);
  border-bottom:1px solid #E5E7EB;
  position:sticky; top:0; z-index:50;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.page-header .back-btn {
  background:none; border:none; color:var(--text);
  font-size:1.2rem; cursor:pointer; padding:8px;
  border-radius:50%; transition:background 0.3s;
}
.page-header .back-btn:hover { background:rgba(0,0,0,0.05); }
.page-header h2 { font-size:1.2rem; font-weight:600; color:var(--text); }

/* Filter tabs */
.filter-tabs {
  display:flex; gap:8px; padding:16px 20px;
  overflow-x:auto; scrollbar-width:none;
}
.filter-tabs::-webkit-scrollbar { display:none; }
.filter-tab {
  padding:8px 18px; border-radius:30px;
  background:var(--card-bg); color:var(--gray);
  border:1px solid #E5E7EB; white-space:nowrap;
  cursor:pointer; font-size:0.85rem; font-weight:500;
  transition:all 0.3s; font-family:'Heebo';
}
.filter-tab.active, .filter-tab:hover {
  background:rgba(231,111,81,0.1); color:#E76F51; border-color:#E76F51;
}

/* List cards */
.listings-grid {
  display:grid; grid-template-columns:1fr;
  gap:14px; padding:0 20px 20px;
}
.list-card {
  display:flex; gap:14px; background:var(--card-bg);
  border-radius:6px; overflow:hidden;
  border:1px solid #E5E7EB; transition:all 0.3s;
  cursor:pointer; box-shadow:0 1px 4px rgba(0,0,0,0.04);
}
.list-card:hover { border-color:var(--gold); box-shadow:0 4px 12px rgba(196,146,42,0.12); }
.list-card .card-thumb {
  width:120px; min-height:110px; object-fit:cover; flex-shrink:0;
  background:#E5E7EB;
}
.list-card .card-info { padding:12px 14px 12px 12px; flex:1; display:flex; flex-direction:column; justify-content:center; }
.list-card .card-title { font-size:0.95rem; font-weight:600; color:var(--text); margin-bottom:2px; }
.list-card .card-desc { font-size:0.8rem; color:var(--gray); margin-bottom:6px; line-height:1.4; }
.list-card .card-meta { display:flex; align-items:center; gap:12px; flex-wrap:wrap; }
.list-card .card-rating { color:var(--gold); font-size:0.8rem; font-weight:600; }
.list-card .card-price { color:var(--gold-light); font-size:0.8rem; }
.list-card .card-tag {
  font-size:0.7rem; padding:3px 8px; border-radius:20px;
  background:rgba(5,150,105,0.1); color:var(--success);
}

/* ===== MAP ===== */
.map-container {
  height:300px; margin:0 20px 16px;
  border-radius:4px; overflow:hidden;
  border:1px solid #E5E7EB;
  box-shadow:0 1px 4px rgba(0,0,0,0.06);
}
#map, .leaflet-map { width:100%; height:100%; }

/* ===== DETAIL MODAL ===== */
.modal-overlay {
  position:fixed; inset:0; z-index:10000;
  background:rgba(0,0,0,0.7);
  display:none; justify-content:center;
}
.modal-overlay.active { display:flex; }
.modal-sheet {
  background:#FFFFFF; width:100%; max-width:500px;
  height:100dvh; max-height:100dvh; border-radius:0;
  overflow-y:scroll; -webkit-overflow-scrolling:touch; overscroll-behavior:contain;
  animation:slideUp 0.3s ease;
  box-shadow:0 -4px 30px rgba(0,0,0,0.15);
  padding-bottom:calc(env(safe-area-inset-bottom,0px) + 90px);
}
@keyframes slideUp { from { transform:translateY(100%); } }
.modal-img { width:100%; height:220px; object-fit:cover; }
.modal-body { padding:20px; }
.modal-title { font-size:1.4rem; font-weight:700; color:#2C5F6E; margin-bottom:4px; }
.modal-subtitle { color:var(--gray); font-size:0.9rem; margin-bottom:16px; }
.modal-stats { display:flex; gap:20px; margin-bottom:16px; }
.modal-stat { display:flex; flex-direction:column; align-items:center; gap:2px; }
.modal-stat .stat-value { color:var(--gold); font-weight:700; font-size:1.1rem; }
.modal-stat .stat-label { color:var(--gray); font-size:0.75rem; }
.modal-desc { color:var(--text); font-size:0.9rem; line-height:1.7; margin-bottom:16px; }
.modal-actions { display:flex; gap:10px; }
.modal-btn {
  flex:1; padding:12px; border-radius:12px; border:none;
  font-family:'Heebo'; font-size:0.95rem; font-weight:600;
  cursor:pointer; transition:all 0.3s;
  display:flex; align-items:center; justify-content:center; gap:8px;
}
.modal-btn.primary { background:var(--gold); color:#FFFFFF; }
.modal-btn.primary:hover { background:var(--gold-light); }
.modal-btn.secondary { background:#FDF6EC; color:#2C5F6E; border:1px solid #E5E7EB; }
.modal-close {
  position:fixed; top:12px; left:12px;
  width:40px; height:40px; border-radius:50%;
  background:rgba(0,0,0,0.7); border:none;
  color:white; font-size:1.3rem; cursor:pointer;
  display:flex; align-items:center; justify-content:center;
  z-index:1000;
}

/* ===== BOTTOM NAV ===== */
.bottom-nav {
  position:fixed; bottom:0; left:0; right:0;
  width:100%;
  background:#FFFFFF; border-top:1px solid #E5E7EB;
  display:flex; justify-content:space-around; align-items:center;
  padding:6px 0 env(safe-area-inset-bottom, 8px); z-index:9999;
  backdrop-filter:blur(10px);
  box-shadow:0 -2px 10px rgba(0,0,0,0.06);
  max-width:none !important;
}
.nav-item {
  display:flex; flex-direction:column; align-items:center; gap:0;
  color:var(--gray); text-decoration:none;
  cursor:pointer; transition:color 0.3s; padding:8px 6px;
  background:none; border:none; font-family:'Heebo';
}
.nav-item span { display:none; }
.nav-item i { font-size:1.55rem; }
.nav-item.active, .nav-item:hover { color:var(--gold); }

/* ===== ADMIN ===== */
.admin-layout { display:flex; min-height:100vh; }
.admin-sidebar {
  width:240px; background:var(--navy); padding:20px 0;
  border-left:1px solid rgba(212,168,67,0.15);
  flex-shrink:0; position:sticky; top:0; height:100vh;
  overflow-y:auto;
}
.admin-sidebar .logo { padding:0 20px 20px; font-size:1.2rem; font-weight:700; color:var(--gold); border-bottom:1px solid rgba(212,168,67,0.1); margin-bottom:12px; }
.admin-nav-item {
  display:flex; align-items:center; gap:10px;
  padding:12px 20px; color:var(--gray); cursor:pointer;
  transition:all 0.3s; border:none; background:none;
  width:100%; font-family:'Heebo'; font-size:0.9rem; text-align:right;
}
.admin-nav-item:hover, .admin-nav-item.active { color:#E76F51; background:rgba(231,111,81,0.08); }
.admin-nav-item i { width:20px; text-align:center; }

.admin-main { flex:1; padding:24px; overflow-y:auto; }
.admin-header { display:flex; align-items:center; justify-content:space-between; margin-bottom:24px; }
.admin-header h2 { font-size:1.4rem; font-weight:700; }
.admin-add-btn {
  padding:10px 20px; border-radius:12px; border:none;
  background:var(--gold); color:var(--dark-blue);
  font-family:'Heebo'; font-weight:600; font-size:0.9rem;
  cursor:pointer; display:flex; align-items:center; gap:6px;
  transition:background 0.3s;
}
.admin-add-btn:hover { background:var(--gold-light); }

/* Stats cards */
.stats-grid { display:grid; grid-template-columns:repeat(auto-fit, minmax(200px,1fr)); gap:16px; margin-bottom:24px; }
.stat-card {
  background:var(--card-bg); padding:20px; border-radius:var(--radius);
  border:1px solid rgba(212,168,67,0.1);
}
.stat-card .stat-icon { font-size:1.5rem; color:var(--gold); margin-bottom:8px; }
.stat-card .stat-number { font-size:1.8rem; font-weight:700; color:var(--white); }
.stat-card .stat-label { font-size:0.85rem; color:var(--gray); }

/* Admin table */
.admin-table {
  width:100%; border-collapse:collapse;
  background:var(--card-bg); border-radius:var(--radius); overflow:hidden;
}
.admin-table th {
  text-align:right; padding:14px 16px;
  background:var(--navy); color:var(--gray);
  font-weight:500; font-size:0.85rem;
  border-bottom:1px solid rgba(212,168,67,0.1);
}
.admin-table td {
  padding:12px 16px; border-bottom:1px solid rgba(255,255,255,0.05);
  font-size:0.9rem;
}
.admin-table tr:hover td { background:rgba(212,168,67,0.03); }
.admin-table .thumb { width:50px; height:50px; border-radius:8px; object-fit:cover; }
.admin-table .actions { display:flex; gap:8px; }
.admin-table .action-btn {
  width:32px; height:32px; border-radius:8px; border:none;
  display:flex; align-items:center; justify-content:center;
  cursor:pointer; font-size:0.85rem; transition:all 0.3s;
}
.action-btn.edit { background:rgba(212,168,67,0.15); color:var(--gold); }
.action-btn.delete { background:rgba(239,68,68,0.15); color:var(--danger); }
.action-btn:hover { opacity:0.8; }

/* Admin form modal */
.admin-modal {
  position:fixed; inset:0; z-index:300;
  background:rgba(0,0,0,0.7); display:none;
  align-items:center; justify-content:center;
}
.admin-modal.active { display:flex; }
.admin-form-card {
  background:var(--dark-blue); border-radius:var(--radius);
  padding:24px; width:90%; max-width:500px;
  max-height:80vh; overflow-y:auto;
  border:1px solid rgba(212,168,67,0.15);
}
.admin-form-card h3 { font-size:1.2rem; font-weight:700; margin-bottom:16px; color:var(--white); }
.form-group { margin-bottom:14px; }
.form-group label { display:block; margin-bottom:6px; font-size:0.85rem; color:var(--gray); }
.form-group input, .form-group select, .form-group textarea {
  width:100%; padding:10px 14px; border-radius:10px;
  background:var(--navy); border:1px solid rgba(212,168,67,0.15);
  color:var(--white); font-family:'Heebo'; font-size:0.9rem;
  outline:none; direction:rtl;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { border-color:var(--gold); }
.form-group textarea { min-height:80px; resize:vertical; }
.form-actions { display:flex; gap:10px; margin-top:16px; }
.form-btn {
  flex:1; padding:10px; border-radius:10px; border:none;
  font-family:'Heebo'; font-weight:600; cursor:pointer;
  transition:all 0.3s;
}
.form-btn.save { background:var(--gold); color:var(--dark-blue); }
.form-btn.cancel { background:var(--navy); color:var(--gray); }

/* ===== RESPONSIVE ===== */
@media (min-width:768px) {
  .categories-grid { grid-template-columns:repeat(4,1fr); }
  .listings-grid { grid-template-columns:repeat(2,1fr); }
  .hero { height:350px; }
  .hero-title { font-size:2.5rem; }
}
@media (max-width:600px) {
  .admin-sidebar { display:none; }
  .admin-main { padding:16px 12px; }
  .admin-header { flex-direction:column; gap:12px; align-items:stretch; }
  .admin-add-btn { justify-content:center; }
  .admin-table { font-size:0.8rem; }
  .admin-table th, .admin-table td { padding:8px 6px; }
  .admin-table .thumb { width:40px; height:40px; }
  .stats-grid { grid-template-columns:repeat(2,1fr); }
  .admin-form-card { width:95%; padding:16px; }
  .categories-grid { grid-template-columns:repeat(4,1fr); gap:8px; }
  .category-card { padding:12px 4px; }
  .category-icon { width:40px; height:40px; font-size:1.2rem; }
}

/* Scrollbar */
::-webkit-scrollbar { width:4px; }
::-webkit-scrollbar-track { background:#FDF6EC; }
::-webkit-scrollbar-thumb { background:#CBD5E0; border-radius:4px; }

/* Animations */
.fade-in { animation: fadeIn 0.4s ease; }
@keyframes fadeIn { from { opacity:0; transform:translateY(10px); } to { opacity:1; transform:translateY(0); } }
@keyframes pulse { 0%,100% { opacity:1; } 50% { opacity:0.4; } }
@keyframes wordFadeIn { from { opacity:0; transform:translateY(15px) scale(0.9); } to { opacity:1; transform:translateY(0) scale(1); } }
@keyframes letterFadeIn { from { opacity:0; transform:translateY(8px); } to { opacity:1; transform:translateY(0); } }

/* Hero letter animation */
.hero-letter {
  display:inline-block;
  opacity:0;
  color:#fff;
  animation: heroLetterIn 0.3s ease forwards, heroToOrange 0.8s ease 5s forwards;
  animation-fill-mode: forwards, forwards;
}
.hero-letter.hero-dubai {
  animation: heroLetterIn 0.3s ease forwards, heroDubaiOrange 0.8s ease 5s forwards;
  animation-fill-mode: forwards, forwards;
}
.hero-sub-anim {
  opacity:0;
  animation: heroSubIn 0.8s ease 5s forwards;
  animation-fill-mode: forwards;
}
@keyframes heroLetterIn { from { opacity:0; transform:translateY(12px); } to { opacity:1; transform:translateY(0); } }
@keyframes heroToOrange { to { color:#E76F51; } }
@keyframes heroDubaiOrange { to { color:#E9C46A; } }
@keyframes heroSubIn { from { opacity:0; } to { opacity:1; } }
@keyframes heroFadeOut { to { opacity:0; } }
