.legend-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  justify-items: center;
  align-items: start;
  text-align: center; /* ⬅ centra tutto */
  gap: 2.5rem;
}

/* Ogni blocco */
.legend-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 0.6rem;
  text-align: center;
  transition: transform .25s ease, filter .25s ease;
}

.legend-icon {
  width: 80px;
  height: 80px;
  border: 3px solid var(--color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  box-shadow: 0 4px 10px rgba(0,0,0,.1);
  transition: all .3s ease;
}

.legend-icon img {
  width: 36px;
  height: 36px;
  opacity: .9;
  transition: transform .3s ease, opacity .3s ease;
}

.legend-item h4 {
  font-family: 'Poppins-SemiBold', sans-serif;
  font-size: 1.05rem;
  color: var(--fg);
  margin: 0.4rem 0 0.2rem;
  text-transform: none;
}

.legend-item ul,
.legend-item li {
  list-style: none;
  padding: 0;
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  text-align: center;
  line-height: 1.4;
}



/* font personalizzati  */
@font-face {
  font-family: 'Poppins-Regular';
  src: url('Poppins-Regular.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'Poppins-SemiBold';
  src: url('Poppins-SemiBold.ttf') format('truetype');
  font-weight: 600;
  font-style: normal;
}

@font-face {
  font-family: 'Poppins-Bold';
  src: url('Poppins-Bold.ttf') format('truetype');
  font-weight: bold;
  font-style: normal;
}
@font-face {
  font-family: 'SitkaSmall';
  src: url('sitka-small-599.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
}

    /* === Design tokens (palette chiara istituzionale) === */
    :root{
      --bg: #f6f1eb;           /* crema caldo */
      --bg-2: #efe7dd;         /* crema più scuro per blocchi */
      --fg: #221f1a;           /* testo principale */
      --muted: #5c544c;        /* testo secondario */
      --accent: #b89257;       /* dorato tenue */
      --accent-2: #8b6a3a;     /* dorato più profondo */
      --maxw: 1180px;          /* larghezza contenuto */
      --radius: 18px;          /* raggi arrotondati morbidi */
      --gap: clamp(18px, 2.4vw, 32px);
      --shadow: 0 12px 30px rgba(0,0,0,.12);
      --hero-img: url('./IMG/3.png'); /* SOSTITUIRE */
    }

    /* Reset essenziale */
    *, *::before, *::after{ box-sizing:border-box }
    html,body{ height:100% }
    body{
      margin:0; background:var(--bg); color:var(--fg);
      font-family: 'Poppins-Regular', sans-serif;
      -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
    }
    a{ color: var(--accent-2); text-decoration: none; }
    a:hover{ text-decoration: underline; }
    img{ max-width:100%; height:auto; display:block }
    .wrap{ width:min(100% - 32px, var(--maxw)); margin-inline:auto }
    .spacer{ height: clamp(28px, 5vw, 64px) }

    /* Link salta ai contenuti per accessibilità */
    .skip{ position:absolute; left:-9999px; top:0; background:#fff; color:#000; padding:8px 12px; border-radius:8px }
    .skip:focus{ left:12px; z-index:1000; box-shadow:0 0 0 3px var(--accent) }

    /* === HERO parallax (desktop), fallback mobile === */
    .hero {
      position: relative;
      isolation: isolate;
      overflow: hidden;
      color: #fff;
      min-height: 64svh;
      display: flex;
      justify-content: center;   /* centrato orizzontalmente */
      background: center/cover no-repeat var(--hero-img);
      background-attachment: fixed;
      text-align: center;
    }

    @media (max-width: 980px){ .hero{ background-attachment: scroll } }


    .hero::after{ /* vela scura per leggibilità titolo */
      content:""; position:absolute; inset:0; z-index:0;
      background: linear-gradient(to top, rgba(0,0,0,.55), rgba(0,0,0,.15) 40%, rgba(0,0,0,0) 70%);
    }
    .hero-inner {
      position: relative;
      z-index: 1;
      margin-top: clamp(120px, 18vh, 200px); /* più basso ma sempre proporzionato */
      text-align: center;
    }
    .brand{ position:absolute; left:2rem; top:1.2rem; z-index:2; display:flex; align-items:center; gap:.6rem; color:#fff; font-size:.95rem }
    .brand .dot{ width:10px; height:10px; border-radius:50%; background:var(--accent) }

    .eyebrow{ text-transform:uppercase; letter-spacing:.22em; color:var(--accent); font-weight:600; font-size:.8rem }
    h1{
      font-family: 'SitkaSmall', serif; font-weight: 700; letter-spacing: 0.02em;
      font-size: clamp(34px, 6vw, 60px); line-height:1.12; margin:.35rem 0 0;
      text-shadow: 0 2px 0 rgba(0,0,0,.35);
    }
    .subtitle{ max-width: 62ch; color:#f0e6d6; margin-top: 12px; font-size: clamp(15px, 2vw, 19px) }

    /* Separatore dorato sottile */
    .divider{ height:2px; width:120px; background:linear-gradient(90deg, transparent, var(--accent), transparent); margin:18px 0 0 }

    /* === Sezioni contenuto (alternate) === */
    .section{ position:relative }
    .grid{ display:grid; gap: var(--gap); align-items:center }
    .row{ grid-template-columns: 1fr; padding: var(--gap) }
    .row.media-right .grid{ grid-template-columns: 1.05fr 1fr }
    .row.media-left  .grid{ grid-template-columns: 1fr 1.05fr }
    @media (max-width: 980px){ .row.media-right .grid, .row.media-left .grid{ grid-template-columns:1fr } }

    .text{ padding: clamp(16px, 3vw, 32px) }
    .text h2{  font-family: 'SitkaSmall', serif;
  font-weight: 700;
  letter-spacing: 0.02em;}
    .lede{ color: var(--muted) }

    .media {
  aspect-ratio: 3/2;
  width: 100%;
  object-fit: contain;
  border-radius: 4px;
  transition: transform .6s ease, filter .6s ease;
}

figure {
  overflow: hidden;
  border-radius: 4px;
  position: relative;
}

/* Hover raffinato */
figure:hover .media {
  transform: scale(1.04);
  filter: brightness(1.05) contrast(1.02);
}

/* Didascalia con fade-in */
.caption {
  color: #6b635b;
  font-size: .9rem;
  margin-top: .6rem;
  text-align: center;
  opacity: .85;
  transition: opacity .3s ease;
}

figure:hover .caption {
  opacity: 1;
}



    /* .caption{ color: #6b635b; font-size:.95rem; margin:.5rem var(--gap) 0 } */
/* === Unity frame + controls === */




.unity {
  position: relative;
  width: 100%;
  max-width: 1000px;
  aspect-ratio: 16 / 9;
  margin: 3rem auto;
  background: var(--bg);   /* ✅ uguale allo sfondo della pagina */
  border: none;
  box-shadow: none;
  padding: 0;
  overflow: hidden;
}

/* ✅ Adatta il contenuto al box */
.unity iframe {
  position: absolute;
  top: 50%;
  left: 50%;
    aspect-ratio: 9 / 16;
    width: 100%;
    height: 100%;
  border: none;
  transform: translate(-50%, -50%) scale(1);
  transform-origin: center;
}

/* ✅ Versione mobile responsive */
@media (max-width: 980px) {
  .unity {
    max-width: 100%;
    margin: 3.5rem auto 2rem;
    background: var(--bg);   /* ✅ stesso colore anche su mobile */
    overflow: hidden;
    transition: aspect-ratio 0.3s ease;
  }

  .unity iframe {
    position: absolute;
    top: 50%;
    left: 50%;
      aspect-ratio: 9 / 16;
      width: 100%;
      height: 100%;
    transform: translate(-50%, -50%) scale(1);
    transform-origin: center;
    object-fit: cover;
  }
}

/* 📱 Verticale (portrait): 9:16 */
@media (orientation: portrait) and (max-width: 980px) {
  .unity {
    background: var(--bg);   /* ✅ forzato anche qui */
  }
  .unity iframe {
      aspect-ratio: 9 / 16;
      width: 100%;
      height: 100%;
    transform: translate(-50%, -50%) scale(1);
  }
}

/* 📲 Orizzontale (landscape): 16:9 */
@media (orientation: landscape) and (max-width: 980px) {
    .unity {
        aspect-ratio: 16 / 9;
        background: var(--bg);   /* ✅ coerente anche qui */
    }
    .unity iframe {
        aspect-ratio: 9 / 16;
        width: 100%;
        height: 100%;
        transform: translate(-50%, -50%) scale(1);
    }

    .hero-inner {
      margin-top: 3rem; /* 🔹 stacca titolo e bottone solo in orizzontale */
    }
  
}

.unity-fullscreen-btn {
  position: absolute;
  top: -60px;      /* quanto deve “uscire” sopra il riquadro */
  right: 87px; 
  z-index: 20;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 0.55rem 1.2rem 0.55rem 1.3rem;
  font-size: 1rem;
  font-weight: 600;
  color: #2a241e;                 /* testo scuro */
  background: #BFAAA8;      /* avorio chiaro */
  border: none;      /* dorato tenue */
  border-radius: 45px 45px 45px 45px;   /* smussato sopra */
  box-shadow: 0 0 18px rgba(184,146,87,0.25);
  backdrop-filter: blur(4px);
  cursor: pointer;
  transition: all 0.25s ease;
}


/* 🔹 Linea divisoria verticale */
.unity-fullscreen-btn .divider {
  display: block;
  width: 1px;
  height: 18px;
  background: #b89257;
  opacity: 0.6;
  transition: opacity 0.25s ease;
}

/* 🔹 Icona coerente con stile museo */
.fs-icon {
  width: 18px;
  height: 18px;
  opacity: 0.9;
  filter: invert(20%) sepia(15%) saturate(900%) hue-rotate(355deg) brightness(95%) contrast(90%);
  transition: transform 0.25s ease, opacity 0.25s ease;
}
@media (max-width: 980px){
  .unity-fullscreen-btn{
    top: -64px;
    right: 0;
  }
}


    /* Box istruzioni elegante */
    .note{ background:#fff; border:1px solid #e7ddd1; border-radius: var(--radius); padding: clamp(14px, 2vw, 18px); color: var(--fg) }
    .note h3{   font-family: 'SitkaSmall', serif;
  font-weight: 700;
  letter-spacing: 0.02em;}
    .note p{ margin:.2rem 0 .4rem; color: var(--muted) }
    .note ul{ margin:.4rem 0 0 1.1rem; color: var(--muted) }

    /* Micro-animazioni (ridotte con prefers-reduced-motion) */
    .reveal{ opacity:0; transform: translateY(18px) scale(.98); transition: opacity .7s ease, transform .7s ease }
    .reveal.on{ opacity:1; transform: none }
    @media (prefers-reduced-motion: reduce){ .reveal{ transition:none } }

    /* Back to top */
    .to-top{ position:fixed; right:18px; bottom:18px; z-index:50; opacity:0; transform:translateY(10px); pointer-events:none }
    .to-top.show{ opacity:1; transform:none; pointer-events:auto }
    .to-top a {
      display: inline-flex;
      align-items: center;
      gap: 0.5rem;
      padding: 0.55rem 0.8rem;
      border-radius: 999px;
      text-decoration: none;
      font-weight: 600;
      background: #fffef8;
      border: 2px solid #b89257;
      color: #2a241e;
      box-shadow: 0 0 18px rgba(184,146,87,0.25);
      transition: all 0.25s ease;
    }
    
    .to-top a:hover {
      background: #f7e8c1;
      box-shadow: 0 0 28px rgba(184,146,87,0.45);
      transform: translateY(-3px);
    }
    


    .footer-dark {
      background: black;
      color: #fff;
      padding: 5.5rem 0 2.2rem; /* 🔹 più alto */
      border-top: 3px solid #b89257; /* linea dorata superiore */
      margin-top: 3rem; /* 🔹 spazio tra footer e contenuto sopra */
    }
    .footer-container {
      max-width: 1180px;
      margin: 0 auto;
      display: flex;
      flex-direction: row;       /* 🔹 orizzontale */
      justify-content: center;   /* 🔹 centrato */
      align-items: flex-start;
      gap: 8rem;                 /* 🔹 distanza armoniosa tra blocchi */
      flex-wrap: wrap;           /* 🔹 va a capo su mobile */
      text-align: left;
      padding-inline: 1rem;
    }
    .footer-logo {
      display: flex;
      flex-direction: column;   /* uno sopra l’altro */
      align-items: flex-start;  /* piccolo a sinistra */
      gap: 0.6rem;
      flex-shrink: 0;
      margin: 0 auto;
      height: auto;
      max-width: 100%;
      margin-top: -25px;   
      
    }
    
    .footer-logo-img {
      width: 120px !important;
      height: auto;
      display: block;
      margin: 0 auto 1.2rem; /* centrato e con un po' di respiro sotto */
      object-fit: contain;
    } 
   
/* 
    .footer-columns img:hover {
      transform: scale(1.05);
      opacity: 0.95;
    } */
     
/* Stato di base: mostra ESTESA, nascondi COMPATTA */
.logo-main {
  display: none;
}

.only-mobile {
  display: block;
}

/* --- Riga con i due loghi piccoli e i due punti --- */
.footer-logo p {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin: 0;
 /* sposta i loghi più a sinistra */

}
.only-mobile {
  display: block;
  margin: 0 auto 1rem;   /* barra sopra, staccata */

}



/* Due punti centrati */
.footer-logo p span,
.footer-logo p {
  font-size: 1.8rem;
  color: #fff;
  opacity: 0.8; 
   
}
.footer-logo p span {
  margin-top: 10px;   /* abbassa i due punti */
  display: inline-block;
}

.mini-logos {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 1.2rem;  /* stacco sopra i testi */
}

.mini-logos .logo-small {
  width: 98px; 
  height: auto;
}

.mini-logos .colon {
  font-size: 2rem;
  color: #fff;
  opacity: 0.9;
}
/* Sotto i 1200px: mostra COMPATTA, nascondi ESTESA */
@media (max-width: 1200px) {
  .logo-main {
    display: block;
  }
  .only-mobile {
    display: none;
  }
}
    @media (max-width: 768px) {
      .footer-logo {
        align-items: flex-start !important;  /* spinge tutto a sinistra */
      }
    }

    @media (max-width: 1200px) {

      .footer-container {
        flex-direction: column;     /* ↓ colonna */
        align-items: center;        /* centrato */
        gap: 3rem;                  /* spazio tra blocchi */
        text-align: center;
      }
    
      .footer-logo {
        align-items: center;        /* centrare anche i loghi */
        margin: 0 auto;
      }
    
      .footer-columns {
        flex-direction: column;     /* ↓ anche le due colonne */
        align-items: center;
        gap: 3rem;
      }
    }

    .footer-columns {
      display: flex;
      gap: 6rem;
      flex-wrap: wrap;
    }

    .footer-col h4 {
      color: #f0ece7;
      font-size: 1.05rem;
      font-weight: 600;
      margin-bottom: 0.5rem;
    }
    .footer-col h4 {
      position: relative;
      padding-bottom: 0.6rem;
    }
    
    .footer-col h4::after {
      content: "";
      display: block;
      height: 2px;
      width: 120px;
      margin-top: 10px;
      background: linear-gradient(90deg, transparent, #b89257, transparent);
    }
    .footer-col p {
      margin: 0.3rem 0;
      line-height: 1.6;
      color: #c2bdb7;
    }


    .footer-bottom {
      border-top: 1px solid rgba(255,255,255,0.1);
      margin-top: 0.2rem;
      padding-top:0.2rem;
      padding: 1.3rem 0 1.5rem; /* ⬅️ più spazio sopra e sotto */
      font-size: 0.9rem;
      text-align: center;
      color: #a9a59f;
    }

    .to-tour {
      position: absolute;
      bottom: clamp(24px, 8vh, 50px); /* spostalo più in basso o più in alto se vuoi */
      left: 50%;
      transform: translateX(-50%);
      z-index: 10;
    }
    
    .to-tour a {
      display: inline-flex;
      align-items: center;
      gap: 0.6rem;
      padding: 1rem 2.2rem;
      font-size: 1.75rem;
      font-weight: 600;
      letter-spacing: 0.02em;
      color: #2a241e;
      background: #fffef8;
      border: 2px solid #b89257;
      border-radius: 999px;
      box-shadow: 0 0 18px rgba(184,146,87,0.25);
      text-decoration: none;
      transition: all 0.25s ease;
    }
    
    .to-tour a:hover {
      background: #f7e8c1;
      box-shadow: 0 0 28px rgba(184,146,87,0.45);
      transform: translateY(-3px);
    }
    
    @keyframes pulseTour {
      0%, 100% {
        box-shadow: 0 0 10px rgba(184, 146, 87, 0.4),
                    0 0 25px rgba(184, 146, 87, 0.25);
      }
      50% {
        box-shadow: 0 0 18px rgba(184, 146, 87, 0.8),
                    0 0 40px rgba(184, 146, 87, 0.4);
      }
    }

    /* ✅ Mobile: bottone "Vai al tour" più compatto ma stesso stile */
@media (max-width: 980px) {
  .to-tour a {
    font-size: 1.1rem;             /* più piccolo */
    padding: 0.7rem 1.6rem;        /* meno alto e largo */
    border-width: 1.5px;           /* bordo leggermente più sottile */
    box-shadow: 0 0 10px rgba(184,146,87,0.25); /* ombra più leggera */
  }

  .to-tour a:hover {
    transform: translateY(-2px);   /* meno movimento al passaggio */
    box-shadow: 0 0 16px rgba(184,146,87,0.4);
  }
}


    /* Stampa */
    @media print{
      .hero{ min-height:auto; background: none; color:#000 }
      .brand, .to-top, .unity-toolbar{ display:none !important }
      a{ color:#000; text-decoration:underline }
      .card{ box-shadow:none }
    }

    strong, .highlight {
  font-family: 'Poppins-SemiBold', sans-serif;
}/* === NAVBAR FISSA === */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 58px;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 2rem;
  z-index: 999;
  backdrop-filter: blur(6px);
}

/* Logo + testo a sinistra */
.topbar-left {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.topbar-left .logo {
  height: 20px;          /* 🔹 rimpicciolito ulteriormente */
  width: auto;
  object-fit: contain;
  filter: none;          /* 🔹 rimuove l’inversione bianca */
  margin-right: 0.5rem;  /* spazio fra logo e testo */
  vertical-align: middle;
}
@media (min-resolution: 2dppx) {
  .topbar-left .logo {
    image-rendering: -webkit-optimize-contrast;
  }
}



.topbar-left .site-name {
  font-family: 'Playfair Display', serif;
  font-size: 1.05rem;
  color: #fff;
  font-weight: 600;
  letter-spacing: 0.5px;
}

/* === INTERUTTORE LINGUA === */
.lang-toggle {
  position: relative;
  display: flex;
  background: #1c1c1c;
  border: 1px solid #444;
  border-radius: 999px;
  overflow: hidden;
  cursor: pointer;
  width: 135px;
  height: 34px;
  align-items: center;
  justify-content: space-between;
  font-family: 'Lora', serif;
  font-size: 0.85rem;
  color: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.lang-option {
  flex: 1;
  text-align: center;
  z-index: 2;
  user-select: none;
  transition: color 0.3s ease;
}

.lang-option.active {
  color: #000;
  font-weight: 600;
}

.lang-slider {
  position: absolute;
  top: 2px;
  left: 2px;
  width: calc(50% - 4px);
  height: calc(100% - 4px);
  background: #fff;
  border-radius: 999px;
  transition: all 0.3s ease;
  z-index: 1;
}

/* Evita che la navbar copra il contenuto */
body {
  padding-top: 58px;
}
