/* medium-feed-styles.css */

#latest-medium-posts {
    margin-top: 40px; /* Adjust spacing as needed */
    padding: 20px;
    background-color: #f9f9f9; /* Optional: light background for the section */
    border-radius: 8px;
}

#latest-medium-posts h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
}

#medium-posts-container {
    display: grid;
    gap: 20px; /* Space between grid items */
    /* Basic responsive grid: 1 column default, 2+ on larger screens */
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

/* Style for each individual post item */
.medium-post-item {
    background-color: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    display: flex; /* Use flexbox for internal layout */
    flex-direction: column;
    justify-content: space-between; /* Push date/link to bottom */
}

.medium-post-item h3 {
    margin-top: 0;
    font-size: 1.1em;
    margin-bottom: 10px;
}

.medium-post-item h3 a {
    text-decoration: none;
    color: #0077cc; /* Medium's typical link color */
    transition: color 0.3s ease;
}

.medium-post-item h3 a:hover {
    color: #005fa3; /* Darker on hover */
    text-decoration: underline;
}

.medium-post-item p {
    font-size: 0.9em;
    color: #555;
    margin-bottom: 10px; /* Space between date and link */
}

.medium-post-item .post-link {
     display: block; /* Make the link a block element */
     margin-top: auto; /* Push the link to the bottom if using flex */
     text-align: right; /* Align link to the right */
}

.medium-post-item .post-link a {
    color: #0077cc; /* Link color */
    text-decoration: none;
    font-weight: bold;
}

.medium-post-item .post-link a:hover {
    text-decoration: underline;
}

/* Style for loading/error messages */
#medium-posts-container:empty::before {
    content: "Loading Medium posts..."; /* Default text before content loads */
    text-align: center;
    width: 100%;
    color: #888;
}

/* You can add a class to the container if loading/error happens */
/* For simplicity, the JS overwrites the innerHTML, removing the default text */