/*--------------------------------------------------------------
 Portal Casa Nova - identidade editorial moderna
 Carregado depois de style-2.2.min.css para sobrescrever apenas a
 apresentacao. Nao altera rotas, dados, administracao ou conteudo.
--------------------------------------------------------------*/
:root {
    --cn-blue: #0b4fa2;
    --cn-blue-dark: #073a78;
    --cn-accent: #2d65fe;
    --cn-ink: #172033;
    --cn-muted: #5d6b7a;
    --cn-line: #e8edf3;
    --cn-radius: 14px;
}

/* Acessibilidade */
.skip-link {
    position: absolute;
    left: 12px;
    top: -60px;
    z-index: 10002;
    padding: 10px 14px;
    color: #fff;
    background: var(--cn-blue-dark);
    border-radius: 8px;
    transition: top .2s ease;
}

.skip-link:focus,
.skip-link:focus-visible {
    top: 12px;
}

/* Cabecalho azul: hamburger a esquerda, marca central e busca a direita. */
#nav-top {
    display: none !important;
}

#header {
    background-color: var(--cn-blue);
    margin-bottom: 24px;
    box-shadow: 0 2px 14px rgba(7, 58, 120, .18);
}

.nav-main {
    min-height: 72px;
    background-color: var(--cn-blue);
}

.nav-category-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    margin-right: 6px;
    border-radius: 50%;
    vertical-align: middle;
    background-color: var(--cat-color, var(--cn-accent));
}

.nav-main .container-xl.editorial-header {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    min-height: 72px;
    position: relative;
}

.header-menu-toggle {
    justify-self: start;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0 !important;
    margin: 0 !important;
    color: #fff !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 10px !important;
    box-shadow: none !important;
    transition: background-color .2s ease;
}

.header-menu-toggle:hover,
.header-menu-toggle:focus-visible {
    background: rgba(255, 255, 255, .14) !important;
    color: #fff !important;
}

.nav-main .navbar-brand.editorial-header-logo {
    justify-self: center;
    margin: 0 !important;
    padding: 6px 12px !important;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .12);
    line-height: 1;
}

.nav-main .editorial-header-logo .logo {
    display: block;
    width: auto;
    height: 38px;
    max-width: 180px;
    object-fit: contain;
}

.nav-main .navbar-collapse {
    display: flex !important;
    flex-grow: 0;
    justify-self: end;
}

.nav-main .navbar-nav.navbar-left {
    display: none !important;
}

.nav-main .navbar-nav.navbar-right {
    display: flex;
    align-items: center;
    margin: 0;
}

.nav-main .search-icon {
    color: #fff !important;
    padding: 10px !important;
    border-radius: 10px;
    transition: background-color .2s ease;
}

.nav-main .search-icon:hover,
.nav-main .search-icon:focus-visible {
    background: rgba(255, 255, 255, .14) !important;
}

.nav-main .search-form {
    position: absolute;
    top: 64px;
    right: 0;
    z-index: 10001;
    display: none;
    width: min(420px, calc(100vw - 32px));
    padding: 12px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 12px 34px rgba(15, 35, 60, .2);
}

.nav-main .search-form.open {
    display: block;
}

.nav-main .search-form .form-control {
    height: 44px;
    border-radius: 8px 0 0 8px;
}

.nav-main .search-form .btn {
    height: 44px;
    border-radius: 0 8px 8px 0;
}

/* Menu lateral expansivel em todas as larguras. */
.header-mobile-container {
    height: 64px;
}

.header-mobile {
    padding: 8px 0;
    background-color: var(--cn-blue);
    box-shadow: none;
}

.header-mobile .menu-button {
    color: #fff !important;
}

.header-mobile .menu-button svg {
    color: #fff !important;
    stroke: #fff !important;
}

.mobile-logo img {
    display: block;
    width: auto;
    height: 36px;
    max-width: 150px;
    padding: 5px 9px;
    background: #fff;
    border-radius: 8px;
}

.mobile-search-form {
    background: #f6f8fb;
}

.nav-mobile {
    top: 64px;
    max-width: 90vw;
    background: #fff;
    box-shadow: 8px 0 30px rgba(15, 35, 60, .22);
    z-index: 10000;
}

.nav-mobile-open {
    width: 320px;
}

.nav-mobile .nav-mobile-inner {
    width: 320px;
    bottom: 0;
    padding: 14px 18px 50px;
    overflow-y: auto;
}

