body {
  margin: 0;
  font-family: 'Open Sans', sans-serif;
  color: #2e2e2d;
  line-height: 1.6;
  background-image: url('../immagini/sfondo-segni-chiaro.png');
  background-size: 100% auto;
  background-repeat: repeat-y;
  background-position: center top;
  background-color: #ffffff;
}

h5 {
  font-family: 'Lora', serif;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

.topbar {
  background: linear-gradient(to right, rgba(222, 200, 160, 0.92), rgba(250, 240, 220, 0.6));
  padding: 1rem 0;
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(4px);
}
.floriana-wrapper {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
}
.brand-en {
  margin-left: -12rem !important; /* stesso valore della versione italiana */
}

.girigoro.sopra,
.girigoro.sotto {
  display: block;
  width: 55px;
  height: auto; /* importante per mantenere le proporzioni dell'immagine */
  background-repeat: no-repeat;
  background-size: contain;
  background-position: center;
  opacity: 0.7;
}


.girigoro.sopra {
  background-image: url('../immagini/ghirigoro-sopra.png');
  margin-bottom: 2px;
}

.girigoro.sotto {
  background-image: url('../immagini/ghirigoro-sotto.png');
  margin-top: 2px;
}
.logo-link {
  display: inline-block;
  height: 60px;
  margin-left: 0.5rem;
  margin-right: auto;
}

.logo-link img.logo {
  height: 100%;
  width: auto;
  display: block;
}

.floriana-brand {
  font-family: 'Cinzel', serif;
  font-size: 1.4rem;
  font-weight: 600;
  color: #a37218;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  cursor: pointer;
  text-shadow: 0 1px 1px rgba(0,0,0,0.1), 0 0 3px rgba(163, 114, 24, 0.1);
  margin-left: -15rem;
  text-decoration: none;
}


body.dark-mode .floriana-brand {
  color: #f7c600;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

body.dark-mode .girigoro {
  filter: brightness(1.1);
  opacity: 0.9;
}
/* Link attivo nel mega-dropdown */
.mega-links .mega-current {
  pointer-events: none;
  color: #007b91;
  font-weight: 700;
  text-shadow: 0 0 4px rgba(0, 123, 145, 0.2);
}

/* Dark mode */
body.dark-mode .mega-links .mega-current {
  color: #f7c600;
  text-shadow: 0 0 6px rgba(247, 198, 0, 0.3);
}


.nav-flex {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 2rem;
}
.topbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.logo {
  height: 60px;
  margin-left: 4rem;
  margin-right: auto;
}

.nav-menu {
  display: flex;
  flex-wrap: wrap;
  gap: 4rem; 
}
.nav-menu a {
  position: relative;
  font-family: 'Lora', serif;
  font-size: 1.43rem;
  font-weight: 600;
  color: #004a55;
  text-decoration: none;
  text-transform: uppercase;
  transition: all 0.3s ease;
  padding: 0.3rem 0;
}
.nav-menu a.active {
  color: #007b91;
  border-bottom: 2px solid #007b91;
}

.nav-menu a:hover {
  color: #007b91;
  text-shadow: 0 0 4px rgba(0, 123, 145, 0.3);
}
.nav-menu a:hover::after,
.nav-menu a.active::after {
  width: 100%;
}

.nav-menu a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0%;
  height: 2px;
  background-color: #007b91;
  transition: width 0.4s ease-in-out;
}

/* anche il link EN desktop in corsivo */
.nav-menu .lang { font-style: italic; letter-spacing:.3px; }

.lang {
  font-style: italic;
  font-weight: 500;
}
body.dark-mode {
  background-color: #121212;
  color: #e4e4e4;
  background-image: url('../immagini/sfondo-segni-scuro.png');
  background-size: 100% auto;
  background-repeat: repeat-y;
  background-position: center top;
}

.dark-mode .topbar {
  background: linear-gradient(
    to right,
    rgba(18, 18, 18, 0.85),
    rgba(34, 34, 34, 0.5)
  );
  backdrop-filter: blur(4px); /* mantieni l'effetto vetro */
  box-shadow: 0 2px 8px rgba(255, 255, 255, 0.08);
}

.dark-mode .nav-menu a {
  color: #f0e6d2;
}

.dark-mode .nav-menu a:hover,
.dark-mode .nav-menu a.active {
  color: #f7c600;
  border-color: #f7c600;
}

.dark-mode .sottotitolo-sezione {
  color: #c6a848;
}

.dark-mode .titolo-sezione {
  color: #f9f9f9;
}

.dark-mode .testo-intro,
.dark-mode .famiglia-text p,
.dark-mode .citazione-slide blockquote {
  color: #ccc;
}

.dark-mode .item {
  background: transparent;
  box-shadow: none;
}

body.dark-mode .prodotti .item p {
  color: #fff3b0;
}


.dark-mode .footer-icon-link,
.dark-mode .footer-indirizzi-col {
  color: #ddd;
}

.dark-mode .footer-icon-link:hover {
  color: #f7c600;
}

.dark-mode .page-footer {
  background: #000;
  color: #ccc;
}

.dark-mode .progress-bar {
  background: #f7c600;
}
body.dark-mode .mega-dropdown {
  background: linear-gradient(to right, rgba(30, 30, 30, 0.95), rgba(45, 45, 45, 0.75));
  box-shadow: 0 8px 18px rgba(255, 255, 255, 0.05);
}

body.dark-mode .mega-links a {
  color: #f7e9b5;
}

body.dark-mode .mega-links a:hover {
  color: #f7c600;
}

body.dark-mode #contatti-dropdown .item p {
  color: #fff3b0;
    font-size: 0.8rem;
  margin: 0;
}

body.dark-mode #contatti-dropdown .item:hover p {
  color: #f7c600;
}

.dark-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  margin-left: 1rem;
}

.dark-toggle img {
  width: 24px;
  height: 24px;
  padding: 4px;
  transform: scale(1.4); /* ingrandisce visivamente l'icona */
  transition: transform 0.3s ease, background-color 0.3s ease;
  border-radius: 50%;
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.2);

}
/* Light mode */
body:not(.dark-mode) .dark-toggle img {
  background-color: rgba(255, 255, 255, 0.25);
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.2);
}

/* Dark mode */
body.dark-mode .dark-toggle img {
  background-color: rgba(255, 255, 255, 0.25);
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.25);
}
#dark-icon[src*="luna"] {
  width: 23px;
  height: 23px;
}

/* Link interni */
.mega-links {
  display: flex;
  gap: 3rem;
}

.mega-links a {
  font-weight: 600;
  font-family: 'Lora', serif;
  color: #004a55;
  text-decoration: none;
  text-transform: uppercase;
  transition: color 0.3s;
  cursor: pointer;
}

.mega-links a:hover {
  color: #007b91;
}

.mega-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100vw;
  background: linear-gradient(to right, rgba(200, 175, 135, 0.85), rgba(235, 215, 190, 0.85));
  backdrop-filter: blur(10px) brightness(1.1);
  padding: 1rem 0;
  display: flex;
  justify-content: center;
  opacity: 0;
  transform: translateY(-10px);
  pointer-events: none;
  transition: opacity 0.5s ease, transform 0.5s ease;
  z-index: 9;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.1);
}
  
.mega-dropdown.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.nav-menu a {
  display: inline-block;
  line-height: 1;
  padding: 0.3rem 0;
  vertical-align: middle;
}
#contatti-dropdown .item {
  background: none;
  padding: 0.3rem 0.5rem; /* padding verticale minore */
  display: flex;
  align-items: center;
  gap: 0.4rem; /* margine tra icon e testo più stretto */
  box-shadow: none;
  border-radius: 0;
  width: 150px;
  text-align: center;
  text-decoration: none;
  transition: none !important;
  transform: none !important;
}

