/* ===========================================
   TIN TỨC PAGE - MODERN DESIGN STYLES
   =========================================== */

/* ===== GENERAL STYLES ===== */
.news-page {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #ffffff;
    min-height: 100vh;
    line-height: 1.6;
    color: #1f2937;
}

/* ===== NEWS CATEGORIES SECTION ===== */
.news-categories {
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    padding: 2rem 0;
}

#news-topics-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 0;
}

.topic-btn {
    border: 1px solid #e0e7ff;
    background: #f8faff;
    color: #4c1d95;
    font-weight: 600;
    font-size: 0.875rem;
    padding: 0.625rem 1.25rem;
    border-radius: 6px;
    transition: all 0.2s ease;
    position: relative;
}

.topic-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(241,245,249,0.3), transparent);
    transition: left 0.5s;
}

.topic-btn:hover::before {
    left: 100%;
}

.topic-btn:hover {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    color: #ffffff;
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.4);
    border-color: #8b5cf6;
}

.topic-btn.active {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    color: #ffffff;
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
    border-color: #6366f1;
    font-weight: 600;
    transform: scale(1.05);
}

/* ===== NEWS SEARCH SECTION ===== */
.news-search {
    background: #ffffff;
    padding: 1.5rem 0;
    border-bottom: 1px solid #e2e8f0;
}

.news-search .input-group {
    position: relative;
    max-width: 500px;
    margin: 0 auto;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    border-radius: 16px;
    overflow: hidden;
    z-index: 1;
}

.news-search input {
    border: 1px solid #e2e8f0;
    padding: 1rem 1.5rem;
    font-size: 1rem;
    background: white;
    border-radius: 16px 0 0 16px !important;
    box-shadow: none !important;
    color: #1f2937;
    font-weight: 500;
    transition: all 0.2s ease;
}

.news-search input:focus {
    background: white;
    box-shadow: 0 0 0 3px rgba(100,116,139,0.1) !important;
    outline: none;
    border-color: #64748b;
}

.news-search input::placeholder {
    color: #6b7280;
    font-style: italic;
}

.news-search .btn-primary {
    border: 1px solid #64748b;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 0 16px 16px 0 !important;
    padding: 0 2rem;
    font-weight: 500;
    transition: all 0.2s ease;
    box-shadow: none !important;
    color: #1e293b;
}

.news-search .btn-primary:hover {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    border-color: #475569;
}

.news-search .btn-primary i {
    font-size: 1.1rem;
}

/* ===== NEWS CONTENT SECTION ===== */
.news-content {
    padding: 4rem 0;
    background: #ffffff;
}

.news-category-section {
    border-top: 1px solid #e2e8f0;
    padding-top: 1.5rem;
    margin-top: 2rem;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid rgba(226,232,240,0.5);
}

.news-category-section:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 25px rgba(0,0,0,0.1), 0 2px 10px rgba(0,0,0,0.06);
}

.news-category-section h4 {
    position: relative;
    display: inline-block;
    padding-bottom: 0.75rem;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    font-weight: 600;
    color: #1e293b;
    letter-spacing: -0.025em;
}

