/* Colors */
:root {
  --white: #ffffff;
  --black: #000000;
  --yellow: #e5d85c;
  --purple: #46162f;
  --dark-purple: #3f1e2f;
  --light-purple: #663f53; /* Shadow color */
  --red: #cd0000; /* Capodanno red */
  --red-hover: #e60000; /* Capodanno red hover */
  --purple-shadow: 12px 12px 12px 0 var(--black); /* Right-bottom, narrower */
}

/* 1. Tab Menu with Language-style Tabs */
.tab-menu {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: transparent;
  pointer-events: none;
}

.tab-links {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 0;
  margin: 0;
  padding: 0;
  pointer-events: auto;
}

.tab-links li {
  margin: 0;
  padding: 0;
}

.tab-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 50px;
  background: var(--yellow);
  color: var(--purple);
  text-decoration: none;
  border-bottom-left-radius: 20px;
  border-bottom-right-radius: 20px;
  border: 3px double var(--dark-purple);
  border-top: none;
  transition: all 0.3s ease;
  position: relative;
  box-shadow: 0 4px 8px var(--black), 0 2px 4px rgba(0, 0, 0, 0.2);
}

.tab-link:hover {
  height: 55px;
  box-shadow: 0 5px 10px var(--black), 0 3px 6px rgba(0, 0, 0, 0.25);
}

/* Disable hover on touch devices */
@media (hover: none) {
  .tab-link:hover {
    background: var(--yellow);
    color: var(--purple);
    border: 3px double var(--dark-purple);
    border-top: none;
    box-shadow: 0 4px 8px var(--black), 0 2px 4px rgba(0, 0, 0, 0.2);
  }
  
  .tab-link.active:hover {
    background: var(--purple);
    color: var(--yellow);
    border: 1px solid var(--yellow);
    border-top: none;
    box-shadow: 0 6px 12px var(--black), 0 4px 8px rgba(0, 0, 0, 0.3);
  }
}

@media (max-width: 900px) and (hover: none) {
  .tab-link:hover {
    height: 40px !important;
  }
  
  .tab-link.active {
    height: 50px;
  }
  
  .tab-link.active:hover {
    height: 50px !important;
  }
}

.tab-link.active {
  background: var(--purple);
  color: var(--yellow);
  height: 60px;
  border: 1px solid var(--yellow);
  border-top: none;
  box-shadow: 0 6px 12px var(--black), 0 4px 8px rgba(0, 0, 0, 0.3);
}

.tab-link svg {
  width: 24px;
  height: 24px;
}

/* 2. Intro Section */
.intro-section {
  position: relative;
  height: 100vh;
  display: flex;
  align-items: start;
  justify-content: center;
  background: var(--purple);
  background-image: url("images/texture_menu.png");
  overflow: hidden;
}
.intro-bg-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
  pointer-events: none;
  border: none;
}
.intro-bg-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.3); /* Semi-transparent purple overlay */
  z-index: 1;
  pointer-events: none;
}
.intro-content {
  position: relative;
  max-width: 900px;
  z-index: 2;
  text-align: center;
  color: var(--white);
  font-family: inherit;
}
.intro-content,
.intro-content * {
  font-family: "Aleo", serif !important;
  color: var(--white) !important;
  text-shadow: none !important;
}
.intro-logo {
  height: 128px;
  margin: 3rem;
  margin-top: 5rem;
}
.intro-claim {
  font-size: 2.2rem;
  font-weight: 400;
  margin: 0;
}
.intro-claim > b {
  font-weight: 600;
}
.intro-subtitle {
  font-size: 2rem;
  font-weight: 400;
  margin-top: 2.5rem;
}

/* 3. Purple Menu Section */
.menu-section {
  background: var(--purple);
  color: var(--white);
  text-align: center;
  padding: 6rem 1rem;
  padding-bottom: 9rem;
  position: relative;
  background-image: url("images/texture_menu.png");
  background-repeat: no-repeat;
  background-size: cover; /* Copre tutta la sezione senza distorsioni */
  background-position: center; /* Centra la texture */
}
.menu-section h2 {
  margin-top: 0;
  margin-bottom: 1.5rem;
  font-size: 2rem;
  letter-spacing: 0.1em;
}
.download-btn {
  background: var(--yellow);
  color: var(--purple);
  padding: 1rem 2.5rem;
  border-radius: 32px;
  font-size: 1.2rem;
  font-weight: bold;
  text-decoration: none;
  /* Add black shadow with same offset and blur as top menu shadow */
  box-shadow: 12px 12px 12px 0 #000000;
  transition: background 0.2s;
}
.download-btn:hover {
  background: #fffbe6;
  box-shadow: 8px 8px 8px 0 #000000;
}

