/* ============================================
   CATEGORY PAGE STYLES
   ============================================ */

/* Category Main Container */
.category-main {
    position: relative;
}

/* Category Hero */
.cat-hero {
    position: relative;
    height: 300px;
    margin-bottom: 60px;
    overflow: hidden;
}

.cat-hero-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.cat-hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.cat-hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.8);
}

.cat-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, 
        rgba(44, 24, 16, 0.8) 0%,
        rgba(74, 50, 42, 0.9) 100%);
}

.cat-hero-content {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    color: white;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;

}

/* Breadcrumb */
.cat-breadcrumb {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 25px;
    font-size: 0.9rem;
}

.cat-breadcrumb-item {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s ease;
}

.cat-breadcrumb-item:hover {
    color: white;
    text-decoration: underline;
}

.cat-breadcrumb i {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
}

.cat-breadcrumb-current {
    color: white;
    font-weight: 600;
}

/* Hero Title */
.cat-hero-title {
    font-family: 'Playfair Display', serif;
    font-size: 4rem;
    font-weight: 700;
    color: white;
    line-height: 1.1;
    margin-bottom: 20px;
}

.cat-hero-description {
    font-size: 1.3rem;
    color: rgba(255, 255, 255, 0.9);
    max-width: 700px;
    line-height: 1.6;
    text-align: center;
}

/* Hero Stats */
.cat-hero-stats {
    display: flex;
    gap: 40px;
    margin-top: 30px;
}

.cat-stat-item {
    text-align: center;
}

.cat-stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: white;
    line-height: 1;
    margin-bottom: 5px;
    font-family: 'Playfair Display', serif;
}

.cat-stat-label {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.cat-stat-divider {
    width: 1px;
    height: 60px;
    background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.3), transparent);
}

/* Category Content Area */
.cat-content-area {
    padding: 0 5% 80px;
}

.cat-container {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    /*grid-template-columns: 280px 1fr;*/
    gap: 40px;
}

/* Sidebar */
.cat-sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
}

/* Filter Widgets */
.cat-filter-widget {
    background: white;
    padding: 25px;
    border-radius: 15px;
    margin-bottom: 25px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(215, 204, 200, 0.3);
}

.cat-filter-title {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #2c1810;
    font-size: 1.2rem;
    margin-bottom: 20px;
}

.cat-filter-title i {
    color: #8d6e63;
}

/* Filter Options */
.cat-filter-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cat-filter-option {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    padding: 8px 0;
    user-select: none;
}

.cat-filter-checkbox {
    width: 20px;
    height: 20px;
    border: 2px solid #d7ccc8;
    border-radius: 4px;
    position: relative;
    transition: all 0.3s ease;
}

.cat-filter-option input {
    display: none;
}

.cat-filter-option input:checked + .cat-filter-checkbox {
    background: #5d4037;
    border-color: #5d4037;
}

.cat-filter-option input:checked + .cat-filter-checkbox::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 0.8rem;
    font-weight: bold;
}

.cat-filter-text {
    flex: 1;
    color: #5d4037;
    font-weight: 500;
}

.cat-filter-count {
    color: #8d6e63;
    font-size: 0.85rem;
}

/* Sort Select */
.cat-sort-select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #d7ccc8;
    border-radius: 8px;
    background: white;
    color: #5d4037;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cat-sort-select:focus {
    outline: none;
    border-color: #8d6e63;
    box-shadow: 0 0 0 3px rgba(141, 110, 99, 0.1);
}

/* Popular Posts */
.cat-popular-item {
    display: flex;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid rgba(215, 204, 200, 0.3);
}

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

.cat-popular-image {
    width: 60px;
    height: 60px;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
}

.cat-popular-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cat-popular-content h4 {
    color: #2c1810;
    font-size: 1rem;
    margin-bottom: 6px;
    line-height: 1.3;
}

.cat-popular-meta {
    display: flex;
    gap: 8px;
    color: #8d6e63;
    font-size: 0.85rem;
}

/* Subscribe Widget */
.cat-subscribe-widget p {
    color: #5d4037;
    margin-bottom: 20px;
    font-size: 0.95rem;
    line-height: 1.5;
}

