/* --- Articles Page Specific Styles --- */

/* General page layout & background */
body.articles-page { /* Add this class to your body tag in articles.html */
    background-color: #f8f9fa; /* Lighter, subtle background */
    color: #333;
}
.end-logo {
    height: 30px;        /* Slightly smaller than your main logo usually looks best */
    width: auto;
    margin-left: 10px;   /* Adds a little extra breathing room from the icons */
}
/* Page Header (Articles title) */
.page-header {
    background: linear-gradient(135deg, #17a2b8, #6610f2);
    color: #fff;
    padding: 60px 0; /* More vertical padding */
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    margin-bottom: 25px; /* <-- REDUCED */
}
.logo-img {
    height: 50px;        /* Adjust the height to fit your navbar */
    width: auto;         /* Maintains aspect ratio */
    display: block;
}

.logo {
    display: flex;
    align-items: center; /* Vertically centers the text with the image */
    gap: 10px;           /* Adds space between the image and the text */
    text-decoration: none;
    font-weight: bold;
    color: white;        /* Adjust based on your design */
}
.page-header h1 {
    font-size: 3rem; /* Larger font size */
    font-weight: 900;
    margin: 0;
    letter-spacing: 1.5px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

/* Style for the intro paragraph (Simplified) */
.page-intro {
    font-size: 1.25rem; /* Slightly reduced size */
    color: #555; /* Soft grey color */
    text-align: center;
    max-width: 750px; /* Adjusted width */
    margin: 10px auto 35px auto; /* <-- REDUCED BOTTOM MARGIN */
    line-height: 1.7; /* Keep line height */
}


/* Container for the grid - optional centering */
.article-grid-container {
    max-width: 1200px; /* Limit overall width */
    margin: 0 auto; /* Center the container */
    padding: 0 15px; /* Padding for smaller screens */
}


/* --- New Article Grid --- */
.article-grid {
    display: grid;
    /* Adjust grid to better handle potentially fixed-width cards */
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); /* Use a slightly smaller min for flexibility */
    gap: 30px;
    justify-content: center; /* Center grid items horizontally if space allows */
    margin-top: 0; /* Ensure no extra top margin */
}


/* --- Article Card Styling --- */
.article-card {
    display: block;
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;

    /* Force a maximum width */
    max-width: 260px;

    /* Center the card within its grid cell if the cell is wider */
    margin: 0 auto;
}

.article-card img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 400 / 550;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.article-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75); /* Slightly darker overlay */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-align: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.4s ease;
}

/* Hover Effect */
.article-card:hover {
    transform: translateY(-8px); /* More lift */
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2); /* Deeper shadow on hover */
}

.article-card:hover .article-overlay {
    opacity: 1;
}

.article-card:hover img {
    transform: scale(1.05);
}

/* Overlay Content */
.overlay-title {
    font-size: 1.15rem; /* Slightly larger */
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    line-height: 1.4;
    margin-bottom: 5px; /* Space between title lines */
}

.overlay-volume {
    font-size: 0.95rem; /* Slightly larger */
    margin-top: 10px;
    color: rgba(255, 255, 255, 0.8); /* Slightly faded */
}

.overlay-read-button {
    background-color: #8a3ffc;
    color: #fff;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 12px 30px;
    border-radius: 50px;
    margin-top: 25px;
    transition: background-color 0.3s ease, transform 0.2s ease; /* Added transform */
}
.article-card:hover .overlay-read-button {
    background-color: #7026d3;
    transform: scale(1.05); /* Slight grow effect on button hover */
}
/* --- End Card Styles --- */


/* --- Message for when no articles are found --- */
.no-events-message { /* Reusing class name for simplicity */
    padding: 30px;
    background-color: #e9ecef;
    border-radius: 12px;
    text-align: center;
    color: #6c757d;
    font-size: 1.2rem;
    font-weight: 600;
    grid-column: 1 / -1;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.05);
}
.no-events-message.error {
    color: var(--error-color);
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
}