/*
 * mobile.css — Urban Weekend
 * Stili per smartphone (≤ 480px) e tablet (≤ 768px)
 * Caricato solo su dispositivi mobili via media query nell'HTML.
 * NON contiene alcuna regola per desktop (> 768px).
 */


/* ============================================================
   BASE MOBILE — tablet e smartphone
   ============================================================ */

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

html, body {
  overflow-x: hidden;
  width: 100%;
}

/* ── HERO ── */
.hero {
  position: relative;
  width: 100%;
  overflow: hidden;
}

/* ── Immagine chisiamo: leggero rilievo con ombra ── */
#heroChisiamo {
  margin: 0.75rem 0.75rem 0;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
  position: relative;  /* contesto per il banner assoluto */
}

#heroChisiamo img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
}

/* ── Banner trasparente: titolo in alto, tasto in basso ── */
#heroChisamoBanner {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1rem 1.25rem;
  background: transparent;
  border-radius: 10px;
}

#heroChisamoTitle {
  margin: 0;
  color: #fff;
  font-size: 1.1rem;
  font-weight: 700;
  text-align: center;
  letter-spacing: 0.02em;
  text-shadow: 0 1px 6px rgba(0,0,0,0.6);
  background: rgba(0,0,0,0.35);
  padding: 0.35rem 0.9rem;
  border-radius: 6px;
  align-self: center;
}

#heroChisamoBtn {
  display: inline-block;
  background: rgba(255, 255, 255, 0.92);
  color: #222;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.45rem 1.5rem;
  border-radius: 20px;
  text-decoration: none;
  letter-spacing: 0.03em;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
  -webkit-tap-highlight-color: transparent;
  align-self: center;
}

.hero-text {
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
}

.hero-title {
  font-size: 1.4rem !important;
}

/* ── SLIDE BUTTONS: nascosti su mobile ── */
.slide-btn,
#prevSlide,
#nextSlide {
  display: none !important;
}

/* ── SEARCH ROW ── */
.search-row {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
}

.search-city {
  width: 100%;
}

.search-inline-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.search-inline-wrapper input {
  width: 100%;
  padding: 0.6rem 2.5rem 0.6rem 0.75rem;
  font-size: 1rem;
  border-radius: 6px;
  border: 1px solid #ccc;
}

/* ── HERO e CHISIAMO: visibilità gestita da JS nello script slider ── */

/* ── Hero text: versione desktop lunga / mobile corta ── */
.hero-desc-mobile { display: none; }

@media (max-width: 768px) {
  .hero-desc-full   { display: none !important; }
  .hero-desc-mobile { display: block !important; }
}

/* ── Pulsante "Altre Mete" dopo le card: compatto, senza spazio ── */
/* ── PULSANTI SLIDE SU MOBILE:
   - nextSlideBottom (prima delle card): nascosto
   - nextSlideBottom2 (dopo le card): visibile, spostato via JS dopo l'ultima card
   - tutti i prevSlide: nascosti
── */

/* Nasconde il primo blocco search-actions (prima delle card) */
.search-row .search-actions {
  display: none !important;
}

/* Nasconde nextSlideBottom (primo pulsante Altre Mete) */
#nextSlideBottom {
  display: none !important;
}

/* Nasconde tutti i "Mete precedenti" */
#prevSlideBottom,
#prevSlideBottom2 {
  display: none !important;
}

/* Mostra il secondo blocco search-actions (dopo le card) */
.search-actions {
  display: flex;
  flex-direction: row;
  width: 100%;
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* Stile per "Altre Mete" dopo le card */
#nextSlideBottom2 {
  flex: 1;
  text-align: center;
  padding: 0.55rem 0.5rem;
  font-size: 0.9rem;
  border-radius: 6px;
  cursor: pointer;
  min-height: 44px;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

/* ── BOTTONE FRECCIA SU ── */
.scroll-to-top {
  display: none;         /* nascosto finché JS non lo attiva */
  position: fixed;
  bottom: 1.25rem;
  right: 1rem;
  z-index: 999;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: rgba(30, 30, 30, 0.75);
  color: #fff;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 10px rgba(0,0,0,0.25);
  opacity: 0;
  transition: opacity 0.25s ease;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.scroll-to-top.visible {
  display: flex;
  opacity: 1;
}

/* ── NATION TOC — griglia 2 colonne x 4 righe ── */
.nation-toc {
  width: 100%;
}

.nation-toc ul {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.3rem 0.5rem;
  padding: 0;
  margin: 0;
  list-style: none;
  width: 100%;
}

.nation-toc li {
  white-space: nowrap;
}

.nation-toc a {
  font-size: 0.88rem;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.4rem;
}

/* ── DESTINATIONS: card visibili in colonna singola ── */
.destinations-slider,
.destinations-slide {
  width: 100%;
  display: block;
}

.destinations,
.destinations-container,
#mobile-cards-container {
  display: flex !important;
  flex-direction: column !important;
  gap: 1rem;
  width: 100%;
}

/* Ogni card occupa tutta la larghezza */
.card {
  display: flex !important;
  flex-direction: column;
  width: 100% !important;
  flex: none !important;
  min-width: 0;
}

.card img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 6px 6px 0 0;
}

/* ── NATION HUB: nascosto su mobile ── */
.nation-hub {
  display: none !important;
}

/* ── TOC "Salta alla nazione" (secondo nav.nation-toc) ── */
nav.nation-toc[aria-label="Salta alla nazione"] {
  display: none !important;
}

/* ── MAPPA: nascosta ── */
#map,
.map-text,
.map-section-heading {
  display: none !important;
}

