:root {
  --gray-color:#333;
  --primary-color: #d53032;
  --secondary-color: #ffe4c4;
  --white-color: #f5f5f5;
  --Futuri-color: #555;
  --lightgray-color: #777;
}
  
*{
  margin:0;
  padding:0;
  box-sizing:border-box;
}
  
body, textarea, input{
  color:var(--white-color);
  font-family: 'Montserrat', sans-serif;
}
h1, h2, h3, h4, h5, h6{
  font-weight: 400;
}
  
::-webkit-scrollbar{
  width: 0px;
  height: 0px;
}

/* ----------------------------------- NAV BAR ----------------------------------- */

nav {
  width: 100vw;
  height: 9vh;
  display: grid;
  grid-template-columns: auto auto;
  align-items: center;
  padding-left: 2vw;
  padding-right: 2vw;
  
  background: var(--gray-color);
  position: fixed;
  top: 0;
  z-index: 100;
  
  animation: EntrataEffetto 0.7s ease-out forwards;

}

.logo {
  color: var(--white-color);
  font-size: 24px;
  letter-spacing: 1px;
  font-weight: bold;
  display: flex;
  align-items: center;
}
.logo h1{
  font-size: 35px;
  font-weight: 600;
  letter-spacing: 1.3px;
  color: var(--secondary-color);
  cursor: pointer;
}

.Button{
  height: 6vh;
  justify-self: right;
}

.Nav_Button {
  position: relative;
  color: var(--white-color);
  background-color: transparent;
  font-size: 20px;
  letter-spacing: 1px;
  width: 12vw;
  height: 100%;
  font-weight: 550;
  padding: 9px 9px;
  margin-left: 5px;
  margin-right: 5px;
  border: none;
  border-radius: 12px;
  transition: all 0.5s ease;
  cursor: pointer;
}

.Nav_Button::before,
.Nav_Button::after {
  content: "";
  position: absolute;
  left: 50%;
  width: 80%;
  height: 3px;
  background-color: var(--primary-color);
  transform: translateX(-50%) scaleX(0);
  transition: transform 0.3s ease-in-out;
}

.Nav_Button::before {
  top: -6px;
}

.Nav_Button::after {
  bottom: -6px;
}

.Nav_Button:hover::before,
.Nav_Button:hover::after {
  transform: translateX(-50%) scaleX(1);
}

.Active_Button {
  color: var(--primary-color);
  font-weight: bold;
  border-radius: 12px;
  position: relative;
}

.Active_Button::before,
.Active_Button::after {
  content: "";
  position: absolute;
  left: 50%;
  width: 80%;
  height: 3px;
  background-color: var(--primary-color);
  transform: translateX(-50%) scaleX(1);
}


.Mobile_Icon{
  display: none;
}

.SpazioNav{
  width: 100vw;
  height: 9vh;
}

@keyframes EntrataEffetto {
  0% {
    top: -100px;
    opacity: 0;
    box-shadow: none;
  }
  60% {
    top: 30px;
    opacity: 1;
    box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.1);
  }
  80% {
    top: -10px;
    box-shadow: 0px 3px 8px rgba(0, 0, 0, 0.2);
  }
  100% {
    top: 0;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.3); /* Ombra ripristinata */
  }
}

/* ----------------------------------- Chi Siamo ----------------------------------- */

#Eventi{
  width: 100vw;
  height: auto;
  background-color: var(--secondary-color);
}

.Eventi1{
  width: 100vw;
  height: 91vh;
  background: linear-gradient(to right, rgba(213, 48, 50, 0.9), rgba(213, 48, 50, 0.2), rgba(213, 48, 50, 0)), url('/Immagini/Eventi1.webp'); 
  background-size: cover;
  background-position: center;

  display: flex;
  align-items: center;
  padding-left: 5vw;
}

.Title{
  font-size: 70px;
  font-weight: 800;
  color: var(--white-color);
  position: absolute;
}


.Eventi2{
  width: 100vw;
  height: auto;
  padding-bottom: 10vh;
  padding-top: 10vh;
}

.Eventi2 h1{
  text-align: center;
  margin-bottom: 2vh;
  font-weight: 800;
  font-size: 35px;
  width: 90vw;
  margin-left: 5vw;
  color: #333;
}
.Separatore {
  width: 12vw;
  height: 3px;
  background-color: var(--primary-color);
  margin: 0 auto 20px auto;
}
.Avvertimento{
  color: #283141;
  text-align: center;
  margin-bottom: 4vh;
  font-size: 20px;
  width: 90vw;
  margin-left: 5vw;
  font-weight: 500;
}

.Griglia{
  width: 70vw;
  height: auto;
  display: grid;
  grid-template-columns: 43vw 25vw;
  column-gap: 2vw;
  margin-left: 15vw;
}

.Campo{
  display: flex;
  flex-direction: column;
}

.Campo.custom-select {
  position: relative;
  width: 100%;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 1.3px;
}

.Campo.custom-select label {
  margin-bottom: 6px;
  display: block;
  font-weight: 500;
  color: var(--gray-color);
}

