/* Reset e Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    width: 100%;
    height: 100%;
}

body {
    font-family: 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #faf8f5 0%, #f5ede4 100%);
    background-attachment: fixed;
    background-size: 100% 100%;
    min-height: 100vh;
    width: 100%;
    margin: 0;
    padding: 0;
}

/* Header */
header {
    background: linear-gradient(135deg, #6b1414 0%, #8b1a1a 100%);
    color: white;
    padding: 3rem 2rem 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
}

.logo {
    width: 180px;
    height: 180px;
    flex-shrink: 0;
}

.header-text {
    text-align: left;
}

header h1 {
    font-family: 'Playfair Display', serif;
    font-size: 3rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
    letter-spacing: 8px;
    text-transform: uppercase;
}

header h1 .blog-label {
    font-size: 2rem;
    font-style: italic;
    letter-spacing: 2px;
    font-weight: 400;
}

header h1 a {
    color: white;
    text-decoration: none;
}

header p {
    font-size: 1.1rem;
    opacity: 0.9;
    font-style: italic;
    color: #f5ede4;
}


/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

main.container {
    background: none;
}

/* Archive Section */
.archive-section {
    text-align: center;
    padding: 2rem 2rem 3rem;
    background: linear-gradient(to bottom, #8b1a1a 0%, transparent 100%);
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    padding-left: calc(50vw - 50%);
    padding-right: calc(50vw - 50%);
}

.archive-box {
    display: inline-block;
    background: rgba(245, 237, 228, 0.95);
    backdrop-filter: blur(10px);
    color: #6b1414;
    padding: 1rem 2.5rem;
    border-radius: 0;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    border: 1px solid rgba(139, 26, 26, 0.2);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

/* Griglia Post */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.post-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.post-card-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.post-card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background-color: #f0f0f0;
}

.post-card-content {
    padding: 1.5rem 1.5rem 5.5rem;
    min-height: 200px;
}

.post-card h2 {
    color: #8b1a1a;
    font-size: 1.4rem;
    margin-bottom: 1rem;
    line-height: 1.3;
    font-family: 'Playfair Display', serif;
}

.post-excerpt {
    color: #666;
    line-height: 1.6;
}

.post-meta {
    background-color: rgba(245, 237, 228, 0.95);
    padding: 1rem 1.5rem;
    font-size: 0.85rem;
    color: #6b1414;
    border: 1px solid rgba(139, 26, 26, 0.1);
    position: absolute;
    bottom: 8px;
    right: 0;
    width: 55%;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.post-meta span {
    display: block;
    margin-bottom: 4px;
    letter-spacing: 0.5px;
}

.post-author {
    font-weight: 600;
}

/* Singolo Post */
.post-single {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    padding: 3rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

article.post-single .post-header {
    margin-bottom: 2rem;
    padding: 2rem;
    background: #f5ede4 !important;
    background-color: #f5ede4 !important;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    position: relative;
}

article.post-single .post-header h1 {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    color: #000 !important;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

article.post-single .post-meta-wrapper {
    display: flex;
    justify-content: flex-end;
    margin-top: 1rem;
}

article.post-single .post-meta-single {
    background-color: rgba(245, 237, 228, 0.95);
    padding: 0.75rem 1.25rem;
    font-size: 0.85rem;
    color: #6b1414;
    border: 1px solid rgba(139, 26, 26, 0.1);
    display: inline-block;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

article.post-single .post-meta-single span {
    display: inline-block;
    margin-right: 1.5rem;
    letter-spacing: 0.5px;
}

article.post-single .post-meta-single span:last-child {
    margin-right: 0;
}

.post-content {
    font-size: 1.1rem;
    line-height: 1.8;
}

.post-content p {
    margin-bottom: 1.5rem;
}

.post-content h2 {
    font-family: 'Playfair Display', serif;
    color: #8b1a1a;
    margin: 2rem 0 1rem;
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 1.5rem 0;
}

.post-content a {
    color: #8b1a1a;
}

/* Post Footer */
.post-footer {
    margin-top: 3rem;
    padding: 2rem;
    background: linear-gradient(135deg, #faf8f5 0%, #f5ede4 100%);
    border-radius: 8px;
}

.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.tags-label {
    font-weight: 600;
    color: #6b1414;
    margin-right: 0.5rem;
}

.tag {
    background-color: #f5ede4;
    color: #6b1414;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.85rem;
    border: 1px solid #e0d4c4;
}

/* Navigazione Post */
.post-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #e0e0e0;
    gap: 1rem;
}

.nav-prev, .nav-next {
    flex: 1;
    padding: 1rem;
    background: #f5ede4;
    border-radius: 8px;
    text-decoration: none;
    color: #6b1414;
    transition: background 0.3s;
}

.nav-prev:hover, .nav-next:hover {
    background: #e0d4c4;
}

.nav-next {
    text-align: right;
}

.nav-label {
    display: block;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
    opacity: 0.8;
}

.nav-title {
    font-weight: 600;
}

/* Paginazione */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin: 3rem 0;
}

.pagination a {
    background: #8b1a1a;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    text-decoration: none;
    transition: background 0.3s;
}

.pagination a:hover {
    background: #6b1414;
}

.pagination-info {
    color: #6b1414;
    font-weight: 600;
}

/* Footer */
footer {
    background-color: #000;
    color: white;
    text-align: center;
    padding: 2rem 1rem;
    margin-top: 3rem;
}

footer p {
    margin: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .posts-grid {
        grid-template-columns: 1fr;
    }

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

    .header-text {
        text-align: center;
    }

    header h1 {
        font-size: 2rem;
        letter-spacing: 2px;
    }

    .logo {
        width: 120px;
        height: 120px;
    }

    header h1 {
        letter-spacing: 4px;
    }

    header h1 .blog-label {
        font-size: 1.5rem;
    }

    .post-single {
        padding: 1.5rem;
    }

    .post-header h1 {
        font-size: 1.8rem;
    }

    .post-navigation {
        flex-direction: column;
    }

    .nav-next {
        text-align: left;
    }
}