.nav-mobile-brand {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 14px;
    margin-bottom: 10px;
    border-bottom: 1px solid var(--cn-line);
}

.nav-mobile-brand img {
    width: auto;
    height: 38px;
    max-width: 150px;
}

.nav-mobile-close {
    width: 36px;
    height: 36px;
    padding: 0;
    font-size: 26px;
    line-height: 1;
    color: var(--cn-muted);
    background: transparent;
    border: 0;
    border-radius: 8px;
}

.nav-mobile-close:hover,
.nav-mobile-close:focus-visible {
    color: var(--cn-blue);
    background: #f1f5fa;
}

.nav-mobile .nav-item .nav-link {
    font-weight: 600;
    border-bottom: 1px solid #f1f4f8;
}

.overlay-bg {
    z-index: 9999;
}

@media (min-width: 992px) {
    .nav-mobile {
        top: 72px;
    }
}

/* Manchete principal (56%) + duas secundarias (44%) com altura compartilhada. */
.section-featured {
    height: auto;
    overflow: visible;
    margin-bottom: 34px;
}

.featured-grid {
    display: grid;
    grid-template-columns: minmax(0, 56fr) minmax(0, 44fr);
    grid-template-rows: repeat(2, minmax(0, 1fr));
    gap: 8px;
    height: 420px;
}

.featured-main,
.featured-side {
    min-width: 0;
    min-height: 0;
}

.featured-main {
    grid-column: 1;
    grid-row: 1 / 3;
    height: 100%;
}

.featured-side {
    grid-column: 2;
    grid-row: 1 / 3;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: repeat(2, minmax(0, 1fr));
    gap: 8px;
    height: 100%;
}

.main-slider-container,
.main-slider,
.main-slider .slick-list,
.main-slider .slick-track {
    height: 100% !important;
}

.main-slider-container {
    border-radius: 12px;
    overflow: hidden !important;
}

.main-slider .main-slider-item {
    height: 100% !important;
    min-height: 0;
    background: #e9edf3;
}

.main-slider .main-slider-item .img-link {
    display: block;
    width: 100%;
    height: 100%;
}

.main-slider .main-slider-item img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.main-slider .caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    max-height: 100%;
    overflow: hidden;
    padding: 24px 26px;
    color: #fff;
    background: linear-gradient(to top, rgba(4, 15, 30, .96) 0%, rgba(4, 15, 30, .72) 40%, rgba(4, 15, 30, 0) 100%);
    pointer-events: none;
}

.main-slider .caption a {
    pointer-events: auto;
}

.main-slider .caption .badge-category,
.featured-secondary .caption .badge-category {
    background-color: var(--cat-bg, var(--cn-accent));
    color: var(--cat-text, #fff);
    border-radius: 5px;
    font-weight: 600;
    letter-spacing: .02em;
}

.main-slider .caption .title {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
    margin: 10px 0 8px;
    font-size: clamp(24px, 2.4vw, 34px);
    line-height: 1.16;
    font-weight: 700;
}

.main-slider .caption .title a,
.featured-secondary .caption .title a {
    color: #fff !important;
}

.main-slider .caption .summary {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    margin: 0 0 8px;
    color: #dfe8f3;
    font-size: 15px;
    line-height: 1.45;
}

.main-slider .caption .post-meta span,
.main-slider .caption .post-meta a,
.featured-secondary .caption .post-meta span,
.featured-secondary .caption .post-meta a {
    color: #d3dde9 !important;
}

.main-slider-nav {
    z-index: 4;
}

.featured-secondary {
    position: relative;
    height: 100%;
    min-height: 0;
    border-radius: 12px;
    overflow: hidden;
    background: #e9edf3;
}

.featured-secondary:only-child {
    grid-row: 1 / 3;
}

.featured-secondary .img-link {
    display: block;
    width: 100%;
    height: 100%;
}

.featured-secondary img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.featured-secondary::after {
    content: "";
    position: absolute;
    inset: 35% 0 0;
    background: linear-gradient(to top, rgba(4, 15, 30, .94), rgba(4, 15, 30, .58) 48%, rgba(4, 15, 30, 0));
    pointer-events: none;
}

.featured-secondary .caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    max-height: 100%;
    overflow: hidden;
    padding: 16px 18px;
    pointer-events: none;
}

.featured-secondary .caption a {
    pointer-events: auto;
}

