body {
  overflow-x: hidden;
  width: 100%;
  background-color: #ffffff;
}

/* Footer specifico per main.html */
body:has(.hero-cta-container) .modern-footer {
  background: rgb(17, 17, 17) !important;
  color: #ffffff !important;
}

body:has(.hero-cta-container) .modern-footer::before {
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.1),
    transparent
  ) !important;
}

body:has(.hero-cta-container) .footer-section h4 {
  color: #ffffff !important;
}

body:has(.hero-cta-container) .footer-section h4::after {
  background: #e60000 !important;
}

body:has(.hero-cta-container) .footer-brand h3 {
  color: #ffffff !important;
}

body:has(.hero-cta-container) .footer-brand p {
  color: #cccccc !important;
}

body:has(.hero-cta-container) .footer-section ul li a {
  color: #cccccc !important;
}

body:has(.hero-cta-container) .footer-section ul li a:hover {
  color: #ffffff !important;
}

body:has(.hero-cta-container) .footer-copyright p {
  color: #999999 !important;
}

body:has(.hero-cta-container) .footer-legal a {
  color: #cccccc !important;
}

body:has(.hero-cta-container) .footer-legal a:hover {
  color: #e60000 !important;
}

/* Logo bianco per il footer di main.html */
body:has(.hero-cta-container) .footer-logo {
  content: url("../images/LL AGORA bianco nosfondo.png") !important;
}
.page-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  width: 100%;
  justify-content: flex-start; /* Forza gli elementi a partire dall'inizio */
  align-items: flex-start; /* Forza gli elementi a partire dall'inizio */
}

.index-h1 {
  font-size: 60px;
  text-align: center;
  margin: 30px auto 0 auto;
  padding: 0;
  text-shadow:
    -1px -1px 0 rgb(0, 0, 0),
    1px -1px 0 rgb(0, 0, 0),
    -1px 1px 0 rgb(0, 0, 0),
    1px 1px 0 rgb(0, 0, 0);

  .letter-p {
    color: rgb(0, 199, 10);
    margin-right: 2px;
  }

  .letter-m {
    color: white;
    margin-right: 2px;
  }

  .word-italia {
    color: rgb(255, 0, 0);
    margin-right: 2px;
  }

  .dot-it {
    color: rgb(0, 145, 255);
  }
}
h2 {
  color: #000000;
  font-size: 20px;
  font-weight: 350;
  text-align: center;
  margin-top: 0;
  margin-bottom: 50px;
  padding: 0;
}
.search-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: left;
  margin: 0px auto 20px auto;
  width: 300px;
  max-width: 400px;
  height: 25px;
  padding: 4px 8px;
  font-size: 14px;
  border: 1px solid #ccc;
  border-radius: 25px;
  box-sizing: border-box;
}
.search-bar::placeholder {
  text-align: center;
  display: block;
}
.search-bar:focus {
  outline: none;
  border-color: #ccc;
}
.linea-ai {
  margin: 10px auto 0px auto;
  width: 400px;
  height: 1px;
  border: none;
  background-color: #000000;
}

/* === Sezione Suggerimenti === */
/* Sezione Alternata per Utenti e Professionisti */
.alternating-cta-section {
  width: 100%;
  padding: 40px 20px;
  background: #ffffff;
  border-radius: 40px 40px 0px 0px;
  margin: -60px 0 0 0;
  position: relative;
  overflow: hidden;
  z-index: 1001;
}

.alternating-cta-buttons {
  display: flex;
  justify-content: center;
  gap: 0px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.alternating-btn {
  padding: 12px 24px;
  border: 2px solid #e0e0e0;
  background: #ffffff;
  color: #6c757d;
  border-radius: 25px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: "Roboto", sans-serif;
}

.alternating-btn.uno {
  border-radius: 25px 0px 0px 25px;
}

.alternating-btn.due {
  border-radius: 0px 25px 25px 0px;
}

.alternating-btn:hover {
  border-color: #e60000;
  color: #e60000;
  transform: translateY(-2px);
}

.alternating-btn.active {
  background: linear-gradient(135deg, #e60000, #cc0000);
  color: #ffffff;
  border-color: #e60000;
  box-shadow: 0 4px 15px rgba(230, 0, 0, 0.3);
}

.alternating-cta-content {
  position: relative;
  min-height: 400px;
  max-width: 1200px;
  margin: 0 auto;
}

.alternating-section {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  opacity: 0;
  visibility: hidden;
  transform: translateX(30px);
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.alternating-section.active {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
  position: relative;
}

.alternating-section-wrapper {
  display: flex;
  align-items: center;
  gap: 40px;
  width: 100%;
}

.alternating-section-content {
  flex: 1;
  text-align: left;
  padding: 20px;
  max-width: 50%;
}

.alternating-section-image {
  flex: 1;
  max-width: 50%;
  width: 50%;
  height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 20px;
}

.alternating-section-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 20px;
}

.alternating-icon {
  width: 70px;
  height: 70px;
  margin: 0 0 25px 0;
  background: linear-gradient(135deg, #e60000, #cc0000);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: #ffffff;
  box-shadow: 0 8px 20px rgba(230, 0, 0, 0.25);
}

.alternating-section-content .alternating-icon {
  margin: 0 0 25px 0;
}

.alternating-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: #2c3e50;
  margin-bottom: 15px;
  line-height: 1.3;
}

.alternating-description {
  font-size: 1.05rem;
  color: #6c757d;
  line-height: 1.7;
  margin-bottom: 30px;
}

.alternating-cta-actions {
  display: flex;
  gap: 15px;
  justify-content: flex-start;
  flex-wrap: wrap;
}

.alternating-cta-btn {
  padding: 14px 28px;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: all 0.3s ease;
  font-family: "Roboto", sans-serif;
  border: none;
  cursor: pointer;
}

.alternating-cta-btn.primary {
  background: #ffffff;
  color: #e60000;
  border: 2px solid #e60000;
  box-shadow: 0 4px 15px rgba(230, 0, 0, 0.1);
}

.alternating-cta-btn.primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(230, 0, 0, 0.2);
  background: #f8f8f8;
  border-color: #cc0000;
  color: #cc0000;
}

.alternating-cta-btn.secondary {
  background: linear-gradient(135deg, #e60000, #cc0000);
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(230, 0, 0, 0.3);
}

.alternating-cta-btn.secondary:hover {
  background: linear-gradient(135deg, #cc0000, #b30000);
  color: #ffffff;
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(230, 0, 0, 0.4);
}

.alternating-cta-btn i {
  font-size: 1rem;
}

.suggestions-section {
  width: 100%;
  padding: 0px 0 60px 0;
  background: #ffffff;
  border-radius: 0px;
  margin: 0;
  border-radius: 40px 40px 0px 0px;
  position: relative;
  overflow: hidden;
  z-index: 1000;
  /*
  box-shadow: 0px -10px 20px rgba(0, 0, 0, 0.3);
  */
}

/* Quando la sezione suggerimenti è visibile, aggiungi margine superiore */
.alternating-cta-section + .suggestions-section {
  margin-top: 0;
  border-radius: 0;
}

@keyframes gradientShift {
  0%,
  100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

.suggestions-header {
  text-align: center;
  margin-bottom: 20px;
  padding: 0 20px;
}

.suggestions-title {
  font-size: 1.7rem;
  font-weight: 700;
  color: #2c3e50;
  margin-bottom: 15px;
  padding: 0 0 0 40px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  text-align: left;
  gap: 15px;
}

.suggestions-title i {
  color: #e60000;
  font-size: 2.2rem;
}

.suggestions-subtitle {
  font-size: 1.1rem;
  color: #6c757d;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

.suggestions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 25px;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
}

.suggestion-card {
  background: #ffffff;
  border-radius: 20px;
  padding: 25px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.suggestion-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #e60000, #ff6b6b);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.suggestion-card:hover::before {
  transform: scaleX(1);
}

.suggestion-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.card-icon {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: #ffffff;
}

.suggestion-card.recent-search .card-icon {
  background: #f1f1f1;
}

.suggestion-card.sponsored .card-icon {
  background: #f1f1f1;
}

.suggestion-card.popular .card-icon {
  background: #f1f1f1;
}

.suggestion-card.trending .card-icon {
  background: #f1f1f1;
  color: #e60000;
}

.card-badge {
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.suggestion-card .card-badge {
  background: rgba(108, 117, 125, 0.1);
  color: #6c757d;
}
/*
.suggestion-card.sponsored .card-badge {
  background: linear-gradient(135deg, #ffd700, #ffb347);
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 5px;
}

.suggestion-card.popular .card-badge {
  background: rgba(255, 107, 107, 0.1);
  color: #ff6b6b;
}

.suggestion-card.trending .card-badge {
  background: rgba(78, 205, 196, 0.1);
  color: #4ecdc4;
}*/

.card-content h3 {
  font-size: 1.4rem;
  font-weight: 700;
  color: #2c3e50;
  margin-bottom: 8px;
  line-height: 1.3;
}

.card-content p {
  color: #6c757d;
  font-size: 0.95rem;
  margin-bottom: 20px;
  line-height: 1.5;
}

.card-stats {
  display: flex;
  gap: 15px;
  margin-bottom: 25px;
  flex-wrap: wrap;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  color: #495057;
  font-weight: 500;
}

.stat-item i {
  color: #e60000;
  font-size: 0.8rem;
}

.card-action {
  margin-top: auto;
}

.suggestion-btn {
  width: 100%;
  padding: 12px 20px;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, #e60000, #cc0000);
  color: #ffffff;
  text-transform: none;
}

.suggestion-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(230, 0, 0, 0.3);
  background: linear-gradient(135deg, #cc0000, #b30000);
}

.suggestion-btn.sponsored-btn {
  background: #e60000;
  color: #ffffff;
}

.suggestion-btn.sponsored-btn:hover {
  background: #c60000;
  box-shadow: 0 8px 20px rgba(230, 0, 0, 0.3);
}

/* Animazioni per le card */
.suggestion-card {
  opacity: 0;
  transform: translateY(30px);
  animation: slideInUp 0.6s ease forwards;
}

.suggestion-card:nth-child(1) {
  animation-delay: 0.1s;
}
.suggestion-card:nth-child(2) {
  animation-delay: 0.2s;
}
.suggestion-card:nth-child(3) {
  animation-delay: 0.3s;
}
.suggestion-card:nth-child(4) {
  animation-delay: 0.4s;
}

@keyframes slideInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* === Categorie === */
@keyframes categorie-intestazione-esci {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(-100%);
    opacity: 0;
  }
}
@keyframes categorie-intestazione-entra {
  from {
    transform: translateX(-100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}
@keyframes categorie-contenitore-esci {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}
@keyframes categorie-contenitore-entra {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}
.categorie-intestazione {
  width: 100%;
  height: calc(100% - 0px);
  position: absolute;
  top: 0px;
  left: 0;
  box-sizing: border-box;
  /*border: 1px solid yellow;*/
  transition: left 1.5s ease forwards;
}
.categorie-contenitore {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  flex: 1;
  width: 100%; /* Account for padding */
  max-height: calc(100vh - 65px);
  height: 100%;
  margin-top: 0px;
  overflow-y: auto;
  border-left: none;
  border-right: none;
  position: absolute;
  top: 0%;
  left: 0%;
  margin-top: 65px;
  padding: 0px;
  gap: 10px;
  justify-content: center;
  box-sizing: border-box; /* Include padding in width calculation */
  /*border: 1px solid rgb(208, 0, 255);*/
  z-index: 2000;
}

.categorie-titolo {
  /*border: 1px solid rgb(225, 255, 0);*/
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
  display: flex;
  justify-content: center;
  margin-top: 0px;
  padding: 10px 20px;
  background-color: #e60000;
  border: 1px solid #e60000;
}
.categorie-titolo h3 {
  font-size: 18px;
  font-weight: 500;
  text-align: left;
  margin: 0;
  padding: 0;
  color: #ffffff;
}
.categories {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  max-width: 100%;
  width: 100%;
  height: 100%;
  max-height: 100%;
  box-sizing: border-box;
  overflow-y: auto;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding-bottom: 0px;
  border-radius: 0px;
  box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.1);
  background-color: #ffffff;
}

.categories.active {
  cursor: grabbing;
}

.categories::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}

.categories::-webkit-scrollbar-thumb {
  background-color: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
}
.categories:active {
  cursor: grabbing;
}
.cat {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: min-content;
  gap: 20px;
  padding: 20px 150px;
  width: 100%;
  height: 100%;
  max-height: 100%;
  box-sizing: border-box;
  overflow-y: auto;
}

.bottone-cat {
  border: none;
  font-size: 15px;
  background-color: #f7f7f7;
  cursor: pointer;
  width: 100%;
  height: 200px; /* Altezza fissa invece di aspect-ratio */
  padding: 0;
  border-radius: 5px;
  position: relative;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  transition: transform 0.3s ease;
  margin: 0;
}

.bottone-cat::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  max-width: 100%;
  max-height: 100%;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.2),
    rgba(0, 0, 0, 0.6)
  );
  z-index: 1;
}

.bottone-cat span {
  position: absolute;
  bottom: 15px;
  left: 15px;
  right: 15px;
  color: white;
  text-shadow: 0 0 10px rgb(0, 0, 0);
  font-size: 16px;
  font-weight: 500;
  text-align: left;
  z-index: 2;
  text-transform: capitalize;
}

.bottone-cat:hover {
  transform: scale(1.02);
  border: none;
}

.bottone-cat.attiva::before {
  background: linear-gradient(
    to bottom,
    rgba(230, 0, 0, 0.4),
    rgba(230, 0, 0, 0.7)
  );
}

.bottone-cat.attiva.temporaneamente-disattiva {
  background-color: white;
  color: black;
}

.sfondo-container {
  position: absolute;
  flex: 1;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  max-height: 100%;
  box-sizing: border-box;
  overflow: hidden;
  z-index: -10;
  margin: 0;
  /*border: 1px solid rgb(89, 255, 0);*/
  border-bottom: none;
  filter: brightness(100%) saturate(80%);
  animation: all 1s ease forwards;
  background-color: #ffffff;
}
.sfondo-container-diretto {
  top: 0px;
  width: 60vw;
  max-width: 60vw;
  min-width: 60vw;
  margin: 0 auto;
  position: absolute;
  left: 75%;
  transform: translateX(-50%);
  height: 75vh;
  border-radius: 00px 0px 0px 500px;
  overflow: hidden;
}
.sfondo {
  top: -5%;
  min-width: 110%;
  max-width: 110%;
  width: 110%;
  margin: 0 auto;
  position: absolute;
  left: 55%;
  transform: translateX(-50%);
  border-radius: 40px;
}
.sfondo-desktop {
  display: block;
  top: 0% !important;
  height: 100% !important;
  width: auto !important;
  min-width: 100% !important;
  max-width: 1000% !important;
}
.sfondo-mobile {
  display: none;
}
.sfondo-desktop-container {
  position: absolute;
  bottom: 17.5%;
  left: 0%;
  width: 65%;
  height: 75%;
  max-width: 100%;
  max-height: 100%;
  box-sizing: border-box;
  overflow: hidden;
  z-index: 1000;
}
.sfondo-desktop-due {
  top: -12.5%;
  left: 45%;
  transform: translateX(-50%);
  width: 120%;
  min-width: 120%;
}
.freccia-desktop-container {
  position: absolute;
  top: 37.5%;
  left: 20%;
  width: 15%;
  height: 30%;
  max-width: 100%;
  max-height: 100%;
  box-sizing: border-box;
  overflow: hidden;
  z-index: 1000;
}
.freccia-desktop {
  opacity: 1;
  max-width: 100%;
  max-height: 100%;
}
.sfondo-spiegazione {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
  box-sizing: border-box;
}
.sfondo-container-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0);
  z-index: 10;
}
/*
@keyframes sfondo-chiaro {
  from {
    filter: brightness(60%);
    opacity: 1;
  }
  to {
    filter: brightness(80%);
    opacity: 0.2;
  }
}
@keyframes sfondo-scuro {
  from {
    filter: brightness(80%);
    opacity: 0.2;
  }
  to {
    filter: brightness(60%);
    opacity: 1;
  }
}
*/
@keyframes sfondo-blurrato {
  from {
    filter: blur(0px) brightness(60%);
  }
  to {
    filter: blur(10px) brightness(70%);
  }
}
@keyframes sfondo-blurrato-inverso {
  from {
    filter: blur(10px) brightness(70%);
  }
  to {
    filter: blur(0px) brightness(60%);
  }
}
#spinner {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(98, 98, 98, 0.562); /* sfondo semi-trasparente */
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.spinner {
  border: 6px solid #ccc;
  border-top: 6px solid #3498db;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}
main {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 100%;
  min-height: calc(100vh);
  max-height: calc(100vh);
  box-sizing: border-box;
  background-color: #fdfdfd14;
  /*border: 1px solid #00f2ff;*/
  padding: 0px 0px 0px 0px;
  overflow-x: hidden;
}

.reparto-container {
  display: none;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  box-sizing: border-box;
  position: absolute;
  width: auto;
  top: 70px;
  left: 50%;
  transform: translateX(-50%) !important;
  margin-left: 0px;
  gap: 10px !important;
  z-index: 2000;
  padding: 10px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: 25px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  animation: fadeInScale 0.4s ease-out 0.2s both;
}

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: translateY(-50%) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(-50%) scale(1);
  }
}