/* ── SIDEBAR DESTRA: nascosta ── */
.main-container > aside.sidebar {
  display: none !important;
}

/* ── PAGINE CITTÀ: day-card grandi come card destination su mobile ── */
.day-images {
  flex-direction: column !important;
  gap: 1rem !important;
}

.day-images .day-card {
  width: 100% !important;
  max-width: 100% !important;
  flex: none !important;
  display: flex !important;
  flex-direction: column !important;
  border: 1px solid #ccc !important;
  border-radius: 12px !important;
  overflow: hidden !important;
  background-color: #fff !important;
  box-sizing: border-box !important;
  position: relative !important;
}

.day-images .day-card img {
  width: 100% !important;
  height: auto !important;
  display: block !important;
  border-radius: 0 !important;
  margin: 0 !important;
}

.day-images .day-card .caption {
  padding: 8px 12px !important;
  font-size: 0.88rem !important;
  font-style: italic !important;
  font-weight: bold !important;
  text-align: center !important;
  background-color: rgba(0,0,0,0.6) !important;
  color: #fff !important;
}

/* ══════════════════════════════════════════════
   PAGINE CITTÀ — .content-wrapper
   DOM order: aside(1) | section.article(2) | aside(3)
   Mobile order: section.article(1) → aside:last(2) → aside:first(3)
   ══════════════════════════════════════════════ */

.content-wrapper {
  display: flex !important;
  flex-direction: column !important;
  gap: 0 !important;
  padding: 0 10px !important;
  margin: 10px auto !important;
  width: 100% !important;
  max-width: 100% !important;
}

/* 1° figlio nel DOM = aside sinistra → va per ULTIMA */
.content-wrapper > aside:nth-child(1) {
  order: 10 !important;
  width: 100% !important;
  position: static !important;
  max-height: none !important;
  border-left: none !important;
  border-top: 3px solid #d3e7e4 !important;
  margin-top: 20px !important;
}

/* 2° figlio nel DOM = section centrale → va per PRIMA */
.content-wrapper > section:nth-child(2) {
  order: 1 !important;
  width: 100% !important;
}

/* 3° figlio nel DOM = aside destra → va per SECONDA, visibile */
.content-wrapper > aside:nth-child(3) {
  order: 2 !important;
  width: 100% !important;
  display: block !important;
  position: static !important;
  max-height: none !important;
  border-left: none !important;
  border-top: 3px solid #d3e7e4 !important;
  margin-top: 20px !important;
}

/* ── TOC: spostato dopo H1 via order ── */
.central-column .city-card {
  display: flex;
  flex-direction: column;
}

/* ── BARRA ICONE CITTÀ: visibile solo su mobile, tra H1 e TOC ── */
.city-icon-bar {
  display: flex;
  justify-content: space-around;
  align-items: center;
  background: #fff;
  border: 1px solid #d3e7e4;
  border-radius: 12px;
  padding: 0.75rem 0.25rem;
  margin: 0.75rem 0;
  width: 100%;
  box-sizing: border-box;
  text-decoration: none;
}

.city-icon-item {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 5px !important;
  text-decoration: none !important;
  color: #0f6e56 !important;
  font-size: 0.72rem !important;
  font-weight: 600 !important;
  letter-spacing: 0.02em !important;
  flex: 1 !important;
  background: none !important;
  border: none !important;
  padding: 0 !important;
  border-radius: 0 !important;
}

.city-icon-item svg {
  width: 28px;
  height: 28px;
  stroke: #0f6e56;
  flex-shrink: 0;
}

/* Ordine elementi dentro city-card su mobile */
.central-column .faq             { order: 1; }
.central-column h1               { order: 2; }
.central-column .city-icon-bar   { order: 3; }
.central-column .toc-container   { order: 4; }

/* Tutto il resto viene dopo (paragrafi, immagini, ecc.) */
.central-column .city-card > * {
  order: 10;
}
.central-column .city-card > .faq           { order: 1; }
.central-column .city-card > h1             { order: 2; }
.central-column .city-card > .city-icon-bar { order: 3; }
.central-column .city-card > .toc-container { order: 4; }

/* ── ULTIMO AGGIORNAMENTO: centrato su mobile ── */
.last-updated {
  text-align: center !important;
}

/* ── MAIN CONTAINER ── */
.main-container {
  display: flex;
  flex-direction: column;
  width: 100%;
}

/* ── RESTAURANT: nascosta su mobile ── */
.restaurant {
  display: none !important;
}

/* ── RESTAURANT: 2 colonne su tablet ── */
.restaurant .cards {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.restaurant .card {
  flex: 1 1 calc(50% - 0.5rem) !important;
  width: auto !important;
}


/* ============================================================
   SMARTPHONE ONLY  ≤ 480px
   ============================================================ */
@media (max-width: 480px) {

  .hero-gallery .slide img {
    max-height: 200px;
  }

  .hero-text {
    padding: 0.6rem 0.75rem;
  }

  .hero-title {
    font-size: 1.15rem !important;
  }

  .hero-text p {
    font-size: 0.85rem;
    margin: 0.4rem 0 0;
  }

  .hero-text .btn {
    display: inline-block;
    padding: 0.6rem 1.4rem;
    font-size: 0.95rem;
    min-height: 44px;
    touch-action: manipulation;
  }

  .search-inline-wrapper input {
    font-size: 0.95rem;
  }

  .search-actions .btn-menu-style {
    font-size: 0.82rem;
    padding: 0.5rem 0.4rem;
  }

  /* Restaurant: 1 colonna su smartphone */
  .restaurant .card {
    flex: 1 1 100% !important;
    width: 100% !important;
  }
}
