/**
 * Custom responsive & layout improvements - AICEV
 * Mobile: evita quebra de layout, remove banner indesejado, overflow e toques.
 * Desktop: aparência mais profissional e limpa.
 */

/* --- Evitar quebra no mobile (overflow e imagens) --- */
html {
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
}
body {
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}
img {
    max-width: 100%;
    height: auto;
}

/* --- Banners no mobile: topo, index topo e index inferior aparecem no celular --- */
/* (bn-header-mobile exibe index_top no wrapper; index_bottom já está no fluxo do conteúdo) */

/* --- Ajustes gerais no mobile --- */
@media (max-width: 991px) {
    #header .nav-mobile {
        padding-left: 15px;
        padding-right: 15px;
    }
    .nav-mobile .logo-cnt .logo {
        max-width: 140px;
        max-height: 44px;
    }
    .index-wrapper .container,
    #content {
        padding-left: 15px;
        padding-right: 15px;
    }
    .section-featured {
        margin-left: -15px;
        margin-right: -15px;
    }
}

@media (max-width: 767px) {
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }
    .mobile-menu-inner {
        padding: 20px 15px;
    }
}

@media (max-width: 576px) {
    .nav-mobile .logo-cnt .logo {
        max-width: 120px;
        max-height: 38px;
    }
}

/* --- Desktop: aparência mais profissional --- */
@media (min-width: 992px) {
    .container {
        max-width: 1140px;
        margin-left: auto;
        margin-right: auto;
    }
    body {
        font-size: 15px;
        line-height: 1.6;
    }
    #content {
        padding-top: 20px;
    }
    .section-head .title,
    .section .section-head .title {
        font-size: 20px;
        font-weight: 600;
        margin-bottom: 15px;
    }
    .post-item .title,
    .featured-box .caption .title {
        line-height: 1.35;
    }
    .logo-banner {
        padding: 20px 0;
    }
    .main-menu {
        border-top-width: 1px;
    }
}

@media (min-width: 1200px) {
    .container {
        max-width: 1200px;
    }
}

/* --- Garantir que placeholder do slider não apareça no mobile --- */
@media (max-width: 991px) {
    .img-no-slider,
    .img-bg.img-no-slider {
        display: none !important;
        visibility: hidden !important;
        height: 0 !important;
        overflow: hidden !important;
    }
}

/* --- Sidebar no mobile: espaçamento e leitura --- */
@media (max-width: 991px) {
    #sidebar {
        margin-top: 20px;
        padding-top: 20px;
        border-top: 1px solid #eee;
    }
}

/* --- Mix TV: seção mais compacta para caber banner canto a canto --- */
.section-featured + .section .section-head2 .title,
.section .section-head2 .title {
    margin-bottom: 8px;
}
.section .section-content {
    margin-bottom: 0;
}
.featured-video .featured-box {
    margin-bottom: 10px;
}
.featured-video .box-inner .post-item-image {
    max-height: 200px;
}
@media (min-width: 768px) {
    .featured-video .box-inner .post-item-image {
        max-height: 220px;
    }
}

/* --- Banner logo abaixo do Mix TV: canto a canto (mobile e desktop) --- */
.bn-mix-tv-below {
    width: 100%;
    max-width: 100%;
    margin: 12px 0 10px;
    padding: 0;
    overflow: hidden;
}
.bn-mix-tv-below .bn-lg,
.bn-mix-tv-below .bn-md,
.bn-mix-tv-below .bn-sm,
.bn-mix-tv-below section {
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
}
.bn-mix-tv-below img {
    width: 100%;
    max-width: 100%;
}
/* Só no desktop: limitar altura do banner grande abaixo do Mix TV (idêntico à referência) */
@media (min-width: 992px) {
    .bn-mix-tv-below img {
        max-height: 120px;
        object-fit: cover;
        object-position: center;
    }
}

/* --- Banner em cima de Eventos: ocupa a tela toda (mobile e desktop) --- */
.bn-index-above-featured {
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
    padding-left: 0;
    padding-right: 0;
    margin-bottom: 10px;
}
.bn-index-above-featured section,
.bn-index-above-featured .row {
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
}
.bn-index-above-featured img {
    width: 100%;
    max-width: 100%;
}

