/* FONT & BASE */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;600;800&display=swap");

body {
  margin: 0;
  padding: 0;
  font-weight: bold;
  font-family: "Inter", Arial, sans-serif;
}

html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

.navbar {
  display: flex;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.18), 0 1.5px 4px rgba(0, 0, 0, 0.15);
  z-index: 10;
  height: 100px;
}

.nav-links {
  background: linear-gradient(90deg, #e7e4e4, #d9d4d4);
}

.logo-container {
  display: flex;
  /* background-color: #ff5757; */
  width: 18%;
  height: 100px;
  justify-content: center;
  align-items: center;
  color: white;
}

.logo-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.nav-links {
  flex: 1;
  display: flex;
  align-items: center;
}

.nav-list {
  display: flex;
  justify-content: space-evenly;
  align-items: center;
  width: 100%;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 20px;
}

@media (max-width: 930px) {
  .nav-list {
    font-size: 15px;
  }
}

.nav-list li {
  margin: 0 20px;
}

.nav-list a {
  text-decoration: none;
  color: #ff5757;
  font-weight: bold;
  transition: color 0.2s;
}

.nav-list a:hover {
  color: #fb1e1e;
}

.nav-list .dropdown {
  position: relative;
}

.dropdown-toggle {
  position: relative;
  background: linear-gradient(#ffffff, #ffffff) padding-box,
    linear-gradient(120deg, #ff5757, #ff9090, #ff5757) border-box;
  border: 2px solid transparent;
  font: inherit;
  color: #ff5757;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px 10px 16px;
  border-radius: 40px;
  line-height: 1;
  box-shadow: 0 2px 6px rgba(255, 87, 87, 0.25);
  transition: background 0.35s, box-shadow 0.35s, transform 0.25s;
}

.dropdown-toggle:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(255, 87, 87, 0.25);
}

.dropdown-toggle .icon-artist {
  font-size: 1.05em;
  filter: drop-shadow(0 0 2px rgba(255, 87, 87, 0.35));
  transition: transform 0.4s;
}

.dropdown-toggle .caret {
  width: 12px;
  height: 12px;
  display: inline-block;
  position: relative;
  margin-left: 4px;
}

.dropdown-toggle .caret::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #ff5757 0%, #ffa0a0 60%, #ff5757 100%);
  -webkit-mask: polygon(50% 70%, 0 30%, 100% 30%);
  mask: polygon(50% 70%, 0 30%, 100% 30%);
  transition: transform 0.35s;
}

.dropdown-toggle .pulse {
  position: absolute;
  inset: -6px;
  border-radius: 50px;
  background: radial-gradient(
    circle at 30% 30%,
    rgba(255, 87, 87, 0.35),
    transparent 70%
  );
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s;
}

.dropdown-menu {
  list-style: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  background: #ffffff;
  margin: 0;
  padding: 6px 0 10px 0;
  min-width: 240px;
  border-radius: 14px;
  border: 2px solid #ffb4b4;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12), 0 2px 4px rgba(0, 0, 0, 0.08);
  display: none;
  z-index: 300;
  overflow: hidden;
  animation: dropFade 0.3s ease;
}

.dropdown-menu li a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px 10px 18px;
  font-size: 0.95em;
  font-weight: bold;
  color: #ff5757;
  text-decoration: none;
  position: relative;
  transition: background 0.25s, color 0.25s;
}

