@import url("https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap");

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  min-height: 100vh;
  font-family: "Montserrat", sans-serif;
  background-color: #fefefe;
  overflow-x: hidden;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.2rem 2rem;
  background-color: #f2efe6;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
  margin-bottom: 1rem;
}
button {
  font-family: "Montserrat", sans-serif;
}

#logo {
  height: 100px;
}

nav#headBar {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  font-size: 1.1rem;
}

nav#headBar a {
  text-decoration: none;
  color: #222;
  font-weight: 500;
  transition: color 0.3s ease;
}

nav#headBar a:hover {
  color: #b88c4b; /* colore caldo, simile all'oro/barber shop style */
}

#contact,
#darkToggle,
#commentBtn,
#sendComment {
  padding: 0.5rem 1.2rem;
  background-color: #b88c4b;
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.3s ease;
}

#contact:hover,
#darkToggle:hover,
#commentBtn:hover,
#sendComment:hover {
  background-color: #a37438;
  transform: scale(1.05);
  cursor: pointer;
}

/* Hero section */
main {
  max-width: 1280px;
  margin: 0 auto;
}
#heroSection {
  position: relative; /* per posizionare overlay e testo */
  background-image: url("img/hero.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  height: 500px;
  width: 100%;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 1rem;
  color: white;
  font-weight: 700;
  font-size: 2.5rem;
  gap: 1rem;

  z-index: 1;
  margin-bottom: 2rem;
}
#heroSection h2 {
  margin-bottom: 1rem;
  font-weight: 700;
  font-size: 4rem;
  color: #b88c4b;
}
#heroSection #prenota {
  padding: 1rem;

  background-color: #b88c4b;
  border-radius: 10px;
  color: #fff;
  font-weight: 600;
  z-index: 1000;
  transition: all 0.3s ease-in-out;
  border: 1px solid transparent;
}
#heroSection #prenota:hover {
  background-color: #a37438;
  transform: scale(1.05);
  cursor: pointer;
}
/* Overlay scuro per migliorare leggibilità */

/* Sezione contenitore */
#cut {
  max-width: 1280px;
  margin: 2rem auto 3rem auto;
  padding: 0 1rem;
}

h2 {
  font-family: "Montserrat", sans-serif;
  font-weight: 500;
  font-size: 2rem;
  color: #a37438;
}
h3 {
  color: #b88c4b;
  font-weight: 400;
  margin-bottom: 1.5rem;
}

/* Viewport che mostra 6 div */
#imgViewport {
  width: calc(6 * 200px + 5 * 1rem); /* viewport per 6 div + 5 gap */
  overflow: hidden;
  margin: 0 auto;
  border: 2px solid #a37438;
  border-radius: 8px;
}

#scrollWrapper {
  display: flex;
  gap: 1rem;
  width: calc(12 * 200px + 11 * 1rem); /* 12 div da 200px + 11 gap */
  animation: scrollLeft 30s linear infinite;
  transform: translate3d(0, 0, 0);
}

.cut {
  height: 200px;
  width: 200px;
  border: 1px solid #a37438;
  background-color: #ddd;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: bold;
  user-select: none;
  flex-shrink: 0;

  background-position: center;
  background-size: cover;
}

@keyframes scrollLeft {
  0% {
    transform: translateX(0);
  }
  100% {
    /* scrolla la larghezza di 6 div + 5 gap */
    transform: translateX(calc(-1 * (6 * 200px + 5 * 1rem)));
  }
}

.first {
  background-image: url(img/taglio1.png);
}
.second {
  background-image: url(img/taglio2.png);
}
.third {
  background-image: url(img/taglio3.png);
}
.fourth {
  background-image: url(img/taglio4.png);
}
.fifth {
  background-image: url(img/taglio5.png);
}
.sixth {
  background-image: url(img/taglio6.png);
}

