/* Espaçamento entre Menu e Conteúdo em Categorias/Arquivos */
body.archive #masthead,
body.category #masthead,
body.tag #masthead,
body.search #masthead {
    padding-bottom: 15px !important;
}

@media (max-width: 768px) {

    body.archive #masthead,
    body.category #masthead,
    body.tag #masthead,
    body.search #masthead {
        padding-bottom: 10px !important;
    }
}

/* Custom spacing adjustments */

/* Custom spacing adjustments */
#secondary .widget p {
    margin-bottom: 0.5em !important;
}

/* Specific fix for Author Info Widget (Expediente) in Footer */
.site-footer .widget_deixav5_author_info_widget .bmm-author-thumb-wrap figure {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

/* Fix "achatou" (flattened) and Space above logo */
.site-footer .widget_deixav5_author_info_widget .widget-title {
    margin-bottom: 0 !important;
    padding-bottom: 5px !important;
}

.site-footer .widget_deixav5_author_info_widget .author-wrap {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

.site-footer .widget_deixav5_author_info_widget .bmm-author-thumb-wrap img {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
    display: block;
    /* Force Round Shape */
    width: 120px !important;
    height: 120px !important;
    min-width: 120px !important;
    min-height: 120px !important;
    max-width: 120px !important;
    max-height: 120px !important;
    object-fit: cover !important;
    border-radius: 50% !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

.site-footer .widget_deixav5_author_info_widget .author-tag {
    display: block;
    margin-top: 5px !important;
    /* Minimal spacing */
    position: relative;
    top: -5px;
    /* Pull it up specifically if needed */
}

/* General reduced spacing for this widget in footer */
.site-footer .widget_deixav5_author_info_widget .author-content-wrap {
    margin-top: 5px !important;
}

.site-footer .widget_deixav5_author_info_widget .author-content-wrap h2,
.site-footer .widget_deixav5_author_info_widget .author-content-wrap .author-desc {
    margin-top: 5px !important;
    margin-bottom: 0 !important;
}

#secondary .widget h3,
#secondary .widget h4,
#secondary .widget h5,
#secondary .widget .widget-title {
    margin-bottom: 0 !important;
    margin-top: 0.5em !important;
    padding-bottom: var(--deixav5-gap-xs) !important;
}

#secondary .widget img {
    margin-bottom: 0.5em !important;
}

#secondary .widget .textwidget {
    line-height: 1.2;
    margin-top: 0 !important;
    padding-top: 0 !important;
}

#secondary .widget_text p {
    margin-bottom: var(--deixav5-gap-xs) !important;
}

/* Reduce spacing between widgets */
.widget {
    margin-bottom: 1em !important;
}

/* Specific adjustments for Expediente/Logo in Footer */
.site-footer .widget_text .textwidget img,
.site-footer .widget .textwidget img {
    margin-bottom: 0 !important;
    display: block;
    margin-left: auto;
    margin-right: auto;
    padding-bottom: 0 !important;
}

/* If the logo is wrapped in a paragraph */
.site-footer .widget_text .textwidget p,
.site-footer .widget .textwidget p {
    margin-bottom: 5px !important;
    margin-top: 0 !important;
}

/* Fix header spacing */