.dropdown-menu li a::after {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 6px;
  height: 3px;
  background: linear-gradient(90deg, #ff5757, #ff9f9f, #ff5757);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s;
  opacity: 0.55;
}

.dropdown-menu li a:hover {
  background: #fff5f5;
  color: #fb1e1e;
}

.dropdown-menu li a:hover::after {
  transform: scaleX(1);
}

.nav-list .dropdown.open > .dropdown-toggle {
  background: linear-gradient(#fff9f9, #ffffff) padding-box,
    linear-gradient(120deg, #ff5757, #ff8b8b, #ff5757) border-box;
  box-shadow: 0 4px 14px -2px rgba(255, 87, 87, 0.55),
    0 0 0 4px rgba(255, 87, 87, 0.18);
}

.nav-list .dropdown.open > .dropdown-toggle .icon-artist {
  transform: rotate(-10deg);
}

.nav-list .dropdown.open > .dropdown-toggle .caret::before {
  transform: rotate(180deg) scale(1.05);
}

.nav-list .dropdown.open > .dropdown-toggle .pulse {
  animation: artistPulse 1.9s ease-out infinite;
  opacity: 1;
}

.nav-list .dropdown.open > .dropdown-menu {
  display: block;
}

@keyframes artistPulse {
  0% {
    transform: scale(0.85);
    opacity: 0.55;
  }
  55% {
    transform: scale(1.15);
    opacity: 0;
  }
  100% {
    transform: scale(0.85);
    opacity: 0;
  }
}
@keyframes dropFade {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Mobile adattamento */
@media (max-width: 580px) {
  .dropdown-toggle {
    width: 100%;
    justify-content: center;
    border-radius: 16px;
    padding: 14px 18px;
  }
  .dropdown-menu {
    position: static;
    border: none;
    box-shadow: none;
    margin-top: 6px;
    background: transparent;
    padding: 4px 0 0 0;
    min-width: 0;
    border-radius: 0;
  }
  .dropdown-menu li a {
    border-radius: 10px;
    margin: 4px 0;
    background: #ffffff;
  }
  .dropdown-menu li a::after {
    display: none;
  }
  .nav-list .dropdown.open > .dropdown-toggle {
    box-shadow: 0 0 0 3px rgba(255, 87, 87, 0.25);
  }
}

.hero-search-wrapper {
  position: relative;
  width: 100%;
  min-height: 420px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 40px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("res/imgArtista2.jpg") center center/cover no-repeat;
  z-index: 1;
  filter: blur(2px) brightness(0.7);
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 87, 87, 0.85);
  z-index: 2;
  backdrop-filter: blur(2px);
}

.hero-content {
  position: relative;
  z-index: 3;
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  text-align: left;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
  padding: 48px 24px 36px 24px;
}

.hero-content h1 {
  font-size: 2.2em;
  font-weight: bold;
  margin: 0;
  line-height: 1.1;
}

.hero-desc {
  font-size: 1.1em;
  margin-bottom: 10px;
  color: #fff;
  font-weight: 400;
}

.search-zona-form {
  display: flex;
  width: 100%;
  max-width: 560px;
  min-height: 64px;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.07);
  margin-bottom: 10px;
}

.search-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  color: #ff5757;
  background: linear-gradient(135deg, #fff8f8, #ffe6e6);
  border-right: 1px solid #ffd0d0;
  transition: background 0.25s, color 0.25s;
}

.search-icon svg {
  width: 28px;
  height: 28px;
  display: block;
}

.search-zona-form:focus-within .search-icon {
  background: #ff5757;
  color: #ffffff;
}

.search-zona-form input[type="text"] {
  flex: 1;
  padding: 20px 18px;
  border: none;
  font-size: 1.15rem;
  outline: none;
  background: #f5f5f5;
  color: #222;
  transition: background 0.25s;
}

.search-zona-form input[type="text"]:focus {
  background: #fff;
}

.search-zona-form button {
  background: #fb1e1e;
  color: #fff;
  /* border: none; */
  /* padding: 0 24px; */
  font-size: 1.15rem;
  cursor: pointer;
  transition: background 0.2s;
}

.search-zona-form button:hover {
  background: #444;
}

.btn-artist-signup {
  display: inline-block;
  margin-top: 10px;
  background: #2563eb;
  color: #fff;
  font-weight: bold;
  padding: 12px 28px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 1.1em;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.07);
  transition: background 0.2s;
}
.btn-artist-signup:hover {
  background: #1746a0;
}
.autocomplete-list.active {
  display: block;
}
.autocomplete-list div {
  padding: 8px;
  cursor: pointer;
}
.autocomplete-list div:hover {
  background: #f0f0f0;
}

.container-description {
  display: flex;
  text-align: left;
  width: 40vw;
  height: 90%;
  background-color: #ff5757;
  color: white;
  /* margin-top: 20px; */
  /* margin-left: 20px; */
  padding: 30px;
  font-size: 2em;
  border: 1px solid black;
}

.descrizione {
  line-height: 1.2;
  margin: 0;
  /* text-shadow: 2px 4px 8px rgba(0, 0, 0, 0.55); */
}

.section-home {
  display: flex;
}

.container-imgArtista {
  width: 60vw;
  display: flex;
  justify-content: center;
  align-items: center;
  /* margin-top: 20px; */
}

.container-imgArtista img {
  width: 80%;
  height: 80%;
  /* border-radius: 10px; */
  object-fit: cover;
}

.container-imgArtista img {
  transition: opacity 0.5s;
  opacity: 1;
}
.container-imgArtista img.fade-out {
  opacity: 0;
}
.container-imgArtista img.fade-in {
  opacity: 1;
}

.container-imgArtista img.img-bottom {
  object-position: bottom !important;
}

.container-info {
  display: flex;
  justify-content: center;
  margin-top: 50px;
  background-color: #ff5757;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.18), 0 1.5px 4px rgba(0, 0, 0, 0.15);
}

.container-info ul {
  display: flex;
  list-style: none;
  flex-direction: row;
  justify-content: space-between;
  width: 100%; /* aggiungi questa riga */
  gap: 20px; /* aggiungi questa riga */
  margin: 15px;
  text-align: center;
}

.container-info ul li {
  color: white;
}

/* Aggiungi al tuo index.css */
.footer {
  background: #1e293b;
  color: #fb1e1e;
  padding: 20px 0;
  text-align: center;
  margin-top: 40px;
}
.footer-links a {
  color: #fb1e1e;
  margin: 0 10px;
  text-decoration: none;
  font-size: 0.95em;
}
.footer-links span {
  color: #888;
}
.footer-links a:hover {
  text-decoration: underline;
}
.footer-copy {
  margin-top: 8px;
  font-size: 0.9em;
  color: #aaa;
}

.hamburger {
  display: none; /* Nascondi il pulsante hamburger per default */
}

@media (min-width: 1024px) {
  .container-description {
    display: flex;
    text-align: left;
    width: 40vw;
    height: 90%;
    background-color: white;
    color: #ff5757;
    /* margin-top: 20px; */
    margin-left: 20px;
    padding: 30px;
    font-size: 2em;

    /* border: 1px solid black; */
    clip-path: polygon(0 0, 100% 0, 93% 100%, 0 100%);
    border: none;
  }

  .descrizione {
    line-height: 1.2;
    margin: 0;
    color: #ff5757;
    font-weight: bold;
    text-shadow: 2px 2px 0 #fff3f3, 4px 4px 8px #bdbdbd;
    /* text-shadow: 2px 4px 8px rgba(0, 0, 0, 0.55); */
  }

  .section-home {
    display: flex;
    margin-top: 20px;
    border: 1px solid #ff5757;
  }

  .container-imgArtista {
    position: relative;
    width: 60vw;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    /* border-radius: 10px; */
  }

  .imgArtista-bg,
  .imgArtista-overlay {
    clip-path: polygon(40px 0, 100% 0, 100% 100%, 10px 100%);
  }

  .imgArtista-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("res/backindex.jpg") center center/cover no-repeat;
    filter: blur(2px) brightness(0.7);
    z-index: 1;
  }

  .imgArtista-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 87, 87, 0.85);
    backdrop-filter: blur(2px);
    z-index: 2;
  }

  .container-imgArtista img {
    position: relative;
    z-index: 3;
    width: 80%;
    height: 80%;
    /* border-radius: 10px; */
    object-fit: cover;
  }
}