/* Card service */
#service {
  margin-bottom: 2rem;
  padding: 0 1rem;
}
#cardContainer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 3rem 10rem;
}
.card {
  height: 250px;
  width: 300px;
  border: 2px solid #a37438;
  border-radius: 20px;
  box-shadow: 0 6px 24px 0 rgba(163, 116, 56, 0.15);
  position: relative;
}

.card .cardTitle {
  display: flex;
  justify-content: center;
  color: #a37438;
  margin-bottom: 0.5rem;
  padding-top: 0.5rem;
}
.card p {
  color: #b88c4b;
  text-align: center;
}
.card .cardButton {
  position: absolute;
  bottom: 1rem;
  left: 1rem;
  padding: 0.5rem 1.2rem;
  background-color: #b88c4b;
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.3s ease;
}
.cardButton:hover {
  background-color: #a37438;
  transform: scale(1.05);
  cursor: pointer;
}
.card .prezzo {
  display: block;
  text-align: center;
  font-size: 1.2rem;
  color: #a37438;
  font-weight: 700;
  margin: 1rem 0;
}
.card .durataServizio {
  position: absolute;
  bottom: 1.2rem;
  right: 1rem;
  border-bottom: 1px solid #b88c4b;
}
/* Comment section */
#commentSection {
  padding: 0 1rem;
}
#commentContainer {
  display: flex;
  justify-content: space-around;
  gap: 4rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}
.commentBox {
  border: 2px solid #b88c4b;
  border-radius: 20px;
  position: relative;
  width: 350px;
  height: 150px;
}
.commentBox p {
  padding: 0.5rem 1rem 1rem 1rem;
}
.comment {
  position: absolute;
  top: 1rem;
  right: 1rem;
  color: #b48f4d;
}
.utente {
  display: flex;

  align-items: center;
  margin: 1rem 1rem 0 1rem;
}
.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  margin-right: 0.5rem;
}
.stars {
  display: flex;
  position: absolute;
  bottom: 0.5rem;
  right: 1rem;
}
.stars span {
  font-style: italic;
}
.stars i {
  color: yellow;
}

#commentBtnContainer {
  display: flex;
  justify-content: flex-end;
}

#commentoUtente {
  border: 1px solid black;
  width: 300px;
  padding: 1rem;
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translate(-50%, 100%);
  background: #fff;
  z-index: 100;
  opacity: 0;
  display: flex;
  flex-direction: column;
}
#sendComment {
  width: 100px;
  align-self: flex-end;
}
#commentoUtente.slide {
  animation: commentoSlide 0.6s cubic-bezier(0.4, 1.4, 0.6, 1) forwards;
}

@keyframes commentoSlide {
  0% {
    transform: translate(-50%, 100%);
    opacity: 0;
  }
  100% {
    transform: translate(-50%, -50%);
    opacity: 1;
  }
}
#commentoUtente h4 {
  color: #a37438;
}
#commentoUtente input {
  border-radius: 10px;
  padding: 0.3rem;
  color: #b48f4d;
  border: 2px solid #b48f4d;
  font-family: 700;
  font-family: "Montserrat", sans-serif;
}
#commentoUtente textarea {
  resize: none;
  border: 1px solid #a37438;
  width: 100%;
  padding: 0.5rem;
  color: #b48f4d;
  font-family: "Montserrat", sans-serif;
  margin-bottom: 0.5rem;
}
#commentoUtente span {
  position: absolute;
  top: 0.4rem;
  right: 1rem;
  font-weight: 700;
  color: #a37438;
}
#commentoUtente span:hover {
  color: #4a3b1e;
  transition: all 0.3s ease-in-out;
  cursor: pointer;
}
/* Footer */
#siteFooter {
  background-color: #f2efe6;
  padding: 2rem;
  color: #222;
  font-family: "Montserrat", sans-serif;
  margin-top: 3rem;
  border-top: 2px solid #a37438;
}
#siteFooter #information {
  text-align: center;
}
#information h4 {
  font-size: 2rem;
}
#information p {
  font-size: 1rem;
}
.footer-content {
  display: flex;
  flex-direction: column;

  gap: 2rem;
  max-width: 1280px;
  margin: 0 auto;
}