.selected {
  height: 8vh;
  padding: 15px;
  display: flex;
  align-items: center;
  border: 3px solid #777;
  border-radius: 10px;
  background-color: var(--white-color);
  color: var(--gray-color);
  cursor: pointer;
  transition: all ease-in-out 0.5s;
  position: relative;
}

/* Freccia personalizzata */
.selected::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 15px;
  width: 16px;
  height: 16px;
  background-image: url("data:image/svg+xml;utf8,<svg fill='%23777' height='20' viewBox='0 0 24 24' width='20' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/></svg>");
  background-repeat: no-repeat;
  background-size: 16px;
  transform: translateY(-50%);
  pointer-events: none;
}

.selected:hover {
  border-color: var(--primary-color);
  background-color: var(--white-color);
}

.selected {
  border-color: var(--primary-color);
  box-shadow: 0 0 8px rgba(74, 144, 226, 0.4);
}

/* MENU DELLE OPZIONI */
.Campo.custom-select .options {
  position: absolute;
  top: 105%;
  left: 0;
  right: 0;
  background-color: var(--white-color);
  border: 3px solid #777;
  border-radius: 10px;
  box-shadow: 0 6px 15px rgba(0,0,0,0.1);
  list-style: none;
  padding: 0;
  margin: 0;
  display: none;
  max-height: 250px;
  overflow-y: auto;
  z-index: 10;
  transition: all ease-in-out 0.4s;
}

/* MOSTRA IL MENU QUANDO ATTIVO */
.Campo.custom-select.active .options {
  display: block;
}

/* OPZIONI */
.Campo.custom-select .options li {
  padding: 15px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 1.3px;
  color: var(--gray-color);
  transition: all ease-in-out 0.3s;
}

/* HOVER SULLE OPZIONI */
.Campo.custom-select .options li:hover {
  background-color: var(--primary-color);
  color: var(--white-color);
  font-weight: 700;
}

/* SCROLLBAR PERSONALIZZATA (OPZIONALE) */
.Campo.custom-select .options::-webkit-scrollbar {
  width: 6px;
}

.Campo.custom-select .options::-webkit-scrollbar-thumb {
  background-color: var(--primary-color);
  border-radius: 3px;
}
.Campo.custom-select .selected.empty {
  color: var(--gray-color);
  border-color: #777;
  background-color: var(--white-color);
}

.Griglia button{
  width: 100%;
  height: 8vh;
  bottom: 0;
  align-self: end;
  padding: 15px;
  background-color: var(--primary-color);
  border: none;
  border-radius: 10px;
  color: var(--white-color);
  font-size: 20px;
  font-weight: 600;
  cursor: pointer;
  border: 4px solid var(--primary-color);
  transition: all 0.5s ease-in-out;
}

.Griglia button:hover{
  background-color: var(--white-color);
  color: var(--primary-color);
  border: 4px solid var(--primary-color);
  outline: none;
}

.Lista{
  width: 70vw;
  height: auto;
  margin-top: 5vh;
  margin-left: 15vw;
  display: grid;
  grid-template-columns: 20vw 20vw 20vw;
  column-gap: 5vw;
  row-gap: 5vh;
}

.Element{
  height: auto;
  border: 8px solid var(--lightgray-color);
  display: grid;
  grid-template-rows: 25vh 8vh;
  justify-items: center;
  row-gap: 3vh;
  padding: 10px;
  border-radius: 20px;
  user-select: none;
  cursor: pointer;
  background-color: transparent;
  transition: all ease-in-out 0.5s;
  background-color: #e6e6e6;
}
.Futuri{
  border-color: var(--Futuri-color);
  background-color: transparent;
}
.Image{
  width: 100%;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.Vuoto{
  background-image: url(/Immagini/Eventi/Vuoto.webp);
}
.SagraPatata{
  background-image: url(/Immagini/Eventi/SagraPatata.webp);
}
.Info{
  width: 100%;
  color: var(--lightgray-color);
  transition: all ease-in-out 0.5s;
}
.Info h4{
  font-size: 23px;
  font-weight: 700;
  text-align: center;
}
.Info h5{
  font-size: 15px;
  text-align: center;
}

.Element:hover{
  border-color: var(--primary-color);
  box-shadow: 0 0 8px rgba(74, 144, 226, 0.4);
  transform: scale(1.02);
}
.Element:hover .Info{
  color: var(--primary-color);
  transform: scale(1.2);
}

/* ----------------------------------- FOOTER ----------------------------------- */

.footer {
  height: 8vh;
  background-color: #333;
  color: white;
  display: grid;
  grid-template-columns: repeat(3 , 1fr);
  align-items: center;
  font-size: 14px;
}

.Diritti{
  display: flex;
  padding-left: 8vw;
  justify-content: left;
}

.social-icons{
  display: flex;
  padding-right: 8vw;
  justify-content: right;
}

.social-icons img {
  width: 40px;
  height: 40px;
  margin-left: 1vw;
}


/* ----------------------------------- RESPONSIVE ----------------------------------- */

/* PC (1024px) */
@media only screen and (min-width: 1025px) {
  
  
  
  #side-menu{
    display: none;
  }
}

