/* Archive/Category Page - Style based on cacmuc.html */

/* Variables */
:root {
    --td-title-color: #f3d079;
    --td-content-color: #222222;
    --td-border-color: #f6d97e;
    --td-bg-light: #f7f3ee;
    --td-bg-dark: #181923;
}

/* Outer Wrap */
.td-outer-wrap {
    background: var(--td-bg-light);
    min-height: 100vh;
}

/* Header */
.td-header-wrap {
    background: var(--td-bg-dark);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.td-header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.td-logo img {
    height: 45px;
    width: auto;
}

.td-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #fff;
    padding: 0.5rem 1rem;
    background: rgba(255,255,255,0.1);
    border-radius: 5px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.td-back-btn:hover {
    background: var(--td-title-color);
    color: #000;
}

/* Main Content */
.td-main-content-wrap {
    padding: 2rem 0;
}

.td-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Breadcrumbs */
.td-breadcrumbs {
    font-size: 13px;
    color: #666;
    margin-bottom: 1rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.td-breadcrumbs a {
    color: #666;
}

.td-breadcrumbs a:hover {
    color: var(--td-title-color);
}

.td-bread-sep {
    font-size: 10px;
    color: #999;
}

.td-bread-current {
    color: #999;
}

/* Category Title */
.td-category-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--td-title-color);
    margin-bottom: 1.5rem;
    text-transform: uppercase;
}

/* Featured Grid */
.td-featured-grid {
    display: flex;
    gap: 5px;
    margin-bottom: 2rem;
}

.td-featured-big {
    flex: 0 0 50%;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.td-featured-small {
    flex: 0 0 50%;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 5px;
}

.td-featured-item {
    position: relative;
    overflow: hidden;
    border-radius: 5px;
}

.td-featured-thumb {
    display: block;
    position: relative;
    width: 100%;
    height: 100%;
}

.td-featured-large .td-featured-thumb {
    height: 170px;
}

.td-featured-mini .td-featured-thumb {
    height: 130px;
}

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

.td-featured-item:hover .td-featured-thumb img {
    transform: scale(1.05);
}

.td-featured-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 15px;
    background: linear-gradient(0deg, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0) 100%);
    color: #fff;
}

.td-featured-large .td-featured-title {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.3;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.td-featured-mini .td-featured-title {
    font-size: 13px;
    font-weight: 500;
    line-height: 1.3;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.td-featured-mini .td-featured-overlay {
    padding: 10px;
}

.td-featured-cat {
    display: inline-block;
    background: rgba(243, 208, 121, 0.33);
    padding: 2px 7px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    border-radius: 3px;
    margin-bottom: 5px;
}

.td-featured-date {
    display: block;
    font-size: 12px;
    color: rgba(255,255,255,0.8);
    margin-top: 5px;
}

.td-featured-mini .td-featured-cat,
.td-featured-mini .td-featured-date {
    display: none;
}

/* Content Row */
.td-content-row {
    display: flex;
    gap: 30px;
}

.td-main-column {
    flex: 1;
    max-width: calc(100% - 330px);
}

.td-sidebar {
    width: 300px;
    flex-shrink: 0;
}

/* Posts Grid */
.td-posts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 36px 48px;
}

.td-post-item {
    background: #fff;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.td-post-thumb {
    display: block;
    position: relative;
    width: 100%;
    padding-bottom: 50%;
    overflow: hidden;
}

.td-post-thumb img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.td-post-item:hover .td-post-thumb img {
    transform: scale(1.05);
}

.td-post-cat {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: var(--td-title-color);
    color: #000;
    padding: 3px 8px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    border-radius: 3px;
    z-index: 1;
}

.td-post-info {
    padding: 15px;
}

.td-post-title {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
    margin: 0 0 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.td-post-title a {
    color: #333;
}

.td-post-title a:hover {
    color: var(--td-title-color);
}

.td-post-meta {
    font-size: 13px;
    color: #666;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.3rem;
}

.td-post-author a {
    color: #666;
}

.td-post-author a:hover {
    color: var(--td-title-color);
}

.td-post-comments a {
    color: #666;
    margin-left: auto;
}

.td-post-comments a:before {
    content: '\f075';
    font-family: 'Font Awesome 6 Free';
    font-weight: 400;
    margin-right: 5px;
}

/* Pagination */
.td-pagination {
    margin-top: 2rem;
    display: flex;
    justify-content: center;
    gap: 5px;
    flex-wrap: wrap;
}

.td-pagination a,
.td-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 35px;
    height: 35px;
    padding: 0 10px;
    background: #fff;
    color: #333;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.td-pagination a:hover {
    background: var(--td-title-color);
    color: #000;
}

.td-pagination .current {
    background: var(--td-title-color);
    color: #000;
}

.td-pagination .prev,
.td-pagination .next {
    background: transparent;
}

.td-pagination .prev:hover,
.td-pagination .next:hover {
    background: var(--td-title-color);
}

/* Sidebar */
.td-sidebar-block {
    background: #fff;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.td-block-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--td-title-color);
    padding-bottom: 0.75rem;
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--td-border-color);
}

