/**
 * Blok "Artikel Lainnya" — dipakai di halaman artikel (folder artikel/).
 * Muat: <link rel="stylesheet" href="../assets/css/article-related.css">
 */

:root {
    --article-related-max-width: clamp(320px, 90vw, 1200px);
}

.article-related {
    padding: 2.75rem 1.25rem 3.5rem;
    background: var(--body-color, #f5f5f5);
}

/* Di dalam .article-container (di atas CTA konsultasi) */
.article-related--embedded {
    margin: 0;
    padding: 2.25rem clamp(1.25rem, 3vw, 2.5rem) 2.5rem;
    background: linear-gradient(180deg, rgba(33, 87, 97, 0.05), rgba(248, 251, 252, 0.6));
    border-top: 1px solid rgba(18, 43, 64, 0.08);
}

.article-related__inner {
    max-width: var(--article-max-width, var(--article-related-max-width));
    margin: 0 auto;
}

.article-related__head {
    margin-bottom: 1.75rem;
    text-align: center;
}

.article-related__title {
    display: inline-block;
    font-size: clamp(1.35rem, 3vw, 1.85rem);
    color: #102029;
    margin: 0 0 0.65rem;
    padding-bottom: 0.4rem;
    border-bottom: 3px solid #215761;
    font-family: var(--title-font, system-ui, sans-serif);
}

.article-related__intro {
    margin: 0 auto;
    max-width: 42rem;
    font-size: 0.98rem;
    line-height: 1.75;
    color: #5c6b75;
}

.article-related__nav {
    margin: 0;
}

.article-related__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.35rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

@media (min-width: 640px) {
    .article-related__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .article-related__grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.article-related__item {
    margin: 0;
}

.article-related__card {
    height: 100%;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 12px 40px rgba(8, 15, 52, 0.07);
    border: 1px solid rgba(18, 43, 64, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.article-related__card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 50px rgba(33, 87, 97, 0.12);
}

@media (prefers-reduced-motion: reduce) {
    .article-related__card {
        transition: none;
    }

    .article-related__card:hover {
        transform: none;
    }
}

.article-related__link {
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

.article-related__media {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #e8eef0;
    overflow: hidden;
}

.article-related__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.article-related__body {
    padding: 1.15rem 1.2rem 1.35rem;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 0.5rem;
}

.article-related__cat {
    align-self: flex-start;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    color: #fff;
    background: #215761;
    padding: 0.28rem 0.75rem;
    border-radius: 999px;
}

.article-related__card-title {
    font-size: 1.02rem;
    line-height: 1.4;
    color: #0b1c26;
    margin: 0;
    font-family: var(--title-font, system-ui, sans-serif);
    font-weight: 700;
}

.article-related__excerpt {
    font-size: 0.9rem;
    line-height: 1.65;
    color: #5c6b75;
    margin: 0;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-clamp: 3;
}

.article-related__meta {
    font-size: 0.82rem;
    color: #7a8a94;
    margin-top: 0.25rem;
}

.article-related__footer {
    text-align: center;
    margin-top: 2rem;
}

.article-related__all {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: #215761;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: border-color 0.2s, color 0.2s;
}

.article-related__all:hover {
    border-bottom-color: #215761;
    color: #163d44;
}