/* 4 & 5. About Sections */
.about-section {
  display: flex;
  align-items: stretch;
  min-height: 60vh;
  position: relative;
  background: var(--white);
  color: var(--yellow);
}
.about-img {
  flex: 1 1 0;
  min-width: 0;
  min-height: 300px;
  background-size: initial;
  background-position: initial;
  background-repeat: no-repeat;
  background-attachment: fixed;
  position: relative;
  margin: 0; /* Ensure no margin */
  padding: 0; /* Ensure no padding */
  box-sizing: border-box;
}
.menu-links a:hover {
  color: var(--white);
}
.about-img::after {
  content: "";
  display: block;
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.about-img-2 {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  flex: 1;
  background-color: var(--purple);
  overflow: hidden;
}
.about-img-2::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("images/svg/stroke_miro.svg");
  background-size: initial;
  background-position: left center;
  background-attachment: fixed;
  opacity: 0.2; /* Only the image is semi-transparent */
  z-index: 0;
  pointer-events: none;
}
.about-img-2 > * {
  position: relative;
  z-index: 1;
}
.about-pattern {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--white);
  background: url("images/svg/patters_locanda.svg") repeat;
  min-width: 60px;
  position: relative;
}

.about-pattern-2 {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--yellow);
  background: url("images/circle-inverted.png") center center / 50% no-repeat;
  min-width: 60px;
  position: relative;
}
.about-text {
  display: block; /* or grid; */
  text-align: center;
  color: var(--purple);
  border-radius: 50%;
  max-width: 400px;
  min-width: 200px;
  min-height: 400px;
  aspect-ratio: 1/1; /* keeps it a circle */
  margin: 2rem auto;
  padding: 5em 2em; /* use em for scalable padding */
  font-size: 1.2rem;
  line-height: 1.4;
  word-break: break-word;
  box-sizing: border-box;
}
.about-text.stroke {
  border: 1px solid #000;
  background: #fff;
}
.about-text.white {
  color: var(--white);
  max-width: 700px;
  min-height: unset; /* Allow text to define height */
  aspect-ratio: unset; /* Remove fixed aspect ratio */
  font-size: 1.5rem;
}

.about-text h1,
.about-text h2,
.about-text h3,
.about-text h4,
.about-text h5,
.about-text h6,
.about-text a {
  color: var(--purple); /* purple headings and links */
}
.about-section.reverse {
  flex-direction: row-reverse;
}

/* 6. Yellow Grain Section */
.yellow-section {
  background: var(--yellow) url("images/carta.png") center center no-repeat;
  background-size: cover; /* Copre l’area senza distorsioni */
  position: relative;
  text-align: center;
  padding: 4rem 1rem;
  color: var(--purple);
  overflow: visible; /* Permette all’immagine di uscire se serve */
}

.pizza-image {
  width: 100%;
  max-width: 400px;
  color: var(--white);
  height: auto;
  object-fit: cover;
  /* Effetto fluttuante */
  animation: floatPizza 3.5s ease-in-out infinite;
}

@keyframes floatPizza {
  0% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-24px);
  }
  100% {
    transform: translateY(0);
  }
}

.triangles-image {
  top: -40px;
  left: calc(300px - 50vw); /* Centered above pizza */
  width: 100%;
  max-width: 300px;
  height: auto;
  object-fit: cover;
  align-self: flex-end;
  /* Effetto fluttuante */
  animation: floatTriangles 3.5s ease-in-out infinite;
}

@keyframes floatTriangles {
  0% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-12px);
  }
  100% {
    transform: translateY(0);
  }
}

/* 7. Footer */
.footer {
  background: var(--white);
  color: var(--dark-purple);
  padding: 2rem 1rem;
  text-align: center;
}
.footer-content {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-evenly;
  gap: 1rem;
}
.socials a img {
  height: 32px;
  margin: 0 0.5rem;
}

.socials.facebook img:hover {
  content: url("images/svg/facebook-hover.png");
}

.socials.instagram img:hover {
  content: url("images/svg/instagram-hover.png");
}

.whatsapp-icon:hover {
  content: url("images/svg/whatsapp-hover.png");
}

.contacts p {
  margin: 0.2rem 0;
  font-size: 1rem;
}

