/* --- Variables & Global Styles --- */
:root {
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Poppins', sans-serif;
    --color-background: #fdfdfd;
    --color-surface: #ffffff;
    --color-text: #1a1a1a;
    --color-text-muted: #6c757d;
    --color-primary: #af8f6d;
    --color-border: #eeeeee;
    --container-width: 1320px;
    --border-radius: 5px;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-body);
    background-color: var(--color-background);
    color: var(--color-text);
    line-height: 1.7;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    color: var(--color-text);
}

a {
    color: var(--color-text);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--color-primary);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* --- Header & Navigation --- */
.site-header {
    background-color: var(--color-background);
    border-bottom: 1px solid var(--color-border);
    padding: 20px 0;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.site-title {
    font-size: 2.5rem;
    font-weight: 700;
}

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 32px;
    flex-wrap: wrap;
}

.main-nav a {
    font-size: 1rem;
    font-weight: 500;
    color: var(--color-text);
    padding: 8px 0;
    position: relative;
}

.main-nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--color-primary);
    transition: width 0.3s ease;
}
.main-nav a.active::after, .main-nav a:hover::after {
    width: 100%;
}

/* --- Main Content Layout --- */
main.container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 60px;
    padding-top: 50px;
    padding-bottom: 50px;
}

@media (min-width: 992px) {
    main.container {
        grid-template-columns: 2.5fr 1fr;
    }
}

/* --- Article Styles --- */
.category-tag {
    display: inline-block;
    background-color: var(--color-primary);
    color: #fff;
    padding: 5px 15px;
    font-size: 0.75rem;
    font-weight: 500;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.article-meta {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    font-family: var(--font-body);
}

.featured-article-hero article {
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
}
.featured-article-hero .image-container {
    line-height: 0;
}
.featured-article-hero .article-content {
    padding: 30px;
    background: linear-gradient(to top, rgba(0,0,0,0.7), rgba(0,0,0,0) 60%);
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
}
.featured-article-hero h2 {
    font-size: clamp(1.8rem, 4vw, 2.75rem);
    margin-bottom: 15px;
}
.featured-article-hero h2 a {
    color: #fff;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
}
.featured-article-hero h2 a:hover {
    color: #f0f0f0;
}
.featured-article-hero p {
    font-size: 1.1rem;
    margin-bottom: 15px;
    color: #e0e0e0;
    display: none; /* Hide on small screens for cleaner look */
}
.featured-article-hero .category-tag {
    background-color: rgba(0,0,0,0.5);
    border: 1px solid rgba(255,255,255,0.5);
}
.featured-article-hero .article-meta {
    color: #ccc;
}
@media (min-width: 768px) {
    .featured-article-hero p {
        display: block;
    }
    .featured-article-hero .article-content {
        padding: 40px;
    }
}

.section-title {
    font-size: 2rem;
    padding-bottom: 15px;
    margin-top: 50px;
    margin-bottom: 30px;
    border-bottom: 2px solid var(--color-border);
    position: relative;
}
.section-title::after {
    content: '';
    position: absolute;
    width: 80px;
    height: 2px;
    bottom: -2px;
    left: 0;
    background-color: var(--color-primary);
}

.articles-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
}

@media (min-width: 768px) {
    .articles-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.grid-item {
    display: flex;
    flex-direction: column;
}
.grid-item img {
    border-radius: var(--border-radius);
    margin-bottom: 15px;
    transition: transform 0.4s ease;
}
.grid-item a:hover img {
    transform: scale(1.05);
}
.grid-item .image-container {
    overflow: hidden;
    border-radius: var(--border-radius);
}
.grid-item h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}
.grid-item .article-meta {
    margin-top: auto;
    padding-top: 10px;
}

/* --- Sidebar --- */
.sidebar {
    position: sticky;
    top: 50px;
    align-self: start;
}

.widget-box {
    padding: 25px;
    margin-bottom: 30px;
    border: 1px solid var(--color-border);
    background-color: var(--color-surface);
}

.sidebar h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--color-border);
}

.sidebar p {
    color: var(--color-text-muted);
}

.sidebar ul {
    list-style: none;
}

.sidebar ul li a {
    display: block;
    padding: 8px 0;
    font-weight: 500;
    border-bottom: 1px solid var(--color-border);
}
.sidebar ul li:last-child a {
    border-bottom: none;
}

/* --- Article Page --- */
.article-page main.container {
    display: block;
    max-width: 840px;
}

.article-page .main-content {
    padding: 50px 0;
}

.article-header {
    text-align: center;
    margin-bottom: 40px;
}

.article-header h1 {
    font-size: clamp(2.5rem, 6vw, 4rem);
    line-height: 1.1;
}

.article-header .article-meta {
    margin-top: 20px;
    font-size: 1rem;
    color: var(--color-text-muted);
}
.article-header .category-tag {
    margin-top: 20px;
}

.article-body {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--color-text);
}

.article-body .featured-image {
    margin: 0 auto 40px;
    border-radius: var(--border-radius);
}

.article-body p {
    margin-bottom: 1.75em;
}

.article-body h2 {
    font-size: 2.25rem;
    margin-top: 2em;
    margin-bottom: 1em;
}

.article-body h3 {
    font-size: 1.75rem;
    margin-top: 1.5em;
    margin-bottom: 1em;
}

/* --- Footer --- */
.site-footer {
    background-color: #1a1a1a;
    color: var(--color-text-muted);
    text-align: center;
    padding: 40px 0;
    margin-top: 50px;
    border-top: 5px solid var(--color-primary);
    font-size: 0.9rem;
}
.site-footer p {
    color: #aaa;
}
