/*
 * v0.244 — Biblioteca de materiais (/ebook/ e /kit-de-negocios/).
 * Medidas do Figma "E-books" e "E-books - Resultado de pesquisa" (frame de
 * 1440 px, conteúdo de 1216 px com 112 px de margem):
 *   banner #0A0F14 de ponta a ponta, cantos de baixo com raio 32, 100/104 de
 *   respiro, título 48/600, texto 16/24, busca 400×48 + botão 176×48;
 *   104 até os filtros, pílulas de 40 px, 56 até a grade;
 *   cards de 280 px em 4 colunas (32 entre colunas, 56 entre linhas), raio 8,
 *   imagem 280×158 colada no card, título 16/24, texto 12/18, link 12/600;
 *   152 da grade até o rodapé.
 */

/* ---------- Cabeçalho ---------- */
.pmv2-bib-hero {
    width: 100%;
    background: #0A0F14;
    border-radius: 0 0 32px 32px;
    color: #FFFFFF;
    font-family: "Plus Jakarta Sans", sans-serif;
}
.pmv2-bib-hero__in {
    box-sizing: border-box;
    max-width: 1440px;
    margin: 0 auto;
    padding: 100px 112px 104px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 592px;
    column-gap: 32px;
    align-items: start;
}
.pmv2-bib-hero .pmv2-bib-hero__titulo {
    margin: 0;
    font-family: inherit;
    font-size: 48px;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: #FFFFFF;
}
.pmv2-bib-hero__texto {
    margin: 0 0 40px;
    font-size: 16px;
    font-weight: 400;
    line-height: 24px;
    color: #FFFFFF;
}
.pmv2-bib-busca {
    display: flex;
    gap: 16px;
    margin: 0;
}
.pmv2-bib-busca__campo {
    position: relative;
    flex: 0 1 400px;
    min-width: 0;
    margin: 0;
}
.pmv2-bib-busca__lupa {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    color: #4C5562;
    pointer-events: none;
}
.pmv2-bib-busca .pmv2-bib-busca__campo input[type="search"] {
    box-sizing: border-box;
    width: 100%;
    height: 48px;
    margin: 0;
    padding: 0 16px 0 44px;
    border: 1px solid #D5D9DE;
    border-radius: 999px;
    background: #FFFFFF;
    color: #0A0F14;
    font-family: inherit;
    font-size: 14px;
    line-height: 20px;
    box-shadow: none;
    outline: none;
}
.pmv2-bib-busca .pmv2-bib-busca__campo input[type="search"]::placeholder { color: #6B7280; opacity: 1; }
.pmv2-bib-busca .pmv2-bib-busca__campo input[type="search"]:focus { border-color: #1D5EFF; box-shadow: 0 0 0 3px rgba(29, 94, 255, .25); }
.pmv2-bib-busca .pmv2-bib-busca__botao {
    flex: 0 0 176px;
    height: 48px;
    margin: 0;
    padding: 0 24px;
    border: 0;
    border-radius: 999px;
    background: #1D5EFF;
    color: #FFFFFF;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    line-height: 20px;
    cursor: pointer;
    transition: background-color .15s ease;
}
.pmv2-bib-busca .pmv2-bib-busca__botao:hover,
.pmv2-bib-busca .pmv2-bib-busca__botao:focus-visible { background: #0B4AE6; color: #FFFFFF; }

/* Seção do Elementor que leva o cabeçalho: sem respiro, de ponta a ponta. */
.elementor-section.pmv2-bib-sec-hero,
.elementor-section.pmv2-bib-sec-hero > .elementor-container,
.elementor-section.pmv2-bib-sec-hero .elementor-column,
.elementor-section.pmv2-bib-sec-hero .elementor-widget-wrap { padding: 0 !important; margin: 0 !important; max-width: none !important; }
.elementor-section.pmv2-bib-sec-hero .elementor-widget-pmv2_biblioteca_cabecalho { margin: 0 !important; }

/* ---------- Área da grade ---------- */
.elementor-section.pmv2-bib-sec-lista { padding: 104px 0 152px !important; }
.elementor-section.pmv2-bib-sec-lista > .elementor-container { max-width: 1216px !important; }
.elementor-section.pmv2-bib-sec-lista .elementor-column > .elementor-widget-wrap { padding: 0 !important; }
.elementor-widget-pmv2_biblioteca_filtros { margin: 0 0 56px !important; }
.elementor-widget-pmv2_biblioteca_filtros:has(.pmv2-bib-resultado) { margin-bottom: 24px !important; }

/* ---------- Filtros ---------- */
.pmv2-bib-filtros {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-family: "Plus Jakarta Sans", sans-serif;
}
.pmv2-bib-dd { position: relative; }
.pmv2-bib-filtros .pmv2-bib-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 40px;
    margin: 0;
    padding: 0 16px;
    border: 1px solid #D5D9DE;
    border-radius: 999px;
    background: #FFFFFF;
    color: #0A0F14;
    font-family: inherit;
    font-size: 14px;
    font-weight: 400;
    line-height: 20px;
    cursor: pointer;
    box-shadow: none;
}
.pmv2-bib-filtros .pmv2-bib-pill:hover { border-color: #A9B0BA; background: #FFFFFF; color: #0A0F14; }
.pmv2-bib-filtros .pmv2-bib-pill:focus-visible { outline: 2px solid #1D5EFF; outline-offset: 2px; }
.pmv2-bib-pill__rot { color: #4C5562; }
.pmv2-bib-pill__valor { font-weight: 600; color: #0A0F14; }
.pmv2-bib-pill__seta { color: #0A0F14; transition: transform .15s ease; }
.pmv2-bib-pill[aria-expanded="true"] .pmv2-bib-pill__seta { transform: rotate(180deg); }
.pmv2-bib-pill__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 6px;
    box-sizing: border-box;
    border-radius: 999px;
    background: #1D5EFF;
    color: #FFFFFF;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
}

.pmv2-bib-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    z-index: 50;
    box-sizing: border-box;
    margin: 0;
    padding: 6px;
    list-style: none;
    background: #FFFFFF;
    border: 1px solid #E1E4E7;
    border-radius: 8px;
    box-shadow: 0 12px 16px -4px rgba(16, 24, 40, .08), 0 4px 6px -2px rgba(16, 24, 40, .03);
}
.pmv2-bib-menu[hidden] { display: none; }
.pmv2-bib-menu--ordem { min-width: 240px; }
.pmv2-bib-menu--ordem li { margin: 0; padding: 0; }
.pmv2-bib-menu__item {
    display: block;
    padding: 10px 10px;
    border-radius: 6px;
    color: #0A0F14;
    font-size: 14px;
    line-height: 20px;
    text-decoration: none;
}
.pmv2-bib-menu__item:hover { background: #F5F6F7; color: #0A0F14; }
.pmv2-bib-menu__item.is-ativo { background: #F2F4F7; color: #1D5EFF; }

.pmv2-bib-menu--cat { width: 376px; max-width: calc(100vw - 32px); padding: 8px 0 0; }
.pmv2-bib-menu--cat .pmv2-bib-menu__busca {
    box-sizing: border-box;
    display: block;
    width: calc(100% - 16px);
    height: 40px;
    margin: 0 8px 8px;
    padding: 0 12px;
    border: 1px solid #E1E4E7;
    border-radius: 8px;
    background: #FFFFFF;
    font-family: inherit;
    font-size: 12px;
    color: #0A0F14;
    outline: none;
}
.pmv2-bib-menu--cat .pmv2-bib-menu__busca:focus { border-color: #1D5EFF; }
.pmv2-bib-opcao {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    padding: 6px 16px;
    font-size: 14px;
    line-height: 20px;
    color: #0A0F14;
    cursor: pointer;
}
.pmv2-bib-opcao:hover { background: #F5F6F7; }
.pmv2-bib-opcao[hidden] { display: none; }
.pmv2-bib-opcao input[type="checkbox"] {
    flex: 0 0 16px;
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: #1D5EFF;
    cursor: pointer;
}
.pmv2-bib-opcao--todas { padding-bottom: 12px; border-bottom: 1px solid #E1E4E7; margin-bottom: 6px; }
.pmv2-bib-menu__lista { max-height: 320px; overflow-y: auto; padding-bottom: 8px; }

/* ---------- Resultado da busca ---------- */
.pmv2-bib-resultado { font-family: "Plus Jakarta Sans", sans-serif; }
.pmv2-bib-resultado .pmv2-bib-resultado__titulo {
    margin: 0;
    font-family: inherit;
    font-size: 20px;
    font-weight: 600;
    line-height: 30px;
    color: #0A0F14;
}
.pmv2-bib-resultado__vazio { margin: 16px 0 0; font-size: 16px; line-height: 24px; color: #4C5562; }
.pmv2-bib-resultado__vazio a { color: #1D5EFF; font-weight: 600; }

/* ---------- Grade e cards ---------- */
.elementor-widget-loop-grid.pmv2-bib-grid .elementor-loop-container {
    --grid-column-gap: 32px;
    --grid-row-gap: 56px;
    column-gap: 32px !important;
    row-gap: 56px !important;
}
.pmv2-bib-grid .e-loop-item,
.pmv2-bib-grid .e-loop-item > .elementor-section,
.pmv2-bib-grid .e-loop-item > .elementor-section > .elementor-container { height: 100%; }
.elementor-column.pmv2-bib-card { height: 100%; }
.elementor-column.pmv2-bib-card > .elementor-widget-wrap,
.elementor-column.pmv2-bib-card > .elementor-element-populated {
    display: flex !important;
    flex-direction: column;
    align-content: stretch;
    height: 100%;
    padding: 0 0 16px !important;
    overflow: hidden;
    border-radius: 8px !important;
    background: #FFFFFF;
    box-shadow: 0 1px 3px rgba(16, 24, 40, .10), 0 1px 2px rgba(16, 24, 40, .06) !important;
}
.elementor-column.pmv2-bib-card { box-shadow: none !important; border-radius: 8px !important; }
.pmv2-bib-card .elementor-widget-wrap > .elementor-element { width: 100%; }
/* As margens e recuos antigos do card (24/24 no título, 41 no texto, 24 à
   esquerda no botão) o Elementor grava na caixa interna do widget: zera ali,
   e o espaçamento do Figma fica só nas regras abaixo. */
.pmv2-bib-card .elementor-widget > .elementor-widget-container { margin: 0 !important; padding: 0 !important; }
.pmv2-bib-card .elementor-widget-theme-post-featured-image { margin: 0 !important; }
.pmv2-bib-card .elementor-widget-theme-post-featured-image img {
    display: block;
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 280 / 158;
    object-fit: cover;
    border-radius: 0 !important;
}
.pmv2-bib-card .elementor-widget-theme-post-title { margin: 16px 0 12px !important; padding: 0 16px !important; }
.pmv2-bib-card .elementor-widget-theme-post-title .elementor-heading-title {
    margin: 0;
    font-size: 16px !important;
    font-weight: 600 !important;
    line-height: 24px !important;
    color: #0A0F14 !important;
}
.pmv2-bib-card .elementor-widget-theme-post-content { margin: 0 0 24px !important; padding: 0 16px !important; }
.pmv2-bib-card .elementor-widget-theme-post-content,
.pmv2-bib-card .elementor-widget-theme-post-content p {
    margin-top: 0;
    font-size: 12px !important;
    line-height: 18px !important;
    color: #4C5562 !important;
}
.pmv2-bib-card .elementor-widget-theme-post-content p:last-child { margin-bottom: 0; }
.pmv2-bib-card .elementor-widget-pmv2_material_botao { margin: auto 0 0 !important; padding: 0 16px !important; }
.pmv2-bib-card .elementor-widget-pmv2_material_botao .pmv2-material-btn {
    padding: 0 !important;
    background: transparent !important;
    color: #1D5EFF;
    font-size: 12px !important;
    font-weight: 600 !important;
    line-height: 18px !important;
}

/* Figma: "Baixar e-book" com a seta de download DEPOIS do texto, 16 px. */
.pmv2-bib-card .pmv2-material-btn { flex-direction: row-reverse; gap: 8px; }
.pmv2-bib-card .pmv2-material-btn__icone svg,
.pmv2-bib-card .pmv2-material-btn__icone img { width: 16px !important; height: 16px !important; }

/* ---------- Telas menores ---------- */
@media (max-width: 1280px) {
    .pmv2-bib-hero__in { padding-left: 32px; padding-right: 32px; grid-template-columns: minmax(0, 1fr) minmax(0, 560px); }
    .elementor-section.pmv2-bib-sec-lista > .elementor-container { padding: 0 32px; }
}
@media (max-width: 1024px) {
    .pmv2-bib-hero__in { grid-template-columns: 1fr; row-gap: 24px; padding: 64px 32px; }
    .pmv2-bib-hero .pmv2-bib-hero__titulo { font-size: 40px; }
    .elementor-section.pmv2-bib-sec-lista { padding: 64px 0 96px !important; }
}
@media (max-width: 767px) {
    .pmv2-bib-hero { border-radius: 0 0 24px 24px; }
    .pmv2-bib-hero__in { padding: 48px 16px; }
    .pmv2-bib-hero .pmv2-bib-hero__titulo { font-size: 32px; }
    .pmv2-bib-hero__texto { margin-bottom: 24px; }
    .pmv2-bib-busca { flex-direction: column; gap: 12px; }
    .pmv2-bib-busca__campo { flex-basis: auto; }
    .pmv2-bib-busca .pmv2-bib-busca__botao { flex-basis: 48px; width: 100%; }
    .elementor-section.pmv2-bib-sec-lista { padding: 48px 0 80px !important; }
    .elementor-section.pmv2-bib-sec-lista > .elementor-container { padding: 0 16px; }
    .elementor-widget-pmv2_biblioteca_filtros { margin-bottom: 32px !important; }
    .pmv2-bib-dd--cat .pmv2-bib-menu { left: auto; right: 0; }
}
