/* Home page-only layout and article list tweaks */
.home-page .card-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--size-12);
    padding-top: var(--size-12);   /* restore top inset lost when h2 margin was removed */
    margin-bottom: var(--size-10); /* restore spacing below header */
}

.home-page .card-header-row > h2 {
    margin: 0;
    padding-left: 0;
    padding-right: 0;
}

.home-page .btn-new-article {
    margin-right: var(--size-12);
    white-space: nowrap;
}

.home-page .error-banner {
    grid-column: 1 / -1;
}

.home-page .error-banner-text {
    margin: var(--size-12);
}

.home-page .article-body {
    white-space: pre-wrap;
    text-indent: 0;
}

.home-page .article-body p {
    margin: 0;
}

/* Align home article text with article page padding */
.home-page .article-item > h3 {
    padding-left: 0;
    padding-right: 0;
    margin-bottom: var(--size-4);
}

.home-page .article-item .article-subtitle {
    padding-left: 0;
    padding-right: 0;
    margin-bottom: var(--size-4);
    font-weight: 600;
}

.home-page section.card.articles .article-item .article-body {
    display: block;
    padding: 0;
    box-sizing: border-box;
}

/* Ensure the full-card link overlay does NOT block selecting/copying text */
.home-page .article-item {
    position: relative;
}

.home-page .article-link-overlay {
    position: absolute;
    inset: 0;
    z-index: 0;
}

/* Put actual content above the overlay */
.home-page .article-item > h3,
.home-page .article-item .article-subtitle,
.home-page .article-item .carousel,
.home-page .article-item .article-body {
    position: relative;
    z-index: 1;
    cursor: pointer;
}

.home-page .article-item > h3,
.home-page .article-item .article-subtitle,
.home-page .article-item .article-body {
    pointer-events: none;
}

/* Home carousel images: shrink to 70% while filling the slide height */
.home-page .article-item .carousel-slide {
    height: calc(var(--carousel-height) * 0.7);
    display: flex;
    align-items: center;
}

.home-page .article-item .carousel-slide img {
    height: 100%;
    width: auto;
    object-fit: contain;
}
