/* ============================================================
   main.css — BrandSardinia
   Design system: Light glassmorphism, Bianco/Rosso/Nero
   ============================================================ */

/* ── FONT LOCALI (Bebas Neue, SIL OFL 1.1 — vedi assets/fonts/OFL-BebasNeue.txt) ── */
@font-face {
  font-family: 'Bebas Neue';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../assets/fonts/bebas-neue-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Bebas Neue';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../assets/fonts/bebas-neue-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ── CUSTOM PROPERTIES ─────────────────────────────────────── */
:root {
  --bg:        #f5f5f5;
  --bg2:       #ededed;
  --bg3:       #e4e4e4;
  --white:     #ffffff;
  --red:       #C8102E;
  --red-dark:  #9a0b22;
  --red-glow:  rgba(200, 16, 46, 0.18);
  --glass:     rgba(255, 255, 255, 0.72);
  --glass2:    rgba(255, 255, 255, 0.95);
  --card-bg:   rgba(255, 255, 255, 0.95);
  --border:    rgba(0, 0, 0, 0.08);
  --border2:   rgba(0, 0, 0, 0.15);
  --text:      rgba(0, 0, 0, 0.85);
  --text-secondary: rgba(0, 0, 0, 0.62);
  --text-muted: rgba(0, 0, 0, 0.58);
  --blur:      20px;
  --radius:    16px;
  --radius-sm: 10px;
  --transition: 0.3s ease;
  --font-sans: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --font-serif: Georgia, 'Times New Roman', serif;

  /* z-index scale — single source of truth */
  --z-map-ui:  20;
  --z-panel:   30;
  --z-nav:     200;
  --z-modal:   2000;
  --z-loader:  9999;

  /* spacing scale */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;

  /* buttons — single source of truth */
  --btn-radius: 10px;
  --btn-pad-y:  9px;
  --btn-pad-x:  18px;
  --btn-font:   0.85rem;

  /* layout */
  --navbar-h: 72px;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  height: 100%;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--red); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--red-dark); }

img { max-width: 100%; display: block; }

/* ── SCROLLBAR ─────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: rgba(0,0,0,0.06); }
::-webkit-scrollbar-thumb { background: rgba(200, 16, 46, 0.35); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--red); }

/* ── UTILITY ───────────────────────────────────────────────── */
.hidden { display: none !important; }

/* Micro-icone inline nei tool (rimpiazzo emoji) */
.ti-ico {
  display: inline-block;
  vertical-align: -1.5px;
  margin-right: 3px;
  flex-shrink: 0;
}

/* ── ACCESSIBILITÀ ─────────────────────────────────────────── */
/* Indicatore di focus visibile e coerente su ogni controllo interattivo */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible,
[role="button"]:focus-visible,
.selector-card:focus-visible,
.tool-card:focus-visible,
.lang-item:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Rispetta la preferenza di movimento ridotto (utenti con disturbi vestibolari) */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ── BOTTONI (sistema unificato — outline rosso + liquid fill) ── */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--btn-pad-y) var(--btn-pad-x);
  border-radius: var(--btn-radius);
  font-size: var(--btn-font);
  font-weight: 600;
  font-family: inherit;
  line-height: 1;
  cursor: pointer;
  border: 1.5px solid transparent;
  overflow: hidden;
  isolation: isolate;
  white-space: nowrap;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.3s ease, background 0.25s ease, border-color 0.25s ease, transform 0.2s ease, box-shadow 0.25s ease;
}
.btn svg { flex-shrink: 0; }

/* Firma del sistema: outline rosso su vetro che si riempie di rosso (liquid)
   dal basso all'hover. Condiviso da tutti i bottoni outline del sito. */
.btn-outline, .filter-pill, .tools-back-btn, .lang-btn {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.btn-outline::before,
.filter-pill:not(.active)::before,
.tools-back-btn::before,
.lang-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--red);
  transform: translateY(101%);
  border-radius: 42% 42% 0 0;
  transition: transform 0.42s cubic-bezier(0.7, 0, 0.2, 1), border-radius 0.42s cubic-bezier(0.7, 0, 0.2, 1);
}
/* hover-driven fill/color solo dove l'hover esiste davvero (no sticky su touch) */
@media (hover: hover) {
  .btn-outline:hover::before,
  .filter-pill:not(.active):hover::before,
  .tools-back-btn:hover::before,
  .lang-btn:hover::before {
    transform: translateY(0);
    border-radius: 0;
  }
  .btn-outline:hover { color: var(--white); border-color: var(--red); }
  .btn-ghost:hover { border-color: var(--red); color: var(--red); }
}

.btn-outline {
  background: rgba(255, 255, 255, 0.92);
  border-color: var(--red);
  color: var(--red);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.btn-primary { background: var(--red); border-color: var(--red); color: var(--white); }
.btn-primary:hover { background: var(--red-dark); border-color: var(--red-dark); color: var(--white); transform: translateY(-1px); box-shadow: 0 6px 18px var(--red-glow); }

.btn-ghost { background: var(--glass); border-color: var(--border); color: var(--text); }

.btn-sm { padding: 6px 12px; font-size: 0.8rem; }

/* Freccia che scorre all'hover nelle CTA con SVG a freccia */
.btn-arrow, .landing-cta svg, .bando-link svg, .bandi-portale-chip svg { transition: transform 0.3s cubic-bezier(0.7, 0, 0.2, 1); }
.btn:hover .btn-arrow, .landing-cta:hover svg, .bando-link:hover svg { transform: translateX(4px); }

/* Estensione firma a controlli mappa, carosello e route planner (contesti vari) */
#btn-route-planner, .pin-toggle-btn, .map-filter-toggle, .map-reset-btn,
.carousel-btn, .rp-gmaps-btn {
  position: relative;
  overflow: hidden;
  contain: paint;            /* clip affidabile del riempimento rosso anche su Safari/mobile */
  isolation: isolate;
  border-color: var(--red) !important;
  transition: color 0.3s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
#btn-route-planner::before, .pin-toggle-btn::before, .map-filter-toggle::before,
.map-reset-btn::before, .carousel-btn::before, .rp-gmaps-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--red);
  transform: translateY(101%);
  border-radius: 42% 42% 0 0;
  transition: transform 0.42s cubic-bezier(0.7, 0, 0.2, 1), border-radius 0.42s cubic-bezier(0.7, 0, 0.2, 1);
}
@media (hover: hover) {
  #btn-route-planner:hover::before, .pin-toggle-btn:hover::before, .map-filter-toggle:hover::before,
  .map-reset-btn:hover::before, .carousel-btn:hover::before, .rp-gmaps-btn:hover::before {
    transform: translateY(0);
    border-radius: 0;
  }
  #btn-route-planner:hover, .pin-toggle-btn:hover, .map-filter-toggle:hover,
  .map-reset-btn:hover, .carousel-btn:hover, .rp-gmaps-btn:hover { color: #fff !important; }
  .carousel-btn:hover svg, .map-reset-btn:hover svg { stroke: #fff; }
}

/* CTA piena route planner: lift coerente */
.rp-calc-btn:hover { background: var(--red-dark); transform: translateY(-1px); box-shadow: 0 6px 18px var(--red-glow); }

.glass-card {
  background: var(--glass);
  border: 1px solid var(--border);
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
  border-radius: var(--radius);
  transition: all var(--transition);
}

.glass-card:hover {
  background: var(--glass2);
  border-color: var(--border2);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1), 0 0 20px var(--red-glow);
  transform: translateY(-2px);
}

.btn-glass {
  background: var(--glass);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 18px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all var(--transition);
  backdrop-filter: blur(10px);
}
.btn-glass:hover {
  background: var(--glass2);
  border-color: var(--red);
  color: var(--text);
}

.glass-select {
  background: var(--glass);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 0.85rem;
  outline: none;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23555' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 32px;
  backdrop-filter: blur(10px);
}
.glass-select option { background: #fff; color: #111; }
.glass-select:focus { border-color: var(--red); }

/* ── KEYFRAME ANIMATIONS ───────────────────────────────────── */
@keyframes pulse-glow {
  0%, 100% { opacity: 1; text-shadow: 0 0 20px rgba(200,16,46,0.8); }
  50% { opacity: 0.7; text-shadow: 0 0 40px rgba(200,16,46,1), 0 0 80px rgba(200,16,46,0.4); }
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-12px); }
}

@keyframes float-delayed {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-8px) rotate(3deg); }
}

@keyframes spin-slow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes star-twinkle {
  0%, 100% { opacity: 0.2; }
  50% { opacity: 1; }
}

@keyframes progress-bar {
  0% { width: 0%; }
  100% { width: 100%; }
}

@keyframes slide-in-up {
  from { transform: translateY(30px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes gradient-shift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ── SARDINIA WORLD BACKDROP ────────────────────────────────── */
#sardinia-world {
  position: fixed;
  inset: 0;
  z-index: 5;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

#sardinia-silhouette {
  height: 62vh;
  max-height: 520px;
  min-height: 180px;
  width: auto;
  display: block;
}

#noise-layer {
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.12'/%3E%3C/svg%3E");
  background-size: 200px 200px;
  opacity: 0;
  pointer-events: none;
}

@keyframes cloud-dissolve {
  0%   { opacity: 1; filter: none; }
  25%  { opacity: 0.9;  filter: blur(0.5px) brightness(1.05); }
  55%  { opacity: 0.55; filter: blur(3px) brightness(1.25) saturate(0.7); }
  80%  { opacity: 0.2;  filter: blur(7px) brightness(1.6) saturate(0.3); }
  100% { opacity: 0;    filter: blur(14px) brightness(2) saturate(0); }
}

@keyframes noise-flicker {
  0%   { opacity: 0; }
  20%  { opacity: 0.55; }
  40%  { opacity: 0.25; }
  65%  { opacity: 0.7; }
  85%  { opacity: 0.3; }
  100% { opacity: 0; }
}

#sardinia-world.dissolving {
  animation: cloud-dissolve 1.05s ease-in forwards;
}

#sardinia-world.dissolving #noise-layer {
  animation: noise-flicker 1.05s ease-in forwards;
}

/* Tema chiaro per hero e selector (quando #sardinia-world è attivo) */
body.world-active #main-app { background: transparent; }
body.world-active .selector-title { color: #111; }
body.world-active .selector-subtitle { color: #555; }
body.world-active .selector-card {
  background: rgba(255,255,255,0.82);
  border-color: rgba(200,16,46,0.15);
  box-shadow: 0 8px 32px rgba(0,0,0,0.07);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
body.world-active .card-title { color: #111; }
body.world-active .card-title.card-title-display { color: #F93448; }
body.world-active .card-desc  { color: #444; }
body.world-active .card-icon-wrap svg { color: #1a1a1a; }
body.world-active .scroll-invite-label { color: #333; }
body.world-active .scroll-invite-chevron { stroke: #333; }

/* ── PRELOADER ─────────────────────────────────────────────── */
#preloader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 48px;
}

.preloader-logo-wrap {
  position: relative;
  width: 88px;
  overflow: hidden;
  /* altezza fissa uguale all'SVG — JS la anima via clip-path */
}

#preloader-logo-svg {
  display: block;
  width: 88px;
  height: auto;
  /* clip-path rivelato da JS: parte da inset(100%) e scende a inset(0%) */
  clip-path: inset(100% 0 0 0);
  transition: clip-path 0.05s linear;
}

.preloader-progress-container {
  width: min(280px, 72vw);
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}

.preloader-bar-wrapper {
  width: 100%;
  height: 2px;
  background: rgba(0,0,0,0.10);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
}

#preloader-bar {
  height: 100%;
  background: var(--red);
  border-radius: 2px;
  width: 0%;
  transition: width 0.05s linear;
}

#preloader-percent {
  font-size: 0.72rem;
  color: rgba(0,0,0,0.35);
  letter-spacing: 2px;
  font-family: var(--font-sans);
}

/* ── HERO ──────────────────────────────────────────────────── */
#hero {
  position: fixed;
  inset: 0;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 100;
  overflow: hidden;
  padding: 20px 20px 130px;
}

/* Background hero — trasparente: mostra #sardinia-world */
.hero-bg {
  display: none;
}

/* Stelle e rings rimossi dal design */

/* Language selector — su sfondo bianco (hero e selector) */
.lang-selector {
  position: absolute;
  top: 24px;
  right: 24px;
  z-index: 10;
}

/* Nel navbar il dropdown è in flusso normale, non assoluto */
.app-navbar .lang-selector {
  position: relative;
  top: auto;
  right: auto;
}

.lang-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  background: rgba(255,255,255,0.92);
  border: 1.5px solid var(--red);
  color: var(--red);
  padding: 8px 12px 8px 10px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 1px;
  cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: background var(--transition);
  font-family: var(--font-sans);
}
.lang-btn.open { background: rgba(200,16,46,0.07); }
@media (hover: hover) {
  .lang-btn:hover { color: var(--white); }
  .lang-btn:hover .lang-chevron { stroke: var(--white); }
}
.lang-btn .lang-code { min-width: 18px; }
.lang-chevron {
  stroke: var(--red);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}
.lang-btn.open .lang-chevron { transform: rotate(180deg); }

.lang-menu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: rgba(255,255,255,0.98);
  border: 1.5px solid rgba(200,16,46,0.22);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 10px 32px rgba(0,0,0,0.13);
  min-width: 100%;
  z-index: 100;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.lang-menu.open { display: block; }

.lang-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 14px;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 600;
  color: #333;
  letter-spacing: 0.5px;
  transition: background 0.15s;
  font-family: var(--font-sans);
}
.lang-item:hover { background: rgba(200,16,46,0.07); color: var(--red); }
.lang-item.active { color: var(--red); }
.lang-flag {
  width: 20px;
  height: 14px;
  border-radius: 2px;
  object-fit: cover;
  display: block;
  flex-shrink: 0;
}

/* Pre-hide elementi hero — GSAP li rivela al momento giusto, evita flash */
#hero .hero-tagline,
#hero .hero-title,
#hero .hero-subtitle,
#btn-start,
#lang-selector-hero {
  opacity: 0;
}

/* Contenuto hero */
.hero-content {
  position: relative;
  z-index: 5;
  text-align: center;
  max-width: 780px;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.75rem;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 24px;
  border: 1px solid rgba(200,16,46,0.3);
  padding: 6px 16px;
  border-radius: 20px;
  background: rgba(200,16,46,0.08);
}

.hero-eyebrow::before, .hero-eyebrow::after {
  content: '';
  width: 20px;
  height: 1px;
  background: var(--red);
  opacity: 0.6;
}

.hero-tagline {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 0.72rem;
  letter-spacing: 5px;
  text-transform: uppercase;
  color: var(--red);
  font-weight: 600;
  margin-top: 32px;
  margin-bottom: 28px;
}
.hero-tagline::before, .hero-tagline::after {
  content: '';
  display: block;
  width: 24px;
  height: 1px;
  background: var(--red);
  opacity: 0.7;
}

.hero-title {
  margin: 0 0 20px;
  line-height: 1;
  padding: 0;
}

.hero-title-svg {
  display: block;
  width: clamp(280px, 52vw, 640px);
  height: auto;
  filter: none;
}

.hero-title span {
  color: var(--red);
  position: relative;
}

.hero-subtitle {
  font-size: clamp(16px, 2.2vw, 20px);
  color: #444;
  line-height: 1.6;
  max-width: 560px;
  margin: 0 auto 68px;
  font-weight: 300;
}

/* Bottone CTA — rosso su sfondo bianco */
#btn-start {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 18px 48px;
  background: rgba(255, 255, 255, 0.92);
  border: 1.5px solid var(--red);
  color: var(--red);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 1px;
  border-radius: 50px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: color 0.35s ease, border-color 0.25s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

/* Liquid fill: si riempie di rosso dal basso all'hover */
#btn-start::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--red);
  transform: translateY(101%);
  border-radius: 42% 42% 0 0;
  transition: transform 0.45s cubic-bezier(0.7, 0, 0.2, 1), border-radius 0.45s cubic-bezier(0.7, 0, 0.2, 1);
}
#btn-start:hover::before { transform: translateY(0); border-radius: 0; }

#btn-start:hover {
  color: #fff;
  border-color: var(--red);
  box-shadow: 0 0 40px var(--red-glow), 0 0 80px rgba(200,16,46,0.15);
  transform: translateY(-2px);
}

#btn-start span { position: relative; z-index: 1; }

.hero-bottom-deco { display: none; }

/* ── MAIN APP ──────────────────────────────────────────────── */
#main-app {
  min-height: 100vh;
  display: none;
  flex-direction: column;
  background: var(--bg);
  position: relative;
  z-index: 10;
}

/* Navbar interna */
.app-navbar {
  position: sticky;
  top: 0;
  z-index: 200;
  padding: 16px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 0 rgba(0,0,0,0.06);
  transition: background 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
}

/* Navbar trasparente con blur sulla mappa */
body.section-map .app-navbar {
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom-color: rgba(255, 255, 255, 0.15);
  box-shadow: none;
}

.app-navbar-left {
  display: flex;
  align-items: center;
  gap: 20px;
}

/* Logo → pulsante Home (stile del bottone lingue) sulle schermate diverse dalla home.
   Animazione a step in ease-out: prima il logo si rimpicciolisce, poi compare il
   rettangolo col bordo rosso, infine la scritta "Home". */
.home-btn {
  display: inline-flex;
  align-items: center;
  gap: 0;
  background: transparent;
  border: 1.5px solid transparent;
  border-radius: 8px;
  padding: 4px;
  cursor: pointer;
  font-family: var(--font-sans);
  color: var(--red);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  /* rettangolo (bordo/sfondo/padding/gap): compare DOPO il logo */
  transition: background 0.3s ease 0.18s, border-color 0.3s ease 0.18s,
              padding 0.3s ease 0.18s, gap 0.3s ease 0.18s;
}
.home-btn .app-logo-svg {
  width: 32px;
  height: auto;
  display: block;
  transition: width 0.28s ease 0s;   /* il logo si rimpicciolisce PER PRIMO */
}
.home-btn .home-label {
  max-width: 0;
  opacity: 0;
  overflow: hidden;
  white-space: nowrap;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 1px;
  color: var(--red);
  /* la scritta compare PER ULTIMA */
  transition: max-width 0.3s ease 0.4s, opacity 0.3s ease 0.4s;
}

/* Stato "non home": il logo entra nel rettangolo rosso con la scritta Home */
body:not(.world-active) .home-btn {
  background: rgba(255, 255, 255, 0.92);
  border-color: var(--red);
  padding: 6px 12px 6px 8px;
  gap: 7px;
}
body:not(.world-active) .home-btn .app-logo-svg { width: 22px; }
body:not(.world-active) .home-btn .home-label { max-width: 90px; opacity: 1; }
body:not(.world-active) .home-btn:hover { background: rgba(200, 16, 46, 0.08); }

.app-navbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ── SECTION SELECTOR ──────────────────────────────────────── */
#section-selector {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 0;
  position: relative;
  overflow: visible;
}

.selector-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 65px);
  padding: 56px 24px 160px;
  width: 100%;
  position: relative;
  overflow: hidden;
}

/* Background radiale selector */
.selector-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 50% at 50% 80%, rgba(200,16,46,0.07) 0%, transparent 60%);
  pointer-events: none;
}

.selector-title {
  font-size: clamp(22px, 4vw, 36px);
  font-weight: 700;
  text-align: center;
  margin-bottom: 12px;
  margin-top: 8px;
  color: var(--text);
}

.selector-subtitle {
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 56px;
  font-size: 1rem;
}

.selector-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: 960px;
  width: 100%;
}

.selector-card {
  background: var(--glass);
  border: 1px solid var(--border);
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
  border-radius: 20px;
  padding: 44px 32px;
  cursor: pointer;
  text-align: center;
  transition: all 0.35s ease;
  position: relative;
  overflow: hidden;
  opacity: 0;
}