.reparto-container div {
  border: none !important;
  width: auto;
  padding: 0px;
  background-color: transparent;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Animazioni di entrata per i bottoni */
.reparto-container div:nth-child(1) {
  animation: slideInLeft 0.3s ease-out 0.05s both;
}

.reparto-container div:nth-child(2) {
  animation: slideInLeft 0.3s ease-out 0.1s both;
}

.reparto-container div:nth-child(3) {
  animation: slideInLeft 0.3s ease-out 0.15s both;
}

.reparto-container button {
  padding: 15px 12px;
  width: 100%;
  min-width: 140px;
  max-width: 140px;
  height: auto;
  border: none;
  background: linear-gradient(
    135deg,
    rgba(246, 246, 246, 0.9),
    rgba(228, 228, 228, 0.7)
  );
  cursor: pointer;
  color: #333;
  font-size: 17px;
  font-weight: 500;
  text-decoration: none;
  border-radius: 18px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.reparto-container button::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.4),
    transparent
  );
  transition: left 0.5s;
}

.reparto-container button:hover::before {
  left: 100%;
}

.reparto-container button:hover {
  transform: translateY(-2px) scale(1.02);
  color: #e60000;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 1),
    rgba(240, 248, 255, 0.9)
  );
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4) !important;
}

.reparto-container button:active {
  transform: translateY(0) scale(0.98);
  transition: all 0.1s ease;
}

.reparto-container button i {
  font-size: 17px;
  transition: all 0.3s ease;
}

.reparto-container button:hover i {
  transform: scale(1.1);
  color: #e60000;
}

.reparto-ricerca,
.reparto-liste,
.reparto-notizie {
  height: auto;
  margin: 0px;
  background-color: transparent;
  width: auto;
}

.reparto-container button.active {
  font-size: 17px;
  color: #ffffff;
  background: linear-gradient(135deg, #e60000, #b00000);
  border: none;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4) !important;
  transform: translateY(-1px);
  animation: activePulse 2s ease-in-out infinite;
}

.reparto-container button.active i {
  color: #ffffff;
  transform: scale(1.1);
}

.reparto-container button.active:hover {
  background: linear-gradient(135deg, #ce0101, #b00000);
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 5px 20px rgba(73, 73, 73, 0.4) !important;
}

/* Effetto pulsazione per il bottone attivo */
@keyframes activePulse {
  0%,
  100% {
    box-shadow: 0 0px 5px rgba(20, 20, 20, 0.3);
  }
  50% {
    box-shadow: 0 0px 10px rgba(36, 36, 36, 0.5);
  }
}

@keyframes blocco-uno-esci {
  from {
    transform: translateY(0);
    opacity: 1;
  }
  to {
    transform: translateY(-100%);
    opacity: 0;
  }
}
@keyframes blocco-uno-entra {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}
@keyframes blocco-due-entra-salendo {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}
@keyframes blocco-due-esci-salendo {
  from {
    transform: translateY(0);
    opacity: 1;
  }
  to {
    transform: translateY(-100%);
    opacity: 0;
  }
}
@keyframes blocco-due-entra-scendendo {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}
@keyframes blocco-due-esci-scendendo {
  from {
    transform: translateY(0);
    opacity: 1;
  }
  to {
    transform: translateY(100%);
    opacity: 0;
  }
}
@keyframes blocco-tre-entra {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}
@keyframes blocco-tre-esci {
  from {
    transform: translateY(0);
    opacity: 1;
  }
  to {
    transform: translateY(100%);
    opacity: 0;
  }
}

.blocco {
  width: 100%;
  height: calc(100% - 65px);
  top: 65px;
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  box-sizing: border-box;
  z-index: 1000;
  transition: top 1.5s ease;
  overflow-x: hidden;
}

.blocco.numero-uno {
  /*border: 1px solid red;*/
  position: absolute;
  display: none;
  animation: all 1.5s ease forwards;
}

.blocco.numero-due {
  position: absolute;
  display: none;
  /*border: 1px solid blue;*/
  animation: all 1.5s ease forwards;
}
.blocco.numero-tre {
  position: absolute;
  display: none;
  /*border: 1px solid green;*/
  animation: all 1.5s ease forwards;
}
@keyframes intestazione-esci {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(-100%);
    opacity: 0;
  }
}
@keyframes intestazione-entra {
  from {
    transform: translateX(-100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}
@keyframes contenitore-esci {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}
@keyframes contenitore-entra {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}
.main-intestazione-container {
  width: 100%;
  background: transparent;
  /*  height: calc(100% - 65px);*/
  position: absolute;
  top: calc(0dvh - 65px);
  left: 0;
  box-sizing: border-box;
  /*border: 1px solid yellow;*/
  transition: left 1.5s ease forwards;
  overflow-y: auto;
  overflow-x: hidden;
  border-radius: 0px !important;
}

.main-intestazione-ricerca {
  width: 100%;
  height: 100%;
  position: fixed;
  top: 0;
  left: 0;
  display: none;
}
.main-intestazione-landing {
  width: 100%;
  max-width: 100%;
  min-width: 100%;
  height: calc(100vh - 65px);
  max-height: calc(100vh - 65px);
  min-height: calc(100vh - 65px);
  box-sizing: border-box;
  background: transparent;
  border-radius: 0px;
  position: relative;
}
.spiegazione-main {
  min-width: 100% !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  margin: 0 auto 0px auto;
  padding: 0px 0px 0px 0px !important;
  z-index: 10;
  background: linear-gradient(135deg, #ffffff 0%, #ffffff 100%);
  border-radius: 0px !important;
  overflow-x: hidden;
}

/* Explanation Buttons Container */
.explanation-buttons-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  padding: 0px 20px 0px 20px;
  margin: 120px 0px;
  height: 0px;
  min-height: 0px;
  max-height: 0px;
  scroll-margin-top: 40px;
  border: 1px solid#e60000;
}
.explanation-buttons-container.due {
  margin: 30px 0px 60px 0px;
}

.explanation-btn {
  padding: 15px 30px;
  font-size: 16px;
  font-weight: 600;
  background: #ffffff;
  color: #353535;
  border-radius: 50px;
  border: 2px solid #353535;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 180px;
  text-align: center;
}

.explanation-btn:hover {
  background: #f5f5f5;
  color: #000000;
  border: 2px solid #000000;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(230, 0, 0, 0.3);
}

.explanation-btn.active {
  border: 2px solid #e60000;
  background: white;
  color: #e60000;
  box-shadow: 0 4px 12px rgba(230, 0, 0, 0.3);
}

.explanation-btn.active:hover {
  color: #c60000;
  border: 2px solid #c60000;
  background: #f7f7f7;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(230, 0, 0, 0.4);
}

.main-contenitore {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  flex: 1;
  width: 100%; /* Account for padding */
  max-height: calc(100vh - 65px);
  height: 100%;
  margin-top: 0px;
  overflow: visible;
  border-left: none;
  border-right: none;
  position: absolute;
  top: 0%;
  left: 0%;
  margin-top: 65px;
  padding: 0px;
  gap: 10px;
  border-radius: 0px;
  justify-content: center;
  box-sizing: border-box; /* Include padding in width calculation */
  /*border: 1px solid rgb(208, 0, 255);*/
  transition: left 1.5s ease forwards;
}

.sezione {
  display: flex;
  flex-direction: column;
  /*align-items: center;*/
  padding: 0;
  margin: 0;
  height: auto;
  box-sizing: border-box;
}
.categorie-container {
  position: relative;
  display: flex;
  z-index: 999;
  max-width: 100%;
  min-width: 100%;
  width: 100%;
  min-height: 100%;
  height: 100%;
  max-height: 100%;
  margin: 0px auto;
  /*border: 1px solid red;*/
  box-sizing: border-box;
  padding: 0px 0px 0px 0px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  overflow-x: hidden;
}
#due {
  position: relative;
  z-index: 2010;
  width: 80%;
  height: 100%;
  box-sizing: border-box;
  /*border: rgb(0, 217, 255) 2px solid;*/
  padding: 0px;
  border-radius: 10px;
  min-width: 0; /* impedisce l'espansione imprevista */
  overflow-x: visible; /* blocca il contenuto troppo largo */
  background-color: #f1f1f1;
}

#tre {
  position: absolute;
  top: 60px;
  right: 0%;
  display: flex;
  height: calc(100% - 60px);
  width: 55%;
  margin: 0px 0px 0px auto;
  padding: 0px 0px 0px 0px;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.main-section {
  /*border: rgb(255, 0, 238) 2px solid;*/
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  width: 20%;
  height: 100%;
  padding: 0px;
  border-radius: 10px;
}

.logo-main-benvenuti {
  color: #ffffff;
  text-shadow: 0 0 5px rgba(0, 0, 0, 0);
  position: absolute;
  top: 30%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  justify-content: center;
  align-items: center;
}

.logo-main-intestazione {
  display: none;
  position: absolute;
  top: 30%;
  right: 7.5%;
  transform: translate(-50%, -50%);
  justify-content: center;
  align-items: center;
  box-sizing: border-box;
  width: 100%;
  height: auto;
  max-width: 22.5%;
  outline: none;
  z-index: 10000;
  filter: drop-shadow(4px 4px 2px rgb(83, 83, 83, 0.5));
}
.highlight {
  color: #e60000;
  font-weight: 800;
  text-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
}
.logo-main-intestazione p {
  font-size: 104px;
  font-weight: 600;
  color: #ffffff;
  text-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
}
.logo-main-intestazione img {
  width: 100%;
  height: 100%;
  margin-top: 19px;
  object-fit: contain;
}
.main-titolo-container {
  position: absolute;
  text-align: center;
  top: 25%;
  left: 21%;
  max-width: 40%;
  width: 40%;
  transform: translate(-50%, -50%);
  z-index: 900;
}

.main-titolo-container h1 {
  font-size: 55px;
  font-weight: 700;
  line-height: 1.3;
  color: #000000;
  text-shadow: -1px 1px 1px rgb(83, 83, 83, 0.3);
}

.main-titolo-mobile {
  display: none;
}

.offro-servizio-mobile-container {
  display: none;
}

.freccia-mobile-container {
  display: none;
}

.ricerca {
  position: absolute;
  left: 50%;
  top: 80%;
  transform: translate(-50%, -50%);
  width: 80%;
  height: auto;
  padding: 15px 20px 15px 60px;
  box-sizing: border-box;
  background-color: #ffffff;
  /*box-shadow: 0px 0px 20px rgba(87, 87, 87, 0.5);*/
  /*border: 0.5px rgb(206, 206, 206) solid;*/
  border: 1px solid rgb(208, 207, 207);
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  border-radius: 30px;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 15px;
  z-index: 10001;
  /*border: 1px solid #00ec5f;*/
}

/* CTA Auth Banner Styles */
.cta-auth-banner {
  display: none;
  position: absolute;
  left: 25%;
  top: 51%;
  transform: translate(-50%, -50%);
  width: auto;
  z-index: 100000;
  margin-top: 20px;
}

.cta-auth-content {
  display: flex;
  gap: 20px;
  align-items: center;
}

.cta-auth-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 26px;
  border-radius: 30px;
  text-decoration: none;
  font-weight: 600;
  font-size: 18px;
  transition: all 0.3s ease;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
  border: 2px solid transparent;
  min-width: 120px;
}

.cta-login-btn {
  background: white;
  color: #007bff;
  border: 2px solid #007bff;
}

.cta-login-btn:hover {
  background: #007bff;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.cta-register-btn {
  background: white;
  color: #e60000;
  border: 2px solid #e60000;
}

.cta-register-btn:hover {
  background: #e60000;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(230, 0, 0, 0.3);
}

