/* IMPORTAZIONE FONT */
@import url("https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@500;600;700&family=Montserrat:wght@300;400;500;600;700&display=swap");

/* RESET GENERALE */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: #53665d;
  color: #ffffff;
  font-family: "Montserrat", Arial, sans-serif;
  line-height: 1.6;
}

/* COLORI PRINCIPALI */
:root {
  --verde-scuro: #263c34;
  --verde-medio: #53665d;
  --verde-chiaro: #7d9489;
  --crema: #ede7d8;
  --bianco: #ffffff;
  --oro: #d8b978;
  --ombra: rgba(0, 0, 0, 0.25);
}

/* TESTI */
h1,
h2,
h3 {
  font-family: "Cormorant Garamond", Georgia, serif;
  color: var(--bianco);
  line-height: 1.1;
}

h1 {
  font-size: clamp(3rem, 7vw, 6rem);
  text-shadow: 0 3px 18px rgba(0, 0, 0, 0.45);
}

h2 {
  font-size: clamp(2.3rem, 4vw, 3.6rem);
  margin-bottom: 18px;
}

h3 {
  font-size: 2rem;
  margin-bottom: 10px;
}

p {
  font-size: 1rem;
}

/* HEADER E MENU */
header {
  min-height: 82px;
  background-color: rgba(38, 60, 52, 0.96);
  border-bottom: 1px solid rgba(216, 185, 120, 0.55);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 7%;
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(8px);
}

.logo {
  color: var(--bianco);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.8rem;
  font-weight: 700;
  line-height: 0.9;
  text-decoration: none;
}

.logo span {
  display: block;
  color: var(--oro);
  font-family: "Montserrat", Arial, sans-serif;
  font-size: 0.63rem;
  font-weight: 600;
  letter-spacing: 3px;
  margin-top: 7px;
  text-transform: uppercase;
}

nav ul {
  display: flex;
  align-items: center;
  gap: 22px;
  list-style: none;
}

nav a {
  color: var(--bianco);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.8px;
  text-decoration: none;
  text-transform: uppercase;
  transition: color 0.3s ease;
}

nav a:hover,
nav a.attivo {
  color: var(--oro);
}

/* PULSANTI */
.btn {
  display: inline-block;
  background-color: var(--oro);
  border: 1px solid var(--oro);
  border-radius: 4px;
  color: var(--verde-scuro);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 14px 25px;
  text-decoration: none;
  text-transform: uppercase;
  transition: all 0.3s ease;
}

.btn:hover {
  background-color: transparent;
  color: var(--bianco);
  transform: translateY(-3px);
}

.btn-outline {
  background-color: transparent;
  color: var(--bianco);
  border-color: var(--bianco);
}

.btn-outline:hover {
  background-color: var(--bianco);
  color: var(--verde-scuro);
}

/* HERO HOME */
.hero {
  align-items: center;
  background:
    linear-gradient(rgba(26, 46, 38, 0.66), rgba(26, 46, 38, 0.78)),
    url("gallery/logo.jpg")
    center/cover;
  display: flex;
  justify-content: center;
  min-height: calc(100vh - 82px);
  padding: 70px 7%;
  text-align: center;
}

.hero-content {
  max-width: 900px;
}

.eyebrow {
  color: var(--oro);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 4px;
  margin-bottom: 16px;
  text-transform: uppercase;
}

.hero p {
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  margin: 24px auto 33px;
  max-width: 680px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
}

/* SEZIONI */
.sezione {
  padding: 90px 7%;
}

.sezione-intro {
  margin: 0 auto 45px;
  max-width: 750px;
  text-align: center;
}

.sezione-intro p {
  color: var(--crema);
}

.sfondo-scuro {
  background-color: var(--verde-scuro);
}

.sfondo-chiaro {
  background-color: var(--verde-chiaro);
}

/* CARDS */
.griglia {
  display: grid;
  gap: 25px;
  grid-template-columns: repeat(3, 1fr);
  margin: 0 auto;
  max-width: 1180px;
}

