/* Unified Category/Subcategory Page Styles */

/* Category Tag - Simple Blue Button */
.category-tag-container {
    text-align: center;
    margin-bottom: 20px;
}

.category-tag {
    display: inline-block;
    background: #01a2dd;
    color: white;
    padding: 8px 20px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(1, 162, 221, 0.2);
}

/* Page Header */
.page-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 60px 0 40px;
    margin-bottom: 40px;
}

.page-header-content {
    text-align: center;
}

.breadcrumb-nav {
    margin-bottom: 20px;
    font-size: 14px;
}

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

.breadcrumb-link:hover {
    color: white;
}

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

.page-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 15px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.category-subtitle {
    font-size: 1.2rem;
    font-weight: 400;
    opacity: 0.9;
    display: block;
    margin-top: 10px;
}

.page-description {
    font-size: 1.1rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Subcategory Navigation - Match Main Navigation Styling */
.subcategory-nav {
    background: #01a2dd;
    border: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-top: 100px;
    border-radius: 8px;
    overflow: hidden;
}

/* Desktop-specific margin adjustments */
@media (min-width: 769px) {
    .main-content {
        margin-top: 240px !important;
    }
    
    .subcategory-nav {
        margin-top: 240px;
    }
}

.subcategory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 0;
}

.subcategory-item {
    display: flex;
    align-items: center;
    padding: 20px 16px;
    background: #01a2dd;
    text-decoration: none;
    color: white;
    transition: all 0.3s ease;
    border: none;
    border-right: 1px solid rgba(31, 180, 58, 0.2);
}

.subcategory-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: none;
    box-shadow: none;
    text-decoration: none;
    color: white;
}

.subcategory-item:last-child {
    border-right: none;
}

.subcategory-icon {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    color: white;
    font-size: 18px;
}

.subcategory-info h4 {
    margin: 0 0 5px 0;
    font-size: 1rem;
    font-weight: 600;
    color: white;
}

.subcategory-info p {
    margin: 0;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.4;
}

/* Articles Grid */
.articles-grid {
    display: grid;
    gap: 30px;
}

.article-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Make entire article card clickable */
.article-link {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

.article-link:hover {
    text-decoration: none;
    color: inherit;
}

.article-image {
    height: 200px;
    overflow: hidden;
    position: relative;
}

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

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

.default-image {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    font-size: 3rem;
}

.article-content {
    padding: 25px;
}

.article-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    font-size: 0.9rem;
}

.article-category {
    background: #007bff;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 500;
}

.article-date {
    color: #6c757d;
}

.article-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 15px;
    line-height: 1.3;
}

.article-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.article-title a:hover {
    color: #007bff;
}

.article-excerpt {
    color: #6c757d;
    line-height: 1.6;
    margin-bottom: 20px;
}

.article-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: #6c757d;
}

