/* ===== TunisiaHotelOA — Tunisia-themed hotel directory ===== */
:root {
  --sand:       #F7F0E3;
  --sand-light: #FFFCF5;
  --sand-dark:  #EDD9B8;
  --terra:      #C0553B;
  --terra-d:    #9E3E27;
  --sea:        #1A6B8A;
  --sea-d:      #135470;
  --dark:       #2C1810;
  --mid:        #6B5642;
  --muted:      #9A8474;
  --border:     #E5D8C4;
  --white:      #FFFFFF;
  --gold:       #F5A623;
  --radius:     12px;
  --shadow:     0 2px 16px rgba(44,24,16,.10);
  --shadow-lg:  0 8px 32px rgba(44,24,16,.14);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Segoe UI', system-ui, -apple-system, Arial, sans-serif;
  background: var(--sand);
  color: var(--dark);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { flex: 1; }

a { color: var(--sea); text-decoration: none; }
a:hover { color: var(--sea-d); }
img { max-width: 100%; display: block; }
i { font-style: normal; }

/* ─── HEADER ─────────────────────────────────── */
.site-header {
  background: var(--dark);
  position: sticky;
  top: 0;
  z-index: 200;
  box-shadow: 0 2px 10px rgba(0,0,0,.35);
}
.hdr {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--sand);
  letter-spacing: -.02em;
  display: flex;
  align-items: center;
  gap: .4rem;
}
.logo em { color: var(--terra); font-style: normal; }
.logo:hover { text-decoration: none; color: var(--sand); }
.nav a {
  color: var(--sand-dark);
  font-size: .88rem;
  font-weight: 500;
  padding: .35rem .75rem;
  border-radius: 6px;
  transition: background .15s, color .15s;
}
.nav a:hover { background: rgba(255,255,255,.12); color: var(--sand); text-decoration: none; }

