/* WriteFlow Theme - Storytelling / Narrative */

/* --- Variabili Globali e Stili di Base --- */
:root {
    --background-color: #f9f9f9;
    --surface-color: #ffffff;
    --text-color: #333333;
    --accent-color: #a02c2c; /* Rosso mattone scuro */
    --border-color: #e0e0e0;
    --font-family: 'Merriweather', serif;
    --container-width: 1000px;
    --border-radius: 3px;
    --box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

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

body {
    font-family: var(--font-family);
    line-height: 1.8;
    background-color: var(--background-color);
    color: var(--text-color);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

h1, h2, h3, h4 {
    line-height: 1.4;
    margin-bottom: 15px;
    font-weight: 700;
    color: #111111;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }

p {
    margin-bottom: 20px;
}

a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.2s ease-in-out, border-bottom-color 0.2s ease-in-out;
    border-bottom: 1px solid transparent;
}

a:hover {
    color: #000000;
    border-bottom-color: #000000;
}

ul, ol {
    margin-bottom: 20px;
    padding-left: 25px;
}

li {
    margin-bottom: 10px;
}

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

/* --- Intestazione e Navigazione --- */
.site-header {
    background-color: var(--surface-color);
    border-bottom: 1px solid var(--border-color);
    padding: 20px 0;
}

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

.site-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
}

.site-title a {
    color: #111111;
    border: none;
}

.site-title a:hover {
    color: var(--accent-color);
    border: none;
}

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 25px;
    margin: 0;
    padding: 0;
}

.main-nav a {
    color: var(--text-color);
    font-weight: 400;
    font-size: 1.1rem;
    padding-bottom: 3px;
    border-bottom: 2px solid transparent;
    transition: border-bottom-color 0.2s ease;
}

.main-nav a:hover,
.main-nav .current-page {
    border-bottom-color: var(--accent-color);
    color: #111111;
}

/* --- Layout del Contenuto Principale --- */
.main-content {
    padding: 60px 0;
}

.content-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 60px;
}

@media (min-width: 800px) {
    .content-layout {
        grid-template-columns: 2.5fr 1fr;
    }
}

main {
    max-width: 100%;
    overflow: hidden;
}

/* --- Articoli e Anteprime --- */
.articles-list {
    display: grid;
    gap: 40px;
}

.post-preview {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 30px;
}

.post-preview:last-child {
    border-bottom: none;
}

.post-preview h2 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1.7rem;
}

.post-preview h2 a {
    color: #111111;
    border: none;
}

.post-preview h2 a:hover {
    color: var(--accent-color);
}

.read-more {
    display: inline-block;
    font-weight: 700;
    margin-top: 15px;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--accent-color);
}

.read-more:hover {
    border-bottom-color: #000;
}

.article-header {
    margin-bottom: 30px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 20px;
}

.article-header h1 {
    margin-bottom: 10px;
}

.article-meta {
    font-size: 0.9rem;
    color: #777;
    font-style: italic;
}

/* --- Sidebar --- */
.sidebar-widget {
    background-color: var(--surface-color);
    padding: 25px;
    margin-bottom: 30px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
}

.sidebar-widget h3 {
    font-size: 1.3rem;
    margin-top: 0;
    margin-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}

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

.sidebar-widget li {
    margin-bottom: 12px;
}

.sidebar-widget a {
    display: block;
    font-weight: 400;
    border: none;
}

/* --- Call to Action --- */
.cta-section {
    background-color: #f0ebe6;
    border: 1px solid var(--border-color);
    padding: 40px;
    text-align: center;
    margin: 40px 0;
    border-radius: var(--border-radius);
}

.cta-section h2 {
    margin-top: 0;
    color: var(--accent-color);
}

.cta-button {
    display: inline-block;
    background-color: var(--accent-color);
    color: #ffffff;
    padding: 12px 28px;
    font-weight: 700;
    font-size: 1rem;
    margin-top: 15px;
    border-radius: var(--border-radius);
    transition: background-color 0.2s ease, transform 0.2s ease;
    border: none;
}

.cta-button:hover {
    background-color: #333;
    color: #ffffff;
    transform: translateY(-2px);
    border: none;
}

/* --- Modulo di Contatto --- */
.contact-form .form-group {
    margin-bottom: 20px;
}

.contact-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
    color: #111;
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    background-color: var(--surface-color);
    color: var(--text-color);
    font-family: var(--font-family);
    font-size: 1rem;
    border-radius: var(--border-radius);
}

.contact-form textarea {
    min-height: 150px;
    resize: vertical;
}

.contact-form button {
    background: var(--accent-color);
    color: #ffffff;
    border: none;
    padding: 12px 30px;
    font-family: var(--font-family);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    border-radius: var(--border-radius);
    transition: background-color 0.2s ease-in-out;
}

.contact-form button:hover {
    background-color: #333;
}

/* --- Piè di Pagina --- */
.site-footer {
    background-color: var(--surface-color);
    border-top: 1px solid var(--border-color);
    padding: 40px 0;
    margin-top: 50px;
}

.site-footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-links ul {
    list-style: none;
    display: flex;
    gap: 25px;
    margin: 0;
    padding: 0;
}

.copyright {
    font-size: 1rem;
    color: #777;
}

/* --- Media Queries --- */
@media (max-width: 799px) {
    .site-header .container {
        flex-direction: column;
        gap: 20px;
    }

    .main-nav ul {
        justify-content: center;
        flex-wrap: wrap;
    }

    h1 { font-size: 2rem; }
    h2 { font-size: 1.7rem; }

    .site-footer .container {
        flex-direction: column;
        text-align: center;
    }
}
