/* News Homepage Styles */

/* Featured News Slider */
#featured-news {
    margin-bottom: 40px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

#featured-news .carousel-item {
    height: 500px;
}

#featured-news .carousel-item img {
    object-fit: cover;
    height: 100%;
    width: 100%;
}

#featured-news .carousel-caption {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    border-radius: 0 0 8px 8px;
    padding: 30px 20px;
    bottom: 0;
    left: 0;
    right: 0;
    text-align: left;
}

#featured-news .carousel-caption h5 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.6);
}

/* Latest News Grid */
.latest-news {
    padding: 60px 0;
}

.section-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 30px;
    position: relative;
    padding-bottom: 15px;
}

.section-title:after {
    content: '';
    position: absolute;
    width: 60px;
    height: 4px;
    background-color: #2e54a1;
    bottom: 0;
    left: 0;
}

.news-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
    margin-bottom: 30px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
}

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

.news-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 8px 8px 0 0;
}

.news-card h4 {
    padding: 20px 20px 10px;
    font-size: 20px;
    font-weight: 600;
    line-height: 1.4;
}

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

.news-card h4 a:hover {
    color: #2e54a1;
}

.news-card p {
    padding: 0 20px 20px;
    color: #666;
    font-size: 15px;
    line-height: 1.6;
}

/* Trending News Section */
.trending-news {
    padding: 60px 0;
    background-color: #f8f9fa;
}

.trending-news .list-group-item {
    border-left: none;
    border-right: none;
    padding: 15px 20px;
    transition: background-color 0.2s ease;
}

.trending-news .list-group-item:first-child {
    border-top: none;
    border-radius: 0;
}

.trending-news .list-group-item:last-child {
    border-bottom: none;
    border-radius: 0;
}

.trending-news .list-group-item:hover {
    background-color: #f1f1f1;
}

.trending-news .list-group-item a {
    color: #333;
    font-weight: 600;
    font-size: 16px;
    text-decoration: none;
    transition: color 0.2s ease;
}

.trending-news .list-group-item a:hover {
    color: #2e54a1;
}

/* Categories Section */
.categories {
    padding: 60px 0;
}

.category-link {
    display: block;
    background-color: #fff;
    border-radius: 8px;
    text-align: center;
    padding: 20px 15px;
    margin-bottom: 30px;
    color: #333;
    font-weight: 600;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    text-decoration: none;
}

.category-link:hover {
    background-color: #2e54a1;
    color: #fff;
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

/* Sidebar Widgets */
.sidebar-widgets {
    padding: 60px 0;
}

.widget {
    background-color: #fff;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
}

.widget h3 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 15px;
}

.widget h3:after {
    content: '';
    position: absolute;
    width: 40px;
    height: 3px;
    background-color: #2e54a1;
    bottom: 0;
    left: 0;
}

.widget.popular-articles ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.widget.popular-articles li {
    border-bottom: 1px solid #eee;
    padding: 12px 0;
}

.widget.popular-articles li:last-child {
    border-bottom: none;
}

.widget.popular-articles a {
    color: #333;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s ease;
}

.widget.popular-articles a:hover {
    color: #2e54a1;
}

/* Newsletter Widget */
.widget.newsletter input[type="email"] {
    width: 100%;
    padding: 12px 15px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 15px;
}

.widget.newsletter button {
    background-color: #2e54a1;
    color: #fff;
    border: none;
    padding: 12px 20px;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.widget.newsletter button:hover {
    background-color: #e04c51;
}

/* Responsive Adjustments */
@media (max-width: 767px) {
    #featured-news .carousel-item {
        height: 350px;
    }

    #featured-news .carousel-caption h5 {
        font-size: 22px;
    }

    .section-title {
        font-size: 26px;
    }

    .news-card img {
        height: 180px;
    }

    .news-card h4 {
        font-size: 18px;
    }
}

@media (max-width: 575px) {
    #featured-news .carousel-item {
        height: 300px;
    }
}

/* Card hover effects */
.hover-elevate {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-elevate:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15) !important;
}

/* News listing page improvements */
.news-item .badge {
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.3px;
    padding: 0.5rem 0.75rem;
}

.news-item .badge i {
    font-size: 0.8rem;
}

