
html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  max-width: 100%;
}

/* Fonts */
@font-face {
  font-family: 'Outfit';
  src: url('../media/fonts/Outfit-ExtraBold.woff') format('woff');
  font-weight: bolder;
  font-style: normal;
}

@font-face {
  font-family: 'Outfit';
  src: url('../media/fonts/Outfit-Bold.woff') format('woff');
  font-weight: 700;
  font-style: normal;
}

@font-face {
  font-family: 'Nunito';
  src: url('../media/fonts/Nunito-Light.woff2') format('woff2');
  font-weight: 300;
  font-style: normal;
}
@font-face {
  font-family: 'Nunito';
  src: url('../media/fonts/Nunito-medium.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
}
@font-face {
  font-family: 'Nunito';
  src: url('../media/fonts/Nunito-Regular.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
}
@font-face {
  font-family: 'Nunito';
  src: url('../media/fonts/Nunito-SemiBold.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
}
@font-face {
  font-family: 'Nunito';
  src: url('../media/fonts/Nunito-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
}
@font-face {
  font-family: 'Nunito';
  src: url('../media/fonts/Nunito-ExtraBold.woff2') format('woff2');
  font-weight: 800;
  font-style: normal;
}
@font-face {
  font-family: 'Nunito';
  src: url('../media/fonts/Nunito-Black.woff2') format('woff2');
  font-weight: bolder;
  font-style: normal;
}

:root {
  /*Color*/
  --PrimaryColor: #7B1B38 ;   /*#5D4037  #795548 */
  --SecondaryColor: #ECF0F1 ;   /*#E8E8E8  #8BC34A */
  --BackgroundColor: #F8F9FA ;    /*#BDBDBD*/
  --WhiteColor: #FFFFFF ;   /*#E8E8E8*/
  --BlackColor: #000000 ;   /*#212121*/

  /* Base unit */
  --unit: 15px;

  /* Font sizes */
  --textXS: calc(var(--unit) * 0.7);
  --textS: calc(var(--unit) * 1);
  --textM: calc(var(--unit) * 1.4);
  --textML: calc(var(--unit) * 1.5);
  --textL: calc(var(--unit) * 1.9);
  --textXL: calc(var(--unit) * 2.4);
  --textXXL: calc(var(--unit) * 3);

  /* Spacing */
  --spaceXS: calc(var(--unit) * 0.25);
  --spaceS: calc(var(--unit) * 0.5);
  --spaceM: calc(var(--unit) * 1);
  --spaceL: calc(var(--unit) * 1.5);
  --spaceXL: calc(var(--unit) * 2);
}

body {
  background-color: var(--BackgroundColor);
  font-size: var(--textM);
  margin: 0;
  padding: 0;
  position: relative;
  z-index: 0;
  font-family: 'Nunito', sans-serif;
}
main{
  position: relative;
  z-index: 1;
  max-width: 100%;
}

/* Splash */
.splash-container {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 0;
  overflow: hidden;
  width: 100vw;
  height: 100vh;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--PrimaryColor);
  background-image: url("../media/splash-background.webp");
  background-size: 58vw;
  background-position: center;
  background-repeat: no-repeat;
}

.splash {
  width: 80%;
  max-width: 900px;
  text-align: center;
  text-transform: uppercase;
  margin: 0 auto;
}

.splash-title {
  font-size: var(--textXXL);
  margin: 0 auto;
  border: 0.3125em solid var(--WhiteColor);
  padding: 1em 1.3em;
  border-radius: 0.3125em;
  line-height: 1.2em;
  margin-bottom: 1.5em;
  font-family: 'Outfit', sans-serif;
  font-weight: bolder;
}

.splash-subtitle {
  color: white;
  letter-spacing: 0.03125em;
  opacity: 0.9;
  font-size: var(--textL);
}

/* Arrow scroll down */
.scroll-down {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  font-size: var(--textL);
  color: var(--WhiteColor);
  animation: bounce 2s infinite;
  cursor: pointer;
  padding: 0.5em;
}

@keyframes bounce {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, 10px); }
}

/* Content */
.content {
  position: relative;
  z-index: 1;
  width: 100%;
  box-sizing: border-box;
  background: var(--SecondaryColor);
  padding: var(--spaceM);
  border-radius: 0.3em;
  margin-top: 100vh;
  border-top-left-radius: 1em;
  border-top-right-radius: 1em;
  box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.3);
}

.content-title {
  color: var(--BlackColor);
  font-weight: 900;
  font-size: var(--textL);
}

.content-text {
  color: var(--PrimaryColor);
  font-size: var(--textM);
  word-break: break-word;
  font-weight: 400;
}