.selector-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(200,16,46,0.08) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.35s ease;
  border-radius: inherit;
}

.selector-card:hover {
  transform: translateY(-6px);
  border-color: rgba(200,16,46,0.4);
  box-shadow:
    0 20px 60px rgba(0,0,0,0.12),
    0 0 30px rgba(200,16,46,0.12),
    inset 0 1px 0 rgba(255,255,255,0.6);
}

.selector-card:hover::before { opacity: 1; }

.selector-card:hover .card-icon-wrap { animation: float 2s ease-in-out infinite; }

.card-icon-wrap {
  width: 72px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(200, 16, 46, 0.08);
  border: 1px solid rgba(200, 16, 46, 0.2);
  border-radius: 18px;
  margin-bottom: 20px;
  transition: all var(--transition);
}

.selector-card:hover .card-icon-wrap {
  background: rgba(200, 16, 46, 0.15);
  border-color: rgba(200, 16, 46, 0.5);
  box-shadow: 0 0 20px rgba(200, 16, 46, 0.2);
}

.card-icon-svg {
  width: 36px;
  height: 36px;
  color: var(--red);
  transition: color var(--transition);
}

/* legacy fallback */
.card-icon {
  font-size: 52px;
  margin-bottom: 20px;
  display: block;
  transition: transform 0.3s ease;
}

.card-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
}

.card-sardinai-svg {
  width: 110px;
  height: auto;
  display: block;
}

/* Titoli Mappa e Tools — font display tipo SardinAI SVG */
.card-title-display {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2rem;
  font-weight: 400;
  color: #F93448 !important;
  -webkit-text-stroke: 0.1px rgba(0, 0, 0, 0.8);
  opacity: 1;
  letter-spacing: 1px;
  line-height: 1;
  margin-bottom: 10px;
}

.card-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.card-arrow {
  position: absolute;
  bottom: 20px;
  right: 20px;
  color: var(--red);
  font-size: 1.1rem;
  opacity: 0;
  transform: translateX(-8px);
  transition: all 0.3s ease;
}

.selector-card:hover .card-arrow {
  opacity: 1;
  transform: translateX(0);
}

/* ── MAIN SECTIONS ─────────────────────────────────────────── */
.main-section {
  display: none; /* mostrate solo via showSection(); evita il "leak" in home al primo load */
  min-height: calc(100vh - 65px);
  padding: 40px 24px 60px;
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
}

/* ── SARDINAI SECTION ──────────────────────────────────────── */
#sardinai-section {
  display: none;
  padding: 0;
  max-width: 100%;
}

.sardinai-wrapper {
  display: flex;
  flex-direction: column;
  height: calc(100vh - var(--nav-h, 85px));
  height: calc(100dvh - var(--nav-h, 85px));
}

.sardinai-header {
  padding: 24px 28px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

.sardinai-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--red), var(--red-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 900;
  color: white;
  flex-shrink: 0;
  box-shadow: 0 0 20px var(--red-glow);
}

.sardinai-header-text h2 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
}

.sardinai-header-text p {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.sardinai-status {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  margin-left: auto;
  box-shadow: 0 0 10px rgba(34, 197, 94, 0.5);
  animation: pulse-glow 2s ease-in-out infinite;
  flex-shrink: 0;
}

/* Chat messages */
#sardinai-chat {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 24px 28px 40px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  scroll-behavior: smooth;
}
/* Ogni blocco (messaggio, chip, carosello, itinerario) è una risposta a sé:
   mai compresso dal flex column, così resta SEMPRE interamente visibile.
   (gli elementi con overflow verrebbero altrimenti schiacciati a 0.) */
#sardinai-chat > * { flex: 0 0 auto; }

.chat-message {
  max-width: 80%;
  padding: 14px 18px;
  border-radius: 16px;
  font-size: 0.92rem;
  line-height: 1.55;
  word-break: break-word;
}

.chat-message.ai {
  align-self: flex-start;
  background: var(--glass2);
  border: 1px solid var(--border);
  border-radius: 4px 16px 16px 16px;
  color: var(--text);
}

.chat-message.user {
  align-self: flex-end;
  background: linear-gradient(135deg, var(--red), var(--red-dark));
  color: var(--white);
  border-radius: 16px 4px 16px 16px;
  box-shadow: 0 4px 20px var(--red-glow);
}

/* Typing indicator */
.typing-indicator {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 14px 18px;
}

.typing-indicator span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text-muted);
  animation: typing-bounce 1.2s ease-in-out infinite;
}
.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing-bounce {
  0%, 80%, 100% { transform: scale(1); opacity: 0.4; }
  40% { transform: scale(1.3); opacity: 1; }
}

/* Quick replies */
.quick-replies {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 4px 0 8px 0;
  align-self: flex-start;
  max-width: 90%;
}

.quick-reply-btn {
  background: var(--glass);
  border: 1px solid rgba(200,16,46,0.4);
  color: var(--text);
  padding: 9px 18px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.25s ease;
  backdrop-filter: blur(10px);
  white-space: nowrap;
}

.quick-reply-btn:hover {
  background: rgba(200,16,46,0.1);
  border-color: var(--red);
  color: var(--red);
  box-shadow: 0 0 16px var(--red-glow);
  transform: translateY(-1px);
}

/* ── CHAT SardinAI: starter guidati, chip follow-up, card AI ──── */
.sai-starters {
  align-self: stretch;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  max-width: 92%;
  margin: 2px 0 6px;
}
.sai-starter, .sai-chip {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: rgba(255, 255, 255, 0.92);
  border: 1.5px solid var(--red);
  color: var(--red);
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.3s ease;
}
.sai-starter::before, .sai-chip::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--red);
  transform: translateY(101%);
  border-radius: 42% 42% 0 0;
  transition: transform 0.42s cubic-bezier(0.7, 0, 0.2, 1), border-radius 0.42s cubic-bezier(0.7, 0, 0.2, 1);
}
@media (hover: hover) {
  .sai-starter:hover::before, .sai-chip:hover::before { transform: translateY(0); border-radius: 0; }
  .sai-starter:hover, .sai-chip:hover { color: #fff; }
}
.sai-starter { text-align: left; padding: 13px 16px; border-radius: 12px; font-size: 0.85rem; }

/* Chip di follow-up (pill) */
.sai-chips {
  align-self: flex-start;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 92%;
  margin: 2px 0 4px;
}
.sai-chip { padding: 8px 16px; border-radius: 999px; font-size: 0.82rem; white-space: nowrap; }

/* Carosello di card suggerite dall'AI: occupa spazio proprio nella chat,
   scorre in orizzontale (grab & drag / touch / rotella), mai clipping verticale */
.sai-cards {
  align-self: stretch;
  position: relative;
  z-index: 1;
  display: flex;
  align-items: stretch;         /* tutte alte uguale, contenuto sempre visibile */
  gap: 12px;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: visible;
  padding: 4px 2px 14px;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
  scrollbar-color: var(--border2) transparent;
  -webkit-overflow-scrolling: touch;
  scroll-padding-left: 2px;
  overscroll-behavior-x: contain;
  margin: 8px 0 14px;          /* spazio sopra e sotto: il carosello è una risposta */
  flex: 0 0 auto;              /* non comprimibile */
}
.sai-cards.is-carousel { cursor: grab; }
.sai-cards.is-grabbing { cursor: grabbing; user-select: none; }
.sai-cards.is-grabbing img { pointer-events: none; }
.sai-cards::-webkit-scrollbar { height: 7px; }
.sai-cards::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 999px; }
.sai-cards::-webkit-scrollbar-track { background: transparent; }
.sai-card {
  scroll-snap-align: start;
  flex: 0 0 clamp(230px, 80%, 268px);   /* responsivo: ~1 card piena + peek su mobile */
  display: flex;
  flex-direction: column;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}
.sai-card:hover, .sai-card:focus-within {
  transform: translateY(-3px);
  border-color: var(--red);
  box-shadow: 0 12px 30px rgba(200, 16, 46, 0.14);
}
.sai-card-img {
  position: relative;
  width: 100%; height: 122px; flex: none;
  background: linear-gradient(135deg, var(--bg2), var(--bg3));
  overflow: hidden;
}
.sai-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sai-card-credit {
  position: absolute; bottom: 4px; right: 5px;
  font-size: 0.62rem; color: #fff; background: rgba(0, 0, 0, 0.55);
  padding: 1px 6px; border-radius: 999px; letter-spacing: 0.02em;
  max-width: 85%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.sai-card-body {
  display: flex; flex-direction: column; gap: 5px;
  padding: 13px 15px 14px; flex: 1 1 auto;
}
.sai-card-title {
  font-weight: 700; font-size: 0.92rem; color: var(--text); line-height: 1.3;
  overflow-wrap: anywhere;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.sai-card-metarow { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.sai-card-meta {
  font-size: 0.67rem; font-weight: 700; color: var(--red); text-transform: uppercase; letter-spacing: 0.04em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0;
}
.sai-card-rating {
  display: inline-flex; align-items: center; gap: 3px; flex: none;
  font-size: 0.72rem; font-weight: 800; color: var(--text-secondary);
}
.sai-card-rating svg { width: 12px; height: 12px; color: #f5a623; }
.sai-card-desc {
  font-size: 0.8rem; line-height: 1.45; color: var(--text-secondary);
  overflow-wrap: anywhere; margin-top: 1px;
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
}
.sai-card-actions {
  display: flex; flex-wrap: wrap; gap: 7px;
  margin-top: auto; padding-top: 11px;
}
.sai-card-btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 7px 11px; border-radius: 9px;
  font-family: inherit; font-size: 0.74rem; font-weight: 700; cursor: pointer;
  border: 1.5px solid var(--red); background: transparent; color: var(--red);
  transition: background 0.2s ease, color 0.2s ease;
  white-space: nowrap;
}
.sai-card-btn svg { width: 12px; height: 12px; flex: none; }
.sai-card-btn:hover { background: rgba(200, 16, 46, 0.08); }
.sai-card-btn.primary { background: var(--red); color: #fff; border-color: var(--red); }
.sai-card-btn.primary:hover { background: var(--red-dark); border-color: var(--red-dark); }

/* ── Itinerario generato dall'AI: risposta a sé, larghezza piena, lunghezza variabile ── */
.sai-itinerary {
  align-self: stretch; width: 100%;
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: 16px; overflow: hidden;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  margin: 6px 0 8px;
}
.sai-itin-head { padding: 18px 20px 16px; background: linear-gradient(135deg, rgba(200, 16, 46, 0.06), transparent); border-bottom: 1px solid var(--border); }
.sai-itin-badge { display: inline-block; font-size: 0.62rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; color: #fff; background: var(--red); padding: 3px 10px; border-radius: 999px; margin-bottom: 9px; }
.sai-itin-title { font-size: 1.06rem; font-weight: 800; color: var(--text); margin: 0 0 5px; line-height: 1.25; }
.sai-itin-summary { font-size: 0.85rem; color: var(--text-secondary); line-height: 1.5; margin: 0; }
.sai-itin-days { list-style: none; margin: 0; padding: 4px 20px; }
.sai-itin-day { display: flex; gap: 14px; padding: 15px 0; }
.sai-itin-day:not(:last-child) { border-bottom: 1px dashed var(--border); }
.sai-itin-daynum span { display: flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50%; background: var(--red); color: #fff; font-weight: 800; font-size: 0.9rem; }
.sai-itin-daybody { flex: 1; min-width: 0; }
.sai-itin-daytitle { font-weight: 700; font-size: 0.92rem; color: var(--text); margin-bottom: 9px; line-height: 1.3; }
.sai-itin-items { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 11px; }
.sai-itin-act { font-size: 0.85rem; color: var(--text); line-height: 1.45; overflow-wrap: anywhere; }
.sai-itin-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; align-items: center; }
.sai-itin-place { display: inline-flex; align-items: center; gap: 4px; font-family: inherit; font-size: 0.72rem; font-weight: 700; color: var(--red); background: rgba(200, 16, 46, 0.08); border: 1px solid rgba(200, 16, 46, 0.2); border-radius: 7px; padding: 3px 8px; cursor: pointer; transition: background 0.18s, color 0.18s; }
.sai-itin-place svg { width: 11px; height: 11px; flex: none; }
.sai-itin-place.static { cursor: default; color: var(--text-secondary); background: var(--bg2); border-color: var(--border); }
.sai-itin-place:not(.static):hover { background: var(--red); color: #fff; border-color: var(--red); }
.sai-itin-tag { font-size: 0.7rem; font-weight: 600; padding: 3px 8px; border-radius: 7px; white-space: nowrap; }
.sai-itin-tag.t-transport { color: #0369a1; background: rgba(3, 105, 161, 0.09); }
.sai-itin-tag.t-cost { color: #15803d; background: rgba(21, 128, 61, 0.1); }
.sai-itin-stay { margin-top: 10px; font-size: 0.78rem; color: var(--text-secondary); background: var(--bg2); border-radius: 8px; padding: 7px 11px; }
.sai-itin-total { padding: 14px 20px; border-top: 1px solid var(--border); font-size: 0.88rem; color: var(--text); }
.sai-itin-total strong { color: var(--red); font-weight: 800; }
.sai-itin-tips { padding: 14px 20px 18px; border-top: 1px solid var(--border); background: var(--bg2); }
.sai-itin-tips-h { font-size: 0.68rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; color: var(--red); margin-bottom: 7px; }
.sai-itin-tips ul { margin: 0; padding-left: 18px; }
.sai-itin-tips li { font-size: 0.8rem; color: var(--text-secondary); line-height: 1.55; margin-bottom: 4px; }

/* Disclaimer trasparenza IA (EU AI Act) */
.sardinai-disclaimer {
  font-size: 0.68rem;
  color: var(--text-muted);
  text-align: center;
  padding: 6px 24px 12px;
  margin: 0;
  line-height: 1.4;
}

/* Input area */
#sardinai-input-area {
  padding: 16px 24px 20px;
  display: none;
  align-items: center;
  gap: 12px;
  border-top: 1px solid var(--border);
  background: rgba(255,255,255,0.85);
  flex-shrink: 0;
  backdrop-filter: blur(10px);
}

#sardinai-input {
  flex: 1;
  background: var(--glass2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 13px 18px;
  border-radius: 12px;
  font-size: 0.92rem;
  outline: none;
  transition: all var(--transition);
}
#sardinai-input:focus { border-color: var(--red); box-shadow: 0 0 20px rgba(200,16,46,0.15); }
#sardinai-input::placeholder { color: var(--text-muted); }

#sardinai-send {
  background: linear-gradient(135deg, var(--red), var(--red-dark));
  border: none;
  color: var(--white);
  width: 44px;
  height: 44px;
  border-radius: 12px;
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  flex-shrink: 0;
  box-shadow: 0 4px 15px var(--red-glow);
}
#sardinai-send:hover { transform: scale(1.08); box-shadow: 0 6px 25px var(--red-glow); }

/* Itinerario risultato */
.itinerary-result {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}

.itinerary-header h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--red);
  margin-bottom: 4px;
}

.itinerary-header p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.itinerary-hotel {
  background: rgba(200,16,46,0.08);
  border: 1px solid rgba(200,16,46,0.25);
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 0.85rem;
  line-height: 1.7;
}

.itinerary-days { display: flex; flex-direction: column; gap: 10px; }

.day-card {
  background: rgba(0,0,0,0.03);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 16px;
}

.day-number {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--red);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.day-content { font-size: 0.84rem; line-height: 1.6; color: var(--text); }

.itinerary-tip {
  background: rgba(200, 150, 0, 0.07);
  border: 1px solid rgba(200, 150, 0, 0.25);
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 0.84rem;
  line-height: 1.6;
  color: rgba(120, 90, 0, 0.9);
}

.hotel-area { font-size: 0.8rem; color: var(--text-muted); }

/* Itinerary enhancements — season badge, transfers, events, seasonal tip */
.itinerary-season-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(0, 191, 255, 0.1);
  border: 1px solid rgba(0, 191, 255, 0.3);
  color: #00BFFF;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-bottom: 10px;
}

.itinerary-transfers {
  margin: 12px 0;
  background: rgba(80, 200, 80, 0.05);
  border: 1px solid rgba(80, 200, 80, 0.2);
  border-radius: 10px;
  padding: 12px 14px;
}
.transfers-title {
  font-size: 0.75rem;
  font-weight: 700;
  color: #50c850;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}
.transfers-grid {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.transfer-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--text);
}
.transfer-item svg { color: #50c850; flex-shrink: 0; }
.transfer-dest { font-weight: 600; flex: 1; }
.transfer-time { color: var(--text-muted); font-size: 0.76rem; }

.itinerary-events {
  margin: 12px 0;
  background: rgba(176, 64, 255, 0.05);
  border: 1px solid rgba(176, 64, 255, 0.2);
  border-radius: 10px;
  padding: 12px 14px;
}
.events-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #B040FF;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 10px;
}
.itin-event-item {
  border-bottom: 1px solid rgba(176, 64, 255, 0.1);
  padding: 7px 0;
}
.itin-event-item:last-child { border-bottom: none; }
.itin-event-name { font-size: 0.82rem; font-weight: 700; color: var(--text); }
.itin-event-meta { font-size: 0.75rem; color: #B040FF; margin: 2px 0; }
.itin-event-desc { font-size: 0.78rem; color: var(--text-muted); line-height: 1.5; }

.itinerary-seasonal-tip {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  background: rgba(0, 191, 255, 0.05);
  border: 1px solid rgba(0, 191, 255, 0.2);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 0.81rem;
  color: var(--text);
  line-height: 1.6;
  margin: 12px 0;
}
.itinerary-seasonal-tip svg { color: #00BFFF; margin-top: 2px; flex-shrink: 0; }

/* ── Itinerari Tool ─────────────────────────────────────────── */
.itinerari-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.itin-card {
  padding: 0;
  cursor: default;
  overflow: hidden;
}

.itin-card-header {
  padding: 14px 16px 16px;
}

.itin-photo-band {
  position: relative;
  height: 110px;
  overflow: hidden;
}

.itin-photo-band img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.itin-card:hover .itin-photo-band img { transform: scale(1.06); }

.itin-photo-band-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.15) 0%, rgba(0,0,0,0.6) 100%);
  pointer-events: none;
}

.itin-days-badge-photo {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(0,0,0,0.6) !important;
  border-color: rgba(255,255,255,0.2) !important;
  color: rgba(255,255,255,0.9) !important;
  backdrop-filter: blur(4px);
}
.itin-card-top {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.itin-badge {
  border: 1px solid;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 10px;
  letter-spacing: 0.04em;
}
.itin-days-badge {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border2);
  border-radius: 20px;
  padding: 2px 10px;
}
.itin-title {
  font-size: 0.97rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 6px;
  line-height: 1.35;
}
.itin-meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}
.itin-tema { font-size: 0.78rem; color: var(--text-muted); }
.itin-zona { font-size: 0.78rem; color: var(--text-muted); }
.itin-stagione { font-size: 0.75rem; color: var(--text-muted); margin-bottom: 10px; }
.itin-expand-btn {
  background: transparent;
  border: 1px solid var(--border2);
  border-radius: 6px;
  color: var(--text-muted);
  font-size: 0.77rem;
  padding: 5px 12px;
  cursor: pointer;
  transition: all 0.2s;
}
.itin-expand-btn:hover { border-color: var(--red); color: var(--red); }
.itin-open .itin-expand-btn { border-color: var(--red); color: var(--red); }
.itin-tappe {
  margin-top: 0;
  border-top: 1px solid var(--border2);
  padding: 12px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.itinerary-day-row {
  display: grid;
  grid-template-columns: 26px 110px 1fr;
  gap: 8px;
  font-size: 0.8rem;
  align-items: baseline;
}
.itin-day-num {
  font-weight: 700;
  color: var(--red);
  font-size: 0.72rem;
}
.itin-day-luogo {
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.itin-day-att { color: var(--text-muted); line-height: 1.5; }

/* cinema / concerto / mostre categories */
.event-category[style*="undefined"] { color: #aaa; }

.restart-btn {
  align-self: center;
  background: transparent;
  border: 1px solid rgba(200,16,46,0.5);
  color: var(--red);
  padding: 12px 32px;
  border-radius: 30px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  margin-top: 8px;
}
.restart-btn:hover {
  background: var(--red);
  color: var(--white);
  box-shadow: 0 0 20px var(--red-glow);
}

/* ── MAP SECTION ───────────────────────────────────────────── */
#map-section {
  display: none;
  padding: 0;
  max-width: 100%;
  position: relative;
}

.map-wrapper {
  position: relative;
  height: calc(100vh - var(--nav-h, 85px));
  height: calc(100dvh - var(--nav-h, 85px));
  width: 100%;
  overflow: hidden; /* i pannelli chiusi fuori schermo non devono allargare la pagina */
}

#map-canvas-container {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

#map-canvas-container canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

/* ── MAP OVERLAY CONTROLS (search + filtri) ─── */
/* Map controls wrapper — absolute top-left, flex row of left/right columns */
.map-controls-group {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 20;
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 8px;
  pointer-events: none; /* transparent to map pan/zoom */
}
.map-controls-group > * { pointer-events: all; }

.map-left-col {
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
  z-index: 3;               /* sopra la colonna destra: il dropdown ricerca copre i bottoni */
}

.map-right-col {
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
  z-index: 2;
}

/* Barra di ricerca */
.map-search-wrap {
  position: relative;
  width: 260px;
}

.map-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255,255,255,0.5);
  pointer-events: none;
}

#map-search-input {
  width: 100%;
  background: rgba(10,10,20,0.35);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 12px;
  padding: 10px 14px 10px 36px;
  font-size: 0.82rem;
  color: #fff;
  outline: none;
  transition: border-color 0.2s, background 0.2s;
  box-shadow: 0 4px 20px rgba(0,0,0,0.35);
  font-family: inherit;
}

