/* ══════════════════════════════════════════════════════════════
   ZUCKTrip — City View Styles
   ══════════════════════════════════════════════════════════════ */

/* ── Layout ─────────────────────────────────────────────────── */
#view-city {
  min-height: 100dvh;
  background: #0d1e40;
  color: #fff;
  font-family: 'Optima', 'Optima Nova', sans-serif;
  display: flex;
  flex-direction: column;
}

/* ── Header ─────────────────────────────────────────────────── */
.city-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: calc(env(safe-area-inset-top) + 16px) 20px 16px;
  background: rgba(13,30,64,0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(201,168,76,0.15);
  position: sticky;
  top: 0;
  z-index: 100;
}

.city-back-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  text-decoration: none;
  flex-shrink: 0;
  transition: background 0.2s;
}
.city-back-btn:hover { background: rgba(255,255,255,0.16); }

.city-name {
  font-size: 22px;
  font-weight: 600;
  background: linear-gradient(135deg, #e8d08a 0%, #C9A84C 60%, #a07830 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0;
  letter-spacing: 0.03em;
  flex: 1;
}

/* ── Intro ───────────────────────────────────────────────────── */
.city-intro {
  padding: 24px 20px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  position: relative;
}

.city-intro-text {
  font-size: 15px;
  line-height: 1.75;
  color: rgba(255,255,255,0.82);
  font-weight: 300;
}

/* ── Audio Button ────────────────────────────────────────────── */
.btn-audio {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  padding: 7px 14px;
  background: rgba(201,168,76,0.12);
  border: 1px solid rgba(201,168,76,0.35);
  border-radius: 20px;
  color: #C9A84C;
  font-family: 'Optima', 'Optima Nova', sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.btn-audio:hover { background: rgba(201,168,76,0.22); }
.btn-audio.playing {
  background: rgba(201,168,76,0.25);
  border-color: #C9A84C;
}

/* ── Tabs ────────────────────────────────────────────────────── */
.city-tabs {
  display: flex;
  background: rgba(10,22,40,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,0.07);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  position: sticky;
  top: 0;
  z-index: 100;
}
.city-tabs::-webkit-scrollbar { display: none; }

.city-tab {
  flex-shrink: 0;
  padding: 14px 18px;
  background: transparent;
  border: none;
  border-bottom: 2.5px solid transparent;
  color: rgba(255,255,255,0.45);
  font-family: 'Optima', 'Optima Nova', sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  letter-spacing: 0.02em;
}
.city-tab:hover  { color: rgba(255,255,255,0.75); }
.city-tab.active {
  color: #C9A84C;
  border-bottom-color: #C9A84C;
}

/* ── Tab Content ─────────────────────────────────────────────── */
.city-tab-content {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ── Route Cards ─────────────────────────────────────────────── */
.route-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 18px;
  padding: 20px;
  transition: border-color 0.2s;
}
.route-card:hover { border-color: rgba(201,168,76,0.35); }

.route-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 8px;
}

.route-badge {
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.03em;
}
.route-badge--breve    { background: rgba(52,199,89,0.15);  color: #4cd964; border: 1px solid rgba(52,199,89,0.3); }
.route-badge--medio    { background: rgba(255,149,0,0.15);  color: #ff9500; border: 1px solid rgba(255,149,0,0.3); }
.route-badge--giornata { background: rgba(201,168,76,0.15); color: #C9A84C; border: 1px solid rgba(201,168,76,0.3); }
.route-badge--giorno1  { background: rgba(90,160,255,0.15); color: #5aa0ff; border: 1px solid rgba(90,160,255,0.3); }
.route-badge--giorno2  { background: rgba(180,100,220,0.15);color: #c878e8; border: 1px solid rgba(180,100,220,0.3); }

.route-meta {
  display: flex;
  gap: 12px;
  font-size: 13px;
  color: rgba(255,255,255,0.5);
}

.route-title {
  font-size: 18px;
  font-weight: 600;
  color: #fff;
  margin: 0 0 8px;
  letter-spacing: 0.02em;
}

.route-desc {
  font-size: 14px;
  line-height: 1.7;
  color: rgba(255,255,255,0.7);
  margin: 0 0 14px;
  font-weight: 300;
}

/* ── Route Stops ─────────────────────────────────────────────── */
.route-stops {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 14px 0;
}

.stop-chip {
  display: inline-flex;
  align-items: center;
  background: rgba(201,168,76,0.10);
  border: 1px solid rgba(201,168,76,0.25);
  border-radius: 10px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,0.88);
}

.stop-arrow {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 2px 14px;
  font-size: 12px;
  color: rgba(201,168,76,0.6);
}
.stop-arrow::before {
  content: '';
  width: 1px;
  height: 16px;
  background: rgba(201,168,76,0.25);
  margin-inline-start: 6px;
}

.btn-show-route {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin-top: 14px;
  padding: 13px;
  font-size: 14px;
  border-radius: 12px;
  background: linear-gradient(135deg, #1a5276 0%, #154360 100%);
  border: 1.5px solid rgba(41,128,185,0.6);
  color: #fff;
  font-family: 'Optima', 'Optima Nova', sans-serif;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  letter-spacing: 0.02em;
}
.btn-show-route:hover {
  background: linear-gradient(135deg, #2471a3 0%, #1a5276 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(41,128,185,0.4);
}

/* ── Monument Cards ──────────────────────────────────────────── */
.monument-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 18px;
  padding: 20px;
  transition: border-color 0.2s;
}
.monument-card:hover { border-color: rgba(201,168,76,0.3); }

.monument-name {
  font-size: 17px;
  font-weight: 700;
  color: #e8d08a;
  margin: 0 0 10px;
  letter-spacing: 0.02em;
}

.monument-desc {
  font-size: 14px;
  line-height: 1.75;
  color: rgba(255,255,255,0.75);
  margin: 0 0 14px;
  font-weight: 300;
}

.monument-info {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 14px;
}

.info-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  color: rgba(255,255,255,0.6);
  line-height: 1.5;
}
.info-row a {
  color: #C9A84C;
  text-decoration: none;
}
.info-row a:hover { text-decoration: underline; }

/* ── Transport Cards ─────────────────────────────────────────── */
.transport-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 18px;
  padding: 20px;
}

.transport-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.transport-icon { font-size: 26px; }
.transport-name {
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  margin: 0;
}

.transport-lines {
  list-style: none;
  padding: 0;
  margin: 0 0 14px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.transport-lines li {
  font-size: 13px;
  color: rgba(255,255,255,0.7);
  padding-inline-start: 14px;
  position: relative;
  line-height: 1.5;
  font-weight: 300;
}
.transport-lines li::before {
  content: '›';
  position: absolute;
  inset-inline-start: 0;
  color: #C9A84C;
}

.transport-tariffe {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.tariffa-chip {
  padding: 5px 12px;
  background: rgba(201,168,76,0.10);
  border: 1px solid rgba(201,168,76,0.25);
  border-radius: 10px;
  font-size: 12px;
  color: rgba(255,255,255,0.75);
  font-weight: 600;
}

.transport-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #C9A84C;
  text-decoration: none;
  margin-bottom: 14px;
}
.transport-link:hover { text-decoration: underline; }

/* ── Cucina ──────────────────────────────────────────────────── */
.section-label {
  font-size: 17px;
  font-weight: 700;
  color: #e8d08a;
  margin: 0 0 14px;
  letter-spacing: 0.03em;
}
.section-label--spaced {
  margin-top: 24px;
}

.piatti-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 28px;
}

.piatto-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  padding: 18px;
}
.piatto-nome {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 8px;
}
.piatto-desc {
  font-size: 13px;
  line-height: 1.7;
  color: rgba(255,255,255,0.68);
  margin: 0;
  font-weight: 300;
}

.ristoranti-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 20px;
}

.ristorante-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(201,168,76,0.18);
  border-radius: 16px;
  padding: 18px;
}
.ristorante-nome {
  font-size: 15px;
  font-weight: 700;
  color: #e8d08a;
  margin: 0 0 5px;
}
.ristorante-indirizzo {
  font-size: 12px;
  color: rgba(255,255,255,0.45);
  margin: 0 0 10px;
  font-weight: 400;
}
.ristorante-desc {
  font-size: 13px;
  line-height: 1.7;
  color: rgba(255,255,255,0.68);
  margin: 0;
  font-weight: 300;
}

/* ── Leaflet Map ─────────────────────────────────────────────── */
#city-map {
  height: 320px;
  margin: 0 20px 24px;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(201,168,76,0.2);
  position: relative;
  z-index: 0;
}

