.ockham-posts-grid,
.ockham-posts-grid * {
    box-sizing: border-box;
}

.ockham-posts-grid-wrap {
    width: 100%;
    color: inherit;
}

.ockham-posts-grid {
    width: 100%;
    align-items: start;
}

.ockham-posts-grid__card,
.ockham-posts-grid__compact-item {
    min-width: 0;
    margin: 0;
}

.ockham-posts-grid__image,
.ockham-posts-grid__image--placeholder {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
}

/*
 * Elementor/temas costumam aplicar `height: auto` diretamente em `img`.
 * Isso fazia a imagem respeitar a proporção original dentro de um container
 * com aspect-ratio próprio, deixando uma faixa vazia no rodapé. As regras
 * abaixo transformam cada área de mídia em uma viewport real: a imagem ocupa
 * toda a caixa e é recortada por object-fit, sem alterar a dimensão do card.
 */
.ockham-posts-grid__featured-link,
.ockham-posts-grid__featured-media,
.ockham-posts-grid__image-link,
.ockham-posts-grid__panel-image-link,
.ockham-posts-grid__compact-thumb,
.ockham-posts-grid__feed-thumb,
.ockham-posts-grid__category-card-image {
    position: relative;
}

.ockham-posts-grid__featured-media > .ockham-posts-grid__image,
.ockham-posts-grid__image-link > .ockham-posts-grid__image,
.ockham-posts-grid__panel-image-link > .ockham-posts-grid__image,
.ockham-posts-grid__compact-thumb > .ockham-posts-grid__image,
.ockham-posts-grid__feed-thumb > .ockham-posts-grid__image,
.ockham-posts-grid__category-card-image > .ockham-posts-grid__image,
.ockham-posts-grid__featured-media > .ockham-posts-grid__image--placeholder,
.ockham-posts-grid__image-link > .ockham-posts-grid__image--placeholder,
.ockham-posts-grid__panel-image-link > .ockham-posts-grid__image--placeholder,
.ockham-posts-grid__compact-thumb > .ockham-posts-grid__image--placeholder,
.ockham-posts-grid__feed-thumb > .ockham-posts-grid__image--placeholder,
.ockham-posts-grid__category-card-image > .ockham-posts-grid__image--placeholder {
    position: absolute;
    inset: 0;
    display: block;
    width: 100% !important;
    max-width: none !important;
    height: 100% !important;
    min-height: 100% !important;
    margin: 0 !important;
    object-fit: cover;
    object-position: center center;
}

.ockham-posts-grid__image--placeholder {
    background: linear-gradient(135deg, #ededed 0%, #d8d8d8 100%);
}

.ockham-posts-grid__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px;
    margin: 0 0 7px;
    font-size: 13px;
    line-height: 1.25;
    font-weight: 600;
    color: #6f6f6f;
}

.ockham-posts-grid__category {
    font-weight: 700;
    text-transform: uppercase;
}

.ockham-posts-grid__meta-separator {
    opacity: .9;
}

.ockham-posts-grid__title,
.ockham-posts-grid__compact-title {
    margin: 0;
    color: #050505;
    font-weight: 700;
    letter-spacing: -.02em;
}

.ockham-posts-grid__title a,
.ockham-posts-grid__compact-title a {
    color: inherit;
    text-decoration: none;
}