.cta-auth-btn i {
  font-size: 20px;
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

/* AI Text Banner Styles */
.ai-text-banner {
  position: absolute;
  left: -50%;
  top: 60%;
  transform: translateY(0%);
  transform: translateX(0%);
  width: auto;
  z-index: 10000000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  pointer-events: none;
}

.ai-text-banner .ai-banner-text {
  background: transparent;
  border-radius: 15px;
  padding: 15px 20px;
  text-align: center;
  /*box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);*/
  transition: all 0.3s ease;
}
/*
.ai-text-banner .ai-banner-text:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(230, 0, 0, 0.3);
}*/

.ai-text-banner .ai-banner-title {
  display: block;
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 4px;
  color: #000000;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  white-space: nowrap;
}

.ai-text-banner .ai-banner-subtitle {
  display: block;
  font-size: 15px;
  color: #525252;
  line-height: 1.3;
}
/* Responsive adjustments for AI banner */
@media (max-width: 768px) {
  .cta-auth-banner {
    width: 90%;
    top: 65%;
  }

  .cta-auth-content {
    flex-direction: column;
    gap: 10px;
    width: 100%;
  }

  .cta-auth-btn {
    width: 100%;
    justify-content: center;
    padding: 20px 24px;
    font-size: 18px;
    min-width: auto;
  }
}
.luogo-container {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  box-sizing: border-box;
  padding: 10px 15px 10px 40px;
  width: 25%;
  min-width: 25%;
  max-width: 25%;
  height: auto;
  margin: 0;
  border-radius: 0px;
  z-index: 10;
  border-left: 1px solid rgb(208, 207, 207);
  /*border: 2px solid rgb(208, 207, 207);*/
}
.luogo-container i {
  font-size: 22px;
  color: #e60000;
  margin-left: 0;
  margin-right: 10px;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.luogo-container input {
  display: flex;
  justify-content: flex-start;
  box-sizing: border-box;
  padding: 8px 12px;
  border: none;
  outline: none;
  background-color: transparent;
  font-size: 18px;
  font-weight: 400;
  width: 100%;
  text-align: left;
  /* animation: lampeggia-placeholder 2.5s infinite; */ /* DISABILITATO - animazione pulse rimossa */
}
.luogo-container input::placeholder {
  font-size: 20px;
  text-align: left;
  color: #333333;
}

/* Stili migliorati per il dropdown di Google Maps Autocomplete */
.pac-container {
  z-index: 9999 !important;
  border-radius: 15px !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15) !important;
  border: 2px solid rgb(208, 207, 207) !important;
  font-family: inherit !important;
  margin-top: 12px !important;
  margin-left: -30px !important;
  overflow: hidden !important;
  background: white !important;
  width: 240px !important;
  font-size: 14px !important;
}

.pac-item {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0px;
  padding: 6px 16px !important;
  font-size: 14px !important;
  border-bottom: 1px solid #f0f0f0 !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  color: #333 !important;
  line-height: 1.5 !important;
}

/* Forza lo stesso font-size per tutti gli elementi all'interno di pac-item */
.pac-item *,
.pac-item span,
.pac-item div,
.pac-item strong {
  font-size: 16px !important;
}

.pac-item:last-child {
  border-bottom: none !important;
}

.pac-item:hover {
  background-color: #f8f9fa !important;
  color: #e60000 !important;
}

.pac-item-selected {
  background-color: #e60000 !important;
  color: white !important;
}

.pac-item-selected:hover {
  background-color: #cc0000 !important;
  color: white !important;
}

.pac-item-query {
  font-weight: 500 !important;
  color: inherit !important;
  font-size: 16px !important;
}

.pac-item-query:hover {
  background-color: transparent !important;
}

.pac-icon {
  margin-right: 8px !important;
  width: 20px !important;
  height: 20px !important;
}

.pac-matched {
  font-weight: 600 !important;
  color: inherit !important;
  font-size: 16px !important;
}

.search-container {
  width: 40%;
  min-width: 40%;
  max-width: 40%;
  height: auto;
  margin: 0;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  border-radius: 15px;
  padding: 10px 15px;
  box-sizing: border-box;
  /*border: 2px solid rgb(208, 207, 207);*/
  position: relative;
  background: white;
  isolation: isolate;
}
/* Bordo animato disabilitato */
.search-container::before {
  display: none !important;
  content: none !important;
}

.search-container:focus-within::before {
  display: none !important;
  content: none !important;
}

.search-container.animation-stopped::before {
  display: none !important;
  content: none !important;
}

.search-container.animation-permanently-disabled::before,
.search-container:has(.search-two.animation-permanently-disabled)::before {
  display: none !important;
  content: none !important;
}

@keyframes border-animate {
  /* Fase 1: da grigio a rosso (0-50%) - step ogni 1% per massima fluidità */
  0% {
    background: conic-gradient(
      from 0deg,
      #e60000 0deg,
      #e60000 0deg,
      rgb(208, 207, 207) 0deg,
      rgb(208, 207, 207) 360deg
    );
  }
  1% {
    background: conic-gradient(
      from 0deg,
      #e60000 0deg,
      #e60000 7.2deg,
      rgb(208, 207, 207) 7.2deg,
      rgb(208, 207, 207) 360deg
    );
  }
  2% {
    background: conic-gradient(
      from 0deg,
      #e60000 0deg,
      #e60000 14.4deg,
      rgb(208, 207, 207) 14.4deg,
      rgb(208, 207, 207) 360deg
    );
  }
  3% {
    background: conic-gradient(
      from 0deg,
      #e60000 0deg,
      #e60000 21.6deg,
      rgb(208, 207, 207) 21.6deg,
      rgb(208, 207, 207) 360deg
    );
  }
  4% {
    background: conic-gradient(
      from 0deg,
      #e60000 0deg,
      #e60000 28.8deg,
      rgb(208, 207, 207) 28.8deg,
      rgb(208, 207, 207) 360deg
    );
  }
  5% {
    background: conic-gradient(
      from 0deg,
      #e60000 0deg,
      #e60000 36deg,
      rgb(208, 207, 207) 36deg,
      rgb(208, 207, 207) 360deg
    );
  }
  6% {
    background: conic-gradient(
      from 0deg,
      #e60000 0deg,
      #e60000 43.2deg,
      rgb(208, 207, 207) 43.2deg,
      rgb(208, 207, 207) 360deg
    );
  }
  7% {
    background: conic-gradient(
      from 0deg,
      #e60000 0deg,
      #e60000 50.4deg,
      rgb(208, 207, 207) 50.4deg,
      rgb(208, 207, 207) 360deg
    );
  }
  8% {
    background: conic-gradient(
      from 0deg,
      #e60000 0deg,
      #e60000 57.6deg,
      rgb(208, 207, 207) 57.6deg,
      rgb(208, 207, 207) 360deg
    );
  }
  9% {
    background: conic-gradient(
      from 0deg,
      #e60000 0deg,
      #e60000 64.8deg,
      rgb(208, 207, 207) 64.8deg,
      rgb(208, 207, 207) 360deg
    );
  }
  10% {
    background: conic-gradient(
      from 0deg,
      #e60000 0deg,
      #e60000 72deg,
      rgb(208, 207, 207) 72deg,
      rgb(208, 207, 207) 360deg
    );
  }
  11% {
    background: conic-gradient(
      from 0deg,
      #e60000 0deg,
      #e60000 79.2deg,
      rgb(208, 207, 207) 79.2deg,
      rgb(208, 207, 207) 360deg
    );
  }
  12% {
    background: conic-gradient(
      from 0deg,
      #e60000 0deg,
      #e60000 86.4deg,
      rgb(208, 207, 207) 86.4deg,
      rgb(208, 207, 207) 360deg
    );
  }
  13% {
    background: conic-gradient(
      from 0deg,
      #e60000 0deg,
      #e60000 93.6deg,
      rgb(208, 207, 207) 93.6deg,
      rgb(208, 207, 207) 360deg
    );
  }
  14% {
    background: conic-gradient(
      from 0deg,
      #e60000 0deg,
      #e60000 100.8deg,
      rgb(208, 207, 207) 100.8deg,
      rgb(208, 207, 207) 360deg
    );
  }
  15% {
    background: conic-gradient(
      from 0deg,
      #e60000 0deg,
      #e60000 108deg,
      rgb(208, 207, 207) 108deg,
      rgb(208, 207, 207) 360deg
    );
  }
  16% {
    background: conic-gradient(
      from 0deg,
      #e60000 0deg,
      #e60000 115.2deg,
      rgb(208, 207, 207) 115.2deg,
      rgb(208, 207, 207) 360deg
    );
  }
  17% {
    background: conic-gradient(
      from 0deg,
      #e60000 0deg,
      #e60000 122.4deg,
      rgb(208, 207, 207) 122.4deg,
      rgb(208, 207, 207) 360deg
    );
  }
  18% {
    background: conic-gradient(
      from 0deg,
      #e60000 0deg,
      #e60000 129.6deg,
      rgb(208, 207, 207) 129.6deg,
      rgb(208, 207, 207) 360deg
    );
  }
  19% {
    background: conic-gradient(
      from 0deg,
      #e60000 0deg,
      #e60000 136.8deg,
      rgb(208, 207, 207) 136.8deg,
      rgb(208, 207, 207) 360deg
    );
  }
  20% {
    background: conic-gradient(
      from 0deg,
      #e60000 0deg,
      #e60000 144deg,
      rgb(208, 207, 207) 144deg,
      rgb(208, 207, 207) 360deg
    );
  }
  21% {
    background: conic-gradient(
      from 0deg,
      #e60000 0deg,
      #e60000 151.2deg,
      rgb(208, 207, 207) 151.2deg,
      rgb(208, 207, 207) 360deg
    );
  }
  22% {
    background: conic-gradient(
      from 0deg,
      #e60000 0deg,
      #e60000 158.4deg,
      rgb(208, 207, 207) 158.4deg,
      rgb(208, 207, 207) 360deg
    );
  }
  23% {
    background: conic-gradient(
      from 0deg,
      #e60000 0deg,
      #e60000 165.6deg,
      rgb(208, 207, 207) 165.6deg,
      rgb(208, 207, 207) 360deg
    );
  }
  24% {
    background: conic-gradient(
      from 0deg,
      #e60000 0deg,
      #e60000 172.8deg,
      rgb(208, 207, 207) 172.8deg,
      rgb(208, 207, 207) 360deg
    );
  }
  25% {
    background: conic-gradient(
      from 0deg,
      #e60000 0deg,
      #e60000 180deg,
      rgb(208, 207, 207) 180deg,
      rgb(208, 207, 207) 360deg
    );
  }
  26% {
    background: conic-gradient(
      from 0deg,
      #e60000 0deg,
      #e60000 187.2deg,
      rgb(208, 207, 207) 187.2deg,
      rgb(208, 207, 207) 360deg
    );
  }
  27% {
    background: conic-gradient(
      from 0deg,
      #e60000 0deg,
      #e60000 194.4deg,
      rgb(208, 207, 207) 194.4deg,
      rgb(208, 207, 207) 360deg
    );
  }
  28% {
    background: conic-gradient(
      from 0deg,
      #e60000 0deg,
      #e60000 201.6deg,
      rgb(208, 207, 207) 201.6deg,
      rgb(208, 207, 207) 360deg
    );
  }
  29% {
    background: conic-gradient(
      from 0deg,
      #e60000 0deg,
      #e60000 208.8deg,
      rgb(208, 207, 207) 208.8deg,
      rgb(208, 207, 207) 360deg
    );
  }
  30% {
    background: conic-gradient(
      from 0deg,
      #e60000 0deg,
      #e60000 216deg,
      rgb(208, 207, 207) 216deg,
      rgb(208, 207, 207) 360deg
    );
  }
  31% {
    background: conic-gradient(
      from 0deg,
      #e60000 0deg,
      #e60000 223.2deg,
      rgb(208, 207, 207) 223.2deg,
      rgb(208, 207, 207) 360deg
    );
  }
  32% {
    background: conic-gradient(
      from 0deg,
      #e60000 0deg,
      #e60000 230.4deg,
      rgb(208, 207, 207) 230.4deg,
      rgb(208, 207, 207) 360deg
    );
  }
  33% {
    background: conic-gradient(
      from 0deg,
      #e60000 0deg,
      #e60000 237.6deg,
      rgb(208, 207, 207) 237.6deg,
      rgb(208, 207, 207) 360deg
    );
  }
  34% {
    background: conic-gradient(
      from 0deg,
      #e60000 0deg,
      #e60000 244.8deg,
      rgb(208, 207, 207) 244.8deg,
      rgb(208, 207, 207) 360deg
    );
  }
  35% {
    background: conic-gradient(
      from 0deg,
      #e60000 0deg,
      #e60000 252deg,
      rgb(208, 207, 207) 252deg,
      rgb(208, 207, 207) 360deg
    );
  }
  36% {
    background: conic-gradient(
      from 0deg,
      #e60000 0deg,
      #e60000 259.2deg,
      rgb(208, 207, 207) 259.2deg,
      rgb(208, 207, 207) 360deg
    );
  }
  37% {
    background: conic-gradient(
      from 0deg,
      #e60000 0deg,
      #e60000 266.4deg,
      rgb(208, 207, 207) 266.4deg,
      rgb(208, 207, 207) 360deg
    );
  }
  38% {
    background: conic-gradient(
      from 0deg,
      #e60000 0deg,
      #e60000 273.6deg,
      rgb(208, 207, 207) 273.6deg,
      rgb(208, 207, 207) 360deg
    );
  }
  39% {
    background: conic-gradient(
      from 0deg,
      #e60000 0deg,
      #e60000 280.8deg,
      rgb(208, 207, 207) 280.8deg,
      rgb(208, 207, 207) 360deg
    );
  }
  40% {
    background: conic-gradient(
      from 0deg,
      #e60000 0deg,
      #e60000 288deg,
      rgb(208, 207, 207) 288deg,
      rgb(208, 207, 207) 360deg
    );
  }
  41% {
    background: conic-gradient(
      from 0deg,
      #e60000 0deg,
      #e60000 295.2deg,
      rgb(208, 207, 207) 295.2deg,
      rgb(208, 207, 207) 360deg
    );
  }
  42% {
    background: conic-gradient(
      from 0deg,
      #e60000 0deg,
      #e60000 302.4deg,
      rgb(208, 207, 207) 302.4deg,
      rgb(208, 207, 207) 360deg
    );
  }
  43% {
    background: conic-gradient(
      from 0deg,
      #e60000 0deg,
      #e60000 309.6deg,
      rgb(208, 207, 207) 309.6deg,
      rgb(208, 207, 207) 360deg
    );
  }
  44% {
    background: conic-gradient(
      from 0deg,
      #e60000 0deg,
      #e60000 316.8deg,
      rgb(208, 207, 207) 316.8deg,
      rgb(208, 207, 207) 360deg
    );
  }
  45% {
    background: conic-gradient(
      from 0deg,
      #e60000 0deg,
      #e60000 324deg,
      rgb(208, 207, 207) 324deg,
      rgb(208, 207, 207) 360deg
    );
  }
  46% {
    background: conic-gradient(
      from 0deg,
      #e60000 0deg,
      #e60000 331.2deg,
      rgb(208, 207, 207) 331.2deg,
      rgb(208, 207, 207) 360deg
    );
  }
  47% {
    background: conic-gradient(
      from 0deg,
      #e60000 0deg,
      #e60000 338.4deg,
      rgb(208, 207, 207) 338.4deg,
      rgb(208, 207, 207) 360deg
    );
  }
  48% {
    background: conic-gradient(
      from 0deg,
      #e60000 0deg,
      #e60000 345.6deg,
      rgb(208, 207, 207) 345.6deg,
      rgb(208, 207, 207) 360deg
    );
  }
  49% {
    background: conic-gradient(
      from 0deg,
      #e60000 0deg,
      #e60000 352.8deg,
      rgb(208, 207, 207) 352.8deg,
      rgb(208, 207, 207) 360deg
    );
  }
  50% {
    background: conic-gradient(
      from 0deg,
      #e60000 0deg,
      #e60000 360deg,
      rgb(208, 207, 207) 360deg,
      rgb(208, 207, 207) 360deg
    );
  }
  /* Fase 2: da rosso a grigio (50-100%) - step ogni 1% per massima fluidità */
  51% {
    background: conic-gradient(
      from 0deg,
      rgb(208, 207, 207) 0deg,
      rgb(208, 207, 207) 7.2deg,
      #e60000 7.2deg,
      #e60000 360deg
    );
  }
  52% {
    background: conic-gradient(
      from 0deg,
      rgb(208, 207, 207) 0deg,
      rgb(208, 207, 207) 14.4deg,
      #e60000 14.4deg,
      #e60000 360deg
    );
  }
  53% {
    background: conic-gradient(
      from 0deg,
      rgb(208, 207, 207) 0deg,
      rgb(208, 207, 207) 21.6deg,
      #e60000 21.6deg,
      #e60000 360deg
    );
  }
  54% {
    background: conic-gradient(
      from 0deg,
      rgb(208, 207, 207) 0deg,
      rgb(208, 207, 207) 28.8deg,
      #e60000 28.8deg,
      #e60000 360deg
    );
  }
  55% {
    background: conic-gradient(
      from 0deg,
      rgb(208, 207, 207) 0deg,
      rgb(208, 207, 207) 36deg,
      #e60000 36deg,
      #e60000 360deg
    );
  }
  56% {
    background: conic-gradient(
      from 0deg,
      rgb(208, 207, 207) 0deg,
      rgb(208, 207, 207) 43.2deg,
      #e60000 43.2deg,
      #e60000 360deg
    );
  }
  57% {
    background: conic-gradient(
      from 0deg,
      rgb(208, 207, 207) 0deg,
      rgb(208, 207, 207) 50.4deg,
      #e60000 50.4deg,
      #e60000 360deg
    );
  }
  58% {
    background: conic-gradient(
      from 0deg,
      rgb(208, 207, 207) 0deg,
      rgb(208, 207, 207) 57.6deg,
      #e60000 57.6deg,
      #e60000 360deg
    );
  }
  59% {
    background: conic-gradient(
      from 0deg,
      rgb(208, 207, 207) 0deg,
      rgb(208, 207, 207) 64.8deg,
      #e60000 64.8deg,
      #e60000 360deg
    );
  }
  60% {
    background: conic-gradient(
      from 0deg,
      rgb(208, 207, 207) 0deg,
      rgb(208, 207, 207) 72deg,
      #e60000 72deg,
      #e60000 360deg
    );
  }
  61% {
    background: conic-gradient(
      from 0deg,
      rgb(208, 207, 207) 0deg,
      rgb(208, 207, 207) 79.2deg,
      #e60000 79.2deg,
      #e60000 360deg
    );
  }
  62% {
    background: conic-gradient(
      from 0deg,
      rgb(208, 207, 207) 0deg,
      rgb(208, 207, 207) 86.4deg,
      #e60000 86.4deg,
      #e60000 360deg
    );
  }
  63% {
    background: conic-gradient(
      from 0deg,
      rgb(208, 207, 207) 0deg,
      rgb(208, 207, 207) 93.6deg,
      #e60000 93.6deg,
      #e60000 360deg
    );
  }
  64% {
    background: conic-gradient(
      from 0deg,
      rgb(208, 207, 207) 0deg,
      rgb(208, 207, 207) 100.8deg,
      #e60000 100.8deg,
      #e60000 360deg
    );
  }
  65% {
    background: conic-gradient(
      from 0deg,
      rgb(208, 207, 207) 0deg,
      rgb(208, 207, 207) 108deg,
      #e60000 108deg,
      #e60000 360deg
    );
  }
  66% {
    background: conic-gradient(
      from 0deg,
      rgb(208, 207, 207) 0deg,
      rgb(208, 207, 207) 115.2deg,
      #e60000 115.2deg,
      #e60000 360deg
    );
  }
  67% {
    background: conic-gradient(
      from 0deg,
      rgb(208, 207, 207) 0deg,
      rgb(208, 207, 207) 122.4deg,
      #e60000 122.4deg,
      #e60000 360deg
    );
  }
  68% {
    background: conic-gradient(
      from 0deg,
      rgb(208, 207, 207) 0deg,
      rgb(208, 207, 207) 129.6deg,
      #e60000 129.6deg,
      #e60000 360deg
    );
  }
  69% {
    background: conic-gradient(
      from 0deg,
      rgb(208, 207, 207) 0deg,
      rgb(208, 207, 207) 136.8deg,
      #e60000 136.8deg,
      #e60000 360deg
    );
  }
  70% {
    background: conic-gradient(
      from 0deg,
      rgb(208, 207, 207) 0deg,
      rgb(208, 207, 207) 144deg,
      #e60000 144deg,
      #e60000 360deg
    );
  }
  71% {
    background: conic-gradient(
      from 0deg,
      rgb(208, 207, 207) 0deg,
      rgb(208, 207, 207) 151.2deg,
      #e60000 151.2deg,
      #e60000 360deg
    );
  }
  72% {
    background: conic-gradient(
      from 0deg,
      rgb(208, 207, 207) 0deg,
      rgb(208, 207, 207) 158.4deg,
      #e60000 158.4deg,
      #e60000 360deg
    );
  }
  73% {
    background: conic-gradient(
      from 0deg,
      rgb(208, 207, 207) 0deg,
      rgb(208, 207, 207) 165.6deg,
      #e60000 165.6deg,
      #e60000 360deg
    );
  }
  74% {
    background: conic-gradient(
      from 0deg,
      rgb(208, 207, 207) 0deg,
      rgb(208, 207, 207) 172.8deg,
      #e60000 172.8deg,
      #e60000 360deg
    );
  }
  75% {
    background: conic-gradient(
      from 0deg,
      rgb(208, 207, 207) 0deg,
      rgb(208, 207, 207) 180deg,
      #e60000 180deg,
      #e60000 360deg
    );
  }
  76% {
    background: conic-gradient(
      from 0deg,
      rgb(208, 207, 207) 0deg,
      rgb(208, 207, 207) 187.2deg,
      #e60000 187.2deg,
      #e60000 360deg
    );
  }
  77% {
    background: conic-gradient(
      from 0deg,
      rgb(208, 207, 207) 0deg,
      rgb(208, 207, 207) 194.4deg,
      #e60000 194.4deg,
      #e60000 360deg
    );
  }
  78% {
    background: conic-gradient(
      from 0deg,
      rgb(208, 207, 207) 0deg,
      rgb(208, 207, 207) 201.6deg,
      #e60000 201.6deg,
      #e60000 360deg
    );
  }
  79% {
    background: conic-gradient(
      from 0deg,
      rgb(208, 207, 207) 0deg,
      rgb(208, 207, 207) 208.8deg,
      #e60000 208.8deg,
      #e60000 360deg
    );
  }
  80% {
    background: conic-gradient(
      from 0deg,
      rgb(208, 207, 207) 0deg,
      rgb(208, 207, 207) 216deg,
      #e60000 216deg,
      #e60000 360deg
    );
  }
  81% {
    background: conic-gradient(
      from 0deg,
      rgb(208, 207, 207) 0deg,
      rgb(208, 207, 207) 223.2deg,
      #e60000 223.2deg,
      #e60000 360deg
    );
  }
  82% {
    background: conic-gradient(
      from 0deg,
      rgb(208, 207, 207) 0deg,
      rgb(208, 207, 207) 230.4deg,
      #e60000 230.4deg,
      #e60000 360deg
    );
  }
  83% {
    background: conic-gradient(
      from 0deg,
      rgb(208, 207, 207) 0deg,
      rgb(208, 207, 207) 237.6deg,
      #e60000 237.6deg,
      #e60000 360deg
    );
  }
  84% {
    background: conic-gradient(
      from 0deg,
      rgb(208, 207, 207) 0deg,
      rgb(208, 207, 207) 244.8deg,
      #e60000 244.8deg,
      #e60000 360deg
    );
  }
  85% {
    background: conic-gradient(
      from 0deg,
      rgb(208, 207, 207) 0deg,
      rgb(208, 207, 207) 252deg,
      #e60000 252deg,
      #e60000 360deg
    );
  }
  86% {
    background: conic-gradient(
      from 0deg,
      rgb(208, 207, 207) 0deg,
      rgb(208, 207, 207) 259.2deg,
      #e60000 259.2deg,
      #e60000 360deg
    );
  }
  87% {
    background: conic-gradient(
      from 0deg,
      rgb(208, 207, 207) 0deg,
      rgb(208, 207, 207) 266.4deg,
      #e60000 266.4deg,
      #e60000 360deg
    );
  }
  88% {
    background: conic-gradient(
      from 0deg,
      rgb(208, 207, 207) 0deg,
      rgb(208, 207, 207) 273.6deg,
      #e60000 273.6deg,
      #e60000 360deg
    );
  }
  89% {
    background: conic-gradient(
      from 0deg,
      rgb(208, 207, 207) 0deg,
      rgb(208, 207, 207) 280.8deg,
      #e60000 280.8deg,
      #e60000 360deg
    );
  }
  90% {
    background: conic-gradient(
      from 0deg,
      rgb(208, 207, 207) 0deg,
      rgb(208, 207, 207) 288deg,
      #e60000 288deg,
      #e60000 360deg
    );
  }
  91% {
    background: conic-gradient(
      from 0deg,
      rgb(208, 207, 207) 0deg,
      rgb(208, 207, 207) 295.2deg,
      #e60000 295.2deg,
      #e60000 360deg
    );
  }
  92% {
    background: conic-gradient(
      from 0deg,
      rgb(208, 207, 207) 0deg,
      rgb(208, 207, 207) 302.4deg,
      #e60000 302.4deg,
      #e60000 360deg
    );
  }
  93% {
    background: conic-gradient(
      from 0deg,
      rgb(208, 207, 207) 0deg,
      rgb(208, 207, 207) 309.6deg,
      #e60000 309.6deg,
      #e60000 360deg
    );
  }
  94% {
    background: conic-gradient(
      from 0deg,
      rgb(208, 207, 207) 0deg,
      rgb(208, 207, 207) 316.8deg,
      #e60000 316.8deg,
      #e60000 360deg
    );
  }
  95% {
    background: conic-gradient(
      from 0deg,
      rgb(208, 207, 207) 0deg,
      rgb(208, 207, 207) 324deg,
      #e60000 324deg,
      #e60000 360deg
    );
  }
  96% {
    background: conic-gradient(
      from 0deg,
      rgb(208, 207, 207) 0deg,
      rgb(208, 207, 207) 331.2deg,
      #e60000 331.2deg,
      #e60000 360deg
    );
  }
  97% {
    background: conic-gradient(
      from 0deg,
      rgb(208, 207, 207) 0deg,
      rgb(208, 207, 207) 338.4deg,
      #e60000 338.4deg,
      #e60000 360deg
    );
  }
  98% {
    background: conic-gradient(
      from 0deg,
      rgb(208, 207, 207) 0deg,
      rgb(208, 207, 207) 345.6deg,
      #e60000 345.6deg,
      #e60000 360deg
    );
  }
  99% {
    background: conic-gradient(
      from 0deg,
      rgb(208, 207, 207) 0deg,
      rgb(208, 207, 207) 352.8deg,
      #e60000 352.8deg,
      #e60000 360deg
    );
  }
  100% {
    background: conic-gradient(
      from 0deg,
      rgb(208, 207, 207) 0deg,
      rgb(208, 207, 207) 360deg,
      #e60000 360deg,
      #e60000 360deg
    );
  }
}
.search-container i {
  font-size: 18px;
  color: #e60000;
  margin-left: 0;
  margin-right: 10px;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
  z-index: 0;
}
.search-two {
  display: flex;
  justify-content: flex-start;
  box-sizing: border-box;
  padding: 8px 12px;
  border: none;
  outline: none;
  background-color: transparent;
  font-size: 18px;
  font-weight: 400;
  width: 100%;
  text-align: left;
}
@keyframes lampeggia-placeholder {
  0% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
  100% {
    opacity: 1;
  }
}

.search-two::placeholder {
  font-size: 20px;
  text-align: left;
  color: #333333;
  font-weight: 400;
  /*
  animation: lampeggia-placeholder 2.5s infinite;
  */
}

/* Override per mobile - assicura che gli stili mobile abbiano priorità */
@media (max-width: 768px) {
  .search-two::placeholder {
    font-size: 16px !important;
    font-weight: 400 !important;
  }
}
.search-two:focus {
  outline: none;
  border-color: #ccc;
}

.buttons-container {
  display: flex;
  flex-direction: row;
  gap: 10px;
  width: 100%;
  height: 100%;
  min-height: 100%;
  max-height: 100%;
  box-sizing: border-box;
  padding: 0;
  margin: 0;
}

.open-search {
  /*
  display: flex;
  position: absolute;
  right: calc(22.5% - 45px);
  margin-right: 5px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-sizing: border-box;
  border: 3px #0080ff solid;
  border-radius: 50px;
  padding: 6px;
  animation: lampeggia-lente 2s infinite;
  z-index: 2001;
  */
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  cursor: pointer;
  box-sizing: border-box;
  height: 100%;
  min-height: 100%;
  width: 40%;
  transition: all 0.3s ease;
}

.open-search a {
  width: 100%;
  height: 100%;
  text-decoration: none;
  color: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
}

.open-search a:hover {
  text-decoration: none;
  color: inherit;
}

.open-search-btn {
  background: linear-gradient(135deg, #e60000 0%, #cc0000 100%);
  color: #ffffff;
  border: none;
  border-radius: 12px;
  width: 100%;
  height: 60px;
  font-size: 18px;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(230, 0, 0, 0);
  transition: all 0.3s ease;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.ai-search-button {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  cursor: pointer;
  box-sizing: border-box;
  height: auto;
  width: 40%;
  transition: all 0.3s ease;
  position: relative;
}

.ai-voice-search-button {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  cursor: pointer;
  box-sizing: border-box;
  height: auto;
  width: 20%;
  transition: all 0.3s ease;
  position: relative;
}

.ai-search-btn {
  background: linear-gradient(135deg, #3a8dde 0%, #005bea 100%);
  color: #ffffff;
  border: none;
  border-radius: 12px;
  width: 100%;
  height: 60px;
  font-size: 18px;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(58, 141, 222, 0.3);
  transition: all 0.3s ease;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  gap: 8px;
}

.ai-search-btn i {
  font-size: 18px;
  animation: pulse 2s infinite;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

/* AI Search Corner Icon per il nuovo bottone */
.ai-search-button .ai-search-corner-icon {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 28px;
  height: 28px;
  background: white;
  border: 2px solid #3a8dde;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  z-index: 995;
  transition: all 0.3s ease;
  pointer-events: none;
}

.ai-search-button:hover .ai-search-corner-icon {
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.ai-search-button .ai-search-corner-icon i {
  color: #3a8dde;
  font-size: 12px;
  font-weight: 600;
}

.open-search:hover {
  transform: translateY(-2px);
}

.open-search:hover .open-search-btn {
  box-shadow: 0 6px 20px rgba(230, 0, 0, 0.4);
  transform: scale(1.02);
}

.open-search:active {
  transform: translateY(0);
}

.open-search:active .open-search-btn {
  transform: scale(0.98);
  box-shadow: 0 2px 8px rgba(230, 0, 0, 0.3);
}

.ai-search-button:hover {
  transform: translateY(-2px);
}

.ai-search-button:hover .ai-search-btn {
  box-shadow: 0 6px 20px rgba(58, 141, 222, 0.4);
  transform: scale(1.02);
}

.ai-search-button:hover .ai-text-banner {
  opacity: 1;
  visibility: visible;
  transform: translate(0%, 50%);
  pointer-events: none;
}

.ai-search-button:active {
  transform: translateY(0);
}

.ai-search-button:active .ai-search-btn {
  transform: scale(0.98);
  box-shadow: 0 2px 8px rgba(58, 141, 222, 0.3);
}

.ai-search-button:active .ai-text-banner {
  opacity: 0;
  visibility: hidden;
}

.ai-voice-search-btn {
  background: linear-gradient(135deg, #e60000 0%, #c82333 100%);
  color: #ffffff;
  border: none;
  border-radius: 12px;
  width: 100%;
  height: 60px;
  font-size: 16px;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(230, 0, 0, 0.3);
  transition: all 0.3s ease;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  gap: 8px;
}

.ai-voice-search-btn i {
  font-size: 20px;
  animation: pulse 2s infinite;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.ai-voice-search-button .ai-voice-search-corner-icon {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 28px;
  height: 28px;
  background: white;
  border: 2px solid #e60000;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  z-index: 995;
  transition: all 0.3s ease;
  pointer-events: none;
}

.ai-voice-search-button:hover .ai-voice-search-corner-icon {
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.ai-voice-search-button .ai-voice-search-corner-icon i {
  color: #e60000;
  font-size: 12px;
  font-weight: 600;
}

.ai-voice-search-button:hover {
  transform: translateY(-2px);
}

.ai-voice-search-button:hover .ai-voice-search-btn {
  box-shadow: 0 6px 20px rgba(230, 0, 0, 0.4);
  transform: scale(1.02);
}

.ai-voice-search-button:active {
  transform: translateY(0);
}

.ai-voice-search-button:active .ai-voice-search-btn {
  transform: scale(0.98);
  box-shadow: 0 2px 8px rgba(230, 0, 0, 0.3);
}

.open-search i {
  font-size: 16px;
  color: #ffffff;
  margin: auto;
  transition: all 0.3s ease;
}

.open-search:hover i {
  transform: scale(1.1);
}

.open-search-btn .btn-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.open-search-btn span {
  display: inline-block;
}

.open-search-btn i {
  font-size: 18px;
  color: #ffffff;
  transition: all 0.3s ease;
}

.open-search:hover .open-search-btn i {
  transform: scale(1.1);
}

@keyframes lampeggia-lente {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(0.9);
  }
  100% {
    transform: scale(1);
  }
}

.triangle-left,
.triangle-right {
  display: none;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 25px;
  color: #f9f9f9;
  cursor: pointer;
  z-index: 2001;
  transition: all 0.2s ease;
}
.triangle-left:hover,
.triangle-right:hover {
  /*color: #09bd00;*/
  color: #e60000;
  transform: translateY(-50%) scale(1.2);
}
.triangle-left {
  left: 12%;
}
.triangle-right {
  right: 12%;
}

.ricerca-titolo {
  position: absolute;
  color: #000000;
  font-size: 22px;
  left: 50%;
  top: 0;
  transform: translateX(-50%);
  font-weight: 400;
  margin-top: 15px;
}
.back-bottone {
  margin-left: 0px;
  z-index: 990;
  padding: 0px;
  border-radius: 100%;
  border: 0.5px solid #dcdcdc;
  box-shadow: 0px 0px 10px rgba(34, 34, 34, 0.15);
  transition: all 0.3s ease;
  aspect-ratio: 1/1;
  min-width: 40px;
}
.back-bottone:hover {
  transform: translateX(-5px);
}
.back-bottone-btn {
  background-color: #f7f7f700;
  color: #343434;
  border: none;
  border-radius: 100%;
  min-width: 40px;
  padding: 10px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  aspect-ratio: 1/1;
}

.pre-filtri {
  position: relative;
  justify-content: center;
  margin: 0px auto 0px auto;
  padding: 10px;
  display: flex;
  flex-direction: row;
  align-items: center;
  flex-wrap: wrap;

  border: 0.5px rgb(220, 220, 220) solid;
  background-color: #f7f7f7;
  box-shadow: 0px 0px 10px rgba(87, 87, 87, 0.15);
  border-radius: 0px;
  z-index: 990;
  max-width: 100%;
  box-sizing: border-box;
  width: 100%;
}
#risultati-titolo {
  margin: 0px auto 0px auto;
  display: none;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: auto;
  max-width: 100%;
  white-space: nowrap;
  padding: 5px 10px 5px 10px;
  font-weight: 400;
  background-color: #f7f7f7;
  border: none;
  border-radius: 2px;
  font-size: 16px;
  font-weight: 400;
  color: #1e1e1e;
  box-sizing: border-box;
}

.ordina-container {
  display: flex;
  margin-right: auto;
  margin-left: 10px;
  flex-wrap: wrap;
  padding-bottom: 0px;
  align-items: center;
  justify-content: center;
  border-radius: 5px;
  width: auto !important;
  white-space: nowrap;
  flex-wrap: nowrap;
}

.reset-btn {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: auto 0px auto auto;
  padding: 8px 10px;
  border: none;
  color: #ffffff;
  background-color: #e60000;
  border-radius: 10px;
  font-size: 14px;
  cursor: pointer;
  height: 100%;
  min-width: 100px;
  flex-wrap: nowrap;
}
.reset-btn:hover {
  transform: scale(1.02);
}
.reset-btn.attiva {
  background-color: #e60000;
  color: #ffffff;
  border: none;
}
.reset-btn.non-attiva {
  background-color: #ffffff;
}

.main-elenco {
  overflow-x: hidden;
  width: 45%;
  margin: 0px 0px 0px auto;
  padding: 0px;
  overflow-x: visible; /* Prevent horizontal scroll */
  /*border-bottom: 1px rgb(220, 220, 220) solid;
  border-top: 1px rgb(220, 220, 220) solid;*/
  height: 100%;
  flex: 1;
  overflow-y: auto;
  box-sizing: border-box;
  position: relative;
  z-index: 800; /* Lower than main-section and filtri elements */
  min-height: calc(100vh - 150px);
  box-shadow: 0px 0px 15px rgba(87, 87, 87, 0.35);
  /* Scrollbar a sinistra usando direction: rtl sul contenitore scrollabile */
  direction: rtl;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Wrapper interno per ripristinare la direzione normale del contenuto */
.main-elenco > * {
  direction: ltr;
}

.main-elenco ul {
  padding-left: 60px;
  padding-right: 60px;
  box-sizing: border-box;
  list-style-type: none;
  gap: 20px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: start;
  width: 100%;
  max-width: 100%;
  min-height: calc(100vh - 150px);
}

.main-elenco ul li {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  height: 100%;
  display: flex;
  min-width: 0;
}

/* Forza le colonne del grid ad avere larghezza fissa */
.main-elenco ul > * {
  min-width: 0;
  max-width: 100%;
}

.main-elenco ul li button {
  position: relative;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: stretch;
  text-align: left;
  padding: 0px;
  /*
  background: #fcfcfc;*/
  background: transparent;
  border: none;
  cursor: pointer;
  flex-wrap: wrap;
  border-radius: 10px;
  transition:
    transform 0.1s ease,
    box-shadow 0.1s ease;
  transform: translateY(-1px); /* Leggero sollevamento al passaggio del mouse */
  min-width: 0;
  flex: 1;
}
.main-elenco ul li button:hover {
  transform: translateY(-3px);
}
/* Effetto clic */
.main-elenco ul li button:active {
  transform: scale(0.99);
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.profilo-riga {
  display: flex;
  justify-content: space-between;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  flex-wrap: wrap;
  align-items: flex-start;
  min-width: 0; /* Allow content to shrink */
  margin-bottom: 0px;
  /*border: 1px solid #ff0000;*/
  z-index: 902;
}

.profilo-header {
  display: flex;
  position: relative;
  height: 60%;
  top: 0%;
  justify-content: space-between;
  width: 100%;
  align-items: center;
  gap: 0.5rem;
  min-width: 0; /* Allow content to shrink */
  margin-bottom: 0px;
  /*border: 1px solid #0000ff;*/
  overflow: hidden;
}

.profilo-nome {
  position: relative;
  z-index: 903;
  margin-left: 5px;
  margin-top: 0px;
  font-size: 18px;
  font-weight: 400;
  color: #000000;
  margin-bottom: 0px;
  flex: 1 1 auto;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  /*border: 1px solid #00ff00;*/
}

.preview-heart {
  font-size: 18px;
  cursor: pointer;
  color: #b6b6b6;
  /*text-shadow:
    1px 0 red,
    -1px 0 red,
    0 1.5px red,
    0 -1px red;*/
  transition:
    color 0.2s ease,
    transform 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 904;
}

.preview-heart:hover {
  transform: scale(1.05);
}

.preview-heart.favorito {
  color: red;
  text-shadow: none;
}

.rating-preview {
  position: absolute;
  right: 0%;
  margin-right: 50px;
  font-size: 18px;
  color: #2c2c2c;
  display: flex;
  align-items: center;
  gap: 4px;
}

.rating-preview i {
  color: #ffbb00;
  font-size: 18px;
}

.profilo-avatar {
  position: absolute;
  max-width: 100%;
  min-width: 100%;
  box-sizing: border-box;
  object-fit: cover;
  border-radius: 10px;
  top: 0%;
  left: 50%;
  transform: translateX(-50%);
  flex-shrink: 0;
  z-index: 901;
}

.profilo-body {
  position: relative;
  width: 100%;
  min-width: 0;
  height: 40%;
  border-top: 0.5px solid #b4b4b4;
  /*border: 1px solid #ff00ff;*/
}

.profilo-anteprima {
  font-size: 0.85rem;
  font-weight: 300;
  color: #666;
  margin-top: 0px;
  margin-left: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  /*border: 1px solid #00eeff;*/
}

.profilo-descrizione {
  display: -webkit-box;
  -webkit-line-clamp: 2; /* Limita a 2 righe */
  line-clamp: 2; /* Limita a 2 righe */
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  box-sizing: border-box;
  font-size: 0.85rem;
  margin: 10px 40px 0px 15px;
  color: #444;
  /*border: 1px solid #ffff00;*/
}

.filtri-profilo {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
  margin-bottom: 5px;
  margin-left: 10px;
  font-size: 0.85rem;
  color: #397895;
}
.profilo-foto-lavori {
  display: none;
  width: 100%;
  box-sizing: border-box;
  gap: 0px;
  margin-top: 15px;
  flex-wrap: nowrap;
  padding-bottom: 0px;
  justify-content: space-between;
  overflow: hidden;
}

.profilo-foto-lavori img {
  aspect-ratio: 1;
  width: 33.33%;
  min-width: 33.33%;
  max-width: 33.33%;
  border-radius: 0px;
  object-fit: cover;
  flex: 1;
  border: 0.1px solid #767676;
  box-sizing: border-box;
}
.profilo-foto-lavori img:first-child {
  border-bottom-left-radius: 8px;
}
.profilo-foto-lavori img:last-child {
  border-bottom-right-radius: 8px;
}

/* Stili per la scheda profilo sono ora in scheda-profilo.css */

.info {
  display: flex;
  flex-direction: row;
  align-items: center;
  margin-bottom: 0px;
  padding-bottom: 0;
  justify-content: center;
  width: 25%;
}

.info-a {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  text-align: center;
  transform: none;
  padding: 0;
  margin-top: 20px;
}
.info-b {
  flex-shrink: 0;
  display: flex;
  justify-content: center;
  box-sizing: border-box;
  max-width: 100%;
  max-height: 100%;
  width: 100%;
  height: 100%;
}
.info-tit {
  margin: 0 0 15px 0;
  font-size: 18px;
  font-weight: 600;
  color: #e60000;
  border-bottom: 2px solid #e60000;
  padding-bottom: 8px;
  display: inline-block;
  text-align: left !important;
}
.info-bio {
  margin: 0 0 12px 0;
  font-size: 16px;
  line-height: 1.5;
}

.foto-profilo {
  margin-top: 0;
  margin-left: 0;
  max-height: 260px;
  aspect-ratio: 1;
  border-radius: 50%;
  border: none;
  box-sizing: border-box;
  object-fit: cover;
  border: 0.5px solid #787878;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.foto-profilo:hover {
  transform: scale(1.03);
}

.intestazione-container {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: center;
  box-sizing: border-box;
  max-width: 100%;
  width: 100%;
  height: 100%;
  position: relative;
  margin: 0;
  padding: 0;
  gap: 10px;
}

.sezione-info {
  position: relative;
  margin: 0;
  padding: 20px;
  border-radius: 12px;
  box-sizing: border-box;
  overflow-wrap: break-word;
  background-color: white;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
  border: 1px solid #e1e4e8;
  max-width: 100%;
  width: 100%;
  height: 100%;
  min-height: min-content;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.sezione-info:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

#sezione-info-uno {
  text-align: center;
  width: 25%;
}
.info-bio-container {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  width: 100%;
  gap: 40px;
}
#sezione-info-due {
  width: 25%;
}
#sezione-info-tre {
  width: 25%;
  overflow-y: auto;
}
#sezione-info-quattro {
  height: auto;
  width: 100%;
}

.info-testo {
  text-align: left;
  margin: 0;
  display: flex;
  justify-content: flex-start;
  padding-top: 0;
  padding-left: 0;
}

.info-testo ul {
  margin: 0;
  padding-left: 0;
  list-style-position: inside;
  width: 100%;
  list-style-type: none;
}

.info-testo li {
  list-style-position: inside;
  text-indent: 0;
  padding-left: 0;
  margin-bottom: 8px;
  padding: 8px 12px;
  background-color: #f8f9fa;
  border-radius: 6px;
  transition: background-color 0.2s ease;
  font-weight: 400px;
}

.info-testo li:hover {
  background-color: #e9ecef;
}

.info-descrizione {
  margin: 0;
  line-height: 1.6;
  color: #444;
  font-size: 16px;
  position: relative;
}

.desc-content {
  display: block;
}

.info-descrizione.collapsed .desc-content {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 5px;
}

.expand-btn {
  color: #0080f0;
  cursor: pointer;
  display: inline-block;
  margin-left: 0px;
  font-size: 14px;
  font-weight: 500;
}

.expand-btn:hover {
  text-decoration: underline;
}

.contatto-container {
  display: flex;
  gap: 8px;
  margin: auto auto 0px auto;
  padding: 5px;
  background-color: #f8f9fa;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  width: auto;
  max-width: 100%;
  box-sizing: border-box;
  justify-content: center;
  border: 1px solid #e1e4e8;
}
.chiama-btn,
.chat-btn {
  font-size: 16px;
  background-color: #0080f0;
  border-radius: 8px;
  border: none;
  color: white;
  padding: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: none;
  align-items: center;
  justify-content: center;
  font-weight: 500;
  box-shadow: 0 2px 6px rgba(0, 128, 240, 0.3);
}

.chiama-btn {
  background-color: #28a745;
  box-shadow: 0 2px 6px rgba(40, 167, 69, 0.3);
}

.chiama-btn:hover,
.chat-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.chiama-btn:hover {
  background-color: #218838;
}

.chat-btn:hover {
  background-color: #0069d9;
}

.chiama-btn:active,
.chat-btn:active {
  transform: translateY(1px);
}

.chiama-btn i,
.chat-btn i {
  margin-right: 8px;
}

#telefono {
  display: none;
}
.galleria {
  width: 100%;
  position: relative;
  box-sizing: border-box;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0px;
  border: 0.5px solid #e4e4e4;
  border-radius: 10px;
  max-height: 300px;
  overflow: hidden;
}
.galleria img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 0px;
  border: 0.5px solid #d7d7d7;
  box-sizing: border-box;
  cursor: pointer;
  transition: transform 0.2s ease;
}
.galleria img:hover {
  transform: scale(1.02);
}

.galleria-overlay {
  position: absolute;
  top: 0;
  left: 80%;
  width: 20%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  color: white;
  font-size: 16px;
  font-weight: 500;
  text-align: center;
  transition: background-color 0.2s ease;
}

.galleria-overlay:hover {
  background-color: rgba(0, 0, 0, 0.8);
}

.galleria-grid-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  z-index: 2500;
  padding: 40px;
  box-sizing: border-box;
  overflow-y: auto;
}

.galleria-grid-overlay.active {
  display: block;
}

.galleria-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.galleria-grid img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.galleria-grid img:hover {
  transform: scale(1.02);
}

.galleria-grid-close {
  position: fixed;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  color: white;
  font-size: 30px;
  cursor: pointer;
  padding: 10px;
  z-index: 2600;
}

.galleria-overlay {
  position: absolute;
  top: 0;
  right: 0;
  width: 20%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  color: white;
  font-size: 16px;
  font-weight: 500;
  text-align: center;
  transition: background-color 0.2s ease;
}

.galleria-overlay:hover {
  background-color: rgba(0, 0, 0, 0.8);
}

/* === Sistema Recensioni === */
.reviews-panel {
  margin: 0px auto;
  width: 65%;
  position: relative;
  box-sizing: border-box;
  flex-shrink: 0;
  background-color: #ffffff;
  border: 1px solid #e1e4e8;
  border-radius: 10px;
  box-shadow: 0 0px 10px rgba(0, 0, 0, 0.05);
}

.reviews-container {
  width: 100%;
  position: relative;
  box-sizing: border-box;
  border-radius: 10px;
}

.reviews-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  border-bottom: 1px solid #eee;
  border-radius: 10px 10px 0px 0px;
  background-color: #e60000;
  color: white;
}

.reviews-title {
  margin: 0px;
  font-size: 16px;
  font-weight: 500;
}

.reviews-controls-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 20px 0;
  padding: 0 10px;
}

.reviews-sort-select {
  background: #f8f9fa;
  border: 1px solid #e1e4e8;
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 14px;
  color: #586069;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 180px;
}

.reviews-sort-select:hover {
  background: #e1e4e8;
  border-color: #d1d5da;
}

.reviews-sort-select:focus {
  outline: none;
  background: #fff;
  border-color: #007bff;
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.add-review-btn-container {
  display: flex;
  justify-content: flex-end;
}

.close-reviews {
  background: none;
  border: none;
  font-size: 28px;
  color: white;
  cursor: pointer;
  padding: 0 8px;
}

.reviews-content {
  width: 100%;
  position: relative;
  box-sizing: border-box;
}

.reviews-summary {
  display: flex;
  justify-content: center;
  margin-top: 20px;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid #eee;
}

.rating-summary {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.rating-average {
  font-size: 42px;
  font-weight: 600;
  color: #333;
  line-height: 1;
  margin-bottom: 5px;
}

.stars-container {
  position: relative;
  display: inline-block;
  font-size: 24px;
  line-height: 1;
  height: 24px;
  margin-bottom: 8px;
}

.stars-outline {
  color: #ddd;
  font-size: 1.5rem !important;
}

.stars-outline span {
  font-size: 1.5rem !important;
  line-height: 1;
  display: inline-block;
}

.stars-outline-tab {
  font-size: 1.5rem !important;
}

.stars-outline-tab span {
  font-size: 1.5rem !important;
  line-height: 1 !important;
  display: inline-block !important;
}

.rating-star {
  transform: translateY(-2px) !important;
}

.stars-filled {
  position: absolute;
  top: 0;
  left: 0;
  white-space: nowrap;
  overflow: hidden;
  color: #ffd700;
}

.review-count {
  font-size: 14px;
  color: #777;
}

.reviews-list {
  width: 100%;
  position: relative;
  box-sizing: border-box;
  z-index: 1;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.reviews-list-container {
  position: relative;
  width: 100%;
}

.reviews-list.collapsed {
  max-height: 280px; /* Altezza per circa 2 card di recensione */
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.reviews-list.expanded {
  max-height: 280px; /* Mantiene la stessa altezza fissa */
  overflow-y: auto; /* Abilita lo scroll verticale */
  overflow-x: hidden;
  transition: overflow-y 0.3s ease;
}

/* Stile per la scrollbar personalizzata */
.reviews-list.expanded::-webkit-scrollbar {
  width: 6px;
}

.reviews-list.expanded::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

.reviews-list.expanded::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 3px;
}

.reviews-list.expanded::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

.reviews-expand-container {
  display: flex;
  justify-content: center;
  padding: 15px 0;
  border-top: 1px solid #eee;
  background: linear-gradient(to bottom, transparent, #fff 20%);
  margin-top: -10px;
}

.reviews-expand-btn {
  background: #f8f9fa;
  border: 1px solid #e1e4e8;
  border-radius: 6px;
  padding: 8px 16px;
  font-size: 14px;
  color: #586069;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.reviews-expand-btn:hover {
  background: #e1e4e8;
  border-color: #d1d5da;
  color: #24292e;
}

.reviews-expand-btn.expanded {
  background: #e1e4e8;
}

.reviews-expand-btn.expanded i {
  transform: rotate(180deg);
}

.reviews-expand-btn i {
  transition: transform 0.2s ease;
  font-size: 12px;
}

.review-item {
  padding: 15px;
  border-radius: 6px;
  border: 1px solid #eaeaea;
  background-color: #f9f9f9;
  z-index: 1;
}

.review-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
}

.review-title {
  font-weight: 600;
  margin: 0;
  font-size: 16px;
}

.review-rating {
  color: #ffd700;
  font-size: 16px;
}

.review-date {
  font-size: 12px;
  color: #888;
  margin-bottom: 8px;
}

.review-author {
  font-weight: 500;
  font-size: 14px;
  color: #444;
  margin-bottom: 8px;
}

.review-text {
  font-size: 14px;
  color: #333;
  line-height: 1.4;
}

.add-review-btn {
  background-color: #0080ff;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s;
}

.add-review-btn:hover {
  background-color: #0066cc;
}

.review-form-container {
  position: relative;
  top: 0px;
  padding: 20px;
  border-top: 1px solid #eee;
  border-radius: 0px 0px 10px 10px;
  margin-top: -100px;
  box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);
  background-color: #ffffff;
  z-index: 1000;
}

.review-form-container h4 {
  margin-top: 0;
  margin-bottom: 15px;
  font-size: 18px;
}

.form-group {
  margin-bottom: 15px;
  max-width: 100%;
  box-sizing: border-box;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: 500;
}

.form-group input,
.form-group textarea {
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
  margin: 0px auto;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
}

.form-group textarea {
  height: 120px;
  resize: vertical;
}

.char-count {
  display: block;
  text-align: right;
  font-size: 12px;
  color: #888;
  margin-top: 4px;
}

.rating-select {
  display: flex;
  gap: 8px;
  font-size: 24px;
  color: #ddd;
  margin-bottom: 10px;
}

.rating-select .star {
  cursor: pointer;
  transition: color 0.2s;
}

.rating-select .star:hover,
.rating-select .star.selected {
  color: #ffd700;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

.cancel-review,
.submit-review {
  padding: 10px 20px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}

.cancel-review {
  background-color: #f2f2f2;
  border: 1px solid #ddd;
  color: #333;
}

.submit-review {
  background-color: #0080ff;
  border: none;
  color: white;
}

.cancel-review:hover {
  background-color: #e6e6e6;
}

.submit-review:hover {
  background-color: #0066cc;
}

.no-reviews-message {
  text-align: center;
  padding: 30px 0;
  color: #888;
  font-style: italic;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .scroll-arrows-container {
    gap: 20px;
    bottom: 3%;
  }

  .scroll-down-arrow {
    font-size: 2em !important;
  }

  .scroll-arrow-text {
    font-size: 0.45em !important;
  }

  .reviews-container {
    width: 95%;
  }

  .reviews-content {
    padding: 10px;
  }

  .rating-average {
    font-size: 36px;
  }

  .stars-container {
    font-size: 20px;
  }

  .form-actions {
    flex-direction: column;
    gap: 10px;
  }

  .cancel-review,
  .submit-review {
    width: 100%;
  }

  .reviews-controls-row {
    flex-direction: column;
    gap: 15px;
    align-items: stretch;
  }

  .reviews-sort-select {
    min-width: auto;
    width: 100%;
  }

  .add-review-btn-container {
    justify-content: center;
  }
}

/* Elenchi pubblicitari */
.elenchi-pubblicitari {
  display: none;
  overflow: hidden;
  max-height: 100%;
  max-width: 100%;
  padding-top: 0px;
  /*border: #14a503a7 2px solid;*/
  border-radius: 5px;
  margin-bottom: 0px;
  background-color: #e8e8e800;
  box-sizing: border-box;
}
.elenchi-pubblicitari:hover {
  transform: translateY(-1px);
  box-shadow: 0px 0px 10px rgba(87, 87, 87, 0.15);
} /*
.pubblicitario-tit {
  max-width: 100%;
  margin: 0px 0px;
  padding: 10px 10px;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  position: relative;
  background-color: #14a503a7;
  box-sizing: border-box;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
  min-width: 0; 
}*/
.lista-annunci {
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  gap: 0px;
  list-style-type: none;
  padding: 2px 10px;
  margin: 0px;
  overflow-y: auto;
  max-height: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.annuncio-pubblicitario a {
  display: block;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  text-decoration: none;
  color: inherit;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
.annuncio-pubblicitario {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  position: relative;
  padding: 10px;
  border: 1px solid #b9b9b9;
  border-radius: 5px;
  background-color: #ffffff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
  height: 197px;
  margin: 0px 5px;
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
  animation: fadeIn 0.5s ease-in;
  word-break: break-word; /* evita che parole lunghe forzino la larghezza */
}

.annuncio-pubblicitario:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.annuncio-contenuto {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  height: 100%;
  box-sizing: border-box;
  max-width: 100%;
}

.annuncio-immagine {
  position: absolute;
  bottom: 0;
  margin: 0;
  margin-bottom: 10px;
  box-sizing: border-box;
  max-width: 90%;
  width: 90%;
  height: 50%;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid #eee;
  overflow: hidden;
}

.annuncio-info {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  overflow: hidden;
  box-sizing: border-box;
  max-width: 100%;
}

.annuncio-sponsored {
  display: inline-block;
  font-size: 10px;
  color: #888;
  margin-bottom: 2px;
  margin-top: 0px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-sizing: border-box;
  max-width: 100%;
}

.annuncio-titolo {
  margin: 10px 0 5px 0;
  font-size: 14px;
  font-weight: 500;
  color: #333;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-sizing: border-box;
  min-width: 0;
}

.annuncio-descrizione {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0;
  font-size: 12px;
  color: #666;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  box-sizing: border-box;
  max-width: 100%;
}
.blu {
  color: #b7e8ff;
}
#map {
  width: 100%;
  height: 100%;
  border-radius: 0px 0px 10px 10px;
  /*box-shadow: 0px 0px 15px rgba(87, 87, 87, 0.15);*/
  display: flex;
  margin: 0px auto;
  padding: 0px;
  box-sizing: border-box;
  transition:
    width 0.4s cubic-bezier(0.4, 0, 0.2, 1),
    height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Stile sfocato per la sezione principale */
.sfocato {
  filter: blur(3px);
  transition: filter 0.3s ease;
}

/* Stili per la tabella in sovrimpressione */
.profili-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.4);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2000;
  overflow: hidden;
}

.tabella-container {
  width: 90%;
  max-width: 1000px;
  max-height: 85vh;
  background-color: white;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.tabella-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  background-color: #0080f0;
  color: white;
  border-bottom: 1px solid #0056a3;
}

.tabella-header h3 {
  margin: 0;
  font-size: 22px;
  font-weight: 500;
}

.chiudi-tabella {
  background: none;
  border: none;
  font-size: 25px;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 25px;
  height: 25px;
  padding: 0px;
  border-radius: 50%;
  transition: background-color 0.2s;
  line-height: 25px;
}
.profili-griglia {
  display: grid;
  grid-template-columns: repeat(auto-fill, 200px);
  gap: 20px;
  padding: 20px;
  overflow-y: auto;
  max-height: calc(85vh - 60px);
}

.profilo-griglia {
  display: flex;
  flex-direction: column;
}

.scheda-griglia {
  display: flex;
  flex-direction: column;
  background-color: #fcfcfc;
  border-radius: 10px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  position: relative;
  border: 1px solid #ddd;
  cursor: pointer;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
  height: 200px;
  min-height: 200px;
  width: 200px;
}

.scheda-griglia:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.scheda-griglia .numero-scheda {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 30px;
  height: 30px;
  font-size: 16px;
  background: #007bff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  color: #ffffff;
  z-index: 2;
}

.scheda-griglia .nome-scheda {
  font-size: 16px;
  padding: 5px 10px;
}

.scheda-griglia .tipo-attivita {
  font-size: 14px;
  padding: 0px 10px 10px;
}

.scheda-griglia .foto-scheda-container {
  margin-top: auto;
  height: 80px;
}

.scheda-griglia .foto-scheda,
.scheda-griglia .foto-placeholder {
  height: 100%;
}

.messaggio-limite {
  text-align: center;
  padding: 10px;
  background-color: #f8f8f8;
  color: #666;
  font-size: 20px;
  border-bottom: 1px solid #ddd;
  margin-bottom: 10px;
}

/* Stili per il visualizzatore di immagini */
.image-viewer-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  z-index: 2600;
  justify-content: center;
  align-items: center;
}

.image-viewer-overlay.active {
  display: flex;
}

.image-viewer-container {
  position: relative;
  max-width: 90%;
  max-height: 90vh;
  margin: 0 60px; /* Aggiunto margine per fare spazio ai pulsanti di navigazione */
}

.viewer-image {
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
}

.viewer-close {
  position: fixed; /* Cambiato da absolute a fixed */
  top: 20px;
  right: 20px;
  color: white;
  font-size: 30px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 10px;
  z-index: 2600; /* Assicura che sia sopra all'immagine */
}

.viewer-nav {
  position: fixed; /* Cambiato da absolute a fixed */
  top: 50%;
  transform: translateY(-50%);
  color: white;
  font-size: 40px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  padding: 20px 15px;
  transition: background-color 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2600; /* Assicura che sia sopra all'immagine */
}

.viewer-nav:hover {
  background: rgba(255, 255, 255, 0.2);
}

.viewer-prev {
  left: 20px; /* Modificato per una posizione fissa dal bordo */
  border-radius: 0 5px 5px 0;
}

.viewer-next {
  right: 20px; /* Modificato per una posizione fissa dal bordo */
  border-radius: 5px 0 0 5px;
}

.chiudi-tabella:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

/* Stili per il form di richiesta */
.request-form-container {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  max-width: 500px;
  background-color: white;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  z-index: 3000;
}

.request-form-container h4 {
  margin: 0 0 20px 0;
  font-size: 20px;
  color: #333;
}

.request-form-container .form-group {
  margin-bottom: 15px;
}

.request-form-container label {
  display: block;
  margin-bottom: 5px;
  color: #555;
}

.request-form-container textarea {
  width: 100%;
  min-height: 100px;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 5px;
  resize: vertical;
  font-family: inherit;
}

.request-form-container .char-count {
  display: block;
  text-align: right;
  color: #666;
  font-size: 12px;
  margin-top: 5px;
}

.request-form-container .form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

.request-form-container button {
  padding: 8px 16px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.2s;
}

.request-form-container .cancel-request {
  background-color: #e0e0e0;
  color: #333;
}

.request-form-container .submit-request {
  background-color: #0080f0;
  color: white;
}

.request-form-container .cancel-request:hover {
  background-color: #d0d0d0;
}

.request-form-container .submit-request:hover {
  background-color: #0070d0;
}

/* Stili per il bottone di richiesta */
.richiesta-btn {
  background-color: #0080f0;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: background-color 0.2s;
}

.richiesta-btn:hover {
  background-color: #0070d0;
}

.richiesta-btn i {
  font-size: 16px;
}

/* Rimuovi le regole duplicate */
.elemento-laterale,
.elemento-laterale.nascosto,
.elemento-laterale.attivo {
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  perspective: 1000px;
  -webkit-perspective: 1000px;
}

.profilo-elenco-verticale {
  display: flex;
  align-items: flex-start;
  gap: 32px;
  width: 100%;
  padding: 20px 20px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.07);
  transition: box-shadow 0.2s;
  min-height: 136px;
}
.profilo-elenco-verticale:hover {
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.13);
}
.profilo-foto-verticale {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #e1e4e8;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  flex-shrink: 0;
}
.profilo-info-verticale {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}
.profilo-header-verticale {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
}
.profilo-nome-verticale {
  display: flex;
  align-items: center;
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.1;
}
.nominativo .profilo-nome-verticale {
  font-size: 35px !important;
}

.verified-badge {
  display: inline-flex;
  align-items: center;
  margin-left: 6px;
  margin-bottom: 0;
  height: 20px;
}
.verified-badge svg {
  display: block;
  height: 20px;
  width: 20px;
}
.profilo-rating-verticale {
  color: #ffbb00;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  gap: 2px;
}
.profilo-cat-luogo {
  display: flex;
  gap: 20px;
  font-size: 1.15rem;
  color: #555;
}
.profilo-descrizione-verticale {
  font-size: 1.15rem;
  color: #444;
  margin-top: 2px;
  margin-bottom: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}
.profilo-filtri-attivi {
  font-size: 1rem !important;
  color: #1c539f !important;
  font-weight: 500;
  margin-top: 8px;
  line-height: 1.3;
}

.profilo-filtri-attivi span {
  font-weight: 500;
}

.profilo-servizi-verticale {
  font-size: 1rem;
  color: #397895;
  margin-top: 2px;
  display: flex;
  flex-wrap: wrap;
  gap: 1em;
}

.profilo-elenco-verticale {
  padding-left: 20px;
  padding-right: 20px;
}

.report-profile-btn {
  position: absolute;
  top: 0px;
  right: 20px;
  z-index: 20;
  background: #fff;
  color: #e60000;
  border: 1px solid #e60000;
  border-radius: 16px;
  padding: 6px 12px;
  font-size: 0.45em;
  font-weight: 500;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition:
    background 0.18s,
    color 0.18s,
    box-shadow 0.18s,
    transform 0.2s ease;
}
.report-profile-btn i {
  font-size: 1.1em;
  margin-right: 2px;
}
.report-profile-btn:hover {
  background: #e60000;
  color: #fff;
  box-shadow: 0 3px 12px rgba(230, 0, 0, 0.2);
  transform: scale(1.05);
}

.verified-badge svg circle {
  fill: #00bc16 !important;
}

.abbonamento-badge.plus {
  display: inline-flex;
  align-items: center;
  margin-left: 7px;
  color: #1a8dff;
  font-size: 0.9em;
}
.abbonamento-badge.premium {
  display: inline-flex;
  align-items: center;
  margin-left: 7px;
  color: #e60000;
  font-size: 0.9em;
}

.filtri span select:disabled {
  background: #f2f2f2;
  color: #b0b0b0;
  border-color: #e0e0e0;
  cursor: not-allowed;
  opacity: 0.85;
  box-shadow: none;
}

.request-form-container select#requestUrgency {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 5px;
  background-color: #fff;
  color: #333;
  font-size: 15px;
  font-family: inherit;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
  margin-top: 2px;
  margin-bottom: 2px;
  box-sizing: border-box;
}
.request-form-container select#requestUrgency:focus {
  border-color: #0080f0;
  box-shadow: 0 0 0 2px rgba(0, 128, 240, 0.08);
  outline: none;
}