#map-search-input::placeholder { color: rgba(255,255,255,0.4); }
#map-search-input:focus {
  background: rgba(10,10,20,0.55);
  border-color: rgba(200,16,46,0.5);
}

.map-search-results {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 60;              /* sopra ai bottoni per poter cliccare i risultati */
  background: rgba(12,12,22,0.92);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}

.map-search-results.open { display: block; }

.search-result-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  cursor: pointer;
  transition: background 0.15s;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover { background: rgba(255,255,255,0.07); }

.search-result-dot {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
}
.search-result-name {
  font-size: 0.82rem; color: #fff; font-weight: 500; flex: 1;
}
.search-result-cat {
  font-size: 0.68rem; color: rgba(255,255,255,0.4); letter-spacing: 0.05em;
}
.search-no-result {
  padding: 12px 14px;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.4);
  text-align: center;
}

/* Bottone Filtri */
.map-filter-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(10,10,20,0.35);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 12px;
  padding: 10px 14px;
  color: rgba(255,255,255,0.8);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
  box-shadow: 0 4px 20px rgba(0,0,0,0.35);
  font-family: inherit;
}
.map-filter-toggle:hover,
.map-filter-toggle.active {
  background: rgba(200,16,46,0.25);
  border-color: rgba(200,16,46,0.5);
  color: #fff;
}
.filter-chevron {
  transition: transform 0.2s;
}
.map-filter-toggle.active .filter-chevron {
  transform: rotate(180deg);
}

.pin-toggle-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(10,10,20,0.35);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 12px;
  padding: 10px 14px;
  color: rgba(255,255,255,0.8);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
  box-shadow: 0 4px 20px rgba(0,0,0,0.35);
  font-family: inherit;
}
.pin-toggle-btn:hover {
  background: rgba(0,180,216,0.2);
  border-color: rgba(0,180,216,0.4);
  color: #fff;
}
.pin-toggle-btn.active {
  background: rgba(0,180,216,0.28);
  border-color: rgba(0,180,216,0.6);
  color: #fff;
}

/* Popup filtri */
.map-filter-wrap { position: relative; }

.map-filter-popup {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  background: rgba(10,10,20,0.88);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 14px;
  padding: 10px;
  min-width: 180px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.55);
  flex-direction: column;
  gap: 4px;
  z-index: 30;
}
.map-filter-popup.open {
  display: flex;
}

.map-filter-chip {
  display: flex;
  align-items: center;
  gap: 9px;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 9px;
  padding: 8px 12px;
  color: rgba(255,255,255,0.65);
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.18s;
  text-align: left;
  font-family: inherit;
}
.map-filter-chip:hover {
  background: rgba(255,255,255,0.06);
  color: #fff;
  border-color: rgba(255,255,255,0.15);
}
.map-filter-chip.active {
  background: rgba(200,16,46,0.15);
  border-color: rgba(200,16,46,0.4);
  color: #fff;
}

.filter-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  object-fit: contain;
  filter: drop-shadow(0 0 1px rgba(255,255,255,0.95)) drop-shadow(0 0 1px rgba(255,255,255,0.7));
}

.filter-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ── HOVER TOOLTIP ─── */
.map-hover-tooltip {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 7px;
  background: rgba(0,0,0,0.80);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 0.78rem;
  color: #ffffff;
  white-space: nowrap;
  pointer-events: none;
  z-index: 15;
  transform: translate(-50%, -100%) translateY(-12px);
  opacity: 0;
  transition: opacity 0.15s;
  box-shadow: 0 4px 20px rgba(0,0,0,0.45);
}
.map-hover-tooltip.active { opacity: 1; }
.dot-hover-popup .maplibregl-popup-content {
  background: rgba(0,0,0,0.80);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  padding: 5px 11px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.45);
  pointer-events: none;
}
.dot-hover-popup .maplibregl-popup-content span { color: #fff !important; }
.dot-hover-popup .maplibregl-popup-tip { display: none; }
.tooltip-dot {
  width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0;
}
.tooltip-name {
  color: #ffffff;
  font-weight: 500;
}
.tooltip-cat {
  font-size: 0.67rem;
  color: rgba(255,255,255,0.65);
  letter-spacing: 0.04em;
}

/* ── QUICK CARD ─── */
.map-quick-card {
  position: absolute;
  bottom: 60px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  width: 300px;
  background: rgba(10,10,20,0.88);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 16px 56px rgba(0,0,0,0.6);
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.35s cubic-bezier(0.16,1,0.3,1);
  pointer-events: none;
  z-index: 22;
}
.map-quick-card.active {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: all;
}

.qc-photo {
  position: relative;
  width: 100%;
  height: 120px;
  overflow: hidden;
}
.qc-photo img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.5s;
}
.map-quick-card:hover .qc-photo img { transform: scale(1.05); }
.qc-photo-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 40%, rgba(0,0,0,0.5));
}
.qc-photo-grad { display: flex; align-items: center; justify-content: center; }

.qc-close {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 5;
  background: rgba(0,0,0,0.5);
  border: 1px solid rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.8);
  width: 26px;
  height: 26px;
  border-radius: 50%;
  font-size: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
  transition: background 0.2s;
}
.qc-close:hover { background: rgba(200,16,46,0.75); }

.qc-body {
  padding: 12px 14px 14px;
}
.qc-cat {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 3px;
}
.qc-name {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 5px;
  line-height: 1.25;
}
.qc-desc {
  font-size: 0.77rem;
  color: rgba(255,255,255,0.6);
  line-height: 1.5;
  margin: 0 0 10px;
}
.qc-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}
.qc-expand {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: rgba(200,16,46,0.18);
  border: 1px solid rgba(200,16,46,0.4);
  color: #fff;
  border-radius: 9px;
  padding: 8px 12px;
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}
.qc-expand:hover {
  background: rgba(200,16,46,0.35);
  border-color: rgba(200,16,46,0.7);
}
.qc-gmaps {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 9px;
  color: rgba(255,255,255,0.7);
  transition: all 0.2s;
}
.qc-gmaps:hover {
  background: rgba(0,180,216,0.15);
  border-color: rgba(0,180,216,0.4);
  color: rgb(0,180,216);
}

.filter-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  object-fit: contain;
  filter: drop-shadow(0 0 1px rgba(255,255,255,0.95)) drop-shadow(0 0 1px rgba(255,255,255,0.7));
}

.filter-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Info panel — definizione completa nel blocco MAP INFO PANEL più in basso */

.map-info-close {
  background: var(--glass);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 5px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.78rem;
  float: right;
  margin-bottom: 12px;
  transition: all var(--transition);
}
.map-info-close:hover { background: rgba(200,16,46,0.12); border-color: var(--red); color: var(--red); }

.map-info-category {
  font-size: 0.68rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 6px;
  clear: both;
}

.map-info-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 10px;
}

.map-info-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 14px;
}

.map-info-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 8px;
  font-size: 0.8rem;
}

.map-info-label {
  color: var(--text-muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.map-info-link {
  color: var(--red);
  word-break: break-all;
}
.map-info-link:hover { color: var(--white); }

/* Pin category colors */
.cat-spiaggia { color: #00BFFF; }
.cat-città { color: #555555; }
.cat-hotel { color: #C8102E; }
.cat-ristorante { color: #FF8C00; }
.cat-attrazione { color: #FFD700; }
.cat-parco { color: #32CD32; }
.cat-esperienza { color: #B040FF; }

/* Hint mappa */
/* Istruzioni navigazione: popup chiudibile sotto i controlli (colonna sinistra) */
.map-hint {
  position: relative;
  max-width: 260px;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(0,0,0,0.1);
  color: rgba(0,0,0,0.62);
  padding: 8px 30px 8px 12px;
  border-radius: 12px;
  font-size: 0.72rem;
  line-height: 1.45;
  letter-spacing: 0.2px;
  pointer-events: all;
  box-shadow: 0 3px 12px rgba(0,0,0,0.12);
}
.map-hint.is-hidden { display: none; }
.map-hint-close {
  position: absolute;
  top: 4px; right: 5px;
  width: 20px; height: 20px;
  border: none; background: transparent;
  color: rgba(0,0,0,0.4);
  font-size: 1.05rem; line-height: 1;
  cursor: pointer; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s, color 0.2s;
}
.map-hint-close:hover { background: rgba(0,0,0,0.08); color: var(--red); }

/* ── TOOLS SECTION ─────────────────────────────────────────── */
#tools-section {
  display: none;
}

.tools-section-title {
  font-size: clamp(22px, 4vw, 32px);
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text);
}

.tools-section-subtitle {
  color: var(--text-muted);
  margin-bottom: 48px;
  font-size: 0.95rem;
}

/* Grid card tools */
#tools-menu {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 18px;
  max-width: 1400px;
  margin: 0 auto;
}

.tool-card {
  background: var(--glass);
  border: 1px solid var(--border);
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
  border-radius: 20px;
  padding: 40px 32px;
  cursor: pointer;
  text-align: center;
  transition: all 0.35s ease;
  position: relative;
  overflow: hidden;
}

.tool-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at top left, rgba(200,16,46,0.1) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.35s;
}

.tool-card:hover {
  transform: translateY(-5px);
  border-color: rgba(200,16,46,0.35);
  box-shadow: 0 16px 50px rgba(0,0,0,0.1), 0 0 25px rgba(200,16,46,0.12);
}

.tool-card:hover::before { opacity: 1; }

.tool-icon-wrap {
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(200, 16, 46, 0.08);
  border: 1px solid rgba(200, 16, 46, 0.2);
  border-radius: 14px;
  margin-bottom: 18px;
  color: var(--red);
  transition: all var(--transition);
}

.tool-card:hover .tool-icon-wrap {
  background: rgba(200, 16, 46, 0.15);
  border-color: rgba(200, 16, 46, 0.5);
  box-shadow: 0 0 16px rgba(200, 16, 46, 0.2);
}

/* legacy fallback */
.tool-icon { font-size: 44px; margin-bottom: 18px; display: block; }
.tool-title { font-size: 1.15rem; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.tool-desc { font-size: 0.82rem; color: var(--text-muted); line-height: 1.5; }

/* Contenuto tools dinamico */
#tools-content {
  display: none;
  -webkit-overflow-scrolling: touch;
}

.tools-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}

.tools-section-header h2 {
  font-size: clamp(20px, 3vw, 28px);
  font-weight: 700;
  color: var(--text);
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 0.87rem;
  margin-bottom: 28px;
  line-height: 1.5;
}

/* Barra superiore dei tool: back button ancorato in alto a destra, sticky */
.tools-topbar {
  position: sticky;
  top: calc(var(--navbar-h) + var(--space-2));
  z-index: 6;
  display: flex;
  justify-content: flex-end;
  margin-bottom: var(--space-4);
  pointer-events: none;
}
.tools-topbar .tools-back-btn { pointer-events: auto; }

.tools-back-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1.5px solid var(--red);
  color: var(--red);
  padding: var(--btn-pad-y) var(--btn-pad-x);
  border-radius: var(--btn-radius);
  cursor: pointer;
  font-size: var(--btn-font);
  font-weight: 600;
  font-family: inherit;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  transition: color 0.3s ease, border-color 0.25s ease, transform 0.2s ease;
}
.tools-back-btn svg { transition: transform 0.25s cubic-bezier(0.7, 0, 0.2, 1); }
@media (hover: hover) {
  .tools-back-btn:hover { color: var(--white); border-color: var(--red); }
  .tools-back-btn:hover svg { transform: translateX(-3px); }
}

/* ── EVENTS ────────────────────────────────────────────────── */
.events-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr));
  gap: 20px;
}

.event-card {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 20px;
  border-radius: 14px;
}

.event-date-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 54px;
  height: 60px;
  /* background set inline per colore categoria */
  border-radius: 10px;
  border: 1.5px solid;
  background: rgba(0,0,0,0.03);
  flex-shrink: 0;
}

.event-day {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
}

.event-month {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
}

.event-body { flex: 1; }

.event-category {
  font-size: 0.68rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.event-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.event-location { font-size: 0.78rem; color: var(--text-muted); margin-bottom: 8px; }

.event-desc { font-size: 0.82rem; color: var(--text-muted); line-height: 1.5; margin-bottom: 8px; }

.event-link { font-size: 0.8rem; color: var(--red); }
.event-link:hover { color: var(--red-dark); }

.no-events {
  grid-column: 1/-1;
  text-align: center;
  color: var(--text-muted);
  padding: 40px;
  font-size: 0.9rem;
}

.tools-filter { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* ── VIEW TOGGLE ────────────────────────────────────────────── */
.view-toggle {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr; /* due colonne sempre identiche, a prescindere dal testo */
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 3px;
}

.view-toggle-indicator {
  position: absolute;
  top: 3px;
  left: 3px;
  width: calc(50% - 3px);
  bottom: 3px;
  background: var(--red);
  border-radius: 7px;
  transform: translateX(0);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}
.view-toggle-indicator.right { transform: translateX(100%); }

.view-toggle-btn {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  padding: 6px 14px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 7px;
  transition: color 0.2s;
  white-space: nowrap;
}
.view-toggle-btn.active { color: #fff; }

/* ── CALENDAR GRID ──────────────────────────────────────────── */
.cal-grid-container { width: 100%; }

.cal-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.cal-month-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  text-align: center;
}

.cal-nav-btn {
  background: var(--glass);
  border: 1px solid var(--border);
  color: var(--text);
  width: 34px;
  height: 34px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, border-color 0.2s;
}
.cal-nav-btn:hover { background: var(--border); border-color: var(--border2); }

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
}

.cal-day-header {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 6px 2px;
}

.cal-day-cell {
  min-height: 70px;
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 5px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  transition: border-color 0.2s;
}
.cal-day-cell.cal-day-empty { background: transparent; border-color: transparent; }
.cal-day-cell.has-events { border-color: var(--border2); }

.cal-day-num {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  line-height: 1;
  margin-bottom: 2px;
}
.cal-day-cell.has-events .cal-day-num { color: var(--text); }

.cal-event-chip {
  border-radius: 4px;
  padding: 3px 5px;
  cursor: pointer;
  overflow: hidden;
  transition: opacity 0.15s;
}
.cal-event-chip:hover { opacity: 0.78; }

.cal-chip-cat {
  display: block;
  font-size: 0.58rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cal-chip-name {
  display: block;
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

@media (max-width: 600px) {
  .cal-grid { gap: 2px; }
  .cal-day-cell { min-height: 54px; padding: 4px 3px; }
  .cal-day-num { font-size: 0.72rem; }
  .cal-chip-cat { display: none; }
  .cal-chip-name { font-size: 0.6rem; }
  .cal-month-title { font-size: 0.95rem; }
}

/* ── CALENDAR FILTERS ROW ───────────────────────────────────── */
.cal-filters-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.cal-filters-row .glass-select {
  flex: 1;
  min-width: 140px;
}

/* ── EVENT DETAIL MODAL ─────────────────────────────────────── */
.event-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 20px;
}
.event-modal-box {
  max-width: 500px;
  width: 100%;
  position: relative;
  padding: 28px 28px 24px;
  border-radius: 16px;
}
.event-modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: none;
  border: none;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  color: var(--text-muted, #888);
  transition: color 0.15s;
}
.event-modal-close:hover { color: var(--red); }

/* ── EVENTS MONTH GROUPS (list default view) ────────────────── */
.events-month-group { margin-bottom: 36px; }
.events-month-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--red);
  text-transform: uppercase;
  letter-spacing: 3px;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(200,16,46,0.2);
}

