/**
 * Arquivo de conteúdos: hubs de categoria (category.php) e a biblioteca /conteudos/
 * (page-conteudos.php). Saiu do <style> do category.php para os dois usarem o mesmo.
 */
/* Archive Container */
.archive-container {
    padding: 2rem 0 4rem;
}

/* Breadcrumb */
.archive-breadcrumb {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 1rem;
    padding: 1rem 1.5rem;
    margin-bottom: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.archive-breadcrumb .breadcrumb {
    margin: 0;
    background: none;
    padding: 0;
    font-size: 0.9rem;
}

.archive-breadcrumb .breadcrumb-item a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.archive-breadcrumb .breadcrumb-item a:hover {
    color: var(--primary-hover);
}

.archive-breadcrumb .breadcrumb-item.active {
    color: var(--text-dark);
    font-weight: 600;
}

.archive-breadcrumb .breadcrumb-item + .breadcrumb-item::before {
    color: var(--text-light);
}

/* Archive Header */
.archive-header {
    background: #ffffff;
    border-radius: 1.5rem;
    padding: 2.5rem;
    box-shadow: 0 10px 25px -3px rgb(0 0 0 / 0.1), 0 4px 6px -2px rgb(0 0 0 / 0.05);
    margin-bottom: 2.5rem;
    position: relative;
    overflow: hidden;
}

.archive-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
}

.archive-header-label {
    display: inline-flex;
    align-items: center;
    background: #eff6ff;
    color: var(--primary-color);
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1rem;
}

.archive-header-label i {
    margin-right: 0.5rem;
}

.archive-title {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.archive-description {
    color: var(--text-light);
    font-size: 1.0625rem;
    line-height: 1.7;
    margin-bottom: 0;
    max-width: 700px;
}

.archive-count {
    color: var(--text-light);
    font-size: 0.925rem;
    font-weight: 500;
    margin-top: 1rem;
    margin-bottom: 0;
}

.archive-count strong {
    color: var(--primary-color);
}

/* Post Cards Grid */
.post-card {
    background: #ffffff;
    border-radius: 1.25rem;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
}

.post-card:hover {
    box-shadow: 0 10px 25px -3px rgb(0 0 0 / 0.1), 0 4px 6px -2px rgb(0 0 0 / 0.05);
    transform: translateY(-4px);
    text-decoration: none;
    color: inherit;
}

.post-card-thumbnail {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/9;
}

.post-card-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.post-card:hover .post-card-thumbnail img {
    transform: scale(1.05);
}

.post-card-thumbnail-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.post-card-thumbnail-placeholder i {
    font-size: 2.5rem;
    color: #cbd5e1;
}

.post-card-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.post-card-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.75rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.3s ease;
}

.post-card:hover .post-card-title {
    color: var(--primary-color);
}

.post-card-excerpt {
    color: var(--text-light);
    font-size: 0.925rem;
    line-height: 1.6;
    margin-bottom: 1.25rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.post-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 1rem;
    border-top: 1px solid #f1f5f9;
    margin-top: auto;
}

.post-card-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.8rem;
    color: var(--text-light);
}

.post-card-meta i {
    color: var(--primary-color);
    margin-right: 0.25rem;
}

.post-card-readmore {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary-color);
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    transition: gap 0.3s ease;
}

.post-card:hover .post-card-readmore {
    gap: 0.625rem;
}

.post-card-readmore.is-video {
    color: #dc2626;
}

/* Play Overlay for Video Cards */
.post-card-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 54px;
    height: 54px;
    background: rgba(0, 0, 0, 0.75);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.post-card-play i {
    color: #ffffff;
    font-size: 1.25rem;
    margin-left: 3px;
}

.post-card:hover .post-card-play {
    background: var(--primary-color);
    transform: translate(-50%, -50%) scale(1.1);
}


/* Pagination */
.archive-pagination {
    margin-top: 3rem;
}

.archive-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 0.75rem;
    font-weight: 600;
    font-size: 0.925rem;
    text-decoration: none;
    transition: all 0.3s ease;
    background: #ffffff;
    color: var(--text-dark);
    box-shadow: 0 2px 4px rgb(0 0 0 / 0.05);
    margin: 0 0.25rem;
}

.archive-pagination .page-numbers:hover {
    background: #eff6ff;
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgb(0 0 0 / 0.1);
}