/* Modal preferiti */
.favorite-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
}

.favorite-modal.active {
  display: flex;
}

.favorite-modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 9998;
}
.favorite-modal-content {
  position: relative;
  z-index: 10000;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 32px rgba(0, 0, 0, 0.18);
  padding: 32px 28px 24px 28px;
  min-width: 320px;
  max-width: 95vw;
  min-height: 120px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.favorite-modal-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  font-size: 1.7rem;
  color: #888;
  cursor: pointer;
  z-index: 3;
}
.favorite-modal-close:hover {
  color: #e60000;
}
#favorite-modal-title {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 18px;
  color: #222;
  text-align: center;
}
.favorite-modal-list {
  width: 100%;
  margin-bottom: 18px;
}
.favorite-modal-list button {
  width: 100%;
  background: #f7f7f7;
  border: 1px solid #e1e1e1;
  border-radius: 8px;
  padding: 12px 10px;
  margin-bottom: 10px;
  font-size: 1rem;
  color: #222;
  text-align: left;
  cursor: pointer;
  transition:
    background 0.18s,
    border 0.18s;
}
.favorite-modal-list button.selected,
.favorite-modal-list button:active {
  background: #007bff;
  color: #fff;
  border-color: #007bff;
}
.favorite-modal-list button:hover {
  background: #e8e8e8;
}
.favorite-modal-new {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
  width: 100%;
}
.favorite-modal-new input {
  flex: 1;
  padding: 8px 10px;
  border: 1px solid #e1e1e1;
  border-radius: 8px;
  font-size: 1rem;
}
.favorite-modal-new button {
  background: #007bff;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.18s;
}
.favorite-modal-new button:hover {
  background: #0056b3;
}
.favorite-modal-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  width: 100%;
}
.favorite-modal-actions button {
  background: #007bff;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px 18px;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.18s;
}
.favorite-modal-actions button:hover {
  background: #0056b3;
}
.favorite-modal-msg {
  color: #e60000;
  font-size: 1rem;
  margin-bottom: 10px;
  text-align: center;
}