.ockham-posts-grid__title a:hover,
.ockham-posts-grid__compact-title a:hover {
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.ockham-posts-grid__excerpt {
    margin-top: 12px;
    color: #6b6b6b;
    font-size: 16px;
    line-height: 1.45;
}

.ockham-posts-grid__button {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    min-height: 30px;
    margin-top: 24px;
    padding: 4px 4px 4px 28px;
    border: 1px solid #d2d2d2;
    border-radius: 999px;
    background: #ffffff;
    box-shadow: none;
    color: #050505;
    font-size: 13px;
    line-height: 1;
    font-weight: 700;
    letter-spacing: 0;
    text-decoration: none;
    white-space: nowrap;
    transition: border-color .22s ease, transform .22s ease;
}

.ockham-posts-grid__button:hover {
    border-color: #b8b8b8;
    transform: translateY(-1px);
}

.ockham-posts-grid__button-label {
    display: inline-flex;
    align-items: center;
    line-height: 1;
}

.ockham-posts-grid__button-icon {
    flex: 0 0 auto;
    display: inline-flex;
    width: 24px;
    height: 24px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #000000;
    color: #ffffff;
    font-size: 12px;
    line-height: 1;
}

.ockham-posts-grid__button-icon i,
.ockham-posts-grid__button-icon svg {
    display: block;
    flex: 0 0 auto;
    color: inherit;
    fill: currentColor;
    transform-origin: center;
}

.ockham-posts-grid__button--no-icon {
    padding-right: 28px;
}

.ockham-posts-grid__empty {
    padding: 18px 20px;
    border: 1px dashed #b9b9b9;
    border-radius: 8px;
    background: #f8f8f8;
    color: #555;
    font-size: 14px;
}

/* Grid 01 — clássico */
.ockham-posts-grid--layout-classic_7 {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-template-rows: auto auto;
    column-gap: 28px;
    row-gap: 30px;
}

.ockham-posts-grid--layout-classic_7 .ockham-posts-grid__card--position-1 {
    grid-column: 1 / span 2;
    grid-row: 1;
}

.ockham-posts-grid--layout-classic_7 .ockham-posts-grid__card--position-2 {
    grid-column: 3;
    grid-row: 1;
}

.ockham-posts-grid--layout-classic_7 .ockham-posts-grid__card--position-3 {
    grid-column: 4;
    grid-row: 1;
}

.ockham-posts-grid--layout-classic_7 .ockham-posts-grid__card--position-4 {
    grid-column: 1;
    grid-row: 2;
}

.ockham-posts-grid--layout-classic_7 .ockham-posts-grid__card--position-5 {
    grid-column: 2;
    grid-row: 2;
}

.ockham-posts-grid--layout-classic_7 .ockham-posts-grid__card--position-6 {
    grid-column: 3;
    grid-row: 2;
}

.ockham-posts-grid--layout-classic_7 .ockham-posts-grid__card--position-7 {
    grid-column: 4;
    grid-row: 2;
}

.ockham-posts-grid__card--featured-overlay {
    overflow: hidden;
    border-radius: 5px;
    background: #e9e9e9;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .18);
}

.ockham-posts-grid__featured-link {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 1.4 / 1;
    overflow: hidden;
    color: inherit;
    text-decoration: none;
}

.ockham-posts-grid__featured-media {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #ececec;
}

.ockham-posts-grid__card--featured-overlay .ockham-posts-grid__image,
.ockham-posts-grid__card--featured-overlay .ockham-posts-grid__image--placeholder {
    position: absolute;
    inset: 0;
}

.ockham-posts-grid__featured-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 48%, rgba(0, 0, 0, .08) 58%, rgba(0, 0, 0, .78) 100%);
    pointer-events: none;
}

.ockham-posts-grid__featured-content {
    position: absolute;
    left: 20px;
    right: 20px;
    bottom: 24px;
    z-index: 2;
}

.ockham-posts-grid__card--featured-overlay .ockham-posts-grid__meta {
    color: #ffffff;
}

.ockham-posts-grid__card--featured-overlay .ockham-posts-grid__title {
    display: block;
    max-width: 94%;
    color: #ffffff;
    font-size: clamp(26px, 2.25vw, 34px);
    line-height: 1.04;
    letter-spacing: -.025em;
}

.ockham-posts-grid__card--standard .ockham-posts-grid__image-link {
    display: block;
    width: 100%;
    aspect-ratio: 1.51 / 1;
    overflow: hidden;
    border-radius: 5px;
    background: #ececec;
    text-decoration: none;
}

.ockham-posts-grid__card--standard .ockham-posts-grid__image {
    transition: transform .28s ease;
}

.ockham-posts-grid__card--standard .ockham-posts-grid__image-link:hover .ockham-posts-grid__image {
    transform: scale(1.015);
}

.ockham-posts-grid__content {
    padding-top: 16px;
}

.ockham-posts-grid__card--standard .ockham-posts-grid__title {
    font-size: 22px;
    line-height: 1.08;
}

