/* ===================================
   BLOG STYLES — Bepay Empresas
   ===================================
   ATENÇÃO: este arquivo deve estar em
   /assets/css/blog.css dentro do tema
   =================================== */

:root {
    --blog-black:     #00020b;
    --blog-gray:      #6c757d;
    --blog-gray-lt:   #f3f4f6;
    --blog-border:    #e5e7eb;
    --blog-radius:    2px;
    /* Altura do header fixo */
    --header-offset:  80px;
    --header-offset-m: 60px;
}

/* ── Tags / badges ── */
.blog-tag {
    display: inline-block;
    font-family: Montserrat, sans-serif;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #fff;
    background: rgba(255,255,255,0.18);
    border: 1px solid rgba(255,255,255,0.35);
    padding: 4px 10px;
    border-radius: 2px;
}
.blog-tag a { color: inherit; text-decoration: none; }

.blog-tag--dark {
    color: var(--blog-black);
    background: var(--blog-gray-lt);
    border-color: var(--blog-border);
}
.blog-tag--dark a { color: inherit; text-decoration: none; }

/* ────────────────────────────────────
   HERO DO BLOG (post em destaque)
   ──────────────────────────────────── */
.blog-hero {
    /* Empurra o conteúdo para baixo do header fixo */
    padding-top: calc(var(--header-offset) + 48px);
    padding-bottom: 0;
}

.blog-hero-inner {
    position: relative;
    min-height: 520px;
    border-radius: 4px;
    overflow: hidden;
    background: var(--blog-black) no-repeat top center / cover;
    display: flex;
    align-items: flex-end;
}

.blog-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(0,0,0,0.84) 0%,
        rgba(0,0,0,0.40) 55%,
        rgba(0,0,0,0.10) 100%
    );
}

.blog-hero-content {
    position: relative;
    z-index: 2;
    padding: 52px 52px;
    max-width: 700px;
}

.blog-hero-meta {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
}

.blog-date-hero {
    font-family: Montserrat, sans-serif;
    font-size: 12px;
    color: rgba(255,255,255,0.55);
}

.blog-hero-title {
    font-family: 'BauhausBuglerBoldW00', sans-serif;
    font-size: clamp(1.8rem, 3.5vw, 3rem);
    font-weight: 700;
    color: #fff;
    line-height: 1.12;
    letter-spacing: -0.02em;
    margin-bottom: 16px;
}
.blog-hero-title a { color: inherit; text-decoration: none; transition: opacity 0.2s ease; }
.blog-hero-title a:hover { opacity: 0.78; }

.blog-hero-excerpt {
    font-family: Montserrat, sans-serif;
    font-size: 15px;
    line-height: 1.7;
    color: rgba(255,255,255,0.70);
    margin-bottom: 28px;
    max-width: 520px;
}

.blog-hero-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: Montserrat, sans-serif;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: #fff;
    text-decoration: none;
    transition: gap 0.25s ease;
}
.blog-hero-link:hover { gap: 16px; color: #fff; }

/* ── Grid section ── */
.blog-grid-section {
    padding: 72px 0 100px;
}

/* ── Blog card ── */
.bcard {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #fff;
    border: 1px solid var(--blog-border);
    border-radius: 22px;
    overflow: hidden;

}
.bcard:hover {
    box-shadow: 0 12px 32px rgba(0,0,0,0.09);
    transform: translateY(-5px);
}

.bcard-thumb {
    display: block;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    flex-shrink: 0;
}
.bcard-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.45s ease;
}
.bcard:hover .bcard-thumb img { transform: scale(1.05); }

.bcard-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 28px 28px 24px;
    gap: 12px;
}

.bcard-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.bcard-date {
    font-family: Montserrat, sans-serif;
    font-size: 11px;
    color: #adb5bd;
}

.bcard-title {
    font-family: 'BauhausBuglerBoldW00', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.01em;
    margin: 0;
}
.bcard-title a { color: var(--blog-black); text-decoration: none; transition: color 0.2s ease; }
.bcard-title a:hover { color: #444; }

.bcard-excerpt {
    font-family: Montserrat, sans-serif;
    font-size: 13.5px;
    line-height: 1.7;
    color: var(--blog-gray);
    margin: 0;
    flex: 1;
}

.bcard-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: Montserrat, sans-serif;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--blog-black);
    text-decoration: none;
    margin-top: 4px;
    transition: gap 0.25s ease;
}
.bcard-link:hover { gap: 14px; color: var(--blog-black); }