/* ─── HERO ────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, #1a0d06 0%, #3a1e0f 45%, #6b2d16 75%, var(--terra) 100%);
  color: var(--sand);
  padding: 3.5rem 1.5rem 5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Ccircle cx='30' cy='30' r='4'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}
.hero h1 {
  font-size: clamp(1.9rem, 5.5vw, 3.2rem);
  font-weight: 900;
  line-height: 1.15;
  margin-bottom: .75rem;
  position: relative;
}
.hero h1 em { color: #F4A460; font-style: normal; }
.hero p {
  font-size: clamp(.95rem, 2.2vw, 1.15rem);
  opacity: .82;
  max-width: 540px;
  margin: 0 auto 2rem;
  position: relative;
}
.hero-stats {
  display: flex;
  justify-content: center;
  gap: 2.5rem;
  flex-wrap: wrap;
  position: relative;
}
.stat strong {
  display: block;
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--terra);
  line-height: 1;
}
.stat span { font-size: .8rem; opacity: .75; text-transform: uppercase; letter-spacing: .06em; }

/* ─── FILTER BAR ──────────────────────────────── */
.filter-bar {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 58px;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(44,24,16,.06);
}
.fb-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: .75rem 1.5rem;
  display: flex;
  align-items: center;
  gap: .75rem;
  flex-wrap: wrap;
}
.search-box {
  flex: 1;
  min-width: 180px;
  padding: .55rem 1rem;
  border: 2px solid var(--border);
  border-radius: 8px;
  font-size: .9rem;
  background: var(--sand-light);
  color: var(--dark);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.search-box:focus { border-color: var(--sea); box-shadow: 0 0 0 3px rgba(26,107,138,.12); }
.sel {
  padding: .5rem .7rem;
  border: 2px solid var(--border);
  border-radius: 8px;
  font-size: .88rem;
  background: var(--sand-light);
  color: var(--dark);
  cursor: pointer;
  outline: none;
  transition: border-color .15s;
  min-width: 0;
}
.sel:focus { border-color: var(--sea); }
.count-badge {
  font-size: .82rem;
  color: var(--muted);
  white-space: nowrap;
  font-weight: 500;
}

/* ─── LAYOUT ──────────────────────────────────── */
.wrap { max-width: 1200px; margin: 0 auto; padding: 2rem 1.5rem; }

/* ─── MAP SECTION ─────────────────────────────── */
.map-box {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 2.5rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}
.map-box-hdr {
  padding: .9rem 1.25rem .6rem;
  font-size: .82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
}
#overview-map { height: 400px; width: 100%; }

/* ─── CARD GRID ───────────────────────────────── */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

/* ─── HOTEL CARD ──────────────────────────────── */
.card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transition: transform .2s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.card-img {
  height: 186px;
  overflow: hidden;
  background: var(--sand);
  position: relative;
  flex-shrink: 0;
}
.card-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .35s ease;
}
.card:hover .card-img img { transform: scale(1.06); }
.card-ph {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 3.5rem;
  background: linear-gradient(135deg, var(--sand), var(--sand-dark));
  color: var(--muted);
}
.cat-badge {
  position: absolute;
  top: 10px; left: 10px;
  background: rgba(26,13,6,.72);
  color: var(--sand);
  font-size: .68rem;
  font-weight: 700;
  padding: .22rem .65rem;
  border-radius: 20px;
  backdrop-filter: blur(6px);
  text-transform: uppercase;
  letter-spacing: .05em;
  max-width: calc(100% - 20px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.card-body {
  padding: 1rem 1.2rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: .35rem;
}
.card-name {
  font-size: .98rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--dark);
}
.card-name a { color: inherit; }
.card-name a:hover { color: var(--terra); text-decoration: none; }
.card-addr {
  font-size: .78rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.card-rating {
  display: flex;
  align-items: center;
  gap: .45rem;
  flex-wrap: wrap;
  margin-top: .1rem;
}
.stars { display: inline-flex; align-items: center; gap: 1px; }
.sf { color: var(--gold); font-size: 1rem; }
.sh { color: var(--gold); font-size: 1rem; opacity: .55; }
.se { color: var(--sand-dark); font-size: 1rem; }
.rv { font-size: .83rem; font-weight: 700; color: var(--dark); margin-left: 3px; }
.rc { font-size: .78rem; color: var(--muted); }
.no-rating { font-size: .78rem; color: var(--muted); font-style: italic; }
.card-cta {
  margin-top: auto;
  padding-top: .85rem;
  border-top: 1px solid var(--border);
}

/* ─── BUTTONS ─────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  padding: .58rem 1.2rem;
  border-radius: 8px;
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  transition: background .15s, transform .1s, box-shadow .15s;
  text-decoration: none;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); text-decoration: none; }
.btn-w { width: 100%; }
.btn-terra { background: var(--terra); color: #fff; }
.btn-terra:hover { background: var(--terra-d); color: #fff; }
.btn-sea { background: var(--sea); color: #fff; }
.btn-sea:hover { background: var(--sea-d); color: #fff; }
.btn-out { background: transparent; color: var(--sea); border-color: var(--sea); }
.btn-out:hover { background: var(--sea); color: #fff; }
.btn-out-terra { background: transparent; color: var(--terra); border-color: var(--terra); }
.btn-out-terra:hover { background: var(--terra); color: #fff; }

/* ─── NO RESULTS ──────────────────────────────── */
.no-res { text-align: center; padding: 4rem 2rem; color: var(--muted); display: none; }
.no-res h3 { font-size: 1.4rem; margin-bottom: .5rem; color: var(--dark); }

/* ─── HOTEL DETAIL ────────────────────────────── */
.detail-wrap { max-width: 920px; margin: 0 auto; padding: 1.5rem 1.5rem 3rem; }
.back-btn {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  color: var(--sea);
  font-size: .88rem;
  font-weight: 500;
  margin-bottom: 1.5rem;
  padding: .4rem .75rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--white);
  transition: background .15s;
}
.back-btn:hover { background: var(--sand); text-decoration: none; }
.detail-img {
  border-radius: var(--radius);
  overflow: hidden;
  height: 360px;
  background: var(--sand);
  margin-bottom: 1.75rem;
  box-shadow: var(--shadow);
}
.detail-img img { width: 100%; height: 100%; object-fit: cover; }
.detail-ph {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 6rem;
  background: linear-gradient(135deg, var(--sand), var(--sand-dark));
  color: var(--muted);
}
.d-cat {
  display: inline-block;
  background: var(--terra);
  color: #fff;
  font-size: .72rem;
  font-weight: 700;
  padding: .26rem .8rem;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: .07em;
  margin-bottom: .75rem;
}
.d-name {
  font-size: clamp(1.6rem, 5vw, 2.4rem);
  font-weight: 900;
  line-height: 1.15;
  margin-bottom: .75rem;
  color: var(--dark);
}
.d-rating {
  display: flex;
  align-items: center;
  gap: .75rem;
  flex-wrap: wrap;
  margin-bottom: 1.75rem;
}
.d-rating .stars { font-size: 1.1rem; }
.d-rating .rv { font-size: .95rem; }
.rev-pill {
  background: var(--sand);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: .2rem .85rem;
  font-size: .83rem;
  color: var(--muted);
  font-weight: 500;
}
.info-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
@media (min-width: 600px) { .info-grid { grid-template-columns: 1fr 1fr; } }
.info-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.2rem 1.4rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.info-card-hdr {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .09em;
  color: var(--muted);
  margin-bottom: .85rem;
  padding-bottom: .6rem;
  border-bottom: 1px solid var(--border);
}
.info-row {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  font-size: .92rem;
  line-height: 1.45;
}
.info-row + .info-row { margin-top: .75rem; }
.info-icon { font-size: 1.1rem; flex-shrink: 0; margin-top: .05rem; }
.info-row a { color: var(--sea); }
.info-row a:hover { color: var(--sea-d); }
.map-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  margin-bottom: 1.5rem;
}
.map-card-hdr {
  padding: .9rem 1.4rem .7rem;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .09em;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
}
#hotel-map { height: 320px; width: 100%; }
.cta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 2rem;
}
@media (max-width: 480px) { .cta-grid { grid-template-columns: 1fr; } }

