/* Articoli dal Network - WPBakery element */

.nectar-np {
  display: grid;
  gap: 30px;
  grid-template-columns: repeat(var(--np-cols, 3), minmax(0, 1fr));
}

.nectar-np--cols-1 { --np-cols: 1; }
.nectar-np--cols-2 { --np-cols: 2; }
.nectar-np--cols-3 { --np-cols: 3; }
.nectar-np--cols-4 { --np-cols: 4; }

.nectar-np__item {
  display: flex;
  overflow: hidden;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .07);
  transition: transform .3s ease, box-shadow .3s ease;
}

.nectar-np__item:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, .12);
}

.nectar-np__link {
  display: flex;
  width: 100%;
  flex-direction: column;
  color: inherit;
  text-decoration: none;
}

.nectar-np__link:hover { color: inherit; }

/* Fixed ratio so cards stay aligned whatever the source image size is */
.nectar-np__media {
  position: relative;
  overflow: hidden;
  padding-bottom: 60%;
  background: #f2f2f2;
}

.nectar-np__media img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}

.nectar-np__item:hover .nectar-np__media img { transform: scale(1.05); }

.nectar-np__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 22px;
}

.nectar-np__categories {
  display: flex;
  flex-wrap: wrap;
  margin-bottom: 8px;
  gap: 2px 8px;
}

.nectar-np__category {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  opacity: .7;
  text-transform: uppercase;
}

/* Dot separator between categories, never after the last one */
.nectar-np__category:not(:last-child)::after {
  margin-left: 8px;
  content: '·';
}

.nectar-np__title {
  margin: 0 0 8px;
  font-size: 20px;
  line-height: 1.3;
}

.nectar-np__date {
  margin-bottom: 12px;
  font-size: 13px;
  opacity: .6;
}

.nectar-np__excerpt {
  margin: 0 0 16px;
  font-size: 15px;
  line-height: 1.6;
  opacity: .85;
}

/* Pushed to the bottom so the CTA lines up across cards */
.nectar-np__more {
  margin-top: auto;
  font-weight: 600;
  text-decoration: underline;
}

.nectar-np-empty {
  padding: 16px;
  border: 1px dashed #ccc;
  opacity: .7;
}

@media only screen and (max-width: 999px) {
  .nectar-np--cols-3,
  .nectar-np--cols-4 { --np-cols: 2; }
}

@media only screen and (max-width: 690px) {
  .nectar-np { --np-cols: 1 !important; }
}