/* ── FILTER PILLS ────────────────────────────────────────────── */
.tool-filter-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.filter-pill {
  background: var(--glass);
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: 20px;
  padding: 6px 16px;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
@media (hover: hover) { .filter-pill:not(.active):hover { border-color: var(--red); color: #fff; } }
.filter-pill.active { background: var(--red); border-color: var(--red); color: #fff; }

/* ── SENTIERI ────────────────────────────────────────────────── */
.sentieri-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
  gap: 20px;
}
.sentiero-card {
  padding: 22px; border-radius: 16px;
  display: flex; flex-direction: column; gap: 12px;
}
.sentiero-head { display: flex; flex-direction: column; gap: 4px; }
.sentiero-badge {
  display: inline-block; font-size: 0.62rem; font-weight: 700;
  letter-spacing: 1.5px; text-transform: uppercase;
  border: 1px solid; border-radius: 12px;
  padding: 2px 10px; width: fit-content; margin-bottom: 2px;
}
.sentiero-name { font-size: 1.02rem; font-weight: 700; color: var(--text); }
.sentiero-zona { font-size: 0.78rem; color: var(--text-muted); }
.sentiero-desc { font-size: 0.82rem; color: var(--text-muted); line-height: 1.6; }
.sentiero-stats {
  display: flex; gap: 0;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border); border-radius: 10px;
  overflow: hidden;
}
.sentiero-stat {
  display: flex; flex-direction: column; gap: 2px;
  flex: 1; padding: 10px 12px;
  border-right: 1px solid var(--border);
}
.sentiero-stat:last-child { border-right: none; }
.stat-val { font-size: 0.88rem; font-weight: 700; color: var(--text); }
.stat-lbl { font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted); }
.sentiero-partenza { font-size: 0.76rem; color: var(--text-muted); }

/* ── RISTORANTI ───────────────────────────────────────────────── */
.ristoranti-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
  gap: 20px;
}
.ristorante-card {
  padding: 22px; border-radius: 16px;
  display: flex; flex-direction: column; gap: 10px;
}
.risto-badges { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.risto-tipo-badge {
  font-size: 0.62rem; font-weight: 700; letter-spacing: 1.5px;
  text-transform: uppercase; border: 1px solid; border-radius: 12px; padding: 2px 10px;
}
.risto-fascia { font-size: 0.85rem; font-weight: 700; color: var(--text-muted); letter-spacing: 1px; }
.michelin-star {
  font-size: 0.7rem; font-weight: 700; color: #FFD700;
  background: rgba(255,215,0,0.12); border: 1px solid rgba(255,215,0,0.3);
  border-radius: 12px; padding: 2px 8px;
}
.ristorante-name { font-size: 1.02rem; font-weight: 700; color: var(--text); }
.ristorante-city { font-size: 0.78rem; color: var(--text-muted); }
.ristorante-desc { font-size: 0.82rem; color: var(--text-muted); line-height: 1.6; }
.risto-specialita { display: flex; flex-wrap: wrap; gap: 6px; }
.spec-tag {
  font-size: 0.7rem; font-weight: 500; color: #FFD700;
  background: rgba(255,215,0,0.1); border: 1px solid rgba(255,215,0,0.22);
  border-radius: 12px; padding: 3px 10px;
}

/* ── HOTEL ───────────────────────────────────────────────────── */
.hotel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
  gap: 20px;
}
.hotel-card {
  padding: 22px; border-radius: 16px;
  display: flex; flex-direction: column; gap: 10px;
}
.hotel-badges { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.hotel-tipo-badge {
  font-size: 0.62rem; font-weight: 700; letter-spacing: 1.5px;
  text-transform: uppercase; color: var(--text-muted);
  border: 1px solid var(--border); border-radius: 12px; padding: 2px 10px;
}
.hotel-stelle { font-size: 0.8rem; color: #FFD700; letter-spacing: 2px; }
.hotel-fascia  { font-size: 0.72rem; font-weight: 600; }
.hotel-name  { font-size: 1.02rem; font-weight: 700; color: var(--text); }
.hotel-city  { font-size: 0.78rem; color: var(--text-muted); }
.hotel-desc  { font-size: 0.82rem; color: var(--text-muted); line-height: 1.6; }
.hotel-servizi { display: flex; flex-wrap: wrap; gap: 6px; }

/* ── CANTINE ─────────────────────────────────────────────────── */
.cantine-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
  gap: 20px;
}

.cantina-card {
  padding: 22px;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cantina-name { font-size: 1.05rem; font-weight: 700; color: var(--text); }
.cantina-city { font-size: 0.78rem; color: var(--text-muted); margin-top: 2px; }
.cantina-desc { font-size: 0.82rem; color: var(--text-muted); line-height: 1.6; }

.cantina-vitigni, .cantina-servizi { display: flex; flex-wrap: wrap; gap: 6px; }

.vitigno-tag {
  font-size: 0.7rem;
  font-weight: 600;
  color: #B040FF;
  background: rgba(176,64,255,0.1);
  border: 1px solid rgba(176,64,255,0.22);
  border-radius: 12px;
  padding: 3px 10px;
}

.servizio-tag {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 3px 10px;
}

.cantina-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  gap: 8px;
}

.cantina-tel { font-size: 0.76rem; color: var(--text-muted); }
.cantina-link { font-size: 0.8rem; color: var(--red); font-weight: 600; text-decoration: none; white-space: nowrap; }
.cantina-link:hover { color: var(--red-dark); }

/* ── MUSEI ───────────────────────────────────────────────────── */
.musei-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
  gap: 20px;
}

.museo-card {
  padding: 22px;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.museo-head { display: flex; flex-direction: column; gap: 4px; }

.museo-tipo-badge {
  display: inline-block;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  border: 1px solid;
  border-radius: 12px;
  padding: 2px 10px;
  width: fit-content;
  margin-bottom: 2px;
}

.museo-name { font-size: 1.02rem; font-weight: 700; color: var(--text); }
.museo-city { font-size: 0.78rem; color: var(--text-muted); }
.museo-desc { font-size: 0.82rem; color: var(--text-muted); line-height: 1.6; }

.museo-info { display: flex; flex-direction: column; gap: 5px; margin-top: 4px; border-top: 1px solid var(--border); padding-top: 10px; }
.museo-info-item { font-size: 0.78rem; color: var(--text-muted); }

/* ── ARTIGIANI ──────────────────────────────────────────────── */
.artigiani-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(min(300px, 100%), 1fr)); gap:1.2rem; margin-top:1rem; }
.artigiano-card { padding:1.4rem; display:flex; flex-direction:column; gap:0.55rem; }
.artg-head { display:flex; align-items:center; justify-content:space-between; }
.artg-spec-badge { font-size:0.7rem; font-weight:700; text-transform:uppercase; letter-spacing:0.07em; padding:0.2rem 0.55rem; border-radius:20px; }
.artg-spec-tessuti    { background:rgba(155,89,182,0.25); color:#c39bd3; }
.artg-spec-gioielli   { background:rgba(241,196,15,0.25); color:#f7dc6f; }
.artg-spec-ceramica   { background:rgba(230,126,34,0.25); color:#f0a15a; }
.artg-spec-coltelli   { background:rgba(200,16,46,0.25);  color:#e74c3c; }
.artg-spec-legno      { background:rgba(39,174,96,0.25);  color:#82e0aa; }
.artg-spec-sughero    { background:rgba(149,165,166,0.25);color:#bdc3c7; }
.artg-spec-cestineria { background:rgba(26,188,156,0.25); color:#76d7c4; }
.artg-spec-merletti   { background:rgba(52,152,219,0.25); color:#7fb3d3; }
.artg-zona { font-size:0.72rem; color:var(--text-muted); }
.artg-name { font-size:1rem; font-weight:700; color:var(--text); }
.artg-city { font-size:0.8rem; color:var(--text-muted); }
.artg-desc { font-size:0.82rem; color:var(--text-secondary); line-height:1.55; flex:1; }
.artg-prodotti { display:flex; flex-wrap:wrap; gap:0.35rem; }
.artg-prod-tag { font-size:0.68rem; padding:0.18rem 0.5rem; border-radius:12px; background:rgba(255,255,255,0.07); border:1px solid var(--border); color:var(--text-muted); }
.artg-footer { display:flex; align-items:center; justify-content:space-between; margin-top:auto; padding-top:0.6rem; border-top:1px solid var(--border); }
.artg-tel { font-size:0.75rem; color:var(--text-muted); }
.artg-link { font-size:0.75rem; color:var(--red); text-decoration:none; font-weight:600; }
.artg-link:hover { text-decoration:underline; }

/* ── GUIDE ──────────────────────────────────────────────────── */
.guide-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(min(300px, 100%), 1fr)); gap:1.2rem; margin-top:1rem; }
.guida-card { padding:1.4rem; display:flex; flex-direction:column; gap:0.55rem; }
.guida-head { display:flex; align-items:center; justify-content:space-between; }
.guida-tipo-badge { font-size:0.7rem; font-weight:700; text-transform:uppercase; letter-spacing:0.07em; padding:0.2rem 0.55rem; border-radius:20px; }
.guida-tipo-trekking    { background:rgba(39,174,96,0.25);  color:#82e0aa; }
.guida-tipo-culturale   { background:rgba(155,89,182,0.25); color:#c39bd3; }
.guida-tipo-mare        { background:rgba(52,152,219,0.25); color:#7fb3d3; }
.guida-tipo-gastronomico{ background:rgba(241,196,15,0.25); color:#f7dc6f; }
.guida-tipo-esperienze  { background:rgba(200,16,46,0.25);  color:#e74c3c; }
.guida-zona { font-size:0.72rem; color:var(--text-muted); }
.guida-name { font-size:1rem; font-weight:700; color:var(--text); }
.guida-city { font-size:0.8rem; color:var(--text-muted); }
.guida-desc { font-size:0.82rem; color:var(--text-secondary); line-height:1.55; flex:1; }
.guida-lingue { display:flex; flex-wrap:wrap; gap:0.3rem; }
.guida-lang-tag { font-size:0.68rem; padding:0.18rem 0.45rem; border-radius:10px; background:rgba(255,255,255,0.1); border:1px solid var(--border); color:var(--text); font-weight:700; }
.guida-footer { display:flex; align-items:center; justify-content:space-between; margin-top:auto; padding-top:0.6rem; border-top:1px solid var(--border); }
.guida-tel { font-size:0.75rem; color:var(--text-muted); }
.guida-link { font-size:0.75rem; color:var(--red); text-decoration:none; font-weight:600; }
.guida-link:hover { text-decoration:underline; }

/* ── COMUNI ─────────────────────────────────────────────────── */
.comuni-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(min(320px, 100%), 1fr)); gap:1.2rem; margin-top:1rem; }
.comune-card { padding:1.4rem; display:flex; flex-direction:column; gap:0.55rem; }
.comune-head { display:flex; align-items:center; justify-content:space-between; }
.comune-prov-badge { font-size:0.7rem; font-weight:700; letter-spacing:0.08em; padding:0.2rem 0.55rem; border-radius:20px; background:rgba(200,16,46,0.2); color:#e74c3c; }
.comune-pop { font-size:0.72rem; color:var(--text-muted); }
.comune-name { font-size:1.15rem; font-weight:800; color:var(--text); letter-spacing:-0.02em; }
.comune-alt { font-size:0.72rem; color:var(--text-muted); margin-top:-0.3rem; }
.comune-desc { font-size:0.82rem; color:var(--text-secondary); line-height:1.55; flex:1; }
.comune-attrazioni { background:rgba(255,255,255,0.04); border-radius:8px; padding:0.7rem 0.9rem; }
.comune-attr-label { font-size:0.7rem; font-weight:700; text-transform:uppercase; letter-spacing:0.07em; color:var(--text-muted); margin-bottom:0.4rem; }
.comune-attr-list { list-style:none; padding:0; margin:0; display:flex; flex-direction:column; gap:0.25rem; }
.comune-attr-list li { font-size:0.8rem; color:var(--text-secondary); padding-left:0.8rem; position:relative; }
.comune-attr-list li::before { content:'→'; position:absolute; left:0; color:var(--red); font-size:0.7rem; top:0.05rem; }
.comune-footer { margin-top:auto; padding-top:0.6rem; border-top:1px solid var(--border); }
.comune-link { font-size:0.75rem; color:var(--red); text-decoration:none; font-weight:600; }
.comune-link:hover { text-decoration:underline; }

/* ── PRODOTTI ───────────────────────────────────────────────── */
.prodotti-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(min(300px, 100%), 1fr)); gap:1.2rem; margin-top:1rem; }
.prodotto-card { padding:1.4rem; display:flex; flex-direction:column; gap:0.55rem; }
.prodotto-head { display:flex; align-items:center; gap:0.5rem; }
.prodotto-cat-badge { font-size:0.7rem; font-weight:700; text-transform:uppercase; letter-spacing:0.07em; padding:0.2rem 0.55rem; border-radius:20px; }
.prodotto-cat-gastronomia { background:rgba(39,174,96,0.2);  color:#82e0aa; }
.prodotto-cat-vini        { background:rgba(155,89,182,0.2); color:#c39bd3; }
.prodotto-cat-liquori     { background:rgba(241,196,15,0.2); color:#f7dc6f; }
.prodotto-cat-artigianato { background:rgba(230,126,34,0.2); color:#f0a15a; }
.prodotto-cert { font-size:0.65rem; font-weight:800; padding:0.2rem 0.45rem; border-radius:10px; color:#fff; letter-spacing:0.05em; }
.prodotto-name { font-size:1rem; font-weight:700; color:var(--text); }
.prodotto-zona { font-size:0.76rem; color:var(--text-muted); }
.prodotto-desc { font-size:0.82rem; color:var(--text-secondary); line-height:1.55; flex:1; }
.prodotto-dove { font-size:0.78rem; color:var(--text-secondary); background:rgba(255,255,255,0.04); border-radius:6px; padding:0.5rem 0.7rem; }
.prodotto-dove-label { font-weight:600; color:var(--text-muted); }
.prodotto-footer { margin-top:auto; padding-top:0.6rem; border-top:1px solid var(--border); }
.prodotto-link { font-size:0.75rem; color:var(--red); text-decoration:none; font-weight:600; }
.prodotto-link:hover { text-decoration:underline; }
.prodotti-artigiani-note { font-size:0.8rem; color:var(--text-muted); margin-bottom:0.2rem; }
.prodotti-artig-link { background:none; border:none; color:var(--red); font-size:0.8rem; font-weight:700; cursor:pointer; text-decoration:underline; padding:0; }

/* ── COMING SOON ────────────────────────────────────────────── */
.coming-soon-badge {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--red);
  background: rgba(200,16,46,0.08);
  border: 1px solid rgba(200,16,46,0.2);
  border-radius: 20px;
  padding: 4px 12px;
  white-space: nowrap;
}

.coming-soon-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 56px 24px 32px;
  max-width: 480px;
  margin: 0 auto;
  gap: 14px;
}

.coming-soon-illus { color: var(--text-muted); }

.coming-soon-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.65;
}

.coming-soon-note {
  font-size: 0.75rem;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px 16px;
  margin-top: 4px;
}

.coming-soon-skeleton {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr));
  gap: 14px;
  opacity: 0.35;
  pointer-events: none;
}

.skeleton-card {
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sk-line {
  background: var(--border2);
  border-radius: 4px;
  height: 11px;
  animation: sk-pulse 1.8s ease-in-out infinite;
}
.sk-title { width: 55%; height: 15px; }
.sk-mid   { width: 80%; }
.sk-short { width: 35%; }

@keyframes sk-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.3; }
}

/* ── PRENOTAZIONI HUB ────────────────────────────────────────── */
.prenot-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  width: 100%;
  margin-top: -4px;
}

.prenotazioni-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr));
  gap: 20px;
}

.prenot-card {
  padding: 22px;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.prenot-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.prenot-icon-wrap {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(200,16,46,0.07);
  border: 1px solid rgba(200,16,46,0.18);
  border-radius: 10px;
  color: var(--red);
  flex-shrink: 0;
}

.prenot-title {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.prenot-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.prenot-links {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.prenot-link {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text);
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 12px;
  text-decoration: none;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.prenot-link:hover {
  border-color: rgba(200,16,46,0.35);
  color: var(--red);
  background: rgba(200,16,46,0.04);
}

/* ── PACCHETTI VIAGGIO ───────────────────────────────────────── */
.pacchetti-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
  gap: 20px;
}

.pacchetto-card {
  padding: 22px;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.pacchetto-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.pacchetto-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.pacchetto-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.76rem;
  color: var(--text-muted);
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 4px 10px;
}

.pacchetto-price {
  color: var(--red);
  border-color: rgba(200,16,46,0.2);
  background: rgba(200,16,46,0.06);
}

.pacchetti-note {
  margin-top: 16px;
  font-size: 0.74rem;
  color: var(--text-muted);
  opacity: 0.6;
  text-align: center;
}

/* ── BIGLIETTI GRID ──────────────────────────────────────────── */
.biglietti-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.biglietto-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 20px;
  border-radius: 14px;
  text-decoration: none;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.biglietto-card:hover {
  border-color: rgba(200,16,46,0.35);
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.08);
}

.biglietto-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

.biglietto-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.5;
  flex: 1;
}

.biglietto-cta {
  font-size: 0.8rem;
  color: var(--red);
  font-weight: 600;
  margin-top: 8px;
}

/* ── BEACHES ───────────────────────────────────────────────── */
.beaches-meta { display: flex; align-items: center; gap: 14px; }
.update-time { font-size: 0.78rem; color: var(--text-muted); }

.beaches-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr));
  gap: 18px;
}

.beach-card {
  padding: 0;
  border-radius: 14px;
  overflow: hidden;
}

/* Photo header for beach cards */
.beach-photo-wrap {
  position: relative;
  width: 100%;
  height: 180px;
  background: linear-gradient(160deg, #0a2a4a 0%, #0d5fa6 50%, #00bfff 100%);
  overflow: hidden;
}

.beach-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.beach-card:hover .beach-photo { transform: scale(1.05); }

.beach-photo-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 35%, rgba(0,0,0,0.45) 100%);
  pointer-events: none;
}

.beach-photo-credit {
  position: absolute;
  bottom: 4px;
  right: 6px;
  font-size: 0.62rem;
  color: #fff;
  background: rgba(0,0,0,0.55);
  padding: 1px 7px;
  border-radius: 999px;
  max-width: 88%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  z-index: 2;
}

.beach-status-overlay {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
}

.beach-body {
  padding: 16px;
}

.beach-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 6px;
  gap: 10px;
}

.beach-name { font-size: 1rem; font-weight: 700; color: var(--text); }

.beach-status {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 4px 10px;
  border-radius: 20px;
  white-space: nowrap;
  flex-shrink: 0;
}

.beach-location { font-size: 0.78rem; color: var(--text-muted); margin-bottom: 4px; }
.beach-type { font-size: 0.76rem; color: var(--text-muted); margin-bottom: 14px; font-style: italic; }

.beach-stats {
  display: flex;
  justify-content: space-between;
  margin-bottom: 14px;
}

.beach-stat { text-align: center; }
.stat-label-top { font-size: 0.68rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 3px; }
.stat-value { font-size: 1rem; font-weight: 700; color: var(--text); }
.stat-label { font-size: 0.7rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }

.beach-info { margin-top: 14px; border-top: 1px solid rgba(0,0,0,0.08); padding-top: 12px; display: flex; flex-direction: column; gap: 6px; }
.beach-info-row { display: flex; gap: 8px; font-size: 0.74rem; line-height: 1.4; }
.info-label { color: var(--red); font-weight: 600; white-space: nowrap; min-width: 70px; }
.info-val { color: var(--text-muted); }

.wind-bar {
  height: 3px;
  background: rgba(0,0,0,0.08);
  border-radius: 2px;
  overflow: hidden;
}
.wind-bar-fill { height: 100%; border-radius: 2px; transition: width 0.5s ease; }

