@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,600;1,300;1,400&family=DM+Sans:wght@300;400;500;600&display=swap');

:root {
  --jungle: #1a3a2a;
  --emerald: #2d6a4f;
  --sea: #52b788;
  --foam: #b7e4c7;
  --sand: #f5f0e8;
  --volcanic: #3d2b1f;
  --coral: #e07a5f;
  --gold: #c9a84c;
  --white: #fefefe;
  --text: #1c2826;
  --muted: #7a8c85;
  --nav-h: 56px;
  --bottom-nav-h: 60px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-tap-highlight-color: transparent; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--sand);
  color: var(--text);
  min-height: 100vh;
  padding-bottom: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom, 0px));
  -webkit-font-smoothing: antialiased;
}

/* ─── TOP BAR ─── */
.top-nav {
  background: var(--jungle);
  padding: 0 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-h);
  position: sticky;
  top: 0;
  z-index: 200;
  box-shadow: 0 1px 0 rgba(255,255,255,0.05), 0 2px 16px rgba(0,0,0,0.3);
}

.nav-logo {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--foam);
  text-decoration: none;
}

.nav-page-title {
  font-size: 0.72rem;
  font-weight: 500;
  color: rgba(255,255,255,0.5);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* ─── BOTTOM NAV ─── */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: var(--white);
  border-top: 1px solid rgba(0,0,0,0.08);
  display: flex;
  align-items: stretch;
  z-index: 200;
  box-shadow: 0 -2px 16px rgba(0,0,0,0.07);
}

.bottom-nav a {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  text-decoration: none;
  padding: 8px 4px 6px;
  position: relative;
  transition: opacity 0.15s;
}

.bottom-nav a:active { opacity: 0.7; }

.nav-icon { font-size: 1.25rem; line-height: 1; }

.nav-label {
  font-size: 0.58rem;
  font-weight: 500;
  color: var(--muted);
  text-align: center;
  line-height: 1;
  max-width: 50px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bottom-nav a.active .nav-label { color: var(--emerald); font-weight: 700; }

.bottom-nav a.active::before {
  content: '';
  position: absolute;
  top: 0;
  left: 20%;
  right: 20%;
  height: 2.5px;
  background: var(--emerald);
  border-radius: 0 0 3px 3px;
}

/* ─── HERO ─── */
.hero {
  position: relative;
  height: 210px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  padding: 1.2rem;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: brightness(0.48) saturate(1.15);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(26,58,42,0.95) 0%, transparent 55%);
}

.hero-content { position: relative; z-index: 2; width: 100%; }

.hero-eyebrow {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sea);
  margin-bottom: 0.25rem;
}

.hero h1 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2rem;
  font-weight: 300;
  color: var(--white);
  line-height: 1.1;
}

.hero h1 em { font-style: italic; color: var(--foam); }
.hero-count { margin-top: 0.35rem; font-size: 0.75rem; color: rgba(255,255,255,0.55); }

/* ─── SEARCH + FILTERS ─── */
.search-filters {
  background: var(--white);
  padding: 0.8rem 0.9rem 0.7rem;
  border-bottom: 1px solid rgba(0,0,0,0.07);
  position: sticky;
  top: var(--nav-h);
  z-index: 100;
}

.search-row { position: relative; margin-bottom: 0.65rem; }

.search-icon-abs {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.8rem;
  color: var(--muted);
  pointer-events: none;
  z-index: 1;
}

.search-input {
  width: 100%;
  background: var(--sand);
  border: 1.5px solid transparent;
  border-radius: 12px;
  padding: 0.65rem 1rem 0.65rem 2.3rem;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  outline: none;
  transition: all 0.2s;
  color: var(--text);
  -webkit-appearance: none;
}

.search-input:focus { border-color: var(--emerald); background: var(--white); }
.search-input::placeholder { color: var(--muted); }

.filters-scroll {
  display: flex;
  gap: 0.45rem;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.filters-scroll::-webkit-scrollbar { display: none; }

.filter-chip {
  background: var(--sand);
  border: 1.5px solid transparent;
  border-radius: 50px;
  padding: 0.3rem 0.85rem;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
  color: var(--text);
  -webkit-tap-highlight-color: transparent;
}

.filter-chip.active {
  background: var(--jungle);
  border-color: var(--jungle);
  color: var(--white);
}

/* ─── CARDS ─── */
.cards-container {
  padding: 0.9rem 0.9rem 0.5rem;
}

.results-count {
  font-size: 0.72rem;
  color: var(--muted);
  margin-bottom: 0.75rem;
  padding-left: 0.1rem;
}

.cards-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
}

@media (max-width: 340px) { .cards-grid { grid-template-columns: 1fr; } }
@media (min-width: 640px) { .cards-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 960px) {
  .cards-grid { grid-template-columns: repeat(4, 1fr); }
  .cards-container { max-width: 1300px; margin: 0 auto; padding: 1.5rem 2rem; }
}