.card {
  background-color: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 10px;
  box-shadow: 0 8px 24px var(--ombra);
  padding: 30px 25px;
  text-align: center;
  transition: transform 0.3s ease, background-color 0.3s ease;
}

.card:hover {
  background-color: rgba(255, 255, 255, 0.14);
  transform: translateY(-7px);
}

.icona {
  color: var(--oro);
  font-size: 2.2rem;
  margin-bottom: 15px;
}

.card p {
  color: var(--crema);
}

/* PAGINE INTERNE */
.hero-pagina {
  align-items: center;
  background:
    linear-gradient(rgba(26, 46, 38, 0.78), rgba(26, 46, 38, 0.82)),
    url("https://images.unsplash.com/photo-1414235077428-338989a2e8c0?auto=format&fit=crop&w=1800&q=85")
    center/cover;
  display: flex;
  justify-content: center;
  min-height: 380px;
  padding: 70px 7%;
  text-align: center;
}

.hero-pagina p {
  color: var(--crema);
  font-size: 1.1rem;
  margin: 16px auto 0;
  max-width: 650px;
}

/* MENU */
.menu-contenitore {
  display: grid;
  gap: 28px;
  grid-template-columns: repeat(2, 1fr);
  margin: 0 auto;
  max-width: 1050px;
}

.menu-categoria {
  background-color: rgba(255, 255, 255, 0.09);
  border-left: 4px solid var(--oro);
  border-radius: 0 8px 8px 0;
  padding: 28px;
}

.menu-categoria h2 {
  color: var(--oro);
  font-size: 2.4rem;
}

.piatti {
  list-style: none;
}

.piatti li {
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  gap: 15px;
  justify-content: space-between;
  padding: 13px 0;
}

.piatti li:last-child {
  border-bottom: none;
}

.nome-piatto {
  font-weight: 600;
}

.prezzo {
  color: var(--oro);
  font-weight: 700;
  white-space: nowrap;
}

/* CHI SIAMO */
.storia {
  align-items: center;
  display: grid;
  gap: 50px;
  grid-template-columns: 1fr 1fr;
  margin: 0 auto;
  max-width: 1150px;
}

.storia img {
  border-radius: 10px;
  box-shadow: 0 12px 30px var(--ombra);
  display: block;
  height: 430px;
  object-fit: cover;
  width: 100%;
}

.storia-testo p {
  color: var(--crema);
  margin-bottom: 18px;
}

/* CONTATTI */
.contatti-griglia {
  display: grid;
  gap: 28px;
  grid-template-columns: repeat(3, 1fr);
  margin: 0 auto 45px;
  max-width: 1150px;
}

.contatto-box {
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 28px 22px;
  text-align: center;
}

.contatto-box i {
  color: var(--oro);
  font-size: 2rem;
  margin-bottom: 13px;
}

.contatto-box h3 {
  font-size: 1.8rem;
}

.contatto-box a {
  color: var(--bianco);
  text-decoration: none;
}

.contatto-box a:hover {
  color: var(--oro);
}

.mappa {
  border: 0;
  border-radius: 10px;
  box-shadow: 0 10px 25px var(--ombra);
  display: block;
  height: 430px;
  margin: 0 auto 28px;
  max-width: 1150px;
  width: 100%;
}

.mappa-link {
  text-align: center;
}

/* ORARI */
.orari {
  margin: 0 auto;
  max-width: 700px;
}

.orario-riga {
  border-bottom: 1px solid rgba(255, 255, 255, 0.24);
  display: flex;
  gap: 25px;
  justify-content: space-between;
  padding: 16px 0;
}

.orario-riga span:first-child {
  font-weight: 700;
}

.chiuso {
  color: var(--oro);
  font-weight: 700;
}

/* GALLERIA MEDIA */
.galleria {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(3, 1fr);
  margin: 0 auto;
  max-width: 1200px;
}

.galleria img {
  border-radius: 9px;
  box-shadow: 0 8px 20px var(--ombra);
  display: block;
  height: 280px;
  object-fit: cover;
  transition: transform 0.35s ease, filter 0.35s ease;
  width: 100%;
}