/* Popular Posts */
.td-popular-item {
    display: flex;
    gap: 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid #eee;
}

.td-popular-item:last-child {
    border-bottom: none;
}

.td-popular-number {
    width: 30px;
    height: 30px;
    background: var(--td-title-color);
    color: #000;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 5px;
    flex-shrink: 0;
}

.td-popular-info {
    flex: 1;
    min-width: 0;
}

.td-popular-title {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    margin-bottom: 0.25rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.td-popular-title a {
    color: #333;
}

.td-popular-title a:hover {
    color: var(--td-title-color);
}

.td-popular-date {
    font-size: 12px;
    color: #999;
}

/* Recent Posts */
.td-recent-item {
    display: flex;
    gap: 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid #eee;
}

.td-recent-item:last-child {
    border-bottom: none;
}

.td-recent-thumb {
    width: 80px;
    height: 60px;
    flex-shrink: 0;
    border-radius: 5px;
    overflow: hidden;
}

.td-recent-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

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

.td-recent-title {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    margin-bottom: 0.25rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.td-recent-title a {
    color: #333;
}

.td-recent-title a:hover {
    color: var(--td-title-color);
}

.td-recent-date {
    font-size: 12px;
    color: #999;
}

/* No Posts */
.td-no-posts {
    text-align: center;
    padding: 3rem;
    background: #fff;
    border-radius: 8px;
}

.td-no-posts p {
    color: #666;
    margin: 0;
}

/* Footer */
.td-footer-wrap {
    background: var(--td-bg-dark);
    padding: 1.5rem 0;
    margin-top: 2rem;
}

.td-footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: center;
}

.td-footer-container p {
    color: #888;
    font-size: 14px;
    margin: 0;
}

/* Responsive */
@media screen and (max-width: 1024px) {
    .td-featured-grid {
        flex-direction: column;
    }

    .td-featured-big {
        flex: 0 0 100%;
        flex-direction: row;
    }

    .td-featured-big .td-featured-item {
        flex: 1;
    }

    .td-featured-small {
        flex: 0 0 100%;
    }

    .td-content-row {
        flex-direction: column;
    }

    .td-main-column {
        max-width: 100%;
    }

    .td-sidebar {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .td-sidebar-block {
        margin-bottom: 0;
    }
}

@media screen and (max-width: 768px) {
    .td-header-container {
        padding: 0 15px;
    }

    .td-logo img {
        height: 35px;
    }

    .td-back-btn span {
        display: none;
    }

    .td-back-btn {
        width: 40px;
        height: 40px;
        padding: 0;
        justify-content: center;
    }

    .td-container {
        padding: 0 15px;
    }

    .td-category-title {
        font-size: 1.5rem;
    }

    .td-featured-big {
        flex-direction: column;
    }

    .td-featured-large .td-featured-thumb {
        height: 200px;
    }

    .td-featured-small {
        grid-template-columns: repeat(3, 1fr);
    }

    .td-posts-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .td-sidebar {
        grid-template-columns: 1fr;
    }
}

@media screen and (max-width: 480px) {
    .td-featured-small {
        grid-template-columns: repeat(2, 1fr);
    }

    .td-featured-mini .td-featured-thumb {
        height: 100px;
    }

    .td-post-info {
        padding: 12px;
    }

    .td-post-title {
        font-size: 15px;
    }
}
