/* === STILE PULITO GOTH LOVER ARCHIVE === */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 200 900;
    font-display: swap;
    src: url('wp-content/themes/extendable/assets/fonts/inter/inter-variable.woff2') format('woff2');
}

:root {
    --bg-cream: #F3EFEC;
    --bg-card: #E2E1DD;
    --text-dark: #171511;
    --primary-red: #7A2812;
    --primary-red-hover: #5a1d11;
    --secondary-olive: #3D4235;
    --shadow-brutal: 6px 6px 0 #171511;
    --shadow-brutal-sm: 4px 4px 0 #171511;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background-color: var(--bg-cream);
    color: var(--text-dark);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: clamp(0.98rem, 1.05vw, 1.125rem);
    line-height: 1.65;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

a {
    color: var(--text-dark);
    text-decoration: underline;
    transition: color 0.2s ease;
}

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

/* === HEADER & NAVIGAZIONE === */
.site-header {
    padding: clamp(1.2rem, 3.5vw, 2rem);
    border-bottom: 1px solid rgba(23, 21, 17, 0.12);
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    text-decoration: none;
}

.brand img {
    width: 60px;
    height: auto;
    display: block;
    filter: url(#wp-duotone-primary-foreground);
}

.brand-title {
    font-size: 1.25rem;
    font-weight: 700;
    text-transform: uppercase;
    margin: 0;
    color: var(--text-dark);
    text-decoration: none;
}

.nav-wrapper {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex-wrap: wrap;
}

.nav-list a {
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
}

.nav-list a:hover,
.nav-list a.active {
    text-decoration: underline;
}

.nav-list a.auth-link,
.btn-logout {
    color: var(--primary-red);
    font-weight: 700;
    padding: 0.35rem 0.8rem;
    border: 1.5px solid var(--primary-red);
    border-radius: 8px;
    background: transparent;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.95rem;
    text-decoration: none;
}

.nav-list a.auth-link:hover,
.btn-logout:hover {
    background-color: var(--primary-red);
    color: var(--bg-cream);
    text-decoration: none;
}

.user-badge {
    font-weight: 700;
    color: var(--secondary-olive);
    font-size: 0.95rem;
}

.social-link {
    display: inline-flex;
    align-items: center;
    color: var(--text-dark);
    transition: transform 0.15s ease;
}

.social-link:hover {
    transform: scale(1.15);
}

.menu-toggle {
    display: none;
    background: none;
    border: 1.5px solid var(--text-dark);
    border-radius: 6px;
    padding: 0.4rem 0.6rem;
    cursor: pointer;
    color: var(--text-dark);
}

@media (max-width: 720px) {
    .menu-toggle {
        display: inline-flex;
        align-items: center;
    }
    .nav-list {
        display: none;
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
        padding: 1rem 0 0.5rem 0;
        gap: 0.9rem;
    }
    .nav-list.open {
        display: flex;
    }
}

/* === LAYOUT CONTENUTI === */
.container {
    max-width: 1060px;
    margin: 0 auto;
    padding: clamp(2rem, 5vw, 4rem) clamp(1.25rem, 4vw, 2rem);
}

.container-narrow {
    max-width: 740px;
    margin: 0 auto;
    padding: clamp(2rem, 5vw, 3.5rem) clamp(1.25rem, 4vw, 2rem);
}

.page-banner {
    background-color: var(--bg-card);
    padding: clamp(1.5rem, 4vw, 2.5rem);
    border-bottom: 1px solid rgba(23, 21, 17, 0.12);
}

.page-banner-inner {
    max-width: 1060px;
    margin: 0 auto;
}

.page-banner h1 {
    margin: 0;
    font-size: clamp(1.6rem, 3.2vw, 2.4rem);
}

h1, h2, h3 {
    line-height: 1.2;
    letter-spacing: -0.02em;
    font-weight: 600;
}

h1 { font-size: clamp(2rem, 4vw, 3.1rem); }
h2 { font-size: clamp(1.5rem, 2.8vw, 2.25rem); }

.hero-section {
    padding: clamp(1.5rem, 4vw, 3rem) 0;
}

/* === BOTTONI BRUTALISTI === */
.btn-brutal {
    display: inline-block;
    background-color: var(--primary-red);
    color: var(--bg-cream);
    font-weight: 600;
    padding: 0.8rem 1.6rem;
    border-radius: 16px;
    text-decoration: none;
    box-shadow: var(--shadow-brutal-sm);
    border: 1px solid var(--text-dark);
    transition: background-color 0.2s ease, transform 0.1s ease;
    cursor: pointer;
    font-family: inherit;
    font-size: 1rem;
}

.btn-brutal:hover {
    background-color: var(--text-dark);
    color: var(--bg-cream);
    transform: translate(-1px, -1px);
}

/* === LISTA POST (lista.html) === */
.post-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 1.75rem;
}

.post-card {
    background-color: var(--bg-card);
    border: 1.5px solid var(--text-dark);
    border-radius: 16px;
    padding: 1.4rem 1.8rem;
    box-shadow: var(--shadow-brutal);
    transition: transform 0.15s ease;
}

.post-card:hover {
    transform: translate(-2px, -2px);
}

.post-card h2 {
    margin: 0 0 0.45rem 0;
    font-size: clamp(1.25rem, 2vw, 1.55rem);
}

.post-card h2 a {
    text-decoration: none;
}

.post-card h2 a:hover {
    text-decoration: underline;
    color: var(--primary-red);
}

.post-meta {
    font-size: 0.9rem;
    color: #4a4742;
}

.post-preview {
    margin: 0.75rem 0 0 0;
    color: #2c2923;
    font-size: 0.98rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.pagination {
    margin-top: 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    font-weight: 600;
}

.page-numbers {
    display: inline-block;
    padding: 0.4rem 0.8rem;
    margin-right: 0.25rem;
    text-decoration: none;
    border-radius: 8px;
    border: 1px solid transparent;
    cursor: pointer;
}

.page-numbers:hover {
    border-color: var(--text-dark);
}

.page-numbers.current {
    background-color: var(--primary-red);
    color: var(--bg-cream);
}

/* === SINGOLO ARTICOLO (articolo.html) === */
.article-box {
    background-color: #ffffff;
    border: 2px solid var(--text-dark);
    border-radius: 16px;
    padding: clamp(1.5rem, 4vw, 2.5rem);
    box-shadow: var(--shadow-brutal);
    margin-bottom: 2.5rem;
}

.article-content {
    white-space: pre-line;
    font-size: 1.08rem;
    line-height: 1.75;
}

.article-nav {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin: 2rem 0 3rem 0;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(23, 21, 17, 0.15);
}

/* === COMMENTI === */
.comments-section {
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(23, 21, 17, 0.15);
}

.comment-card {
    background-color: var(--bg-card);
    border: 1px solid var(--text-dark);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
}

.comment-meta {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--primary-red);
    margin-bottom: 0.4rem;
}

/* === FORM (post.html, accedi.html, registrati.html) === */
.custom-form {
    max-width: 680px;
    margin: 1.5rem auto;
    padding: 1.8rem;
    background-color: var(--bg-card);
    border: 1.5px solid var(--text-dark);
    border-radius: 16px;
    box-shadow: var(--shadow-brutal);
}

.custom-form fieldset {
    border: none;
    padding: 0;
    margin: 0;
}

.custom-form label {
    display: block;
    color: var(--primary-red);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
    letter-spacing: 0.05em;
}

.custom-form input[type="text"],
.custom-form input[type="email"],
.custom-form input[type="password"],
.custom-form textarea {
    width: 100%;
    padding: 0.75rem 0.9rem;
    margin-bottom: 1.35rem;
    background-color: #ffffff;
    border: 2px solid var(--primary-red);
    color: var(--text-dark);
    font-size: 1rem;
    font-family: inherit;
    border-radius: 6px;
}

.custom-form input:focus,
.custom-form textarea:focus {
    outline: none;
    box-shadow: 4px 4px 0 rgba(122, 40, 18, 0.25);
}

.custom-form button[type="submit"] {
    background-color: var(--primary-red);
    color: var(--bg-cream);
    padding: 0.9rem 2rem;
    border: 1px solid var(--text-dark);
    border-radius: 12px;
    box-shadow: var(--shadow-brutal-sm);
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
    font-size: 0.95rem;
    transition: background 0.2s ease, transform 0.1s ease;
}

.custom-form button[type="submit"]:hover {
    background-color: var(--primary-red-hover);
    transform: translate(-1px, -1px);
}

.alert-msg {
    padding: 0.9rem 1.2rem;
    border-radius: 10px;
    margin-bottom: 1.25rem;
    font-weight: 600;
    border: 1.5px solid var(--text-dark);
}

.alert-success {
    background-color: #d8ead3;
    color: #1e4620;
}

.alert-error {
    background-color: #f9d7d5;
    color: #7A2812;
}

/* === FOOTER === */
.site-footer {
    border-top: 1px solid rgba(23, 21, 17, 0.12);
    padding: clamp(2rem, 4vw, 3rem) clamp(1.25rem, 4vw, 2rem);
    margin-top: 3rem;
}

.footer-inner {
    max-width: 1060px;
    margin: 0 auto;
}

.footer-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
}