.news-category-section h4::after {
    content: '';
    position: absolute;
    width: 40px;
    height: 3px;
    bottom: 0;
    left: 0;
    background: linear-gradient(135deg, #64748b 0%, #475569 100%);
    border-radius: 1.5px;
}

.section-all-btn {
    background: linear-gradient(135deg, #64748b 0%, #475569 100%);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.5rem 1rem;
    font-weight: 500;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.section-all-btn:hover {
    background: linear-gradient(135deg, #475569 0%, #334155 100%);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

/* ===== FEATURED CARDS ===== */
.featured-card {
    border: none;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
    transition: all 0.2s ease;
    background: white;
    border: 1px solid rgba(226,232,240,0.5);
}

.featured-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 25px rgba(0,0,0,0.1), 0 2px 10px rgba(0,0,0,0.06);
}

.featured-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.featured-card:hover .featured-image {
    transform: scale(1.02);
}

.featured-card .card-body {
    padding: 1.5rem;
    background: white;
}

.featured-card .card-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.featured-card .card-title a {
    color: #1e293b;
    text-decoration: none;
    transition: color 0.2s ease;
    font-weight: 600;
}

.featured-card .card-title a:hover {
    color: #64748b;
}

.featured-excerpt {
    color: #64748b;
    font-size: 0.875rem;
    line-height: 1.6;
    margin: 0;
}

/* ===== RELATED ITEMS ===== */
.related-item {
    background: white;
    border-radius: 12px;
    padding: 1rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: all 0.2s ease;
    border: 1px solid #e2e8f0;
}

.related-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-color: #64748b;
}

.related-item img {
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.related-item:hover img {
    transform: scale(1.05);
}

.related-item .fw-semibold {
    font-size: 0.875rem;
    color: #1e293b;
    margin-bottom: 0.25rem;
    line-height: 1.4;
    transition: color 0.2s ease;
    font-weight: 500;
}

.related-item:hover .fw-semibold {
    color: #64748b;
}

.related-item .text-muted {
    font-size: 0.75rem;
    color: #64748b;
}

/* ===== NEWS CARDS (GRID VIEW) ===== */
.news-card {
    border: none;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
    transition: all 0.2s ease;
    background: white;
    height: 100%;
    border: 1px solid rgba(226,232,240,0.5);
}

.news-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 25px rgba(0,0,0,0.1), 0 2px 10px rgba(0,0,0,0.06);
}

.news-card-img {
    position: relative;
    overflow: hidden;
}

.news-card-img img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.news-card:hover .news-card-img img {
    transform: scale(1.02);
}

.news-date {
    position: absolute;
    top: 12px;
    right: 12px;
    background: linear-gradient(135deg, rgba(255,255,255,0.95) 0%, rgba(248,250,252,0.95) 100%);
    color: #1e293b;
    padding: 0.5rem;
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(226,232,240,0.8);
}

.news-date .day {
    display: block;
    font-size: 1.25rem;
    line-height: 1;
    font-weight: 700;
}

.news-date .month {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

.news-card-body {
    padding: 1.5rem;
    background: white;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.news-card-categories {
    margin-bottom: 0.75rem;
}

.news-card-categories .badge {
    margin-right: 0.5rem;
    font-weight: 600;
    padding: 0.375rem 0.75rem;
    border-radius: 20px;
}

.news-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.news-title a {
    color: #1e293b;
    text-decoration: none;
    transition: color 0.2s ease;
    font-weight: 600;
}

.news-title a:hover {
    color: #64748b;
}

.news-excerpt {
    color: #64748b;
    font-size: 0.875rem;
    line-height: 1.5;
    margin: 0;
}

/* ===== SIDEBAR ===== */
.news-sidebar {
    position: sticky;
    top: 100px;
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    color: #ffffff;
    padding: 1.5rem;
    border-radius: 16px;
    box-shadow: 0 4px 25px rgba(0,0,0,0.1), 0 2px 10px rgba(0,0,0,0.06);
    border: 1px solid rgba(255,255,255,0.1);
}

.news-sidebar .sidebar-section {
    margin-bottom: 2rem;
    padding: 1.25rem;
    border-radius: 12px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.news-sidebar .sidebar-section:hover {
    background: rgba(255,255,255,0.08);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.news-sidebar h5 {
    font-size: 0.875rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 1rem;
    position: relative;
    padding: 0.75rem 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, rgba(248,250,252,0.1) 100%);
    border-radius: 8px;
    border-left: 4px solid #ffffff;
    text-align: center;
    margin: -1.25rem -1.25rem 1rem -1.25rem;
}

.news-sidebar h5::before {
    content: '🎥';
    margin-right: 0.5rem;
    font-size: 1rem;
}

.news-sidebar .sidebar-section:nth-child(2) h5::before {
    content: '🖼️';
}

.news-sidebar .sidebar-section:nth-child(3) h5::before {
    content: '📰';
}

.news-sidebar .sidebar-section:nth-child(4) h5::before {
    content: '📧';
}

.news-sidebar a {
    color: #ecf0f1;
    text-decoration: none;
    transition: all 0.3s ease;
}

.news-sidebar a:hover {
    color: #f1f5f9;
    text-decoration: none;
}

/* ===== VIDEO ADS SECTION ===== */
.news-sidebar .ratio {
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0,0,0,0.08);
    border: 3px solid rgba(241,245,249,0.6);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
}

.news-sidebar .ratio::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, rgba(248,250,252,0.1) 100%);
    z-index: 1;
    opacity: 0;
    transition: opacity 0.4s ease;
    border-radius: 17px;
}

.news-sidebar .ratio:hover::before {
    opacity: 1;
}

.news-sidebar .ratio:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 16px 40px rgba(0,0,0,0.12);
    border-color: rgba(226,232,240,0.8);
}

.news-sidebar .ratio iframe {
    border-radius: 17px;
    z-index: 2;
    position: relative;
    filter: brightness(0.98) contrast(1.02);
    transition: filter 0.3s ease;
}

.news-sidebar .ratio:hover iframe {
    filter: brightness(1.05) contrast(1.05);
}

/* ===== FEATURED IMAGES CAROUSEL ===== */
#sidebarCarousel {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
    border: 1px solid rgba(226,232,240,0.8);
    position: relative;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    transition: all 0.3s ease;
    width: 100%;
    height: 220px;
    margin: 0 auto;
}

#sidebarCarousel:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
    border-color: rgba(203,213,225,0.9);
}

