/* =========================
   Hero slider de destaques
   ========================= */

.sec-blog-hero {
    position: relative;
    background-color: var(--primary);
    overflow: hidden;
    padding: 160px 0 80px;
}

.sec-blog-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    background-image: repeating-linear-gradient(45deg,
            rgb(84, 46, 27) 0px,
            rgb(84, 46, 27) 20px,
            transparent 1px,
            transparent 40px);
    pointer-events: none;
}

.sec-blog-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    background-color: rgba(0, 0, 0, .8);
    pointer-events: none;
}

.blog-hero__slider, .blog-hero__controls {
    position: relative;
    z-index: 2;
}

/* Slide inteiro clicável */
.blog-hero-slide__link {
    display: block;
    color: inherit;
    text-decoration: none;
}

/* Mídia — card arredondado */
.blog-hero__media {
    position: relative;
    aspect-ratio: 1 / 1;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, .08);
    background: rgba(255, 255, 255, .02);
    overflow: hidden;
}

.blog-hero__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    display: block;
    border-radius: inherit;
}

/* Estado vazio (sem imagem definida) */
.blog-hero__placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Courier New', monospace;
    font-size: .82rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .25);
}

.blog-hero__body {
    padding: 40px 48px;
    color: var(--white);
}

.blog-hero__title {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-size: clamp(2rem, 4vw, 3.25rem);
    font-weight: 700;
    line-height: 1.08;
    color: var(--white);
    margin: 0 0 16px;
}

.blog-hero__desc {
    font-size: .95rem;
    color: var(--white);
    line-height: 1.6;
    margin: 0 0 24px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Blog meta dentro do hero */
.sec-blog-hero .blog-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    font-size: .78rem;
    color: var(--white);
    margin-bottom: 16px;
}

.sec-blog-hero .blog-meta__author {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--white);
}

.sec-blog-hero .blog-meta__avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

/* Link "Ler Mais" */
.sec-blog-hero .blog-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: .85rem;
    color: var(--quarternary);
    text-transform: uppercase;
    letter-spacing: .06em;
    text-decoration: none;
    transition: color .2s, gap .2s;
}

.blog-hero-slide__link:hover .blog-link {
    gap: 12px;
}

/* =========================
   Controles do carrossel (rodapé)
   ========================= */

.blog-hero__controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 32px;
    position: relative;
}

/* Dots — canto inferior esquerdo. Aparência no padrão global (style.css);
   aqui só layout/posicionamento (flex + gap próprio). */
.blog-hero__dots .slick-dots {
    position: static;
    display: flex;
    align-items: center;
    gap: 8px;
    width: auto;
    margin: 0;
    padding: 0;
    text-align: left;
}

.blog-hero__dots .slick-dots li {
    margin: 0;
}

/* Setas — canto inferior direito (botões circulares) */
.blog-hero__nav {
    display: flex;
    align-items: center;
    gap: 12px;
}

.blog-hero__nav .blog-hero__btn {
    position: static;
    transform: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, .2);
    background: transparent;
    color: var(--white);
    font-size: 1.1rem;
    cursor: pointer;
    transition: color .2s, border-color .2s, background .2s;
}

.blog-hero__nav .blog-hero__btn:hover {
    color: var(--quarternary);
    border-color: var(--quarternary);
    background: rgba(60, 130, 196, .08);
}

.blog-hero__nav .blog-hero__btn::before {
    content: none;
}

/* Responsivo */
@media (max-width: 991.98px) {
    .blog-hero__media {
        aspect-ratio: 16 / 10;
    }

    .blog-hero__body {
        padding: 28px 24px 36px;
    }

    .blog-hero__title {
        font-size: clamp(1.6rem, 6vw, 2.4rem);
    }

    .blog-hero__controls {
        margin-top: 24px;
    }

    .blog-hero__nav .blog-hero__btn {
        width: 40px;
        height: 40px;
    }
}

/* =========================
   PÁGINA: Blog (listagem)
   ========================= */

.sec-blogs {
    padding: 56px 0 72px;
}

/* Total count */
.blogs-total {
    font-size: .9rem;
    color: #666;
    margin-bottom: 24px;
}

.blogs-total strong {
    color: #212529;
}

/* Posts grid */
.posts-grid {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Post card */
.post-card {
    background: #fff;
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, .08);
    overflow: hidden;
    transition: box-shadow .2s ease;
}

.post-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, .06);
}

.post-card__link {
    display: flex;
    flex-direction: row;
    color: inherit;
    text-decoration: none;
    align-items: stretch;
    height: auto;
}

.post-card__media {
    width: 300px;
    background: #f1f1f1 repeating-linear-gradient(45deg, transparent, transparent 10px, rgba(0, 0, 0, .03) 10px, rgba(0, 0, 0, .03) 20px);
    overflow: hidden;
    flex-shrink: 0;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.post-card__media::before {
    content: '[ IMAGEM ]';
    font-family: 'Courier New', monospace;
    font-size: .75rem;
    color: #999;
    letter-spacing: .1em;
    position: absolute;
    z-index: 0;
}

.post-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    position: absolute;
    inset: 0;
    z-index: 1;
    transition: transform .4s ease;
}

.post-card:hover .post-card__media img {
    transform: scale(1.05);
}

.post-card__body {
    padding: 32px;
    display: flex;
    flex-direction: column;
    flex: 1;
    justify-content: center;
}

