/* Simulazioni idrogeologiche (/FloodSim, /LandslideSim) */
.hydro-page { max-width: 1280px; margin: 0 auto; padding: 18px 16px 40px; }
.hydro-title { font-weight: 700; margin-bottom: 4px; }
.hydro-place { font-weight: 600; margin: 4px 0 12px; opacity: 0.9; }
.hydro-controls { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px 22px; margin-bottom: 12px;
  padding: 14px 16px; border: 1px solid rgba(128, 128, 128, 0.3); border-radius: 12px; }
.hydro-label { display: block; font-size: 0.85rem; opacity: 0.8; margin-bottom: 6px; }
.hydro-runrow { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; flex-wrap: wrap; }
.hydro-msg { opacity: 0.85; }
.hydro-stage { height: 68vh; min-height: 440px; background: linear-gradient(180deg, #08162b 0%, #16385c 55%, #2a5b86 100%); }
body[data-theme="light"] .hydro-stage { background: linear-gradient(180deg, #b9dcff 0%, #dcefff 60%, #f4f9ff 100%); }
.hydro-overlay { position: absolute; inset: 0; z-index: 4; display: flex; align-items: center; justify-content: center; text-align: center;
  padding: 24px; color: #e6edf3; font-size: 1rem; pointer-events: none; background: rgba(8, 22, 43, 0.35); }
.hydro-spinner { position: absolute; inset: 0; z-index: 7; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  background: rgba(8, 22, 43, 0.55); color: #fff; font-weight: 600; backdrop-filter: blur(3px); }
.hydro-spin { width: 46px; height: 46px; border-radius: 50%; border: 4px solid rgba(255, 255, 255, 0.25); border-top-color: #4aa8ff; animation: hydro-rot 0.9s linear infinite; }
@keyframes hydro-rot { to { transform: rotate(360deg); } }
.hydro-bar-wrap { min-width: 280px; }
.hydro-bar { display: block; height: 10px; border-radius: 6px; }
.hydro-bar-flood { background: linear-gradient(90deg, #8cdcfa, #287dd7, #0a288c); }
.hydro-bar-wildfire { background: linear-gradient(90deg, #3c7a3e, #ff7a1a 45%, #ffd84a 70%, #1c1a1a); }
.hydro-bar-landslide { background: linear-gradient(90deg, #eb1e2d, #ff6e14 35%, #fad746 65%, #7c9a60 85%, #8c4b28); }
.hydro-bar-ticks { display: flex; justify-content: space-between; margin-top: 4px; font-size: 0.72rem; gap: 10px; }
.hydro-view-btn { border: 0; background: transparent; color: #e6edf3; height: 36px; padding: 0 16px; font-size: 0.95rem; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; }
.hydro-view-btn:hover { background: rgba(255, 255, 255, 0.14); }
.hydro-stage[data-view="2d"] .hydro-view-btn[data-view="2d"], .hydro-stage[data-view="3d"] .hydro-view-btn[data-view="3d"] { background: #3498db; color: #fff; }
.hydro-legend .hydro-bar-wrap { min-width: 260px; }
.hydro-timebar { display: flex; align-items: center; gap: 12px; margin: 10px 0; }
.hydro-play { width: 42px; height: 38px; border-radius: 10px; border: 1px solid rgba(128, 128, 128, 0.5); background: transparent; color: inherit; cursor: pointer; }
.hydro-slider { flex: 1; }
.hydro-hint { font-size: 0.85rem; margin-bottom: 14px; }
.hydro-kpis { margin: 8px 0 16px; }
.hydro-kpi { border: 1px solid rgba(128, 128, 128, 0.3); border-radius: 12px; padding: 12px 14px; text-align: center; }
.hydro-kpi-value { font-size: 1.7rem; font-weight: 700; }
.hydro-kpi-label { font-size: 0.82rem; opacity: 0.8; }
.hydro-kpi-sub { font-size: 0.75rem; opacity: 0.65; }
.hydro-disclaimer { margin-top: 14px; font-size: 0.82rem; opacity: 0.7; }
@media (max-width: 576px) { .hydro-stage { height: 56vh; min-height: 340px; } .hydro-legend { max-width: calc(100% - 24px); bottom: 64px; } .hydro-viewmode { bottom: 22px; flex-wrap: wrap; justify-content: flex-end; } }

.hydro-legend { position: absolute; left: 12px; bottom: 22px; z-index: 5; padding: 6px 10px; border-radius: 8px; font-size: 0.82rem;
  background: rgba(13, 17, 23, 0.72); color: #e6edf3; max-width: calc(100% - 290px); pointer-events: none; }
.hydro-chips { position: absolute; top: 12px; left: 12px; z-index: 5; display: flex; flex-direction: column; gap: 6px; align-items: flex-start;
  max-width: calc(100% - 24px); pointer-events: none; }
.hydro-chip { padding: 6px 10px; border-radius: 8px; font-size: 0.84rem; background: rgba(13, 17, 23, 0.74); color: #e6edf3; }
.hydro-chip:empty { display: none; }
.hydro-chip-place { font-weight: 700; font-size: 0.95rem; }
.hydro-chip-readout { font-weight: 600; }
.hydro-chip-scn { background: rgba(52, 152, 219, 0.78); }
.hydro-attr { position: absolute; right: 8px; bottom: 2px; z-index: 5; font-size: 0.68rem; color: rgba(255, 255, 255, 0.8); text-shadow: 0 0 3px #000; pointer-events: none; }
.hydro-viewmode { position: absolute; right: 12px; bottom: 22px; z-index: 6; display: flex; gap: 8px; }
.hydro-seg { display: inline-flex; border-radius: 999px; overflow: hidden; border: 1px solid rgba(255, 255, 255, 0.25); background: rgba(13, 17, 23, 0.7); backdrop-filter: blur(8px); }
.hydro-base-btn { border: 0; background: transparent; color: #e6edf3; height: 36px; padding: 0 14px; font-size: 0.9rem; cursor: pointer; }
.hydro-base-btn:hover { background: rgba(255, 255, 255, 0.14); }
.hydro-stage[data-base="map"] .hydro-base-btn[data-base="map"], .hydro-stage[data-base="relief"] .hydro-base-btn[data-base="relief"] { background: #3498db; color: #fff; }
.hydro-wx { border: 1px solid rgba(128, 128, 128, 0.3); border-radius: 12px; padding: 12px 14px; margin-bottom: 12px; }
.hydro-wx-title { font-weight: 700; margin-bottom: 8px; }
.hydro-wx-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 6px; }
.hydro-wx-chip { border: 1px solid rgba(128, 128, 128, 0.35); border-radius: 10px; padding: 6px 12px; min-width: 120px; }
.hydro-wx-chip.hot { border-color: #e67e22; background: rgba(230, 126, 34, 0.12); }
.hydro-wx-val { font-weight: 700; }
.hydro-wx-lbl { font-size: 0.74rem; opacity: 0.75; }
.hydro-wx-apply { display: flex; gap: 10px; align-items: center; margin-top: 6px; flex-wrap: wrap; }
.hydro-wx-drop { min-width: min(520px, 100%); flex: 1; }
.hydro-wx-note { font-size: 0.74rem; opacity: 0.65; margin-top: 6px; }
@media (max-width: 576px) { .hydro-legend { max-width: calc(100% - 24px); bottom: 70px; } .hydro-viewmode { flex-wrap: wrap; justify-content: flex-end; } }

.hydro-evasim { margin: -4px 0 10px; }

/* mini-mappa d'Italia: dove ci troviamo */
.hydro-place-row { display: flex; align-items: center; gap: 14px; }
.hydro-locator { width: 96px; height: auto; flex: none; border-radius: 10px; background: rgba(127,127,127,.08);
  padding: 4px; border: 1px solid rgba(127,127,127,.25); }
.hydro-evasim-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.hydro-evasim-note { font-size: 13px; }

/* percorso a tappe Pericolo -> Evacuazione -> Esito */
.hz-stepper { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 2px 0 12px; }
.hz-step { display: inline-flex; align-items: center; gap: 7px; padding: 4px 12px 4px 5px; border-radius: 999px;
  border: 1px solid rgba(127,127,127,.35); font-size: 13px; text-decoration: none; color: inherit; opacity: .75; }
a.hz-step:hover { opacity: 1; border-color: #0dcaf0; }
.hz-step-n { width: 22px; height: 22px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  background: rgba(127,127,127,.25); font-weight: 700; font-size: 12px; }
.hz-step-active { opacity: 1; border-color: #0d6efd; background: rgba(13,110,253,.12); font-weight: 600; }
.hz-step-active .hz-step-n { background: #0d6efd; color: #fff; }
.hz-step-done .hz-step-n { background: #2ecc71; color: #fff; }
.hz-step-sep { opacity: .5; }
/* scheda "cosa farebbe la gente" */
.hz-card { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin: 14px 0; padding: 16px 18px;
  border-radius: 14px; border: 1px solid rgba(13,202,240,.5); background: rgba(13,202,240,.08); }
.hz-card-ico { font-size: 34px; line-height: 1; }
.hz-card-txt { flex: 1 1 280px; }
.hz-card-title { font-weight: 700; font-size: 17px; margin-bottom: 2px; }
.hz-card-body, .hz-card-scn { font-size: 14px; opacity: .9; }
.hz-card-cta { white-space: nowrap; }
/* EVASIM: banner dello scenario, barra del tempo dell'evento, confronto */
.hz-banner { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 8px 0; padding: 10px 14px;
  border-radius: 12px; border: 1px solid rgba(255,140,0,.55); background: rgba(255,140,0,.1); font-size: 14px; }
.hz-banner-txt { flex: 1 1 260px; }
.hz-banner a, .hz-banner button { font-size: 13px; }
.hz-bar { margin: 8px 0; padding: 10px 14px; border-radius: 12px; border: 1px solid rgba(127,127,127,.3); font-size: 13px; }
.hz-bar-row { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; margin-top: 6px; }
.hz-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 5px; }
.hz-compare { margin: 12px 0; padding: 14px 16px; border-radius: 14px; border: 1px solid rgba(127,127,127,.3); }
.hz-compare h5 { margin: 0 0 6px; }
.hz-compare-verdict { font-size: 15px; margin-bottom: 8px; }

/* barra "Rischi per <comune>" */
.hz-switcher { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 4px 0 8px; }
.hz-sw-label { font-size: 13px; opacity: .7; margin-right: 4px; }
.hz-sw-item { padding: 5px 14px; border-radius: 999px; border: 1px solid rgba(127,127,127,.35); font-size: 13px;
  text-decoration: none; color: inherit; }
a.hz-sw-item:hover { border-color: #0dcaf0; background: rgba(13,202,240,.08); }
.hz-sw-active { background: #0d6efd; border-color: #0d6efd; color: #fff; font-weight: 600; }
/* margini coerenti con le altre pagine nei contenitori stretti */
@media (max-width: 600px) { .hydro-page { padding: 12px 10px 32px; } .hydro-stage { height: 60vh; min-height: 360px; } }

/* riferimento geografico dentro il riquadro della simulazione (EVASIM e simulazioni di pericolo).
   Il contenitore copre il riquadro e sta SOPRA a tutto (anche allo strato di caricamento); la scheda e' "sticky":
   scorrendo la pagina resta visibile sotto la barra del sito invece di finirci dietro. */
.stage-locator { position: absolute; inset: 0; z-index: 20; pointer-events: none; display: flex; justify-content: flex-end;
  align-items: flex-start; padding: 12px; }
.stage-locator:empty { display: none; }
.stage-locator-card { position: sticky; top: 96px; text-align: center; padding: 7px 8px 8px; border-radius: 12px;
  background: rgba(13, 17, 23, 0.86); backdrop-filter: blur(10px); border: 1px solid rgba(255, 255, 255, 0.22);
  color: #fff; box-shadow: 0 4px 16px rgba(0, 0, 0, .35); }
/* sticky richiede che nessun antenato sia un contenitore di scorrimento: "clip" ritaglia gli angoli come "hidden" */
.live-stage { overflow: clip; }
.stage-locator-img { display: block; width: 156px; border-radius: 8px; height: auto; margin: 0 auto; }
.stage-locator-cap { font-size: 15px; line-height: 1.3; margin-top: 6px; max-width: 160px; }
.stage-locator-reg { opacity: .9; font-size: 12.5px; font-weight: 400; }
@media (max-width: 576px) { .stage-locator-img { width: 96px; } .stage-locator-cap { font-size: 12px; max-width: 100px; } .stage-locator-reg:last-child { display: none; } }
@media (max-width: 576px) { .live-stage .live-hud { right: 120px; } }
