:root{
  --cream:#f7efe4;
  --cream-2:#fffaf2;
  --ink:#303943;
  --muted:#6d746f;
  --olive:#6f813f;
  --olive-dark:#4f622b;
  --blue:#283946;
  --line:rgba(48,57,67,.14);
  --shadow:0 22px 70px rgba(40,57,70,.16);
  --radius:28px;
}

*{box-sizing:border-box}

/* Gli elementi con attributo hidden devono essere realmente rimossi dal layout.
   Senza questa regola .detail-scene { display:grid } rendeva visibile il pannello
   dettagli sopra la mappa e impediva a "Torna alla mappa" di funzionare. */
.map-scene[hidden],
.detail-scene[hidden]{
  display:none !important;
}

html{scroll-behavior:smooth}

body{
  margin:0;
  font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  color:var(--ink);
  background:
    radial-gradient(circle at top left, #fff7e8 0, transparent 34%),
    linear-gradient(135deg,#f4eadb 0%,#f8f2e8 48%,#e8eadc 100%);
  min-height:100vh;
}

button,a{font:inherit}

.app-shell{
  width:min(1500px,100%);
  margin:0 auto;
  padding:clamp(16px,3vw,38px);
}

.hero{
  min-height:calc(100vh - 76px);
  border:1px solid rgba(255,255,255,.8);
  border-radius:36px;
  padding:clamp(18px,3vw,34px);
  background:rgba(255,250,242,.78);
  box-shadow:var(--shadow);
  backdrop-filter:blur(18px);
}

.hero__topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
  margin-bottom:24px;
}

.brand{
  display:flex;
  align-items:center;
  gap:18px;
}

.brand__logo{
  width:84px;
  height:84px;
  object-fit:cover;
  border-radius:18px;
  box-shadow:0 10px 35px rgba(48,57,67,.09);
  background:#f5eadc;
}

.brand__eyebrow{
  margin:0 0 2px;
  text-transform:uppercase;
  letter-spacing:.18em;
  font-size:.78rem;
  color:var(--olive-dark);
  font-weight:700;
}

h1,h2,h3{
  font-family:"Cormorant Garamond",Georgia,serif;
  line-height:1.02;
  margin:0;
}

h1{font-size:clamp(2.6rem,5vw,5.2rem);font-weight:600;letter-spacing:-.04em}

.ghost-btn,.back-btn{
  border:1px solid var(--line);
  border-radius:999px;
  background:rgba(255,255,255,.64);
  color:var(--ink);
  padding:12px 16px;
  cursor:pointer;
  transition:.25s ease;
}

.ghost-btn:hover,.back-btn:hover{transform:translateY(-2px);box-shadow:0 12px 25px rgba(40,57,70,.1)}

.layout{
  display:grid;
  grid-template-columns:minmax(0,1fr) 300px;
  gap:20px;
  align-items:start;
}

.visual-stage {
  position: relative;
  min-height: 760px;
  height: auto; /* Permette al contenitore grigio di allungarsi se le foto scendono */
  border-radius: var(--radius);
  overflow: hidden; /* Ripristiniamo hidden così le foto vengono tagliate perfettamente sugli angoli arrotondati del box */
  background: #efe5d4;
  border: 1px solid rgba(255, 255, 255, .9);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .4);
}

.map-scene{
  position:absolute;
  inset:0;
}

.detail-scene{
  position:absolute;
  inset:0;
  display:grid;
  grid-template-columns:1.15fr .85fr;
  background:#fbf6ed;
  border-radius:var(--radius);
  overflow:auto;
}

.mountains{position:absolute;inset:0;width:100%;height:100%}

.route,.route-2{
  fill:none;
  stroke:#6e5d43;
  stroke-width:5;
  stroke-dasharray:8 14;
  stroke-linecap:round;
  opacity:.55;
}

