/* Blocksy Related Posts */

/* ── Wrapper ── */
.brp-related-posts {
    margin-top: clamp(2rem, 5vw, 3.5rem);
    margin-bottom: clamp(2rem, 5vw, 3.5rem);
    container-type: inline-size;
    font-family: var(--brp-font-family, var(--theme-font-family, inherit));
}

/* ── Block heading ── */
.brp-heading {
  margin-top: 2rem;
  margin-bottom: 1.25rem;
}

.brp-related-posts .related-title {
    margin: 0;
    padding: 0;
    line-height: 1.3;
    font-size:   var(--brp-bt-size,   inherit);
    font-weight: var(--brp-bt-weight, inherit);
    color:       var(--brp-bt-color,  inherit);
    font-family: var(--brp-font-family, inherit) !important;
}

/* ── Row — Grid Responsivo (Múltiplas linhas) ── */
.brp-row {
    display: grid;
    grid-template-columns: repeat(var(--brp-cols, 4), 1fr);
    gap: clamp(1rem, 2.5vw, 1.5rem);
}

/* Responsividade com Container Queries (Tablet: 2 itens por linha) */
@container (max-width: 800px) {
    .brp-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Responsividade (Mobile: 1 item por linha) */
@container (max-width: 480px) {
    .brp-row {
        grid-template-columns: 1fr;
    }
}

/* ── Card ── */
.brp-item {
    scroll-snap-align: start;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

/* ── Thumbnail ── */
.brp-thumb-link,
.brp-thumb-link:-webkit-any-link {
    display: block;
    text-decoration: none !important;
    border-radius: 6px;
    overflow: hidden;
}

.brp-thumb-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 400 / 250;
    overflow: hidden;
    background: var(--theme-palette-color-6, #f0f0f5);
    border-radius: 6px;
}

.brp-thumb-wrap .brp-img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.brp-no-thumb {
    width: 100%;
    height: 100%;
    background: var(--theme-palette-color-6, #eee);
}

/* ── Item title ── */
.brp-item-body {
    padding: 0 1px;
}

.brp-related-posts .related-entry-title {
    display: block;
    font-size:   var(--brp-it-size,   0.9rem);
    font-weight: var(--brp-it-weight, 600);
    color:       var(--brp-it-color,  var(--theme-headings-color, inherit));
    font-family: var(--brp-font-family, inherit) !important;
    line-height: 1.35;
}

.brp-related-posts .related-entry-title a,
.brp-related-posts .related-entry-title a:-webkit-any-link {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-decoration: none !important;
    font-family: var(--brp-font-family, inherit) !important;
    color: var(--brp-it-color, var(--theme-headings-color, inherit)) !important;
    transition: color 0.2s ease;
}

.brp-related-posts .related-entry-title a:hover,
.brp-related-posts .related-entry-title a:-webkit-any-link:hover,
.brp-item:hover .related-entry-title a {
    text-decoration: none !important;
    color: var(--brp-it-hover, var(--theme-palette-color-1, inherit)) !important;
}