/* Grid 02 e Grid 03 */
.ockham-posts-grid--layout-split_5,
.ockham-posts-grid--layout-dual_6 {
    display: grid;
    gap: 30px;
}

.ockham-posts-grid--layout-split_5 {
    grid-template-columns: minmax(0, 1.16fr) minmax(0, .92fr);
}

.ockham-posts-grid--layout-dual_6 {
    grid-template-columns: minmax(0, 1fr) minmax(0, .92fr) minmax(0, 1fr);
}

.ockham-posts-grid__card--feature-panel {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.ockham-posts-grid__panel-image-link {
    display: block;
    width: 100%;
    aspect-ratio: 1.35 / 1;
    overflow: hidden;
    border-radius: 5px;
    background: #ececec;
    text-decoration: none;
}

.ockham-posts-grid__card--feature-panel .ockham-posts-grid__image {
    transition: transform .28s ease;
}

.ockham-posts-grid__card--feature-panel .ockham-posts-grid__panel-image-link:hover .ockham-posts-grid__image {
    transform: scale(1.018);
}

.ockham-posts-grid__panel-content {
    padding-top: 16px;
}

.ockham-posts-grid__card--feature-panel .ockham-posts-grid__title {
    font-size: clamp(24px, 1.8vw, 30px);
    line-height: 1.08;
}

.ockham-posts-grid__stack--compact {
    display: flex;
    flex-direction: column;
    gap: 0;
    min-width: 0;
}

.ockham-posts-grid__compact-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 80px;
    align-items: center;
    gap: 18px;
    padding: 4px 0 24px;
    border-bottom: 1px solid #d8d8d8;
}

.ockham-posts-grid__compact-item + .ockham-posts-grid__compact-item {
    padding-top: 24px;
}

.ockham-posts-grid__compact-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.ockham-posts-grid__compact-main {
    min-width: 0;
}

.ockham-posts-grid__compact-title {
    font-size: 18px;
    line-height: 1.16;
}

.ockham-posts-grid__compact-thumb {
    display: block;
    width: 80px;
    height: 80px;
    overflow: hidden;
    border-radius: 4px;
    background: #dbe2dc;
}

.ockham-posts-grid__compact-thumb .ockham-posts-grid__image,
.ockham-posts-grid__compact-thumb .ockham-posts-grid__image--placeholder {
    width: 100%;
    height: 100%;
}

/* Responsividade */
@media (max-width: 1024px) {
    .ockham-posts-grid--layout-classic_7 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-template-rows: none;
        column-gap: 24px;
        row-gap: 28px;
    }

    .ockham-posts-grid--layout-classic_7 .ockham-posts-grid__card--position-1 {
        grid-column: 1 / span 2;
        grid-row: 1;
    }

    .ockham-posts-grid--layout-classic_7 .ockham-posts-grid__card--position-2 {
        grid-column: 1;
        grid-row: 2;
    }

    .ockham-posts-grid--layout-classic_7 .ockham-posts-grid__card--position-3 {
        grid-column: 2;
        grid-row: 2;
    }

    .ockham-posts-grid--layout-classic_7 .ockham-posts-grid__card--position-4 {
        grid-column: 1;
        grid-row: 3;
    }

    .ockham-posts-grid--layout-classic_7 .ockham-posts-grid__card--position-5 {
        grid-column: 2;
        grid-row: 3;
    }

    .ockham-posts-grid--layout-classic_7 .ockham-posts-grid__card--position-6 {
        grid-column: 1;
        grid-row: 4;
    }

    .ockham-posts-grid--layout-classic_7 .ockham-posts-grid__card--position-7 {
        grid-column: 2;
        grid-row: 4;
    }

    .ockham-posts-grid--layout-split_5 {
        grid-template-columns: minmax(0, 1fr);
    }

    .ockham-posts-grid--layout-dual_6 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ockham-posts-grid--layout-dual_6 .ockham-posts-grid__stack--compact {
        grid-column: 1 / -1;
    }
}

