/* ═══════════════════════════════════════════════
   ApuliaOne — Global Stylesheet
   Palette: Navy #0B2E6B · Gold #D6A53A · Teal #17B7C8
   Ratio: 60% Beige · 30% Navy · 10% Gold
   Font: Montserrat · Inter · Allura
═══════════════════════════════════════════════ */

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

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

:root {
  --navy:    #0B2E6B;
  --gold:    #D6A53A;
  --teal:    #17B7C8;
  --aqua:    #63D3E9;
  --olive:   #6B8E4E;
  --beige:   #F6F1E8;
  --sand:    #E9D8B4;
  --text:    #444444;
  --white:   #FFFFFF;
  --red:     #ef4444;
  --yellow:  #eab308;
  --green:   #22c55e;

  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --shadow-sm: 0 2px 10px rgba(11,46,107,0.07);
  --shadow-md: 0 4px 24px rgba(11,46,107,0.10);
  --shadow-lg: 0 8px 40px rgba(11,46,107,0.15);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--beige);
  color: var(--text);
  min-height: 100vh;
}

/* ─── TYPOGRAPHY ─── */
h1, h2, h3, h4 {
  font-family: 'Montserrat', sans-serif;
  color: var(--navy);
}

.eyebrow {
  font-family: 'Montserrat', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--teal);
  display: block;
  margin-bottom: 6px;
}

.cursive {
  font-family: 'Allura', cursive;
  color: var(--gold);
}

/* ─── HEADER ─── */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  background: var(--navy);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  height: 60px;
  box-shadow: 0 2px 16px rgba(11,46,107,0.25);
}

.header-icon-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  border-radius: 8px;
  transition: background 0.2s;
  text-decoration: none;
}
.header-icon-btn:hover { background: rgba(255,255,255,0.12); }

.logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1;
  text-decoration: none;
}
.logo-main {
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  font-size: clamp(18px, 4vw, 22px);
  color: var(--white);
  letter-spacing: -0.5px;
}
.logo-main .gold { color: var(--gold); }
.logo-sub {
  font-family: 'Montserrat', sans-serif;
  font-size: 8px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--aqua);
  margin-top: 2px;
}
.logo-sub em { color: var(--gold); font-style: normal; }

/* ─── SIDEBAR ─── */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 300;
}
.sidebar-overlay.open { display: block; }

.sidebar {
  position: fixed;
  top: 0; right: -300px;
  width: 280px;
  height: 100%;
  background: var(--navy);
  z-index: 301;
  transition: right 0.3s cubic-bezier(.22,.61,.36,1);
  padding: 80px 24px 40px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow-y: auto;
}
.sidebar.open { right: 0; }

.sidebar-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
  padding: 0 16px;
  margin-bottom: 8px;
  margin-top: 16px;
}
.sidebar-title:first-child { margin-top: 0; }

.sidebar a {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--white);
  text-decoration: none;
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 14px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  transition: background 0.2s;
}
.sidebar a:hover,
.sidebar a.active { background: rgba(255,255,255,0.1); }
.sidebar a.active { border-left: 3px solid var(--gold); }

/* ─── PAGE WRAPPER ─── */
.page-body {
  padding-top: 60px; /* header height */
  min-height: 100vh;
}