/* Meta Info inside card */
.post-card .blog-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-size: .85rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.post-card .blog-meta>*:not(:last-child)::after {
    content: " \00B7";
    margin-left: 8px;
    color: #b0b0b0;
    font-weight: 400;
}

.post-card .blog-meta__author {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary, #0A1832);
}

.post-card .blog-meta__cat {
    color: #888;
}

.post-card .blog-meta__date {
    color: #888;
    font-weight: 500;
}

.post-card .blog-meta__avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.post-card__title {
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0 0 12px;
    line-height: 1.3;
    color: var(--primary, #0A1832);
}

.post-card__desc {
    font-size: .9rem;
    color: #666;
    margin: 0 0 20px;
    line-height: 1.4;
}

.post-card__more {
    font-weight: 700;
    font-size: .85rem;
    color: var(--quarternary, #3b82f6);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 6px;
}

.post-card__more::after {
    content: " \2192";
    font-size: 1.2em;
    transition: transform .2s;
}

.post-card:hover .post-card__more::after {
    transform: translateX(4px);
}

/* Empty state */
.listing-empty {
    text-align: center;
    color: #777;
    padding: 48px 0;
}

/* Load more */
.load-more-wrapper {
    text-align: center;
    margin-top: 40px;
}

.btn-load-more {
    border: 1px solid currentColor;
    background: transparent;
    padding: 12px 28px;
    border-radius: 999px;
    font-weight: 600;
    cursor: pointer;
    font-size: .9rem;
}

.btn-load-more:hover {
    background: rgba(0, 0, 0, .05);
}

/* =========================
   Sidebar direita
   ========================= */

.blog-sidebar {
    display: flex;
    flex-direction: column;
    gap: 24px;
    position: sticky;
    top: 120px;
}

.blog-sidebar__title {
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: #999;
    font-weight: 700;
    margin: 0 0 20px;
}

/* Cabeçalho do painel — no desktop é só um título; no mobile vira "select" */
.blog-sidebar__toggle {
    display: block;
    width: 100%;
    padding: 0;
    background: none;
    border: 0;
    text-align: left;
    color: inherit;
    pointer-events: none;
    cursor: default;
}

.blog-sidebar__chevron {
    display: none;
}

.blog-sidebar__content {
    display: block;
}

/* Category list */
.cat-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cat-list__link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-radius: 6px;
    text-decoration: none;
    color: #444;
    font-size: .95rem;
    font-weight: 500;
    transition: all .2s;
    gap: 8px;
}

.cat-list__link:hover {
    background: var(--quarternary);
}

.cat-list__link.is-active {
    background: var(--primary);
    color: #fff;
}

.cat-list__count {
    font-size: .75rem;
    background: rgba(0, 0, 0, .06);
    color: #666;
    border-radius: 999px;
    padding: 2px 10px;
    flex-shrink: 0;
    font-weight: 600;
}

.cat-list__link.is-active .cat-list__count {
    background: rgba(255, 255, 255, .2);
    color: #fff;
}

/* Tag cloud */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag-chip {
    display: inline-block;
    padding: 8px 16px;
    background: #fff;
    border-radius: 999px;
    border: 1px solid rgba(0, 0, 0, .08);
    color: #555;
    font-size: .85rem;
    font-weight: 500;
    text-decoration: none;
    transition: all .2s;
}

.tag-chip:hover {
    border-color: rgba(0, 0, 0, .15);
    background: #f1f1f1;
}

.tag-chip.is-active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.tag-chip--hidden {
    display: none;
}

.tags-load-more {
    display: block;
    margin: 14px auto 0;
    padding: 8px 16px;
    background: #fff;
    border-radius: 999px;
    border: 1px solid rgba(0, 0, 0, .08);
    color: #555;
    font-size: .85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all .2s;
}

.tags-load-more:hover {
    border-color: rgba(0, 0, 0, .15);
    background: #f1f1f1;
}

/* Responsive */
@media (max-width: 991.98px) {
    .blog-sidebar {
        position: static;
    }

    /* Categorias e Tags viram "selects" colapsáveis acima dos posts */
    .blog-sidebar__panel {
        background: #fff;
        border: 1px solid rgba(0, 0, 0, .1);
        border-radius: 8px;
        box-shadow: 0 1px 2px rgba(0, 0, 0, .04);
        overflow: hidden;
    }

    .blog-sidebar__toggle {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding: 16px 18px;
        pointer-events: auto;
        cursor: pointer;
    }

    .blog-sidebar__toggle .blog-sidebar__title {
        margin: 0;
        color: var(--primary);
    }

    .blog-sidebar__chevron {
        display: inline-block;
        flex-shrink: 0;
        color: var(--primary);
        font-size: 1rem;
        transition: transform .25s ease;
    }

    .blog-sidebar__panel.is-open .blog-sidebar__chevron {
        transform: rotate(180deg);
    }

    .blog-sidebar__content {
        display: none;
        padding: 0 18px 18px;
    }

    .blog-sidebar__panel.is-open .blog-sidebar__content {
        display: block;
    }
}

@media (max-width: 767.98px) {
    .post-card__link {
        flex-direction: column;
    }

    .post-card__media {
        width: 100%;
        aspect-ratio: 16 / 9;
        position: static;
    }

    .post-card__media img {
        position: static;
    }

    .post-card__body {
        padding: 24px;
    }
}