.featured-secondary .caption .title {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    margin: 8px 0 6px;
    font-size: 18px;
    line-height: 1.28;
    font-weight: 700;
}

.featured-secondary .caption .summary {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    margin: 0 0 6px;
    color: #dce5f0;
    font-size: 13px;
    line-height: 1.4;
}

/* Editorias reaproveitadas de tags/materias ja publicadas. */
.section-editorial {
    margin-bottom: 34px;
}

.section-page .page-title,
.section-related-posts .section-title .title {
    color: var(--cat-highlight, var(--cat-color, var(--cn-ink)));
}

.editorial-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    padding-left: 12px;
    margin-bottom: 16px;
    border-left: 5px solid var(--cat-color, var(--cn-accent));
}

.editorial-head .title {
    margin: 0;
    color: var(--cat-highlight, var(--cat-color, var(--cn-ink)));
    font-size: 22px;
    line-height: 1.2;
    font-weight: 700;
}

.editorial-head .view-all {
    flex: none;
    color: var(--cat-color, var(--cn-accent));
    font-size: 13px;
    font-weight: 700;
}

.editorial-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.editorial-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: #fff;
    border: 1px solid var(--cn-line);
    border-radius: 12px;
    overflow: hidden;
    transition: transform .2s ease, box-shadow .2s ease;
}

.editorial-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 26px rgba(15, 35, 60, .12);
}

.editorial-card .image {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #eef2f7;
}

.editorial-card .image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.editorial-card .body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 14px;
}

.badge-editorial {
    display: inline-block;
    align-self: flex-start;
    padding: 5px 9px;
    color: var(--cat-text, #fff);
    background-color: var(--cat-bg, var(--cn-accent));
    border-radius: 5px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: .03em;
}

.editorial-card .title {
    margin: 10px 0 7px;
    font-size: 17px;
    line-height: 1.34;
    font-weight: 700;
}

.editorial-card .title a {
    color: var(--cat-highlight, var(--cat-color, var(--cn-ink)));
}

.editorial-card:first-child .title {
    font-size: 19px;
}

.editorial-card .summary {
    margin: 0 0 10px;
    color: var(--cn-muted);
    font-size: 13px;
    line-height: 1.45;
}

.editorial-date {
    margin-top: auto;
    color: #7b8794;
    font-size: 12px;
}

/* Videos e reportagens com apresentacao diferenciada. */
.section-videos .section-title {
    padding-left: 12px;
    border-left: 5px solid var(--cn-accent);
}

.section-videos .video-large .image,
.section-videos .video-small .image {
    border-radius: 12px;
    overflow: hidden;
    background: #e9edf3;
}

.section-videos .video-large .caption,
.section-videos .video-small .caption {
    padding: 11px 3px 0;
}

.section-videos .badge-category {
    background-color: var(--cat-bg, var(--cn-accent));
    color: var(--cat-text, #fff);
    border-radius: 5px;
}

.section-videos .video-large .title a,
.section-videos .video-small .title a {
    color: var(--cn-ink);
}

/* Ultimas noticias em linhas com miniatura. */
.latest-posts .section-title {
    padding-left: 12px;
    border-left: 5px solid var(--cn-accent);
}

#last_posts_content {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

#last_posts_content > div {
    width: 100% !important;
    min-width: 0;
    padding: 0 !important;
}

.latest-posts .post-item {
    display: grid;
    grid-template-columns: 118px minmax(0, 1fr);
    gap: 12px;
    height: 100%;
    padding: 10px;
    background: #fff;
    border: 1px solid var(--cn-line);
    border-radius: 12px;
    transition: transform .2s ease, box-shadow .2s ease;
}

.latest-posts .post-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(15, 35, 60, .1);
}

.latest-posts .post-item.post-item-no-image {
    display: block;
}

.latest-posts .post-item .image.ratio {
    width: 118px;
    height: 88px;
    padding: 0;
    border-radius: 8px;
    overflow: hidden;
    background: #eef2f7;
}