@media (max-width: 767px) {
    .ockham-posts-grid--layout-classic_7,
    .ockham-posts-grid--layout-split_5,
    .ockham-posts-grid--layout-dual_6 {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: none;
        gap: 28px;
    }

    .ockham-posts-grid--layout-classic_7 .ockham-posts-grid__card--position-1,
    .ockham-posts-grid--layout-classic_7 .ockham-posts-grid__card--position-2,
    .ockham-posts-grid--layout-classic_7 .ockham-posts-grid__card--position-3,
    .ockham-posts-grid--layout-classic_7 .ockham-posts-grid__card--position-4,
    .ockham-posts-grid--layout-classic_7 .ockham-posts-grid__card--position-5,
    .ockham-posts-grid--layout-classic_7 .ockham-posts-grid__card--position-6,
    .ockham-posts-grid--layout-classic_7 .ockham-posts-grid__card--position-7 {
        grid-column: 1;
        grid-row: auto;
    }

    /*
     * No mobile, o destaque do Grid 01 deixa de usar imagem de fundo/overlay.
     * Ele passa a seguir a leitura dos cards comuns: imagem em cima e conteúdo abaixo.
     */
    .ockham-posts-grid--layout-classic_7 .ockham-posts-grid__card--featured-overlay {
        overflow: visible;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
    }

    .ockham-posts-grid--layout-classic_7 .ockham-posts-grid__featured-link {
        display: block;
        aspect-ratio: auto;
        overflow: visible;
        color: inherit;
        text-decoration: none;
    }

    .ockham-posts-grid--layout-classic_7 .ockham-posts-grid__featured-media {
        position: relative;
        inset: auto;
        display: block;
        width: 100%;
        height: auto;
        aspect-ratio: 1.51 / 1;
        overflow: hidden;
        border-radius: 5px;
        background: #ececec;
    }

    .ockham-posts-grid--layout-classic_7 .ockham-posts-grid__featured-shade {
        display: none;
    }

    .ockham-posts-grid--layout-classic_7 .ockham-posts-grid__featured-content {
        position: static;
        display: block;
        padding-top: 16px;
    }

    .ockham-posts-grid--layout-classic_7 .ockham-posts-grid__card--featured-overlay .ockham-posts-grid__meta {
        color: #6f6f6f !important;
    }

    .ockham-posts-grid--layout-classic_7 .ockham-posts-grid__card--featured-overlay .ockham-posts-grid__title {
        display: block;
        max-width: 100%;
        color: #050505 !important;
        font-size: 21px;
        line-height: 1.08;
        letter-spacing: -.02em;
    }

    .ockham-posts-grid__card--standard .ockham-posts-grid__title,
    .ockham-posts-grid__card--feature-panel .ockham-posts-grid__title {
        font-size: 21px;
    }

    .ockham-posts-grid__compact-item {
        grid-template-columns: minmax(0, 1fr) 68px;
        gap: 14px;
    }

    .ockham-posts-grid__compact-thumb {
        width: 68px;
        height: 68px;
    }

    .ockham-posts-grid__button {
        padding-left: 22px;
    }
}


.ockham-posts-grid__button-icon-fallback {
    display: inline-flex;
    width: 12px;
    height: 12px;
    align-items: center;
    justify-content: center;
}

.ockham-posts-grid__button-icon-fallback svg {
    display: block;
    width: 12px;
    height: 12px;
}

/* Grid 04 — feed cronológico */
.ockham-posts-grid--layout-chronological_feed {
    display: block;
}

.ockham-posts-grid__feed-head,
.ockham-posts-grid__section-head {
    margin-bottom: 18px;
}

.ockham-posts-grid__feed-title,
.ockham-posts-grid__section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    color: inherit;
    font-size: 21px;
    line-height: 1.1;
    font-weight: 700;
}

.ockham-posts-grid__feed-mark,
.ockham-posts-grid__section-mark {
    color: #18d8df;
    font-weight: 800;
    letter-spacing: -0.08em;
}

.ockham-posts-grid__feed-items {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 20px;
}

.ockham-posts-grid__feed-item {
    display: grid;
    grid-template-columns: 228px minmax(0, 1fr);
    align-items: center;
    gap: 14px;
    min-width: 0;
    padding: 18px 0 20px;
    border-bottom: 1px solid #d8d8d8;
}

