/* Story Card */
.story-card {
    position: relative;
    border-radius: 1rem;
    overflow: hidden;
    background: #0e3769;
    /* fallback quando manca l’immagine */
    box-shadow: 0 10px 24px rgba(0, 0, 0, .18);
    min-height: 260px;
}

/* Media (immagine) */
.story-card__media {
    position: absolute;
    inset: 0;
    display: block;
    z-index: 0;
}

.story-card__media img,
.story-card__media picture,
.story-card__media video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform .35s ease;
}

.story-card__ph {
    /* placeholder se non c'è immagine */
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #2b4a7a 0%, #1a3054 100%);
}

/* Overlay contenuti */
.story-card__overlay {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 1.1rem 2rem 1.5rem;
    color: #fff;
    display: flex;
    flex-direction: column;
    z-index: 2;
    background-color: #01294fbf;
    min-height: 150px;
    overflow: hidden;
    justify-content: center;
    transition: all 0.25s ease-in-out;
}

.story-card__overlay a {
    pointer-events: auto;
}

/* Categoria chip (rombo + testo) */
.story-card__chip {
    display: inline-flex;
    align-items: center;
    gap: 20px;
    font-size: 1rem;
    line-height: 1;
    color: #dcf0ff;
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0.2px;
}

/* piccolo rombo a sinistra */
.story-card__diamond {
    width: 22px;
    height: 22px;
    display: inline-block;
    transform: rotate(45deg);
    background: #0077E6;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06) inset;
    border-radius: 1px;
    position: absolute;
}

/* Titolo */
.story-card__title {
    font-size: 1rem;
    line-height: 1.2;
    letter-spacing: normal;
    font-weight: 600;
}

.story-card__title,
.story-card__excerpt {
    margin-left: 40px;
    /* margin-right: 10px; */
}

.story-card__title a {
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: clamp(1.6rem, .6rem + 1.2vw, 1.6rem);
}

.story-card__title a:hover {
    text-decoration: underline;
}

/* Estratto (di default nascosto) */
.story-card__excerpt {
    display: none;
    margin-top: .25rem;
    color: #dfe9ff;
    font-size: .92rem;
    /* line-height: 1.70; */
    overflow: hidden;
    transition: all 0.35s ease-in-out;
}

/* Hover zoom leggero sull’immagine */
.story-card:hover .story-card__media img {
    transform: scale(1.035);
}

/* Arrotondamento e spazio tra card quando sono in wrapper .story-item */
.story-item {
    height: 100%;
}

.story-item .story-card {
    height: 100%;
}

/* Espandi excerpt al click sull'icona */
.story-card__expand {
    background: none;
    border: none;
    padding: 0;
    margin-left: 5px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: inherit;
    fill: white;
    /* position: absolute; */
}

.story-card__expand:hover,
.story-card__expand:focus {
    outline: none;
    background: none;
}

/* Quando la card è espansa */
.story-card--expanded .story-card__excerpt {
    display: block !important;
}

.story-card--expanded .story-card__overlay {
    min-height: 100% !important;
}

.story-card__expand .icon--collapse {
    display: none;
}

.story-card--expanded .story-card__expand .icon--expand {
    display: none;
}

.story-card--expanded .story-card__expand .icon--collapse {
    display: inline;
}

.story-card--expanded .story-card__overlay {
    background-color: #01203de0;
}

/* CTA Leggi storia */
.story-card__excerpt a.story-card__cta {
    font-size: 16px;
    padding: 4px 20px;
    text-decoration: none;
    white-space: normal;
    fill: white;
    border-radius: 50px;
    background-color: #003399;
}

.story-card__excerpt a.story-card__cta .icon {
    width: 25px;
    margin-left: 5px;
}

/* Quando la card è espansa */
.story-card--expanded .story-card__overlay {
    padding-top: 2rem;
}

/* Mantiene heading in alto */
.story-card--expanded .story-card__heading {
    margin-top: 0;
    transition: all 0.35s ease-in-out;
}

/* Centra verticalmente l'excerpt */
.story-card--expanded .story-card__excerpt {
    display: block;
    margin-top: auto;
    margin-bottom: auto;
}

/* Badge per la card in evidenza */
.story-card .badge-in-evidenza {
    z-index: 3;
    position: absolute;
    right: 0;
    font-size: 30px;
}

.badge-wrapper.badge-in-evidenza .badge {
    background-color: #01203de0;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.5) !important;
    font-size: 70%;
}

.story-card--expanded .badge-in-evidenza {
    bottom: 0;
}

/* Simbolo del termine di tassonomia */
.story-card__icon {
  width: 30px;
  height: 30px;
  display: inline-block;
  position: absolute;
}

.story-card__meta .story-card__chip .argomento-nome{
  margin-left: 40px;
}
.back-to-top{
    z-index: 3;
}
@media (max-width: 767px) {
  .story-card__title{
    margin-right: 0.2rem;
  }
  .story-card__title a{
  font-size: 16px;
  }
}

