/* ---------------------------- ARTICLES SECTION ----------------------------- */

@media (prefers-reduced-motion: no-preference) {
    body.page-events-page {
        scroll-behavior: auto; /* instant jump */
    }
}

.articles #news-separator {
    margin-bottom: .5em;
    border-right: 5px solid #f9ead8;
    background-image: url(images/home-news-separator.png);
    height: 80px;
}

.articles #news-separator h2 {
    padding-left: 100px;
    padding-top: 23px;
    font-size: 2em;
    line-height: 1em;
}

.articles ul {
    list-style: none;
    padding: 0;
}

.articles .articles-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.articles .article-item {
    border-bottom: 1px solid rgba(193, 165, 125, 0.3);
    padding-bottom: 1.5rem;
}

.articles .article-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

/* Article Header */
.articles .article-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 1rem;
    gap: 1rem;
}

.articles .article-header h3 {
    margin: 0;
    flex: 1;
    text-align: left;
}

.articles .article-header h3 a {
    text-decoration: none;
    color: var(--highlight-color);
}

.articles .article-header h3 a:hover {
    text-decoration: underline;
}

.articles .article-date {
    font-size: 1rem;
    color: var(--brown-tint-50);
    font-weight: 500;
    white-space: nowrap;
    text-align: right;
}

.articles .articles-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.articles .article-item {
    border-bottom: 1px solid rgba(193, 165, 125, 0.3);
    padding-bottom: 1.5rem;
}

.articles .article-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

/* Article Header - Specific to articles only */
.articles .article-item .article-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 1rem;
    gap: 1rem;
    height: auto;
    padding: 0;
    text-align: left;
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
    color: inherit;
}

.articles .article-item .article-header h3 {
    margin: 0;
    flex: 1;
    text-align: left;
}

.articles .article-item .article-header h3 a {
    text-decoration: none;
    color: var(--highlight-color);
}

.articles .article-item .article-header h3 a:hover {
    text-decoration: underline;
}

.articles .article-item .article-date {
    font-size: 1rem;
    color: var(--brown-tint-50);
    font-weight: 500;
    white-space: nowrap;
    text-align: right;
}

/* Article Content */
.articles .article-content {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 1.5rem;
    align-items: start;
}

.articles .article-image {
    overflow: hidden;
    border-radius: 8px;
}

.articles .article-image img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    display: block;
}

.articles .article-text {
    align-self: start;
}

.articles .article-text p {
    margin: 0;
    /*font-size: 1.1rem;*/
    line-height: 1.3;
}

.articles .article-text a {
    color: var(--highlight-color);
    text-decoration: none;
    font-weight: 500;
}

.articles .article-text a:hover {
    text-decoration: underline;
}

/* Handle articles without images */
.articles .article-item:not(:has(.article-image)) .article-content {
    grid-template-columns: 1fr;
}

/* Narrow viewport styles */
@media (max-width: 768px) {
    .articles .article-item .article-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .articles .article-item .article-date {
        text-align: left;
        font-size: 0.95rem;
    }

    .articles .article-content {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .articles .article-image {
        order: -1;
        height: 200px;
        overflow: hidden;
    }

    .articles .article-image img {
        width: 100%;
        height: 200px;
        object-fit: cover;
    }

    .articles .article-text {
        order: 1;
    }
}

/* Remove old styles that are no longer needed */
.articles ul {
    display: none; /* Hide if you're keeping the old markup temporarily */
}

/* ---------------------------- SINGLE ARTICLE ------------------------------- */

.event-title {
    font-size: 2.5rem;
    font-weight: 500;
}

/* Make H1 in article-header behave exactly like H3 */
.article-header h1 {
    margin: 0;
    flex: 1;
    text-align: left;
    /* Keep H1's existing font properties from global.css */
}

/* Ensure article-header works outside of .articles context */
.article-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 1rem;
    gap: 1rem;
}

/* Mobile responsive - match existing behavior */
@media (max-width: 768px) {
    .article-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .article-header .article-date {
        text-align: left;
        font-size: 0.95rem;
    }
}
