/* ════════════════════════════════════════════════════════════════════
   RELATED ARTICLES — Clean rebuild (Mohammed spec 2026-04-18 night):
     image | category-overlay | title | desc | CTA
     no footer, no author, no date, no avatar, max 4 items
   ════════════════════════════════════════════════════════════════════ */

.related-section {
    margin-block: 56px 32px;
}

.related-section__title {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text, #152D50);
    margin: 0 0 28px;
    border-inline-start: 4px solid var(--teal);
    padding-inline-start: 14px;
    line-height: 1.3;
}

.related-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}
@media (min-width: 576px) {
    .related-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 992px) {
    .related-grid { grid-template-columns: repeat(4, 1fr); }
}

/* ── Card ────────────────────────────────────────────────────────────
   height:100% + parent grid's default align-items:stretch keeps every
   card in a row exactly the same height, regardless of title or desc
   length. Inside the card, body is flex:1 so the CTA at margin:auto
   sits flush at the bottom — no dead white space below the CTA.
   ──────────────────────────────────────────────────────────────────── */
.related-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: var(--bg-card, #fff);
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 14px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.related-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.14);
    border-color: var(--teal);
}
.related-card:focus-visible { outline: 2px solid var(--teal-light); outline-offset: 2px; }
.related-card:hover .related-card__title { color: var(--teal); }
.related-card:hover .related-card__cta   { text-decoration: underline; }
.related-card:hover .related-card__image { transform: scale(1.04); }

/* ── Media band with category overlay ───────────────────────────────── */
.related-card__media {
    position: relative;
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, var(--navy-light, #1e3a6b) 0%, var(--navy, #152D50) 100%);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.related-card__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}
.related-card__placeholder {
    color: rgba(255, 255, 255, 0.65);
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: 1px;
}
.related-card__category {
    position: absolute;
    inset-block-start: 12px;
    inset-inline-end: 12px;
    background: rgba(15, 23, 42, 0.78);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 5px 10px;
    border-radius: 999px;
    letter-spacing: 0.2px;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 2;
    max-inline-size: calc(100% - 24px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ── Body band — title / desc / CTA ──────────────────────────────────
   flex:1 takes the remaining card height. CTA pinned to bottom via
   margin-block-start:auto — single auto-margin pattern.
   ──────────────────────────────────────────────────────────────────── */
.related-card__body {
    flex: 1;
    padding: 16px 16px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
}
.related-card__title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text, #152D50);
    line-height: 1.5;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.25s ease;
}
.related-card__desc {
    font-size: 0.85rem;
    color: var(--text-mid, #475569);
    line-height: 1.65;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.related-card__cta {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--teal);
    margin-block-start: auto;
    padding-block-start: 8px;
    white-space: nowrap;
    transition: transform 0.2s ease;
}
.related-card:hover .related-card__cta { transform: translateX(-3px); }

/* ── Mobile breakpoints ── */
@media (max-width: 768px) {
    .related-section { margin-block: 40px 24px; }
    .related-section__title { font-size: 1.2rem; margin-bottom: 20px; }
    .related-card__body { padding: 12px; gap: 8px; }
    .related-card__title { font-size: 0.95rem; }
    .related-card__desc { font-size: 0.82rem; -webkit-line-clamp: 2; line-clamp: 2; }
}

@media (max-width: 480px) {
    .related-section { margin-block: 32px 16px; }
    .related-section__title { font-size: 1.1rem; margin-bottom: 16px; padding-inline-start: 10px; border-inline-start-width: 3px; }
    .related-card { border-radius: 10px; }
    .related-card__body { padding: 10px 12px 12px; gap: 6px; }
    .related-card__title { font-size: 0.92rem; }
    .related-card__cta { font-size: 0.82rem; }
    .related-card__category { font-size: 0.68rem; padding: 4px 8px; }
}
