/* =========================
   CARD BASE
========================= */
.nius-card {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;

  background-size: cover;
  background-position: center;
  overflow: hidden;
  color: #fff;
  border-radius: 32px;

  transform: scale(1);
  transition: transform 0.4s ease;
  will-change: transform;
}

.nius-card:hover {
  transform: translateY(-20px) scale(1.01);
}

/* =========================
   OVERLAY
========================= */
.nius-overlay {
  position: absolute;
  inset: 0;
  background: rgba(39, 55, 79, 0.8);
  transition: background 0.4s ease;
  z-index: 1;
}

.nius-card:hover .nius-overlay {
  background: rgba(39, 55, 79);
}

/* =========================
   LINK FULL CARD (FIXED)
========================= */
.nius-link-news {
  position: absolute;
  inset: 0;
  z-index: 5;
}

/* =========================
   TOP AREA
========================= */
.nius-top {
  position: absolute;
  top: 10px;
  left: 20px;
  right: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 3;
  font-size: 20px;
  line-height: 1;
}

.nius-plus {
  font-size: 40px;
  font-weight: 300;
  transition: transform 0.35s ease;
}

.nius-card:hover .nius-plus {
  transform: rotate(90deg);
}

/* =========================
   BOTTOM AREA (FIX UX STRUTTURA)
========================= */
.nius-bottom {
  position: absolute;
  bottom: 20px;
  left: 20px;
  right: 20px;
  z-index: 4;

  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 10px;
}

/* =========================
   TITOLO
========================= */
.nius-title {
    margin: 0;
    color: var(--bianco);
    font-size: var(--fs-cta);
    transform: translateY(0);
    transition: transform 0.4s ease;
    line-height: 1.25;
    text-align: left;
}

/* titolo sale SOLO in hover */
.nius-card:hover .nius-title {
  transform: translateY(-10px);
}

/* =========================
   EXCERPT (NO LAYOUT SHIFT)
========================= */
.nius-excerpt {
    margin: 0;
    color: var(--bianco);
    font-size: 18px;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transform: translateY(10px);
    transition: all 0.4s ease;
    line-height: 1.25;
    text-align: left;
}

/* appare dopo */
.nius-card:hover .nius-excerpt {
  opacity: 1;
  max-height: 120px;
  transform: translateY(0);
}

/* =========================
   MICRO FIX PERFORMANCE
========================= */
.nius-card,
.nius-title,
.nius-excerpt,
.nius-overlay,
.nius-plus {
  backface-visibility: hidden;
}

.nius-news-carousel .col {
  width: 25%;
    padding-right: 0 !important;
}

@media (max-width: 1600px) and (min-width: 1350px) {
    .nius-title{
        font-size: 19px;
    }
    .nius-excerpt,
    .nius-date{
        font-size: 17px;
    }
    .nius-plus {
        font-size: 30px;
    }    
}
/* 3 colonne */
@media (max-width: 1400px) and (min-width: 1025px) {
  .nius-news-carousel .col {
    width: 33.3333%;
  }
}

@media (max-width: 1024px) {
  .nius-news-carousel .col {
    width: 50%;
  }
}

@media (max-width: 850px) {
  .nius-news-carousel .col {
    width: 100%;
  }
}


.nius-card {
  transform: translateY(0);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.nius-card:hover {
  transform: translateY(-20px);
}

.nius-news-carousel,
.nius-news-carousel .flickity-viewport,
.nius-news-carousel .flickity-slider {
  overflow: visible !important;
}
.nius-carousel-wrapper {
  overflow: hidden;
  position: relative;
  padding: 30px 0 40px;
}