/* ─── 404 ─────────────────────────────────────── */
.nf {
  text-align: center;
  padding: 6rem 2rem;
  max-width: 480px;
  margin: 0 auto;
}
.nf-num {
  font-size: 7rem;
  font-weight: 900;
  color: var(--terra);
  line-height: 1;
  margin-bottom: .5rem;
}
.nf h2 { font-size: 1.6rem; margin-bottom: .75rem; }
.nf p { color: var(--muted); margin-bottom: 2rem; }

/* ─── FOOTER ──────────────────────────────────── */
.site-footer {
  background: var(--dark);
  color: var(--sand-dark);
  text-align: center;
  padding: 2rem 1.5rem;
  font-size: .85rem;
  margin-top: auto;
}
.foot-brand { font-size: 1rem; font-weight: 700; color: var(--sand); margin-bottom: .35rem; }
.foot-sub { color: var(--mid); font-size: .82rem; margin-bottom: .25rem; }
.foot-copy { color: #5a4838; font-size: .78rem; }
.site-footer a { color: var(--terra); }
.site-footer a:hover { color: #E07050; }

/* ─── LEAFLET OVERRIDES ───────────────────────── */
.leaflet-popup-content-wrapper {
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0,0,0,.18);
}
.leaflet-popup-content { margin: 10px 14px; }
.pop-name { font-weight: 700; font-size: .88rem; color: var(--dark); margin-bottom: 3px; }
.pop-cat { font-size: .74rem; color: var(--muted); margin-bottom: 7px; }
.pop-lnk {
  font-size: .8rem;
  font-weight: 600;
  color: var(--sea);
  display: inline-block;
  padding: .25rem .65rem;
  background: var(--sand);
  border-radius: 5px;
  border: 1px solid var(--border);
}
.pop-lnk:hover { background: var(--sea); color: #fff; text-decoration: none; }

/* ─── RESPONSIVE ──────────────────────────────── */
@media (max-width: 640px) {
  #overview-map { height: 280px; }
  .detail-img { height: 240px; }
  .grid { grid-template-columns: 1fr; }
  .hero { padding: 2.5rem 1rem 3.5rem; }
  .hero-stats { gap: 1.5rem; }
}
@media (min-width: 768px) {
  .grid { grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
}