#contatti-dropdown .item img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  margin-bottom: 0.3rem;
  display: block;
  margin-left: auto;
  margin-right: auto;

  /* eliminazione di ogni stile visivo */
  background: none !important;
  padding: 0 !important;
  box-shadow: none !important;
  border: none !important;
  border-radius: 0 !important;
}
#contatti-dropdown {
  left: 50%;
  /* stesso offset X, in più la partenza 10 px sopra per l’animazione */
  transform: translate(-50%, -10px);
  width: 100%;
  height: 70% !important;
}

/* stato visibile con lo stesso slide‑down del dropdown “gusto” */
#contatti-dropdown.visible {
  transform: translate(-50%, 0);
}
#contatti-dropdown .item p {
  font-size: 0.85rem;
  font-family: 'Lora', serif;
  margin: 0;
  color: #004a55;
  font-weight: 500;
  transition: color 0.3s ease;
}

#contatti-dropdown .item:hover p {
  color: #007b91; /* oppure un colore più chiaro tipo #00a0b0 per effetto glow */
  transition: none !important;
}
.sottotitolo-sezione {
  color: #aa8844;
  font-weight: 600;
  font-family: 'Lora', serif;
  letter-spacing: 1px;
  font-size: 1.1rem;
  margin-bottom: 0.1rem;
  text-transform: uppercase;
}

.titolo-sezione {
  font-size: 3rem;
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  margin-top: 0.3rem;
  margin-bottom: 0.8rem;
  color: #2e2e2d;
}

.testo-intro {
  font-size: 1.2rem;
  color: #444;
  max-width: 680px;
  margin: 0 auto 2rem;
  line-height: 1.8;
}
.famiglia-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  padding-top: 2rem;
  padding-bottom: 2rem;
}

.famiglia-text h4 {
  margin-bottom: 0.5rem;
}

