/* Category Page Styles */

/* Hero Section */
.category-hero {
    background: linear-gradient(135deg, #3498db, #1a5276);
    color: #fff;
    padding: 60px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
    border-radius: 0 0 10px 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.category-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('../images/pattern.png');
    opacity: 0.1;
    z-index: 1;
}

.category-hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
}

.category-hero h1 {
    font-size: 2.8rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.category-hero p {
    font-size: 1.2rem;
    margin-bottom: 0;
    line-height: 1.6;
    opacity: 0.9;
}

/* Category Layout */
.category-content {
    padding: 60px 0;
}

.category-layout {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
}

.category-main {
    flex: 1;
    min-width: 0;
}

.category-sidebar {
    width: 320px;
}

/* Results Count */
.results-count {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e0e0e0;
}

.results-count p {
    margin: 0;
    font-size: 1rem;
    color: #666;
}

.results-count strong {
    color: #333;
}

/* Category Grid */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

/* Category Card */
.category-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

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

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

.category-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.category-card-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.category-card-title {
    font-size: 1.3rem;
    margin-top: 0;
    margin-bottom: 8px;
    line-height: 1.4;
}

.category-card-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.2s ease;
}

.category-card-title a:hover {
    color: #3498db;
}

.category-card-subtitle {
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 12px;
    font-style: italic;
}

.category-card-excerpt {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #555;
    margin-bottom: 15px;
}

.category-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 15px 0;
    font-size: 0.85rem;
    color: #777;
}

.category-card-date {
    display: flex;
    align-items: center;
}

.category-card-date i {
    margin-right: 5px;
    color: #3498db;
}

.category-card-tags {
    display: flex;
    gap: 5px;
}

.tag {
    display: inline-block;
    padding: 2px 8px;
    background-color: #f0f0f0;
    border-radius: 4px;
    color: #555;
    font-size: 0.8rem;
    text-decoration: none;
    transition: background-color 0.2s;
}

.tag:hover {
    background-color: #e0e0e0;
    color: #333;
}

.read-more {
    margin-top: auto;
    text-align: right;
    color: #3498db;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s;
    display: inline-block;
    align-self: flex-end;
}

.read-more i {
    margin-left: 5px;
    transition: transform 0.2s;
}

.read-more:hover {
    color: #2980b9;
}

.read-more:hover i {
    transform: translateX(3px);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 40px;
}

.page-numbers {
    display: flex;
    align-items: center;
}

.page-number {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    margin: 0 5px;
    border-radius: 50%;
    background: #f5f5f5;
    color: #555;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
}

.page-number:hover {
    background: #e0e0e0;
    color: #333;
}

.page-number.active {
    background: #3498db;
    color: #fff;
}

.page-link {
    display: flex;
    align-items: center;
    padding: 0 15px;
    height: 40px;
    background: #f5f5f5;
    border-radius: 20px;
    color: #555;
    text-decoration: none;
    font-weight: 500;
    margin: 0 10px;
    transition: all 0.2s;
}

.page-link:hover {
    background: #e0e0e0;
    color: #333;
}

.page-link.prev i {
    margin-right: 8px;
}

.page-link.next i {
    margin-left: 8px;
}

.page-ellipsis {
    margin: 0 5px;
    color: #777;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 50px 20px;
    background: #f9f9f9;
    border-radius: 10px;
    margin-bottom: 30px;
}

.no-results-icon {
    font-size: 3rem;
    color: #ccc;
    margin-bottom: 20px;
}

.no-results h2 {
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: #555;
}

.no-results p {
    margin-bottom: 25px;
    color: #777;
}

.no-results .btn {
    display: inline-block;
    padding: 10px 25px;
    background: #3498db;
    color: #fff;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 500;
    transition: background 0.2s;
}

.no-results .btn:hover {
    background: #2980b9;
}

/* Sidebar Widgets */
.sidebar-widget {
    background: #fff;
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.widget-title {
    font-size: 1.3rem;
    margin-top: 0;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
    color: #333;
    position: relative;
}

.widget-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 50px;
    height: 2px;
    background: #3498db;
}

/* Category List */
.category-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-list li {
    margin-bottom: 12px;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 12px;
}

.category-list li:last-child {
    margin-bottom: 0;
    border-bottom: none;
    padding-bottom: 0;
}

.category-list a {
    color: #555;
    text-decoration: none;
    display: block;
    transition: color 0.2s;
    font-size: 0.95rem;
}

.category-list a:hover {
    color: #3498db;
}

.category-list a i {
    margin-right: 8px;
    font-size: 0.8rem;
    color: #3498db;
    transition: transform 0.2s;
}

.category-list a:hover i {
    transform: translateX(3px);
}

/* Newsletter Widget */
.newsletter-widget p {
    margin-bottom: 15px;
    font-size: 0.95rem;
    color: #666;
    line-height: 1.6;
}

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

.newsletter-form input {
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.newsletter-form input:focus {
    outline: none;
    border-color: #3498db;
}

.newsletter-form button {
    padding: 12px;
    background: #3498db;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.2s;
}

.newsletter-form button:hover {
    background: #2980b9;
}

/* Featured Widget */
.featured-article {
    margin-top: 15px;
}

.featured-article img {
    width: 100%;
    border-radius: 8px;
    margin-bottom: 15px;
    height: 150px;
    object-fit: cover;
}

.featured-article h4 {
    font-size: 1.1rem;
    margin-top: 0;
    margin-bottom: 10px;
}

.featured-article h4 a {
    color: #333;
    text-decoration: none;
    transition: color 0.2s;
}

.featured-article h4 a:hover {
    color: #3498db;
}

.featured-article p {
    font-size: 0.9rem;
    line-height: 1.6;
    color: #666;
    margin-bottom: 15px;
}

.featured-article .read-more {
    font-size: 0.85rem;
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .category-grid {
        grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    }
}

@media (max-width: 768px) {
    .category-layout {
        flex-direction: column;
    }
    
    .category-sidebar {
        width: 100%;
        order: 2;
    }
    
    .category-main {
        order: 1;
    }
    
    .category-hero h1 {
        font-size: 2.2rem;
    }
    
    .category-hero p {
        font-size: 1rem;
    }
    
    .category-grid {
        grid-template-columns: repeat(auto-fill, minmax(100%, 1fr));
    }
}

@media (max-width: 480px) {
    .category-card-meta {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .category-card-tags {
        margin-top: 8px;
    }
    
    .category-hero {
        padding: 40px 0;
    }
    
    .category-hero h1 {
        font-size: 1.8rem;
    }
    
    .pagination {
        flex-wrap: wrap;
    }
}