.favorite-modal-remove-all {
  background: #e60000 !important;
  color: #fff !important;
  border: none !important;
  border-radius: 8px;
  padding: 10px 18px;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.18s;
  margin-top: 8px;
}
.favorite-modal-remove-all:hover {
  background: #b30000 !important;
}

/* Animazione rotazione per il refresh */
.refresh-rankings.spinning .fa-sync-alt {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  100% {
    transform: rotate(360deg);
  }
}

.profilo-elenco-verticale .richiesta-btn {
  width: auto !important;
  height: auto !important;
  min-width: unset !important;
  min-height: unset !important;
  background: #0080f0;
  color: #fff;
  max-width: 220px;
  max-height: 40px;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  font-size: 14px;
  border-radius: 5px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}
.profilo-elenco-verticale .richiesta-btn:hover {
  background: #0070d0;
}

.image-viewer-overlay,
.image-viewer-overlay.active,
.galleria-grid-overlay,
.galleria-grid-overlay.active {
  z-index: 11000 !important;
}

.favorite-modal-list button.selected:hover {
  background: #0068f0;
}

/* Stili per le nuove funzionalità del modal preferiti */
.favorite-modal-list button {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.favorite-modal-list button .folder-name {
  flex: 1;
  text-align: left;
}

.favorite-modal-list button .empty-indicator {
  color: #999;
  font-size: 0.85em;
  font-style: italic;
  margin-left: 8px;
}

.favorite-modal-list button .check-icon {
  color: #fff;
  font-size: 1.1em;
  margin-left: 8px;
  opacity: 0;
}

.favorite-modal-list button.selected .check-icon {
  opacity: 1;
}

/* Animazioni per le icone check */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes fadeOut {
  from {
    opacity: 1;
    transform: scale(1);
  }
  to {
    opacity: 0;
    transform: scale(0.8);
  }
}

/* Animazioni per il contatore dei preferiti */
@keyframes counterIncrease {
  0% {
    background-color: #f8f9fa;
    transform: scale(1);
  }
  50% {
    background-color: #d4edda;
    transform: scale(1.05);
  }
  100% {
    background-color: #f8f9fa;
    transform: scale(1);
  }
}

@keyframes counterDecrease {
  0% {
    background-color: #f8f9fa;
    transform: scale(1);
  }
  50% {
    background-color: #f8d7da;
    transform: scale(1.05);
  }
  100% {
    background-color: #f8f9fa;
    transform: scale(1);
  }
}
.request-form-container input[type="text"] {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 5px;
  background-color: #fff;
  color: #333;
  font-size: 15px;
  font-family: inherit;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
  margin-top: 2px;
  margin-bottom: 2px;
  box-sizing: border-box;
}

.request-form-container input[type="text"]:focus {
  border-color: #0080f0;
  box-shadow: 0 0 0 2px rgba(0, 128, 240, 0.08);
  outline: none;
}
.request-form-container input[type="text"]::placeholder {
  color: #999;
  font-style: italic;
}

.request-urgenza {
  margin-top: 8px;
  font-size: 14px;
  color: #666;
  font-weight: 500;
}

.request-address {
  margin-top: 8px;
  font-size: 14px;
  color: #666;
  font-weight: 500;
}

.request-address strong {
  font-weight: 600;
  color: #333;
}

/* Freccia torna in cima */
.scroll-to-top {
  position: fixed;
  bottom: 30px;
  left: 30px;
  width: 50px;
  height: 50px;
  background-color: #e60000;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(44, 37, 37, 0.3);
}

.scroll-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.scroll-to-top:hover {
  background-color: #b00000;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(44, 37, 37, 0.4);
}

.scroll-to-top i {
  font-size: 18px;
  font-weight: bold;
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
/* --- Freccia scroll-down galleggiante --- */
.scroll-arrows-container {
  position: absolute;
  bottom: 5%;
  left: 50%;
  transform: translateX(-25%);
  z-index: 20;
  display: none;
  gap: 40px;
  align-items: center;
}

.scroll-down-arrow {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: 2.3em;
  color: #e60000;
  opacity: 1;
  transition: opacity 0.5s;
  animation: arrow-float 1.6s ease-in-out infinite;
  cursor: pointer;
  user-select: none;
  pointer-events: auto;
}

.scroll-arrow-text {
  font-size: 0.4em;
  font-weight: 600;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-family: "Roboto", sans-serif;
  white-space: nowrap;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.scroll-down-arrow i {
  pointer-events: none;
}
@keyframes arrow-float {
  0% {
    transform: translateX(-50%) translateY(0);
  }
  50% {
    transform: translateX(-50%) translateY(16px);
  }
  100% {
    transform: translateX(-50%) translateY(0);
  }
}

/* Responsive design per la griglia delle card */
@media (max-width: 1024px) {
  .main-elenco ul {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }
}

@media (max-width: 768px) {
  .main-elenco ul {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

@media (max-width: 480px) {
  .main-elenco ul {
    padding-left: 16px;
    padding-right: 16px;
    gap: 12px;
  }
}

/* Stili per il sistema a due livelli delle categorie */
.cat h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 15px;
  color: #333;
  text-align: center;
}

.cat .header-div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding: 0 10px;
}

.cat .back-btn {
  background: none;
  border: none;
  color: #666;
  cursor: pointer;
  font-size: 16px;
  padding: 8px 15px;
  border-radius: 8px;
  transition: all 0.3s ease;
  font-weight: 500;
}

.cat .back-btn:hover {
  background: rgba(0, 0, 0, 0.05);
  color: #333;
}

.cat .no-sub-msg {
  text-align: center;
  color: #666;
  font-style: italic;
  padding: 20px;
}

/* ===== MODAL RICERCA IA ===== */
.ai-search-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.75);
  z-index: 10000;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.3s ease;
  backdrop-filter: blur(4px);
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    transform: translateY(30px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.ai-search-modal-content {
  background: #ffffff;
  border-radius: 20px;
  width: 100%;
  max-width: 800px;
  min-height: 400px;
  height: fit-content;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: slideUp 0.3s ease;
  overflow: hidden;
  transition: min-height 0.4s ease;
}

.ai-search-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 30px;
  border-bottom: 1px solid #e8e8e8;
  background: linear-gradient(135deg, #3a8dde 0%, #005bea 100%);
  color: white;
}

.ai-search-modal-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ai-search-modal-title i {
  font-size: 28px;
  color: #ffffff;
}

.ai-search-modal-title h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  color: #ffffff;
}

.ai-search-close-btn {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  color: white;
  font-size: 18px;
}

.ai-search-close-btn i {
  font-size: 20px;
  color: #ffffff;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-weight: 600;
  text-shadow: 0 0px 2px rgba(0, 0, 0, 0.5);
  text-transform: uppercase;
  letter-spacing: 1px;
  text-align: center;
}
.ai-search-close-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: rotate(90deg);
}

.ai-search-modal-body {
  padding: 30px 30px 20px 30px;
  overflow-y: auto;
  flex: 1;
  min-height: 400px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: stretch;
}

/* ===== AGENTE ANIMATO ===== */
.ai-agent-container {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 30px;
  animation: fadeInUp 0.6s ease;
  flex-shrink: 0;
}

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

.ai-agent-avatar {
  position: relative;
  width: 80px;
  height: 80px;
  flex-shrink: 0;
}

.ai-agent-face {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #3a8dde 0%, #005bea 100%);
  border-radius: 50%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(58, 141, 222, 0.3);
  animation: agentFloat 3s ease-in-out infinite;
}

@keyframes agentFloat {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.ai-agent-glow {
  position: absolute;
  top: -10px;
  left: -10px;
  right: -10px;
  bottom: -10px;
  background: radial-gradient(
    circle,
    rgba(58, 141, 222, 0.3) 0%,
    transparent 70%
  );
  border-radius: 50%;
  animation: agentGlow 2s ease-in-out infinite;
  z-index: -1;
}

@keyframes agentGlow {
  0%,
  100% {
    opacity: 0.5;
    transform: scale(1);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.1);
  }
}

.ai-agent-eyes {
  display: flex;
  gap: 12px;
  margin-top: -10px;
}

.ai-agent-eye {
  width: 12px;
  height: 12px;
  background: white;
  border-radius: 50%;
  position: relative;
  animation: agentBlink 3s infinite;
}

@keyframes agentBlink {
  0%,
  45%,
  55%,
  100% {
    height: 12px;
  }
  48%,
  52% {
    height: 2px;
  }
}

.ai-agent-pupil {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 6px;
  height: 6px;
  background: #222;
  border-radius: 50%;
  animation: agentLook 4s ease-in-out infinite;
}

@keyframes agentLook {
  0%,
  100% {
    transform: translate(-50%, -50%);
  }
  25% {
    transform: translate(-30%, -50%);
  }
  50% {
    transform: translate(-50%, -30%);
  }
  75% {
    transform: translate(-70%, -50%);
  }
}

.ai-agent-mouth {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 10px;
  border: 2px solid white;
  border-top: none;
  border-radius: 0 0 20px 20px;
  animation: agentTalk 2s ease-in-out infinite;
}

@keyframes agentTalk {
  0%,
  100% {
    width: 20px;
    height: 10px;
  }
  50% {
    width: 24px;
    height: 12px;
  }
}

.ai-agent-message {
  flex: 1;
  animation: messageSlideIn 0.8s ease 0.2s both;
}

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

.ai-agent-bubble {
  background: #f8f9fa;
  border-radius: 18px;
  padding: 18px 20px;
  position: relative;
  box-shadow:
    0 4px 16px rgba(0, 0, 0, 0.12),
    0 2px 8px rgba(0, 0, 0, 0.08);
}

.ai-agent-bubble::before {
  content: "";
  position: absolute;
  left: -12px;
  top: 30px;
  width: 0;
  height: 0;
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
  border-right: 12px solid #f8f9fa;
  filter: drop-shadow(-8px 2px 4px rgba(0, 0, 0, 0.1));
}

.ai-agent-greeting {
  margin: 0 0 10px 0;
  color: #333;
  font-size: 15px;
  line-height: 1.5;
}

.ai-agent-greeting strong {
  color: #333;
  font-weight: 700;
}

.ai-agent-instruction {
  margin: 0;
  color: #666;
  font-size: 14px;
  line-height: 1.5;
}

/* ===== SUGGERIMENTI ===== */
.ai-suggestions-container {
  margin-bottom: 25px;
  animation: fadeInUp 0.8s ease 0.3s both;
  transition:
    opacity 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    margin 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    max-height 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    padding 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  overflow: hidden;
}

.ai-suggestions-container.fade-out {
  opacity: 0;
  transform: translateY(20px) scale(0.98);
  margin-bottom: 0;
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  pointer-events: none;
}

.ai-suggestions-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 15px 0;
  color: #666;
  font-size: 14px;
  font-weight: 600;
}

