/**
 * Pinned posts grid — "visual nav bar" for the top of the Circle feed.
 * Scoped to .mpcirc-pinned-* so it only affects this feature.
 */

.mpcirc-pinned-grid-wrap {
    margin: 0 0 1.5rem;
}

.mpcirc-pinned-grid-heading {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0 0 0.75rem;
    font-size: 0.95rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #4b5563;
}

.mpcirc-pinned-grid-heading-icon {
    font-size: 1rem;
    line-height: 1;
}

/* The grid: aims for ~6 across on wide screens, wrapping down on smaller ones. */
.mpcirc-pinned-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.75rem;
}

/* Each pinned post is a small clickable card. */
.mpcirc-pinned-card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    position: relative;
    display: block;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}

.mpcirc-pinned-card:hover,
.mpcirc-pinned-card:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
    border-color: #d1d5db;
}

/* Media area: fixed aspect ratio so all cards line up. Defaults to blank white
   when there is no image. */
.mpcirc-pinned-card__media {
    display: block;
    aspect-ratio: 16 / 10;
    background-color: #fff;
    background-size: cover;
    background-position: center;
}

/* No image: just blank white (for now). */
.mpcirc-pinned-card__media--no-image {
    background: #fff;
}

/* Title sits in a solid band across the bottom of the card. The band uses the
   same teal as the active circle-navigation tab (#1da69a) with white text, so
   it's readable whether or not the card has an image. */
.mpcirc-pinned-card__title {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    padding: 0.45rem 0.6rem;
    font-size: 0.8rem;
    line-height: 1.3;
    font-weight: 500;
    color: #fff;
    text-decoration: none;
    background: #1da69a;
}

/* Tighten the grid on small screens so it stays a compact nav, not big tiles. */
@media (max-width: 600px) {
    .mpcirc-pinned-grid {
        grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
        gap: 0.5rem;
    }

    .mpcirc-pinned-card__title {
        font-size: 0.72rem;
        padding: 0.4rem 0.45rem 0.5rem;
    }
}
