/* Outer wrapper */
.hc-latest-posts-wrapper {
    background-color: #332522;
    background-image: url('https://www.highchaparral.se/wp-content/uploads/2025/01/paper-texture-web.jpg');
    background-size: cover; /* Ensures the image covers the entire background */
    background-position: center; /* Centers the image */
    background-repeat: no-repeat; /* Prevents the image from repeating */
    background-blend-mode: multiply;
    padding: 40px 0 0 0;
    position: relative;
    overflow: hidden;
}
.hc-latest-posts-wrapper h2 {
    padding: 32px 25px;
    max-width: 800px;
    color: #f7f2e7;
    font-size: 2rem;
    margin: 0 auto;
    text-align: center;
}


/* Wrapper list */
.hc-latest-posts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 0;
    overflow: hidden;
    padding: 0;
    margin: 0;
    list-style: none; /* remove bullets for UL wrapper */
}

/* Each post item */
.hc-latest-post {
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease;
    list-style: none; /* remove bullets for LI */
}

/* Link wrapper */
.hc-latest-post__link {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.3s ease;
}

/* Post image */
.hc-latest-post__image {
    width: 100%;
    height: auto;
    object-fit: cover;
    flex-shrink: 0;
    pointer-events: none; /* ensure clicks go to the link */
    transition: transform .3s ease;
}

/* Title styling */
.hc-latest-post__title {
    font-size: 1.5rem;
    margin: 0;
    padding: 20px;
    background: linear-gradient(to top, rgba(0,0,0,0.6), rgba(0,0,0,0));
    color: white;
    position: absolute;
    bottom: 0;
    width: 100%;
}

/* Hover and focus effects for both mouse & keyboard users */
.hc-latest-post__link:hover img,
.hc-latest-post__link:focus-visible img {
    transform: scale(1.02);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 1);
    outline: none; /* handled by focus-visible outline below */
}

/* Focus visible outline for accessibility */
.hc-latest-post__link:focus-visible {
    outline: 3px solid currentColor;
    outline-offset: 3px;
}

/* Minimum target size (44x44px) */
.hc-latest-post__link {
    min-height: 44px;
    min-width: 44px;
}

/* Responsive design */
@media (max-width: 768px) {
    .hc-latest-posts-wrapper h2 {
        font-size: 1.7rem;
    }  
}