.read-time, .views {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Load More Section */
.load-more-section {
    margin: 40px 0;
}

.btn-lg {
    padding: 15px 30px;
    font-size: 1.1rem;
    font-weight: 600;
}

/* No Articles */
.no-articles {
    text-align: center;
    padding: 60px 20px;
    border: 2px dashed #dee2e6;
    background: #f8f9fa;
}

.no-articles i {
    color: #6c757d;
}

/* Sidebar */
.sidebar-widget {
    margin-bottom: 30px;
}

.sidebar-widget .card {
    border: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border-radius: 12px;
}

.sidebar-widget .card-header {
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    font-weight: 600;
    color: #333;
}

.category-stats {
    display: flex;
    gap: 20px;
    margin-top: 20px;
}

.stat-item {
    text-align: center;
    flex: 1;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: #007bff;
}

.stat-label {
    font-size: 0.9rem;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.subcategory-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.subcategory-list li {
    margin-bottom: 10px;
}

.subcategory-list a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: #f8f9fa;
    border-radius: 8px;
    color: #333;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.subcategory-list a:hover {
    background: #e9ecef;
    border-color: #007bff;
    text-decoration: none;
    color: #333;
}

.subcategory-list li.active a {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

.article-count {
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* Advertisements */
.advertisement {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.advertisement img {
    width: 100%;
    height: auto;
    transition: transform 0.3s ease;
}

.advertisement:hover img {
    transform: scale(1.02);
}

/* Responsive Design */
@media (max-width: 768px) {
    .page-title {
        font-size: 2rem;
    }
    
    .subcategory-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .subcategory-item {
        border-right: none;
        border-bottom: 1px solid rgba(31, 180, 58, 0.2);
    }
    
    .subcategory-item:last-child {
        border-bottom: none;
    }
    
    .category-stats {
        flex-direction: column;
        gap: 15px;
    }
    
    .article-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .article-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    /* Mobile Article Card Improvements */
    .article-card {
        margin-bottom: 1.5rem;
        border-radius: 15px;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    }
    
    .article-content {
        padding: 1.5rem;
    }
    
    /* Mobile Font Size Improvements */
    .article-title {
        font-size: 1.3rem !important;
        font-weight: 700;
        line-height: 1.3;
        margin-bottom: 1rem;
    }
    
    .article-excerpt {
        font-size: 1rem !important;
        line-height: 1.6;
        margin-bottom: 1.25rem;
        color: #555;
    }
    
    .article-meta {
        font-size: 0.95rem;
    }
    
    .article-date {
        font-weight: 500;
        color: #666;
    }
    
    .read-time {
        font-weight: 500;
        color: #666;
    }
    
    /* Category Tags Mobile Improvements */
    .story-category,
    .card-category {
        font-size: 0.8rem !important;
        padding: 0.5rem 1rem;
        margin-bottom: 1rem;
        border-radius: 8px;
    }
    
    /* Articles Grid Mobile Improvements - Copy from Homepage */
    .articles-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
        padding: 0 1rem;
    }

    .article-image {
        height: 140px !important;
    }
    
    .article-card .article-content {
        padding: 0.5rem;
    }
    
    .article-card .article-title {
        font-size: 0.75rem;
    }
    
    .articles-grid-section {
        padding: 0;
    }
    
    /* Page Header Mobile Improvements */
    .page-header {
        padding: 2rem 0 1.5rem;
        margin-bottom: 2rem;
    }
    
    .page-title {
        font-size: 2.2rem;
        margin-bottom: 1rem;
    }
    
    .category-subtitle {
        font-size: 1.1rem;
    }
    
    .page-description {
        font-size: 1rem;
        padding: 0 1rem;
    }
}

@media (max-width: 576px) {
    .page-header {
        padding: 1.5rem 0 1rem;
        margin-bottom: 1.5rem;
    }
    
    .page-title {
        font-size: 1.8rem;
        margin-bottom: 0.75rem;
    }
    
    .category-subtitle {
        font-size: 1rem;
    }
    
    .page-description {
        font-size: 0.95rem;
        padding: 0 0.75rem;
    }
    
    .article-content {
        padding: 1.25rem;
    }
    
    .article-title {
        font-size: 1.2rem !important;
        margin-bottom: 0.875rem;
    }
    
    .article-excerpt {
        font-size: 0.95rem !important;
        margin-bottom: 1rem;
    }
    
    .article-meta {
        font-size: 0.9rem;
    }
    
    .articles-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
        padding: 0 0.75rem;
    }
    
    .article-card {
        margin-bottom: 1.25rem;
        border-radius: 12px;
    }
    
    .story-category,
    .card-category {
        font-size: 0.75rem !important;
        padding: 0.4rem 0.8rem;
        margin-bottom: 0.875rem;
    }
}

/* Category Tags - Positioned above titles */
.story-category,
.card-category {
    background: #01a2dd;
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
    margin-bottom: 0.8rem;
    box-shadow: 0 2px 4px rgba(1, 162, 221, 0.2);
    position: static !important;
    top: auto !important;
    left: auto !important;
}

.story-category {
    margin-bottom: 1rem;
}

.card-category {
    margin-bottom: 0.6rem;
}

/* Ensure category tags are NOT inside image containers */
.card-image .card-category,
.card-image .story-category,
.story-image .story-category,
.story-image .card-category,
.article-image .category-label {
    display: none !important;
}