.ai-suggestions-title i {
  color: #ffa500;
}

.ai-suggestions-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.ai-suggestion-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: white;
  border: 2px solid #e1e1e1;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: left;
  font-size: 14px;
  color: #333;
  font-family: "Roboto", Arial, sans-serif;
}

.ai-suggestion-chip:hover {
  border-color: #3a8dde;
  background: #f0f7ff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(58, 141, 222, 0.15);
}

.ai-suggestion-chip:active {
  transform: translateY(0);
}

.ai-suggestion-chip i {
  color: #3a8dde;
  font-size: 16px;
  flex-shrink: 0;
}

.ai-suggestion-chip span {
  flex: 1;
  font-weight: 500;
}

/* ===== INPUT CONTAINER AGGIORNATO ===== */
.ai-search-input-container {
  margin-bottom: 20px;
  animation: fadeInUp 1s ease 0.4s both;
  transition:
    opacity 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    margin 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    max-height 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    padding 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  overflow: hidden;
}

.ai-search-input-container.fade-out {
  opacity: 0;
  transform: translateY(20px) scale(0.98);
  margin-bottom: 0;
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  pointer-events: none;
}

.ai-search-submit-btn {
  transition:
    opacity 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    margin 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    max-height 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    padding 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  overflow: hidden;
}