@media (max-width: 1023px) {
  .section-home {
    flex-direction: column;
    align-items: stretch;
  }

  .container-description {
    width: 100vw;
    margin-bottom: 10px;
    font-size: 1.2em;
    box-sizing: border-box;
    height: auto;
  }

  .container-imgArtista {
    position: relative;
    width: 100vw;
    margin: 0;
    justify-content: center;
    align-items: center;
    padding: 12px 0;
    box-sizing: border-box;
  }

  .container-imgArtista img {
    width: 100vw;
    height: 70vh;
    /* border-radius: 10px; */
    object-fit: cover;
    max-width: 100%;
    display: block;
    position: relative;
    z-index: 1;
  }

  .container-imgArtista::after {
    content: "";
    position: absolute;
    top: 12px;
    left: 0;
    width: 100%;
    height: calc(100% - 24px);
    /* border-radius: 10px; */
    background: linear-gradient(
      to bottom,
      rgba(0, 0, 0, 0.25) 0%,
      rgba(0, 0, 0, 0.35) 100%
    );
    pointer-events: none;
    z-index: 2;
  }
}

@media (max-width: 1023px) and (orientation: landscape) {
  .container-imgArtista img {
    height: 90vh; /* aumenta l'altezza rispetto al portrait */
  }
}