.cat-subscribe-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cat-email-input {
    padding: 12px;
    border: 2px solid #d7ccc8;
    border-radius: 8px;
    font-size: 0.95rem;
    color: #5d4037;
    transition: all 0.3s ease;
}

.cat-email-input:focus {
    outline: none;
    border-color: #8d6e63;
}

.cat-subscribe-btn {
    background: #5d4037;
    color: white;
    border: none;
    padding: 12px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cat-subscribe-btn:hover {
    background: #4a332c;
}

/* Main Content */
.cat-main-content {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

/* Grid Header */
.cat-grid-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.cat-grid-title {
    font-family: 'Playfair Display', serif;
    font-size: 2.2rem;
    color: #2c1810;
    margin: 0;
}

.cat-grid-meta {
    display: flex;
    align-items: center;
    gap: 25px;
}

.cat-showing {
    color: #8d6e63;
    font-size: 0.95rem;
}

.cat-view-toggle {
    display: flex;
    gap: 10px;
    background: white;
    padding: 6px;
    border-radius: 10px;
    border: 1px solid rgba(215, 204, 200, 0.5);
}

.cat-view-btn {
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: #8d6e63;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.cat-view-btn.active,
.cat-view-btn:hover {
    background: #5d4037;
    color: white;
}

/* Articles Grid */
.cat-articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

/* Article Card */
.cat-article-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    position: relative;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(215, 204, 200, 0.3);
}

.cat-article-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(93, 64, 55, 0.1);
    border-color: rgba(141, 110, 99, 0.3);
}

.cat-featured-article {
    border: 2px solid #ff8e53;
    box-shadow: 0 15px 35px rgba(255, 142, 83, 0.1);
}

.cat-featured-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 10;
    background: linear-gradient(135deg, #ff8e53, #ff6b35);
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 5px 15px rgba(255, 107, 53, 0.3);
}

/* Article Image */
.cat-article-image {
    position: relative;
    height: 260px;
    overflow: hidden;
}

.cat-article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.cat-article-card:hover .cat-article-image img {
    transform: scale(1.1);
}

.cat-article-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, 
        transparent 50%,
        rgba(44, 24, 16, 0.3) 100%);
}

.cat-article-category {
    position: absolute;
    top: 20px;
    left: 20px;
    background: rgba(255, 255, 255, 0.95);
    color: #5d4037;
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cat-article-level {
    position: absolute;
    bottom: 20px;
    left: 20px;
    background: rgba(44, 24, 16, 0.8);
    color: white;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Article Content */
.cat-article-content {
    padding: 25px;
}

.cat-article-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    font-size: 0.85rem;
    color: #8d6e63;
}

.cat-article-date,
.cat-article-time {
    display: flex;
    align-items: center;
    gap: 6px;
}

.cat-article-title {
    margin-bottom: 15px;
}

.cat-article-link {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: #2c1810;
    text-decoration: none;
    line-height: 1.3;
    transition: color 0.3s ease;
}

.cat-article-link:hover {
    color: #5d4037;
    text-decoration: underline;
}

.cat-article-excerpt {
    color: #5d4037;
    line-height: 1.6;
    margin-bottom: 20px;
    font-size: 0.95rem;
}

/* Article Footer */
.cat-article-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    border-top: 1px solid rgba(215, 204, 200, 0.5);
}

.cat-article-author {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cat-author-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid white;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.cat-author-name {
    font-weight: 600;
    color: #2c1810;
    font-size: 0.95rem;
}

.cat-article-stats {
    display: flex;
    gap: 20px;
}

.cat-stat {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #8d6e63;
    font-size: 0.9rem;
}

.cat-stat i {
    font-size: 1rem;
}

/* Pagination */
.cat-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px 0;
    border-top: 1px solid rgba(215, 204, 200, 0.5);
}

.cat-page-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    background: white;
    color: #5d4037;
    border: 2px solid #d7ccc8;
    padding: 12px 25px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cat-page-btn:hover {
    background: #5d4037;
    color: white;
    border-color: #5d4037;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(93, 64, 55, 0.2);
}

.cat-page-numbers {
    display: flex;
    gap: 10px;
}