/* Custom map markers */
.map-marker { position: relative; }
.marker-dot {
  width: 12px;
  height: 12px;
  background: rgba(201,168,76,0.6);
  border: 2px solid rgba(201,168,76,0.9);
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(201,168,76,0.4);
  transition: all 0.2s;
}
.marker-dot.active {
  background: #C9A84C;
  border-color: #fff;
  box-shadow: 0 0 12px rgba(201,168,76,0.8);
  transform: scale(1.4);
}

/* Leaflet popup customization */
.leaflet-popup-content-wrapper {
  background: #0d2244;
  border: 1px solid rgba(201,168,76,0.35);
  border-radius: 10px;
  color: #fff;
  font-family: 'Optima', 'Optima Nova', sans-serif;
}
.leaflet-popup-tip { background: #0d2244; }
.leaflet-popup-content { margin: 10px 14px; font-size: 13px; }

/* ── Address button (opens Google Maps navigation) ───────────── */
.btn-address {
  background: none;
  border: none;
  color: #C9A84C;
  font-family: 'Optima', 'Optima Nova', sans-serif;
  font-size: 13px;
  cursor: pointer;
  text-align: start;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.2s;
}
.btn-address:hover { color: #e8d08a; }

/* ── RTL overrides ───────────────────────────────────────────── */
/* Inverte la freccia del bottone indietro (← diventa → in RTL) */
[dir="rtl"] .city-back-btn {
  transform: scaleX(-1);
}
