/* Page articles - Modern layout */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

h2.text-center {
    font-size: 2.2rem;
    font-weight: 600;
    color: #003882;
    margin-bottom: 1.5rem;
}

/* Filter bar */
.filter-bar {
    background-color: #f8f9fa;
    padding: 16px 20px;
    border-radius: 12px;
    margin-bottom: 30px;
    border: 1px solid #e9ecef;
}

.filter-dropdown-container {
    position: relative;
    display: inline-block;
}

.filter-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 280px;
    background-color: #fff;
    border: 1px solid #e0e0e0;
    padding: 18px;
    z-index: 1000;
    border-radius: 10px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
    margin-top: 6px;
}

.filter-dropdown.hidden {
    display: none;
}

.filter-dropdown label {
    margin-top: 10px;
    font-weight: 600;
    display: block;
    font-size: 0.9rem;
    color: #444;
}

.filter-dropdown select,
.filter-dropdown input {
    margin-top: 5px;
    margin-bottom: 10px;
    width: 100%;
}

/* Article cards */
.article-card {
    border: none;
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    background: #fff;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.article-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 32px rgba(0, 56, 130, 0.15);
}

.article-card img,
.article-card .card-img-top {
    height: 220px;
    width: 100% !important;
    object-fit: cover !important;
    object-position: center;
    display: block;
    flex-shrink: 0;
    background-color: #f0f2f5;
}

.article-card .card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 20px;
}

.article-card .card-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: #003882;
    line-height: 1.4;
}

.article-card .card-meta {
    margin-bottom: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.badge-primary {
    background-color: #003882;
    color: #fff;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.02em;
}

.badge-secondary {
    background-color: #e8eef6;
    color: #003882;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.02em;
}

.article-card .card-text {
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 16px;
}

.article-card .btn-outline-primary {
    border: 2px solid #003882;
    color: #003882;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 8px 16px;
    transition: all 0.25s ease;
    text-align: center;
}

.article-card .btn-outline-primary:hover {
    background-color: #003882;
    color: #fff;
    transform: translateY(-1px);
}

/* Pagination */
#paginationControls {
    margin: 30px 0 50px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    justify-content: center;
    width: 100%;
}

#paginationControls .page-btn {
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: 8px;
    border: 1px solid #d0d5dd;
    background-color: #fff;
    color: #003882;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.1s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

#paginationControls .page-btn:hover:not(.disabled):not(.active) {
    background-color: #eef2f8;
    border-color: #003882;
}

#paginationControls .page-btn:active:not(.disabled) {
    transform: translateY(1px);
}

#paginationControls .page-btn.active {
    background-color: #003882;
    color: #fff;
    border-color: #003882;
    cursor: default;
}

#paginationControls .page-btn.disabled {
    color: #b0b4bb;
    background-color: #f6f7f9;
    border-color: #e5e7eb;
    cursor: not-allowed;
}

#paginationControls .page-ellipsis {
    min-width: 30px;
    color: #888;
    font-weight: 700;
    text-align: center;
    user-select: none;
}

#paginationControls .page-info {
    flex-basis: 100%;
    text-align: center;
    color: #666;
    font-size: 0.85rem;
    margin-top: 10px;
}

@media (max-width: 576px) {
    #paginationControls .page-btn {
        min-width: 36px;
        height: 36px;
        padding: 0 8px;
        font-size: 0.85rem;
    }
}

/* Modal */
.modal-content {
    border-radius: 16px;
    border: none;
    padding: 10px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}

.modal-header {
    border-bottom: 2px solid #f0f0f0;
    padding: 20px 24px;
}

.modal-title {
    font-weight: 700;
    font-size: 1.6rem;
    color: #003882;
}

.modal-body {
    padding: 24px;
}

#articleModalContent {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #333;
}

#articleModalContent p {
    margin-top: 0.8rem;
}

#articleModalContent img {
    max-width: 100%;
    border-radius: 8px;
    margin: 12px 0;
}

/* Filter toggle button */
#filterToggle {
    border-color: #003882;
    color: #003882;
    border-radius: 8px;
    font-weight: 600;
    padding: 8px 18px;
}

#filterToggle:hover {
    background-color: #003882;
    color: #fff;
}

/* Article detail page */
.article-show {
    max-width: 900px;
    margin: 0 auto;
    padding: 30px 20px 60px;
}

.back-link {
    display: inline-block;
    margin-bottom: 24px;
    color: #003882;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.back-link:hover {
    color: #001d44;
    text-decoration: underline;
}

.article-detail {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0,0,0,0.08);
}

.article-hero img {
    width: 100%;
    height: 350px;
    object-fit: cover;
    display: block;
    background-color: #f0f2f5;
}

.article-header {
    padding: 30px 36px 0;
}

.article-header h1 {
    font-size: 2rem;
    font-weight: 700;
    color: #003882;
    margin-bottom: 12px;
    line-height: 1.3;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.article-date {
    font-size: 0.9rem;
    color: #888;
}

.article-body {
    padding: 0 36px 30px;
    font-size: 1.05rem;
    line-height: 1.85;
    color: #333;
}

.article-body img {
    max-width: 100%;
    border-radius: 8px;
    margin: 16px 0;
}

.article-body p {
    margin-bottom: 1rem;
}

.article-footer {
    padding: 16px 36px 24px;
    border-top: 1px solid #f0f0f0;
    color: #666;
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    .article-hero img {
        height: 220px;
    }

    .article-header {
        padding: 20px 20px 0;
    }

    .article-header h1 {
        font-size: 1.5rem;
    }

    .article-body {
        padding: 0 20px 20px;
        font-size: 1rem;
    }

    .article-footer {
        padding: 12px 20px 16px;
    }
}

@media (max-width: 768px) {
    .article-card img {
        height: 180px;
    }

    h2.text-center {
        font-size: 1.6rem;
    }

    .filter-bar .d-flex {
        flex-direction: column;
        gap: 10px;
    }

    .filter-bar .form-control {
        width: 100% !important;
    }
}
