/**
 * Category Page Layout Styles - Foxiz MorningNews Style
 *
 * @package Informativo_Angolano
 * @since 1.0.0
 */

/* ==========================================================================
   BASE STYLES
   ========================================================================== */
:root {
    --primary-color: #e63946;
    --primary-dark: #d62839;
    --secondary-color: #1a1a2e;
    --text-color: #333333;
    --text-light: #666666;
    --text-muted: #999999;
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --border-color: #e5e5e5;
    --transition-fast: 0.2s ease;
    --transition-base: 0.3s ease;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.1);
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
}

/* ==========================================================================
   CATEGORY PAGE CONTAINER
   ========================================================================== */
.category-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.category-content-wrapper {
    padding: 20px 0 40px;
}

@media (min-width: 768px) {
    .category-content-wrapper {
        padding: 30px 0 50px;
    }
}

@media (min-width: 992px) {
    .category-content-wrapper {
        padding: 40px 0 60px;
    }
}

/* ==========================================================================
   CONTENT WRAPPER GRID - Sidebar on Right
   ========================================================================== */
.category-content-wrapper {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    align-items: start;
}

@media (min-width: 992px) {
    .category-content-wrapper {
        grid-template-columns: 1fr 300px;
        gap: 50px;
    }
}

@media (min-width: 1200px) {
    .category-content-wrapper {
        gap: 60px;
    }
}

/* Main Content - Left side on desktop */
.main-content.category-main-content {
    width: 100%;
    min-width: 0; /* Prevent grid blowout */
}

/* Sidebar - Right side on desktop */
.sidebar.right-sidebar {
    display: flex;
    flex-direction: column;
    gap: 30px;
    width: 100%;
}

@media (min-width: 992px) {
    .sidebar.right-sidebar {
        width: 300px;
    }
}

/* ==========================================================================
   CATEGORY ARCHIVE HEADER
   ========================================================================== */
.archive-header.category-archive-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 3px solid var(--primary-color);
}

@media (min-width: 768px) {
    .archive-header.category-archive-header {
        margin-bottom: 40px;
        padding-bottom: 24px;
    }
}

.archive-title.category-archive-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--secondary-color);
    margin: 0 0 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

@media (min-width: 768px) {
    .archive-title.category-archive-title {
        font-size: 32px;
    }
}

@media (min-width: 992px) {
    .archive-title.category-archive-title {
        font-size: 36px;
    }
}

.archive-description.category-archive-description {
    font-size: 15px;
    color: var(--text-light);
    line-height: 1.6;
    margin-top: 12px;
}

@media (min-width: 768px) {
    .archive-description.category-archive-description {
        font-size: 16px;
    }
}

/* ==========================================================================
   NEWS GRID - CATEGORY SPECIFIC
   ========================================================================== */
.category-grid-wrapper {
    margin-bottom: 40px;
}

.news-grid.category-news-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

@media (min-width: 576px) {
    .news-grid.category-news-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }
}

@media (min-width: 992px) {
    .news-grid.category-news-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 28px;
    }
}

@media (min-width: 1200px) {
    .news-grid.category-news-grid {
        gap: 32px;
    }
}

/* News Post Card */
.news-grid .news-post-card {
    background: var(--bg-white);
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: all var(--transition-base);
}

.news-grid .news-post-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.news-grid .news-post-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.news-grid .news-post-thumbnail {
    position: relative;
    height: 180px;
    overflow: hidden;
}

@media (min-width: 480px) {
    .news-grid .news-post-thumbnail {
        height: 200px;
    }
}

@media (min-width: 768px) {
    .news-grid .news-post-thumbnail {
        height: 220px;
    }
}

.news-grid .news-thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-base);
}

.news-grid .news-post-card:hover .news-thumb-img {
    transform: scale(1.05);
}

.news-grid .news-category-tag {
    position: absolute;
    top: 12px;
    left: 12px;
    display: inline-block;
    background: var(--primary-color);
    color: var(--bg-white);
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

@media (min-width: 768px) {
    .news-grid .news-category-tag {
        padding: 5px 12px;
        font-size: 11px;
    }
}

.news-grid .news-post-content {
    padding: 16px;
}

@media (min-width: 768px) {
    .news-grid .news-post-content {
        padding: 20px;
    }
}

.news-grid .news-post-title {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--secondary-color);
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color var(--transition-fast);
}

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

@media (min-width: 768px) {
    .news-grid .news-post-title {
        font-size: 16px;
    }
}

.news-grid .news-post-excerpt {
    font-size: 13px;
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@media (min-width: 768px) {
    .news-grid .news-post-excerpt {
        font-size: 14px;
    }
}

.news-grid .news-post-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-muted);
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

.news-grid .news-author {
    font-weight: 500;
}

.news-grid .news-separator {
    color: var(--border-color);
}

/* ==========================================================================
   PAGINATION
   ========================================================================== */
.pagination.category-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
}

.pagination.category-pagination .page-numbers {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    background: var(--bg-white);
    color: var(--text-color);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    transition: all var(--transition-fast);
}