/* Main Container */
.main-container {
  /*max-width: 1024px;*/
  margin: 0 auto;
  background: #fff; /* Optional: white background for the band */
  box-shadow: 0 4px 32px 0 rgba(0, 0, 0, 0.04); /* Optional: subtle shadow */
  border-radius: 16px; /* Optional: rounded corners */
  overflow: hidden;
}

/* Remove all border-radius from the main container */
.main-container,
.download-btn {
  border-radius: 0 !important;
}

.take-away-info {
  display: flex;
  flex-direction: row;
  align-items: top;
  justify-content: space-evenly;
  gap: 2rem;
  flex-wrap: wrap;
}

.take-away-info div {
  max-width: 20vw;
  flex-grow: 1;
}

.whatsapp-contact {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1rem;
  margin-bottom: 1rem;
  gap: 0.5rem;
}

.whatsapp-icon {
  width: 48px;
  height: 48px;
  margin-right: 0.5rem;
}

.directions-icon {
  width: 48px;
  height: 48px;
  margin-right: 0.5rem;
}

.whatsapp-link {
  text-decoration: none;
  color: var(--purple);
  font-weight: 400;
  font-size: 1.2rem;
  border-radius: 16px;
  padding: 0.5rem 1rem;
  border: 1px solid var(--purple);
  white-space: nowrap; /* Impedisce l'andata a capo */
}

/* Aleo font-face declarations */
/* Using Google Fonts instead of local fonts to ensure proper character support
@font-face {
  font-family: "Aleo";
  src: url("fonts/Aleo-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Aleo";
  src: url("fonts/Aleo-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Aleo";
  src: url("fonts/Aleo/static/Aleo-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
*/

/* Use Aleo for all text */
body {
  font-family: "Aleo", serif;
  margin: 0;
  padding: 0;
}

/* Menu buttons styling */
.menu-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

a.download-btn.menu-capodanno {
  background-color: var(--red);
  background: var(--red);
  color: var(--white);
}

a.download-btn.menu-capodanno:hover {
  background-color: var(--red-hover);
  background: var(--red-hover);
}

/* Responsive tweaks */
@media (max-width: 900px) {
  .about-section,
  .about-section.reverse {
    flex-direction: column;
  }
  .about-img,
  .about-pattern,
  .about-text {
    width: 100%;
    min-width: 0;
    min-height: 160px;
    box-sizing: border-box;
  }
  .about-pattern {
    height: 40px;
    min-height: 40px;
    min-width: 100%;
    background-size: auto 40px;
  }
  .about-text {
    padding: 1.5rem 1rem;
  }
  .about-img {
    flex: 1 1 0;
    min-width: 0;
    min-height: 300px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: scroll !important;
    position: relative;
    margin: 0; /* Ensure no margin */
    padding: 0; /* Ensure no padding */
    box-sizing: border-box;
  }
}

@media (max-width: 900px) {
  .tab-link {
    width: 50px;
    height: 40px;
  }
  
  .tab-link:hover {
    height: 45px;
  }
  
  .tab-link.active {
    height: 50px;
  }
  
  .tab-link svg {
    width: 20px;
    height: 20px;
  }

  /* 2. Intro Section */
  .intro-section {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: start;
    justify-content: center;
    overflow: hidden;
  }
  
  .intro-logo {
     height: 80px;
     margin: 1.5rem;
     margin-top: 4.5rem;
  }
  .about-text {
    max-width: 90vw;
    min-width: 0;
    min-height: 200px;
    padding: 1rem;
    font-size: 1rem;
  }
  .pizza-image {
    width: 100%;
    max-width: 300px;
    color: var(--white);
    height: auto;
    object-fit: cover;
    /* Effetto fluttuante */
    animation: floatPizza 3.5s ease-in-out infinite;
  }
  .about-pattern {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--white);
    background: url("images/svg/patters_locanda.svg") repeat;
    min-width: 90px;
  }
  .about-text {
    display: block; /* or grid; */
    text-align: center;
    color: var(--purple);
    border-radius: 50%;
    max-width: 350px;
    min-width: 200px;
    min-height: 350px;
    aspect-ratio: 1/1; /* keeps it a circle */
    margin: 2rem auto;
    padding: 3.5em 2em; /* use em for scalable padding */
    font-size: 1.1rem;
    line-height: 1.4;
    word-break: break-word;
    box-sizing: border-box;
  }
  .take-away-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-evenly;
    gap: 2rem;
  }

  .take-away-info div {
    max-width: 90vw;
    flex-grow: 1;
  }
  .footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-evenly;
    gap: 1rem;
  }
}