@media (max-width: 680px) {
  .container-description {
    width: 100vw;
    /* margin-top: 20px; */
    /* margin-left: 20px; */
    font-size: 1em;
    padding: 15px;
  }

  .container-imgArtista img {
    width: 100%;
    height: 40vh;
    object-fit: cover;
    object-position: top 50%; /* cambia questo valore per regolare */
  }

  .hero-content {
    padding: 24px 8px 24px 8px;
    max-width: 98vw;
    margin-top: -50px;
  }
  .hero-content h1 {
    font-size: 1.2em;
  }
  .search-zona-form {
    max-width: 100%;
    min-height: 60px;
  }
  .search-zona-form input[type="text"] {
    padding: 18px 14px;
    font-size: 1.05rem;
  }
  .search-zona-form button {
    padding: 0 26px;
    font-size: 1.05rem;
  }
}

@media (max-width: 580px) {
  .nav-links {
    display: none;
  }

  .logo-container {
    width: 50%;
    justify-content: center;
  }

  .nav-links.active {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: absolute;
    top: 60px; /* altezza navbar */
    left: 0;
    width: 100vw;
    background: #fff;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
    z-index: 1000;
    padding: 20px 0 10px 0;
    animation: slideDown 0.25s ease;
  }

  @keyframes slideDown {
    from {
      opacity: 0;
      transform: translateY(-20px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .nav-list {
    width: 100%;
    flex-direction: column;
    align-items: center;
    gap: 0;
    padding: 0;
    margin: 0;
  }

  .nav-list li {
    width: 90%;
    text-align: center;
    border-bottom: 1px solid #eee;
    padding: 1em 0;
    margin: 0;
    transition: background 0.2s;
  }
  .nav-list li:last-child {
    border-bottom: none;
  }
  .nav-list a {
    color: #ff5757;
    font-size: 1.1em;
    display: block;
    width: 100%;
    padding: 0.5em 0;
    border-radius: 6px;
    transition: background 0.2s, color 0.2s;
  }
  .nav-list a:hover {
    background: #ffeaea;
    color: #fb1e1e;
  }

  .search-artisti-zona {
    position: relative;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    margin: 18px 10px 0 10px;
    padding: 12px 10px;
    width: auto;
    box-sizing: border-box;
  }

  .search-artisti-zona label {
    font-size: 1em;
    margin-bottom: 4px;
  }

  .search-artisti-zona input[type="text"] {
    font-size: 1em;
    padding: 8px 10px;
  }

  .search-artisti-zona button {
    width: 100%;
    font-size: 1em;
    padding: 10px 0;
  }

  .autocomplete-list {
    width: 95vw !important;
    max-width: 350px;
    left: 50% !important;
    transform: translateX(-50%);
    top: 95%;
    margin-top: 4px;
    position: absolute;
    z-index: 1000;
    box-sizing: border-box;
  }

  .hamburger {
    display: block;
    background: none;
    border: none;
    color: #ff5757;
    font-size: 2em;
    cursor: pointer;
    margin-left: 65px;
  }

  .container-description {
    width: 100vw;
    /* margin-top: 20px; */
    /* margin-left: 20px; */
    font-size: 14px;
    padding: 15px;
  }

  .container-imgArtista img {
    width: 100%;
    height: 40vh;
    object-fit: cover;
    object-position: center 35%;
  }
  .container-info {
    margin-top: 30px;
  }
  .container-info ul {
    flex-direction: row;
    width: 100%;
    overflow: hidden;
    padding: 0;
    margin: 0;
    position: relative;
    gap: 0;
    justify-content: center;
  }
  .container-info ul li {
    min-width: 100vw;
    flex-shrink: 0;
    display: none;
    transition: opacity 0.3s;
  }
  .container-info ul li.active {
    display: block;
  }
  .carousel-btn {
    display: block;
    color: #fff;
    background-color: #ff5757;
    border: none;
    font-size: 2em;
    padding: 0 10px;
    cursor: pointer;
    align-self: center;
    z-index: 2;
  }

  .container-info h2 {
    font-size: 0.8em;
  }
  .container-info h5 {
    font-size: 0.65em;
  }

  .container-info img {
    width: 60px;
  }

  .footer {
    padding: 10px 0;
    font-size: 0.85em;
    line-height: 1.3;
  }
  .footer-links a {
    font-size: 0.9em;
    margin: 0 5px;
  }
  .footer-copy {
    font-size: 0.8em;
  }
}
@media (min-width: 581px) {
  .carousel-btn {
    display: none !important;
  }
  .container-info ul li {
    display: block !important;
    min-width: unset !important;
  }

  .nav-links {
    display: flex !important;
  }

  @media (min-width: 581px) {
    /* Sposta la autocomplete-list a destra dell'input su desktop/laptop */
    .search-artisti-zona {
      position: relative;
    }
    .autocomplete-list {
      left: auto !important;
      top: 85%;
      margin-top: 4px;
      min-width: 220px;
      max-width: 320px;
      width: 100%;
      transform: none;
      box-sizing: border-box;
    }
  }

  .hamburger {
    display: none;
  }
}

@media (max-width: 425px) {
  .container-info h2 {
    font-size: 0.8em;
  }
  .container-info h5 {
    font-size: 0.57em;
  }
}

@media (max-width: 420px) {
  .search-zona-form {
    max-width: 100%;
  }
  .search-icon {
    padding: 0 10px;
  }
  .search-icon svg {
    width: 24px;
    height: 24px;
  }
  .search-zona-form input[type="text"] {
    padding: 14px 12px;
    font-size: 1rem;
  }
  .search-zona-form button {
    padding: 0 16px;
    font-size: 1rem;
  }
}

/* Extra piccolo: impila gli elementi per evitare overflow */
@media (max-width: 360px) {
  .search-zona-form {
    flex-direction: column;
    align-items: stretch;
    min-height: auto;
  }
  .search-icon {
    width: 100%;
    justify-content: flex-start;
    border-right: none;
    border-bottom: 1px solid #ffd0d0;
    padding: 8px 12px;
  }
  .search-zona-form input[type="text"] {
    width: 100%;
    padding: 12px 12px;
    font-size: 0.95rem;
  }
  .search-zona-form button {
    width: 100%;
    padding: 12px 0;
    font-size: 0.95rem;
  }
  /* Lista suggerimenti allineata al nuovo layout */
  .autocomplete-list {
    width: 100% !important;
    left: 50% !important;
    transform: translateX(-50%);
  }
}

/* Miglioramenti navbar per schermi 4K e molto larghi */
@media (min-width: 1800px) {
  .navbar {
    height: 130px;
    font-size: 1.3em;
  }
  .logo-container {
    height: 130px;
    width: 12%;
  }
  .nav-list {
    font-size: 1.3em;
    gap: 60px;
  }
  .nav-list li {
    margin: 0 30px;
  }
  .hero-content {
    max-width: 900px;
    padding: 64px 32px 48px 32px;
    font-size: 1.5em;
    gap: 24px;
  }
  .hero-content h1 {
    font-size: 2.5em;
  }
  .container-description {
    font-size: 1.7em;
    padding: 40px;
    max-width: 900px;
  }
  .container-imgArtista img {
    width: 80%;
    height: 80%;
  }
  .container-info {
    margin-top: 60px;
    font-size: 1.2em;
    padding: 24px 0;
  }
  .footer {
    padding: 28px 0;
    font-size: 1.1em;
  }
}