/* ── Paginação ── */
.blog-pagination {
    display: flex;
    justify-content: center;
    padding-top: 64px;
}
.blog-pagination .nav-links {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
}
.blog-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 16px;
    font-family: Montserrat, sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: var(--blog-black);
    text-decoration: none;
    border: 1px solid var(--blog-border);
    border-radius: var(--blog-radius);
    transition: all 0.2s ease;
}
.blog-pagination .page-numbers:hover,
.blog-pagination .page-numbers.current {
    background: #000;
    color: #fff;
    border-color: #000;
}

/* ── Empty ── */
.blog-empty {
    font-family: Montserrat, sans-serif;
    font-size: 16px;
    color: var(--blog-gray);
    padding: 48px 0 24px;
    line-height: 1.7;
}
.no-results-wrap { padding: 48px 0; }
.no-results-wrap .blog-empty { padding-top: 0; }

/* ────────────────────────────────────
   ARCHIVE HEADER (categoria / busca)
   ──────────────────────────────────── */
.blog-archive-header-section {
    /* Empurra o conteúdo para baixo do header fixo */
    padding-top: calc(var(--header-offset) + 56px);
    padding-bottom: 56px;
    border-bottom: 1px solid var(--blog-border);
}

.archive-header-inner { max-width: 680px; }

.archive-eyebrow {
    display: inline-block;
    font-family: Montserrat, sans-serif;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #adb5bd;
    margin-bottom: 14px;
}

.archive-title {
    font-family: 'BauhausBuglerBoldW00', sans-serif;
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    color: var(--blog-black);
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin-bottom: 16px;
}

.archive-desc {
    font-family: Montserrat, sans-serif;
    font-size: 15px;
    color: var(--blog-gray);
    line-height: 1.65;
    margin: 0;
}

/* ── Barra de busca ── */
.search-bar-wrap {
    margin-bottom: 56px;
    max-width: 560px;
}
.search-bar-form {
    display: flex;
    align-items: center;
    border: 1.5px solid var(--blog-black);
    border-radius: var(--blog-radius);
    overflow: hidden;
    transition: box-shadow 0.2s ease;
}
.search-bar-form:focus-within { box-shadow: 0 0 0 3px rgba(0,0,0,0.08); }
.search-bar-input {
    flex: 1;
    border: none;
    outline: none;
    padding: 15px 22px;
    font-family: Montserrat, sans-serif;
    font-size: 14px;
    color: var(--blog-black);
    background: #fff;
}
.search-bar-input::placeholder { color: #adb5bd; }
.search-bar-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    background: #000;
    color: #fff;
    border: none;
    cursor: pointer;
    flex-shrink: 0;
    transition: opacity 0.2s ease;
}
.search-bar-btn:hover { opacity: 0.72; }

/* ────────────────────────────────────
   SINGLE POST — HERO
   ──────────────────────────────────── */
.post-hero {
    /* Empurra o conteúdo para baixo do header fixo */
    padding-top: calc(var(--header-offset) + 56px);
    padding-bottom: 56px;
    border-bottom: 1px solid var(--blog-border);
}

.post-hero-meta {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 28px;
}
.post-hero-date,
.post-hero-author {
    font-family: Montserrat, sans-serif;
    font-size: 12px;
    color: #adb5bd;
}
.post-hero-title {
    font-family: 'BauhausBuglerBoldW00', sans-serif;
    font-size: clamp(2rem, 4.5vw, 3.4rem);
    font-weight: 700;
    color: var(--blog-black);
    line-height: 1.1;
    letter-spacing: -0.025em;
    margin-bottom: 24px;
}
.post-hero-excerpt {
    font-family: Montserrat, sans-serif;
    font-size: 17px;
    line-height: 1.75;
    color: var(--blog-gray);
    margin: 0;
    max-width: 640px;
}

/* ── Single — Thumbnail ── */
.post-thumb-section { padding: 48px 0 0; }
.post-thumb-figure { margin: 0; border-radius: 4px; overflow: hidden; }
.post-thumb-figure img { width: 100%; height: auto; display: block; }

/* ── Single — Corpo + sidebar ── */
.post-body-section { padding: 64px 0 100px; }

