
/* --- Importazione Font --- */
@import url('https://fonts.googleapis.com/css2?family=Merriweather:ital,wght@0,400;0,700;1,400&family=Inter:wght@400;600;700&display=swap');

/* --- Reset e Variabili CSS --- */
:root {
    --primary-bg: #FFFFFF;
    --secondary-bg: #F8F9FA;
    --text-dark: #212529;
    --text-light: #6C757D;
    --accent-color: #0D6EFD;
    --border-color: #DEE2E6;
    --header-bg: #212529;
    --header-text: #FFFFFF;
    --font-body: 'Merriweather', serif;
    --font-heading: 'Inter', sans-serif;
}

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

body {
    font-family: var(--font-body);
    color: var(--text-dark);
    background-color: var(--primary-bg);
    line-height: 1.7;
    font-size: 16px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* --- Tipografia --- */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1.3;
    margin-bottom: 0.75rem;
}

h1 { font-size: 2.8rem; }
h2 { font-size: 2.2rem; }
h3 { font-size: 1.8rem; }
p { margin-bottom: 1.2rem; }
a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.3s ease;
}
a:hover {
    text-decoration: underline;
    color: #0a58ca;
}

/* --- Header e Navigazione --- */
.site-header {
    background-color: var(--header-bg);
    color: var(--header-text);
    padding: 1rem 0;
    border-bottom: 4px solid var(--accent-color);
}

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

.site-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--header-text);
    text-decoration: none;
}
.site-title:hover {
    color: #e9ecef;
    text-decoration: none;
}

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

.main-nav a {
    color: var(--header-text);
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1rem;
    text-transform: uppercase;
}
.main-nav a:hover {
    color: #ced4da;
    text-decoration: none;
}

/* --- Struttura Principale (Homepage e Pagina Categoria) --- */
.main-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 2.5rem 0;
}

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

.main-content {
    width: 100%;
}

/* --- Elenco Articoli --- */
.page-title {
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.5rem;
    margin-bottom: 2rem;
}

.article-list {
    display: grid;
    gap: 2.5rem;
}

.article-card {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    background-color: var(--primary-bg);
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.1);
}

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

.article-card-content {
    padding: 1.5rem;
}

.article-card-category {
    font-family: var(--font-heading);
    color: var(--accent-color);
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.article-card-title {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}
.article-card-title a {
    color: var(--text-dark);
}
.article-card-title a:hover {
    color: var(--accent-color);
    text-decoration: none;
}

.article-card-excerpt {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* --- Sidebar --- */
.sidebar {
    padding: 1.5rem;
    background-color: var(--secondary-bg);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.sidebar-widget {
    margin-bottom: 2.5rem;
}
.sidebar-widget:last-child {
    margin-bottom: 0;
}

.sidebar-title {
    font-size: 1.3rem;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

.sidebar-widget ul {
    list-style: none;
}

.sidebar-widget li {
    margin-bottom: 0.75rem;
}

.sidebar-widget a {
    color: var(--text-dark);
    font-weight: 600;
}
.sidebar-widget a:hover {
    color: var(--accent-color);
}

.promo-text {
    font-style: italic;
    color: var(--text-light);
    line-height: 1.6;
}

/* --- Pagina Articolo Singolo --- */
.article-header {
    margin-bottom: 2rem;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 2rem;
}

.article-category {
    font-family: var(--font-heading);
    color: var(--accent-color);
    font-size: 1rem;
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.article-title {
    font-size: 3rem;
    line-height: 1.2;
}

.article-meta {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-top: 1rem;
}

.article-content {
    font-size: 1.1rem;
    max-width: 800px;
    margin: 0 auto;
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 2rem 0;
}

.article-content h2 {
    font-size: 1.9rem;
    margin-top: 2.5rem;
}

.article-content h3 {
    font-size: 1.5rem;
    margin-top: 2rem;
}

/* --- Footer --- */
.site-footer {
    background-color: var(--header-bg);
    color: #adb5bd;
    padding: 2rem 0;
    margin-top: 3rem;
    text-align: center;
    font-size: 0.9rem;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    h1 { font-size: 2.2rem; }
    h2 { font-size: 1.8rem; }
    .article-title { font-size: 2.4rem; }

    .header-content {
        flex-direction: column;
        gap: 1rem;
    }

    .main-nav ul {
        justify-content: center;
    }
    
    .article-card {
        flex-direction: column;
    }

    .article-card-image img {
        height: 200px;
    }
}
