/*
 * CSS for News & Updates Display Plugin
 * File: css/news-updates-style.css
 */

.news-updates-list {
    margin-bottom: 1.5em; /* Add some space below the list */
    padding: 0;
    list-style: none; /* Remove default list styling if using <ul> */
    /* Using divs, so list-style is not applicable, but good practice */
}

.news-item {
    margin-bottom: 1.5em; /* Space between items */
    padding-bottom: 1.5em; /* Space below content before border */
    border-bottom: 1px solid #eee; /* Separator */
    overflow: hidden; /* Clear floats */
    display: flex; /* Use flexbox for layout */
    flex-direction: column; /* Stack vertically by default */
    gap: 1em; /* Space between thumbnail and content */
}

.news-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none; /* No border for the last item */
}

.news-thumbnail {
    flex-shrink: 0; /* Prevent thumbnail from shrinking */
    /* Width and height are now set via inline style */
    max-width: 100%; /* Ensure container doesn't overflow parent on small screens if size is large */
    margin-right: 0; /* No margin needed with flex gap */
    margin-bottom: 1em; /* Space below image on small screens */
    overflow: hidden; /* Hide parts of image that don't fit 1:1 ratio */
    position: relative; /* Needed for potential absolute positioning of link/overlay if desired */
    border-radius: 4px; /* Slightly rounded corners */
    box-shadow: 0 1px 3px rgba(0,0,0,0.1); /* Subtle shadow */
}

.news-thumbnail a {
    display: block;
    width: 100%;
    height: 100%;
}

.news-thumbnail img {
    display: block; /* Remove bottom space */
    width: 100%;   /* Make image fill container width */
    height: 100%;  /* Make image fill container height */
    max-width: none; /* Override potential theme max-width */
    object-fit: cover; /* Scale image to maintain aspect ratio while filling container. Crop as needed. */
    object-position: center center; /* Center the image within the container */
    border-radius: 0; /* Remove radius from image itself if container has one */
}

.news-content {
    flex-grow: 1; /* Allow content to take remaining space */
    /* Ensure content doesn't overlap floated image if not using flex */
    overflow: hidden;
}

.news-title {
    margin-top: 0;
    margin-bottom: 0.5em;
    font-size: 1.2em; /* Slightly larger title */
    font-weight: 600; /* Bolder title */
    line-height: 1.3;
}

.news-title a {
    text-decoration: none;
    color: inherit; /* Inherit color from theme */
}

.news-title a:hover,
.news-title a:focus {
    text-decoration: underline; /* Underline on hover/focus */
}

.news-excerpt {
    margin-top: 0;
    margin-bottom: 0.75em;
    font-size: 0.95em;
    line-height: 1.6;
    color: #555; /* Slightly muted text color */
}

.news-date {
    margin-top: 0;
    margin-bottom: 0;
    font-size: 0.85em;
    color: #777; /* Lighter color for meta info */
    font-style: italic;
}

.news-read-more {
    font-size: 0.9em;
    font-weight: bold;
    text-decoration: none;
    margin-left: 5px; /* Space before read more */
}
.news-read-more:hover,
.news-read-more:focus {
     text-decoration: underline;
}


/* Responsive Adjustments */

/* Tablet and larger screens (e.g., 768px and up) */
@media (min-width: 768px) {
    .news-item {
        flex-direction: row; /* Side-by-side layout */
        align-items: flex-start; /* Align items to the top */
    }

    .news-thumbnail {
        /* Width/height still controlled by inline style */
        margin-right: 1.5em; /* Space between image and text */
        margin-bottom: 0; /* Reset bottom margin */
    }
}

/* Optional: Larger Desktop */
/* @media (min-width: 1024px) { */
    /* Add specific styles for very large screens if needed */
/* } */