.ockham-posts-grid__feed-thumb {
    display: block;
    width: 100%;
    aspect-ratio: 1.45 / 0.9;
    overflow: hidden;
    border-radius: 3px;
    background: #ececec;
    text-decoration: none;
}

.ockham-posts-grid__feed-thumb .ockham-posts-grid__image {
    transition: transform .28s ease;
}

.ockham-posts-grid__feed-thumb:hover .ockham-posts-grid__image {
    transform: scale(1.018);
}

.ockham-posts-grid__feed-content {
    min-width: 0;
}

.ockham-posts-grid__feed-item-title {
    margin: 0;
    color: #050505;
    font-size: 18px;
    line-height: 1.14;
    font-weight: 700;
    letter-spacing: -.02em;
}

.ockham-posts-grid__feed-item-title a {
    color: inherit;
    text-decoration: none;
}

.ockham-posts-grid__feed-item-title a:hover {
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.ockham-posts-grid__feed-content .ockham-posts-grid__button {
    margin-top: 16px;
}

.ockham-posts-grid__feed-actions {
    padding-top: 30px;
}

.ockham-posts-grid__load-more {
    display: inline-flex;
    width: 100%;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border: 0;
    border-radius: 3px;
    background: #18d8df;
    color: #ffffff;
    font-size: 12px;
    line-height: 1;
    font-weight: 700;
    letter-spacing: .03em;
    text-transform: uppercase;
    cursor: pointer;
    transition: filter .22s ease, transform .22s ease;
}

.ockham-posts-grid__load-more:hover {
    filter: brightness(.95);
    transform: translateY(-1px);
}

.ockham-posts-grid__load-more[disabled] {
    cursor: default;
    opacity: .75;
    transform: none;
}



/* Grid 05 — categoria / duas colunas */
.ockham-posts-grid--layout-category_cards_2col {
    display: block;
}

.ockham-posts-grid__category-grid-items {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 28px;
    row-gap: 34px;
}

.ockham-posts-grid__category-card {
    min-width: 0;
    margin: 0;
}

.ockham-posts-grid__category-card-image {
    display: block;
    width: 100%;
    aspect-ratio: 1.5 / 1;
    overflow: hidden;
    border-radius: 5px;
    background: #ececec;
    text-decoration: none;
}

.ockham-posts-grid__category-card-image .ockham-posts-grid__image {
    transition: transform .28s ease;
}

.ockham-posts-grid__category-card-image:hover .ockham-posts-grid__image {
    transform: scale(1.018);
}

.ockham-posts-grid__category-card-content {
    padding-top: 14px;
}

.ockham-posts-grid__category-card-title {
    margin: 0;
    color: #050505;
    font-size: 22px;
    line-height: 1.1;
    font-weight: 700;
    letter-spacing: -.02em;
}

.ockham-posts-grid__category-card-title a {
    color: inherit;
    text-decoration: none;
}

.ockham-posts-grid__category-card-title a:hover {
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.ockham-posts-grid__category-card-content .ockham-posts-grid__button {
    margin-top: 18px;
}

@media (max-width: 1024px) {
    .ockham-posts-grid__feed-items {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 767px) {
    .ockham-posts-grid__category-grid-items {
        grid-template-columns: minmax(0, 1fr);
        row-gap: 28px;
    }

    .ockham-posts-grid__category-card-title {
        font-size: 21px;
    }

    .ockham-posts-grid__feed-item {
        grid-template-columns: minmax(0, 1fr);
    }

    .ockham-posts-grid__feed-thumb {
        aspect-ratio: 1.55 / 1;
    }

    .ockham-posts-grid__feed-item-title {
        font-size: 21px;
    }
}

/* Grid 06 — tags / duas colunas */
.ockham-posts-grid--layout-tag_cards_2col {
    display: block;
}

.ockham-posts-grid__no-results {
    width: 100%;
    padding: 18px 20px;
    border: 1px solid currentColor;
    border-radius: 5px;
    color: inherit;
    font-size: 15px;
    line-height: 1.45;
    opacity: .78;
}