/* ─── CARD ─── */
.card {
  background: var(--white);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 1px 6px rgba(0,0,0,0.07), 0 2px 12px rgba(0,0,0,0.05);
  cursor: pointer;
  position: relative;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.18s, box-shadow 0.18s;
}

.card:active { transform: scale(0.975); }
@media (hover: hover) {
  .card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,0.12); }
}

.card-img {
  position: relative;
  height: 120px;
  overflow: hidden;
}

.card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card-rating {
  position: absolute;
  top: 6px;
  right: 6px;
  background: rgba(26,58,42,0.88);
  backdrop-filter: blur(4px);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.18rem 0.42rem;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 2px;
}

.card-badge {
  position: absolute;
  bottom: 6px;
  left: 6px;
  right: 6px;
  background: rgba(26,58,42,0.82);
  backdrop-filter: blur(4px);
  color: var(--foam);
  font-size: 0.58rem;
  font-weight: 500;
  padding: 0.18rem 0.5rem;
  border-radius: 50px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-body { padding: 0.65rem 0.75rem 0.8rem; }

.card-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--jungle);
  line-height: 1.25;
  margin-bottom: 0.3rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-desc {
  font-size: 0.72rem;
  line-height: 1.5;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-price {
  margin-top: 0.45rem;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--coral);
}

.diff-pill {
  display: inline-block;
  font-size: 0.6rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 50px;
  margin-bottom: 0.3rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.diff-facile   { background: #e8f5ee; color: #2d6a4f; }
.diff-modere   { background: #fff4e5; color: #b45309; }
.diff-difficile { background: #fdecea; color: #c0392b; }

.hotel-stars { color: var(--gold); font-size: 0.68rem; display: block; margin-bottom: 0.25rem; }

/* ─── MODAL – Bottom Sheet ─── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(2px);
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.modal {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--white);
  border-radius: 20px 20px 0 0;
  transform: translateY(100%);
  transition: transform 0.32s cubic-bezier(0.32,0.72,0,1);
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal-overlay.open .modal { transform: translateY(0); }

.modal-handle {
  flex-shrink: 0;
  display: flex;
  justify-content: center;
  padding: 0.6rem 0 0.2rem;
}
.modal-handle::after {
  content: '';
  width: 34px;
  height: 4px;
  background: rgba(0,0,0,0.14);
  border-radius: 2px;
}

.modal-scroll {
  overflow-y: auto;
  flex: 1;
  -webkit-overflow-scrolling: touch;
}

.modal-img { height: 200px; overflow: hidden; position: relative; }
.modal-img img { width: 100%; height: 100%; object-fit: cover; display: block; }

.modal-close {
  position: absolute;
  top: 0.7rem;
  right: 0.7rem;
  background: rgba(255,255,255,0.92);
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.modal-content {
  padding: 1.2rem 1.2rem calc(1.2rem + env(safe-area-inset-bottom, 0px));
}

.modal-category {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--coral);
  margin-bottom: 0.3rem;
}

.modal-content h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--jungle);
  line-height: 1.15;
  margin-bottom: 0.75rem;
}

.modal-pills {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
  margin-bottom: 0.9rem;
}

.pill {
  padding: 0.28rem 0.75rem;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
}
.pill-note { background: var(--emerald); color: white; }
.pill-price { background: var(--sand); color: var(--volcanic); border: 1px solid rgba(0,0,0,0.08); }

.modal-desc {
  font-size: 0.86rem;
  line-height: 1.7;
  color: var(--text);
  margin-bottom: 1.1rem;
}

.modal-coords {
  background: var(--sand);
  border-radius: 10px;
  padding: 0.7rem 0.9rem;
  font-size: 0.74rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.9rem;
}

.modal-map-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: var(--jungle);
  color: var(--foam);
  border-radius: 14px;
  padding: 0.85rem;
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 600;
}
.modal-map-link:active { background: var(--emerald); }

/* ─── DESKTOP modal centered ─── */
@media (min-width: 640px) {
  .modal {
    position: absolute;
    top: 50%;
    left: 50%;
    bottom: auto;
    right: auto;
    transform: translate(-50%, -42%) scale(0.94);
    border-radius: 20px;
    max-width: 500px;
    width: 92%;
    max-height: 86vh;
  }
  .modal-overlay.open .modal { transform: translate(-50%, -50%) scale(1); }
  .modal-handle { display: none; }
}

@media (min-width: 960px) {
  body { padding-bottom: 0; }
  .bottom-nav { display: none; }
  .top-nav { height: 64px; padding: 0 2rem; }
  .top-nav .nav-page-title { display: none; }
}