.content-text-bold {
  font-weight: 800;
  font-size: var(--textML);
}

/* Image */
.content-image-container {
  float: right;
  margin-left: var(--spaceL);
  margin-bottom: var(--spaceL);
  max-width: 40%;
}

.content-image {
  width: 100%; /* Regola la grandezza */
  height: auto;
  border-radius: var(--spaceXS);
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}

/* Maps */
.address-map-container {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 1rem;
  margin-bottom: 1rem;
  flex-wrap: nowrap; /* Forza disposizione su una riga */
}

.address-text {
  flex: 1; /* Occupa tutto lo spazio disponibile a sinistra */
  min-width: 200px; /* Per evitare che diventi troppo stretto */
  color: var(--PrimaryColor);
  font-size: var(--textM);
}

.address-map {
  width: 400px;
  max-width: 40vw; /* Massima larghezza 40% viewport width */
  height: 300px;
  border: 3px solid #ccc;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  flex-shrink: 0; /* Non si restringe */
}

/* Button and form */
.contact-button-container {
  text-align: center;
  margin: var(--spaceXL) 0;
}

.contact-button {
  background-color: var(--PrimaryColor);
  color: var(--WhiteColor);
  border: none;
  padding: var(--spaceM) var(--spaceM);
  border-radius: var(--spaceS);
  cursor: pointer;
  font-size: var(--textL);
  font-weight: 550;
  transition: transform 0.1s ease, background-color 0.3s ease; /*  Cambia per velocità animazione */
  }

.contact-button:hover {
  transform: scale(1.05);
  background-color: var(--BlackColor);
  }

.contact-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10;
  animation: fadeIn 0.4s ease; /* Cambia per velocità animazione */
}

.fade-in .contact-modal-content {
  animation: fadeIn 0.4s ease forwards;
}

.fade-out .contact-modal-content {
  animation: fadeOut 0.4s ease forwards;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes fadeOut {
  from {
    opacity: 1;
    transform: scale(1);
  }
  to {
    opacity: 0;
    transform: scale(0.95);
  }
}

.contact-modal-content {
  background: var(--WhiteColor);
  color: var(--BlackColor);
  padding: var(--spaceL);
  border-radius: var(--spaceS);
  width: 90%;
  max-width: 400px;
  position: relative;
  font-size: var(--textS);
}

.contact-modal-content h2 {
  font-size: var(--textL);
  font-weight: 550;
  margin-top: 0;
  margin-bottom: var(--spaceL);
}

.contact-modal-content label {
  display: block;
  margin-bottom: var(--spaceS);
  font-size: var(--textS);
  font-weight: 550;
}

.contact-modal-content input,
.contact-modal-content textarea {
  width: 100%;
  padding: var(--spaceXS);
  font-size: var(--textXS);
  border: 1px solid #ccc;
  border-radius: var(--spaceXS);
  margin-top: var(--spaceXS);
}

.contact-modal-content button[type="submit"] {
  background-color: var(--PrimaryColor);
  color: var(--WhiteColor);
  border: none;
  padding: var(--spaceS) var(--spaceM);
  border-radius: var(--spaceXS);
  cursor: pointer;
  font-size: var(--textS);
  margin-top: var(--spaceS);
}

.close-button {
  position: absolute;
  top: var(--spaceS);
  right: var(--spaceM);
  font-size: var(--textL);
  color: var(--BlackColor);
  cursor: pointer;
}

.hidden {
  display: none;
}

#form-response {
  margin-top: var(--spaceM);
  padding: var(--spaceS);
  border-radius: var(--spaceXS);
  background-color: rgba(93, 64, 55, 0.1); /* var(--PrimaryColor) with transparency */
  color: var(--PrimaryColor);
  font-weight: 550;
  font-size: var(--textS);
  text-align: center;
  transition: opacity 0.3s ease-in-out;
  border: 1px solid var(--PrimaryColor);
}

#form-response.hidden {
  opacity: 0;
  pointer-events: none;
}

#form-response:not(.hidden) {
  opacity: 1;
}


/* Footer */
.footer {
  width: 100%;
  margin: 0;
  background-color: #000;
  color: var(--WhiteColor);
  text-align: center;
  padding: var(--spaceL) var(--spaceM);
  font-size: var(--textS);
}

.footer-title {
  font-size: var(--textM);
  font-weight: bold;
  margin-bottom: var(--spaceS);
}

.footer-text i {
  margin-right: 8px;
  color: #E8E8E8; /* Puoi anche usare i colori ufficiali di Facebook e Instagram */
}

.footer-text a {
  color: var(--WhiteColor);
  text-decoration: none;
}

.footer-text a:hover {
  text-decoration: underline;
}