/* Tablet (768px e 1024px) */
@media only screen and (min-width: 768px) and (max-width: 1024px){

  nav{
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    justify-items: center;
  }

  .Button{
    display: none;
  }
  .Title{
    font-size: 60px;
  }


  .Griglia{
    width: 85vw;
    grid-template-columns: 50.5vw 32.5vw;
    margin-left: 7.5vw;
  }
  .Lista{
    width: 85vw;
    margin-left: 7.5vw;
    grid-template-columns: 40vw 40vw;
    column-gap: 5vw;
    row-gap: 5vh;
  }

  .Element{
    grid-template-rows: 25vh 6vh;
  }
  .Element:hover .Info{
    color: var(--primary-color);
    transform: scale(1.4);
  }

  .Home2 h1{
    font-size: 40px;
  }
  .Home2 h3{
    font-size: 21px;
  }


  /* ------------------------- */

  .Mobile_Icon {

    right: 5vw;
    width: 40px;
    height: 8vh;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: absolute;
    z-index: 101;
    transition: transform 0.5s ease;
  
  }

  /* Linee dell'icona hamburger */
  .line {
      width: 100%;
      height: 4px;
      background-color: var(--white-color);
      position: absolute;
      transition: all 0.4s ease;
  }

  /* 3 Linee per l'icona */
  .line1 {
      top: 25%;
  }
  
  .line2 {
      top: 53.5%;
      transform: translateY(-50%);
  }
  
  .line3 {
      top: 75%;
  }

  /* Animazione "X" delle 3 linee orizzontali */
  .Mobile_Icon.active .line1 {
      top: 50%;
      transform: rotate(45deg);
      background-color: var(--primary-color);
  }
  
  .Mobile_Icon.active .line2 {
      opacity: 0;
  }
  
  .Mobile_Icon.active .line3 {
      top: 50%;
      transform: rotate(-45deg);
      background-color: var(--primary-color);
  }

  /* Menu a comparsa */

  #side-menu {
    width: 100vw;
    height: 100vh;  
    position: fixed;
    top: 0;
    left: -100vw;
    transition: left 0.5s ease;
    z-index: 99;
    background-color: #555;
  }

  /* Link all'interno del menu laterale */
  .menu-item {
      color: var(--white-color);
      font-size: 30px;
      text-decoration: none;
      padding: 15px 30px;
      display: block;
      transition: background-color 0.3s ease;
  }

  .menu-item:hover {
      background-color: var(--primary-color);
  }
  

}

/* Telefono(768px) */
@media only screen and (max-width: 767px) {
  
  nav{
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    justify-items: left;
  }
  .logo h1{
    font-size: 30px;
  }

  .Button{
    display: none;
  }
  .Title{
    font-size: 60px;
  }


  .Griglia{
    width: 85vw;
    grid-template-columns: 85vw;
    grid-template-rows: repeat(2, 1fr);
    margin-left: 7.5vw;
    row-gap: 0vh;
  }
  .Griglia button{
    align-self: center;
  }
  .Lista{
    width: 85vw;
    margin-left: 7.5vw;
    margin-top: 5vh;
    grid-template-columns: 85vw;
    column-gap: 5vw;
    row-gap: 3vh;
  }

  .Element{
    grid-template-rows: 25vh 8vh;
  }
  .Element:hover .Info{
    color: var(--primary-color);
    transform: scale(1.4);
  }


  .Home2 h1{
    font-size: 32px;
  }
  .Home2 h3{
    font-size: 21px;
  }
  .Campo label{
    font-size: 19px;
  }

  /* ------------------------- */

  .Mobile_Icon {

    right: 5vw;
    width: 40px;
    height: 8vh;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: absolute;
    z-index: 101;
    transition: transform 0.5s ease;
  
  }

  /* Linee dell'icona hamburger */
  .line {
      width: 100%;
      height: 4px;
      background-color: var(--white-color);
      position: absolute;
      transition: all 0.4s ease;
  }

  /* 3 Linee per l'icona */
  .line1 {
      top: 25%;
  }
  
  .line2 {
      top: 53.5%;
      transform: translateY(-50%);
  }
  
  .line3 {
      top: 75%;
  }

  /* Animazione "X" delle 3 linee orizzontali */
  .Mobile_Icon.active .line1 {
      top: 50%;
      transform: rotate(45deg);
      background-color: var(--primary-color);
  }
  
  .Mobile_Icon.active .line2 {
      opacity: 0;
  }
  
  .Mobile_Icon.active .line3 {
      top: 50%;
      transform: rotate(-45deg);
      background-color: var(--primary-color);
  }

  /* Menu a comparsa */

  #side-menu {
    width: 100vw;
    height: 100vh;  
    position: fixed;
    top: 0;
    left: -100vw;
    transition: left 0.5s ease;
    z-index: 99;
    background-color: #555;
  }

  /* Link all'interno del menu laterale */
  .menu-item {
      color: var(--white-color);
      font-size: 30px;
      text-decoration: none;
      padding: 15px 30px;
      display: block;
      transition: background-color 0.3s ease;
  }

  .menu-item:hover {
      background-color: var(--primary-color);
  }

}