.famiglia-text p {
  font-size: 1.1rem;
  color: #444;
  line-height: 1.8;
  margin-bottom: 1rem;
  max-width: 600px;
}
.famiglia-img img {
  width: 460px;
  height: 540px;
  object-fit: cover;
  border-radius: 50px;
  border: 3px solid transparent;
  background: linear-gradient(to bottom, #f8e8c0, #d4af37);
  background-clip: padding-box, border-box;
  box-shadow:
    0 4px 18px rgba(212, 175, 55, 0.3), /* glow dorato */
    0 8px 30px rgba(0, 0, 0, 0.1);       /* ombra elegante */
}

.gusto .item p {
  font-size: 1.1rem;
  font-family: 'Lora', serif;
  color: #004a55;
  font-weight: 700;
  letter-spacing: 0.8px;
  margin-top: 1rem;
  text-transform: uppercase;
}

.gusto .testo-intro {
  margin-bottom: 2rem;
}
.citazione-carousel {
  position: relative;
  overflow: hidden;
  max-width: 700px;
  margin: 2rem auto 0;
  min-height: 180px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 0;
  text-align: center;
}


.citazione-slide.active {
  opacity: 1;
  transform: translateY(0);
  position: relative;
}

.citazione-slide blockquote {
  font-size: 1.4rem;
  font-style: italic;
  color: #444;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.05);
  line-height: 1.8;
}

.citazione-slide cite {
  display: block;
  margin-top: 1rem;
  font-size: 1rem;
  color: #aa8844;
  font-weight: 600;
}
.citazione-slide {
  opacity: 0;
  transform: translateX(50%);
  transition: opacity 0.8s ease, transform 0.8s ease;
  position: absolute;
  width: 100%;
  text-align: center;
}

.citazione-slide.active {
  opacity: 1;
  transform: translateX(0);
  position: relative;
}

.citazione-slide.exit {
  opacity: 0;
  transform: translateX(-50%);
}
.footer-mappe {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  margin-top: 2rem;
}

.mappa-singola {
  flex: 0 1 460px; /* meno larga rispetto al 100% */
  max-width: 480px;
}

.mappa-singola iframe {
  width: 100%;
  height: 300px; /* più alta rispetto a prima */
  border-radius: 10px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.progress-bar {
  height: 4px;
  background: #c59d35;
  width: 100%;
  margin-top: 1.5rem;
  animation: progressCountdown 5s linear forwards;
}

@keyframes progressCountdown {
  from {
    width: 100%;
  }
  to {
    width: 0%;
  }
}
.hero {
  position: relative;
  height: 100vh;
  display: block; /* da flex → block */
  overflow: hidden;
  margin-top: 0;
}

.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: contrast(1.05); /* leggera enfasi senza esagerare */
  transition: transform 20s ease-in-out, filter 1.5s ease-in-out;
  transform: none;
  animation: zoomHero 20s ease-in-out infinite alternate;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

.hero-text {
  font-family: 'Lora';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #fefefe;
  text-align: center;
  max-width: 500px;
  opacity: 0;
  padding: 2rem;
  animation: fadeSlideIn 3s ease-in-out forwards;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
}

.hero-text::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 160%;
  height: 180%;
  transform: translate(-50%, -50%);
  z-index: -1;
  background: radial-gradient(
    circle at center,
    rgba(0, 0, 0, 1) 0%,
    rgba(0, 0, 0, 0.85) 25%,
    rgba(0, 0, 0, 0.5) 60%,
    transparent 100%
  );
  filter: blur(45px);
  opacity: 0.90;
  transition: opacity 1.5s ease;
  pointer-events: none;
}

.hero-text h1 {
  font-size: 4.5rem;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: 1px;
  margin-bottom: 1.5rem;
  background: linear-gradient(to right, #f5d573, #d4af37);
  text-shadow:
    1px 1px 5px rgba(0, 0, 0, 0.6),
    0 0 6px rgba(255, 230, 150, 0.4);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: fadeInText 2s ease-out forwards;
  text-transform: none;
}

.hero-text h1 .light {
  font-size: 2.2rem;
  font-weight: 400;
  letter-spacing: 1px;
  color: #eee;
  -webkit-text-fill-color: #eee;
  background: none;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.hero-text p {
  font-size: 1.8rem;
  color: #f1f1f1;
  letter-spacing: 0.6px;
  font-weight: 300;
  text-shadow: 1px 1px 5px rgba(0, 0, 0, 0.6);
  animation: fadeInText 2.8s ease-out forwards;
  opacity: 0;
}

@keyframes fadeInText {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

section {
  padding: 2rem 1.5rem;
  text-align: center;
}

.famiglia {
  padding: 1rem 1.5rem 1.2rem;
}

.intro h1 {
  font-family: 'Playfair Display', serif;
  font-size: 2.5rem;
  margin-top: 0.5rem;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.intro p {
  max-width: 700px;
  margin: 1rem auto;
  font-size: 1.1rem;
  color: #444;
}

body.dark-mode .intro p {
  color: #ccc;
}
.intro ul {
  max-width: 680px;
  margin: 1rem auto 2rem;
  padding-left: 1.5rem;
  text-align: left;
}
.intro li {
  margin-bottom: 0.5rem;
  line-height: 1.6;
}

.intro a {
  color: #006a84;
  text-decoration: underline;
  text-decoration-color: #aaa;
  font-weight: 600;
  transition: color 0.3s ease;
}

/* Modalità dark */
body.dark-mode .intro a {
  color: #f7c600;
  text-decoration-color: #f7c600;
}

.famiglia .row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  margin-top: 1rem;
}
.famiglia .row:nth-child(even) {
  flex-direction: row-reverse;
}
.famiglia .text {
  max-width: 500px;
  text-align: left;
}

.famiglia .image img {
  max-width: 500px;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.link-arrow {
  display: inline-block;
  margin: 0.5rem 0 0;
  color: #006a84;
  font-family: 'Lora', serif;
  font-weight: bold;
  text-decoration: none;
  transition: all 0.3s;
}

.link-arrow:hover {
  color: #009cb1;
  text-decoration: underline;
}

.prodotti {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 3rem; /* aumentato da 2rem a 3rem */
  margin-top: 2.5rem; /* opzionale: più respiro anche sopra */
}

.item {
  position: relative;
  width: 100%;
  max-width: 300px; /* da 280px → 300px */
  aspect-ratio: 1 / 1.15; /* leggermente più squadrato */
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  flex-direction: column;
  text-decoration: none;
  transform: scale(1.08); /* da 1.03 → 1.08 */
  transition: transform 0.4s ease, box-shadow 0.4s ease;
  cursor: pointer;
}

.item:hover {
  transform: scale(1.12); /* da 1.07 → 1.12 */
}

.cornice-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1.2;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cornice {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  z-index: 2;
  pointer-events: none;
}
.item .cornice {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  z-index: 3; /* più alto del contenuto */
  pointer-events: none;
  transition: filter 0.3s ease;
}

.item .contenuto {
  position: relative;
  z-index: 1;
  width: 88%;
  height: 88%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 0.3rem 0.5rem;
  gap: 0.2rem;
  box-sizing: border-box;
}

.etichetta {
  margin-top: 0.1rem;
  font-weight: 700;
  font-size: 1rem;
  color: #004a55;
  text-transform: uppercase;
  transition: color 0.3s ease;
}

.item:hover .etichetta {
  color: #a37218;
}

body.dark-mode .item:hover .etichetta {
  color: #f7c600;
}


.item .contenuto img {
  width: 100%;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  flex-grow: 1;
}

.item .contenuto p {
  font-size: 1rem;
  font-weight: bold;
  color: #004a55;
  background: rgba(255,255,255,0.7);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
}
.item:hover .cornice {
  filter: brightness(1.1);
}
.item .cornice,
.item .contenuto img {
  transition: transform 0.5s ease;
}
body:not(.dark-mode) .item img:hover {
  transform: scale(1.02);
  box-shadow: 0 0 45px 14px rgba(212, 175, 55, 0.65); /* più visibile */
}

body.dark-mode .item img:hover {
  transform: scale(1.02);
  box-shadow: 0 0 45px 14px rgba(212, 175, 55, 0.35); /* meno intenso */
}


.item:hover .cornice,
.item:hover .contenuto img {
  transform: scale(1.05);
}

@keyframes fadeSlideIn {
  0% {
    opacity: 0;
    transform: translate(-50%, -60%);
  }
  60% {
    opacity: 1;
    transform: translate(-50%, -48%);
  }
  100% {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
}

/* Zoom lento dell'immagine hero */
.hero-img {
  animation: zoomHero 20s ease-in-out infinite alternate;
}
.hero-img.fade-out {
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
}

.hero-img.fade-in {
  opacity: 1;
  transition: opacity 0.5s ease-in-out;
}

@keyframes zoomHero {
  0% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1.1);
  }
}

.item p {
  font-size: 1rem;
  font-weight: bold;
  color: #004a55;
  margin-top: 0.6rem;
  background: none;
  padding: 0;
  border-radius: 0;
}

body.dark-mode .prodotti .etichetta,
body.dark-mode .prodotti .item p {
  background: transparent !important;
  padding: 0 !important;
  border: none !important;
  box-shadow: none !important;
}

.quadri {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.quadri img {
  width: 220px;
  border-radius: 6px;
  transition: transform 0.3s;
}

.quadri img:hover {
  transform: scale(1.05);
  filter: brightness(1.05);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}
.page-footer {
  background: #111;
  color: #f0e6d2;
  padding: 2.2rem 1rem 1.2rem;   /* ridotta la spaziatura complessiva */
  text-align: center;
  font-size: 0.95rem;
}

.brand-text {
  font-size: 0.95rem;
  color: #ccc;
  max-width: 320px;
  margin: 0 auto;
}

.footer-content {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 1rem;           /* meno spazio sotto i blocchi */
  align-items: flex-start;
}
.footer-logo-col {
  flex: 1 1 300px;
  text-align: center;
}
.footer-logo {
  height: 70px;
  margin-bottom: 1rem;
}

.footer-logo.grande {
  height: 140px;
}
.footer-indirizzi-col {
  flex: 1 1 300px;
  font-family: 'Lora', serif;
  text-align: center;
  color: #e0d7c6;
  font-size: 0.95rem;
}

.footer-indirizzi-col h4 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  color: #f7c600;
  text-transform: uppercase;
}

.footer-indirizzi-col p {
  margin: 0.3rem 0;
}

.footer-desc {
  font-size: 0.95rem;
  font-family: 'Lora', serif;
  max-width: 320px;
  margin: 0 auto;
  color: #ccc;
}

.footer-contatti-col {
  font-family: 'Lora', serif;
  flex: 1 1 300px;
  text-align: center;
}

.footer-contatti-col h4 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  color: #f7c600;
  text-transform: uppercase;
}

.footer-icon-link {
  display: flex;
  font-family: 'Lora', serif;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  margin: 0.5rem 0;
  color: #e0d7c6;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-icon-link img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.footer-icon-link:hover {
  color: #d4af37;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 1.5rem;
  font-size: 0.85rem;
  font-family: 'Lora', serif;
  color: #999;
}

.footer-bottom a {
  text-decoration: underline;
  text-decoration-color: #999;
  color: inherit;
  transition: color 0.3s ease;
}

.footer-bottom a:hover {
  color: #ccc;
  text-decoration-color: #ccc;
}

.citazioni blockquote {
  opacity: 0;
  animation: fadeInUp 1s ease forwards;
  animation-delay: 0.5s;
}
.fade-in {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 1s ease-out, transform 1s ease-out;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.modal-prodotto {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(6px);
  align-items: center;
  justify-content: center;
  z-index: 999;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.modal-prodotto.show {
  display: flex;
  opacity: 1;
}

.modal-content {
  font-family: 'Lora', serif;
  background: #fff;
  color: #000;
  width: 70vw;
  max-width: 720px;
  height: 520px;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  padding: 0;
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: scale(0.95);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.modal-prodotto.show .modal-content {
  opacity: 1;
  transform: scale(1);
}

body.dark-mode .modal-content {
  background: #1a1a1a;
  color: #eee;
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 14px;
  font-size: 2rem;
  color: #999;
  cursor: pointer;
  z-index: 10;
  transition: color 0.2s ease, transform 0.2s ease;
}
.modal-close:hover {
  color: #000;
  transform: none;
}

.modal-info-col {
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #ccc transparent;
}
.modal-info-col::-webkit-scrollbar {
  width: 6px;
}
.modal-info-col::-webkit-scrollbar-thumb {
  background-color: #bbb;
  border-radius: 4px;
}
.modal-description {
  font-size: 1.1rem;
  color: #444;
  margin-bottom: 1.5rem;
}

.modal-allergeni {
  font-size: 0.95rem;
  font-style: italic;
  color: #6c4c14;
  background-color: #fff3d6;
  padding: 0.8rem;
  border-left: 4px solid #a37218;
  border-radius: 4px;
}
body.dark-mode .modal-allergeni {
  background-color: #2a220c;
  color: #e2c98e;
  border-left-color: #f7c600;
}

body.dark-mode .modal-close:hover {
  color: #f7c600;
  transform: none;
}

.modal-grid {
  display: flex;
  height: 100%;
  flex-direction: row;
}
.modal-btn {
  margin-top: 2rem;
  padding: 0.5rem 1.2rem;
  background: linear-gradient(to right, #d4af37, #a37218);
  color: #fffdf8;
  font-family: 'Lora', serif;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  border: none;
  border-radius: 999px;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  transition: background 0.3s ease, box-shadow 0.3s ease;
  display: inline-block;
  width: fit-content;
  white-space: nowrap;
}

.modal-btn:hover {
  background: linear-gradient(to right, #a37218, #7a550f);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}

body.dark-mode .modal-btn {
  background-color: #f7c600;
  color: #000;
}
body.dark-mode .modal-btn:hover {
  background-color: #ffe680;
}
.modal-btn-wrapper {
  display: flex;
  gap: 1rem;
    position: relative;
  z-index: 5;
  margin-top: 1.5rem;
}

.modal-like-btn {
  margin-top: 2rem;
  padding: 0.6rem 1.4rem; /* aumenta il padding */
  background: linear-gradient(to right, #f8ecd0, #e4d1a0);
  color: #7a5e2d;
  font-family: 'Lora', serif;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  border: none;
  border-radius: 999px;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
  transition: background 0.3s ease, box-shadow 0.3s ease;
  width: fit-content;
  white-space: nowrap;
  position: relative;
  z-index: 10;
  min-width: 140px;
  display: inline-block;
  pointer-events: auto;
  cursor: pointer;
}

.modal-like-btn:hover {
  background: linear-gradient(to right, #e4d1a0, #d4b77d);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}

.modal-img-col {
  flex: 0 0 40%;
  background-color: #f2eee4;
  padding: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-right: 1px solid #ddd;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.modal-img-col.with-background {
  position: relative;
  background-image: url('../immagini/sfondo-chiaro-verticale.png');
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  background-color: #f2eee4; /* fallback colore */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.2rem;
  overflow: hidden;
}
body.dark-mode .modal-img-col.with-background {
  background-image: url('../immagini/sfondo-scuro-verticale.png');
  background-color: #242424;
}

.modal-prodotto.show .modal-img-col {
  opacity: 1;
  transform: translateY(0);
}

.modal-img-col img {
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: 100%;
  object-fit: contain;
  border-radius: 16px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease;
}
.modal-img-col img:hover {
  transform: scale(1.02);
}


body.dark-mode .modal-img-col {
  background-color: #242424;
  border-right: 1px solid #444;
}


.modal-info-col {
  flex: 1;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.modal-info-col h2 {
  margin: 0 0 0.8rem;
  font-size: 2.6rem;
  font-weight: 800;
  color: #a37218;
  text-transform: uppercase;
  line-height: 1.2;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}


.modal-info-col p {
  margin-top: 1rem;
  font-size: 1.2rem;
  line-height: 1.8;
  color: #444;
  max-width: 95%;
}

body.dark-mode .modal-info-col p {
  color: #e4e4e4;
}

.modal-info-col {
  padding: 2.5rem 3rem;
  background: linear-gradient(to bottom, #fffdf8, #f8f4ec);
  border-left: 1px solid #eee;
}

body.dark-mode .modal-info-col {
  background: linear-gradient(to bottom, #1c1c1c, #2b2b2b);
  border-left: 1px solid #333;
}

@keyframes slideUpModal {
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Dark mode */
body.dark-mode .modal-content {
  background: #1e1e1e;
  color: #e4e4e4;
}

body.dark-mode .modal-close {
  color: #f7c600;
}

@media (max-width: 600px) {
  .modal-content {
    width: 95vw;
    height: auto;
    flex-direction: column;
  }

  .modal-grid {
    flex-direction: column;
  }

  .modal-img-col {
    flex: 0 0 auto;
    height: 240px;
    border-right: none;
    border-bottom: 1px solid #ddd;
  }

  .modal-info-col {
    padding: 1.5rem;
  }
}

.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: .25rem .35rem;
}
.hamburger-box { width: 28px; height: 18px; display: inline-block; position: relative; }
.hamburger-inner,
.hamburger-inner::before,
.hamburger-inner::after {
  position: absolute; left: 0; width: 28px; height: 2px; background: currentColor;
  transition: transform .35s ease, opacity .25s ease, top .35s ease;
  content: "";
}
.hamburger-inner { top: 8px; }
.hamburger-inner::before { top: -8px; }
.hamburger-inner::after  { top: 8px; }

.hamburger.is-open .hamburger-inner { transform: rotate(45deg); }
.hamburger.is-open .hamburger-inner::before { top: 0; transform: rotate(90deg); }
.hamburger.is-open .hamburger-inner::after  { top: 0; opacity: 0; }

body.dark-mode .hamburger { color: #fff; }


#scrollToTop {
  position: fixed;
  bottom: 30px;
  right: 40px;
  background-color: #007b91; /* azzurro brillante */
  color: white;
  border: none;
  border-radius: 50%;
  width: 58px;
  height: 58px;
  font-size: 2.25rem;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  transition: opacity 0.4s ease, transform 0.3s ease, background-color 0.3s ease;
  opacity: 0;
  pointer-events: none;
  z-index: 999;
}

#scrollToTop:hover {
  transform: scale(1.1);
}

/* DARK MODE */
body.dark-mode #scrollToTop {
  background-color: #f7c600;
  color: #121212;
  box-shadow: 0 4px 10px rgba(255, 255, 255, 0.15);
}

/* visibilità */
#scrollToTop.visible {
  opacity: 1;
  pointer-events: auto;
}
.modal-prodotto.show ~ #scrollToTop {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}
#likeButtonWrapper {
  position: fixed;
  bottom: 35px;
  right: 110px;
  z-index: 998;
}

#openLikes {
  font-size: 1.4rem;
  background: #fff7e1;
  color: #a37218;
  border: 2px solid #e5cf94;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  font-family: 'Lora', serif;
  cursor: pointer;
  box-shadow: 0 3px 6px rgba(0,0,0,0.1);
  transition: background-color 0.3s ease, transform 0.3s ease;
}

#openLikes:hover {
  background: #f4e3b6;
  transform: scale(1.05);
}

#likeList {
  position: absolute;
  bottom: 60px;
  right: 0;
  background: #fffdf8;
  padding: 1rem 1.2rem;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
  font-family: 'Lora', serif;
  width: 220px;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.4s ease, transform 0.4s ease;
  pointer-events: none;
}

#likeList.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

#likeList .like-title {
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 0.5rem;
  color: #7a5e2d;
}

#likeItems {
  list-style: disc;
  padding-left: 1.1rem;
  font-size: 0.95rem;
  color: #444;
}

#likeTooltip {
  position: fixed;
  top: 20%;
  left: 50%;
  transform: translate(-50%, -20px);
  opacity: 0;
  background: #fff3cd;
  border: 1px solid #ffeeba;
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 1rem;
  color: #856404;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  z-index: 9999;
  transition: opacity 0.6s ease, transform 0.6s ease;
  pointer-events: none;
}

#likeTooltip.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

#likeTooltip .progress-bar.progress-bar-4s {
  height: 4px;
  background: #d4af37;
  margin-top: 8px;
  animation: progressCountdown 4s linear forwards;
}


.tooltip-central {
  top: 30px;
  left: 50%;
  transform: translate(-50%, 0); /* niente effetto laterale */
  position: fixed;
  background: #fff7e1;
  padding: 1rem 1.6rem 1.4rem;
  font-size: 1.05rem;
  font-weight: 600;
  border-radius: 12px;
  z-index: 1000;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  color: #7a5e2d;
  text-align: center;
  font-family: 'Lora', serif;
  min-width: 260px;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.6s ease;
  pointer-events: none;
}

.tooltip-central.show {
  opacity: 1;
  pointer-events: auto;
}

.tooltip-central .progress-bar {
  height: 4px;
  background: #c59d35;
  width: 100%;
  margin-top: 0.7rem;
  border-radius: 999px;
}

.tooltip-central .progress-bar-4s {
  animation: progressCountdown4s 4s linear forwards;
}

@keyframes progressCountdown4s {
  from {
    width: 100%;
  }
  to {
    width: 0%;
  }
}

.tooltip-first {
  position: fixed;
  bottom: 90px;
  right: 160px;
  background: #fff7e1;
  padding: 1rem 1.4rem;
  border-radius: 12px;
  animation: shake-horiz 0.5s infinite;
  transform: translateX(0);
}
/* Tooltip esclusivo per il primo "Mi Piace" */
/* Tooltip esclusivo primo like, posizione bottom right */
.tooltip-primo-like {
  position: fixed;
  bottom: 60px; /* allineato sopra il cerchio cuore */
  right: 110px;  /* accanto al cerchio cuore */
  transform: none; /* non serve traduzione */
  background: #fff8e1;
  border: 2px solid #d4af37;
  padding: 1rem 1.5rem;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  font-family: 'Open Sans', sans-serif;
  font-size: 1rem;
  color: #856404;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.6s ease;
  pointer-events: none;
  text-align: center;
  width: fit-content;
}

.tooltip-primo-like.show {
  opacity: 1;
  pointer-events: auto;
}

.tooltip-primo-like .progress-bar {
  margin-top: 10px;
  height: 4px;
  background: #d4af37;
  animation: progressCountdown 4s linear forwards;
  border-radius: 2px;
  width: 100%;
}

@keyframes progressCountdown {
  from { width: 100%; }
  to   { width: 0%; }
}

body.dark-mode .tooltip-primo-like {
  background: #2e240d;
  color: #f7c600;
  border-color: #b08a30;
  box-shadow: 0 8px 24px rgba(255, 255, 255, 0.08);
}


@keyframes shake-horiz {
  0% { transform: translateX(0); }
  25% { transform: translateX(-8px); }
  50% { transform: translateX(8px); }
  75% { transform: translateX(-8px); }
  100% { transform: translateX(0); }
}

/* Dark mode */
body.dark-mode #openLikes {
  background: #2e2e2e;
  color: #f7c600;
  border-color: #b59640;
}

body.dark-mode #likeList {
  background: #1f1f1f;
  color: #ddd;
  box-shadow: 0 6px 20px rgba(255, 255, 255, 0.05);
}

body.dark-mode #likeList .like-title {
  color: #f7c600;
}

body.dark-mode #likeTooltip {
  background: #2e240d;
  border-color: #b08a30;
  border-left-color: #f7c600;
  color: #f7c600;
}
.like-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  padding-right: 0.5rem;
}