#sidebarCarousel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.05) 0%, rgba(248,250,252,0.02) 100%);
    z-index: 1;
    border-radius: 11px;
}

#sidebar-carousel-inner .carousel-item {
    position: relative;
    z-index: 2;
    height: 220px;
}

#sidebar-carousel-inner .carousel-item img {
    transition: all 0.3s ease;
    border-radius: 11px;
    filter: brightness(1.0) contrast(1.0);
    width: 100%;
    height: 220px;
    object-fit: cover;
    object-position: center top;
}

#sidebar-carousel-inner .carousel-item:hover img {
    transform: scale(1.02);
    filter: brightness(1.05) contrast(1.05);
}

.carousel-control-prev,
.carousel-control-next {
    width: 15%;
    z-index: 4;
    opacity: 0;
    transition: opacity 0.3s ease;
}

#sidebarCarousel:hover .carousel-control-prev,
#sidebarCarousel:hover .carousel-control-next {
    opacity: 1;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    background: rgba(0,0,0,0.6);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    border: 2px solid rgba(255,255,255,0.3);
    box-shadow: 0 2px 12px rgba(0,0,0,0.3);
}

.carousel-control-prev:hover .carousel-control-prev-icon,
.carousel-control-next:hover .carousel-control-next-icon {
    background: rgba(0,0,0,0.8);
    transform: scale(1.1);
    border-color: rgba(255,255,255,0.5);
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}

.carousel-caption {
    background: linear-gradient(135deg, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.5) 100%);
    border-radius: 0 0 11px 11px;
    backdrop-filter: blur(10px);
    z-index: 3;
    padding: 0.5rem 0.75rem;
    border-top: none;
    bottom: 0;
    left: 0;
    right: 0;
    position: absolute;
}

.carousel-caption h6 {
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 0;
    color: #ffffff;
    text-shadow: 0 1px 3px rgba(0,0,0,0.8);
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ===== FEATURED IMAGES SECTION SPECIFIC ===== */
.sidebar-section:has(#sidebarCarousel) {
    padding: 1rem !important;
}

.sidebar-section:has(#sidebarCarousel) h5 {
    margin-bottom: 1rem !important;
    padding-bottom: 0.5rem !important;
    font-size: 0.95rem !important;
}

/* Fix carousel positioning and spacing */
#sidebarCarousel {
    position: relative;
    overflow: hidden;
}

#sidebarCarousel .carousel-inner {
    position: relative;
}

/* Ensure no extra padding or margin on carousel items */
#sidebarCarousel .carousel-item {
    padding: 0;
    margin: 0;
}

/* Ensure proper aspect ratio and visibility */
#sidebarCarousel .carousel-inner {
    height: 220px;
    border-radius: 11px;
}

#sidebarCarousel .carousel-item {
    height: 220px;
    position: relative;
}

/* Better image display */
#sidebarCarousel img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    object-position: center center;
    display: block;
}