.archive-pagination .page-numbers.current {
    background: var(--primary-color);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(30, 64, 175, 0.3);
}

.archive-pagination .page-numbers.dots {
    background: none;
    box-shadow: none;
    color: var(--text-light);
    pointer-events: none;
}

.archive-pagination .page-numbers.prev,
.archive-pagination .page-numbers.next {
    width: auto;
    padding: 0 1.25rem;
    gap: 0.5rem;
}

/* Empty State */
.archive-empty {
    background: #ffffff;
    border-radius: 1.5rem;
    padding: 4rem 2rem;
    text-align: center;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
}

.archive-empty-icon {
    font-size: 3rem;
    color: #cbd5e1;
    margin-bottom: 1.5rem;
}

.archive-empty-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.75rem;
}

.archive-empty-text {
    color: var(--text-light);
    font-size: 1rem;
    margin-bottom: 2rem;
}

/* Sidebar */
.sidebar-section {
    background: #ffffff;
    border-radius: 1.5rem;
    padding: 2rem;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    margin-bottom: 2rem;
}

.sidebar-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 3px solid var(--primary-color);
    display: inline-block;
}

/* Category List */
.sidebar-category-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-category-item {
    margin-bottom: 0;
}

.sidebar-category-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    font-size: 0.925rem;
    transition: all 0.3s ease;
}

.sidebar-category-link:hover {
    background: #eff6ff;
    color: var(--primary-color);
    text-decoration: none;
}

.sidebar-category-link.active {
    background: var(--primary-color);
    color: #ffffff;
}

.sidebar-category-count {
    background: #f1f5f9;
    color: var(--text-light);
    padding: 0.2rem 0.625rem;
    border-radius: 2rem;
    font-size: 0.75rem;
    font-weight: 600;
    min-width: 28px;
    text-align: center;
    transition: all 0.3s ease;
}

.sidebar-category-link:hover .sidebar-category-count {
    background: #dbeafe;
    color: var(--primary-color);
}

.sidebar-category-link.active .sidebar-category-count {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

/* Recent Posts Sidebar */
.sidebar-recent-item {
    display: flex;
    gap: 1rem;
    padding: 0.875rem 0;
    border-bottom: 1px solid #f1f5f9;
    text-decoration: none;
    transition: all 0.3s ease;
}

.sidebar-recent-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.sidebar-recent-item:first-child {
    padding-top: 0;
}

.sidebar-recent-item:hover {
    text-decoration: none;
}

.sidebar-recent-thumb {
    flex-shrink: 0;
    width: 70px;
    height: 70px;
    border-radius: 0.75rem;
    overflow: hidden;
}

.sidebar-recent-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.sidebar-recent-item:hover .sidebar-recent-thumb img {
    transform: scale(1.05);
}

.sidebar-recent-info {
    flex: 1;
    min-width: 0;
}

.sidebar-recent-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.25rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.3s ease;
}

.sidebar-recent-item:hover .sidebar-recent-title {
    color: var(--primary-color);
}

.sidebar-recent-date {
    font-size: 0.75rem;
    color: var(--text-light);
}

/* Responsive */
@media (max-width: 991.98px) {
    .archive-header {
        padding: 2rem;
    }

    .archive-title {
        font-size: 1.875rem;
    }
}

@media (max-width: 768px) {
    .archive-container {
        padding: 1.5rem 0 3rem;
    }

    .archive-header {
        padding: 1.5rem;
    }

    .archive-title {
        font-size: 1.5rem;
    }

    .archive-description {
        font-size: 1rem;
    }

    .post-card-body {
        padding: 1.25rem;
    }

    .post-card-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
}

@media (max-width: 576px) {
    .archive-title {
        font-size: 1.375rem;
    }
}

/* Biblioteca /conteudos/: atalhos para os temas */
.archive-temas {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1.25rem;
}

.archive-tema {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.9rem;
    border-radius: 2rem;
    background: #f1f5f9;
    color: var(--text-dark);
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}

.archive-tema:hover {
    background: var(--primary-color);
    color: #ffffff;
}

.archive-tema small {
    font-size: 0.75rem;
    opacity: 0.7;
}

@media (max-width: 576px) {
    .archive-tema {
        font-size: 0.8125rem;
        padding: 0.4rem 0.75rem;
    }
}
