/**
 * Heritage Link Card component
 *
 * Reusable card for internal or external links. Rendered by the
 * [heritage_link_card] shortcode (see saab_heritage_link_card_shortcode()
 * in functions.php). The card is a single <a> so the entire surface is
 * keyboard- and click-reachable.
 */

.heritage-link-card {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.25rem;
    padding: 1.25rem 1.5rem;
    margin: 1.5rem 0;
    background-color: var(--jocelyne-white, #ffffff);
    border: 1px solid rgba(112, 128, 144, 0.22);
    border-radius: 6px;
    color: inherit;
    text-decoration: none;
    transition:
        transform 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background-color 0.2s ease;
    max-width: 100%;
}

.heritage-link-card:hover,
.heritage-link-card:focus-visible {
    border-color: var(--jocelyne-slate, #708090);
    background-color: var(--jocelyne-cream, #faf8f2);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
    transform: translateY(-1px);
    text-decoration: none;
}

.heritage-link-card:focus-visible {
    outline: 2px solid var(--jocelyne-slate, #708090);
    outline-offset: 3px;
}

.heritage-link-card__body {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-width: 0;
    flex: 1 1 auto;
}

.heritage-link-card__site {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--jocelyne-slate, #708090);
    font-weight: 600;
}

.heritage-link-card__title {
    font-family: var(--font-heading, inherit);
    font-size: 1.125rem;
    line-height: 1.35;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0;
}

.heritage-link-card__description {
    font-size: 0.95rem;
    line-height: 1.5;
    color: #555;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.heritage-link-card__arrow {
    flex: 0 0 auto;
    font-size: 1.25rem;
    line-height: 1;
    color: var(--jocelyne-slate, #708090);
    transition: transform 0.25s ease;
    margin-top: 0.15rem;
}

.heritage-link-card:hover .heritage-link-card__arrow,
.heritage-link-card:focus-visible .heritage-link-card__arrow {
    transform: translate(2px, -2px);
}

/* Stack more tightly on narrow screens */
@media (max-width: 480px) {
    .heritage-link-card {
        padding: 1rem 1.1rem;
        gap: 0.75rem;
    }
    .heritage-link-card__title {
        font-size: 1rem;
    }
}

/* RTL: mirror the arrow so it points to the trailing edge */
[dir="rtl"] .heritage-link-card__arrow {
    transform: scaleX(-1);
}
[dir="rtl"] .heritage-link-card:hover .heritage-link-card__arrow,
[dir="rtl"] .heritage-link-card:focus-visible .heritage-link-card__arrow {
    transform: translate(-2px, -2px) scaleX(-1);
}