.ai-search-submit-btn.fade-out {
  opacity: 0;
  transform: translateY(20px) scale(0.98);
  margin-bottom: 0;
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  pointer-events: none;
}

.ai-input-wrapper {
  position: relative;
}

.ai-input-indicator {
  position: absolute;
  top: 16px;
  right: 16px;
  color: #3a8dde;
  font-size: 20px;
  pointer-events: none;
  opacity: 0.5;
  animation: indicatorPulse 2s ease-in-out infinite;
}

@keyframes indicatorPulse {
  0%,
  100% {
    opacity: 0.5;
    transform: scale(1);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.1);
  }
}

/* Pulsante riconoscimento vocale */
.ai-voice-btn {
  position: absolute;
  bottom: 16px;
  right: 16px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3a8dde 0%, #005bea 100%);
  border: none;
  color: white;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(58, 141, 222, 0.3);
  z-index: 10;
}

.ai-voice-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(58, 141, 222, 0.4);
}

.ai-voice-btn:active {
  transform: scale(0.95);
}

.ai-voice-btn.listening {
  background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
  animation: voicePulse 1.5s ease-in-out infinite;
}

@keyframes voicePulse {
  0%,
  100% {
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.3);
  }
  50% {
    box-shadow: 0 2px 20px rgba(220, 53, 69, 0.6);
  }
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

