.atl-ub {
  background: #f9fafb;
  padding: 6rem 1.25rem;
  width: 100%;
  box-sizing: border-box;
}
@media (min-width: 768px) {
  .atl-ub {
    padding: 8rem 3rem;
  }
}

.atl-ub__container {
  max-width: 1280px;
  margin: 0 auto;
  width: 100%;
}

.atl-ub__header {
  max-width: 56rem;
  margin-bottom: 4rem;
}
@media (min-width: 768px) {
  .atl-ub__header {
    margin-bottom: 5rem;
  }
}

.atl-ub__title {
  color: var(--color-jakarta);
  font-size: clamp(2.25rem, 5vw, 3.75rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0 0 1.5rem;
}

.atl-ub__description {
  color: var(--color-testo-attenuato);
  font-weight: 300;
  font-size: 1.1rem;
  line-height: 1.7;
  max-width: 40rem;
  margin: 0;
}

.atl-ub__grid {
  display: grid;
  grid-template-columns: 1fr;
  grid-auto-rows: minmax(240px, auto);
  gap: 1.5rem;
}
@media (min-width: 768px) {
  .atl-ub__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 1024px) {
  .atl-ub__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.atl-ub__item {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  border-radius: 28px;
  padding: 2rem;
  border: 1px solid rgba(53, 52, 82, 0.08);
  background: #f0f0f0;
  transition: box-shadow 0.5s ease, border-color 0.5s ease;
}
.atl-ub__item:hover {
  box-shadow: 0 20px 40px -12px rgba(53, 52, 82, 0.15);
  border-color: transparent;
}
@media (min-width: 768px) {
  .atl-ub__item--large {
    grid-column: span 2;
  }
}
.atl-ub__item--small {
  background: #fff;
}
@media (max-width: 767px) {
  .atl-ub__item {
    min-height: 250px;
    padding: 2rem;
  }
}

.atl-ub__item-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.05);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.atl-ub__item:hover .atl-ub__item-bg {
  opacity: 1;
  transform: scale(1);
}

.atl-ub__item-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(53, 52, 82, 0.97), rgba(53, 52, 82, 0.85) 45%, rgba(53, 52, 82, 0.4));
  opacity: 0;
  transition: opacity 0.5s ease;
}

.atl-ub__item:hover .atl-ub__item-gradient {
  opacity: 1;
}

.atl-ub__item-body {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  height: 100%;
  justify-content: space-between;
}

.atl-ub__item-title {
  color: var(--color-jakarta);
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1;
  margin: 0;
  transition: color 0.3s ease;
}

.atl-ub__item:hover .atl-ub__item-title {
  color: #fff;
}

.atl-ub__item-content {
  color: var(--color-testo-attenuato);
  font-weight: 300;
  font-size: 0.9rem;
  line-height: 1.6;
  transition: color 0.3s ease;
}
.atl-ub__item-content p {
  margin: 0;
}

.atl-ub__item:hover .atl-ub__item-content {
  color: rgba(255, 255, 255, 0.9);
}

.editor-styles-wrapper .atl-ub__grid,
.block-editor-iframe__body .atl-ub__grid {
  grid-template-columns: repeat(3, 1fr) !important;
}

.editor-styles-wrapper .atl-ub__item--large,
.block-editor-iframe__body .atl-ub__item--large {
  grid-column: span 2 !important;
}