.route-2{stroke:#48553a;opacity:.34}
.river{
  fill:none;
  stroke:#97b5bb;
  stroke-width:10;
  stroke-linecap:round;
  opacity:.45;
}

.hotspot{
  position:absolute;
  left:var(--x);
  top:var(--y);
  transform:translate(-50%,-50%);
  border:0;
  border-radius:22px;
  padding:10px 14px;
  display:flex;
  align-items:center;
  gap:9px;
  background:rgba(255,250,242,.92);
  color:var(--ink);
  box-shadow:0 15px 35px rgba(40,57,70,.18);
  cursor:pointer;
  min-width:138px;
  justify-content:center;
  transition:transform .22s ease, box-shadow .22s ease, background .22s ease;
  animation:float 5s ease-in-out infinite;
}

.hotspot:hover{
  transform:translate(-50%,-55%) scale(1.04);
  box-shadow:0 20px 46px rgba(40,57,70,.25);
  background:#fffdf9;
}

.hotspot.home{
  padding:18px 22px;
  min-width:190px;
  border:1px solid rgba(111,129,63,.28);
}

.hotspot__icon{
  display:grid;
  place-items:center;
  width:34px;
  height:34px;
  border-radius:50%;
  background:#eef1df;
}

.hotspot__label{
  font-family:"Cormorant Garamond",Georgia,serif;
  font-size:1.2rem;
  font-weight:700;
  line-height:.96;
}

.map-caption{
  position:absolute;
  left:28px;
  bottom:28px;
  padding:18px 20px;
  border-radius:22px;
  background:rgba(40,57,70,.88);
  color:white;
  box-shadow:0 20px 50px rgba(40,57,70,.22);
}

.map-caption span{display:block;color:#e6dccd;font-size:.9rem;margin-bottom:3px}
.map-caption strong{font-family:"Cormorant Garamond";font-size:1.7rem;font-weight:600}

@keyframes float{
  0%,100%{margin-top:0}
  50%{margin-top:-7px}
}

.side-panel{
  border-radius:var(--radius);
  background:rgba(255,255,255,.58);
  padding:20px;
  border:1px solid rgba(255,255,255,.9);

  display:flex;
  flex-direction:column;
  justify-content:space-between;
}

.side-panel__eyebrow,.detail__eyebrow{
  margin:0 0 10px;
  color:var(--olive-dark);
  text-transform:uppercase;
  font-size:.76rem;
  font-weight:800;
  letter-spacing:.16em;
}

.side-panel h2{
  font-size:clamp(2rem,3vw,3rem);
  margin-bottom:14px;
}

.side-panel p{
  color:var(--muted);
  line-height:1.65;
  margin:0 0 22px;
}

.quick-list{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px;
  margin:14px 0;
}

.quick-item{
  width:100%;
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:3px;
  border:1px solid var(--line);
  background:rgba(255,250,242,.72);
  padding:8px 10px;
  border-radius:13px;
  cursor:pointer;
  transition:.22s ease;
}

.quick-item:hover{transform:translateX(4px);background:white}

.quick-item strong{
  font-family:"Cormorant Garamond";
  font-size:1.05rem;
  line-height:1.1;
}

.quick-item span{
  font-size:.72rem;
  color:var(--muted);
  line-height:1.2;
}

.primary-cta{
  display:flex;
  justify-content:center;
  align-items:center;
  text-decoration:none;
  border-radius:999px;
  padding:15px 20px;
  color:white;
  background:var(--blue);
  font-weight:700;
  box-shadow:0 15px 35px rgba(40,57,70,.18);
  transition:.25s ease;
}

.primary-cta:hover{transform:translateY(-2px);filter:brightness(1.07)}


.back-btn{
  position:absolute;
  left:20px;
  top:20px;
  z-index:5;
  background:rgba(255,250,242,.9);
}

.detail__media{
  background:#efe5d4;
  display:grid;
  grid-template-columns:1fr 1fr;
  grid-template-rows:1fr 1fr;
  gap:10px;
  padding:20px;
  padding-top:74px;
  align-self:stretch;   /* si stira a riempire la colonna del grid padre */
}

.detail__media.single{grid-template-columns:1fr}

.detail__media img{
  width:100%;
  height:100%;
  object-fit:cover;
  border-radius:22px;
  box-shadow:0 16px 38px rgba(40,57,70,.14);
}

.detail__content{
  padding:clamp(28px,4vw,58px);
  display:flex;
  flex-direction:column;
  justify-content:center;
}

.detail__content h2{
  font-size:clamp(3rem,5vw,5.4rem);
  letter-spacing:-.05em;
  margin-bottom:18px;
}

.detail__content p{
  color:var(--muted);
  font-size:1.06rem;
  line-height:1.72;
}

.detail__chips{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top:22px;
}

.chip{
  border:1px solid rgba(111,129,63,.2);
  background:#fffdf8;
  color:var(--ink);
  border-radius:999px;
  padding:10px 13px;
  font-weight:700;
  font-size:.9rem;
}

.illustration-card{
  width:100%;
  height:100%;
  min-height:240px;
  border-radius:22px;
  padding:28px;
  display:flex;
  flex-direction:column;
  justify-content:flex-end;
  color:white;
  background:
    linear-gradient(180deg,rgba(40,57,70,.02),rgba(40,57,70,.72)),
    var(--scene-gradient);
  box-shadow:0 16px 38px rgba(40,57,70,.14);
  overflow:hidden;
  position:relative;
}

.illustration-card::before{
  content:"";
  position:absolute;
  inset:20px;
  border:1px solid rgba(255,255,255,.45);
  border-radius:18px;
}

.illustration-card strong{
  font-family:"Cormorant Garamond";
  font-size:2rem;
  position:relative;
}

.illustration-card span{position:relative;opacity:.9}

.fade-in{animation:fadeIn .32s ease both}
@keyframes fadeIn{
  from{opacity:0;transform:scale(.985)}
  to{opacity:1;transform:scale(1)}
}

@media (max-width:1050px){
  .layout{grid-template-columns:1fr}
  .visual-stage{min-height:620px}
  .side-panel{order:-1}
}

@media (max-width:760px){
  .app-shell{padding:10px}
  .hero{border-radius:24px;padding:14px}
  .hero__topbar{align-items:flex-start;flex-direction:column}
  .brand__logo{width:68px;height:68px}
  .visual-stage{min-height:690px}
  .hotspot{
    min-width:auto;
    padding:10px 12px;
  }
  .hotspot__label{font-size:1rem}
  .hotspot__icon{width:29px;height:29px}
  .hotspot.home{min-width:150px}
 .detail-scene{
    grid-template-columns:1fr;
    overflow:auto;
  }
  .detail__media{
    height:470px;
    grid-template-columns:1fr 1fr;
  }
  .detail__content{
    padding:28px 22px 40px;
  }
  .map-caption{
    left:16px;
    right:16px;
    bottom:16px;
  }
}

.mappa-wrap{
  position:relative;
  width:100%;
  border-radius:28px;
  overflow:hidden;
}

.mappa-img{
  width:100%;
  display:block;
}

.mappa-wrap .hotspot{
  position:absolute;
  left:var(--x);
  top:var(--y);
  transform:translate(-50%,-50%);
  z-index:5;
}