.post-content {
    font-family: Montserrat, sans-serif;
    font-size: 16px;
    line-height: 1.9;
    color: #333;
    margin-bottom: 48px;
}
.post-content h2 {
    font-family: 'BauhausBuglerBoldW00', sans-serif;
    font-size: clamp(1.4rem, 2.5vw, 2rem);
    color: var(--blog-black);
    margin-top: 52px;
    margin-bottom: 20px;
    letter-spacing: -0.015em;
    line-height: 1.2;
}
.post-content h3 {
    font-family: 'BauhausBuglerBoldW00', sans-serif;
    font-size: clamp(1.1rem, 2vw, 1.5rem);
    color: var(--blog-black);
    margin-top: 40px;
    margin-bottom: 16px;
    line-height: 1.2;
}
.post-content h4 {
    font-family: Montserrat, sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: var(--blog-black);
    margin-top: 32px;
    margin-bottom: 12px;
}
.post-content p { margin-bottom: 24px; }
.post-content a {
    color: var(--blog-black);
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: opacity 0.2s ease;
}
.post-content a:hover { opacity: 0.55; }
.post-content blockquote {
    border-left: 3px solid var(--blog-black);
    padding: 4px 0 4px 28px;
    margin: 36px 0;
    font-style: italic;
    color: var(--blog-gray);
    font-size: 17px;
    line-height: 1.75;
}
.post-content img { max-width: 100%; height: auto; border-radius: var(--blog-radius); margin: 8px 0; }
.post-content ul, .post-content ol { padding-left: 22px; margin-bottom: 24px; }
.post-content li { margin-bottom: 8px; }
.post-content strong { color: var(--blog-black); }

