/* Main styles for the news boxes */
.news-box {
    border: 1px solid #ddd;
    padding: 20px;
    margin-top: 10px;
    margin-bottom: 20px;
    background-color: var(--bg-light); /* Matches your light mode content (e.g., #ffffff from main.css) */
    color: var(--text-color-dark); /* Black text for contrast */
    border-radius: 8px;
    transition: background-color 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

body.dark-mode .news-box {
    background-color: var(--bg-dark); /* Matches your dark mode content (e.g., #121212) */
    border-color: #444;
    color: var(--text-color-light); /* White text for contrast */
}

.news-box h2 a {
    text-decoration: none;
    color: #333;
    transition: color 0.3s ease;
}

.news-box h2 a:hover {
    color: #0073e6;
}

.news-box .published-date {
    font-size: 12px;
    color: #999;
    margin-top: 10px;
}

/* Pagination styling */
.pagination {
    display: flex;
    justify-content: center;
    margin: 20px 0;
}

.pagination a {
    padding: 8px 12px;
    margin: 0 5px;
    background-color: #0073e6;
    color: #fff;
    border-radius: 4px;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.pagination a:hover, .pagination a.active {
    background-color: #005bb5;
}

/* Full news view styles */
.news-full {
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background-color: #fff;
    margin-bottom: 40px;
}

.news-full h2 {
    font-size: 28px;
    margin-bottom: 20px;
}

.news-full .published-date {
    font-size: 12px;
    color: #999;
}

/* Image Hover and Transition */
.news-images img {
    max-width: 20em;
    max-height: 20em;
    margin: 10px;
    border-radius: 4px;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.news-images img:hover {
    opacity: 0.7;
}

/* The Modal (background) */
/* Style the close button in a circular shape at the top-right corner */
.modal .close {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: #333; /* Dark background to stand out on light/dark images */
    color: #fff;
    font-size: 24px;
    font-weight: bold;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    text-align: center;
    line-height: 30px;
    cursor: pointer;
    z-index: 10;
}

/* Ensure the modal image floats above the page content */
.modal {
    position: fixed;
    display: none;
    z-index: 1000; /* Higher z-index to place it on top */
    padding-top: 60px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9); /* Semi-transparent background */
}

/* Center the modal image */
.modal-content {
    margin: auto;
    display: block;
    max-width: 80%;
    max-height: 80%;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.5);
    border-radius: 8px;
}


/* Caption of Modal Image */
#caption {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
    text-align: center;
    color: #ccc;
    padding: 10px 0;
}

/* Add Animation */
.modal-content, #caption {
    animation-name: zoom;
    animation-duration: 0.6s;
}

@keyframes zoom {
    from {transform: scale(0.1);}
    to {transform: scale(1);}
}

/* The Close Button */
.close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: #bbb;
}

/* Dark mode for modal */
body.dark-mode .modal-content {
    background-color: #333;
    border-color: #666;
    color: #ddd;
}


/* Dark mode */

body.dark-mode .news-box h2 a {
    color: #ccc;
}

body.dark-mode .news-box h2 a:hover {
    color: #fff;
}

body.dark-mode .published-date {
    color: #777;
}

body.dark-mode .news-full {
    background-color: #2a2a2a;
    color: #ddd;
}

body.dark-mode .news-full h2 {
    color: #fff;
}

body.dark-mode .pagination a {
    background-color: #444;
    color: #ccc;
}

body.dark-mode .pagination a.active, body.dark-mode .pagination a:hover {
    background-color: #666;
}