/* Category Page Styles */

/* Category Header */
.category-header {
    background-color: var(--secondary-color);
    padding: 24px 0;
}

.category-header h1 {
    font-size: 36px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 16px;
}

.category-nav ul {
    display: flex;
    list-style: none;
    gap: 4px;
    overflow-x: auto;
    padding-bottom: 8px;
}

.category-nav a {
    display: block;
    padding: 8px 16px;
    color: #ffffff;
    font-size: 14px;
    font-weight: 500;
    border-radius: 3px;
    white-space: nowrap;
    transition: background-color 0.2s;
}

.category-nav a:hover,
.category-nav a.active {
    background-color: var(--primary-color);
}

/* Category Hero */
.category-hero {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
    margin-bottom: 40px;
}

.hero-feature a {
    display: block;
}

.hero-feature-image {
    overflow: hidden;
}

.hero-feature-image img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    transition: transform 0.3s;
}

.hero-feature:hover .hero-feature-image img {
    transform: scale(1.02);
}

.hero-feature-content {
    padding: 20px 0;
}

.hero-feature-content h2 {
    font-size: 28px;
    line-height: 1.2;
    margin-bottom: 12px;
    color: var(--link-color);
}

.hero-feature:hover .hero-feature-content h2 {
    color: var(--link-hover);
}

.hero-feature-content p {
    font-size: 16px;
    color: var(--text-light);
    margin-bottom: 12px;
    line-height: 1.5;
}

/* Hero Secondary */
.hero-secondary {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.secondary-story a {
    display: block;
}

.secondary-story img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    transition: opacity 0.2s;
}

.secondary-story:hover img {
    opacity: 0.9;
}

.secondary-content {
    padding: 12px 0;
}

.secondary-content h3 {
    font-size: 16px;
    line-height: 1.3;
    margin-bottom: 8px;
    color: var(--link-color);
}

.secondary-story:hover .secondary-content h3 {
    color: var(--link-hover);
}

/* Category Stories */
.category-stories {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 40px;
    margin-bottom: 40px;
}

.stories-main {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.category-story a {
    display: block;
}

.category-story img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s;
}

.category-story:hover img {
    transform: scale(1.02);
}

.category-story-content {
    padding: 16px 0;
}

.category-story-content .category-tag {
    font-size: 11px;
    padding: 3px 8px;
}

.category-story-content h3 {
    font-size: 18px;
    line-height: 1.3;
    margin-bottom: 8px;
    color: var(--link-color);
}

.category-story:hover .category-story-content h3 {
    color: var(--link-hover);
}

.category-story-content p {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 8px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Category Sidebar */
.category-sidebar {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.sidebar-widget {
    background-color: var(--background-gray);
    padding: 20px;
}

.sidebar-widget h3 {
    font-size: 18px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--primary-color);
}

/* Most Read Widget */
.most-read-widget {
    list-style: none;
    counter-reset: most-read;
}

.most-read-widget li {
    counter-increment: most-read;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}

.most-read-widget li:last-child {
    border-bottom: none;
}

.most-read-widget a {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 14px;
    line-height: 1.4;
    color: var(--link-color);
    transition: color 0.2s;
}

.most-read-widget a::before {
    content: counter(most-read);
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-color);
    flex-shrink: 0;
}

.most-read-widget a:hover {
    color: var(--link-hover);
}

/* Video Widget */
.video-widget {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.video-item a {
    display: block;
}

.video-thumbnail {
    position: relative;
}

.video-thumbnail img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    background-color: rgba(0, 0, 0, 0.7);
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: background-color 0.2s;
}

.video-item:hover .play-button {
    background-color: var(--primary-color);
}

.video-duration {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background-color: rgba(0, 0, 0, 0.8);
    color: #ffffff;
    padding: 2px 6px;
    font-size: 12px;
    font-weight: 500;
}

.video-item h4 {
    font-size: 14px;
    line-height: 1.4;
    margin-top: 10px;
    color: var(--link-color);
}

.video-item:hover h4 {
    color: var(--link-hover);
}

/* Features Widget */
.feature-item {
    margin-bottom: 16px;
}

.feature-item:last-child {
    margin-bottom: 0;
}

.feature-item a {
    display: block;
}

.feature-item img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    transition: opacity 0.2s;
}

.feature-item:hover img {
    opacity: 0.9;
}

.feature-item h4 {
    font-size: 14px;
    line-height: 1.4;
    margin-top: 10px;
    color: var(--link-color);
}

.feature-item:hover h4 {
    color: var(--link-hover);
}

/* More Category Stories */
.more-category-stories {
    padding-top: 32px;
    border-top: 1px solid var(--border-color);
}

.story-list-vertical {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 32px;
}

.list-story-horizontal a {
    display: flex;
    gap: 20px;
    padding: 16px;
    background-color: var(--background-gray);
    transition: background-color 0.2s;
}

.list-story-horizontal:hover a {
    background-color: #e8e8e8;
}

.list-story-horizontal img {
    width: 180px;
    height: 120px;
    object-fit: cover;
    flex-shrink: 0;
}

.list-story-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.list-story-content .category-tag {
    font-size: 10px;
    padding: 2px 6px;
    align-self: flex-start;
    margin-bottom: 8px;
}

.list-story-content h4 {
    font-size: 18px;
    line-height: 1.3;
    margin-bottom: 8px;
    color: var(--link-color);
}

.list-story-horizontal:hover .list-story-content h4 {
    color: var(--link-hover);
}

.list-story-content p {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 8px;
    line-height: 1.4;
}

/* Load More */
.load-more {
    text-align: center;
    padding: 20px 0;
}

.load-more-btn {
    padding: 12px 32px;
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    background-color: var(--primary-color);
    border: none;
    border-radius: 3px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.load-more-btn:hover {
    background-color: #990000;
}

/* Responsive */
@media (max-width: 1024px) {
    .category-stories {
        grid-template-columns: 1fr;
    }

    .stories-main {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .category-hero {
        grid-template-columns: 1fr;
    }

    .hero-feature-image img {
        height: 250px;
    }

    .hero-feature-content h2 {
        font-size: 22px;
    }

    .hero-secondary {
        flex-direction: row;
        gap: 16px;
    }

    .secondary-story {
        flex: 1;
    }

    .secondary-story img {
        height: 120px;
    }

    .stories-main {
        grid-template-columns: 1fr;
    }

    .category-header h1 {
        font-size: 28px;
    }

    .list-story-horizontal a {
        flex-direction: column;
    }

    .list-story-horizontal img {
        width: 100%;
        height: 180px;
    }
}

@media (max-width: 480px) {
    .hero-secondary {
        flex-direction: column;
    }

    .category-nav ul {
        gap: 2px;
    }

    .category-nav a {
        padding: 6px 12px;
        font-size: 13px;
    }
}
