.article-card {
    --gold: #bfa161;
    --gold-dark: #9a7f3f;
    --gold-soft: rgba(191, 161, 97, 0.16);
    --dark: #101a3d;
    --text: #5f6678;
    --line: #ece6d6;

    position: relative;
    height: 100%;
    min-height: 390px;
    background: #fff;
    margin-bottom:35px;
    border: 1px solid var(--line);
    border-radius: 6px;
    overflow: hidden;
    
    isolation: isolate;
    box-shadow: 0 8px 28px rgba(16, 26, 61, 0.06);
    transition:
        transform 0.45s cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 0.45s ease,
        border-color 0.45s ease;
}

/* gold top line that draws in on hover */
.article-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--gold), #dcc58e, var(--gold));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
    z-index: 3;
}

.article-card:hover,
.article-card:focus-within {
    transform: translateY(-10px);
    border-color: var(--gold);
    box-shadow: 0 26px 50px rgba(16, 26, 61, 0.14);
}

.article-card:hover::before,
.article-card:focus-within::before {
    transform: scaleX(1);
}

.article-card-content {
    position: relative;
    z-index: 2;
    height: 100%;
    min-height: 350px;
    padding: 36px 32px 32px;
    display: flex;
    flex-direction: column;
}

/* tag: navy block like the source labels, turns gold on hover */
.article-tag {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 8px 14px;
    border-radius: 3px;
    background: var(--dark);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    transition:
        background 0.35s ease,
        color 0.35s ease,
        transform 0.35s ease;
}

.article-card:hover .article-tag {
    background: var(--gold);
    color: var(--dark);
    transform: translateY(-2px);
}

.article-title {
    margin: 24px 0 14px;
    font-family: "Playfair Display", Georgia, "Times New Roman", serif;
    font-size: 18px;
    line-height: 1.35;
    font-weight: 700;
    color: var(--navy);
    transition: color 0.35s ease;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    overflow: hidden;
}

.article-card:hover .article-title {
    color: var();
}
.article-description {
    margin: 0;
    font-size: 15px;
    line-height: 1.75;
    color: var(--text);
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 5;
    line-clamp: 5;
    overflow: hidden;
}


.read-article {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    width: fit-content;
    margin-top: auto;
    padding-top: 28px;
    text-decoration: none;
    color: var(--dark);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    transition: gap 0.35s ease, color 0.35s ease;
}

.read-article:hover {
    gap: 18px;
    color: var(--gold-dark);
}

.read-article:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 4px;
}

.read-arrow {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--gold);
    border-radius: 50%;
    color: var(--gold-dark);
    font-size: 17px;
    transition:
        transform 0.35s ease,
        background 0.35s ease,
        color 0.35s ease;
}

.article-card:hover .read-arrow {
    transform: translateX(4px);
    background: var(--gold);
    color: var(--dark);
}

/* soft gold circle in the top-right corner */
.article-decoration {
    position: absolute;
    top: -55px;
    right: -55px;
    width: 130px;
    height: 130px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(191, 161, 97, 0.28), var(--gold-soft));
    transition:
        transform 0.6s cubic-bezier(0.22, 1, 0.36, 1),
        width 0.5s ease,
        height 0.5s ease;
}

.article-card:hover .article-decoration {
    width: 190px;
    height: 190px;
    transform: rotate(25deg);
}

/* faint gold glow in the opposite corner */
.article-card-glow {
    position: absolute;
    top: -80px;
    left: -80px;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: var(--gold);
    filter: blur(70px);
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

.article-card:hover .article-card-glow {
    opacity: 0.22;
}

@media (max-width: 575px) {
    .article-card-content {
        padding: 30px 24px 28px;
    }

    .article-title {
        font-size: 21px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .article-card,
    .article-card *,
    .article-card::before {
        transition: none !important;
    }
}
