body.home-ai {
  background: #0f131a;
  color: #cfd6df;
  color-scheme: dark;
}

body.home-ai #contenitore {
  background: #0f131a;
}

body.home-ai #section__center {
  width: min(1120px, calc(100% - 16px));
  max-width: 100%;
  /* header: 70px (border-box) + 1px bordo inferiore */
  margin: 71px auto 40px;
  float: none;
  text-align: left;
  box-sizing: border-box;
}

.hai-hero {
  position: relative;
  isolation: isolate;
  min-height: 280px;
  height: min(46vh, 420px);
  overflow: hidden;
  border-radius: 22px;
  background: #121820 center / cover no-repeat;
  box-shadow:
    0 0 0 1px rgba(220, 200, 154, 0.16),
    0 24px 48px rgba(0, 0, 0, 0.4);
  margin-bottom: 22px;
}

.hai-hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(8, 10, 14, 0.1) 0%, rgba(8, 10, 14, 0.88) 100%);
}

.hai-hero-copy {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  padding: 28px 28px 24px;
}

.hai-hero-copy h1,
.hai-title {
  margin: 0 0 10px;
  font-family: "Cormorant Garamond", "Playfair Display", Georgia, serif;
  font-size: clamp(1.15rem, 2.6vw + 0.4rem, 1.7rem);
  font-weight: 500;
  font-style: italic;
  letter-spacing: 0.02em;
  line-height: 1.28;
  color: #f6f1e6;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.5);
}

.hai-hero-copy p {
  margin: 0;
  max-width: 40rem;
  color: rgba(232, 224, 208, 0.88);
  font-style: italic;
  line-height: 1.5;
}

.hai-intro {
  margin: 0 0 28px;
  padding: 18px 20px;
  border-radius: 16px;
  background: #161d27;
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: #a7b4c4;
  line-height: 1.55;
}

.hai-section {
  width: 100%;
  max-width: 100%;
  margin: 0 0 32px;
  box-sizing: border-box;
}

.hai-section h2 {
  margin: 0 0 14px;
  font-size: 0.82rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #dcc89a;
  font-weight: 700;
}

.hai-feature {
  position: relative;
  display: block;
  width: 100%;
  overflow: hidden;
  border-radius: 18px;
  background: #11161e;
  text-decoration: none;
  color: inherit;
}

.hai-feature video {
  display: block;
  width: 100%;
  height: min(42vh, 380px);
  object-fit: cover;
}

.hai-feature-label {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 18px 20px;
  background: linear-gradient(180deg, transparent, rgba(8, 10, 14, 0.92));
  color: #f6f1e6;
  font-family: Georgia, serif;
  font-size: 1.15rem;
}

.hai-grid {
  display: grid;
  width: 100%;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 14px;
}

.hai-card {
  display: block;
  overflow: hidden;
  border-radius: 16px;
  background: #161d27;
  border: 1px solid rgba(255, 255, 255, 0.06);
  text-decoration: none;
  color: inherit;
  min-height: 100%;
}

.hai-card:hover {
  border-color: rgba(220, 200, 154, 0.35);
}

.hai-card img.hai-avatar {
  float: left;
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 12px;
  margin: 14px 12px 14px 14px;
}

.hai-card-body {
  padding: 14px 14px 16px 0;
  overflow: hidden;
}

.hai-card-title {
  display: block;
  color: #dcc89a;
  font-weight: 700;
  margin-bottom: 6px;
}

.hai-card-excerpt {
  display: block;
  color: #9aa6b4;
  font-size: 0.86rem;
  line-height: 1.45;
}

.hai-card-meta {
  display: block;
  margin-top: 8px;
  color: #7e8b9a;
  font-size: 0.75rem;
}

.hai-thumbs {
  display: grid;
  width: 100%;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr));
  gap: 10px;
}

.hai-thumb {
  display: block;
  aspect-ratio: 1;
  border-radius: 14px;
  overflow: hidden;
  background: #121820 center / cover no-repeat;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.hai-thumb:hover {
  box-shadow:
    0 0 0 2px rgba(220, 200, 154, 0.7),
    0 14px 28px rgba(0, 0, 0, 0.45);
  transform: translateY(-3px);
}

.hai-albums {
  display: grid;
  width: 100%;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
  gap: 14px;
}

.hai-album {
  position: relative;
  display: block;
  min-height: 280px;
  border-radius: 16px;
  overflow: hidden;
  background: #121820 center / cover no-repeat;
  text-decoration: none;
  color: #fff;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.hai-album:hover {
  box-shadow:
    0 0 0 2px rgba(220, 200, 154, 0.7),
    0 14px 28px rgba(0, 0, 0, 0.45);
  transform: translateY(-3px);
}

.hai-album:hover .hai-album-shade {
  background: linear-gradient(180deg, rgba(220, 200, 154, 0.12) 0%, rgba(8, 10, 14, 0.88) 100%);
}

.hai-album:hover .hai-album-copy strong {
  color: #dcc89a;
}

.hai-album-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 35%, rgba(8, 10, 14, 0.92) 100%);
}

.hai-album-copy {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 14px;
}

.hai-album-copy strong {
  display: block;
  margin-bottom: 6px;
  color: #f6f1e6;
  font-size: 1.05rem;
}

.hai-album-copy span {
  display: block;
  font-size: 0.78rem;
  color: #c5ced8;
}

.hai-tiles {
  display: flex;
  flex-wrap: wrap;
  width: 100%;
  gap: 12px;
}

.hai-tile {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 140px;
  height: 140px;
  border-radius: 16px;
  background: #161d27 center / 64px no-repeat;
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: #fff;
  text-align: center;
  text-decoration: none;
  text-shadow: 0 1px 4px #000;
}

.hai-tile:hover {
  border-color: rgba(220, 200, 154, 0.4);
}

#avviso_abbnew {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 18px;
  background: rgba(22, 29, 39, 0.96);
  width: 300px;
  max-width: 90%;
  text-align: center;
  border: 1px solid rgba(220, 200, 154, 0.3);
  font-size: 1.1em;
  z-index: 999999;
  border-radius: 16px;
}

#button6 {
  margin-top: 10px;
  background: #2ea05a;
  color: #fff;
  padding: 10px 16px;
  border: 0;
  border-radius: 10px;
  cursor: pointer;
}

.chiudi {
  position: absolute;
  top: -10px;
  right: -10px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #d32f2f;
  padding: 5px;
  color: #fff;
}

@media (max-width: 640px) {
  body.home-ai #section__center {
    width: 100%;
    max-width: 100%;
    margin: 0 auto 32px;
  }

  .hai-hero {
    border-radius: 0;
    min-height: 240px;
    height: min(42vh, 360px);
  }

  .hai-hero-copy {
    border-radius: 0;
    padding: 64px 16px 16px;
  }

  .hai-title {
    font-size: clamp(1.05rem, 4.2vw, 1.35rem);
  }
}