.status-great   { background: rgba(34,197,94,0.2);  color: #22c55e; }
.status-good    { background: rgba(234,179,8,0.2);  color: #ca9a00; }
.status-warn    { background: rgba(234,120,8,0.2);  color: #c45500; }
.status-bad     { background: rgba(239,68,68,0.2);  color: #ef4444; }
.status-unknown { background: rgba(0,0,0,0.07);     color: rgba(0,0,0,0.4); }
.status-loading { background: rgba(0,0,0,0.07);     color: rgba(0,0,0,0.35); }

.wind-bar-fill.status-great   { background: #22c55e; }
.wind-bar-fill.status-good    { background: #eab308; }
.wind-bar-fill.status-warn    { background: #f97316; }
.wind-bar-fill.status-bad     { background: #ef4444; }
.wind-bar-fill.status-unknown { background: rgba(0,0,0,0.15); }

/* beach search */
.beach-search-wrap {
  position: relative;
  max-width: 440px;
  margin-bottom: 20px;
}
.beach-search-input {
  width: 100%;
  padding: 10px 16px;
  border-radius: 10px;
  border: 1.5px solid var(--border2);
  background: var(--glass2);
  font-size: 0.88rem;
  color: var(--text);
  outline: none;
  box-sizing: border-box;
}
.beach-search-input:focus { border-color: #0066CC; }
.beach-search-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--glass2);
  border: 1px solid var(--border2);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  z-index: 100;
  display: none;
  overflow: hidden;
}
.beach-search-item {
  padding: 10px 14px;
  cursor: pointer;
  transition: background 0.15s;
  border-bottom: 1px solid var(--border);
}
.beach-search-item:last-child { border-bottom: none; }
.beach-search-item:hover { background: rgba(0,102,204,0.07); }
.bsi-name { font-size: 0.85rem; font-weight: 600; color: var(--text); }
.bsi-desc { font-size: 0.74rem; color: var(--text-muted); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.beach-search-empty { font-size: 0.82rem; color: var(--text-muted); padding: 12px 14px; }
.beach-search-results { }

/* search detail card */
.beach-search-detail {
  padding: 18px;
  border-radius: 14px;
  margin-bottom: 24px;
  background: var(--glass);
}
.beach-search-detail-loading {
  font-size: 0.82rem;
  color: var(--text-muted);
  padding: 12px 0 20px;
}
.bsd-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
}
.bsd-name { font-size: 1rem; font-weight: 700; color: var(--text); }
.bsd-desc { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 8px; }
.bsd-coords { font-size: 0.72rem; color: var(--text-muted); margin-top: 10px; }
.bsd-coords a { color: #0055aa; text-decoration: none; }
.bsd-coords a:hover { text-decoration: underline; }

/* inline cards */
.beach-condition-label {
  font-size: 0.77rem;
  color: var(--text-muted);
  margin: 4px 0 10px;
  line-height: 1.4;
}
.wind-dir { font-size: 0.65rem; font-weight: 600; vertical-align: middle; }
.stat-gusts { font-size: 0.65rem; color: var(--text-muted); margin-top: 1px; }
.beach-skeleton { height: 60px; background: rgba(0,0,0,0.05); border-radius: 8px; margin-top: 12px; }

/* ── CAMPER ────────────────────────────────────────────────── */
.camper-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(290px, 100%), 1fr));
  gap: 20px;
}

.camper-card { padding: 20px; border-radius: 14px; }

.camper-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
  gap: 10px;
}

.camper-name { font-size: 1rem; font-weight: 700; color: var(--text); }
.camper-cost { font-size: 0.82rem; color: var(--red); font-weight: 600; white-space: nowrap; }
.camper-location { font-size: 0.78rem; color: var(--text-muted); margin-bottom: 4px; }
.camper-coords { font-size: 0.74rem; color: var(--text-muted); margin-bottom: 14px; opacity: 0.7; }

.camper-services {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 14px;
}

.service-badge {
  font-size: 0.72rem;
  background: rgba(0,0,0,0.04);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: 6px;
  color: var(--text-muted);
  white-space: nowrap;
}

.camper-notes {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
  font-style: italic;
}

/* ── SPORTS ────────────────────────────────────────────────── */
.sports-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
  gap: 20px;
}

.sport-card { padding: 22px; border-radius: 14px; }

.sport-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.sport-icon { font-size: 2rem; }

.sport-name { font-size: 1.15rem; font-weight: 700; color: var(--text); }

.sport-meta { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }

.sport-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  gap: 12px;
}

.sport-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  flex-shrink: 0;
  margin-bottom: 4px;
}

.sport-level { font-weight: 600; font-size: 0.82rem; }

.sport-operators { margin-bottom: 14px; }

.sport-operator {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.82rem;
}

.sport-operator:last-child { border-bottom: none; }

.sport-operator strong { color: var(--text); font-size: 0.85rem; }

.op-tel, .op-web { color: var(--text-muted); font-size: 0.78rem; }
.op-tel:hover, .op-web:hover { color: var(--red); }

.sport-op-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.sport-op-rating {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  flex-shrink: 0;
  font-size: 0.76rem;
  font-weight: 700;
  color: #b8860b;
}
.sport-op-rating svg { color: #f5b301; }
.sport-op-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 5px;
}
.op-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.74rem;
  color: var(--text-muted);
  background: rgba(0,0,0,0.04);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 3px 9px;
  cursor: pointer;
  transition: color .18s ease, border-color .18s ease, background .18s ease;
}
@media (hover: hover) { .op-link:hover { color: var(--red); border-color: rgba(200,16,46,0.4); } }
.op-map {
  color: #fff;
  background: var(--red);
  border-color: var(--red);
}
.op-map:hover { color: #fff; background: #a50d26; border-color: #a50d26; }

.sport-areas { }

.areas-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.area-tag {
  font-size: 0.74rem;
  background: rgba(200,16,46,0.1);
  border: 1px solid rgba(200,16,46,0.25);
  color: rgba(200,16,46,0.9);
  padding: 4px 10px;
  border-radius: 6px;
}

/* ── RESPONSIVE ────────────────────────────────────────────── */
@media (max-width: 900px) {
  .selector-cards {
    grid-template-columns: 1fr;
    max-width: 440px;
  }

  .selector-card { padding: 32px 24px; }

  #tools-menu {
    grid-template-columns: 1fr;
    max-width: 420px;
  }

  /* Mappa fullscreen anche su tablet/mobile */
  #map-canvas-container {
    position: absolute;
    inset: 0;
    height: 100%;
  }

  .map-search-wrap { width: 200px; }

  #map-info-panel {
    width: calc(100% - 32px);
    left: 16px;
    right: 16px;
    top: auto;
    bottom: 16px;
    max-height: 65vh;
    transform: translateY(calc(100% + 20px));
  }
  #map-info-panel.active { transform: translateY(0); }

  .map-quick-card {
    width: calc(100% - 32px);
    bottom: 56px;
  }

  /* Route planner panel — bottom sheet on tablet/mobile */
  #route-planner-panel {
    width: 100% !important;
    max-width: 100% !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    top: auto !important;
    border-radius: 20px 20px 0 0 !important;
    max-height: 75vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .map-hint { display: none; }

  /* MapLibre zoom controls: move to bottom-right on tablet */
  .maplibregl-ctrl-top-right {
    top: auto !important;
    bottom: 64px;
    right: 12px;
  }
}

/* ── MAP MOBILE LAYOUT (≤ 600px) ──────────────────────────── */
@media (max-width: 600px) {

  /* Controls group: stretch full width, gap tighter */
  .map-controls-group {
    top: 12px;
    left: 12px;
    right: 12px;
    gap: 6px;
  }

  /* Left column: fill all available horizontal space */
  .map-left-col {
    flex: 1;
    min-width: 0;
  }

  /* Search bar: fill column width */
  .map-search-wrap {
    width: 100%;
  }

  /* Route planner button: same width as search bar */
  #btn-route-planner {
    width: 100%;
    justify-content: center;
    font-size: 0.78rem;
    padding: 8px 12px;
  }

  /* Right column: compact icon-only column */
  .map-right-col {
    flex-shrink: 0;
    gap: 6px;
  }

  /* Pin toggle: icon-only square button */
  .pin-toggle-btn {
    width: 42px;
    height: 42px;
    padding: 0;
    justify-content: center;
    border-radius: 12px;
    gap: 0;
  }
  .pin-toggle-btn span { display: none; }

  /* Filter button: icon-only, no text, no chevron */
  .map-filter-toggle {
    width: 42px;
    height: 42px;
    padding: 0;
    justify-content: center;
    border-radius: 12px;
    gap: 0;
  }
  .map-filter-toggle span[data-i18n] { display: none; }
  .map-filter-toggle .filter-chevron { display: none; }

  /* Filter popup: open to the left (right-aligned to button) */
  .map-filter-popup {
    left: auto;
    right: 0;
    min-width: 200px;
  }

  /* Quick card: wider, sits above reset button */
  .map-quick-card {
    width: calc(100% - 24px);
    left: 12px;
    right: 12px;
    transform: translateX(0) translateY(20px);
    bottom: 60px;
  }
  .map-quick-card.active {
    transform: translateX(0) translateY(0);
  }

  /* Info panel: full-width bottom sheet, taller */
  #map-info-panel {
    width: 100%;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 20px 20px 0 0;
    max-height: 82vh;
    transform: translateY(calc(100% + 20px));
  }
  #map-info-panel.active {
    transform: translateY(0);
  }

  /* Reset button: icona sola, piccolo, tutto a destra, libero dal footer privacy */
  .map-reset-btn {
    right: 10px;
    left: auto;
    bottom: calc(env(safe-area-inset-bottom, 0px) + 56px);
    width: 42px;
    height: 42px;
    padding: 0;
    justify-content: center;
    border-radius: 12px;
  }
  .map-reset-btn span { display: none; }   /* nasconde il testo: solo icona */
  /* Hint navigazione: si adatta alla larghezza dei controlli su mobile */
  .map-hint { max-width: 200px; font-size: 0.68rem; }

  /* MapLibre controls: hidden on mobile (use pinch-to-zoom) */
  .maplibregl-ctrl-top-right { display: none !important; }
}

@media (max-width: 600px) {
  .app-navbar { padding: 12px 16px; }

  .hero-title { letter-spacing: -1px; }

  .lang-selector { top: 14px; right: 14px; }

  .sardinai-header { padding: 16px 18px; }

  #sardinai-chat { padding: 16px 16px; }

  #sardinai-input-area { padding: 12px 16px 16px; }

  .chat-message { max-width: 92%; }

  .main-section { padding: 28px 16px 48px; }

  .events-grid { grid-template-columns: 1fr; }

  .beaches-grid { grid-template-columns: 1fr; }

  .camper-grid { grid-template-columns: 1fr; }

  .sports-grid { grid-template-columns: 1fr; }

  .tools-section-header { flex-direction: column; align-items: flex-start; }
}

/* ── MISC UTILITIES ────────────────────────────────────────── */
strong { font-weight: 600; color: var(--text); }

.text-red { color: var(--red); }
.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }

/* Separatore decorativo */
.divider {
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--red), transparent);
  margin: 16px auto;
}

/* ── MAPLIBRE OVERRIDES ─────────────────────────────────────── */

/* Rimuovi il logo MapLibre (facoltativo) */
.maplibregl-ctrl-logo { display: none !important; }

/* Controlli navigazione */
.maplibregl-ctrl-group {
  background: rgba(255, 255, 255, 0.92) !important;
  border: 1px solid rgba(0,0,0,0.1) !important;
  backdrop-filter: blur(12px);
  border-radius: 10px !important;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,0.12) !important;
}

.maplibregl-ctrl-group button {
  background: transparent !important;
  color: rgba(0,0,0,0.65) !important;
  border-color: rgba(0,0,0,0.07) !important;
  transition: background var(--transition);
}

.maplibregl-ctrl-group button:hover {
  background: rgba(200,16,46,0.1) !important;
  color: var(--red) !important;
}

.maplibregl-ctrl-group button span {
  filter: none !important;
}

/* Attribution */
.maplibregl-ctrl-attrib {
  background: rgba(255,255,255,0.85) !important;
  color: rgba(0,0,0,0.4) !important;
  font-size: 10px !important;
  backdrop-filter: blur(8px);
}

.maplibregl-ctrl-attrib a { color: rgba(0,0,0,0.5) !important; }

/* ── MAP MARKERS ────────────────────────────────────────────── */
.map-marker {
  cursor: pointer;
  transition: transform 0.2s ease;
}

.map-marker:hover {
  transform: scale(1.4);
  z-index: 10;
}

/* ── MAP INFO PANEL ─────────────────────────────────────────── */
#map-info-panel {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 330px;
  max-height: calc(100% - 40px);
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transform: translateX(370px);
  opacity: 0;
  visibility: hidden;
  transition: transform 0.4s cubic-bezier(0.16,1,0.3,1), opacity 0.4s ease, visibility 0s linear 0.4s;
  z-index: 25;
  pointer-events: none;
  box-shadow: 0 12px 48px rgba(0,0,0,0.5);
}

#map-info-panel.active {
  transform: translateX(0);
  opacity: 1;
  visibility: visible;
  transition-delay: 0s;
  pointer-events: all;
}

/* ── PHOTO HEADER ── */
.panel-photo {
  position: relative;
  width: 100%;
  height: 200px;
  overflow: hidden;
  flex-shrink: 0;
}

.panel-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s ease;
}

.panel-photo:hover img { transform: scale(1.04); }

.panel-photo-fallback {
  display: flex;
  align-items: flex-end;
  padding: 14px;
}

.panel-photo-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 40%, rgba(0,0,0,0.55) 100%);
  pointer-events: none;
}

.panel-photo-name-overlay {
  position: relative;
  z-index: 2;
  font-size: 1.1rem;
  font-weight: 800;
  color: rgba(255,255,255,0.9);
  text-shadow: 0 2px 8px rgba(0,0,0,0.5);
  letter-spacing: -0.02em;
}

.panel-close-photo {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 10;
  background: rgba(0,0,0,0.5);
  border: 1px solid rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.9);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  backdrop-filter: blur(4px);
}

.panel-close-photo:hover {
  background: rgba(200,16,46,0.8);
  border-color: rgba(200,16,46,0.5);
}

.panel-photo-cat {
  position: absolute;
  bottom: 10px;
  left: 10px;
  z-index: 2;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 3px 10px;
  border-radius: 20px;
  border: 1px solid;
  backdrop-filter: blur(6px);
}

.panel-photo-credit {
  position: absolute;
  bottom: 5px;
  right: 8px;
  z-index: 2;
  font-size: 0.62rem;
  color: #fff;
  background: rgba(0,0,0,0.55);
  padding: 1px 7px;
  border-radius: 999px;
  max-width: 70%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── PANEL BODY ── */
.panel-inner {
  padding: 18px 18px 20px;
  overflow-y: auto;
  flex: 1;
}

.panel-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
  line-height: 1.3;
}

.panel-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 14px;
}

/* Badge valutazione Google */
.panel-rating {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
  padding: 4px 10px;
  background: rgba(200, 16, 46, 0.07);
  border: 1px solid rgba(200, 16, 46, 0.18);
  border-radius: 999px;
  color: var(--red);
  font-size: 0.82rem;
}
.panel-rating strong { font-weight: 800; }
.panel-rating-count { color: var(--text-muted); font-size: 0.72rem; font-weight: 600; }

/* Orari Google (collassabili) */
.panel-hours-src {
  font-size: 0.55rem; font-weight: 700; letter-spacing: 0.06em;
  color: var(--text-muted); border: 1px solid var(--border2);
  border-radius: 4px; padding: 1px 4px; margin-left: 4px;
}
.panel-hours summary {
  cursor: pointer; list-style: none; font-size: 0.79rem;
  color: var(--text-secondary); display: flex; align-items: center; gap: 6px;
}
.panel-hours summary::-webkit-details-marker { display: none; }
.panel-hours summary::after { content: '▾'; color: var(--red); font-size: 0.7rem; transition: transform 0.2s; }
.panel-hours[open] summary::after { transform: rotate(180deg); }
.panel-hours-today { font-weight: 600; }
.panel-hours ul { margin: 8px 0 0; padding: 0 0 0 2px; list-style: none; }
.panel-hours li { font-size: 0.75rem; color: var(--text-secondary); line-height: 1.6; }

.panel-meta {
  margin-bottom: 10px;
  padding: 9px 12px;
  background: rgba(255,255,255,0.03);
  border-radius: 8px;
  border-left: 2px solid rgba(200,16,46,0.4);
}

.panel-meta-label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(200,16,46,0.8);
  margin-bottom: 4px;
}

.panel-meta p {
  font-size: 0.79rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0;
}

.panel-contacts {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 14px;
}

.panel-contact-link {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.79rem;
  color: rgba(0,180,216,0.9);
  text-decoration: none;
  padding: 7px 10px;
  background: rgba(0,180,216,0.07);
  border-radius: 7px;
  border: 1px solid rgba(0,180,216,0.2);
  transition: all 0.2s;
  word-break: break-all;
}

.panel-contact-link:hover {
  background: rgba(0,180,216,0.14);
  border-color: rgba(0,180,216,0.4);
}

.panel-actions {
  display: flex;
  gap: 8px;
  margin-top: 6px;
}

.panel-fly-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 0;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: 0.79rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.panel-fly-btn:hover {
  background: rgba(255,255,255,0.1);
  color: #fff;
  transform: translateY(-1px);
}

.panel-gmaps-btn {
  flex: 1.5;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 12px;
  background: linear-gradient(135deg, #1a73e8, #1558b0);
  border-radius: 8px;
  color: #fff;
  font-size: 0.79rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
}

.panel-gmaps-btn:hover {
  opacity: 0.88;
  box-shadow: 0 4px 16px rgba(26,115,232,0.4);
  transform: translateY(-1px);
}

/* ── BTN ARROW ──────────────────────────────────────────────── */
#btn-start {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.btn-arrow {
  width: 18px;
  height: 18px;
  transition: transform var(--transition);
}

/* ── OP NOTE (sport operators note) ────────────────────────── */
.op-note {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-top: 2px;
  font-style: italic;
}

#btn-start:hover .btn-arrow {
  transform: translateX(4px);
}

/* ── MAP RESET BUTTON ───────────────────────────────────────── */
.map-reset-btn {
  position: absolute;
  bottom: 42px;
  right: 16px;
  left: auto;
  transform: none;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(10,10,20,0.55);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.7);
  padding: 8px 18px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.3px;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 16px rgba(0,0,0,0.35);
  white-space: nowrap;
  z-index: 5;
}

.map-reset-btn:hover {
  background: rgba(200,16,46,0.25);
  border-color: rgba(200,16,46,0.5);
  color: #fff;
}

/* ── ROUTE PLANNER ──────────────────────────────────────────── */
#btn-route-planner {
  position: static;
  width: 100%;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 7px;
  background: rgba(10,10,20,0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 10px;
  color: rgba(255,255,255,0.9);
  padding: 9px 14px;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.2px;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
  white-space: nowrap;
  font-family: inherit;
}
#btn-route-planner:hover,
#btn-route-planner.active {
  background: rgba(200,16,46,0.22);
  border-color: rgba(200,16,46,0.5);
  color: #fff;
}
#btn-route-planner svg { flex-shrink: 0; }

#route-planner-panel {
  position: absolute;
  top: 16px;
  left: 16px;
  width: 300px;
  max-height: calc(100% - 32px);
  overflow-y: auto;
  background: rgba(8,8,18,0.94);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.7);
  z-index: 30;
  display: none;
  flex-direction: column;
  gap: 0;
}
#route-planner-panel.open { display: flex; }

.rp-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.rp-header-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.2px;
}
.rp-header-sub {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.4);
  margin-top: 2px;
}
#rp-close {
  background: rgba(255,255,255,0.07);
  border: none;
  color: rgba(255,255,255,0.6);
  width: 28px; height: 28px;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s, color 0.15s;
}
#rp-close:hover { background: rgba(200,16,46,0.3); color: #fff; }

.rp-body { padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }

.rp-stop {
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
}
.rp-stop-num {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.rp-stop-num.rp-end-num { background: rgba(255,255,255,0.15); }
.rp-stop-input {
  flex: 1;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 0.78rem;
  color: #fff;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s;
  width: 100%;
}
.rp-stop-input::placeholder { color: rgba(255,255,255,0.3); }
.rp-stop-input:focus { border-color: rgba(200,16,46,0.5); }
.rp-stop-remove {
  background: none; border: none;
  color: rgba(255,255,255,0.3);
  cursor: pointer; font-size: 1.1rem;
  padding: 0 2px;
  transition: color 0.15s;
  flex-shrink: 0;
}
.rp-stop-remove:hover { color: var(--red); }

.rp-connector {
  display: flex;
  align-items: center;
  padding-left: 11px;
  gap: 8px;
  margin: -2px 0;
}
.rp-connector-line {
  width: 1px; height: 16px;
  background: rgba(255,255,255,0.15);
  margin-left: 0;
}

.rp-add-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.05);
  border: 1px dashed rgba(255,255,255,0.15);
  border-radius: 8px;
  color: rgba(255,255,255,0.5);
  padding: 8px 12px;
  font-size: 0.78rem;
  cursor: pointer;
  transition: all 0.15s;
  width: 100%;
  font-family: inherit;
  margin-top: 2px;
}
.rp-add-btn:hover {
  background: rgba(200,16,46,0.1);
  border-color: rgba(200,16,46,0.35);
  color: rgba(255,255,255,0.85);
}

.rp-transport {
  display: flex;
  gap: 6px;
  margin-top: 4px;
}
.rp-transport-btn {
  flex: 1;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 8px;
  color: rgba(255,255,255,0.5);
  padding: 7px 6px;
  font-size: 0.7rem;
  cursor: pointer;
  text-align: center;
  transition: all 0.15s;
  font-family: inherit;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
}
.rp-transport-btn.active,
.rp-transport-btn:hover {
  background: rgba(200,16,46,0.15);
  border-color: rgba(200,16,46,0.4);
  color: #fff;
}
.rp-transport-icon { font-size: 1rem; }