.latest-posts .post-item .image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.latest-posts .post-item .badge-category {
    color: var(--cat-text, #fff);
    background-color: var(--cat-bg, var(--cn-accent));
    border-radius: 5px;
    padding: 4px 8px;
    font-size: 11px;
}

.latest-posts .post-item .title {
    margin: 6px 0;
    font-size: 15px;
    line-height: 1.35;
    font-weight: 700;
}

.latest-posts .post-item .title a {
    color: var(--cn-ink);
}

.latest-posts .post-item .description {
    margin: 0 0 7px;
    color: var(--cn-muted);
    font-size: 13px;
    line-height: 1.4;
}

.latest-posts .post-item .post-meta span,
.latest-posts .post-item .post-meta a {
    font-size: 11px;
}

@media (max-width: 1199.98px) {
    #last_posts_content {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 1199.98px) {
    .featured-grid {
        height: 380px;
    }

    .main-slider .caption {
        padding: 20px 22px;
    }

    .main-slider .caption .title {
        font-size: clamp(22px, 2.2vw, 28px);
    }

    .featured-secondary .caption {
        padding: 14px 16px;
    }

    .featured-secondary .caption .title {
        font-size: 16px;
    }
}

@media (max-width: 991.98px) {
    .featured-grid {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: auto;
        height: auto;
    }

    .featured-main,
    .featured-side {
        grid-column: 1;
        grid-row: auto;
    }

    .featured-main {
        height: 380px;
    }

    .featured-side {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-template-rows: auto;
        height: auto;
    }

    .featured-secondary {
        height: 240px;
    }
}

@media (max-width: 575.98px) {
    #header {
        margin-bottom: 16px;
    }

    .featured-main {
        height: 320px;
    }

    .main-slider .caption {
        padding: 16px;
    }

    .main-slider .caption .title {
        font-size: 24px;
    }

    .main-slider .caption .summary {
        font-size: 13px;
    }

    .featured-side {
        grid-template-columns: 1fr;
    }

    .featured-secondary {
        height: 220px;
    }

    .editorial-head .title {
        font-size: 19px;
    }

    .editorial-grid,
    #last_posts_content {
        grid-template-columns: 1fr;
    }

    .latest-posts .post-item {
        grid-template-columns: 104px minmax(0, 1fr);
    }

    .latest-posts .post-item .image.ratio {
        width: 104px;
        height: 78px;
    }
}

/*--------------------------------------------------------------
  Refinamento de espaçamento, anúncios e organização editorial.
  Sobrescreve apenas apresentação; não altera dados, rotas, cores
  cadastradas nem funcionalidades do tema.
 --------------------------------------------------------------*/
#header {
    margin-bottom: 12px !important;
}

/* Espaços publicitários: sem parágrafo vazio e sem margens exageradas. */
.container-bn.mb-3,
.container-bn.mb-4,
.container-bn.container-bn-header {
    margin-top: 0 !important;
    margin-bottom: 8px !important;
}

.container-bn + p {
    display: none !important;
}

.container-bn .row {
    margin-left: 0;
    margin-right: 0;
}

.bn-content .bn-inner {
    max-width: 100%;
}

.bn-content .bn-inner img {
    width: auto !important;
    height: auto !important;
    max-width: 100% !important;
    max-height: 220px !important;
    margin: 0 auto;
    object-fit: contain;
}

.google-auto-placed {
    margin: 0 0 6px !important;
}

.google-auto-placed ins.adsbygoogle,
.adsbygoogle {
    margin: 0 auto 6px !important;
}

/* Conteúdo principal mais próximo dos anúncios, com ritmo uniforme. */
#main-content section.section {
    margin-bottom: 18px !important;
}

#main-content .section .section-title {
    margin-bottom: 12px !important;
    padding-bottom: 8px !important;
}

#main-content .section .section-title .title {
    margin-bottom: 0 !important;
    font-size: 18px !important;
    line-height: 1.25 !important;
}

/* Editorias: cartões uniformes, imagem proporcional e leitura confortável. */
.editorial-head {
    margin-bottom: 10px !important;
    padding-left: 10px !important;
    border-left-width: 4px !important;
}

.editorial-head .title {
    font-size: 20px !important;
    line-height: 1.25 !important;
}

.editorial-head .view-all {
    font-size: 12px !important;
    white-space: nowrap;
}

.editorial-grid {
    gap: 12px !important;
}

.editorial-card .image {
    aspect-ratio: 16 / 9 !important;
}

.editorial-card .body {
    padding: 11px !important;
}

.badge-editorial {
    padding: 4px 7px !important;
    font-size: 10px !important;
}

.editorial-card .title {
    display: -webkit-box !important;
    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: 2 !important;
    overflow: hidden !important;
    margin: 7px 0 5px !important;
    font-size: 16px !important;
    line-height: 1.3 !important;
}