.footer-section h4 {
  color: #a37438;
  margin-bottom: 1rem;
  text-align: center;
}

.footer-section p {
  margin: 0.3rem 0;
  font-size: 0.95rem;
  text-align: center;
}
#moreInfoContainer {
  display: flex;
  justify-content: space-around;
  align-items: center;
}
#moreInfoContainer #logoInfo {
  height: 150px;
}
.footer-bottom {
  text-align: center;
  margin-top: 2rem;
  font-size: 0.85rem;
  color: #888;
}
/* display section */
.active,
#appointmentSection.active {
  display: block;
}
main {
  display: none;
}
footer {
  display: none;
}
#appointmentSection {
  display: none;
}
/* Appointment sect */
#appointmentSection {
  width: 1280px;
  margin: 0 auto 2rem auto;

  position: relative;
}
#appointmentSection #appointmentLogo {
  height: 600px;
  position: absolute;
  right: 0;
  top: 0;
}
#inputContainer {
  display: flex;
  flex-direction: column;
  max-width: 650px;
}
#appointmentSection h4,
#appointmentSection input[type="text"],
#appointmentSection input[type="date"] {
  margin-bottom: 0.5rem;
}
#appointmentSection input[type="text"],
#appointmentSection input[type="date"] {
  border-radius: 10px;
  padding: 0.5rem;
  border: 2px solid #b48f4d;
  color: black;
  font-weight: 600;
  font-family: "Montserrat", sans-serif;
}
#appointmentSection h4 {
  color: #a37438;
}

#radioContainer {
  width: 200px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(2, auto);
  gap: 2rem;

  margin-bottom: 1rem;
}

.radioCard {
  width: 200px;
  border: 2px solid #a37438;
  border-radius: 20px;
  padding: 0.5rem 1rem 0.3rem 1rem;
  transition: all 0.3s ease-in-out;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.radioCard:hover {
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transform: translateY(-3px);
}
.radioCard input {
  display: none;
}
.radioCard:has(input:checked) {
  background-color: #ffe6b8;
  border-color: #d18c33;
  box-shadow: 0 0 0 2px rgba(223, 157, 67, 0.3);
  transform: scale(1.02);
}
.radioCard h5 {
  color: #a37438;
}
.radioCard p {
  font-size: 0.8rem;
  color: black;
  font-weight: 500;
}
.radioCard .radioPrezzo {
  font-weight: 700;
  align-self: flex-end;
  color: #a37438;
}
#sendAppointment {
  padding: 0.5rem 1.2rem;
  background-color: #b88c4b;
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.3s ease;
  align-self: flex-end;
}
#sendAppointment:hover {
  background-color: #a37438;
  transform: scale(1.05);
  cursor: pointer;
}
/* DARK MODE */

body.dark-mode {
  background-color: #181818;
  color: #e0e0e0;
}

/* Header */
body.dark-mode header {
  background-color: #202020;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
}

body.dark-mode nav#headBar a {
  color: #ddd;
}

body.dark-mode nav#headBar a:hover {
  color: #d4ab68;
}

/* Bottoni */
body.dark-mode #contact,
body.dark-mode #darkToggle {
  background-color: #d4ab68;
  color: #1e1e1e;
}

body.dark-mode #contact:hover,
body.dark-mode #darkToggle:hover {
  background-color: #b48f4d;
}

/* Hero section */
body.dark-mode #heroSection {
  color: #fff;
}

body.dark-mode #heroSection h2 {
  color: #d4ab68;
}

body.dark-mode #heroSection #prenota {
  background-color: #d4ab68;
  color: #1e1e1e;
}

body.dark-mode #heroSection #prenota:hover {
  background-color: #b48f4d;
}

