.blog-archive-wrapper {
    display: flex;
    flex-direction: column;
    gap: 24px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.blog-sidebar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    width: 100%;
    padding-bottom: 15px;
    position: relative;
    z-index: 20;
}

.taxonomy-widget {
    position: relative;
    flex-shrink: 0;
}

.taxonomy-widget:last-child .taxonomy-collapse,
.taxonomy-widget:nth-last-child(2) .taxonomy-collapse {
    left: auto;
    right: 0;
}

.taxonomy-widget-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    border: 1px solid #eaeaea;
    border-radius: 8px;
    cursor: pointer;
    background: #ffffff;
    transition: border-color 0.2s ease;
}

.taxonomy-title {
    font-size: 15px;
    font-weight: 500;
    color: #005a40;
    margin: 0;
    white-space: nowrap;
}

.toggle-icon {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-right: 2px solid #005a40;
    border-bottom: 2px solid #005a40;
    transform: translateY(-2px) rotate(45deg);
    transition: transform 0.3s ease;
}

.taxonomy-widget.is-open .toggle-icon {
    transform: translateY(2px) rotate(-135deg);
}

.taxonomy-collapse {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 8px;
    z-index: 20;
    display: grid;
    grid-template-rows: 0fr;
    opacity: 0;
    visibility: hidden;
    transition: grid-template-rows 0.3s ease, opacity 0.3s ease, visibility 0.3s;
}

.taxonomy-widget.is-open .taxonomy-collapse {
    grid-template-rows: 1fr;
    opacity: 1;
    visibility: visible;
}

.taxonomy-collapse-inner {
    overflow: hidden;
    background: #ffffff;
    border: 1px solid #eaeaea;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
    min-width: max-content;
}

.taxonomy-term-list {
    padding: 12px;
    margin: 0;
    list-style: none;
}

.taxonomy-term-list li {
    margin-bottom: 10px;
}

.taxonomy-term-list li:last-child {
    margin-bottom: 0;
}

.taxonomy-term-list li a {
    text-decoration: none;
    color: #555555;
    font-size: 14px;
    transition: color 0.2s ease;
    white-space: nowrap;
}

.taxonomy-term-list li a.active,
.taxonomy-term-list li a:hover {
    color: #e33621;
    font-weight: 600;
}

.blog-main-content {
    flex-grow: 1;
    min-width: 0;
}

.blog-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    margin-bottom: 40px;
}

#blog-grid-container {
    transition: opacity 0.3s ease;
}

.post-card {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    display: flex;
    flex-direction: column;
}

.post-card.animate-fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.post-card.animate-fade-up.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.post-card-thumbnail {
    position: relative;
    width: 100%;
    padding-top: 75%;
}

.post-card-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-categories-overlay {
    position: absolute;
    top: 16px;
    left: 16px;
    z-index: 2;
}

.category-badge {
    display: inline-block;
    padding: 4px 14px;
    border-radius: 50px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
}

.post-card-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.post-card-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.author-avatar img {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: block;
}

.meta-text {
    font-size: 12px;
    color: #888888;
}

.post-card-title {
    font-size: 16px;
    line-height: 1.4;
    font-weight: 600;
    margin: 0 0 16px 0;
}

.post-card-title a {
    text-decoration: none;
    color: #333333;
}

.post-card-link {
    margin-top: auto;
    font-size: 14px;
    font-weight: 600;
    color: #f08b33;
    text-decoration: none;
}

.blog-pagination-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 40px;
}

.btn-show-more {
    display: inline-block;
    padding: 12px 32px;
    border: 1.5px solid #e33621;
    color: #e33621;
    border-radius: 100px;
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    background: transparent;
    cursor: pointer;
}

.btn-show-more:hover {
    background-color: #e33621;
    color: #ffffff;
}

.no-posts-message {
    grid-column: 1 / -1;
    text-align: center;
    font-size: 18px;
    color: #555;
    padding: 40px 0;
}

@media (min-width: 600px) {
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 992px) {
    .blog-archive-wrapper {
        flex-direction: row;
        padding: 39px 20px;
        gap: 40px;
    }

    .blog-sidebar {
        width: 250px;
        flex-direction: column;
        overflow-x: visible;
        padding-bottom: 0;
    }

    .taxonomy-widget:last-child .taxonomy-collapse,
    .taxonomy-widget:nth-last-child(2) .taxonomy-collapse {
        left: 0;
        right: auto;
    }

    .taxonomy-widget {
        border-bottom: 1px solid #eaeaea;
        padding-bottom: 16px;
        margin-bottom: 24px;
    }

    .taxonomy-widget:last-child {
        border-bottom: none;
    }

    .taxonomy-widget.all-posts-widget {
        border-bottom: none;
        padding-bottom: 0;
    }

    .taxonomy-widget-header {
        border: none;
        padding: 0;
        justify-content: space-between;
        background: transparent;
        border-radius: 0;
    }

    .taxonomy-title {
        font-size: 16px;
        font-weight: 600;
        white-space: normal;
    }

    .toggle-icon {
        border: none;
        transform: none;
        width: auto;
        height: auto;
        font-size: 18px;
        font-weight: 400;
        color: #005a40;
    }

    .toggle-icon::before {
        content: '+';
    }

    .taxonomy-widget.is-open .toggle-icon {
        transform: none;
    }

    .taxonomy-widget.is-open .toggle-icon::before {
        content: '−';
    }

    .taxonomy-collapse {
        position: static;
        margin-top: 0;
    }

    .taxonomy-collapse-inner {
        background: transparent;
        border: none;
        border-radius: 0;
        box-shadow: none;
    }

    .taxonomy-term-list {
        padding: 12px 0 0 0;
    }

    .taxonomy-term-list li a.active,
    .taxonomy-term-list li a:hover {
        color: #005a40;
    }

    .blog-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1200px) {
    .blog-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}