/* =========================
   TITOLI / LINK
========================= */

.homepage-title-link {
    text-decoration: none;
    color: #000;
    transition: color .2s ease;
}

.homepage-title-link h5 {
    color: inherit;
}

.homepage-title-link:hover {
    color: #1e4ed8;
}

.homepage-section-title h2,
.homepage-content h5 {
    font-family: 'Playfair Display', serif;
}

.homepage-subtitle {
    font-size: 0.9rem;
    font-weight: 500;
    margin-top: 10px;
    text-align: center;
}

/* =========================
   TAGS
========================= */

.homepage-tags-top {
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.homepage-tags-top .tag-primo {
    color: #d32f2f;
    font-weight: 700;
}

.homepage-tags-top .tag-secondario {
    color: #1e88e5;
    font-weight: 600;
}

.homepage-tags {
    margin-top: 6px;
}

.homepage-tag {
    display: inline-block;
    background: #f0f0f0;
    padding: 2px 6px;
    font-size: 0.75rem;
    border-radius: 4px;
    margin-right: 4px;
}
.copertina {
    font-size: 1.6rem;
}
/* =========================
   ARTICLE BASE
========================= */

.homepage-article {
    display: block;
    margin-bottom: 16px;
    border-bottom: 1px solid rgba(0,0,0,.08);
}

.homepage-article:last-child {
    border-bottom: none;
}
a {
    color: rgb(17 46 95) !important;
}
/* =========================
   LAYOUT TOP
========================= */

.layout-top:not(.compact-mode) .homepage-media img {
    width: 100%;
    height: auto;
    max-height: 520px;
    object-fit: cover;
    border-radius: 6px;
}

.layout-top:not(.compact-mode) .homepage-content h5 {
    /*   font-size: 1.5rem; */
    line-height: 1.2;
    margin-top: 15px;
}

.layout-top.compact-mode .homepage-media img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    border-radius: 6px;
}

.layout-top.compact-mode .homepage-content h5 {
    font-size: 1.2rem;
    margin-top: 15px;
}

.h2, h2 {
    font-size: 1.6rem !important;
    color: #386a90;
}
/* =========================
   LAYOUT BOTTOM
========================= */

.layout-bottom .homepage-content {
    text-align: center;
}

.layout-bottom .homepage-media img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 6px;
}

.layout-bottom.compact-mode .homepage-content h5 {
    font-size: 1.15rem;
}

/* =========================
   LEFT / RIGHT
========================= */

.layout-left,
.layout-right {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.layout-left .homepage-media,
.layout-right .homepage-media {
    flex: 0 0 90px;
}

.layout-left .homepage-media img,
.layout-right .homepage-media img {
    width: 130px;
    height: 85px;
    object-fit: cover;
    border-radius: 6px;
}

.layout-left .homepage-content,
.layout-right .homepage-content {
    flex: 1;
}

.layout-left .homepage-content h5,
.layout-right .homepage-content h5 {
    font-size: 1.1rem;
    line-height: 1.25;
    margin: 0;
}

.layout-left .homepage-excerpt,
.layout-right .homepage-excerpt {
    display: none;
}

/* =========================
   MOBILE
========================= */

@media (max-width: 768px) {

    .layout-left,
    .layout-right,
    .layout-bottom {
        flex-direction: column;
    }

    .layout-left .homepage-media,
    .layout-right .homepage-media,
    .layout-bottom .homepage-media {
        width: 100%;
    }

    .layout-left .homepage-media img,
    .layout-right .homepage-media img,
    .layout-bottom .homepage-media img {
        width: 100%;
        height: auto;
        max-height: 220px;
    }
}

/* =========================
   AUDIO PLAYER (HIDDEN)
========================= */

.homepage-audio-player {
    display: none;
}

/* =========================
   AUDIO BADGE WRAPPER
========================= */

.homepage-audio-badge {
    cursor: pointer;
    display: flex;
    justify-content: center;
    margin-top: 15px;
}

/* =========================
   PODCAST COVER (IMAGE CLEAN)
========================= */

.podcast-cover {
    position: relative;
    width: 100%;
    max-width: 420px;
    border-radius: 16px;
    overflow: hidden;
}

/* immagine PERFETTAMENTE pulita */
.podcast-cover img {
    width: 100%;
    display: block;
    height: auto;
    transition: transform .25s ease;
}

/* leggero zoom solo hover */
.podcast-cover:hover img {
    transform: scale(1.01);
}

/* =========================
   PLAY BUTTON (HOVER ONLY)
========================= */

.podcast-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.85);

    width: 30px;
    height: 30px;
    border-radius: 50%;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 15px;
    color: #fff;

    background: rgb(30 136 229 / 55%);

    box-shadow: 0 10px 25px rgba(0,0,0,0.25);

    opacity: 0;
    pointer-events: none;
}

/* appare SOLO hover */
@media (hover: hover) and (pointer: fine) {
    .podcast-cover:hover .podcast-play-btn {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
        pointer-events: auto;
    }
}
.podcast-cover {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

/* stato playing (solo feedback leggero) */
.homepage-article.playing .podcast-play-btn {
    background: rgba(0,0,0,0.65);
}
@media (max-width: 768px) {
    .podcast-play-btn {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
        pointer-events: auto;
        background: rgba(30, 136, 229, 0.75);
    }

    .podcast-cover:active .podcast-play-btn {
        transform: translate(-50%, -50%) scale(0.95);
    }
}
