﻿:root {
    --al-accent: #006699;
    --al-text: #333;
    --al-muted: #666;
    --al-surface: #fff;
    --al-border: #e3e6ea;
    --al-radius: 8px;
    --al-menu-width: 17rem;
}

/* Hero background */
.article-list-hero {
    position: absolute;
    inset: -5px 0 auto 0;
    height: 420px;
    background: url('/lib/aesthetics-pics/backgrounds/office/1500.jpg') center / cover no-repeat;
    opacity: 0.15;
    pointer-events: none;
    -webkit-mask-image: linear-gradient(to bottom, #000 40%, transparent);
    mask-image: linear-gradient(to bottom, #000 40%, transparent);
}
@media (max-width: 860px) {
    .article-list-hero { background-image: url('/lib/aesthetics-pics/backgrounds/office/800.jpg'); }
}
@media (max-width: 600px) {
    .article-list-hero { background-image: url('/lib/aesthetics-pics/backgrounds/office/500.jpg'); }
}

/* Layout: owns page width; menu + content grid */
.article-layout {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 2.5rem;
    align-items: start;
    max-width: 1100px;
    margin: 0 auto 4rem;
    padding: 0 1rem;
    color: var(--al-text);
}

.article-layout--with-menu {
    max-width: 1240px;
    grid-template-columns: var(--al-menu-width) minmax(0, 1fr);
}

/* Article menu: page positioning only (component styles in articleMenu.css) */
.article-menu {
    position: sticky;
    top: 1.5rem;
    margin-top: 2.5rem;    /* aligns the card with the page header */
}

.article-menu__nav {
    max-height: calc(100vh - 3rem);
    overflow-y: auto;
}

/* Page content column */
.article-list {
    min-width: 0;
}

.article-list__header {
    max-width: 720px;
    margin: 2.5rem auto;
    text-align: center;
}

.article-list__title {
    margin: 0 0 0.75rem;
    font-size: clamp(1.6rem, 1.2rem + 1.5vw, 2.2rem);
    font-weight: 500;
    line-height: 1.25;
    color: var(--al-accent);
}

.article-list__intro {
    margin: 0;
    line-height: 1.6;
    color: var(--al-muted);
}

.article-list__empty {
    text-align: center;
    color: var(--al-muted);
}

/* Rows: two columns on wide screens, one on narrow */
.article-rows {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr));
    gap: 0.75rem 1.25rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.article-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    height: 100%;
    padding: 0.6rem 1rem 0.6rem 0.6rem;
    border: 1px solid var(--al-border);
    border-radius: var(--al-radius);
    background-color: var(--al-surface);
    color: inherit;
    text-decoration: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.article-row:hover {
    border-color: var(--al-accent);
    box-shadow: 0 2px 10px rgb(0 0 0 / 8%);
}

.article-row:focus-visible {
    outline: 3px solid var(--al-accent);
    outline-offset: 2px;
}

.article-row__thumb {
    flex: 0 0 auto;
    width: 120px;          /* keep at or below the images' native size */
    height: 80px;
    object-fit: cover;
    border-radius: 5px;
}

.article-row__title {
    flex: 1;
    font-family: Poppins, sans-serif;
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.4;
}

.article-row:hover .article-row__title {
    color: var(--al-accent);
}

.article-row__arrow {
    flex: 0 0 auto;
    font-size: 1.6rem;
    line-height: 1;
    color: #bbb;
    transition: transform 0.15s ease, color 0.15s ease;
}

.article-row:hover .article-row__arrow {
    color: var(--al-accent);
    transform: translateX(3px);
}

/* Responsive */
@media (max-width: 860px) {
    .article-layout--with-menu {
        grid-template-columns: minmax(0, 1fr);
        gap: 0;
    }

    .article-menu {
        position: static;
        order: 2;          /* content first on mobile; menu follows the list */
        margin-top: 2rem;
    }

    .article-menu__nav {
        max-height: none;
    }
}

@media (max-width: 480px) {
    .article-row__thumb { width: 90px; height: 60px; }
}

@media (prefers-reduced-motion: reduce) {
    .article-row,
    .article-row__arrow {
        transition: none;
    }

    .article-row:hover .article-row__arrow {
        transform: none;
    }
}