.remove-like {
  background: none;
  border: none;
  color: #a37218;
  font-size: 1rem;
  cursor: pointer;
  font-weight: bold;
  transition: color 0.2s ease;
}

.remove-like:hover {
  color: #c00;
}
body.dark-mode .remove-like {
  color: #f7c600;
}
body.dark-mode .remove-like:hover {
  color: #ff3333;
}

.sezione-prodotti {
  padding: 4rem 1rem;
}

.griglia-prodotti {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2.5rem;
  justify-items: center;
}
.griglia-prodotti,
.container {
  overflow: visible;
}
.card-prodotto {
  position: relative;
  border-radius: 24px 24px 14px 14px; /* sopra arrotondato, sotto più dritto */
  cursor: pointer;
  max-width: 300px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  transform: translateZ(0);
  isolation: isolate;
  border: 1px solid #d4af37;
  background: #fffdf8; /* base raffinata */
  box-shadow: 0 6px 16px rgba(212, 175, 55, 0.08); /* ombra elegante */
  overflow: hidden;
}

.card-prodotto::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 20px;
  box-shadow: 0 0 8px rgba(212, 175, 55, 0.15); /* glow più controllato */
  z-index: -1;
  pointer-events: none;
  opacity: 0; /* Nascondi di default */
  transition: opacity 0.4s ease;
}
.card-prodotto:hover::before {
  opacity: 1; /* Solo su hover */
}


