/* Main Container */
.latest-posts-container {
    background-color: #ffffff;
    padding: 20px;
    box-shadow: 0px 2px 2px rgba(0, 0, 0, 0.08);
    margin-bottom: 20px;
    font-family: 'Roboto', sans-serif;
    width: 280px;
}

/* Header Title */
.section-title {
    font-size: 24px;
    color: #404040;
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 20px;
    border-bottom: 3px solid #f9f9f9;
    padding-bottom: 10px;
}

/* Links */
.overlay-link {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 1;
}

.post-title-large a, .post-title-small a {
    text-decoration: none;
    color: #404040;
    transition: color 0.2s;
}

.post-title-large a:hover, .post-title-small a:hover {
    color: #0987f5;
}

/* Featured Post Styling */
.featured-post {
    margin-bottom: 25px;
}

.post-image-large img {
    width: 100%;
    height: 100%;
    /* Key property: forces the image to cover the box without gaps or stretching */
    object-fit: cover; 
}

.post-title-large {
    font-size: 20px;
    line-height: 1.4;
    margin: 15px 0 5px 0;
}

/* Small List Posts Styling */
.small-post {
    display: flex;
    align-items: flex-start;
    margin-bottom: 20px;
    gap: 15px;
}

.post-thumb {
    width: 136px;
    height: 136px;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
    background-color: #ccc;
}

.post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}


.post-info {
    flex: 1;
}

.post-title-small {
    font-size: 16px;
    line-height: 1.4;
    margin: 0 0 5px 0;
}

/* Meta Data (Dates/Author) */
.post-meta {
    font-size: 10px;
    color: #4a4a4a;
    text-transform: uppercase;
    font-weight: 500;
    letter-spacing: 0.3px;
}

.meta-item {
    margin-right: 10px;
}

/* --- MOBILE RESPONSIVE VERSION --- */
@media screen and (max-width: 768px) {
    
    /* 1. Make the container fill the phone width */
    .latest-posts-container {
        width: 100% !important; /* Overrides the 280px */
        max-width: 100% !important;
        box-sizing: border-box; /* Keeps padding inside the screen */
        padding: 15px;
        margin: 10px 0;
        box-shadow: none; /* Cleaner look for mobile */
        border-bottom: 1px solid #eee;
    }

    /* 2. Adjust Titles */
    .section-title {
        font-size: 20px;
        text-align: left;
    }

    /* 3. Stack Small Posts Vertically */
    .small-post {
        flex-direction: column; /* Stacks image on top of text */
        gap: 10px;
        margin-bottom: 30px;
        border-bottom: 1px solid #f0f0f0;
        padding-bottom: 15px;
    }

    /* 4. Make Thumbnails Full Width */
    .post-thumb {
        width: 100% !important; /* Thumbnail takes full width of phone */
        height: 200px !important; /* Taller for better visibility */
    }

    .post-thumb img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    /* 5. Adjust Text for Readability */
    .post-title-small {
        font-size: 18px; /* Slightly larger for easier tapping */
        margin-top: 5px;
    }

    .post-meta {
        font-size: 12px; /* Easier to read on mobile */
        color: #777;
    }

    /* 6. Kill the Hashtag/Ghost Link Issue */
    /* If you keep the overlay-link, ensure it's not blocking the whole page */
    .overlay-link {
        z-index: 2;
    }
}