/*
Theme Name: Kadence Child — Academic Hub
Theme URI: https://robertocavallari.com.br
Description: Tema filho editorial para o portal acadêmico do Prof. Dr. Roberto Cavallari Filho, integrado ao plugin Beto Academic Hub.
Author: Prof. Dr. Roberto Cavallari Filho
Template: kadence
Version: 1.2.0
Text Domain: kadence-child
*/

:root {
    --bah-primary: #0f2942;
    --bah-accent: #1d4ed8;
    --bah-accent-soft: #eff6ff;
    --bah-text: #1e293b;
    --bah-muted: #64748b;
    --bah-border: #e2e8f0;
    --bah-bg-page: #f8fafc;
    --bah-radius: 14px;
}

/* Fundo editorial unificado nas páginas do portal */
body.home,
body.page,
body.post-type-archive,
body.tax-ano_producao,
body.single-post {
    background-color: var(--bah-bg-page);
}

/* =========================================================
   1. CABEÇALHO DO SITE: LOGO, SITE TITLE & TAGLINE
   ========================================================= */
.site-header .site-branding {
    display: flex;
    align-items: center;
    gap: 14px;
}

.site-header .custom-logo-link {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}

.site-header .custom-logo-link img,
.site-header .custom-logo {
    max-height: 46px;
    width: auto;
    display: block;
}

.site-header .site-title-wrap {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
}

.site-header .site-title,
.site-header .site-title a {
    font-size: 1.18rem;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: var(--bah-primary);
    text-decoration: none;
    margin: 0;
}

.site-header .site-title a:hover {
    color: var(--bah-accent);
}

.site-header .site-description {
    font-size: 0.8rem;
    font-weight: 500;
    line-height: 1.3;
    color: var(--bah-muted);
    margin: 0;
    letter-spacing: 0.01em;
}

/* Navegação Principal (9 itens alinhados sem aperto) */
.main-navigation .primary-menu-container > ul > li > a {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--bah-text);
    padding-left: 0.68em;
    padding-right: 0.68em;
    transition: color 0.16s ease;
}

.main-navigation .primary-menu-container > ul > li > a:hover,
.main-navigation .primary-menu-container > ul > li.current-menu-item > a,
.main-navigation .primary-menu-container > ul > li.current_page_item > a,
.main-navigation .primary-menu-container > ul > li.current-menu-ancestor > a {
    color: var(--bah-accent);
}

/* =========================================================
   2. FRONT PAGE DINÂMICA & DIRETÓRIO DO ACERVO POR SEÇÃO
   ========================================================= */
.bah-front-page-shell {
    padding: 24px 0 64px 0;
}

.bah-front-extra-content {
    max-width: 1240px;
    margin: 28px auto 0 auto;
    padding: 0 24px;
    box-sizing: border-box;
}

/* Lista vertical de 7 linhas do Acervo por Seção (sem cards redundantes) */
.bah-sections-dir-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.bah-section-dir-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    background: #ffffff;
    border: 1px solid var(--bah-border);
    border-left: 4px solid var(--bah-primary);
    border-radius: 12px;
    padding: 18px 24px;
    text-decoration: none !important;
    color: var(--bah-text);
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.03);
    transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.bah-section-dir-row:hover {
    transform: translateY(-2px);
    border-color: #cbd5e1;
    border-left-color: var(--bah-accent);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.07);
}

.bah-section-dir-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.bah-section-dir-eyebrow {
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--bah-accent);
}

.bah-section-dir-title-line {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.bah-section-dir-title {
    margin: 0 !important;
    font-size: 1.16rem !important;
    font-weight: 800 !important;
    color: var(--bah-primary) !important;
    line-height: 1.25 !important;
    transition: color 0.16s ease;
}

.bah-section-dir-row:hover .bah-section-dir-title {
    color: var(--bah-accent) !important;
}

.bah-section-dir-count {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    border-radius: 999px;
    background: #eff6ff;
    border: 1px solid #dbeafe;
    color: var(--bah-accent);
    font-size: 0.78rem;
    font-weight: 700;
}

.bah-section-dir-desc {
    margin: 0;
    font-size: 0.88rem;
    line-height: 1.45;
    color: var(--bah-muted);
}

.bah-section-dir-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 16px;
    border-radius: 9px;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    color: var(--bah-primary);
    font-size: 0.85rem;
    font-weight: 700;
    white-space: nowrap;
    flex-shrink: 0;
    transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}

.bah-section-dir-row:hover .bah-section-dir-cta {
    background: var(--bah-primary);
    border-color: var(--bah-primary);
    color: #ffffff;
}

/* =========================================================
   3. PÁGINAS GERAIS (SOBRE, CONTATOS, ETC.) — CARTÃO UNIFICADO
   ========================================================= */
body.page:not(.home) .entry-hero,
body.page:not(.home) article.entry > .entry-header,
body.page:not(.home) .page-header,
body.page:not(.home) .single-entry-header {
    display: none !important;
}

