/* Home — tarjetas Destacados / Recién (sin recortes, logo o portada) */
.hn-grid {
    --hn-gap: 0.85rem;
}

.hn-grid > [class*='col-'] {
    min-width: 0;
    max-width: 100%;
    display: flex;
}

.hn-card {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.1);
    transition: transform 240ms cubic-bezier(0.22, 1, 0.36, 1), box-shadow 240ms ease;
    outline: none;
}

.hn-card:hover,
.hn-card:focus-within,
.hn-card.is-active {
    transform: translateY(-3px);
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.16);
}

.hn-media {
    position: relative;
    position: relative;
    aspect-ratio: 1 / 1;
    width: 100%;
    background-color: #1a1a1a;
    background-image: var(--hn-bg);
    background-size: cover;
    background-position: center;
    display: grid;
    place-items: center;
    overflow: hidden;
}

/* Máscara oscura SOLO si hay logotipo (para que resalte) */
.hn-media--logo::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    background: rgba(0, 0, 0, 0.42);
    pointer-events: none;
}

.hn-media--soft {
    background-image: none;
    background: linear-gradient(145deg, #2a2a2a 0%, #1a1a1a 100%);
}

.hn-media--soft.hn-media--logo::before {
    background: rgba(0, 0, 0, 0.2);
}

.hn-logo {
    position: relative;
    z-index: 1;
    width: auto;
    height: auto;
    max-width: min(52%, 130px);
    max-height: 52%;
    object-fit: contain;
    object-position: center;
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
    filter: drop-shadow(0 4px 14px rgba(0, 0, 0, 0.45));
}

.hn-foot {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.7rem 0.75rem;
    min-height: 56px;
    background: #fff;
    border-top: 1px solid #eef2f7;
    z-index: 2;
}

.hn-name {
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
    font-family: 'Montserrat', system-ui, sans-serif;
    font-size: clamp(0.78rem, 2.6vw, 0.95rem);
    font-weight: 700;
    line-height: 1.25;
    color: #0f172a;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
}

.hn-badge {
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #ffcc00;
    color: #001659;
    display: grid;
    place-items: center;
    font-size: 0.85rem;
}

/* Overlay */
.hn-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.85rem 0.75rem;
    text-align: center;
    background: rgba(0, 0, 0, 0.72);
    opacity: 0;
    transition: opacity 240ms ease;
    pointer-events: none;
}

.hn-card:hover .hn-overlay,
.hn-card:focus-within .hn-overlay,
.hn-card.is-active .hn-overlay {
    opacity: 1;
    pointer-events: auto;
}

.hn-card:hover .hn-foot,
.hn-card:focus-within .hn-foot,
.hn-card.is-active .hn-foot {
    opacity: 0;
}

.hn-overlay-icon {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: #ffcc00;
    color: #001659;
    display: grid;
    place-items: center;
    font-size: 1.2rem;
    margin-bottom: 0.15rem;
}

.hn-overlay-title {
    color: #fff !important;
    font-weight: 800;
    font-size: clamp(0.85rem, 3vw, 1.05rem);
    line-height: 1.25;
    text-decoration: none !important;
    max-width: 100%;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hn-overlay-meta {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.75rem;
}

.hn-overlay-desc {
    margin: 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.78rem;
    line-height: 1.4;
    max-width: 28ch;
    display: none;
}

@media (min-width: 768px) {
    .hn-overlay-desc {
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
}

.hn-overlay-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 0.25rem;
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    background: #ffcc00;
    color: #001659 !important;
    font-weight: 800;
    font-size: 0.8rem;
    text-decoration: none !important;
}

.hn-overlay-btn:hover {
    background: #ffe066;
    color: #001659 !important;
}

@media (max-width: 575.98px) {
    .hn-foot {
        min-height: 50px;
        padding: 0.55rem 0.55rem;
        gap: 0.4rem;
    }

    .hn-badge {
        flex-basis: 30px;
        width: 30px;
        height: 30px;
        font-size: 0.75rem;
    }

    .hn-logo {
        max-width: min(56%, 110px);
        max-height: 48%;
    }

    .hn-overlay {
        padding: 0.65rem 0.5rem;
        gap: 0.35rem;
    }

    .hn-overlay-icon {
        width: 42px;
        height: 42px;
        font-size: 1rem;
    }

    .hn-overlay-btn {
        padding: 0.4rem 0.75rem;
        font-size: 0.72rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hn-card,
    .hn-overlay {
        transition: none;
    }
}
