/* Blog Styles for Webemento - Brutalist Minimal Design */

:root {
    --project-card-color: #d8ff36;
}

/* Blog Header */
.blog-header {
    margin: 2rem 0;
    padding: 1rem;
    border: 2px solid #000;
    background-color: #f5f5f5;
    transform: rotate(-0.5deg);
}

h3 {
    margin-bottom: 50px;
}
.blog-header h1 {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    transform: rotate(0.5deg);
}

.blog-description {
    font-size: 1.2rem;
    max-width: 800px;
    margin: 0 auto;
    transform: rotate(0.2deg);
}

/* Blog Filters */
.blog-filters {
    margin: 2rem 0;
    padding: 1rem;
    border-top: 1px solid #000;
    border-bottom: 1px solid #000;
}

.filter-controls {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 30px;
}

.filter-button {
    background-color: var(--color-secondary);
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
    padding: 8px 16px;
    cursor: pointer;
    font-weight: bold;
    text-transform: uppercase;
    transition: all 0.3s ease;
}

.filter-button:hover {
    background-color: var(--project-card-color);
    color: var(--color-primary);
}

.filter-button.active {
    background-color: var(--color-primary);
    color: var(--color-secondary);
}

/* Articles List - Single Column Layout */
.articles-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

/* Article Card */
.article-card {
    border: 4px solid var(--color-primary);
    background-color: var(--color-secondary);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 5px 5px 0px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    overflow: hidden;
    width: 100%;
    display: flex;
    flex-direction: column;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 8px 8px 0px #d8ff36;
}

.article-card.hidden {
    display: none;
}

.article-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-bottom: 4px solid var(--color-primary);
}

.article-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.article-title {
    font-size: 1.8rem;
    font-weight: 900;
    margin-bottom: 10px;
    text-transform: uppercase;
    line-height: 1.2;
}

.article-meta {
    font-size: 1rem;
    margin-bottom: 15px;
    font-style: italic;
    font-weight: 600;
    color: #666;
}

.article-description {
    font-size: 1.1rem;
    line-height: 1.5;
    margin-bottom: 20px;
    flex-grow: 1;
}

.article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: auto;
}

.article-tag {
    background-color: #d8ff36;
    color: #000;
    padding: 5px 10px;
    font-size: 0.9rem;
    font-weight: bold;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

/* Single Blog Post */
.blog-post-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 1rem;
}

.blog-post {
    border: 2px solid #000;
    background-color: #fff;
    padding: 2rem;
    margin-bottom: 2rem;
}

.blog-post-header {
    margin-bottom: 2rem;
    border-bottom: 1px solid #ccc;
    padding-bottom: 1rem;
}

.blog-post-header .blog-post-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.blog-post-header .blog-post-meta {
    font-size: 1rem;
    margin-bottom: 1rem;
}

.blog-post-header .blog-post-tags {
    margin-bottom: 0;
}

.blog-post-featured-image {
    margin: 0 -2rem 2rem;
    max-height: 500px;
    overflow: hidden;
}

.blog-post-featured-image img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

/* Meta dati sotto l'immagine */
.blog-post-meta-container {
    margin-bottom: 2rem;
    border-bottom: 1px solid #ccc;
    padding-bottom: 1rem;
}

.blog-post-meta-container .blog-post-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.blog-post-meta-container .blog-post-meta {
    font-size: 1rem;
    margin-bottom: 1rem;
}

.blog-post-meta-container .blog-post-tags {
    margin-bottom: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.blog-post-tag {
    background-color: #d8ff36;
    color: #000;
    padding: 5px 10px;
    font-size: 0.9rem;
    font-weight: bold;
    text-transform: uppercase;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}


.blog-post-body {
    font-size: 1.1rem;
    line-height: 1.6;
}

.blog-post-body h2 {
    font-size: 1.8rem;
    margin: 2rem 0 1rem;
    border-bottom: 1px solid #eee;
    padding-bottom: 0.5rem;
}

.blog-post-body p {
    margin-bottom: 1.5rem;
}

.blog-post-body a {
    color: #000;
    text-decoration: underline;
}

.blog-post-body a:hover {
    text-decoration: none;
}

/* Post Navigation */
.blog-post-navigation {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2rem;
}

.nav-post {
    flex: 0 0 48%;
}

.nav-post.prev-post {
    text-align: left;
}

.nav-post.next-post {
    text-align: right;
}

.nav-link {
    display: block;
    padding: 1rem;
    border: 1px solid #ccc;
    text-decoration: none;
    color: #000;
    transition: all 0.2s ease;
}

.nav-link:hover {
    background-color: #f5f5f5;
    border-color: #000;
}

.nav-direction {
    display: block;
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.nav-title {
    font-weight: bold;
}

/* Back to Blog Link */
.back-to-blog {
    max-width: 800px;
    margin: 0 auto 2rem;
    padding: 0 1rem;
}

.back-link {
    display: inline-block;
    padding: 0.5rem 1rem;
    background-color: #000;
    color: #fff;
    text-decoration: none;
    border: 1px solid #000;
    transition: all 0.2s ease;
    transform: rotate(-0.5deg);
}

.back-link:hover {
    background-color: #fff;
    color: #000;
    transform: rotate(0.5deg);
}

/* Loading State */
.loading {
    text-align: center;
    padding: 2rem;
    font-style: italic;
    color: #666;
}

/* No Results Message */
.no-results {
    text-align: center;
    padding: 2rem;
    border: 1px dashed #ccc;
    background-color: #f9f9f9;
    width: 100%;
    margin-bottom: 20px;
}

.no-results.hidden {
    display: none;
}

/* Utility Classes */
.hidden {
    display: none;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .blog-header h1 {
        font-size: 2.5rem;
    }
    
    .articles-list {
        gap: 1.5rem;
        padding: 0 1rem;
    }
    
    .article-card {
        margin: 0;
    }
    
    .article-image {
        height: 250px;
    }
    
    .article-content {
        padding: 15px;
    }
    
    .article-title {
        font-size: 1.5rem;
    }
    
    .article-meta {
        font-size: 0.9rem;
    }
    
    .article-description {
        font-size: 1rem;
    }
    
    .article-tags {
        gap: 6px;
    }
    
    .article-tag {
        padding: 4px 8px;
        font-size: 0.8rem;
    }
    
    .blog-post {
        padding: 1rem;
    }
    
    .blog-post-meta-container .blog-post-title {
        font-size: 2rem;
    }
    
    .blog-post-featured-image {
        margin: 0 -1rem 1.5rem;
    }
    
    .blog-post-navigation {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-post {
        flex: 0 0 100%;
    }
}

@media (max-width: 480px) {
    .articles-list {
        gap: 1rem;
        padding: 0 0.5rem;
    }
    
    .article-image {
        height: 200px;
    }
    
    .article-content {
        padding: 12px;
    }
    
    .article-title {
        font-size: 1.3rem;
    }
    
    .article-meta {
        font-size: 0.85rem;
    }
    
    .article-description {
        font-size: 0.95rem;
        line-height: 1.4;
    }
}