.card-prodotto:hover {
  transform: scale(1.03);
  box-shadow: 0 8px 24px rgba(163, 114, 24, 0.18);
}
.img-prodotto-wrapper {
  width: 100%;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-bottom: none;
  background: transparent;
}

.img-prodotto {
  width: calc(100% + 2px);
  height: calc(100% + 2px);
  object-fit: cover;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease;
  transform: translate(0, -1px); /* centrato rispetto all’aumento */
}

.info-prodotto {
  padding: 1.2rem;
  text-align: center;
}
body:not(.dark-mode) .info-prodotto {
  padding: 1.2rem;
  text-align: center;
  background-color: #fef9f2; /* colore chiaro caldo */
  border-bottom-left-radius: 20px;
  border-bottom-right-radius: 20px;
}

.nome-prodotto {
  font-family: 'Cinzel', serif;
  font-size: 1.3rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #a37218;
  letter-spacing: 1.2px;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
  margin: 0;
}

/* Dark mode elegante */
body.dark-mode .card-prodotto {
  background: linear-gradient(to bottom, #1e1a16, #2c251d);
  border: 1px solid #705a2b;
  box-shadow: 0 6px 20px rgba(255, 255, 255, 0.05);
}

body.dark-mode .nome-prodotto {
  color: #f7c600;
}
/* Contenitore esterno del widget */
.sezione-recensioni {
  padding: 4rem 1.5rem;
  text-align: center;
}

/* === CONTENITORE WIDGET CON BORDO DORATO VISIBILE IN ENTRAMBI I TEMI === */
.widget-recensioni {
  max-width: 960px;
  margin: 2rem auto;
  padding: 2rem 1.5rem;
  background: #ffffff;
  border: 3px solid #d4af37; /* bordo dorato spesso */
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  transition: all 0.4s ease;
}

/* DARK MODE: sfondo caldo e stessa cornice */
body.dark-mode .widget-recensioni {
  background: #fef9f2;
  border: 3px solid #d4af37;
  box-shadow: 0 10px 30px rgba(255, 255, 255, 0.05);
}
.hero-gallery-bar {
  background: #d4af37; /* oro */
  padding: 1rem 2rem;
  font-family: 'Lora', serif;
  font-size: 1.05rem;
  font-weight: 600;
  color: #121212; /* testo leggibile sopra l’oro */
  text-transform: uppercase;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  opacity: 0;
  transform: scaleX(0);
  transform-origin: center;
  transition: none;
  border-radius: 4px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.hero-gallery-bar.animate-from-center {
  animation: expandStraight 0.65s ease-out forwards;
}

@keyframes expandStraight {
  0% {
    transform: scaleX(0);
    opacity: 0;
  }
  100% {
    transform: scaleX(1);
    opacity: 1;
  }
}
.hero-gallery-bar.animate-from-center span {
  opacity: 0;
  transform: translateY(10px);
  animation: fadeSlideUp 0.7s ease-out 0.3s forwards;
}

@keyframes fadeSlideUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-gallery-bar .arrow {
  margin-left: 0.5rem;
  transition: transform 0.4s ease;
}
.hero-gallery-bar:hover .arrow {
  transform: translateX(5px);
}

body.dark-mode .hero-gallery-bar {
  background: #f7c600;
  color: #121212;
}

.hero-gallery-slider {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 0.5rem; /* da 2rem → 0.5rem */
  margin-top: 1rem;
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height 0.5s ease, opacity 0.5s ease;
  pointer-events: none;
  position: relative;
}

/* Apertura */
.hero-gallery-slider.animate-in {
  max-height: 300px;
  opacity: 1;
  pointer-events: auto;
}

/* Chiusura */
.hero-gallery-slider.animate-out {
  max-height: 0;
  opacity: 0;
  pointer-events: none;
}

.hero-gallery-track {
  display: flex;
  gap: 0.5rem; /* meno spazio tra le immagini */
  overflow-x: auto;
  scroll-behavior: smooth;
  max-width: 100vw;
  padding: 0 0.2rem; /* meno margine interno laterale */
  padding-left: 1rem;       /* spazio per iniziare da più sinistra */
  width: 100%;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none;  /* Internet Explorer 10+ */
}

.hero-gallery-track::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}

.hero-gallery-track img {
  height: 180px;
  border-radius: 10px;
  border: none;
  background-color: #f9f1df;
  box-shadow:
    inset 0 0 12px rgba(200, 170, 100, 0.2),
    0 6px 18px rgba(0, 0, 0, 0.1);
  filter: sepia(0.15) brightness(1.02) contrast(0.92) saturate(0.85);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  flex-shrink: 0;
  background-image: radial-gradient(circle at center, #fef8e6 0%, #f3e4c1 100%);
}

.hero-gallery-track img:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}
.slider-prev,
.slider-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

/* Ingrandisci le immagini */
.slider-prev img,
.slider-next img {
  width: 58px;
  height: 58px;
  transition: transform 0.3s ease;
}

.slider-prev {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
}

.slider-next {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
}

body.dark-mode .slider-prev,
body.dark-mode .slider-next {
  color: #f7c600;
}
.hero-img-thumb {
  position: relative;
  height: 180px;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  flex-shrink: 0;
}

.hero-img-thumb img {
  height: 100%;
  width: auto;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease, filter 0.3s ease;
}

.hero-img-thumb:hover img {
  transform: scale(1.05); /* 🔍 leggero ingrandimento all'hover */
}

/* Overlay testuale all’hover */
.hero-img-thumb::after {
  content: 'Clicca per visualizzare';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Cinzel', serif;
  font-size: 1rem;
  color: white;
  background: rgba(0, 0, 0, 0.3);
  opacity: 0;
  text-align: center;
  padding: 0 0.8rem;
  line-height: 1.4;
  white-space: normal;
  transition: opacity 0.5s ease;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
  pointer-events: none;
}

.hero-img-thumb:hover::after {
  opacity: 1;
}


.hero-img-thumb:hover::after {
  opacity: 1;
}

/* === LIGHTBOX HERO GALLERY === */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  opacity: 0;
  transform: scale(0.95);
  pointer-events: none;
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.lightbox.show {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.lightbox-image {
  max-width: 90%;
  max-height: 85%;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.5);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.lightbox.show .lightbox-image {
  opacity: 1;
  transform: translateY(0);
}

.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 2rem;
  font-size: 2.5rem;
  color: white;
  cursor: pointer;
  z-index: 10;
}

.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  z-index: 10;
  padding: 0;
}