.rp-calc-btn {
  background: var(--red);
  border: none;
  border-radius: 10px;
  color: #fff;
  padding: 11px 16px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  margin-top: 6px;
  font-family: inherit;
  transition: background 0.2s, transform 0.15s;
  letter-spacing: 0.2px;
}
.rp-calc-btn:hover { background: var(--red-dark); transform: translateY(-1px); }
.rp-calc-btn:disabled { background: rgba(200,16,46,0.35); cursor: not-allowed; transform: none; }

.rp-results {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 14px 16px;
  display: none;
  flex-direction: column;
  gap: 10px;
}
.rp-results.open { display: flex; }

.rp-summary {
  display: flex;
  gap: 8px;
}
.rp-stat {
  flex: 1;
  background: rgba(255,255,255,0.05);
  border-radius: 10px;
  padding: 10px 12px;
  text-align: center;
}
.rp-stat-value {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
}
.rp-stat-label {
  font-size: 0.65rem;
  color: rgba(255,255,255,0.4);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 2px;
}

.rp-legs { display: flex; flex-direction: column; gap: 6px; }
.rp-leg {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 10px;
  background: rgba(255,255,255,0.04);
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.07);
}
.rp-leg-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--red);
  margin-top: 4px;
  flex-shrink: 0;
}
.rp-leg-info { flex: 1; }
.rp-leg-name { font-size: 0.78rem; color: #fff; font-weight: 500; }
.rp-leg-detail { font-size: 0.7rem; color: rgba(255,255,255,0.45); margin-top: 2px; }

.rp-gmaps-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: rgba(66,133,244,0.15);
  border: 1px solid rgba(66,133,244,0.3);
  border-radius: 10px;
  color: rgba(100,160,255,0.9);
  padding: 10px;
  font-size: 0.78rem;
  font-weight: 500;
  text-decoration: none;
  margin-top: 2px;
  transition: background 0.15s;
}
.rp-gmaps-btn:hover { background: rgba(66,133,244,0.25); }

/* ── TRANSPORT SECTION ──────────────────────────────────────── */
.transport-section { margin-bottom: 40px; }
.transport-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid rgba(200,16,46,0.2);
}
.transport-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr));
  gap: 16px;
}
.transport-card {
  padding: 18px 20px;
  border-radius: 14px;
}
.transport-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  border-left: 3px solid;
  padding-left: 10px;
}
.transport-card-header strong { color: var(--text); font-size: 0.95rem; }
.transport-badge {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 10px;
  background: rgba(200,16,46,0.08);
  color: var(--red);
}
.transport-card p { font-size: 0.82rem; color: var(--text-muted); line-height: 1.55; }
.transport-note {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 6px;
  font-style: italic;
}

/* ── SCROLL INVITE ──────────────────────────────────────────── */
.scroll-invite {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: var(--text-muted);
  font-size: 0.72rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  cursor: default;
  user-select: none;
  white-space: nowrap;
}

.scroll-invite-label {
  opacity: 0.7;
}

.scroll-invite-chevrons {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.scroll-invite-chevron {
  width: 20px;
  height: 10px;
  opacity: 0;
  animation: chevron-fall 1.8s ease-in-out infinite;
}

.scroll-invite-chevron:nth-child(2) { animation-delay: 0.25s; }
.scroll-invite-chevron:nth-child(3) { animation-delay: 0.5s; }

@keyframes chevron-fall {
  0%   { opacity: 0; transform: translateY(-6px); }
  40%  { opacity: 1; }
  80%  { opacity: 0; transform: translateY(4px); }
  100% { opacity: 0; }
}

/* ── LANDING SECTIONS ───────────────────────────────────────── */
.landing-sections {
  width: 100%;
  max-width: 100%;
  padding-bottom: 80px;
}

.landing-section {
  padding: 60px 40px 40px;
  max-width: 1200px;
  margin: 0 auto;
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.landing-section.in-view {
  opacity: 1;
  transform: translateY(0);
}

.landing-section + .landing-section {
  border-top: 1px solid var(--border);
}

.landing-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 28px;
  gap: 16px;
  flex-wrap: wrap;
}

.landing-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--red);
  margin-bottom: 6px;
}

.landing-title {
  font-size: clamp(22px, 3.5vw, 34px);
  font-weight: 800;
  color: var(--text);
  line-height: 1.1;
  letter-spacing: -0.5px;
}

.landing-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--red);
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition), gap var(--transition);
  cursor: pointer;
  white-space: nowrap;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  padding: 0;
  margin-bottom: 4px;
}

.landing-cta:hover {
  border-bottom-color: var(--red);
  gap: 10px;
}

/* ── CAROSELLO ──────────────────────────────────────────────── */
.carousel-wrap {
  position: relative;
}

.carousel-track-outer {
  overflow: hidden;
  border-radius: 18px;
}

.carousel-track {
  display: flex;
  gap: 20px;
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: transform;
}

/* Preview card */
.preview-card {
  border-radius: 18px;
  overflow: hidden;
  cursor: pointer;
  background: var(--white);
  border: 1px solid var(--border);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  width: calc((100% - 60px) / 4);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.preview-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 48px rgba(0,0,0,0.12), 0 0 0 1px rgba(200,16,46,0.18);
}

/* Photo area — più grande */
.preview-photo {
  height: 220px;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

.preview-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.55s ease;
}
/* Foto di anteprima sopra il gradiente-fallback, sotto overlay e testo */
.preview-photo-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; }
.preview-photo-overlay, .preview-photo-caption { z-index: 2; }

.preview-card:hover .preview-photo img {
  transform: scale(1.08);
}

.preview-photo-gradient {
  width: 100%;
  height: 100%;
  position: relative;
}

.preview-photo-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.45) 0%, rgba(0,0,0,0.05) 55%, transparent 100%);
}

/* Badge + title sul foto */
.preview-photo-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 14px 14px 12px;
}

.preview-badge {
  display: inline-block;
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  padding: 3px 9px;
  border-radius: 20px;
  background: rgba(255,255,255,0.9);
  color: var(--text);
  backdrop-filter: blur(8px);
  margin-bottom: 6px;
}

.preview-photo-title {
  font-size: 1rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.25;
  text-shadow: 0 1px 6px rgba(0,0,0,0.5);
}

.preview-photo-loc {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.8);
  margin-top: 2px;
  text-shadow: 0 1px 4px rgba(0,0,0,0.4);
}

/* Card body */
.preview-body {
  padding: 14px 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1;
}

.preview-card-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}

.preview-card-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.preview-card-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  font-size: 0.74rem;
  color: var(--red);
  font-weight: 600;
}

.preview-card-meta svg { flex-shrink: 0; }

/* Event card */
.preview-date-strip {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  background: rgba(200,16,46,0.04);
  border-bottom: 1px solid rgba(200,16,46,0.1);
}

.preview-date-day {
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--red);
  line-height: 1;
  min-width: 44px;
}

.preview-date-right { display: flex; flex-direction: column; }

.preview-date-month {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
}

.preview-date-period {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Controlli carosello */
.carousel-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
  justify-content: flex-end;
}

.carousel-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
  flex-shrink: 0;
}

.carousel-btn:hover:not(:disabled) {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
  box-shadow: 0 4px 16px rgba(200,16,46,0.25);
}

.carousel-btn:disabled {
  opacity: 0.3;
  cursor: default;
}

.carousel-dots {
  display: flex;
  gap: 6px;
  align-items: center;
  flex: 1;
}

.carousel-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--border2);
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
  padding: 0;
}

.carousel-dot.active {
  background: var(--red);
  width: 20px;
  border-radius: 3px;
}

/* Animazione in-view */
.landing-section {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.landing-section.in-view {
  opacity: 1;
  transform: translateY(0);
}

.landing-section .preview-card {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.4s ease, transform 0.4s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.landing-section.in-view .preview-card {
  opacity: 1;
  transform: translateY(0);
}

/* Separator + landing container */
.landing-sections { border-top: 1px solid var(--border); }

/* ─── SARDEGNA OGGI ───────────────────────────────────────────── */
.today-hero {
  border-radius: 16px;
  padding: var(--space-6);
  margin-bottom: var(--space-5);
}
.today-season {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--red);
  margin-bottom: var(--space-4);
}
.today-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: var(--space-4);
}
.today-stat { display: flex; flex-direction: column; gap: 4px; }
.today-stat-val { font-size: 1.3rem; font-weight: 800; color: var(--text); line-height: 1.15; }
.today-stat-lbl { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); }
.today-activities {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr));
  gap: var(--space-4);
}
.today-act-card { padding: var(--space-5); border-radius: 14px; }
.today-act-top { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); margin-bottom: var(--space-3); }
.today-act-name { font-weight: 700; font-size: 0.98rem; color: var(--text); }
.today-act-note { font-size: 0.82rem; line-height: 1.5; color: var(--text-secondary); margin: 0; }
.today-source { font-size: 0.72rem; color: var(--text-muted); margin-top: var(--space-5); }

/* ─── GALLERIA ────────────────────────────────────────────────── */
.gallery-grid {
  columns: 3 260px;
  column-gap: var(--space-4);
}
.gallery-item {
  break-inside: avoid;
  margin: 0 0 var(--space-4);
  border-radius: 14px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  background: var(--card-bg);
  border: 1px solid var(--border);
  transition: transform 0.22s, box-shadow 0.22s;
}
.gallery-item:hover { transform: translateY(-3px); box-shadow: 0 14px 34px rgba(0,0,0,0.16); }
.gallery-item img { width: 100%; display: block; }
.gallery-item figcaption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 26px 14px 12px;
  background: linear-gradient(to top, rgba(0,0,0,0.78), transparent);
  color: #fff;
  opacity: 0;
  transition: opacity 0.22s;
  pointer-events: none;
}
.gallery-item:hover figcaption,
.gallery-item:focus-visible figcaption { opacity: 1; }
.gallery-item-title { font-weight: 700; font-size: 0.88rem; line-height: 1.3; }
.gallery-item-author { font-size: 0.72rem; opacity: 0.85; margin-top: 2px; }

/* Lightbox (riparentato in body) */
.gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  background: rgba(0,0,0,0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  padding: var(--space-5);
}
.glb-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: min(1100px, 92vw);
  max-height: 88vh;
}
.glb-img {
  max-width: 100%;
  max-height: 74vh;
  border-radius: 8px;
  object-fit: contain;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.glb-info { text-align: center; color: #fff; margin-top: var(--space-3); }
.glb-title { font-weight: 700; font-size: 1rem; }
.glb-author { font-size: 0.82rem; opacity: 0.9; margin-top: 2px; }
.glb-credit { font-size: 0.72rem; opacity: 0.6; margin-top: 4px; }
.glb-link { display: inline-block; margin-top: var(--space-2); color: #fff; font-size: 0.8rem; font-weight: 600; opacity: 0.9; }
.glb-link:hover { color: #fff; opacity: 1; }
.glb-close {
  position: absolute;
  top: var(--space-5);
  right: var(--space-5);
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.25);
  color: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.glb-close:hover { background: rgba(255,255,255,0.22); }
.glb-nav {
  width: 46px; height: 46px;
  border-radius: 50%;
  flex-shrink: 0;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.22);
  color: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.glb-nav:hover { background: rgba(255,255,255,0.2); }
@media (max-width: 640px) {
  .gallery-grid { columns: 2 150px; }
  .glb-nav { display: none; }
}

/* ─── BANDI & AGEVOLAZIONI ────────────────────────────────────── */
.bandi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr));
  gap: 16px;
}
.bando-card {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 18px 18px 16px;
  border-radius: 14px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  transition: transform 0.22s, box-shadow 0.22s, border-color 0.22s;
}
.bando-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 34px rgba(0,0,0,0.12);
  border-color: var(--border2);
}
.bando-top {
  display: flex;
  align-items: center;
  gap: 8px;
}
.bando-status {
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 20px;
}
.bando-status.st-aperto    { background: rgba(30,120,80,0.14);  color: #1e7850; }
.bando-status.st-sportello { background: rgba(30,120,80,0.10);  color: #1e7850; }
.bando-status.st-apertura  { background: rgba(200,120,0,0.14);  color: #b06a00; }
.bando-status.st-variabile { background: rgba(200,120,0,0.12);  color: #b06a00; }
.bando-status.st-scaduto   { background: rgba(0,0,0,0.06);      color: var(--text-muted); }
.bando-cat {
  margin-left: auto;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--red);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.bando-title {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text);
}
.bando-ente {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-top: -2px;
}
.bando-desc {
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--text-secondary);
  margin: 2px 0;
}
.bando-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 0 4px;
  border-top: 1px solid var(--border);
  margin-top: 2px;
}
.bando-meta-row {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 10px;
  font-size: 0.76rem;
  line-height: 1.4;
  color: var(--text-secondary);
}
.bando-meta-lbl {
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  font-size: 0.64rem;
  letter-spacing: 0.04em;
  padding-top: 1px;
}
.bando-link {
  align-self: flex-start;
  margin-top: 6px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--white);
  background: var(--red);
  padding: 8px 16px;
  border-radius: 8px;
  transition: background 0.2s, transform 0.2s;
}
.bando-link:hover {
  background: var(--red-dark);
  color: var(--white);
  transform: translateX(2px);
}
.bandi-portali {
  margin-top: 30px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
}
.bandi-portali-title {
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.bandi-portali-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.bandi-portale-chip {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--red);
  border: 1px solid var(--border2);
  border-radius: 20px;
  padding: 7px 15px;
  transition: background 0.2s, border-color 0.2s;
}
.bandi-portale-chip:hover {
  background: var(--red-glow);
  border-color: var(--red);
}

/* ─── SOCIAL WALL ─────────────────────────────────────────────── */
.sw-controls {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 28px;
}

.sw-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
  background: rgba(0,0,0,0.03);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0 14px;
  transition: border-color 0.2s;
}
.sw-search-wrap:focus-within {
  border-color: var(--red);
  background: var(--red-glow);
}
.sw-search-icon { opacity: 0.45; flex-shrink: 0; }
#sw-search {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 0.88rem;
  font-family: inherit;
  padding: 12px 10px;
}
#sw-search::placeholder { color: var(--text-muted); }
.sw-clear-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.9rem;
  cursor: pointer;
  padding: 4px 6px;
  display: flex;
  align-items: center;
  transition: color 0.15s;
}
.sw-clear-btn:hover { color: var(--text); }

.sw-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.sw-chip {
  padding: 6px 15px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.sw-chip:hover { border-color: var(--border2); color: var(--text); }
.sw-chip.active {
  background: var(--red-glow);
  border-color: var(--red);
  color: var(--red);
  font-weight: 600;
}

.sw-account-wrap { display: flex; align-items: center; }
.sw-account-sel {
  background: rgba(0,0,0,0.03);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-family: inherit;
  padding: 8px 12px;
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s;
}
.sw-account-sel:hover, .sw-account-sel:focus { border-color: var(--border2); color: var(--text); }
.sw-account-sel option { background: var(--white); color: var(--text); }

/* Section labels */
.sw-section-label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 16px;
}
.sw-label-all {
  margin-top: 36px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}

/* Featured row */
.sw-featured {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-bottom: 8px;
}

/* Regular grid */
.sw-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(250px, 100%), 1fr));
  gap: 16px;
}

/* Card base */
.sw-card {
  border-radius: 14px;
  overflow: hidden;
  background: var(--card-bg);
  border: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  transition: transform 0.22s, box-shadow 0.22s, border-color 0.22s;
}
.sw-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.14);
  border-color: var(--border2);
}

/* Image area */
.sw-card-img {
  position: relative;
  overflow: hidden;
  height: 180px;
}
.sw-card--featured .sw-card-img {
  height: 260px;
}
.sw-card-img img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  transition: transform 0.5s ease;
}
.sw-card:hover .sw-card-img img { transform: scale(1.05); }
.sw-img-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 45%, rgba(0,0,0,0.55) 100%);
  z-index: 1;
  pointer-events: none;
}

/* Type badge (REEL / VIDEO) */
.sw-type-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  padding: 3px 8px;
  border-radius: 6px;
}
.sw-badge-reel { background: rgba(200,16,46,0.88); color: #fff; }
.sw-badge-video { background: rgba(0,0,0,0.65); color: rgba(255,255,255,0.9); border: 1px solid rgba(255,255,255,0.2); }

/* Location inside image */
.sw-img-loc {
  position: absolute;
  bottom: 10px;
  left: 10px;
  right: 10px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
  color: rgba(255,255,255,0.88);
  font-weight: 500;
  text-shadow: 0 1px 4px rgba(0,0,0,0.7);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Card body */
.sw-card-body {
  padding: 13px 15px 12px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.sw-card-account {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--red);
}
.sw-card--featured .sw-card-account { font-size: 0.82rem; }
.sw-card-caption {
  font-size: 0.79rem;
  line-height: 1.52;
  color: var(--text-secondary);
  margin: 0;
}
.sw-card--featured .sw-card-caption { font-size: 0.84rem; }
.sw-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.sw-tag {
  font-size: 0.67rem;
  color: var(--text-muted);
  font-weight: 500;
}
.sw-card-foot {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
  margin-top: auto;
  font-size: 0.73rem;
  color: var(--text-secondary);
}
.sw-stat {
  display: flex;
  align-items: center;
  gap: 4px;
}
.sw-ig-cta {
  margin-left: auto;
  font-size: 0.7rem;
  color: var(--red);
  font-weight: 600;
  white-space: nowrap;
  opacity: 0.75;
}
.sw-card:hover .sw-ig-cta { opacity: 1; }

/* Empty state */
.sw-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-secondary);
  font-size: 0.9rem;
}
.sw-empty strong { color: var(--text); }

/* ─── NORD SARDEGNA ───────────────────────────────────────────── */
.nord-area-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.nord-area-tab {
  padding: 8px 18px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.nord-area-tab:hover { color: var(--text); border-color: var(--border2); }
.nord-area-tab.active { background: var(--red); border-color: var(--red); color: var(--white); }

.nord-area-header {
  border-left: 3px solid;
  padding-left: 14px;
  margin-bottom: 20px;
}

.nord-area-header h3 { font-size: 1.1rem; margin: 0 0 4px; }
.nord-area-header p { font-size: 0.82rem; color: var(--text-secondary); margin: 0; }

.nord-season-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.nord-season-tab {
  padding: 7px 16px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.nord-season-tab.active {
  background: var(--red);
  border-color: var(--red);
  color: var(--white);
}

.nord-why-box {
  background: var(--red-glow);
  border: 1px solid rgba(200,16,46,0.2);
  border-radius: 12px;
  padding: 18px;
  margin-bottom: 24px;
}

.nord-why-box h4 { margin: 0 0 8px; font-size: 0.85rem; color: var(--red); text-transform: uppercase; letter-spacing: 0.06em; }
.nord-why-box p { font-size: 0.85rem; color: var(--text-secondary); margin: 0 0 12px; line-height: 1.6; }

.nord-meteo-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.nord-meteo-pills span {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 12px;
  background: rgba(200,16,46,0.1);
  border-radius: 20px;
  color: var(--red);
}

.nord-meteo-note { font-size: 0.75rem; color: var(--text-muted); margin: 0; }

.nord-section-title {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  margin: 0 0 12px;
}

.nord-activities-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr));
  gap: 14px;
  margin-bottom: 28px;
}

.nord-activity-card {
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--card-bg);
  border: 1px solid var(--border);
}

.nord-act-name { font-size: 0.9rem; font-weight: 700; margin-bottom: 6px; color: var(--text); }
.nord-act-desc { font-size: 0.78rem; color: var(--text-secondary); line-height: 1.5; margin: 0 0 10px; }

.nord-act-meta { display: flex; flex-wrap: wrap; gap: 6px; }

.nord-level-badge {
  font-size: 0.68rem;
  padding: 3px 10px;
  background: rgba(30,120,80,0.12);
  border: 1px solid rgba(30,120,80,0.3);
  border-radius: 10px;
  color: #1e7850;
  font-weight: 600;
}