.news-item .card-title {
    font-size: 1.25rem;
    line-height: 1.4;
    margin-top: 0.5rem;
}

.news-item .card-text {
    color: #555;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Tag styling */
.tags-cloud .badge {
    font-weight: 500;
    letter-spacing: 0.3px;
    transition: all 0.3s ease;
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
    display: inline-block;
}

.tags-cloud .badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Tag grid layout */
.tags-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.tags-grid .tag-item {
    background-color: #f8f9fa;
    border-radius: 5px;
    padding: 10px;
    text-align: center;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #333;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.tags-grid .tag-item:hover {
    background-color: #e9ecef;
    transform: translateY(-3px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    color: #0d6efd;
}

.tags-grid .tag-item i {
    font-size: 1.5rem;
    margin-bottom: 8px;
    color: #0d6efd;
}

.tags-grid .tag-item span.count {
    background-color: #0d6efd;
    color: white;
    border-radius: 20px;
    padding: 2px 8px;
    font-size: 0.8rem;
    margin-top: 5px;
}

/* Fix for image sizing in news listings */
.news-item .col-md-4 {
    max-height: 200px;
    overflow: hidden;
}

/* Sidebar improvements */
.sidebar-widget {
    background-color: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 25px;
}

.sidebar-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.sidebar-title i {
    color: #0d6efd;
}

/* Category selection styling */
.form-select {
    padding: 0.5rem 1rem;
    border: 1px solid #ced4da;
    border-radius: 5px;
    font-size: 0.95rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    background-color: #fff;
}

.form-select:focus {
    border-color: #86b7fe;
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Single news page tag styling */
.single-news-tags .badge {
    font-size: 0.9rem;
    padding: 0.5rem 0.75rem;
    margin-right: 10px;
    margin-bottom: 10px;
    background-color: #f8f9fa;
    color: #495057;
    border: 1px solid #e9ecef;
    font-weight: 500;
    transition: all 0.2s ease;
}

.single-news-tags .badge:hover {
    background-color: #e9ecef;
    color: #212529;
}

.single-news-tags .badge i {
    margin-right: 5px;
    font-size: 0.85rem;
}

/* Improve badge contrast for better readability */
.badge.bg-primary {
    background-color: #0d6efd !important;
    color: white !important;
}

.badge.bg-secondary {
    background-color: #6c757d !important;
    color: white !important;
}

.badge.bg-success {
    background-color: #198754 !important;
    color: white !important;
}

.badge.bg-danger {
    background-color: #dc3545 !important;
    color: white !important;
}

.badge.bg-warning {
    background-color: #ffc107 !important;
    color: #212529 !important;
}

.badge.bg-info {
    background-color: #0dcaf0 !important;
    color: #212529 !important;
}

.badge.bg-light {
    background-color: #f8f9fa !important;
    color: #212529 !important;
}

.badge.bg-dark {
    background-color: #212529 !important;
    color: white !important;
}

@media (max-width: 767px) {
    .tags-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .form-select,
    .form-control {
        font-size: 0.9rem;
    }
    
    .badge {
        font-size: 0.8rem !important;
        padding: 0.4rem 0.6rem !important;
    }
    
    .news-item .badge i {
        font-size: 0.7rem;
    }
    
    .sidebar-widget {
        padding: 15px;
        margin-bottom: 20px;
    }
    
    .sidebar-title {
        font-size: 1.1rem;
    }
    
    #featured-news .carousel-item {
        height: 350px;
    }
    
    #featured-news .carousel-caption h5 {
        font-size: 22px;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .news-card img {
        height: 180px;
    }
    
    .news-card h4 {
        font-size: 18px;
    }
    
    .reporter-profile .col-md-3 {
        margin-bottom: 20px;
    }
}

@media (max-width: 575px) {
    .tags-grid {
        grid-template-columns: 1fr;
    }
    
    .badge {
        font-size: 0.75rem !important;
        padding: 0.35rem 0.5rem !important;
    }
    
    .news-item .badge i {
        font-size: 0.65rem;
    }
    
    #featured-news .carousel-item {
        height: 300px;
    }
    
    h1 {
        font-size: 1.5rem;
    }
    
    h2 {
        font-size: 1.3rem;
    }
    
    .filters .row > div {
        margin-bottom: 10px;
    }
} 