.lightbox-prev img,
.lightbox-next img {
  width: 60px;
  height: 60px;
  object-fit: contain;
  transition: transform 0.3s ease;
  filter: drop-shadow(0 0 4px rgba(0,0,0,0.5));
}

.lightbox-prev {
  left: 2rem;
}

.lightbox-next {
  right: 2rem;
}
/* Switch lingua centrale */
.lang-switch {
  font-family: 'Lora', serif;
  font-weight: 600;
  color: #004a55;
  display: flex; align-items: center; gap: .35rem;
}
.lang-link { text-decoration: none; color: #004a55; }
.lang-link.active { color: #007b91; border-bottom: 2px solid #007b91; }

/* ▼▼▼ AGGIUNTE GLOBALI ▼▼▼ */
.nav-menu .mobile-submenu{display:none;flex-direction:column;gap:.4rem;padding:.25rem 0 0}
.nav-menu .mobile-submenu.show{display:flex}

@media (min-width: 769px){
  /* nascondi la lingua centrale su desktop */
  .lang-switch-mobile{display:none !important;}

  /* disattiva lo scroll-to-top su desktop */
  #scrollToTop{display:none !important;}
}

/* ▲▲▲ FINE AGGIUNTE GLOBALI ▲▲▲ */
@media (max-width: 768px) {
.menu-close,
.menu-lang {
  display: block !important;
}
  /* disattiva lo scroll-to-top su mobile */
  #scrollToTop{display:none !important;}

  /* niente mega-dropdown su mobile */
  .mega-dropdown{display:none !important;}

  /* hamburger visibile */
  .hamburger{display:block; color:#004a55;}
  body.dark-mode .hamburger{color:#fff;}

  /* layout intestazione */
  .nav-flex{
    flex-direction:row;
    justify-content:space-between;
    align-items:center;
    gap:0;
    padding:0 1rem;
  }
  .logo{height:42px; margin:0;}
  .floriana-brand{margin-left:0; font-size:1.1rem;}

  /* =============== MENU MOBILE A SCHERMO INTERO =============== */
  .nav-menu{
    position:fixed;
    inset:0;                      /* full screen */
    display:none;                 /* visibile con .open */
    flex-direction:column;
    align-items:center;
    justify-content:flex-start;
    gap:.25rem;
    padding:148px 1.2rem 2rem;
    overflow:auto;
    z-index:9999;

    /* sfondo segni che ricopre TUTTO + glass */
    background:
      radial-gradient(120% 140% at 50% 0%, rgba(255,255,255,.96), rgba(255,255,255,.92)),
      url('../immagini/sfondo-segni-chiaro.png');
    background-repeat:no-repeat, repeat;
    background-size:cover, auto;
    background-position:center top, center top;

    border:none;
    border-radius:0;
    box-shadow:none;
    backdrop-filter: blur(12px) saturate(1.05);

    animation:menuFullIn .28s ease both;
  }
  body.dark-mode .nav-menu{
    background:
      radial-gradient(120% 140% at 50% 0%, rgba(28,28,28,.96), rgba(28,28,28,.92)),
      url('../immagini/sfondo-segni-scuro.png');
    background-repeat:no-repeat, repeat;
    background-size:cover, auto;
    background-position:center top, center top;
  }
  .nav-menu a.lang{ 
  display: none !important; 
}
  .nav-menu.open{display:flex;}
/* posiziona il toggle tema in fondo al menu, centrato */
.nav-menu .dark-toggle {
  order: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1rem;
}

  @keyframes menuFullIn{
    from{opacity:0; transform:translateY(-8px) scale(.985);}
    to  {opacity:1; transform:translateY(0)    scale(1);}
  }

  /* ===== X GRANDE CENTRATA IN ALTO ===== */
  .menu-close{
    position:fixed;
    top:12px;
    left:50%;
    transform:translateX(-50%);
    z-index:10000;

    width:64px; height:64px;
    border-radius:50%;
    border:none;
    cursor:pointer;

    font-family:'Cinzel', serif;
    font-size:2.25rem;
    line-height:64px;
    text-align:center;

    color:#121212;
    background:linear-gradient(180deg,#fff,#f7f4ec);
    box-shadow:0 8px 24px rgba(0,0,0,.15), inset 0 0 0 2px rgba(212,175,55,.5);
  }
  .menu-close:active{transform:translateX(-50%) scale(.98);}
  body.dark-mode .menu-close{
    color:#121212;
    background:linear-gradient(180deg,#ffeaa6,#f7c600);
    box-shadow:0 8px 24px rgba(255,255,255,.08), inset 0 0 0 2px rgba(247,198,0,.55);
  }

  /* ===== BARRA LINGUA (en / it) SOTTO LA X, CENTRATA ===== */
.menu-lang{
  position:fixed;
  top:90px;
  left:50%;
  transform:translateX(-50%);
  z-index:10000;

  display:flex;
  flex-direction:row;
  align-items:center;
  gap:.5rem;
  flex-wrap:nowrap;          /* <<< evita il wrap */
  white-space:nowrap;
  line-height:1;
  padding:2px 6px;

  font-family:'Lora',serif;
  font-weight:700;
  font-style:italic;
  text-transform:none;
}

  .menu-lang span {
  display: inline-block;
}
/* forza i link lingua a stare su una sola riga */
.menu-lang a{
  display:inline-flex !important;  /* niente block ereditato da .nav-menu a */
  width:auto !important;           /* no 100% */
  flex:0 0 auto;                   /* non allargarti */
  padding-bottom:2px;
}
.menu-lang a::after{ content:none; }  /* rimuove la riga animata delle voci menu */

  .menu-lang a{
    text-decoration:none; padding-bottom:2px;
    color:#004a55;
  }
  .menu-lang .lang-sep{opacity:.9; color:#7a6a45;}
  .menu-lang a.active{
    color:#d4af37; border-bottom:2px solid #d4af37;
  }
  
  body.dark-mode .menu-lang a{color:#f0e6d2; opacity:.95;}
  body.dark-mode .menu-lang a.active{color:#f7c600; border-bottom:2px solid #f7c600;}

  /* ===== VOCI MENU: TUTTO CENTRATO ===== */
  .nav-menu a{
    display:block;
    width:100%;
    text-align:center;
    font-family:'Lora',serif;
    font-weight:700;
    letter-spacing:.6px;
    text-transform:uppercase;
    color:#004a55;
    text-decoration:none;
    padding:1rem 0;
    position:relative;
  }
  .nav-menu a::after{
    content:""; position:absolute; left:50%; bottom:-2px;
    width:0%; height:2px; transform:translateX(-50%);
    background:linear-gradient(90deg,#d4af37,#a37218);
    transition:width .35s ease;
  }
  .nav-menu a:hover{ color:#a37218; }
  .nav-menu a:hover::after{ width:60%; }

  /* divisori sottili */
  .nav-menu a + a{ border-top:1px dotted rgba(163,114,24,.22); }
  body.dark-mode .nav-menu a{ color:#f0e6d2; }
  body.dark-mode .nav-menu a + a{ border-top:1px dotted rgba(247,198,0,.22); }
  body.dark-mode .nav-menu a:hover{ color:#f7c600; }

  /* ===== SUBMENU MOBILE (accordion), CENTRATO ===== */
  .nav-menu .mobile-submenu{
    display:block; overflow:hidden;
    max-height:0; opacity:0; transform:translateY(-6px);
    transition:max-height .45s cubic-bezier(.22,.61,.36,1), opacity .35s ease, transform .35s ease, padding .35s ease;
    padding:0;
    margin:.1rem 0 .4rem;
    width:min(94vw, 680px);

    background:linear-gradient(180deg, rgba(255,252,244,.96), rgba(255,252,244,.9));
    border-left:3px solid rgba(212,175,55,.6);
    border-radius:12px;
    box-shadow:0 8px 24px rgba(0,0,0,.08);
  }
  .nav-menu .mobile-submenu.show{
    max-height:720px;
    opacity:1; transform:translateY(0);
    padding:.55rem .75rem .8rem;
  }
  body.dark-mode .nav-menu .mobile-submenu{
    background:linear-gradient(180deg, rgba(25,25,25,.96), rgba(25,25,25,.9));
    border-left-color:rgba(247,198,0,.6);
    box-shadow:0 8px 24px rgba(255,255,255,.06);
  }

  /* voci interne submenu (es. Angolo del Gusto), SEMPRE CENTRATE */
  .nav-menu .mobile-submenu a{
    display:block;
    padding:.7rem .25rem;
    font-family:'Lora',serif;
    font-weight:700;
    letter-spacing:.5px;
    color:#004a55;
    text-decoration:none;
    border:none;
    text-align:center;
  }
  .nav-menu .mobile-submenu a:hover{
    color:#a37218; transform:translateY(-1px);
    transition:transform .25s ease;
  }
  body.dark-mode .nav-menu .mobile-submenu a{ color:#f0e6d2; }
  body.dark-mode .nav-menu .mobile-submenu a:hover{ color:#f7c600; }

  /* ===== CONTATTI: SOLO ICONE, CENTRATE IN GRIGLIA =====
     (il JS aggiunge .mobile-submenu.icons-only con <a><div class="icon-only"><img/></div></a>) */
  .nav-menu .mobile-submenu.icons-only{
    display:grid;
    grid-template-columns:repeat(4, 1fr);
    gap:1rem .8rem;
    justify-items:center;
    align-items:center;
    padding:1rem .75rem 1.1rem;
  }
  /* ancora centrato, senza testo */
  .nav-menu .mobile-submenu.icons-only a{
    display:flex; align-items:center; justify-content:center;
    width:72px; height:72px;
    border-radius:16px;
    background:linear-gradient(180deg,#fffdf8,#f3ead6);
    box-shadow:0 6px 16px rgba(0,0,0,.08), inset 0 0 0 2px rgba(212,175,55,.4);
    text-indent:-9999px; overflow:hidden; /* nasconde eventuali testi */
  }
  body.dark-mode .nav-menu .mobile-submenu.icons-only a{
    background:linear-gradient(180deg,#2b2b2b,#1f1f1f);
    box-shadow:0 6px 16px rgba(255,255,255,.05), inset 0 0 0 2px rgba(247,198,0,.35);
  }
  .nav-menu .mobile-submenu.icons-only a:active{ transform:scale(.98); }

  .nav-menu .mobile-submenu.icons-only .icon-only{
    display:flex; align-items:center; justify-content:center;
    width:100%; height:100%;
  }
  .nav-menu .mobile-submenu.icons-only img{
    width:38px; height:38px; object-fit:contain; display:block;
    filter:drop-shadow(0 2px 6px rgba(0,0,0,.15));
  }
  body.dark-mode .nav-menu .mobile-submenu.icons-only img{
    filter:drop-shadow(0 2px 6px rgba(255,255,255,.08));
  }

  /* ===== lingua mobile centrata (fallback legacy, se presente in DOM) ===== */
  .lang-switch-mobile{
    display:flex; align-items:center; gap:.2rem;
    margin:0 auto .6rem;
    font-family:'Lora',serif; font-weight:700; line-height:1;
    font-style:italic;
    color:#004a55;
  }
  .lang-switch-mobile .lang-sep{opacity:.9;}
  .lang-switch-mobile .lang-link{ text-decoration:none; color:#004a55; padding-bottom:2px;}
  .lang-switch-mobile .lang-link.active{ color:#d4af37; border-bottom:2px solid #d4af37;}
  body.dark-mode .lang-switch-mobile .lang-link{ color:#f0e6d2; opacity:.9;}
  body.dark-mode .lang-switch-mobile .lang-link.active{ color:#f7c600; border-bottom:2px solid #f7c600; opacity:1;}

  /* ===== HERO (rimane come nel tuo layout, solo ritocchi mobile) ===== */
  .hero{ height:52vh; min-height:360px; }
  .hero-text{ top:42%; transform:translate(-50%,-50%); max-width:92vw; padding:0 1.2rem; text-shadow:0 3px 10px rgba(0,0,0,.7); z-index:1; }
  .hero-overlay::before{
    content:""; position:absolute; inset:0; pointer-events:none; z-index:0; background:rgba(0,0,0,.62);
  }
  .hero-text h1{ font-size:clamp(2.8rem, 8.5vw, 4rem); line-height:1.15; letter-spacing:.5px; }
  .hero-text h1 .light{ font-size:clamp(1.7rem, 5.2vw, 2.3rem); }
  .hero-text p{ font-size:clamp(1.35rem, 5vw, 1.8rem); line-height:1.65; margin-top:.85rem; }
  .hero-img{ object-position:center; height:100%; }

  /* ===== SEZIONI E GRIGLIE ===== */
  .famiglia .row{ flex-direction:column; }
  .famiglia-grid{ grid-template-columns:1fr; gap:1.5rem; }
  .famiglia-img img{ width:100%; height:auto; border-radius:28px; }

  .prodotti{ gap:1.5rem; margin-top:1.5rem; }
  .item{ width:92%; max-width:340px; transform:none; }
  .item:hover{ transform:none; } /* evita zoom invadente su mobile */

  .sezione-prodotti{ padding:2.5rem 1rem; }
  .griglia-prodotti{ grid-template-columns:repeat(auto-fit, minmax(160px,1fr)); gap:1.25rem; }
  .card-prodotto{ max-width:100%; }

  /* ===== SLIDER/GALLERIA HERO ===== */
  .hero-gallery-slider.animate-in{ max-height:240px; }
  .hero-gallery-track img{ height:150px; }

  /* ===== MODALI ===== */
  .modal-content{ width:92vw; height:auto; flex-direction:column; }
  .modal-grid{ flex-direction:column; }
  .modal-img-col{ height:220px; border-right:none; border-bottom:1px solid #ddd; }
  .modal-info-col{ padding:1.25rem; }

  /* ===== FOOTER ===== */
  .footer-content{ flex-direction:column; align-items:center; gap:1.5rem; }
}

@media (max-width: 480px) {
  .topbar { padding: .45rem 0; }
  .logo { height: 38px; }

  /* Tipografia più leggibile su schermi piccoli */
  .hero { height: 44vh; min-height: 300px; }
  .hero-text { top: 40%; }
  .topbar { padding: 0.5rem 0; }

  /* Menù: tap target comodi */
  .nav-menu a { font-size: 1rem; padding: .55rem 0; }

  /* Griglie e card */
  .griglia-prodotti { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem; }
  .img-prodotto { border-radius: 10px; }
  .nome-prodotto { font-size: 1.05rem; }

  /* Modale */
  .modal-info-col h2 { font-size: 1.5rem; }
  .modal-like-btn, .modal-btn { width: 100%; text-align: center; }

  /* Galleria hero */
  .hero-gallery-track img { height: 130px; }

  /* Footer */
  .footer-logo { height: 60px; }
  .footer-bottom { font-size: .82rem; }
}
@media (max-width: 768px){
  .nav-menu{
    position: fixed !important;
    inset: 0 !important;              /* copre tutto */
    width: 100vw !important;
    height: 100dvh !important;
    z-index: 99999 !important;
  }
  .nav-menu.open{ display: flex !important; }
}

/* blocco scroll quando il menu è aperto */
body.menu-open{
  overflow: hidden !important;
  height: 100dvh !important;
  touch-action: none;
}

/* Nasconde X e barra lingua sopra i 1024px (desktop) */
@media screen and (min-width: 1024px) {
  .menu-close,
  .menu-lang {
    display: none !important;
  }
}

/* ===== MOBILE MENU OVERLAY ===== */
@media (max-width: 900px) {
  
  /* mega dropdown dentro l’overlay */
  .mega-dropdown {
    position: static;
    width: 100%;
    opacity: 1 !important;
    transform: none !important;
    pointer-events: auto;
    background: transparent;
    box-shadow: none;
    padding: 0;
  }
  .mega-links {
    justify-content: center;
    gap: 1rem;
  }
  .mega-links a {
    padding: .65rem .9rem;
    border-radius: 8px;
    background: rgba(255,255,255,0.35);
  }
  body.dark-mode .mega-links a {
    background: rgba(0,0,0,0.35);
  }

  /* Contatti: solo icone, niente testo */
  #contatti-dropdown .item p { display: none; }
  #contatti-dropdown .item {
    width: auto;
    padding: 0.25rem;
  }
  #contatti-dropdown .item img {
    width: 44px;
    height: 44px;
    margin: 0;
  }
}
@media (min-width: 901px) {
  .nav-menu {
    display: flex;
    flex-wrap: wrap;
    gap: 4rem;
  }
}
/* IT / EN nella TOPBAR (fuori dal nav-menu) */
@media (max-width: 768px){
  header .lang-switch-mobile{
    position: absolute !important;
    top: 28px;                 /* altezza vicino alla ☰ */
    left: 50%;
    transform: translateX(-30%);  /*  -50% = centrato */
    z-index: 11;
  }
  header .lang-switch-mobile a{ 
    display:inline-flex;
    font-size: 1.2rem;   /* ingrandisci testo */
    font-weight: 600;    /* più in grassetto */
    letter-spacing: 2px; /* più spazio tra lettere */
  }
}
/* Sposta più in basso le scritte nell'hero per non essere coperte dalla topbar */
@media (max-width: 768px){
  .hero-content, 
  .hero-text, 
  .slider-content { /* usa le classi esatte dell'hero */
    padding-top: 100px !important; /* aumenta per spostare più in basso */
  }
}
@media (max-width: 768px) {
  .hero {
    height: 65vh; /* aumentata altezza per mobile */
  }
  .hero-text {
    top: 45%; /* abbassato testo proporzionalmente */
  }
    .hero-text h1 {
    font-size: 3.5rem; /* ingrandito per mobile */
          color: #d4af37; /* oro vivo */
  }
  .hero-text p {
    font-size: 1.6rem; /* ingrandito per mobile */
  }
}
@media (max-width: 768px) {
  .prodotti .item {
    margin-bottom: 2rem; /* maggiore distanziamento mobile */
  }
}
@media (max-width: 768px) {
  body:not(.dark-mode) .lang-switch-mobile .lang-link.active,
  body:not(.dark-mode) .nav-menu .lang.active {
    color: #007b91; /* colore tema, ben visibile su sfondo chiaro */
    font-weight: 700;
     border-bottom: 2px solid #007b91; /* stessa linea del link attivo */
  }
}
body.dark-mode .lang-switch-mobile .lang-sep {
  color: #ffffff; /* slash bianco in dark mode */
}
@media (max-width: 768px) {
  /* riduco padding complessivo del footer */
  .page-footer {
    padding: 1.2rem 1rem 0.5rem; /* ridotto padding inferiore generale */
  }

  /* stringo gli spazi verticali tra i blocchi */
  .footer-content {
    margin-bottom: 0;   /* niente spazio sotto i blocchi */
    gap: .4rem;         /* blocchi più ravvicinati */
  }

  /* aggiungo linee di separazione tra i tre blocchi con meno spazio sopra la linea */
  .footer-content > .footer-logo-col,
  .footer-content > .footer-contatti-col,
  .footer-content > .footer-indirizzi-col {
    padding: 0.4rem 0; /* ridotto */
    border-top: 1px solid rgba(255,255,255,0.22);
  }

  /* niente linea sopra al primo blocco */
  .footer-content > *:first-child {
    border-top: none;
  }

  .footer-content > .footer-indirizzi-col {
    padding-bottom: 0; /* zero spazio sotto */
  }

  /* rimuove margine da ultimo paragrafo/lista */
  .footer-indirizzi-col p:last-child,
  .footer-indirizzi-col li:last-child {
    margin-bottom: 0;
  }
  .footer-indirizzi-col .footer-icon-link:last-child {
    margin-bottom: 0;   /* elimina l’aria sotto l’ultimo indirizzo */
  }
  /* alza fisicamente il footer-bottom */
  .footer-bottom {
    margin-top: -5rem; /* spinge il blocco verso l'alto */
    padding-top: 0.2rem; /* minima distanza dalla linea */
  }
}
@media (max-width: 768px) {
  .hero-gallery-bar {
    font-size: calc(1em - 0px); /* leggermente più piccolo */
  }
}

@media (max-width: 768px) {
  .hero-text h1 {
    color: #d4af37; /* oro vivo */
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
  }
  .hero-text::before {
    opacity: 0.6; /* meno scuro sotto il testo */
  }
}

@supports (-webkit-touch-callout: none) and (not (translate: none)) {
  @media (max-width: 768px) {
    .hero-text::before {
      opacity: 0.3; /* meno scuro solo su iOS */
    }
    .hero-text {
      position: relative;
      z-index: 2;
    }
    .hero-text h1 {
      color: #d4af37;
      text-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
    }
  }
}

@media (max-width: 768px) {
  /* Hero Pasticceria/Caffetteria/Rosticceria */
  body:has(.hero img[src*="sfondo-past"]) .hero-text h1,
  body:has(.hero img[src*="sfondo-caff"]) .hero-text h1,
  body:has(.hero img[src*="sfondo-rost"]) .hero-text h1 {
    font-size: 3.5rem !important;      /* molto più grande */
    font-family: 'Lora';
    line-height: 1.15;
    letter-spacing: 0.5px;
  }
  body:has(.hero img[src*="sfondo-past"]) .hero-text p,
  body:has(.hero img[src*="sfondo-caff"]) .hero-text p,
  body:has(.hero img[src*="sfondo-rost"]) .hero-text p {
    font-size: 1.6rem !important;   /* sottotitolo più grande ma equilibrato */
    font-family: 'Lora';
    line-height: 1.4;
  }
}
@media (max-width: 768px) {
  .hero-text h1 {
    text-shadow:
      4px 3px 6px rgba(0, 0, 0, 0.95), /* ombra più grande e intensa */
  }
}