/* Status riconoscimento vocale */
.ai-voice-status {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #dc3545;
  font-size: 13px;
  font-weight: 500;
  margin-left: auto;
}

.ai-voice-status i {
  font-size: 10px;
}

/* ===== MODAL RICERCA VOCALE ===== */
.ai-voice-search-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.75);
  z-index: 10001;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.3s ease;
  backdrop-filter: blur(4px);
}

.ai-voice-search-modal-content {
  background: #ffffff;
  border-radius: 20px;
  width: 100%;
  max-width: 500px;
  min-height: 300px;
  height: fit-content;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: slideUp 0.3s ease;
  overflow: hidden;
}

.ai-voice-search-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid #e8e8e8;
  background: linear-gradient(135deg, #e60000 0%, #c82333 100%);
  color: white;
}

.ai-voice-search-modal-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ai-voice-search-modal-title i {
  font-size: 24px;
  color: #ffffff;
}

.ai-voice-search-modal-title h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: #ffffff;
}

.ai-voice-search-close-btn {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  color: white;
  font-size: 16px;
}

.ai-voice-search-close-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: rotate(90deg);
}

.ai-voice-search-modal-body {
  padding: 30px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.ai-voice-search-status {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.ai-voice-search-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  color: #e60000;
  transition: all 0.3s ease;
  box-shadow: none;
  position: relative;
}

.ai-voice-search-icon.listening {
  animation: voicePulse 1.5s ease-in-out infinite;
  background: transparent;
  box-shadow: none;
  color: #c60000;
}

@keyframes voicePulse {
  0%,
  100% {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
    transform: scale(1.05);
  }
}

.ai-voice-search-message {
  font-size: 16px;
  color: #333;
  text-align: center;
  font-weight: 500;
  margin: 0;
  transition: color 0.3s ease;
}

.ai-voice-search-transcript {
  width: 100%;
  background: #f8f9fa;
  border-radius: 12px;
  padding: 16px;
  margin-top: 8px;
}

.transcript-label {
  font-size: 12px;
  color: #666;
  margin: 0 0 8px 0;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.transcript-text {
  font-size: 16px;
  color: #333;
  margin: 0;
  line-height: 1.5;
  font-style: italic;
}

.ai-voice-search-actions {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ai-voice-search-start-btn,
.ai-voice-search-stop-btn {
  width: 100%;
  padding: 16px 24px;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.ai-voice-search-start-btn {
  background: linear-gradient(135deg, #e60000 0%, #c82333 100%);
  color: white;
}

.ai-voice-search-start-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(230, 0, 0, 0.4);
}

.ai-voice-search-stop-btn {
  background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
  color: white;
}

.ai-voice-search-stop-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(108, 117, 125, 0.4);
}

.ai-search-input {
  width: 100%;
  padding: 16px 40px 16px 16px;
  border: 2px solid #e1e1e1;
  border-radius: 12px;
  font-size: 16px;
  font-family: "Roboto", Arial, sans-serif;
  resize: vertical;
  min-height: 120px;
  transition: all 0.3s ease;
  box-sizing: border-box;
}

.ai-search-input:focus {
  outline: none;
  border-color: #3a8dde;
  box-shadow: 0 0 0 3px rgba(58, 141, 222, 0.1);
}

.ai-search-input-footer {
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.ai-search-hint {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #666;
  font-size: 13px;
}

.ai-search-hint i {
  color: #ffa500;
}

.ai-search-submit-btn {
  width: 100%;
  background: linear-gradient(135deg, #3a8dde 0%, #005bea 100%);
  color: white;
  border: none;
  border-radius: 12px;
  padding: 16px 24px;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 4px 12px rgba(58, 141, 222, 0.3);
  margin-bottom: 0;
}

.ai-search-submit-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(58, 141, 222, 0.4);
}

.ai-search-submit-btn:active:not(:disabled) {
  transform: translateY(0);
}

.ai-search-submit-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.ai-search-results {
  margin-top: 24px;
  min-height: 200px;
  flex: 1;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  align-self: stretch;
}

.ai-search-results:empty {
  display: none;
}

.ai-search-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  text-align: center;
  color: #666;
  animation: fadeInUp 0.5s ease;
  transition:
    opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
    max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  margin-top: 0;
  min-height: 200px;
  align-self: stretch;
}

.ai-search-loading.fade-out {
  opacity: 0;
  transform: translateY(-20px) scale(0.95);
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  pointer-events: none;
}

.ai-search-loading i {
  font-size: 48px;
  color: #3a8dde;
  margin-bottom: 16px;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.ai-search-loading p {
  margin: 0;
  font-size: 16px;
  color: #666;
}

.ai-search-message {
  background: #f8f9fa;
  border-left: 4px solid #3a8dde;
  border-radius: 8px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ai-search-message i {
  font-size: 24px;
  color: #3a8dde;
  margin-bottom: 8px;
}

.ai-search-message p {
  margin: 0;
  color: #333;
  line-height: 1.6;
}

.ai-search-message p strong {
  color: #3a8dde;
}

.ai-search-note {
  font-size: 14px;
  color: #666;
  font-style: italic;
  margin-top: 8px;
}

/* ===== RISULTATI RICERCA IA ===== */
.ai-search-success {
  animation: fadeInUp 0.6s ease 0.2s both;
  padding: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(20px);
}

.ai-search-success.visible {
  opacity: 1;
  transform: translateY(0);
  transition:
    opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1) 0.2s,
    transform 0.5s cubic-bezier(0.4, 0, 0.2, 1) 0.2s;
}

.ai-new-search-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: 2px solid #e0e0e0;
  color: #666;
  padding: 10px 18px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-bottom: 20px;
  align-self: flex-start;
}

.ai-new-search-btn:hover {
  background: #f5f5f5;
  border-color: #3a8dde;
  color: #3a8dde;
  transform: translateX(-3px);
}

.ai-new-search-btn:active {
  transform: translateX(-1px);
}

.ai-new-search-btn i {
  font-size: 14px;
  transition: transform 0.3s ease;
}

.ai-new-search-btn:hover i {
  transform: translateX(-3px);
}

.ai-results-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 20px;
  border-left: 4px solid #28a745;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.ai-results-summary i {
  font-size: 32px;
  color: #28a745;
  flex-shrink: 0;
}

.ai-results-info h3 {
  margin: 0 0 4px 0;
  font-size: 18px;
  font-weight: 700;
  color: #1b5e20;
}

.ai-results-info p {
  margin: 0;
  font-size: 14px;
  color: #2e7d32;
}

.ai-discover-results-btn {
  display: block;
  position: relative;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  margin: 0;
  background: linear-gradient(135deg, #3a8dde 0%, #005bea 100%);
  color: white;
  text-decoration: none;
  border-radius: 16px;
  padding: 18px 24px;
  font-size: 17px;
  font-weight: 700;
  text-align: center;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(58, 141, 222, 0.4);
  transition: all 0.3s ease;
  animation: slideInUp 0.8s ease 0.3s both;
  box-sizing: border-box;
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.ai-discover-results-btn:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 30px rgba(58, 141, 222, 0.5);
  text-decoration: none;
  color: white;
}

.ai-discover-results-btn:active {
  transform: translateY(-2px);
}

.ai-discover-results-btn .btn-content {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.ai-discover-results-btn .btn-content i {
  font-size: 20px;
  animation: arrowPulse 2s ease-in-out infinite;
}

@keyframes arrowPulse {
  0%,
  100% {
    transform: translateX(0);
  }
  50% {
    transform: translateX(5px);
  }
}

.ai-discover-results-btn .btn-shine {
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  animation: shine 3s infinite;
  z-index: 1;
}

@keyframes shine {
  0% {
    left: -100%;
  }
  50%,
  100% {
    left: 100%;
  }
}