body.page:not(.home) .content-bg,
body.page:not(.home) .entry-content-wrap {
    background: transparent !important;
    box-shadow: none !important;
    padding: 0 !important;
}

.bah-page-shell {
    max-width: 960px;
    margin: 0 auto;
    padding: 24px 24px 56px 24px;
    box-sizing: border-box;
}

.bah-page-content-card {
    background: #ffffff;
    border: 1px solid var(--bah-border);
    border-top: 4px solid var(--bah-primary);
    border-radius: var(--bah-radius);
    padding: 28px 34px 34px 34px;
    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.05);
    color: var(--bah-text);
    font-size: 1.02rem;
    line-height: 1.72;
}

.bah-page-tags-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.bah-page-content-card .bah-section-eyebrow {
    display: inline-block;
    font-size: 0.76rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--bah-accent);
    background: var(--bah-accent-soft);
    padding: 4px 11px;
    border-radius: 999px;
    margin: 0;
}

.bah-page-tag-pill {
    display: inline-block;
    font-size: 0.76rem;
    font-weight: 700;
    color: #334155;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    padding: 3px 10px;
    border-radius: 999px;
}

.bah-page-content-card .bah-section-hero-title {
    margin: 0 0 10px 0 !important;
    font-size: clamp(1.65rem, 3vw, 2.2rem) !important;
    font-weight: 800 !important;
    line-height: 1.22 !important;
    color: #0f172a !important;
    letter-spacing: -0.01em;
}

.bah-page-content-card .bah-section-hero-desc {
    margin: 0 0 18px 0 !important;
    font-size: 1rem;
    line-height: 1.55;
    color: var(--bah-muted);
    max-width: 780px;
}

.bah-page-entry-body {
    padding-top: 20px;
    margin-top: 16px;
    border-top: 1px solid var(--bah-border);
}

.bah-page-entry-body h2,
.bah-page-entry-body h3 {
    color: var(--bah-primary);
    font-weight: 800;
    margin-top: 1.6em;
    margin-bottom: 0.6em;
}

.bah-page-entry-body > :first-child {
    margin-top: 0;
}

.bah-page-entry-body a {
    color: var(--bah-accent);
    font-weight: 600;
}

/* =========================================================
   4. POSICIONAMENTO UNIFICADO DO SASSY SOCIAL SHARE
      - Linha única, alinhada à esquerda
      - Abaixo das tags e acima do título da página / entrada
      - Com espaçamento (padding/margin) equilibrado entre tags, ícones e título
   ========================================================= */

/* 4A. Páginas gerais do WordPress (Sobre, Contatos, etc.) */
.bah-page-share-bar {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    flex-wrap: nowrap !important;
    width: 100%;
    padding: 14px 0 14px 0;
    margin: 0;
    overflow-x: auto;
}

/* Caso a página não tenha barra de ícones ativa, garante respiro entre tags e título */
.bah-page-tags-row + .bah-section-hero-title {
    margin-top: 16px !important;
}

.bah-page-share-bar .heateor_sss_sharing_container,
.bah-journal-header .bah-kicker-share .heateor_sss_sharing_container {
    margin: 0 !important;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    flex-wrap: nowrap !important;
}

.bah-page-share-bar .heateor_sss_sharing_title,
.bah-journal-header .bah-kicker-share .heateor_sss_sharing_title {
    display: none !important;
}

.bah-page-share-bar .heateor_sss_sharing_ul,
.bah-journal-header .bah-kicker-share .heateor_sss_sharing_ul {
    float: none !important;
    display: inline-flex !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: flex-start !important;
    margin: 0 !important;
    padding: 0 !important;
}

.bah-page-share-bar .heateor_sss_sharing_ul li,
.bah-journal-header .bah-kicker-share .heateor_sss_sharing_ul li {
    float: none !important;
    display: inline-flex !important;
    align-items: center !important;
    margin-bottom: 0 !important;
}

/* 4B. Entradas dos itens do Lattes (.bah-journal-kicker -> linha única abaixo das tags e acima do título) */
.bah-journal-header .bah-journal-kicker {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 8px !important;
    width: 100%;
    margin-bottom: 14px !important;
}

.bah-journal-header .bah-kicker-share {
    flex: 0 0 100% !important;
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    flex-wrap: nowrap !important;
    margin: 6px 0 2px 0 !important;
    padding: 6px 0 4px 0 !important;
    overflow-x: auto;
}

/* =========================================================
   5. RESPONSIVIDADE MOBILE & TABLET
   ========================================================= */
@media (max-width: 768px) {
    .site-header .site-title,
    .site-header .site-title a {
        font-size: 1.02rem;
    }
    .site-header .site-description {
        font-size: 0.74rem;
    }
    .bah-section-dir-row {
        flex-direction: column;
        align-items: flex-start;
        padding: 16px 18px;
        gap: 12px;
    }
    .bah-section-dir-cta {
        width: 100%;
        justify-content: center;
    }
    .bah-page-shell {
        padding: 18px 14px 44px 14px;
    }
    .bah-page-content-card {
        padding: 20px 18px 24px 18px;
    }
}