/* --- Seção em destaque: rente em baixo também, sem vão em branco --- */
.section-featured {
    margin-bottom: 8px;
    background: #fff;
    padding: 0;
    border-radius: 0;
}
.section-featured .featured-boxes-bottom.row-destaques {
    margin-bottom: 0 !important;
}
/* Rente embaixo do slide/destaque: sem vão em branco antes do ticker e da barra */
.index-wrapper.m-t-0 {
    margin-top: 0 !important;
    padding-top: 0 !important;
}
.section-featured .container {
    max-width: 100%;
}
/* Permitir que +Destaques apareça; min-height só o necessário para evitar vão em branco */
#featured {
    margin-top: 0;
    min-height: 560px !important;
    height: auto !important;
    overflow: visible !important;
}
#featured .featured-right {
    height: auto !important;
    min-height: 520px !important;
    overflow: visible !important;
    padding: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 0 !important;
    align-items: stretch;
}
#featured .featured-right > * {
    margin-top: 0 !important;
}
#featured .featured-right > .row-eventos-patrocinio {
    margin-bottom: 0 !important;
}
/* Remove o espaço em branco: +Destaques encosta na foto do evento e na publicidade */
.row-eventos-patrocinio + .title-box.news-featured {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 6px !important;
    flex-shrink: 0;
    line-height: 1.2;
}
.title-box.news-featured + .featured-boxes-bottom.row-destaques {
    margin-top: 0 !important;
}
/* Tema base dá height 217px ao .featured-box e .box-inner — anula na coluna direita para não criar vão */
#featured .featured-right .featured-box {
    height: auto !important;
    min-height: 0 !important;
}
#featured .featured-right .featured-box .box-inner {
    height: auto !important;
    min-height: 0 !important;
}
#featured .featured-right .featured-boxes-top {
    padding-bottom: 0 !important;
}
#featured .featured-right .featured-boxes-bottom {
    padding-top: 0 !important;
}
/* Título EVENTOS: azul + sublinhado, fica só na coluna Eventos */
.section-featured .title-box.event-featured {
    margin-top: 0;
    margin-bottom: 6px;
    padding: 0 0 6px 0;
    border-bottom: 2px solid #1a5490;
    position: relative;
    width: 100%;
}
.section-featured .title-box.event-featured h2 {
    color: #1a5490;
    font-size: 1em;
    font-weight: 700;
    margin: 0;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}
/* Título Patrocínio: na coluna Patrocínio, sem sobrepor Eventos */
.section-featured .title-box.patrocinio-featured {
    margin-top: 0;
    margin-bottom: 6px;
    padding: 0 0 6px 0;
    position: relative;
    width: 100%;
}
.section-featured .title-box.patrocinio-featured h2 {
    color: #333;
    font-size: 1em;
    font-weight: 700;
    margin: 0;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}
/* +Destaques: na coluna direita, logo abaixo de Eventos e Patrocínio (como na foto) */
#featured .featured-right .title-box.news-featured {
    width: 100% !important;
    max-width: 100%;
    clear: both;
    display: block !important;
    float: none !important;
    margin-left: 0;
    margin-right: 0;
}
#featured .featured-right .featured-boxes-bottom.row-destaques {
    width: 100% !important;
    max-width: 100%;
    clear: both;
    float: none !important;
    margin-left: 0;
    margin-right: 0;
}
/* +Destaques: encostado na foto do evento e na publicidade, zero espaço em branco */
.section-featured .title-box.news-featured {
    margin-top: 0 !important;
    margin-bottom: 8px !important;
    padding-top: 0 !important;
    padding-bottom: 4px !important;
    padding-left: 0;
    padding-right: 0;
    border-top: none;
    border-bottom: 2px solid #c00;
}
.section-featured .title-box.news-featured h2 {
    color: #c00;
    font-weight: 700;
    font-size: 1em;
}
.section-featured .featured-boxes-top,
.section-featured .featured-boxes-bottom {
    margin-bottom: 0 !important;
    margin-top: 0 !important;
}
/* Tira qualquer espaço em branco entre evento/patrocínio e +Destaques */
#featured .featured-right .row-eventos-patrocinio,
#featured .featured-right .featured-boxes-top {
    margin-bottom: 0 !important;
}
.section-featured .featured-box {
    margin-bottom: 0;
}
.section-featured .featured-box .box-inner {
    padding: 0;
}
.featured-box .box-inner:empty {
    display: none;
}

/* --- Eventos: altura só da foto, sem caixa extra (tema usa 217px e cria espaço em branco) --- */
.featured-event-single {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}
.featured-event-single .featured-box.box-event-um {
    margin-bottom: 0 !important;
    height: auto !important;
    min-height: 0 !important;
}
#featured .featured-boxes-top.featured-event-single,
#featured .featured-right .featured-boxes-top {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}
.featured-event-single .box-inner .post-item-image,
.featured-event-single .box-inner .post-item-mid .post-item-image {
    height: 190px;
    overflow: hidden;
}
.featured-event-single .box-inner .post-item-image img,
.featured-event-single .img-cover {
    width: 100%;
    height: 190px;
    object-fit: cover;
}
@media (min-width: 992px) {
    .featured-event-single .box-inner .post-item-image,
    .featured-event-single .box-inner .post-item-mid .post-item-image {
        height: 200px;
    }
    .featured-event-single .box-inner .post-item-image img,
    .featured-event-single .img-cover {
        height: 200px;
        object-fit: cover;
    }
}