.nord-meteo-badge {
  font-size: 0.68rem;
  padding: 3px 10px;
  background: rgba(0,0,0,0.04);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-muted);
}

.nord-events-list { display: flex; flex-direction: column; gap: 12px; }

.nord-event-item {
  padding: 14px 16px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.nord-ev-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 6px; }
.nord-ev-nome { font-size: 0.88rem; font-weight: 700; color: var(--text); }
.nord-ev-periodo { font-size: 0.72rem; color: var(--red); font-weight: 600; white-space: nowrap; }
.nord-ev-desc { font-size: 0.78rem; color: var(--text-secondary); margin: 0 0 6px; line-height: 1.5; }
.nord-ev-link { font-size: 0.72rem; color: var(--red); text-decoration: none; font-weight: 600; }

.nord-musei-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr));
  gap: 14px;
}

.nord-museo-card {
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.nord-museo-name { font-size: 0.88rem; font-weight: 700; color: var(--text); }
.nord-museo-citta { font-size: 0.7rem; color: var(--text-muted); font-weight: 600; }
.nord-museo-desc { font-size: 0.78rem; color: var(--text-secondary); margin: 0; line-height: 1.5; flex: 1; }
.nord-museo-meta { display: flex; gap: 10px; flex-wrap: wrap; padding-top: 8px; border-top: 1px solid var(--border); }
.nord-museo-orari { font-size: 0.7rem; color: var(--text-muted); }
.nord-museo-costo { font-size: 0.7rem; font-weight: 700; color: #1e7850; }

.nord-risto-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr));
  gap: 14px;
}

.nord-risto-card {
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.nord-risto-head { display: flex; justify-content: space-between; align-items: center; }
.nord-risto-nome { font-size: 0.9rem; font-weight: 700; color: var(--text); }
.nord-risto-prezzo { font-size: 0.85rem; font-weight: 700; color: var(--red); }
.nord-risto-tipo { font-size: 0.72rem; color: var(--text-muted); font-weight: 600; }
.nord-risto-piatti { font-size: 0.78rem; color: var(--text-secondary); font-style: italic; }
.nord-risto-zona { font-size: 0.72rem; color: var(--text-muted); }

/* Responsive */
@media (max-width: 1200px) {
  .preview-card { width: calc((100% - 40px) / 3); }
}

@media (max-width: 860px) {
  .preview-card { width: calc((100% - 20px) / 2); }
  .landing-section { padding: 44px 20px 28px; }
}

@media (max-width: 540px) {
  .preview-card { width: calc(100% - 32px); }
  .preview-photo { height: 200px; }
  .landing-section { padding: 36px 16px 24px; }
  .landing-title { font-size: 22px; }
  .landing-section-head { flex-direction: column; align-items: flex-start; gap: 8px; }
}

/* ─── SOCIAL WALL RESPONSIVE ──────────────────────────────────── */
@media (max-width: 900px) {
  .sw-featured {
    grid-template-columns: repeat(2, 1fr);
  }
  .sw-card--featured:last-child {
    display: none;
  }
}
@media (max-width: 600px) {
  .sw-featured {
    grid-template-columns: 1fr;
  }
  .sw-card--featured:last-child { display: flex; }
  .sw-card--featured .sw-card-img { height: 200px; }
  .sw-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .sw-chips { gap: 5px; }
  .sw-chip { padding: 5px 11px; font-size: 0.74rem; }
  .sw-ig-cta { display: none; }
}
@media (max-width: 420px) {
  .sw-grid { grid-template-columns: 1fr; }
}

/* ── DESKTOP LAYOUT ADJUSTMENTS (non tocca mobile) ─────────── */
@media (min-width: 769px) {

  /* ─ SELECTOR ─────────────────────────────────────────────── */
  .selector-title {
    position: absolute;
    top: 36px;
    left: 24px;
    right: 24px;
    margin: 0;
  }
  .selector-hero {
    padding: 56px 24px 100px;
  }

  /* ─ HERO ─────────────────────────────────────────────────── */
  /*
   * Layout su desktop:
   *   [Branding an Island]  ← fixed in cima al viewport, sopra la sagoma
   *   [BrandSardinia SVG ]  ← centrato nel viewport (sulla sagoma)
   *   [La piattaforma... ]  ← 10px sotto il SVG
   *   [  Esplora CTA     ]  ← absolute in fondo al viewport, sotto la sagoma
   *
   * La sagoma occupa ~19vh–81vh. Tagline e CTA stanno fuori da quella zona.
   * SVG + subtitle sono nel flusso flex e si centrano automaticamente.
   */

  /* Rimuovi padding asimmetrico: SVG+subtitle si centrano da soli */
  #hero {
    padding: 0 20px;
  }

  /* Tagline: esce dal flusso flex, si ancora in cima sopra la sagoma */
  .hero-tagline {
    position: fixed;
    top: clamp(40px, 7vh, 72px);
    left: 0;
    right: 0;
    justify-content: center;
    margin: 0;
    z-index: 101;
  }

  /* SVG → Subtitle: 10px */
  #hero .hero-title {
    margin-bottom: 10px;
  }

  /* Subtitle → CTA: 24px di spazio */
  #hero .hero-subtitle {
    margin-bottom: 24px;
  }
}

/* ─── NAVIGAZIONE TOOL ──────────────────────────────────────── */
#tools-content-area .nav-tabs-wrap {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
#tools-content-area .nav-tab {
  padding: 8px 18px;
  border-radius: 20px;
  border: 1.5px solid rgba(0,0,0,0.15);
  background: rgba(0,0,0,0.05);
  color: rgba(0,0,0,0.6) !important;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.18s ease;
}
#tools-content-area .nav-tab:hover { background: rgba(0,0,0,0.09); color: rgba(0,0,0,0.85) !important; }
#tools-content-area .nav-tab.active { background: #0066CC; border-color: #0066CC; color: #fff !important; }

#tools-content-area .nav-tab-content.hidden { display: none; }

#tools-content-area .porto-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr));
  gap: 16px;
  margin-bottom: 20px;
}
#tools-content-area .porto-card {
  padding: 16px;
  border-radius: 14px;
  background: rgba(0,0,0,0.04);
  border: 1px solid rgba(0,0,0,0.1);
}
#tools-content-area .porto-header {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
}
#tools-content-area .porto-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: #111 !important;
  line-height: 1.3;
}
#tools-content-area .porto-zona {
  font-size: 0.75rem;
  color: rgba(0,0,0,0.5) !important;
  margin-top: 2px;
}
#tools-content-area .porto-info-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
#tools-content-area .porto-badge {
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 10px;
  background: rgba(0,102,204,0.1);
  color: #0055aa !important;
  border: 1px solid rgba(0,102,204,0.25);
  white-space: nowrap;
}
#tools-content-area .porto-servizi {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 10px;
}
#tools-content-area .servizio-tag {
  font-size: 0.68rem;
  padding: 2px 7px;
  border-radius: 8px;
  background: rgba(0,0,0,0.07);
  color: rgba(0,0,0,0.6) !important;
}
#tools-content-area .porto-contacts {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
#tools-content-area .porto-contact-link {
  font-size: 0.72rem;
  color: #0055aa !important;
  text-decoration: none;
  transition: color 0.15s;
}
#tools-content-area .porto-contact-link:hover { color: #0066CC !important; text-decoration: underline; }

#tools-content-area .nav-note {
  font-size: 0.78rem;
  color: rgba(0,0,0,0.5) !important;
  margin-top: 8px;
  line-height: 1.5;
}

#tools-content-area .zone-protette-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 20px;
}
#tools-content-area .zona-card {
  padding: 16px;
  border-radius: 14px;
  background: rgba(255,165,0,0.05);
  border: 1px solid rgba(255,165,0,0.3);
}
#tools-content-area .zona-header {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 8px;
}
#tools-content-area .zona-tipo-badge {
  font-size: 0.68rem;
  padding: 2px 8px;
  border-radius: 8px;
  background: rgba(255,140,0,0.12);
  color: #b36200 !important;
  border: 1px solid rgba(255,140,0,0.3);
  display: inline-block;
  width: fit-content;
}
#tools-content-area .zona-nome {
  font-size: 0.9rem;
  font-weight: 600;
  color: #111 !important;
  margin: 0;
}
#tools-content-area .zona-accesso {
  font-size: 0.8rem;
  color: rgba(0,0,0,0.65) !important;
  line-height: 1.5;
  margin: 0 0 6px;
}
#tools-content-area .zona-tel {
  font-size: 0.72rem;
  color: rgba(0,0,0,0.5) !important;
}
#tools-content-area .nav-alert {
  padding: 12px 16px;
  border-radius: 10px;
  background: rgba(255,140,0,0.08);
  border: 1px solid rgba(255,140,0,0.3);
  font-size: 0.8rem;
  color: rgba(0,0,0,0.7) !important;
  line-height: 1.5;
}

#tools-content-area .rotte-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
#tools-content-area .rotta-card {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 14px 16px;
  border-radius: 12px;
  background: rgba(0,102,204,0.04);
  border: 1px solid rgba(0,102,204,0.18);
}
#tools-content-area .rotta-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 5px;
}
#tools-content-area .rotta-nome {
  font-weight: 600;
  font-size: 0.88rem;
  color: #111 !important;
  margin-bottom: 4px;
}
#tools-content-area .rotta-desc {
  font-size: 0.79rem;
  color: rgba(0,0,0,0.6) !important;
  line-height: 1.5;
  margin: 0;
}

#tools-content-area .info-pratiche-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr));
  gap: 16px;
}
#tools-content-area .info-card {
  padding: 16px;
  border-radius: 14px;
  background: rgba(0,0,0,0.04);
  border: 1px solid rgba(0,0,0,0.1);
}
#tools-content-area .info-card h3 {
  font-size: 0.85rem;
  font-weight: 600;
  color: #111 !important;
  margin: 0 0 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(0,0,0,0.1);
}
#tools-content-area .info-card ul {
  padding-left: 0;
  list-style: none;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
#tools-content-area .info-card li {
  font-size: 0.77rem;
  color: rgba(0,0,0,0.65) !important;
  line-height: 1.4;
  padding-left: 10px;
  position: relative;
}
#tools-content-area .info-card li::before {
  content: '';
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(0,0,0,0.25);
  position: absolute;
  left: 0;
  top: 6px;
}
#tools-content-area .info-card a {
  color: #0055aa !important;
  text-decoration: none;
}
#tools-content-area .info-card a:hover { text-decoration: underline; color: #0066CC !important; }
@media (max-width: 600px) {
  #tools-content-area .porto-grid,
  #tools-content-area .info-pratiche-grid { grid-template-columns: 1fr; }
  #tools-content-area .nav-tabs-wrap { gap: 6px; }
  #tools-content-area .nav-tab { padding: 6px 12px; font-size: 0.78rem; }
}

/* ═══════════════════════════════════════════════════════════
   CONSENSO PRIVACY (GDPR) — banner, modale, preferenze, footer
   ═══════════════════════════════════════════════════════════ */
.bs-consent-banner {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 1900;
  background: var(--glass2); backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
  border-top: 1px solid var(--border2);
  box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.10);
  transform: translateY(110%); transition: transform var(--transition);
}
.bs-consent-banner.is-visible { transform: translateY(0); }
.bs-consent-inner {
  max-width: 1100px; margin: 0 auto; padding: 16px 22px;
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
}
.bs-consent-text { flex: 1 1 380px; min-width: 260px; }
.bs-consent-text strong { display: block; font-size: 0.98rem; color: var(--text); margin-bottom: 3px; }
.bs-consent-text p { margin: 0; font-size: 0.82rem; line-height: 1.5; color: var(--text-secondary); }
.bs-consent-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.bs-consent-actions .btn { font-size: 0.82rem; padding: 9px 16px; }

/* Modale (privacy / preferenze) */
.bs-modal-overlay {
  position: fixed; inset: 0; z-index: 2100;
  background: rgba(0, 0, 0, 0.45); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center; padding: 20px;
  opacity: 0; transition: opacity 0.25s ease;
}
.bs-modal-overlay.is-visible { opacity: 1; }
.bs-modal-panel {
  position: relative; background: var(--white); color: var(--text);
  width: 100%; max-width: 660px; max-height: 86vh; overflow-y: auto;
  border-radius: var(--radius); border: 1px solid var(--border);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
  padding: 30px 30px 26px; transform: translateY(12px); transition: transform 0.25s ease;
}
.bs-modal-overlay.is-visible .bs-modal-panel { transform: translateY(0); }
.bs-modal-close {
  position: absolute; top: 12px; right: 14px; width: 34px; height: 34px;
  border: 1px solid var(--border2); background: var(--bg); border-radius: 50%;
  font-size: 1.3rem; line-height: 1; color: var(--text-secondary); cursor: pointer;
  transition: all var(--transition);
}
.bs-modal-close:hover { background: var(--red); color: #fff; border-color: var(--red); }
.bs-modal-panel h2 { font-size: 1.3rem; margin: 0 30px 16px 0; color: var(--text); }
.bs-modal-panel h3 { font-size: 0.98rem; margin: 18px 0 6px; color: var(--red-dark); }

/* Preferenze */
.bs-pref-row {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 18px;
  padding: 16px 0; border-top: 1px solid var(--border);
}
.bs-pref-info strong { display: block; font-size: 0.92rem; margin-bottom: 3px; }
.bs-pref-info span { font-size: 0.8rem; color: var(--text-secondary); line-height: 1.5; }
.bs-pref-fixed { font-size: 0.76rem; color: var(--text-muted); white-space: nowrap; padding-top: 2px; font-weight: 600; }
.bs-prefs-actions { display: flex; gap: 12px; justify-content: flex-end; flex-wrap: wrap; margin-top: 22px; }

/* Interruttore */
.bs-switch { position: relative; display: inline-block; width: 46px; height: 26px; flex: none; cursor: pointer; }
.bs-switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.bs-switch-track {
  position: absolute; inset: 0; background: var(--border2); border-radius: 999px;
  transition: background var(--transition);
}
.bs-switch-track::before {
  content: ''; position: absolute; width: 20px; height: 20px; left: 3px; top: 3px;
  background: #fff; border-radius: 50%; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  transition: transform var(--transition);
}
.bs-switch input:checked + .bs-switch-track { background: var(--red); }
.bs-switch input:checked + .bs-switch-track::before { transform: translateX(20px); }
.bs-switch input:focus-visible + .bs-switch-track { outline: 2px solid var(--red); outline-offset: 2px; }

/* Corpo privacy policy */
.bs-privacy-note { font-size: 0.78rem; color: var(--text-muted); font-style: italic; margin: 0 0 12px; }
.bs-privacy-body { font-size: 0.85rem; line-height: 1.6; color: var(--text-secondary); }
.bs-privacy-body ul { padding-left: 20px; margin: 8px 0; }
.bs-privacy-body li { margin-bottom: 8px; }
.bs-privacy-body strong { color: var(--text); }

/* Footer legale (revoca sempre accessibile) */
.bs-legal-footer {
  position: fixed; left: 50%; bottom: 8px; transform: translateX(-50%); z-index: 180;
  display: flex; align-items: center; gap: 8px; padding: 5px 14px;
  background: var(--glass); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border); border-radius: 999px; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}
.bs-legal-link {
  background: none; border: none; cursor: pointer; padding: 2px 4px;
  font-family: inherit; font-size: 0.72rem; color: var(--text-secondary);
  transition: color var(--transition);
}
.bs-legal-link:hover { color: var(--red); }
.bs-legal-sep { color: var(--text-muted); font-size: 0.72rem; }
.bs-legal-id { font-size: 0.72rem; color: var(--text-secondary); white-space: nowrap; }
.bs-consent-inner { position: relative; }
.bs-consent-x {
  position: absolute; top: 6px; right: 8px;
  width: 32px; height: 32px; border: none; background: none; cursor: pointer;
  font-size: 1.4rem; line-height: 1; color: var(--text-secondary); border-radius: 50%;
}
.bs-consent-x:hover { color: var(--red); background: rgba(0, 0, 0, 0.05); }
.bs-consent-text { padding-right: 28px; }
.sardinai-privacy-link {
  background: none; border: none; padding: 0; cursor: pointer;
  font: inherit; color: var(--text-secondary); text-decoration: underline;
}
.sardinai-privacy-link:hover { color: var(--red); }
.sardinai-text-consent {
  display: flex; gap: 6px; align-items: flex-start; padding: 0 24px 10px;
  font-size: 0.72rem; line-height: 1.35; color: var(--text-secondary); cursor: pointer;
}
.sardinai-text-consent input { margin: 1px 0 0; flex-shrink: 0; accent-color: var(--red); }
/* Campi con outline rimosso: focus da tastiera sempre visibile */
#sardinai-input:focus-visible, #map-search-input:focus-visible, #sw-search:focus-visible {
  outline: 2px solid var(--red); outline-offset: 2px;
}
/* Nella chat lo spazio in basso e' occupato da input + disclaimer IA:
   il footer legale (privacy sempre accessibile dalle altre sezioni e dal banner) si nasconde per non sovrapporsi. */
body[data-section="sardinai"] .bs-legal-footer { display: none; }

@media (max-width: 640px) {
  .bs-consent-actions { width: 100%; }
  .bs-consent-actions .btn { flex: 1 1 auto; }
  .bs-legal-footer { bottom: 4px; flex-wrap: wrap; justify-content: center; gap: 2px 6px; max-width: calc(100vw - 16px); padding: 4px 10px; }
  .bs-legal-footer .bs-legal-sep:first-of-type { display: none; }
  .bs-legal-id { width: 100%; text-align: center; }
}
@media (prefers-reduced-motion: reduce) {
  .bs-consent-banner, .bs-modal-overlay, .bs-modal-panel, .bs-switch-track, .bs-switch-track::before { transition: none; }
}

/* ═══ TOOL POI-BASED (Cantine, Musei…): schede ricche con foto/rating/mappa ═══ */
.ptool-loading { padding: 40px; text-align: center; color: var(--text-muted); font-size: 0.9rem; }
.ptool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr));
  gap: 18px;
}
.ptool-card {
  display: flex;
  flex-direction: column;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}