/* Remove any extra spacing */
#sidebarCarousel .carousel-item-next,
#sidebarCarousel .carousel-item-prev,
#sidebarCarousel .carousel-item.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ===== VIDEO ADS PLAY BUTTON ===== */
.video-play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, rgba(255,255,255,0.95) 0%, rgba(248,250,252,0.9) 100%);
    border: 3px solid rgba(226,232,240,0.6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: #475569;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(15px);
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    z-index: 5;
}

.video-play-overlay:hover {
    transform: translate(-50%, -50%) scale(1.1);
    background: linear-gradient(135deg, #ffffff 0%, #f1f5f9 100%);
    border-color: rgba(148,163,184,0.8);
    box-shadow: 0 12px 40px rgba(0,0,0,0.15);
    color: #334155;
}

.video-play-overlay::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, transparent 100%);
    top: 0;
    left: 0;
}

/* ===== FEATURED IMAGE BADGE ===== */
.featured-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: linear-gradient(135deg, rgba(255,255,255,0.95) 0%, rgba(248,250,252,0.9) 100%);
    color: #475569;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 4;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(226,232,240,0.5);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Latest News List */
.news-sidebar .list-unstyled {
    max-height: 400px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.news-sidebar .list-unstyled::-webkit-scrollbar {
    width: 4px;
}

.news-sidebar .list-unstyled::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.1);
    border-radius: 2px;
}

.news-sidebar .list-unstyled::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.4);
    border-radius: 2px;
}

.news-sidebar .list-unstyled::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.6);
}

.news-sidebar .list-unstyled li {
    padding: 0.75rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    transition: all 0.3s ease;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    background: rgba(255,255,255,0.02);
}

.news-sidebar .list-unstyled li:hover {
    background: rgba(255,255,255,0.1);
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    border-color: rgba(59,130,246,0.3);
}

.news-sidebar .list-unstyled li:last-child {
    border-bottom: none;
}

.news-sidebar .list-unstyled img {
    border-radius: 8px;
    transition: transform 0.3s ease;
    border: 2px solid rgba(255,255,255,0.1);
}

.news-sidebar .list-unstyled li:hover img {
    transform: scale(1.05);
    border-color: rgba(255,255,255,0.6);
}

.news-sidebar .list-unstyled .fw-semibold {
    display: block;
    margin-bottom: 0.25rem;
    line-height: 1.4;
}

.news-sidebar .list-unstyled .text-white-50 {
    font-size: 0.75rem;
    opacity: 0.7;
}

/* Subscribe Form */
.subscribe-form {
    background: rgba(255,255,255,0.1);
    padding: 1.25rem;
    border-radius: 12px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.15);
}

.subscribe-form input {
    background: rgba(255,255,255,0.95);
    border: none;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    color: #334155;
}

.subscribe-form input:focus {
    background: white;
    box-shadow: 0 0 0 3px rgba(59,130,246,0.2);
    outline: none;
}

.subscribe-form .btn {
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
    border: 2px solid #22c55e;
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 0.875rem;
    color: #166534;
}

.subscribe-form .btn:hover {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(34, 197, 94, 0.3);
    border-color: #16a34a;
    color: #ffffff;
}

/* ===== PAGINATION ===== */
.pagination-container {
    margin-top: 2.5rem;
}

.pagination {
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
}

.page-link {
    border: 1px solid #e0f2fe;
    color: #0369a1;
    font-weight: 600;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    font-size: 0.875rem;
    border-radius: 8px;
    margin: 0 2px;
}

.page-link:hover {
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(14, 165, 233, 0.3);
    border-color: #0284c7;
}

.page-item.active .page-link {
    background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(6, 182, 212, 0.4);
    border-color: #0891b2;
}

/* ===== LOADING STATES ===== */
.spinner-border {
    animation: spinner-border 0.75s linear infinite;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1200px) {
    .news-category-section {
        padding: 1.5rem;
    }

    .featured-image {
        height: 200px;
    }
}