.galleria img:hover {
  filter: brightness(1.12);
  transform: scale(1.03);
}

/* FOOTER */
footer {
  background-color: #1b2c26;
  padding: 45px 7% 25px;
  text-align: center;
}

footer h3 {
  font-size: 2rem;
}

footer p {
  color: var(--crema);
  margin: 8px auto;
}

.social {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin: 25px 0;
}

.social a {
  align-items: center;
  background-color: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  color: var(--bianco);
  display: flex;
  font-size: 1.2rem;
  height: 45px;
  justify-content: center;
  text-decoration: none;
  transition: all 0.3s ease;
  width: 45px;
}

.social a:hover {
  background-color: var(--oro);
  color: var(--verde-scuro);
  transform: translateY(-4px);
}

.copyright {
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 0.78rem;
  margin-top: 25px;
  padding-top: 20px;
}

/* VERSIONE TELEFONO E TABLET */
@media (max-width: 850px) {
  header {
    flex-direction: column;
    gap: 18px;
    padding: 18px 5%;
  }

  nav ul {
    flex-wrap: wrap;
    gap: 13px 17px;
    justify-content: center;
  }

  nav a {
    font-size: 0.72rem;
  }

  .hero {
    min-height: 600px;
  }

  .griglia,
  .contatti-griglia,
  .galleria {
    grid-template-columns: 1fr 1fr;
  }

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

  .storia img {
    height: 340px;
  }

  .menu-contenitore {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .sezione {
    padding: 65px 6%;
  }

  .griglia,
  .contatti-griglia,
  .galleria {
    grid-template-columns: 1fr;
  }

  .hero-pagina {
    min-height: 300px;
  }

  .orario-riga {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .galleria img {
    height: 250px;
  }
}/* LIGHTBOX */
.lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.92);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
}

.lightbox-immagine {
  max-width: 90%;
  max-height: 90%;
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.lightbox-chiudi {
  position: absolute;
  top: 20px;
  right: 30px;
  color: #ffffff;
  font-size: 3rem;
  font-weight: 300;
  cursor: pointer;
  z-index: 2001;
  transition: color 0.3s ease;
}

.lightbox-chiudi:hover {
  color: var(--oro);
}

/* Cursore puntatore sulle immagini della galleria */
.galleria img {
  cursor: pointer;
}

/* BOX TERRITORIO - DINTORNI DI GUASTALLA */
.box-territorio {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
  margin: 0 auto;
  max-width: 1180px;
}

.box-link {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  text-decoration: none;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.box-link:hover {
  transform: translateY(-7px);
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.4);
}

.box-link img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.box-link:hover img {
  transform: scale(1.08);
}

.box-titolo {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, transparent 100%);
  color: white;
  font-weight: 700;
  font-size: 1.3rem;
  padding: 25px 18px 18px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}

/* Su tablet e telefono: i box vanno in colonna */
@media (max-width: 850px) {
  .box-territorio {
    grid-template-columns: 1fr;
  }
}

/* ===== BOX EVENTO IN BASSO A DESTRA ===== */
#box-evento {
  position: fixed;
  bottom: 25px;
  right: 25px;
  z-index: 9999;
  width: 350px;
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
  animation: entraDx 0.8s ease-out, galleggia 3.5s ease-in-out infinite 0.8s;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

#box-evento:hover {
  transform: translateY(-8px) scale(1.03) !important;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5) !important;
  animation-play-state: paused;
}

#box-evento img {
  width: 100%;
  height: 400px;
  object-fit: cover;
  display: block;
  transition: transform 0.6s ease;
}

#box-evento:hover img {
  transform: scale(1.1);
}

#box-evento .overlay-fico {

  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, transparent 100%);
  padding: 18px;
}

#box-evento .overlay-fico h3 {
  color: white;
  font-size: 18px;
  font-weight: 800;
  margin: 0;
  text-shadow: 0 2px 8px black;
}