.ptool-card:hover {
  transform: translateY(-4px);
  border-color: var(--red);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.12);
}
.ptool-img {
  position: relative;
  width: 100%; height: 158px; flex: none;
  background: linear-gradient(135deg, var(--bg2), var(--bg3));
  overflow: hidden;
}
.ptool-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ptool-credit {
  position: absolute; bottom: 5px; right: 6px;
  font-size: 0.62rem; color: #fff; background: rgba(0, 0, 0, 0.55);
  padding: 1px 7px; border-radius: 999px; max-width: 88%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ptool-body { display: flex; flex-direction: column; gap: 7px; padding: 15px 16px 16px; flex: 1; }
.ptool-titlerow { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.ptool-name {
  font-size: 1rem; font-weight: 700; color: var(--text); line-height: 1.3; margin: 0;
  overflow-wrap: anywhere;
}
.ptool-rating {
  display: inline-flex; align-items: center; gap: 3px; flex: none;
  font-size: 0.78rem; font-weight: 800; color: var(--text);
  background: rgba(200, 16, 46, 0.07); border: 1px solid rgba(200, 16, 46, 0.16);
  padding: 2px 8px; border-radius: 999px; white-space: nowrap;
}
.ptool-rating i { font-style: normal; font-weight: 600; color: var(--text-muted); font-size: 0.7rem; }
.ptool-city {
  display: flex; align-items: center; gap: 5px;
  font-size: 0.76rem; font-weight: 600; color: var(--red);
  text-transform: uppercase; letter-spacing: 0.03em;
}
.ptool-city svg { width: 12px; height: 12px; flex: none; }
.ptool-desc {
  font-size: 0.83rem; line-height: 1.5; color: var(--text-secondary); margin: 0;
  overflow-wrap: anywhere;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.ptool-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.ptool-tag {
  font-size: 0.68rem; font-weight: 600; color: var(--text-secondary);
  background: var(--bg2); border: 1px solid var(--border); border-radius: 6px; padding: 2px 8px;
}
.ptool-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 10px; }
.ptool-btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 8px 12px; border-radius: 9px;
  font-family: inherit; font-size: 0.76rem; font-weight: 700; cursor: pointer;
  text-decoration: none;
  border: 1.5px solid var(--red); background: transparent; color: var(--red);
  transition: background 0.2s ease, color 0.2s ease;
}
.ptool-btn svg { width: 12px; height: 12px; flex: none; }
.ptool-btn:hover { background: rgba(200, 16, 46, 0.08); }
.ptool-btn.primary { background: var(--red); color: #fff; border-color: var(--red); }
.ptool-btn.primary:hover { background: var(--red-dark); border-color: var(--red-dark); }
.ptool-btn.primary svg { stroke: #fff; }

/* Spiagge: rating + link mappa (upgrade tool) */
.beach-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.beach-rating {
  display: inline-flex; align-items: center; gap: 3px; flex: none;
  font-size: 0.76rem; font-weight: 800; color: var(--text);
  background: rgba(200, 16, 46, 0.08); border: 1px solid rgba(200, 16, 46, 0.16);
  padding: 2px 8px; border-radius: 999px; white-space: nowrap;
}
.beach-rating i { font-style: normal; font-weight: 600; color: var(--text-muted); font-size: 0.7rem; }
.beach-map-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  width: 100%; margin-top: 12px; padding: 9px 14px; border-radius: 10px;
  font-family: inherit; font-size: 0.78rem; font-weight: 700; cursor: pointer;
  border: 1.5px solid var(--red); background: var(--red); color: #fff;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.beach-map-btn svg { width: 13px; height: 13px; stroke: #fff; flex: none; }
.beach-map-btn:hover { background: var(--red-dark); border-color: var(--red-dark); }
.bsd-head-right { display: flex; align-items: center; gap: 8px; flex: none; }

/* ═══ NAVBAR NAV BUTTONS (Chi siamo / Cosa facciamo) ═══ */
.nav-btn {
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; border: 1.5px solid var(--border); color: var(--text);
  padding: 8px 14px; border-radius: 8px; font-size: 0.82rem; font-weight: 600;
  font-family: var(--font-sans); cursor: pointer; white-space: nowrap;
  position: relative; overflow: hidden; isolation: isolate;
  transition: color 0.3s ease, border-color 0.25s ease;
}
.nav-btn::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--red); transform: translateY(101%); border-radius: 42% 42% 0 0;
  transition: transform 0.42s cubic-bezier(0.7,0,0.2,1), border-radius 0.42s cubic-bezier(0.7,0,0.2,1);
}
@media (hover: hover) {
  .nav-btn:hover { color: #fff; border-color: var(--red); }
  .nav-btn:hover::before { transform: translateY(0); border-radius: 0; }
}
/* stato attivo: la sezione corrente evidenzia il proprio bottone */
body[data-section="chi-siamo"] .nav-btn[data-sec="chi-siamo"],
body[data-section="cosa-facciamo"] .nav-btn[data-sec="cosa-facciamo"] {
  background: var(--red); border-color: var(--red); color: #fff;
}

/* ═══ PAGINE CONTENUTO (Chi siamo / Cosa facciamo) ═══ */
.page-hero { text-align: center; max-width: 720px; margin: 0 auto 44px; }
.page-hero .card-title-display { font-size: clamp(2.4rem, 7vw, 3.6rem); margin-bottom: 14px; }
.page-eyebrow {
  text-transform: uppercase; letter-spacing: 2.5px; font-size: 0.74rem; font-weight: 700;
  color: var(--red); margin-bottom: 12px;
}
.page-lead { color: var(--text-secondary); font-size: 1rem; line-height: 1.6; max-width: 640px; margin: 0 auto; }
.page-block { max-width: 960px; margin: 0 auto 40px; }
.page-grid {
  display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.info-card { padding: 24px 22px; display: flex; flex-direction: column; }
.info-card-icon {
  width: 48px; height: 48px; display: flex; align-items: center; justify-content: center;
  background: rgba(200,16,46,0.08); border: 1px solid rgba(200,16,46,0.2);
  border-radius: 14px; color: var(--red); margin-bottom: 14px;
}
.info-card-title { font-size: 1.05rem; font-weight: 700; color: var(--text); margin-bottom: 7px; }
.info-card-desc { font-size: 0.87rem; color: var(--text-secondary); line-height: 1.55; }
.step-item { padding: 24px 22px; position: relative; }
.step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 50%; margin-bottom: 14px;
  background: var(--red); color: #fff; font-weight: 700; font-size: 1rem;
}
.vision-card { padding: 26px 30px; border-left: 3px solid var(--red); }
.vision-card p { color: var(--text); font-size: 1.02rem; line-height: 1.65; font-weight: 600; }
.vision-card p + p { margin-top: 14px; }
.vision-card .vision-lead { color: var(--text); font-weight: 600; font-size: 1.02rem; }
/* ═══ FOUNDER ═══ */
.founder { display: grid; grid-template-columns: 280px 1fr; gap: 38px; align-items: start; }
.founder-photo {
  width: 100%; border-radius: 16px; overflow: hidden; border: 1px solid var(--border);
  align-self: start;
}
.founder-photo-ph {
  aspect-ratio: 3 / 4; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  background: linear-gradient(160deg, var(--bg2), var(--bg3));
  color: var(--text-muted);
}
.founder-photo-ph span { font-size: 0.78rem; font-weight: 600; letter-spacing: 0.3px; }
.founder-img { width: 100%; height: auto; display: block; }
.founder-name { font-size: 1.5rem; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.founder-role { color: var(--red); font-weight: 600; font-size: 0.85rem; margin-bottom: 18px; }
.founder-text .info-card-desc { margin-bottom: 14px; }
@media (min-width: 641px) { .founder-photo { position: sticky; top: 88px; } }
@media (max-width: 640px) {
  .founder { grid-template-columns: 1fr; gap: 22px; }
  .founder-photo { max-width: 260px; margin: 0 auto; }
}

.contact-card { text-align: center; padding: 40px 28px; max-width: 560px; margin: 0 auto; }
.contact-title { font-size: 1.4rem; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.contact-lead { color: var(--text-secondary); font-size: 0.92rem; line-height: 1.55; margin-bottom: 22px; }
.contact-meta { margin-top: 18px; font-size: 0.78rem; color: var(--text-muted); letter-spacing: 0.3px; }
.page-tags { justify-content: center; gap: 8px; }
.page-tags .ptool-tag { font-size: 0.82rem; padding: 6px 14px; border-radius: 8px; }
.page-cta { text-align: center; margin-top: 28px; }
.page-cta .btn { padding: 15px 34px; font-size: 1.3rem; border-radius: 12px; }

/* ═══ RIASSUNTI PAGINE IN HOME (Cosa facciamo / Chi siamo) ═══ */
.home-pages {
  width: 100%; box-sizing: border-box;
  max-width: 960px; margin: 10px auto 72px; padding: 0 24px;
  display: grid; gap: 20px; grid-template-columns: 1fr 1fr;
}
/* Su mobile: striscia a scroll orizzontale autonomo (non trascina l'intera pagina) */
@media (max-width: 720px) {
  .home-pages {
    display: flex; grid-template-columns: none;
    overflow-x: auto; -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory; scroll-padding-left: 24px;
    gap: 16px; padding: 4px 24px 10px;
    scrollbar-width: none;
  }
  .home-pages::-webkit-scrollbar { display: none; }
  .home-page-card { flex: 0 0 82%; scroll-snap-align: start; }
}
.home-page-card {
  padding: 32px 30px; display: flex; flex-direction: column; align-items: flex-start; text-align: left;
}
.home-page-title { font-size: 1.5rem; font-weight: 700; color: var(--text); margin: 6px 0 12px; }
.home-page-summary { color: var(--text-secondary); font-size: 0.95rem; line-height: 1.6; margin-bottom: 24px; }
.home-page-card .btn { margin-top: auto; padding: 12px 24px; font-size: 0.95rem; }

@media (max-width: 640px) {
  .app-navbar { padding: 12px 14px; }
  .app-navbar-left { gap: 8px; }
  .nav-btn { padding: 7px 10px; font-size: 0.76rem; }
  body:not(.world-active) .home-btn .home-label { display: none; }
}

/* ═══ SERVIZI A 5 STELLE (LUXURY) ═══ */
.tool-card-luxury { border-color: rgba(200,16,46,0.32); }
.lux-catbar { display: flex; gap: 10px; margin: 2px 0 18px; flex-wrap: wrap; align-items: center; }
.lux-cat { font-size: 0.8rem; font-weight: 700; padding: 6px 14px; border-radius: 20px; }
.lux-cat.active { background: var(--red); color: #fff; }
.lux-cat.soon { background: var(--bg2); color: var(--text-muted); border: 1px dashed var(--border2); }
.lux-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); }
.lux-card { display: flex; flex-direction: column; background: var(--card-bg); border: 1px solid var(--border); border-radius: 16px; overflow: hidden; box-shadow: 0 1px 4px rgba(0,0,0,0.05); transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease; }
.lux-card:hover { transform: translateY(-4px); border-color: var(--red); box-shadow: 0 16px 40px rgba(0,0,0,0.14); }
.lux-img { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: linear-gradient(160deg, #20242b, #3a4049); }
.lux-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.4s ease; }
.lux-card:hover .lux-img img { transform: scale(1.05); }
.lux-img-fallback { background: linear-gradient(160deg, #262b33, #4a515c); }
.lux-price { position: absolute; left: 12px; bottom: 12px; background: rgba(0,0,0,0.72); color: #fff; font-weight: 700; font-size: 0.9rem; padding: 6px 12px; border-radius: 8px; backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.lux-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.lux-title { font-size: 1rem; font-weight: 700; color: var(--text); line-height: 1.3; }
.lux-city { font-size: 0.82rem; color: var(--text-muted); display: flex; align-items: center; gap: 5px; }
.lux-foot { margin-top: auto; padding-top: 10px; display: flex; align-items: center; justify-content: space-between; gap: 8px; border-top: 1px solid var(--border); }
.lux-agency { font-size: 0.72rem; font-weight: 600; color: var(--text-secondary); }
.lux-link { font-size: 0.78rem; font-weight: 700; color: var(--red); white-space: nowrap; }
.lux-link:hover { color: var(--red-dark); }
.lux-disclaimer { margin-top: 22px; font-size: 0.76rem; color: var(--text-muted); line-height: 1.5; }

/* Disclaimer prezzi nei tool */
.tool-disclaimer { margin: 0 0 18px; padding: 9px 14px; background: rgba(200,16,46,0.06); border: 1px solid rgba(200,16,46,0.2); border-radius: 8px; font-size: 0.8rem; color: var(--text-secondary); line-height: 1.4; }

/* Bottone "Torna alla chat" sulla mappa (visibile solo se arrivati dalla chat) */
.map-back-to-chat {
  align-self: flex-start; white-space: nowrap;
  box-shadow: 0 4px 16px rgba(0,0,0,0.18);
}

/* ── Immobili di pregio: elenco link agenzie (non affiliate) ── */
.lux-info-title { font-size: 1.05rem; margin: 6px 0 4px; color: var(--text); }
.lux-info-list { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 10px; }
.lux-info-item {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 14px;
  padding: 14px 16px; background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius-sm);
}
.lux-info-link { color: var(--red); font-weight: 600; text-decoration: none; }
.lux-info-link:hover { text-decoration: underline; }
.lux-info-area { font-size: 0.8rem; color: var(--text-secondary); }

/* ── Social: vetrina account reali ── */
.sw-avatar { display: flex; align-items: center; justify-content: center; height: 120px; }
.sw-avatar-initial { font-family: 'Bebas Neue', var(--font-sans); font-size: 3.4rem; color: #fff; line-height: 1; text-shadow: 0 2px 12px rgba(0,0,0,0.25); }
.sw-disclaimer { margin: 18px 0 0; font-size: 0.76rem; color: var(--text-muted); line-height: 1.5; }

/* ── Orari indicativi ── */
.ptool-hours { font-size: 0.8rem; color: var(--text-secondary); display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.ptool-hours-note, .tool-hours-note { display: block; width: 100%; font-size: 0.7rem; color: var(--text-muted); font-style: italic; margin: 2px 0 0; }

/* Credito foto sulle card della home */
.preview-photo-credit {
  position: absolute; top: 6px; right: 6px; z-index: 3; max-width: 80%;
  font-size: 0.62rem; color: #fff; background: rgba(0, 0, 0, 0.55);
  padding: 1px 7px; border-radius: 999px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.bs-credits-list { margin: 8px 0 0; padding-left: 18px; font-size: 0.78rem; line-height: 1.5; }
.bs-credits-list li { margin-bottom: 3px; }

/* Sui dispositivi touch i campi sotto i 16px fanno ingrandire la pagina a iOS Safari al tocco,
   e la pagina resta tagliata a destra. Lo zoom manuale resta permesso per l'accessibilità. */
@media (pointer: coarse) {
  input:not([type="checkbox"]):not([type="radio"]), select, textarea { font-size: 16px !important; }
}

/* Avvisi sotto la chat: su schermi grandi per esteso, altrimenti una riga che si espande */
.sardinai-notes summary {
  cursor: pointer; font-size: 0.7rem; line-height: 1.35; color: var(--text-secondary);
  text-align: center; padding: 6px 16px 8px;
}
.sardinai-notes[open] summary { padding-bottom: 2px; }
@media (min-width: 769px) and (min-height: 741px) {
  .sardinai-notes summary { display: none; }
}
#sardinai-input, #map-search-input { min-width: 0; text-overflow: ellipsis; }
#sardinai-input::placeholder, #map-search-input::placeholder { text-overflow: ellipsis; }
.sardinai-text-consent input { width: 18px; height: 18px; }

/* Preferenze privacy: salvare è sempre a portata di mano */
.bs-prefs-actions { position: sticky; bottom: -26px; background: var(--white); padding: 12px 0 2px; }

/* ═══ BARRA LEGALE ═══
   Nella schermata iniziale è una pillola sul fondo; dentro l'app sta a fine pagina,
   così non copre contenuti e comandi. */
.bs-legal-footer { width: max-content; max-width: calc(100vw - 16px); }
.app-entered .bs-legal-footer {
  position: relative; left: auto; bottom: auto; transform: none; z-index: 20;
  width: fit-content; max-width: calc(100% - 16px); margin: 16px auto 20px;
}
/* Sulla mappa la pagina non scorre: resta fissa, senza coprire i pannelli aperti */
.app-entered.section-map .bs-legal-footer { position: fixed; left: 50%; bottom: 8px; transform: translateX(-50%); margin: 0; }
.section-map:has(#route-planner-panel.open) .bs-legal-footer,
.section-map:has(#map-info-panel.active) .bs-legal-footer,
.section-map:has(.map-quick-card.active) .bs-legal-footer { display: none; }

/* ═══ RESPONSIVE: in fondo al file, dopo le regole generali che altrimenti le annullano ═══ */
@media (max-width: 900px) {
  #map-info-panel {
    width: calc(100% - 32px); left: 16px; right: 16px; top: auto; bottom: 16px;
    max-height: 65vh; transform: translateY(calc(100% + 20px));
  }
  #map-info-panel.active { transform: translateY(0); }
  #route-planner-panel { max-height: 75vh; }
  /* Sulla mappa solo i link essenziali, in una riga a sinistra */
  .app-entered.section-map .bs-legal-footer { left: 8px; bottom: 6px; transform: none; max-width: 60%; padding: 2px 8px; flex-wrap: nowrap; }
  .app-entered.section-map .bs-legal-id,
  .app-entered.section-map .bs-legal-sep,
  .app-entered.section-map .bs-open-credits { display: none; }
  .maplibregl-ctrl-bottom-right { bottom: 30px; }
}
@media (max-width: 600px) {
  #btn-route-planner { padding: 8px 12px; }
  .map-reset-btn {
    right: 10px; bottom: calc(env(safe-area-inset-bottom, 0px) + 104px);
    width: 42px; height: 42px; padding: 0; justify-content: center; border-radius: 12px;
  }
  #map-info-panel {
    width: 100%; left: 0; right: 0; bottom: 0; border-radius: 20px 20px 0 0;
    max-height: 82vh; transform: translateY(calc(100% + 20px));
  }
  #map-info-panel.active { transform: translateY(0); }
}

/* Telefono in orizzontale: pannelli di lato, chat senza intestazione per lasciare spazio ai messaggi */
@media (max-height: 500px) {
  .app-navbar { padding-top: 6px; padding-bottom: 6px; }
  .sardinai-header { display: none; }
  #sardinai-chat { padding: 10px 16px; }
  #sardinai-input-area { padding: 6px 16px; }
  #sardinai-input { padding: 8px 14px; }
  .sardinai-notes summary { padding: 4px 16px; }
  #map-info-panel {
    left: auto; right: 8px; top: 8px; bottom: 8px; width: min(360px, 55%);
    max-height: none; border-radius: var(--radius); transform: translateX(calc(100% + 20px));
  }
  #map-info-panel.active { transform: translateX(0); }
  #route-planner-panel {
    top: 8px !important; bottom: 8px !important; left: 8px !important; right: auto !important;
    width: min(340px, 58%) !important; max-height: calc(100% - 16px); border-radius: 16px !important;
  }
  .map-quick-card { width: min(340px, 58%); left: auto; right: 8px; bottom: 8px; transform: translateY(20px); }
  .map-quick-card.active { transform: translateY(0); }
  .map-reset-btn { bottom: calc(env(safe-area-inset-bottom, 0px) + 40px); }
}

/* Telefoni bassi: intestazione della chat ridotta */
@media (max-height: 640px) and (min-height: 501px) {
  .sardinai-header { padding: 8px 14px; }
  .sardinai-header-text p { display: none; }
  .sardinai-avatar { width: 32px; height: 32px; }
  #sardinai-chat { padding: 12px 14px; }
  #sardinai-input-area { padding: 8px 14px; }
}

/* Telefoni stretti: la barra in alto deve stare nello schermo */
@media (max-width: 380px) {
  .app-navbar { padding-left: 10px; padding-right: 10px; }
  .app-navbar-left { flex-shrink: 0; }
  .app-navbar-right { gap: 5px; min-width: 0; }
  .nav-btn { padding: 6px 7px; font-size: 0.7rem; white-space: nowrap; }
  .app-navbar .lang-btn { padding: 6px 7px; gap: 4px; }
  .home-btn { flex-shrink: 0; }
}

/* Touch: bersagli abbastanza grandi per il dito (WCAG 2.5.8) */
@media (pointer: coarse) {
  .cantina-link, .prodotto-link, .guida-link, .comune-link, .porto-contact-link, .event-link,
  .prodotti-artig-link, .op-link, .sai-itin-place, .bs-legal-link, .sardinai-privacy-link, .landing-cta {
    display: inline-flex; align-items: center; min-height: 28px;
  }
  .map-hint-close { min-width: 28px; min-height: 28px; }
  .carousel-dot { position: relative; }
  .carousel-dot::after { content: ''; position: absolute; inset: -11px -4px; }
}

/* Le schede non devono allargarsi oltre la colonna per una parola lunga */
[class*="-card"] { min-width: 0; overflow-wrap: break-word; }
.event-body { min-width: 0; flex: 1; }

/* I pulsanti con testi lunghi (tedesco, francese) vanno a capo invece di uscire dallo schermo */
.btn { max-width: 100%; }
@media (max-width: 600px) { .btn { white-space: normal; text-align: center; } }

/* Le sezioni riempiono lo schermo sotto la barra reale; mappa e chat hanno già l'altezza esatta */
.main-section { min-height: calc(100vh - var(--nav-h, 85px)); min-height: calc(100dvh - var(--nav-h, 85px)); }
#map-section, #sardinai-section { min-height: 0; }
