/**
 * Stylesheet: news page
 * Usage: layouts/news/list.html and content/news/_index.md
 * Variables: static/assets/css/variables.css
 */

 

/* ---------------------------------------------------------------------------
   Grid wrapper — one card per line
--------------------------------------------------------------------------- */

.news_grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 1400px;
    margin: 40px auto;
    padding: 0 16px;
    box-sizing: border-box;
    font-family: var(--pw-font);
}


/* ---------------------------------------------------------------------------
   Card — image on the left, content on the right
--------------------------------------------------------------------------- */

.news_card {
    background-color: var(--pw-bg);
    border: 1px solid var(--pw-border);
    border-radius: 12px;
    padding: 24px 28px;
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 28px;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
    box-shadow: 0 2px 8px rgba(12, 12, 79, 0.06);
}

.news_card:hover {
    box-shadow: 0 6px 20px rgba(12, 12, 79, 0.10);
    border-color: var(--pw-primary);
}


/* ---------------------------------------------------------------------------
   Content block — right of the image
--------------------------------------------------------------------------- */

.news_content {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

/* Title */
.news_title {
    margin: 0;
    font-family: var(--pw-font);
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--pw-primary);
    word-break: break-word;
}

/* Metadata row — date and author on the same line */
.news_meta_row {
    display: flex;
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid #9090a8;
}

/* Publication date — accent colour */
.news_date {
    margin: 0;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--pw-accent);
    letter-spacing: 0.02em;
}

/* Author */
.news_author {
    margin: 0;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--pw-primary);
    opacity: 0.75;
}

/* Abstract */
.news_abstract {
    margin: 0;
    font-size: 0.88rem;
    line-height: 1.6;
    color: var(--pw-primary);
    opacity: 0.75;
}

/* "Read more" button */
.news_btn {
    align-self: flex-start;
    margin-top: 4px;
    padding: 6px 14px;
    border: 1px solid var(--pw-primary);
    border-radius: 8px;
    background-color: transparent;
    color: var(--pw-primary);
    font-family: var(--pw-font);
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none !important;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.news_btn:hover {
    background-color: var(--pw-accent);
    border-color: var(--pw-accent);
    color: #FFFFFF;
}

.news_btn:focus:not(:focus-visible) {
    outline: none;
}

.news_btn:focus-visible {
    outline: 2px solid var(--pw-accent);
    outline-offset: 2px;
}


/* ---------------------------------------------------------------------------
   Empty state
--------------------------------------------------------------------------- */

.no_news {
    text-align: center;
    font-family: var(--pw-font);
    font-size: 1rem;
    color: var(--pw-primary);
    opacity: 0.6;
    margin: 40px 0;
}


/* ---------------------------------------------------------------------------
   Responsive
--------------------------------------------------------------------------- */

@media (max-width: 768px) {
    .news_card {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
        padding: 20px;
    }

}