/* Viewport */
body.dark-mode #imgViewport {
  border-color: #a77f3d;
}

body.dark-mode .cut {
  border-color: #a77f3d;
  background-color: #2a2a2a;
  color: #f0f0f0;
}

/* Card */
body.dark-mode .card {
  border-color: #a77f3d;
  background-color: #222;
  box-shadow: 0 4px 16px rgba(167, 127, 61, 0.08);
}

body.dark-mode .card .cardTitle {
  color: #d4ab68;
}

body.dark-mode .card p,
body.dark-mode .card .prezzo {
  color: #c59c59;
}

body.dark-mode .card .cardButton {
  background-color: #c59c59;
  color: #1e1e1e;
}

body.dark-mode .cardButton:hover {
  background-color: #a67e42;
}

body.dark-mode .card .durataServizio {
  border-bottom-color: #c59c59;
}
body.dark-mode #commentBtn {
  background-color: #c59c59;
  color: #1e1e1e;
}
body.dark-mode #commentBtn:hover {
  background-color: #a67e42;
}

/* Footer */
body.dark-mode #siteFooter {
  background-color: #202020;
  color: #dcdcdc;
  border-top: 2px solid #a77f3d;
}

body.dark-mode .footer-section h4 {
  color: #d4ab68;
}

.dark-mode #appointmentSection {
  background-color: #1e1e1e;
  color: #f1f1f1;
}

.dark-mode #appointmentSection h4 {
  color: #f5c17b;
}

/* Appointment Section */
.dark-mode #appointmentSection input[type="text"],
.dark-mode #appointmentSection input[type="date"] {
  background-color: #2b2b2b;
  color: #fff;
  border: 2px solid #d6a861;
}

.dark-mode #radioContainer {
  color: white;
}

.dark-mode .radioCard {
  background-color: #2e2e2e;
  border-color: #d6a861;
}

.dark-mode .radioCard:hover {
  box-shadow: 0 4px 15px rgba(255, 206, 122, 0.1);
}

.dark-mode .radioCard h5 {
  color: #f5c17b;
}

.dark-mode .radioCard p {
  color: #e0e0e0;
}

.dark-mode .radioCard .radioPrezzo {
  color: #f5c17b;
}

.dark-mode .radioCard:has(input:checked) {
  background-color: #4a3b1e;
  border-color: #ffc970;
  box-shadow: 0 0 0 2px rgba(255, 201, 112, 0.3);
}

.dark-mode #sendAppointment {
  background-color: #d6a861;
  color: #1e1e1e;
}

.dark-mode #sendAppointment:hover {
  background-color: #f5c17b;
}

.dark-mode #commentoUtente {
  background-color: #1e1e1e;

  color: #f1f1f1;
}

.dark-mode #commentoUtente h4 {
  color: #f5c17b;
}

.dark-mode #commentoUtente input[type="text"],
.dark-mode #commentoUtente textarea {
  background-color: #2c2c2c;
  color: #fff;
  border: 2px solid #d6a861;

  font-family: "Montserrat", sans-serif;
}

.dark-mode #commentoUtente input[type="color"] {
  background-color: #2c2c2c;
  border: 1px solid #d6a861;

  cursor: pointer;
}

.dark-mode #commentoUtente button#sendComment {
  background-color: #d6a861;
  color: #1e1e1e;
  border: none;

  transition: all 0.3s ease;

  cursor: pointer;
}

.dark-mode #commentoUtente button#sendComment:hover {
  background-color: #f5c17b;
}

/* --- Responsive mobile (max 600px) --- */

