/* News Page Styles */
.news-hero {
    background: linear-gradient(135deg, var(--primary-red) 0%, var(--dark-red) 100%);
    color: white;
    padding: 60px 0 40px;
    position: relative;
    overflow: hidden;
}

.news-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('/static/images/home/carousel/home4.webp') center/cover;
    opacity: 0.75;
    z-index: 1;
    background-position: center 75%;
}

.news-hero .container {
    position: relative;
    z-index: 2;
}

.news-hero h1 {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.news-hero p {
    font-size: 1rem;
    margin-bottom: 20px;
    opacity: 0.9;
}

/* News cards */
.news-card {
    transition: transform 0.3s ease;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
    height: 100%;
    border: 1px solid #e9ecef;
}

.news-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(178, 34, 34, 0.15);
    border-color: var(--primary-red);
}

.news-img {
    height: 200px;
    object-fit: cover;
}

/* Scrollable container */
.news-scroll-container {
    border: 1px solid #dee2e6 !important;
    border-radius: 8px;
    box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.03);
    background-color: #f8f9fa;
    scrollbar-width: auto;
    scrollbar-color: var(--primary-red) #f1f1f1;
    min-height: 400px;
}

.news-scroll-container::-webkit-scrollbar {
    width: 12px;
}

.news-scroll-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 6px;
}

.news-scroll-container::-webkit-scrollbar-thumb {
    background: var(--primary-red);
    border-radius: 6px;
    border: 2px solid #f1f1f1;
}

.news-scroll-container::-webkit-scrollbar-thumb:hover {
    background: var(--dark-red);
}

/* Adjust card content */
.news-title {
    font-size: 1rem;
    margin-bottom: 8px;
    color: var(--dark-red);
    line-height: 1.3;
}

.news-description {
    font-size: 0.85rem;
    margin-bottom: 12px;
    line-height: 1.4;
    color: #6c757d;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-date {
    font-size: 0.75rem;
    color: #6c757d;
}

/* Filter panel improvements */
.sticky-lg-top {
    position: -webkit-sticky;
    position: sticky;
    top: 20px;
}

/* Mobile filter toggle */
.btn[data-bs-toggle="collapse"] .fa-chevron-down {
    transition: transform 0.3s ease;
}

.btn[data-bs-toggle="collapse"][aria-expanded="true"] .fa-chevron-down {
    transform: rotate(180deg);
}

/* Pagination improvements */
.pagination {
    margin: 2rem 0 1rem;
}

.page-link {
    color: var(--primary-red);
    border: 1px solid #dee2e6;
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
}

.page-link:hover {
    color: var(--dark-red);
    background-color: #f8f9fa;
    border-color: #dee2e6;
}

.page-item.active .page-link {
    background-color: var(--primary-red);
    border-color: var(--primary-red);
    color: white;
}

.page-item.disabled .page-link {
    color: #6c757d;
}

/* Form improvements for mobile */
.form-control-sm,
.form-select-sm {
    font-size: 0.875rem;
}

/* News Article Page Styles */
.news-article {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.08);
    margin-top: 15px;
}

.article-header {
    border-bottom: 2px solid var(--primary-gold);
    padding-bottom: 15px;
}

.breadcrumb {
    background: none;
    padding: 0;
    margin-bottom: 15px;
    font-size: 0.9rem;
}

.breadcrumb-item a {
    color: var(--primary-red);
    text-decoration: none;
}

.breadcrumb-item.active {
    color: var(--dark-red);
}

.article-footer {
    margin-top: 30px;
}

/* Enhanced Article Content Styles */
.article-content {
    font-family: 'Georgia', serif;
    font-size: 1rem;
}

.article-content p {
    margin-bottom: 1.2rem;
    line-height: 1.6;
}

.article-content h1,
.article-content h2,
.article-content h3,
.article-content h4,
.article-content h5,
.article-content h6 {
    color: var(--dark-red);
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.article-content h2 {
    font-size: 1.5rem;
    border-bottom: 2px solid var(--primary-gold);
    padding-bottom: 0.5rem;
}

.article-content ul,
.article-content ol {
    margin-bottom: 1.2rem;
    padding-left: 1.5rem;
}

.article-content li {
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.article-content strong {
    color: var(--dark-red);
    font-weight: 700;
}

.article-content em {
    color: #666;
    font-style: italic;
}

.article-content a {
    color: var(--primary-red);
    text-decoration: none;
    border-bottom: 1px solid var(--primary-red);
    transition: all 0.3s ease;
}

.article-content a:hover {
    color: var(--dark-red);
    border-bottom-color: var(--dark-red);
}

.article-content blockquote {
    border-left: 3px solid var(--primary-gold);
    padding-left: 1rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: #666;
    background: #f9f9f9;
    padding: 1rem;
    border-radius: 0 0.5rem 0.5rem 0;
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
    margin: 1rem 0;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
}

.article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    font-size: 0.9rem;
}

.article-content table th,
.article-content table td {
    padding: 0.5rem;
    border: 1px solid #dee2e6;
    text-align: left;
}

.article-content table th {
    background-color: var(--primary-red);
    color: white;
    font-weight: 600;
}

.article-content table tr:nth-child(even) {
    background-color: #f8f9fa;
}

/* Content divider */
.content-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin: 2rem 0;
}

.divider-line {
    flex: 1;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary-gold), transparent);
}

.divider-icon {
    background: var(--primary-red);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.2);
}

/* Article meta styling */
.article-meta {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
}

.short-description-container {
    max-width: 100%;
    margin: 0 auto;
}

.article-image img {
    width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: cover;
    border-radius: 0.5rem;
}

/* Medium devices and up */
@media (min-width: 768px) {
    .news-hero {
        padding: 80px 0 50px;
    }

    .news-hero h1 {
        font-size: 2.8rem;
        margin-bottom: 20px;
    }

    .news-hero p {
        font-size: 1.1rem;
        margin-bottom: 30px;
    }

    .news-img {
        height: 250px;
    }

    .news-card {
        border-radius: 12px;
        margin-bottom: 0;
    }

    .news-scroll-container {
        padding: 20px;
        min-height: 600px;
        max-height: 70vh;
        overflow-y: auto;
    }

    .news-title {
        font-size: 1.1rem;
    }

    .news-description {
        font-size: 0.9rem;
    }

    .news-article {
        padding: 40px;
        margin-top: 20px;
        border-radius: 12px;
    }

    .article-content {
        font-size: 1.15rem;
    }

    .article-content h2 {
        font-size: 1.8rem;
    }

    .article-image img {
        max-height: 500px;
    }
}

/* Large devices and up */
@media (min-width: 992px) {
    .news-img {
        height: 300px;
    }

    .news-scroll-container {
        max-height: 75vh;
    }

    .article-image img {
        max-height: 600px;
    }

    .sticky-lg-top {
        z-index: 1;
    }
}

/* Extra large devices */
@media (min-width: 1200px) {
    .news-img {
        height: 350px;
    }
}

/* Make Read More buttons match home page style */
.news-card .btn-outline-danger {
    background: transparent;
    border: 2px solid var(--light-blue);
    color: var(--light-blue);
    padding: 8px 20px;
    font-weight: 600;
    border-radius: 25px;
    transition: var(--transition);
    text-decoration: none;
    display: inline-block;
}

.news-card .btn-outline-danger:hover {
    background: var(--light-blue);
    color: var(--bg-white);
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(11, 92, 146, 0.3);
}