/* Tags do post */
.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 32px 0;
    border-top: 1px solid var(--blog-border);
    border-bottom: 1px solid var(--blog-border);
    margin-bottom: 48px;
}
.post-tag {
    font-family: Montserrat, sans-serif;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--blog-black);
    text-decoration: none;
    border: 1px solid var(--blog-border);
    padding: 6px 14px;
    border-radius: var(--blog-radius);
    transition: all 0.2s ease;
}
.post-tag:hover { background: var(--blog-black); color: #fff; border-color: var(--blog-black); }

/* Navegação prev/next */
.post-nav { display: flex; gap: 16px; flex-wrap: wrap; }
.post-nav-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
    min-width: 200px;
    padding: 24px;
    border: 1px solid var(--blog-border);
    border-radius: var(--blog-radius);
    text-decoration: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.post-nav-item:hover { border-color: var(--blog-black); box-shadow: 0 4px 16px rgba(0,0,0,0.07); }
.post-nav-next { text-align: right; }
.post-nav-label {
    font-family: Montserrat, sans-serif;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #adb5bd;
}
.post-nav-ttl {
    font-family: 'BauhausBuglerBoldW00', sans-serif;
    font-size: 15px;
    font-weight: 700;
    color: var(--blog-black);
    line-height: 1.3;
}

/* ────────────────────────────────────
   SIDEBAR
   ──────────────────────────────────── */
.blog-sidebar {
    display: flex;
    flex-direction: column;
    gap: 40px;
    position: sticky;
    top: calc(var(--header-offset) + 24px);
}

.sidebar-widget {
    border-top: 2px solid var(--blog-black);
    padding-top: 24px;
}
.sidebar-widget-title {
    font-family: 'BauhausBuglerBoldW00', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: var(--blog-black);
    margin-bottom: 20px;
    letter-spacing: -0.01em;
}

.sidebar-search {
    display: flex;
    align-items: center;
    border: 1.5px solid var(--blog-border);
    border-radius: var(--blog-radius);
    overflow: hidden;
    transition: border-color 0.2s ease;
}
.sidebar-search:focus-within { border-color: var(--blog-black); }
.sidebar-search-input {
    flex: 1;
    border: none;
    outline: none;
    padding: 13px 16px;
    font-family: Montserrat, sans-serif;
    font-size: 13px;
    color: var(--blog-black);
    background: #fff;
}
.sidebar-search-input::placeholder { color: #adb5bd; }
.sidebar-search-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    background: #000;
    color: #fff;
    border: none;
    cursor: pointer;
    flex-shrink: 0;
    transition: opacity 0.2s ease;
}
.sidebar-search-btn:hover { opacity: 0.72; }

.sidebar-cats { list-style: none; padding: 0; margin: 0; }
.sidebar-cats li { border-bottom: 1px solid var(--blog-border); }
.sidebar-cats li:last-child { border-bottom: none; }
.sidebar-cats a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 13px 0;
    font-family: Montserrat, sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: var(--blog-black);
    text-decoration: none;
    transition: color 0.2s ease;
}
.sidebar-cats a:hover { color: #666; }
.cat-count { font-size: 11px; color: #adb5bd; font-weight: 400; }

.sidebar-posts { display: flex; flex-direction: column; gap: 20px; }
.sidebar-post-item {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    text-decoration: none;
    transition: opacity 0.2s ease;
}
.sidebar-post-item:hover { opacity: 0.68; }
.sidebar-post-thumb {
    width: 72px;
    height: 56px;
    flex-shrink: 0;
    border-radius: var(--blog-radius);
    overflow: hidden;
    margin: 0;
}
.sidebar-post-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sidebar-post-info { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.sidebar-post-date { font-family: Montserrat, sans-serif; font-size: 10px; color: #adb5bd; font-weight: 500; letter-spacing: 0.04em; }
.sidebar-post-title { font-family: Montserrat, sans-serif; font-size: 13px; font-weight: 600; color: var(--blog-black); line-height: 1.4; margin: 0; }

/* ────────────────────────────────────
   404 — Standalone
   ──────────────────────────────────── */
.page-404-standalone { margin: 0; padding: 0; background: #fff; overflow-x: hidden; }
#page404 { display: flex; flex-direction: column; min-height: 100vh; }
.err-header { position: absolute; top: 0; left: 0; right: 0; z-index: 10; padding: 32px 48px; }
.err-logo img { height: 36px; width: auto; display: block; }
.err-logo span { font-family: 'BauhausBuglerBoldW00', sans-serif; font-size: 22px; font-weight: 700; color: var(--blog-black); }
.err-main { flex: 1; position: relative; display: flex; align-items: center; justify-content: center; padding: 120px 48px 80px; overflow: hidden; }
.err-bg-code { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); font-family: 'BauhausBuglerBoldW00', sans-serif; font-size: clamp(180px, 28vw, 380px); font-weight: 700; color: #f3f4f6; line-height: 1; white-space: nowrap; pointer-events: none; user-select: none; letter-spacing: -0.04em; }
.err-content { position: relative; z-index: 2; text-align: center; max-width: 560px; }
.err-label { font-family: Montserrat, sans-serif; font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: #adb5bd; margin-bottom: 20px; }
.err-title { font-family: 'BauhausBuglerBoldW00', sans-serif; font-size: clamp(2.2rem, 5vw, 4rem); font-weight: 700; color: var(--blog-black); line-height: 1.1; margin-bottom: 24px; letter-spacing: -0.02em; }
.err-desc { font-family: Montserrat, sans-serif; font-size: 16px; line-height: 1.75; color: var(--blog-gray); margin-bottom: 48px; }
.err-actions { display: flex; flex-direction: column; align-items: center; gap: 20px; }
.err-btn-primary { display: inline-flex; align-items: center; gap: 12px; background: #000; color: #fff; font-family: Montserrat, sans-serif; font-size: 14px; font-weight: 600; text-decoration: none; padding: 16px 32px; border-radius: var(--blog-radius); transition: opacity 0.25s ease, gap 0.25s ease; }
.err-btn-primary:hover { opacity: 0.75; color: #fff; gap: 18px; }
.err-search { display: flex; align-items: center; border: 1px solid #d1d5db; border-radius: var(--blog-radius); overflow: hidden; width: 100%; max-width: 380px; transition: border-color 0.2s ease; }
.err-search:focus-within { border-color: #000; }
.err-search-input { flex: 1; border: none; outline: none; padding: 14px 20px; font-family: Montserrat, sans-serif; font-size: 14px; color: var(--blog-black); background: #fff; }
.err-search-input::placeholder { color: #adb5bd; }
.err-search-btn { display: flex; align-items: center; justify-content: center; width: 50px; height: 50px; background: #000; color: #fff; border: none; cursor: pointer; flex-shrink: 0; transition: opacity 0.2s ease; }
.err-search-btn:hover { opacity: 0.75; }

/* ────────────────────────────────────
   RESPONSIVO
   ──────────────────────────────────── */
@media (max-width: 991px) {
    .blog-sidebar {
        position: static;
        margin-top: 56px;
        padding-top: 56px;
        border-top: 1px solid var(--blog-border);
    }
}

@media (max-width: 767px) {
    .blog-hero {
        padding-top: calc(var(--header-offset-m) + 32px);
    }
    .blog-hero-inner { min-height: 400px; }
    .blog-hero-content { padding: 32px 24px; }
    .blog-hero-title { font-size: 1.7rem; }

    .blog-archive-header-section {
        padding-top: calc(var(--header-offset-m) + 40px);
        padding-bottom: 36px;
    }

    .post-hero {
        padding-top: calc(var(--header-offset-m) + 40px);
        padding-bottom: 36px;
    }
    .post-hero-title { font-size: 1.9rem; }
    .post-hero-excerpt { font-size: 15px; }

    .blog-grid-section { padding-top: 48px; padding-bottom: 72px; }
    .post-body-section { padding-top: 48px; padding-bottom: 72px; }
    .bcard-body { padding: 22px 20px 18px; }
    .post-nav-item { min-width: 100%; }

    .err-header { padding: 24px; }
    .err-main { padding: 100px 24px 60px; }
    .err-desc br, .err-title br { display: none; }
    .err-btn-primary, .err-search { width: 100%; justify-content: center; }
}