@media (max-width: 992px) {
    .news-sidebar {
        position: static;
        margin-top: 2rem;
        background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
        color: #1e293b;
        border: 1px solid #e2e8f0;
    }

    .news-sidebar a {
        color: #475569;
    }

    .news-sidebar a:hover {
        color: #64748b;
    }

    .news-sidebar h5 {
        color: #1e293b;
        background: linear-gradient(135deg, rgba(100,116,139,0.1) 0%, rgba(71,85,105,0.05) 100%);
        border-left-color: #64748b;
    }

    .subscribe-form {
        background: white;
        border: 1px solid #e2e8f0;
    }

    .news-sidebar .list-unstyled li {
        border-bottom-color: #e2e8f0;
    }

    .news-sidebar .list-unstyled li:hover {
        background: #f1f5f9;
    }
}

@media (max-width: 768px) {
    .news-search {
        padding: 1.5rem 0;
    }

    .news-content {
        padding: 0rem 0;
    }

    .news-category-section {
        padding: 1rem;
        margin-top: 1rem;
    }

    .news-category-section h4 {
        font-size: 1.5rem;
    }

    .featured-card {
        margin-bottom: 1.5rem;
    }

    .related-item {
        padding: 0.75rem;
    }

    .news-card-body {
        padding: 1rem;
    }

    .news-title {
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    #news-topics-container .topic-btn {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
        margin: 0.2rem;
        border-radius: 20px;
        min-width: 70px;
        white-space: normal;
        line-height: 1.1;
    }

    .news-search input {
        font-size: 1rem;
        padding: 0.75rem 1rem;
    }

    .news-search .btn-primary {
        padding: 0 1.5rem;
    }

    .news-category-section h4 {
        font-size: 1.3rem;
    }

    .featured-image {
        height: 180px;
    }

    .news-sidebar {
        padding: 1.5rem;
    }

    .subscribe-form {
        padding: 1rem;
    }
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.news-category-section {
    animation: fadeInUp 0.6s ease-out;
}

.news-card {
    animation: fadeInUp 0.6s ease-out;
}

/* ===== UTILITY CLASSES ===== */
.text-gradient {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.shadow-modern {
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.border-radius-modern {
    border-radius: 15px;
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus states for better accessibility */
.topic-btn:focus,
.news-search input:focus,
.news-search .btn:focus,
.section-all-btn:focus,
.page-link:focus {
    outline: 2px solid #64748b;
    outline-offset: 2px;
}

/* ===== DATE & TIME DISPLAY ===== */
.text-muted.small {
    color: #64748b !important;
    font-size: 0.8rem !important;
    font-weight: 500;
    display: flex;
    align-items: center;
}

.text-muted.small i {
    color: #64748b;
    font-size: 0.75rem;
}

.news-card-body .text-muted.small {
    margin-top: auto;
    padding-top: 0.75rem;
    border-top: 1px solid #f1f5f9;
}

.related-item .text-muted.small {
    font-size: 0.75rem !important;
    color: #64748b !important;
}

.featured-card .text-muted.small {
    color: #64748b !important;
    font-weight: 500;
    margin-bottom: 0.75rem;
}

/* Enhanced date visibility */
.news-date {
    min-width: 65px;
    text-align: center;
    font-size: 0.875rem;
}

/* ===== MODERN IMPROVEMENTS ===== */

/* Smooth scrolling for the entire page */
html {
    scroll-behavior: smooth;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Better text selection */
::selection {
    background-color: #64748b;
    color: white;
}



/* News sidebar headers */
.news-sidebar h5,
.news-sidebar .card-header {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%) !important;
    color: #1e293b !important;
    border-bottom: 2px solid #e2e8f0 !important;
}

/* ===== IMPROVED CONTRAST & READABILITY ===== */
.news-sidebar {
    background: #ffffff !important;
    color: #1e293b !important;
}

.sidebar-section {
    background-color: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    color: #1e293b !important;
    padding: 1rem !important;
    margin-bottom: 1rem !important;
    border-radius: 4px !important;
}

.sidebar-section h5 {
    color: #0f172a !important;
    background-color: transparent !important;
    font-weight: 700 !important;
    font-size: 1.1rem !important;
}

/* Text contrast improvements */
.news-sidebar .text-secondary {
    color: #374151 !important;
}

.news-sidebar .text-muted {
    color: #4b5563 !important;
}

.news-sidebar .small,
.news-sidebar small {
    color: #374151 !important;
}

/* Link colors for better contrast */
.news-sidebar a {
    color: #1f2937 !important;
    text-decoration: none !important;
}

.news-sidebar a:hover {
    color: #0f172a !important;
    text-decoration: underline !important;
}

/* Button text contrast */
.news-sidebar .btn-outline-secondary {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%) !important;
    color: #dc2626 !important;
    border-color: #ef4444 !important;
    font-weight: 600 !important;
}

.news-sidebar .btn-outline-secondary:hover {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
    color: #ffffff !important;
    border-color: #dc2626 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3) !important;
}

/* Form input contrast */
.form-control {
    color: #1f2937 !important;
    border-color: #d1d5db !important;
}

.form-control::placeholder {
    color: #6b7280 !important;
}

/* List items in sidebar */
.news-sidebar .list-unstyled li {
    color: #1f2937 !important;
    border-bottom: 1px solid #f3f4f6 !important;
    padding: 8px 0 !important;
}

.news-sidebar .list-unstyled li:hover {
    background-color: #f9fafb !important;
    color: #0f172a !important;
}

/* ===== GENERAL TEXT CONTRAST IMPROVEMENTS ===== */
.news-card h5,
.news-card .card-title,
.news-card-title {
    color: #0f172a !important;
    font-weight: 700 !important;
}

.news-card .card-text,
.news-card-body p {
    color: #374151 !important;
    font-weight: 400 !important;
    line-height: 1.6 !important;
}

.news-card .text-muted {
    color: #6b7280 !important;
}

.news-card .badge {
    color: #374151 !important;
    font-weight: 600 !important;
}

h1, h2, h3, h4, h5, h6 {
    color: #0f172a !important;
    font-weight: 700 !important;
}

.news-page p,
.news-page .card-text {
    color: #374151 !important;
}

.news-page .text-muted {
    color: #6b7280 !important;
}

/* Time display specific */
.text-muted.small,
.small.text-muted {
    color: #4b5563 !important;
    font-weight: 500 !important;
}

/* ===== AI CHATBOT BUTTON - PRESERVE ORIGINAL COLORS ===== */
#ai-chatbot-btn {
    background: #0078d7 !important;
    color: #ffffff !important;
    border: none !important;
    box-shadow: 0 4px 12px rgba(0, 120, 215, 0.3) !important;
}

#ai-chatbot-btn:hover {
    background: #106ebe !important;
    color: #ffffff !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 16px rgba(0, 120, 215, 0.4) !important;
}

#ai-chatbot-btn:active {
    background: #005a9e !important;
    color: #ffffff !important;
    transform: translateY(0) !important;
}