.pagination.category-pagination .page-numbers:hover {
    background: var(--primary-color);
    color: var(--bg-white);
    border-color: var(--primary-color);
}

.pagination.category-pagination .page-numbers.current {
    background: var(--primary-color);
    color: var(--bg-white);
    border-color: var(--primary-color);
}

.pagination.category-pagination .page-numbers.prev,
.pagination.category-pagination .page-numbers.next {
    padding: 0 16px;
}

.pagination.category-pagination .page-numbers.dots {
    background: transparent;
    border-color: transparent;
}

/* ==========================================================================
   EMPTY STATE
   ========================================================================== */
.category-main-content .no-results {
    text-align: center;
    padding: 60px 20px;
}

.category-main-content .no-results h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 12px;
}

.category-main-content .no-results p {
    font-size: 15px;
    color: var(--text-light);
    line-height: 1.6;
}

/* ==========================================================================
   SIDEBAR - CATEGORY PAGE
   ========================================================================== */
.sidebar-widget {
    background: var(--bg-white);
    border-radius: var(--radius-md);
    padding: 20px;
    border: 1px solid var(--border-color);
}

@media (min-width: 768px) {
    .sidebar-widget {
        padding: 24px;
    }
}

.widget-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

@media (min-width: 768px) {
    .widget-title {
        font-size: 18px;
    }
}

.widget-icon {
    color: var(--primary-color);
}

/* Trending Posts Widget */
.trending-posts-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.trending-post-item {
    position: relative;
    padding-left: 32px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.trending-post-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.trending-number {
    position: absolute;
    left: 0;
    top: 2px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-color);
    color: var(--bg-white);
    font-size: 11px;
    font-weight: 700;
    border-radius: 50%;
}

.trending-title {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--text-color);
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color var(--transition-fast);
}

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

.trending-meta {
    font-size: 12px;
    color: var(--text-muted);
}

/* Newsletter Widget */
.newsletter-desc {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 16px;
    line-height: 1.5;
}

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

.newsletter-form input[type="email"] {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 14px;
    transition: border-color var(--transition-fast);
}

.newsletter-form input[type="email"]:focus {
    outline: none;
    border-color: var(--primary-color);
}

.newsletter-form button {
    padding: 12px 20px;
    background: var(--primary-color);
    color: var(--bg-white);
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--transition-fast);
}

.newsletter-form button:hover {
    background: var(--primary-dark);
}

/* Social Widget */
.social-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    background: var(--bg-light);
    color: var(--text-color);
    text-decoration: none;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    transition: all var(--transition-fast);
}

.social-link:hover {
    background: var(--primary-color);
    color: var(--bg-white);
    transform: translateX(4px);
}

/* ==========================================================================
   DARK MODE SUPPORT
   ========================================================================== */
body.dark-mode {
    --text-color: #e5e5e5;
    --text-light: #b0b0b0;
    --text-muted: #808080;
    --bg-light: #252525;
    --bg-white: #1a1a1a;
    --border-color: #333333;
    --secondary-color: #ffffff;
}

body.dark-mode .news-grid .news-post-card {
    background: #252525;
    border-color: #333;
}

body.dark-mode .news-grid .news-post-title {
    color: #ffffff;
}

body.dark-mode .news-grid .news-post-excerpt {
    color: #b0b0b0;
}

body.dark-mode .news-grid .news-post-meta {
    color: #808080;
    border-color: #333;
}

body.dark-mode .pagination.category-pagination {
    border-color: #333;
}

body.dark-mode .pagination.category-pagination .page-numbers {
    background: #252525;
    color: #e5e5e5;
    border-color: #333;
}

body.dark-mode .pagination.category-pagination .page-numbers:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

body.dark-mode .sidebar-widget {
    background: #252525;
    border-color: #333;
}

body.dark-mode .trending-title {
    color: #e5e5e5;
}

body.dark-mode .archive-title.category-archive-title {
    color: #ffffff;
}

body.dark-mode .archive-description.category-archive-description {
    color: #b0b0b0;
}

body.dark-mode .newsletter-form input[type="email"] {
    background: #333;
    border-color: #444;
    color: #e5e5e5;
}

body.dark-mode .social-link {
    background: #333;
    color: #e5e5e5;
}

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */
@media (max-width: 767px) {
    .archive-title.category-archive-title {
        font-size: 24px;
    }
}

@media (max-width: 479px) {
    .news-grid.category-news-grid {
        grid-template-columns: 1fr;
    }
    
    .archive-title.category-archive-title {
        font-size: 20px;
    }
    
    .news-grid .news-post-thumbnail {
        height: 160px;
    }
}

/* ==========================================================================
   PRINT STYLES
   ========================================================================== */
@media print {
    .sidebar {
        display: none;
    }
    
    .category-content-wrapper {
        grid-template-columns: 1fr;
    }
    
    .archive-header.category-archive-header {
        border-bottom: 1px solid #ccc;
    }
    
    .news-grid .news-post-card {
        box-shadow: none;
        border: 1px solid #ccc;
    }
}

