/* ── Article Showcase ─────────────────────────────────────────────────── */

.article-showcase-section {
    overflow: hidden;
}

.article-showcase-container {
    --article-card-width: 320px;
    display: flex;
    align-items: center;
    gap: .5rem;
}

/* ── Strip (horizontal scroll) ────────────────────────────────────── */

.article-showcase-strip {
    flex: 1;
    min-width: 0;
    display: flex;
    gap: 1.25rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;          /* Firefox */
    padding-block: .25rem;
    padding-inline: .25rem;
}

.article-showcase-strip::-webkit-scrollbar {
    display: none;                  /* Chromium / Safari */
}

/* ── Card ─────────────────────────────────────────────────────────── */

.article-showcase-card {
    flex: 0 0 var(--article-card-width);
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    border-radius: .75rem;
    overflow: hidden;
    background: var(--wb-surface, #fff);
    box-shadow: 0 1px 4px rgba(0, 0, 0, .08);
    text-decoration: none;
    color: inherit;
    transition: transform .2s ease, box-shadow .2s ease;
}

.article-showcase-card:hover,
.article-showcase-card:focus-visible {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, .12);
}

/* ── Card image ───────────────────────────────────────────────────── */

.article-showcase-card-image {
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--wb-muted-bg, #f0f0f0);
}

.article-showcase-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ── Card body ────────────────────────────────────────────────────── */

.article-showcase-card-body {
    padding: 1rem 1.125rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: .35rem;
    flex: 1;
}

.article-showcase-source {
    font-size: .75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--wb-primary, #2563eb);
    line-height: 1.3;
}

.article-showcase-title {
    font-size: .95rem;
    font-weight: 600;
    line-height: 1.35;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-showcase-excerpt {
    font-size: .82rem;
    line-height: 1.45;
    color: var(--wb-muted-fg, #6b7280);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── Arrows ───────────────────────────────────────────────────────── */

.article-showcase-arrow {
    flex-shrink: 0;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    border: 1px solid var(--wb-border, rgba(0, 0, 0, .12));
    background: var(--wb-surface, #fff);
    color: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .1);
    transition: opacity .15s ease, background .15s ease;
}

.article-showcase-arrow:hover {
    background: var(--wb-muted-bg, #f5f5f5);
}

.article-showcase-arrow[style*="display:none"],
.article-showcase-arrow[style*="display: none"] {
    visibility: hidden;
    pointer-events: none;
}

/* ── Responsive ───────────────────────────────────────────────────── */

@media (max-width: 640px) {
    .article-showcase-container {
        --article-card-width: 260px;
    }

    .article-showcase-arrow {
        display: none !important;
    }
}

/* ── Dark mode ────────────────────────────────────────────────────── */

[data-theme="dark"] .article-showcase-card {
    background: var(--wb-surface, #1e1e1e);
    color: #e5e5e5;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .25);
}

[data-theme="dark"] .article-showcase-card:hover,
[data-theme="dark"] .article-showcase-card:focus-visible {
    box-shadow: 0 6px 20px rgba(0, 0, 0, .35);
}

[data-theme="dark"] .article-showcase-card-image {
    background: var(--wb-muted-bg, #1e1e1e);
}

[data-theme="dark"] .article-showcase-title {
    color: #f0f0f0;
}

[data-theme="dark"] .article-showcase-excerpt {
    color: #a3a3a3;
}

[data-theme="dark"] .article-showcase-arrow {
    background: var(--wb-surface, #2a2a2a);
    color: #e5e5e5;
    border-color: rgba(255, 255, 255, .18);
    box-shadow: 0 2px 8px rgba(0, 0, 0, .4);
}

[data-theme="dark"] .article-showcase-arrow:hover {
    background: var(--wb-muted-bg, #3a3a3a);
}