/* ===== NEWS DETAIL PAGE STYLES ===== */
.news-detail-page {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #ffffff;
    
    line-height: 1.6;
    color: #1f2937;
}

.news-detail-page .news-detail-content {
    background: #ffffff;
}

.news-detail-page h1, 
.news-detail-page h2, 
.news-detail-page h3, 
.news-detail-page h4, 
.news-detail-page h5, 
.news-detail-page h6 {
    color: #0f172a !important;
    font-weight: 700 !important;
}

.news-detail-page p,
.news-detail-page .article-content {
    color: #374151 !important;
    line-height: 1.7 !important;
}

.news-detail-page .text-muted {
    color: #6b7280 !important;
}

/* Back button styling */
.news-detail-page .btn-outline-primary {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%) !important;
    border: 2px solid #3b82f6 !important;
    color: #1d4ed8 !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
    transition: all 0.3s ease !important;
}

.news-detail-page .btn-outline-primary:hover {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%) !important;
    border-color: #2563eb !important;
    color: #ffffff !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3) !important;
}

/* Article content styling */
.news-detail-page .article-meta {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 2rem;
    border: 1px solid #e2e8f0;
}

.news-detail-page .article-content img {
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    margin: 1rem 0;
}

.news-detail-page .badge {
    background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%) !important;
    color: #4338ca !important;
    font-weight: 600 !important;
    border: 1px solid #a5b4fc !important;
}

/* Page title styling */
.news-detail-page .page-title {
    color: #0f172a !important;
    font-weight: 800 !important;
    line-height: 1.2 !important;
    margin-bottom: 1rem !important;
}

/* Modern loading state */
.loading-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}