.site-footer .widget_text .textwidget p:has(img),
.site-footer .widget .textwidget p:has(img) {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

/* Fallback for browsers without :has support or effectively targeting the first p */
.site-footer .widget_text .textwidget p:first-child,
.site-footer .widget .textwidget p:first-child {
    margin-bottom: 0 !important;
}

/* Ensure headings or bold text have minimal spacing */
.site-footer .widget .textwidget h1,
.site-footer .widget .textwidget h2,
.site-footer .widget .textwidget h3,
.site-footer .widget .textwidget h4,
.site-footer .widget .textwidget h5,
.site-footer .widget .textwidget strong,
.site-footer .widget .textwidget b {
    margin-top: 5px !important;
    display: block;
    /* ensure block spacing applies */
}

/* Remove top spacing from the first element in the widget content */
#secondary .widget .textwidget> :first-child,
.site-footer .widget .textwidget> :first-child {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* LCP Optimization: Show first slide before JS loads */
.main-banner-slider:not(.slick-initialized) {
    visibility: visible !important;
    opacity: 1 !important;
    display: block !important;
    min-height: 250px;
    /* Prevent layout shift */
}

.main-banner-slider:not(.slick-initialized) .slide-item {
    display: none !important;
}

.main-banner-slider:not(.slick-initialized) .slide-item:first-child {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* ===============================================
   WRAPPER – CENTRALIZA E CONTROLA A MARGEM
   =============================================== */

/* MOBILE + TABLET = margin-top: 0 */
.revive-responsive-970x250 {
    width: 100%;
    max-width: 100%;
    margin-top: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    overflow: visible;
    float: none;
    clear: both;
}

/* DESKTOP = margin-top: 15px */
@media (min-width: 1024px) {
    .revive-responsive-970x250 {
        margin-top: var(--deixav5-gap-md) !important;
    }
}

/* ===============================================
   BANNER 970 × 250 – TAMANHO ORIGINAL
   =============================================== */

.ad-scale-box {
    width: 970px;
    height: 250px;
    transform-origin: top center;
    margin: 0 auto;
    display: block;
}

/* INS DO REVIVE */
.ad-scale-box ins {
    display: block !important;
    width: 970px !important;
    height: 250px !important;
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
}

/* IFRAME DO REVIVE */
.ad-scale-box iframe {
    display: block !important;
    width: 970px !important;
    height: 250px !important;
    border: none !important;
    background: transparent !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* ===============================================
   RESPONSIVIDADE – REDUÇÃO PROPORCIONAL
   =============================================== */

/* Tablets grandes */
@media (max-width: 768px) {
    #masthead {
        margin-bottom: 0 !important;
    }

    /* "Existe 6,5" - Sub-pixel precision request */
    #highlight-text-section,
    .after-header-banner-layout-banner-two,
    #main-banner-section,
    .deixav5-section {
        margin-top: 6.5px !important;
        padding-top: 0 !important;
    }

    /* "COLOQUE 3PX" - 3px side padding (User requested extreme reduction) */
    .home .deixav5-section:not(#main-banner-section) .deixav5-container {
        padding-left: 3px !important;
        padding-right: 3px !important;
        width: auto !important;
    }

    .home .deixav5-section:not(#main-banner-section) .row {
        padding-left: 0 !important;
        padding-right: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        width: auto !important;
    }
}

@media (max-width: 1160px) {
    .ad-scale-box {
        transform: scale(0.90);
        height: calc(250px * 0.90);
    }
}

/* Tablets padrão */
@media (max-width: 1024px) {
    .ad-scale-box {
        transform: scale(0.80);
        height: calc(250px * 0.80);
    }
}

/* Tablets pequenos */
@media (max-width: 820px) {
    .ad-scale-box {
        transform: scale(0.70);
        height: calc(250px * 0.70);
    }
}

/* Celulares grandes */
@media (max-width: 600px) {
    .ad-scale-box {
        transform: scale(0.55);
        height: calc(250px * 0.55);
    }
}

/* Celulares médios */
@media (max-width: 480px) {
    .ad-scale-box {
        transform: scale(0.45);
        height: calc(250px * 0.45);
    }
}

/* Celulares pequenos */
@media (max-width: 380px) {
    .ad-scale-box {
        transform: scale(0.38);
        height: calc(250px * 0.38);
    }
}

/* ===============================================
   POST META SPACING (DIMINUIR GAB)
   =============================================== */
.post-meta span,
.entry-meta span {
    padding-right: 5px !important;
    /* Reduced from 10px */
}

.post-meta span:last-child,
.entry-meta span:last-child {
    padding-right: 0 !important;
}

span.author_name:before,
a.author_name:before,
span.post-date:before,
span.post-comment:before,
.read-time:before {
    margin-right: 4px !important;
    /* Reduced from 7px */
}

/* Fix header spacing */

/* Move main logo down */
/* Center main logo horizontally and vertically (Desktop & Mobile) */
.site-header.layout--default .main-header .site-branding-section .row {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    padding-top: 15px !important;
    padding-bottom: 5px !important;
}

.site-header.layout--default .main-header .site-branding-section .site-branding {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    align-self: center !important;
    text-align: center !important;
    line-height: 0 !important;
}

.site-header.layout--default .main-header .site-branding-section .site-branding a,
.site-header.layout--default .main-header .site-branding-section .site-branding img,
.custom-logo-link,
.custom-logo {
    display: block !important;
    margin: 0 auto !important;
    padding: 0 !important;
    line-height: 1 !important;
    border: none !important;
}

/* Remove box-shadow/border from header */
header .main-header,
.site-header {
    box-shadow: none !important;
    border-bottom: none !important;
}