/* Basic Reset and Font Setup */
body {
    font-family: 'Poppins', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f8fbff; /* Very light, slightly blue background */
    color: #333;
    line-height: 1.6;
}

/* --- Variables (For easy color changes) --- */
:root {
    --primary-blue: #007aff;
    --light-blue: #e0f0ff;
    --text-dark: #2c3e50;
    --text-light: #5f7a96;
    --border-radius-lg: 18px;
    --shadow-light: 0 4px 15px rgba(0, 0, 0, 0.05);
}

/* --- Header/Navigation Styling (Mimics the clean, centered top bar) --- */
.navbar-container {
    width: 100%;
    background-color: #fff;
    box-shadow: var(--shadow-light);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
}

.logo {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-blue);
}

.nav-links {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
}

.nav-links li {
    margin: 0 15px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-light);
    font-weight: 600;
    padding: 5px 0;
    transition: color 0.3s;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary-blue);
}

.nav-button {
    background-color: var(--light-blue);
    color: var(--primary-blue);
    border: none;
    padding: 8px 15px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
}

.nav-button:hover {
    background-color: var(--primary-blue);
    color: #fff;
}

/* --- Main Content Layout --- */
.content-container {
    max-width: 1100px;
    margin: 0px auto 50px auto;
    padding: 0 20px;
}

/* --- Hero Section (The "Thumbnails Designed for Performance" look) --- */
.hero-section {
    text-align: center;
    padding: 80px 0 60px 0;
}

.hero-title {
    font-size: 42px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 10px;
}

.hero-subtitle {
    font-size: 18px;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
}

/* --- News Grid and Cards (Mimics the Gallery cards) --- */
.section-heading {
    text-align: center;
    font-size: 32px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 40px;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.news-card {
    background-color: #fff;
    border-radius: var(--border-radius-lg);
    padding: 25px;
    box-shadow: var(--shadow-light);
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.tag {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Specific Tag Colors */
.feature-tag {
    background-color: #d1e7ff; /* Light blue */
    color: #007aff; /* Primary blue */
}

.upcoming-tag {
    background-color: #fff3cd; /* Light yellow */
    color: #ffc107; /* Yellow */
}

.announcement-tag {
    background-color: #d4edda; /* Light green */
    color: #28a745; /* Green */
}

.update-tag {
    background-color: #f8d7da; /* Light red */
    color: #dc3545; /* Red */
}

.news-card h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 0 10px 0;
}

.news-card .summary {
    color: var(--text-light);
    font-size: 15px;
    margin-bottom: 15px;
    flex-grow: 1; /* Ensures equal card height */
}

.news-card .date {
    font-size: 12px;
    color: #999;
    margin-bottom: 15px;
    padding-top: 10px;
    border-top: 1px solid #eee;
}

.read-more {
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    align-self: flex-start;
}

.read-more:hover {
    text-decoration: underline;
}

/* --- Responsive Adjustments --- */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        text-align: center;
    }

    .nav-links {
        margin: 10px 0;
    }

    .nav-links li {
        margin: 0 10px;
    }

    .hero-title {
        font-size: 32px;
    }

    .news-grid {
        grid-template-columns: 1fr;
    }
}

/* --- Modal (Fullscreen Article) Styling --- */
.modal {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 2000; /* Sit on top */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: auto; /* Enable scroll if needed */
    background-color: rgba(255, 255, 255, 0.95); /* Semi-transparent white overlay */
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: #fff;
    margin: 5% auto; /* 5% from the top and centered */
    padding: 40px;
    border-radius: var(--border-radius-lg);
    width: 80%; /* Could be more or less, depending on screen size */
    max-width: 900px; /* Max width for readability */
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    position: relative;
}

.close-button {
    color: var(--text-light);
    float: right;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    position: absolute;
    top: 20px;
    right: 30px;
    transition: color 0.2s;
}

.close-button:hover,
.close-button:focus {
    color: var(--primary-blue);
    text-decoration: none;
}

.modal-header {
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
    margin-bottom: 30px;
}

#modal-title {
    font-size: 36px;
    font-weight: 700;
    color: var(--text-dark);
    margin: 10px 0;
}

.date-large {
    display: block;
    font-size: 14px;
    color: #999;
    margin-top: 5px;
}

.modal-body p {
    font-size: 16px;
    margin-bottom: 15px;
    color: var(--text-dark);
}

.modal-body ul {
    margin-left: 20px;
    padding-left: 0;
    list-style-type: disc;
}

.modal-body ul li {
    margin-bottom: 8px;
    color: var(--text-dark);
}

/* Style for the button injected by JS */
.read-more-button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    align-self: flex-start;
    transition: opacity 0.2s;
}

.read-more-button:hover {
    opacity: 0.8;
}

/* Media Query for smaller screens */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 5% auto;
        padding: 20px;
    }
    #modal-title {
        font-size: 28px;
    }
    .close-button {
        top: 10px;
        right: 15px;
    }
}