.cat-page-number {
    width: 45px;
    height: 45px;
    background: white;
    border: 2px solid #d7ccc8;
    border-radius: 8px;
    color: #5d4037;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cat-page-number.active,
.cat-page-number:hover {
    background: #5d4037;
    color: white;
    border-color: #5d4037;
}

.cat-page-ellipsis {
    display: flex;
    align-items: center;
    color: #8d6e63;
    font-weight: 600;
    padding: 0 5px;
}

/* Category Newsletter */
.cat-newsletter {
    background: linear-gradient(135deg, #5d4037, #8d6e63);
    padding: 60px 5%;
    margin-top: 60px;
}

.cat-newsletter-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 60px;
    flex-wrap: wrap;
}

.cat-newsletter-content {
    flex: 1;
    min-width: 300px;
}

.cat-newsletter-title {
    display: flex;
    align-items: center;
    gap: 15px;
    color: white;
    font-size: 2.2rem;
    margin-bottom: 15px;
}

.cat-newsletter-title i {
    color: #ffcc80;
}

.cat-newsletter-text {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    line-height: 1.6;
    max-width: 500px;
}

.cat-newsletter-form {
    flex: 0 0 400px;
}

.cat-newsletter-input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.cat-newsletter-input {
    flex: 1;
    padding: 16px 20px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    color: #2c1810;
}

.cat-newsletter-input:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2);
}

.cat-newsletter-submit {
    background: #ffcc80;
    color: #2c1810;
    border: none;
    padding: 16px 30px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.cat-newsletter-submit:hover {
    background: #ffb74d;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.cat-newsletter-note {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .cat-container {
        grid-template-columns: 250px 1fr;
        gap: 30px;
    }
    
    .cat-hero-title {
        font-size: 3.5rem;
    }
}

@media (max-width: 992px) {
    .cat-container {
        grid-template-columns: 1fr;
    }
    
    .cat-sidebar {
        position: static;
        order: 2;
    }
    
    .cat-main-content {
        order: 1;
    }
    
    .cat-hero {
        height: 350px;
    }
    
    .cat-hero-title {
        font-size: 3rem;
    }
    
    .cat-hero-description {
        font-size: 1.2rem;
    }
    
    .cat-articles-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
    
    .cat-newsletter-container {
        flex-direction: column;
        text-align: center;
        gap: 40px;
    }
    
    .cat-newsletter-form {
        flex: 1;
        width: 100%;
        max-width: 500px;
    }
}

@media (max-width: 768px) {
    .cat-hero {
        height: 300px;
    }
    
    .cat-hero-title {
        font-size: 2.5rem;
    }
    
    .cat-hero-description {
        font-size: 1.1rem;
    }
    
    .cat-hero-stats {
        gap: 30px;
    }
    
    .cat-stat-number {
        font-size: 2rem;
    }
    
    .cat-grid-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .cat-grid-meta {
        width: 100%;
        justify-content: space-between;
    }
    
    .cat-articles-grid {
        grid-template-columns: 1fr;
    }
    
    .cat-pagination {
        flex-direction: column;
        gap: 20px;
    }
}

@media (max-width: 576px) {
    .cat-hero {
        height: 280px;
    }
    
    .cat-hero-title {
        font-size: 2rem;
    }
    
    .cat-hero-description {
        font-size: 1rem;
    }
    
    .cat-hero-stats {
        flex-direction: column;
        gap: 20px;
        align-items: flex-start;
    }
    
    .cat-stat-divider {
        display: none;
    }
    
    .cat-newsletter-title {
        font-size: 1.8rem;
    }
    
    .cat-newsletter-input-group {
        flex-direction: column;
    }
    
    .cat-page-numbers {
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* Animation for articles */
@keyframes catArticleAppear {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cat-article-card {
    animation: catArticleAppear 0.6s ease-out forwards;
    opacity: 0;
}

.cat-article-card:nth-child(1) { animation-delay: 0.1s; }
.cat-article-card:nth-child(2) { animation-delay: 0.2s; }
.cat-article-card:nth-child(3) { animation-delay: 0.3s; }
.cat-article-card:nth-child(4) { animation-delay: 0.4s; }
.cat-article-card:nth-child(5) { animation-delay: 0.5s; }
.cat-article-card:nth-child(6) { animation-delay: 0.6s; }