/* HEADER: nascondo/* --- Responsive mobile (max 600px) --- */
@media (max-width: 600px) {
  /* Nascondi tutte le sezioni di default */
  main,
  footer,
  #appointmentSection {
    display: none;
  }

  /* HEADER */
  nav#headBar a:nth-child(-n + 3) {
    display: none;
  }

  nav#headBar {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1rem;
  }

  header {
    justify-content: space-between;
    padding: 1rem;
  }

  #logo {
    height: 100px;
  }

  #contact,
  #darkToggle {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
    display: inline-block;
  }

  /* HERO */
  #heroSection {
    height: 400px;
    padding: 1rem;
    font-size: 1.5rem;
  }

  #heroSection h2 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
  }

  #heroSection #prenota {
    padding: 0.8rem 1.5rem;
    font-size: 1.2rem;
  }

  /* “I NOSTRI TAGLI” - carosello 1 immagine visibile */
  #imgViewport {
    width: 100%;
    max-width: 432px; /* 200 + 200 + 16px gap */
    margin: 0 auto;
    overflow: hidden;
    border-width: 1px;
  }

  #scrollWrapper {
    display: flex;
    gap: 1rem;
    width: max-content;
    animation: scrollLeftMobile 20s linear infinite;
  }

  @keyframes scrollLeftMobile {
    0% {
      transform: translateX(0);
    }
    100% {
      transform: translateX(calc(-1 * (2 * 200px + 1rem)));
      /* Scorri esattamente 2 immagini e 1 gap */
    }
  }

  .cut {
    height: 150px;
    width: 200px;
    font-size: 1.5rem;
    flex-shrink: 0;
  }

  /* SERVIZI */
  #cardContainer {
    gap: 2rem 1rem;
    justify-content: center;
  }

  .card {
    width: 90%;
    max-width: 300px;
    height: auto;
    padding: 1rem;
    position: relative;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
  }

  .card .cardTitle {
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
  }

  .card p {
    font-size: 0.95rem;
  }

  .card .cardButton {
    margin: 1rem auto 0 auto;
  }

  .card .durataServizio {
    margin-top: 0.5rem;
    text-align: center;
    border-bottom: none;
  }

  .card .prezzo {
    top: 0;
    left: 1rem;
    padding-bottom: 1.5rem;
  }

  /* COMMENTI */
  #commentContainer {
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
  }

  .commentBox {
    width: 90%;
    max-width: 350px;
    height: auto;
    position: relative;
  }

  .commentBox > p {
    padding-bottom: 2rem;
    font-size: 0.9rem;
  }

  #commentoUtente {
    width: 100%;
    max-width: none;
    position: fixed;
    left: 50%;
    bottom: -100%;
    transform: translateX(-50%);
    border-radius: 0;
    padding: 1rem;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.15);
    opacity: 0;
    animation: none;
    transition: all 0.4s ease-in-out;
    z-index: 9999;
  }

  #commentoUtente.slide {
    bottom: 0;
    opacity: 1;
  }

  #sendComment {
    width: 100%;
    font-size: 1rem;
  }

  /* FOOTER */
  #siteFooter {
    padding: 1rem;
  }

  #information h4 {
    font-size: 1.5rem;
  }

  #information p {
    font-size: 0.9rem;
  }

  #moreInfoContainer {
    flex-direction: column;
    gap: 1.5rem;
  }

  #moreInfoContainer #logoInfo {
    height: 100px;
  }

  /* SEZIONE APPUNTAMENTI */
  #appointmentSection {
    width: 90%;
    max-width: 650px;
    margin: 1rem auto 2rem auto;
    padding: 1rem;
  }

  #appointmentSection #appointmentLogo {
    height: 300px;
    position: relative;
    right: auto;
    top: auto;
    margin: 1rem auto 0 auto;
    display: block;
  }

  #inputContainer {
    max-width: 100%;
    width: 100%;
  }

  #radioContainer {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: stretch;
  }

  .radioCard {
    width: 100%;
    padding: 1rem;
  }

  /* BLOCCA SCROLL ORIZZONTALE */
  html,
  body {
    overflow-x: hidden;
    width: 100%;
  }
}
/* --------- FINE MEDIA‑QUERY --------- */