.editorial-card:first-child .title {
    font-size: 17px !important;
}

.editorial-card .summary {
    display: -webkit-box !important;
    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: 2 !important;
    overflow: hidden !important;
    margin: 0 0 8px !important;
    font-size: 12px !important;
    line-height: 1.4 !important;
}

.editorial-date {
    font-size: 11px !important;
}

/* Últimas notícias: cards regulares, botão centralizado e coluna independente. */
.latest-layout-row {
    align-items: flex-start !important;
}

#last_posts_content {
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)) !important;
    gap: 12px !important;
    align-items: stretch !important;
}

#last_posts_content > div {
    width: 100% !important;
    min-width: 0;
    margin-bottom: 0 !important;
    padding: 0 !important;
}

.latest-posts .post-item,
.latest-posts .post-item.post-item-no-image {
    position: relative;
    display: flex !important;
    flex-direction: column !important;
    gap: 0 !important;
    height: 100% !important;
    margin-bottom: 12px !important;
    padding: 0 !important;
    overflow: hidden;
    border-radius: 10px !important;
}

.latest-posts .post-item.post-item-no-image {
    padding: 11px !important;
}

.latest-posts .post-item > a:first-child {
    position: absolute !important;
    top: 8px !important;
    left: 8px !important;
    z-index: 2 !important;
}

.latest-posts .post-item .badge-category {
    padding: 3px 7px !important;
    font-size: 10px !important;
}

.latest-posts .post-item .image.ratio {
    order: 1;
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 16 / 9 !important;
    padding: 0 !important;
    border-radius: 0 !important;
}

.latest-posts .post-item .image.ratio img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}

.latest-posts .post-item .title {
    order: 2;
    display: -webkit-box !important;
    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: 2 !important;
    overflow: hidden !important;
    margin: 9px 11px 4px !important;
    font-size: 14px !important;
    line-height: 1.32 !important;
}

.latest-posts .post-item .post-meta {
    order: 3;
    flex-wrap: wrap !important;
    gap: 2px !important;
    margin: 0 11px 5px !important;
}

.latest-posts .post-item .post-meta span,
.latest-posts .post-item .post-meta a {
    margin-right: 6px !important;
    font-size: 10px !important;
}

.latest-posts .post-item .description {
    order: 4;
    display: -webkit-box !important;
    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: 2 !important;
    overflow: hidden !important;
    margin: 0 11px 10px !important;
    font-size: 12px !important;
    line-height: 1.35 !important;
}

.latest-posts .btn-load-more {
    margin-top: 12px !important;
}

/* Barra lateral alinhada à coluna principal, sem blocos desproporcionais. */
.col-sidebar .sidebar-widget {
    margin-bottom: 18px !important;
}

.sidebar-widget .widget-head {
    margin-bottom: 12px !important;
    padding-bottom: 8px !important;
}

.sidebar-widget .widget-head .title {
    margin: 0 !important;
    font-size: 16px !important;
    line-height: 1.25 !important;
}

.post-item-small {
    margin-bottom: 12px !important;
}

.post-item-small .left,
.post-item-small .left .image {
    width: 96px !important;
}

.post-item-small .left .image {
    height: 67px !important;
}

.post-item-small .right {
    padding-left: 10px !important;
}

.post-item-small .title {
    display: -webkit-box !important;
    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: 2 !important;
    overflow: hidden !important;
    margin: 0 0 3px !important;
    font-size: 13px !important;
    line-height: 1.3 !important;
}

.post-item-small .small-post-meta span,
.post-item-small .small-post-meta a {
    margin-right: 5px !important;
    font-size: 10px !important;
}

.sidebar-widget .tag-list {
    padding-bottom: 5px !important;
}

.sidebar-widget .tag-list li {
    margin-bottom: 5px !important;
}

.sidebar-widget .tag-list li a {
    padding: 5px 9px !important;
    border-radius: 4px !important;
    font-size: 12px !important;
}

.widget-follow .item {
    margin-bottom: 6px !important;
}

/* Responsividade: menos colunas e banners menores em telas estreitas. */
@media (max-width: 1199.98px) {
    #last_posts_content {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 991.98px) {
    .editorial-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 767.98px) {
    #last_posts_content,
    .editorial-grid {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    .bn-content .bn-inner img {
        max-height: 150px !important;
    }
}