/* --- Eventos e Patrocínio: lado a lado; sem espaço embaixo para +Destaques colar --- */
.row-eventos-patrocinio {
    margin-left: 0;
    margin-right: 0;
    margin-bottom: 0 !important;
    display: flex;
    flex-wrap: nowrap;
    gap: 12px;
    align-items: flex-start;
}
.row-eventos-patrocinio .col-eventos {
    flex: 1 1 60%;
    min-width: 180px;
    max-width: 100%;
}
.row-eventos-patrocinio .col-patrocinio {
    flex: 0 0 200px;
    width: 200px;
    min-width: 200px;
    max-width: 100%;
    display: block;
}
.row-eventos-patrocinio .col-patrocinio .title-box.patrocinio-featured {
    margin-top: 0;
}
/* Patrocínio: sem linha/risco preto em volta — rentinho à imagem para o +Destaques subir */
.featured-boxes-patrocinio {
    margin-bottom: 0;
    padding-bottom: 0;
    min-height: 160px;
    background: #fff;
    border: none !important;
    outline: none;
    border-radius: 0;
    padding: 10px 10px 0 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.featured-boxes-patrocinio .bn-lg-sidebar,
.featured-boxes-patrocinio section {
    max-width: 100%;
    border: none !important;
}
.featured-boxes-patrocinio img {
    max-width: 100%;
    height: auto;
    max-height: 140px;
    object-fit: contain;
    border: none !important;
}
.row-eventos-patrocinio .col-patrocinio {
    border: none !important;
}
@media (min-width: 992px) {
    .row-eventos-patrocinio {
        flex-wrap: nowrap;
    }
    .row-eventos-patrocinio .col-eventos {
        flex: 1 1 65%;
        min-width: 220px;
    }
    .row-eventos-patrocinio .col-patrocinio {
        flex: 0 0 200px;
        width: 200px;
        min-width: 200px;
    }
    .featured-boxes-patrocinio {
        min-height: 180px;
        padding: 12px 12px 0 12px;
    }
    .featured-boxes-patrocinio img {
        max-height: 150px;
    }
}
@media (max-width: 991px) {
    .row-eventos-patrocinio {
        flex-direction: column;
        flex-wrap: wrap;
    }
    .row-eventos-patrocinio .col-eventos {
        flex: 1 1 100%;
        min-width: 0;
        max-width: 100%;
    }
    .row-eventos-patrocinio .col-patrocinio {
        flex: 0 0 auto;
        width: 100%;
        min-width: 0;
        max-width: 280px;
        margin-top: 12px;
    }
    .featured-boxes-patrocinio img {
        max-height: 200px;
    }
}
@media (max-width: 576px) {
    .row-eventos-patrocinio .col-patrocinio {
        max-width: 100%;
    }
}

/* --- Bloco tipo 3: últimas 3 notícias em colunas iguais --- */
.block-3-ultimas-tres .col-sm-4 {
    margin-bottom: 15px;
}
.block-3-ultimas-tres .post-item .post-item-image {
    height: 200px;
    object-fit: cover;
}
@media (max-width: 767px) {
    .block-3-ultimas-tres .col-sm-4 {
        width: 100%;
        margin-bottom: 12px;
    }
    .block-3-ultimas-tres .post-item .post-item-image {
        height: 180px;
    }
}

/* +Destaques rentinho abaixo de Eventos e Patrocínio (padronizado, sem espaço em branco) */
.section-featured .title-box.news-featured {
    display: block;
    margin-top: 0 !important;
    margin-bottom: 8px;
    padding-top: 0 !important;
    padding-bottom: 4px;
    padding-left: 0;
    padding-right: 0;
    border-bottom: 2px solid #c00;
}
.section-featured .title-box.news-featured h2 {
    color: #c00;
    font-weight: 700;
    font-size: 1em;
}
.featured-boxes-bottom.row-destaques {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-left: 0;
    margin-right: 0;
    margin-bottom: 0;
}
.featured-boxes-bottom.row-destaques .featured-box.box-destaque-pequeno {
    margin-bottom: 0;
    padding: 0;
    border: 1px solid #e0e0e0;
    background: #fff;
    border-radius: 0;
    overflow: visible;
    min-height: 0;
    box-shadow: none;
}
.featured-boxes-bottom.row-destaques .featured-box.box-destaque-pequeno:hover {
    border-color: #ccc;
}
.featured-boxes-bottom.row-destaques .post-item-small {
    display: flex;
    flex-direction: row;
    padding: 0;
    margin: 0;
    min-height: 0;
    height: 100%;
}
.featured-boxes-bottom.row-destaques .post-item-small .left {
    flex: 0 0 90px;
    width: 90px;
    min-height: 70px;
    overflow: hidden;
}
.featured-boxes-bottom.row-destaques .post-item-small .left a,
.featured-boxes-bottom.row-destaques .post-item-small .left .img-container {
    display: block;
    height: 100%;
    min-height: 70px;
}
.featured-boxes-bottom.row-destaques .post-item-small .left img {
    width: 100%;
    height: 70px;
    object-fit: cover;
    display: block;
}
.featured-boxes-bottom.row-destaques .post-item-small .right {
    flex: 1;
    min-width: 0;
    padding: 6px 8px 8px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}
.featured-boxes-bottom.row-destaques .post-item-small .right .title {
    font-size: 12px;
    line-height: 1.35;
    margin: 0 0 4px;
    font-weight: 600;
}
.featured-boxes-bottom.row-destaques .post-item-small .right .title a {
    display: -webkit-box;
    -webkit-line-clamp: 4;
    line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: #222;
    text-decoration: none;
}
.featured-boxes-bottom.row-destaques .post-item-small .right .title a:hover {
    color: #c00;
}
.featured-boxes-bottom.row-destaques .post-item-small .small-post-meta {
    font-size: 10px;
    margin: 0;
    color: #666;
    margin-top: auto;
}
/* Desktop: 3 cards com foto em cima, título e meta embaixo — altura automática para não cortar notícias */
@media (min-width: 992px) {
    .featured-boxes-bottom.row-destaques {
        gap: 12px;
    }
    .featured-boxes-bottom.row-destaques .featured-box.box-destaque-pequeno {
        min-height: 0;
    }
    .featured-boxes-bottom.row-destaques .post-item-small {
        flex-direction: column;
    }
    .featured-boxes-bottom.row-destaques .post-item-small .left {
        flex: 0 0 auto;
        width: 100%;
        min-height: 95px;
        height: 95px;
    }
    .featured-boxes-bottom.row-destaques .post-item-small .left a,
.featured-boxes-bottom.row-destaques .post-item-small .left .img-container {
        display: block;
        width: 100%;
        height: 95px;
        min-height: 95px;
    }
    .featured-boxes-bottom.row-destaques .post-item-small .left img {
        width: 100%;
        height: 95px;
        object-fit: cover;
    }
    .featured-boxes-bottom.row-destaques .post-item-small .right {
        flex: 1;
        min-width: 0;
        padding: 8px 10px 10px;
    }
    .featured-boxes-bottom.row-destaques .post-item-small .right .title {
        font-size: 12px;
        font-weight: 600;
        line-height: 1.35;
        -webkit-line-clamp: 4;
        line-clamp: 4;
    }
}
@media (max-width: 767px) {
    .featured-boxes-bottom.row-destaques {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    .featured-boxes-bottom.row-destaques .post-item-small .left {
        flex: 0 0 100px;
        width: 100px;
    }
    .featured-boxes-bottom.row-destaques .post-item-small .left img {
        height: 80px;
    }
}

/* --- Barra / lista escura (ticker): ficar atrás das notícias em destaque (z-index) --- */
.news-ticker-cnt,
.news-ticker-sep,
.noticias-em-destaque-bar {
    position: relative;
    z-index: 1;
}
.noticias-em-destaque-bar {
    margin-bottom: 15px;
    padding: 0;
}
.noticias-em-destaque-bar .bar-inner {
    display: flex;
    align-items: center;
    background: #1e3a5f;
    color: #fff;
    padding: 10px 12px;
    margin: 0;
    border-radius: 2px;
}
.noticias-em-destaque-bar .bar-title {
    flex: 0 0 auto;
    font-size: 13px;
    font-weight: 700;
    margin-right: 15px;
    white-space: nowrap;
}
.noticias-em-destaque-bar .bar-ticker {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}
.noticias-em-destaque-bar .bar-ticker-inner {
    position: relative;
}
.noticias-em-destaque-bar .bar-headline {
    display: none;
    color: #fff;
    font-size: 13px;
    text-decoration: none;
}
.noticias-em-destaque-bar .bar-headline.active {
    display: block;
}
.noticias-em-destaque-bar .bar-headline:hover {
    color: #fff;
    text-decoration: underline;
}
.noticias-em-destaque-bar .bar-arrows {
    flex: 0 0 auto;
    margin-left: 10px;
}
.noticias-em-destaque-bar .bar-arrows a {
    color: #fff;
    padding: 4px 8px;
    font-size: 14px;
}
.noticias-em-destaque-bar .bar-arrows a:hover {
    color: #ccc;
}
@media (max-width: 767px) {
    .noticias-em-destaque-bar .bar-inner {
        flex-wrap: wrap;
    }
    .noticias-em-destaque-bar .bar-title {
        width: 100%;
        margin-bottom: 6px;
    }
}