/* ─── BOTTOM NAV (mobile) ─── */
.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: var(--navy);
  z-index: 200;
  padding: 8px 0 env(safe-area-inset-bottom, 8px);
  box-shadow: 0 -2px 16px rgba(11,46,107,0.2);
}
.bottom-nav-inner {
  display: flex;
  justify-content: space-around;
}
.bnav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 4px 12px;
  cursor: pointer;
  color: rgba(255,255,255,0.45);
  transition: color 0.2s;
  text-decoration: none;
}
.bnav-item.active { color: var(--gold); }
.bnav-item svg { width: 22px; height: 22px; }
.bnav-label {
  font-family: 'Montserrat', sans-serif;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

/* ─── NAV MENU BAR ─── */
.nav-menu {
  background: var(--navy);
  padding: 16px;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.nav-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  max-width: 600px;
  margin: 0 auto;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255,255,255,0.07);
  border: 1.5px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-md);
  padding: 13px 15px;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s, border-color 0.2s;
  text-decoration: none;
  color: var(--white);
}
.nav-item:hover {
  background: rgba(255,255,255,0.13);
  border-color: var(--gold);
  transform: translateY(-2px);
}
.nav-item.active {
  border-color: var(--gold);
  background: rgba(214,165,58,0.1);
}
.nav-icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.nav-icon.c-gold  { background: rgba(214,165,58,0.2);  color: var(--gold); }
.nav-icon.c-teal  { background: rgba(23,183,200,0.2);  color: var(--teal); }
.nav-icon.c-aqua  { background: rgba(99,211,233,0.15); color: var(--aqua); }
.nav-icon.c-olive { background: rgba(107,142,78,0.2);  color: var(--olive);}
.nav-label { font-family: 'Montserrat', sans-serif; font-weight: 600; font-size: 13px; }
.nav-sub   { font-size: 10px; color: rgba(255,255,255,0.45); margin-top: 1px; }

/* ─── SECTION ─── */
.section {
  padding: 28px 16px;
  max-width: 760px;
  margin: 0 auto;
}
.section-title {
  font-size: clamp(20px, 5vw, 27px);
  font-weight: 800;
  color: var(--navy);
  line-height: 1.2;
  margin-bottom: 4px;
}
.section-desc {
  font-size: 13px;
  color: #888;
  margin-bottom: 20px;
  line-height: 1.6;
}

/* ─── CARDS ─── */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}
.card-img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  display: block;
}
.card-img-placeholder {
  width: 100%;
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
}
.card-body { padding: 16px; }
.card-title {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 15px;
  color: var(--navy);
  margin-bottom: 4px;
}
.card-meta {
  font-size: 12px;
  color: #999;
  line-height: 1.5;
}

/* ─── BADGE / TAG ─── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: 'Montserrat', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 20px;
}
.badge-gold  { background: var(--gold);  color: var(--navy); }
.badge-teal  { background: var(--teal);  color: var(--white); }
.badge-navy  { background: var(--navy);  color: var(--white); }
.badge-olive { background: var(--olive); color: var(--white); }
.badge-sand  { background: var(--sand);  color: var(--navy); }
.badge-green { background: #dcfce7; color: #15803d; }
.badge-yellow{ background: #fef9c3; color: #854d0e; }
.badge-red   { background: #fee2e2; color: #991b1b; }

/* ─── BUTTONS ─── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 13px;
  padding: 12px 20px;
  border-radius: 50px;
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  text-decoration: none;
  letter-spacing: 0.3px;
}
.btn-primary { background: var(--navy); color: var(--white); }
.btn-primary:hover { background: #0d3d8f; transform: translateY(-1px); }
.btn-teal    { background: var(--teal); color: var(--white); }
.btn-teal:hover { background: #13a0af; transform: translateY(-1px); }
.btn-gold    { background: var(--gold); color: var(--navy); }
.btn-gold:hover { transform: translateY(-1px); }
.btn-outline {
  background: transparent;
  border: 2px solid var(--navy);
  color: var(--navy);
}
.btn-outline:hover { background: var(--navy); color: var(--white); }
.btn-full { width: 100%; border-radius: var(--radius-md); }

/* ─── DIVIDER ─── */
.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--sand), transparent);
  margin: 4px 16px;
}