#box-evento .badge-top {
  position: absolute;
  top: 12px;
  left: 12px;
  background: #ff2e63;
  color: white;
  font-size: 11px;
  font-weight: 900;
  padding: 6px 12px;
  border-radius: 20px;
  box-shadow: 0 4px 12px rgba(255, 46, 99, 0.6);

  
}

@keyframes entraDx {
  from {
    transform: translateX(450px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

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

/* ===== PRIMO BOX A DESTRA CENTRALE ===== */
#primo-box {
  position: fixed;
  top: 50%;
  left: 20px;
  transform: translateY(-50%);
  z-index: 9998;
  width: 360px;
  overflow: hidden;
  border-radius: 12px;
  background-color: #ffffff;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
  text-decoration: none;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

#primo-box:hover {
  transform: translateY(-50%) scale(1.03);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.45);
}

#primo-box img {
  display: block;
  width: 100%;
  height: 80px;
  object-fit: cover;
}

#primo-box span {
  display: block;
  padding: 14px;
  background-color: var(--verde-scuro);
  color: #ffffff;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.55rem;
  font-weight: 700;
  text-align: center;
}
/* ===== SECONDO BOX A SINISTRA, SOPRA AL PRIMO ===== */
#secondo-box {
  position: fixed;
  top: 22%;
  left: 20px;
  transform: translateY(-50%);
  z-index: 9997;
  width: 360px;
  overflow: hidden;
  border-radius: 12px;
  background-color: #ffffff;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
  text-decoration: none;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

#secondo-box:hover {
  transform: translateY(-50%) scale(1.03);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.45);
}

#secondo-box img {
  display: block;
  width: 100%;
  height: 80px;
  object-fit: cover;
}

#secondo-box span {
  display: block;
  padding: 14px;
  background-color: var(--verde-scuro);
  color: #ffffff;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.55rem;
  font-weight: 700;
  text-align: center;
}

/* ===== TERZO BOX A SINISTRA, SOTTO AL PRIMO ===== */
#terzo-box {
  position: fixed;
  top: 78%;
  left: 20px;
  transform: translateY(-50%);
  z-index: 9996;
  width: 360px;
  overflow: hidden;
  border-radius: 12px;
  background-color: #ffffff;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
  text-decoration: none;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

#terzo-box:hover {
  transform: translateY(-50%) scale(1.03);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.45);
}

#terzo-box img {
  display: block;
  width: 100%;
  height: 80px;
  object-fit: cover;
}

#terzo-box span {
  display: block;
  padding: 14px;
  background-color: var(--verde-scuro);
  color: #ffffff;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.55rem;
  font-weight: 700;
  text-align: center;
}

/* ==================================================
   VISUALIZZAZIONE TABLET E CELLULARE
   Questa regola parte sotto i 900 pixel di larghezza
   ================================================== */
@media (max-width: 900px) {

  /* I quattro box non restano più fissi ai lati */
 #primo-box,
#secondo-box,
#terzo-box,
#box-evento {
  position: static;
  top: auto;
  right: auto;
  bottom: auto;
  left: auto;
  transform: none;
  display: block;
  width: calc(100% - 32px);
  max-width: 430px;
  margin: 18px auto;
  z-index: auto;
  }

  body {
  overflow-x: hidden;
}

footer {
  clear: both;
}

  /* L'effetto al passaggio del mouse non sposta il box */
  #primo-box:hover,
  #secondo-box:hover,
  #terzo-box:hover,
  #box-evento:hover {
    transform: none;
  }

  /* Foto più leggibili e uguali su schermi piccoli */
  #primo-box img,
  #secondo-box img,
  #terzo-box img,
  #box-evento img {
    width: 100%;
    height: 190px;
    object-fit: cover;
  }

  /* Scritta più comoda da leggere e da toccare */
  #primo-box span,
  #secondo-box span,
  #terzo-box span,
  #box-evento span {
    font-size: 1.35rem;
    padding: 14px 12px;
  }

  /* Evita margini laterali troppo larghi nel contenuto */
  main {
    padding-left: 16px;
    padding-right: 16px;
  }
}