/* ─── SCORE BAR ─── */
.score-bar-wrap { margin-bottom: 14px; }
.score-label {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: #999;
  margin-bottom: 4px;
}
.score-label strong { color: var(--navy); font-weight: 700; }
.score-bar {
  height: 6px;
  background: var(--sand);
  border-radius: 10px;
  overflow: hidden;
}
.score-fill {
  height: 100%;
  border-radius: 10px;
  background: linear-gradient(90deg, var(--teal), var(--aqua));
  width: 0;
  transition: width 1.2s cubic-bezier(.22,.61,.36,1);
}
.score-fill.green  { background: linear-gradient(90deg, #22c55e, #4ade80); }
.score-fill.yellow { background: linear-gradient(90deg, #eab308, #facc15); }
.score-fill.red    { background: linear-gradient(90deg, #ef4444, #f87171); }

/* ─── CHIP / LIST ITEM ─── */
.chip {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: border-color 0.2s, transform 0.15s;
}
.chip:hover { border-color: var(--teal); transform: translateX(3px); }
.chip.active { border-color: var(--gold); }

.chip-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  flex-shrink: 0;
}
.dot-green  { background: var(--green); }
.dot-yellow { background: var(--yellow); }
.dot-red    { background: var(--red); }
.dot-orange { background: #f97316; }

/* ─── FILTER BAR ─── */
.filter-bar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
  margin-bottom: 16px;
}
.filter-bar::-webkit-scrollbar { display: none; }
.filter-btn {
  flex-shrink: 0;
  font-family: 'Montserrat', sans-serif;
  font-size: 12px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 50px;
  border: 1.5px solid var(--sand);
  background: var(--white);
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.filter-btn:hover { border-color: var(--teal); color: var(--teal); }
.filter-btn.active {
  background: var(--navy);
  border-color: var(--navy);
  color: var(--white);
}

/* ─── EMPTY STATE ─── */
.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: #aaa;
}
.empty-state .big-icon { font-size: 52px; margin-bottom: 12px; }
.empty-state p { font-size: 13px; line-height: 1.6; max-width: 260px; margin: 0 auto; }

/* ─── REVEAL ANIMATION ─── */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ─── RESPONSIVE ─── */
@media (max-width: 600px) {
  .site-header { height: 56px; }
  .page-body { padding-top: 56px; padding-bottom: 70px; }
  .bottom-nav { display: block; }
  .nav-menu { display: none; }
}
@media (min-width: 601px) {
  .nav-grid { grid-template-columns: repeat(4, 1fr); }
  .nav-item { flex-direction: column; text-align: center; gap: 8px; padding: 18px 12px; }
  .nav-icon { margin: 0 auto; }
  .nav-sub { display: none; }
}
@media (min-width: 900px) {
  .section { max-width: 900px; }
}


/* ═══════════════════════════════════════════════════════════════
   UTILITY CLASSES — aggiunte per eliminare gli style="" inline
═══════════════════════════════════════════════════════════════ */

/* Testo eyebrow in colore acqua (usato su hero di pagine interne) */
.eyebrow--aqua { color: var(--aqua); }

/* Card link senza underline */
.card-link { text-decoration: none; }

/* Flex helper per chip interni */
.chip-content { flex: 1; }

/* Titolo chip spiagge vicine */
.chip-title { font-size: 13px; }

/* Sezione con padding-top ridotto */
.section--tight { padding-top: 12px; }

/* Section title con margine bottom per sezioni valori/storia */
.section-title--spaced { margin-bottom: 18px; }

/* Quick grid card placeholders con gradienti predefiniti */
.card-placeholder--itinerari { background: linear-gradient(135deg, #0B2E6B, #17B7C8); }
.card-placeholder--eventi    { background: linear-gradient(135deg, #D6A53A, #f97316); }
.card-placeholder--spiagge   { background: linear-gradient(135deg, #6B8E4E, #22c55e); }
.card-placeholder--esplora   { background: linear-gradient(135deg, #17B7C8, #63D3E9); }

/* Body esplora: flex colonna per layout mobile-first */
.esplora-page-body {
  padding-top: 112px; /* header 60px + filter bar 52px */
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Body esplora flex (sostituisce style="" inline rimosso) */
body { display: flex; flex-direction: column; min-height: 100vh; }
