
/* ============================================= */
/* =============== HEADER ====================== */
/* ============================================= */
:root {
    --tj-primary: #631317;
    /* cor principal (vinho) */
    --tj-primary-dark: #4a0e11;
    /* hover/escuro */
    --surface: #ffffff;
    /* superfícies claras */
    --surface-muted: #f8f9fa;
    /* superfícies leves */
    --bg-dark: #111111;
    --text: #212529;
    --text-muted: #495057;
    --focus: #ffd54f;
    /* cor de foco visível */
}

/* Corrige overflow horizontal em todas as resoluções */
html, body {
    overflow-x: hidden;
    max-width: 100%;
    margin: 0;
    padding: 0;
}

body {
    width: 100%;
}

#HeaderPrincipal {
    background: var(--tj-primary) !important;
    /* Tom de vinho escuro */
    color: var(--surface);
    min-height: 140px;
    position: relative;
    /* Para o botão de tema position: absolute */
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 100vw;
}

/* ========================================
   BOTÃO DE TEMA
======================================== */
.btn-theme-toggle {
    position: absolute;
    top: 20px;
    left: 20px;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.4);
    color: #fff;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    z-index: 1000;
}

.btn-theme-toggle:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.6);
    transform: scale(1.1);
}

.btn-theme-toggle:focus {
    outline: 3px solid var(--focus);
    outline-offset: 2px;
}

/* Estado light theme - apenas fundo branco do main por enquanto */
body.light-theme {
    background-color: #fff !important;
}

/* Borda bordô nos cards de notícias e programas no modo claro */
body.light-theme .news-item {
    border: 3px solid var(--tj-primary) !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1), 0 2px 4px rgba(0, 0, 0, 0.06) !important;
    background-color: #e0e0e0 !important;
}

/* Borda bordô nos comentários no modo claro */
body.light-theme .comment-bubble {
    border: none !important;
    border-left: 3px solid var(--tj-primary) !important;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2) !important;
    background-color: #fff !important;
}

/* Estilos para botões de navegação no modo claro */
body.light-theme .nav-pills .nav-link {
    background-color: #e0e0e0;
    color: #000;
    border: 3px solid var(--tj-primary);
}

body.light-theme .nav-pills .nav-link:hover {
    background-color: #d0d0d0;
    color: #000;
}

body.light-theme .nav-pills .nav-link.active {
    background-color: var(--tj-primary) !important;
    color: white !important;
    border-color: var(--tj-primary) !important;
}

/* Campo de busca no modo claro */
body.light-theme .search-box {
    background-color: #e0e0e0;
    border: 3px solid var(--tj-primary);
}

body.light-theme .search-input {
    color: #000;
}

.divFiltrosBusca {
    max-width: 400px !important;
}

body.light-theme .search-input::placeholder {
    color: rgba(0, 0, 0, 0.6);
}

body.light-theme .btn-search {
    color: #000;
}

/* Botão de filtro no modo claro */
body.light-theme .btn-filter-icon {
    color: #000 !important;
}

body.light-theme .btn-filter-icon i {
    color: #000 !important;
}

/* Caixa de comentários no modo claro */
body.light-theme .card-comments {
    background-color: #e0e0e0 !important;
}

/* Player sempre preto, mesmo no tema claro */
body.light-theme .playerContainer,
body.light-theme #SecPlayer {
    background-color: #111111 !important;
}



.bgTjMinas {
    background: var(--tj-primary) !important;
    /* Tom de vinho escuro */
    color: var(--surface);
    min-height: 140px;
    position: relative;
    /* Para o botão de tema position: absolute */
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 100vw;
}

/* Corrige padding do container-fluid do Bootstrap */
.bgTjMinas .container-fluid,
#SecPlayer.container-fluid {
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    max-width: 100%;
}

.divConteudoHeader {
    max-width: 1200px;
    width: 100% !important;
    padding: 20px 15px;
}

#DivLogoArea,
#DivLogoRadioTjMinas {
    display: flex;
    align-items: center;
    height: 100%;
}

.textoLogo {
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    font-size: 1rem;
    line-height: 1.2;
    margin-left: 10px;
    font-weight: 400;
}

#DivSocialArea {
    padding-left: 0 !important;
    gap: 30px;
}

.socialIcon {
    color: white;
    font-size: 1.5rem;
    transition: opacity 0.3s;
}

.socialIcon:hover {
    opacity: 0.7;
    color: #ddd;
}

.logoImgPlaceholder {
    font-size: 2rem;
}

.logoImgPlaceholder img {
    max-width: 74%;
    height: auto;
}

.imgLogoHeader {
    max-width: 150px;
    height: auto;
}

/* Slogan desktop */
.desktop-header-slogan {
    color: white;
    font-weight: 700;
    font-size: 2rem;
    margin: 0;
    text-align: center;
}

/* Mobile header rows - hidden by default */
.mobile-header-row-1,
.mobile-header-row-2 {
    display: none;
}

/* ============================================= */
/* RESPONSIVIDADE HEADER - SM (576px - 767px) */
/* ============================================= */
@media (min-width: 576px) and (max-width: 767px) {
    #HeaderPrincipal {
        min-height: auto;
        position: relative;
    }

    .divConteudoHeader {
        flex-direction: column !important;
        align-items: stretch !important;
        padding: 15px 20px;
    }

    /* Esconde elementos desktop */
    #DivLogoArea,
    #DivLogoRadioTjMinas,
    .desktop-header-slogan {
        display: none !important;
    }

    /* Mostra elementos mobile */
    .mobile-header-row-1,
    .mobile-header-row-2 {
        display: flex !important;
        width: 100%;
    }

    .mobile-header-row-1 {
        justify-content: space-between;
        align-items: center;
        padding: 0 10px;
        margin-bottom: 20px;
    }

    .mobile-logo-tj {
        display: flex;
        align-items: center;
        flex-direction: row;
    }

    .mobile-logo-tj .logoImgPlaceholder img {
        max-width: 70px;
    }

    .mobile-logo-tj .textoLogo {
        font-size: 0.95rem;
        margin-left: 12px;
    }

    .mobile-logo-radio {
        display: flex;
        align-items: center;
    }

    .mobile-logo-radio .imgLogoHeader {
        max-width: 120px;
    }

    .mobile-header-row-2 {
        justify-content: center;
        align-items: center;
        gap: 20px;
        padding: 0 10px;
        padding-bottom: 10px;
    }

    .mobile-header-row-2 .socialIcon {
        font-size: 1.6rem;
    }

    .btn-theme-toggle {
        top: auto !important;
        bottom: 15px;
        left: auto !important;
        right: 15px;
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }
}

/* ============================================= */
/* RESPONSIVIDADE HEADER - XS (< 576px) */
/* ============================================= */
@media (max-width: 575px) {
    #HeaderPrincipal {
        min-height: auto;
        position: relative;
    }

    .divConteudoHeader {
        flex-direction: column !important;
        align-items: stretch !important;
        padding: 10px 15px;
    }

    /* Esconde elementos desktop */
    #DivLogoArea,
    #DivLogoRadioTjMinas,
    .desktop-header-slogan {
        display: none !important;
    }

    /* Mostra elementos mobile */
    .mobile-header-row-1,
    .mobile-header-row-2 {
        display: flex !important;
        width: 100%;
    }

    .mobile-header-row-1 {
        justify-content: space-between;
        align-items: center;
        padding: 0 5px;
        margin-bottom: 15px;
    }

    .mobile-logo-tj {
        display: flex;
        align-items: center;
        flex-direction: row;
    }

    .mobile-logo-tj .logoImgPlaceholder img {
        max-width: 50px;
    }

    .mobile-logo-tj .textoLogo {
        font-size: 0.75rem;
        margin-left: 8px;
        line-height: 1.1;
    }

    .mobile-logo-radio {
        display: flex;
        align-items: center;
    }

    .mobile-logo-radio .imgLogoHeader {
        max-width: 90px;
    }

    .mobile-header-row-2 {
        justify-content: center;
        align-items: center;
        gap: 12px;
        padding: 0 5px;
        padding-bottom: 8px;
    }

    .mobile-header-row-2 .socialIcon {
        font-size: 1.3rem;
    }

    .btn-theme-toggle {
        top: auto !important;
        bottom: 10px;
        left: auto !important;
        right: 10px;
        width: 38px;
        height: 38px;
        font-size: 1rem;
    }
}

/* ============================================= */
/* RESPONSIVIDADE HEADER - MD (768px - 991px) */
/* ============================================= */
@media (min-width: 768px) and (max-width: 991px) {
    #HeaderPrincipal {
        min-height: 120px;
    }

    .divConteudoHeader {
        max-width: 100%;
        width: 100% !important;
        padding: 15px 20px;
    }

    /* Esconde elementos mobile */
    .mobile-header-row-1,
    .mobile-header-row-2 {
        display: none !important;
    }

    /* Mostra elementos desktop mas ajusta tamanhos */
    #DivLogoArea {
        flex-direction: column;
        align-items: flex-start !important;
        justify-content: center !important;
        min-height: 100px;
    }

    #DivLogoArea .col-12:first-child {
        margin-bottom: 8px;
    }

    .textoLogo {
        font-size: 0.85rem;
        margin-left: 10px;
        line-height: 1.1;
    }

    .logoImgPlaceholder {
        font-size: 1.8rem;
    }

    .logoImgPlaceholder img {
        max-width: 219px;
    }

    #DivSocialArea {
        padding-left: 10px !important;
        gap: 10px;
        max-width: 211px !important;
        width: 211px !important;
    }

    .socialIcon {
        font-size: 1.3rem;
        margin-left: 0;
    }

    .desktop-header-slogan {
        font-size: 1.3rem;
        line-height: 1.25;
        text-align: center;
    }

    #DivLogoRadioTjMinas {
        min-height: 100px;
    }

    .imgLogoHeader {
        max-width: 120px;
    }

    .btn-theme-toggle {
        top: 15px;
        left: 15px;
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }
}

/* ============================================= */
/* RESPONSIVIDADE HEADER - LG (992px - 1199px) */
/* ============================================= */
@media (min-width: 992px) and (max-width: 1199px) {
    #HeaderPrincipal {
        min-height: 140px;
    }

    .divConteudoHeader {
        max-width: 960px;
        width: 960px !important;
        padding: 20px;
    }

    /* Esconde elementos mobile */
    .mobile-header-row-1,
    .mobile-header-row-2 {
        display: none !important;
    }

    #DivLogoArea {
        display: flex;
        flex-direction: column;
        align-items: flex-start !important;
        justify-content: center !important;
        height: 100%;
    }

    #DivLogoRadioTjMinas {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        height: 100%;
    }

    .textoLogo {
        font-size: 0.95rem;
        margin-left: 12px;
        line-height: 1.2;
    }

    .logoImgPlaceholder {
        font-size: 2.1rem;
    }

    .logoImgPlaceholder img {
        max-width: 221px;
    }

    #DivSocialArea {
        padding-left: 10px !important;
        gap: 10px;
        max-width: 211px !important;
        width: 211px !important;
    }

    .socialIcon {
        font-size: 1.5rem;
        margin-left: 0;
    }

    .desktop-header-slogan {
        font-size: 1.5rem;
        line-height: 1.3;
        text-align: center;
        margin: 0;
    }

    .imgLogoHeader {
        max-width: 140px;
    }

    .btn-theme-toggle {
        width: 42px;
        height: 42px;
        font-size: 1.15rem;
    }
}

/* ============================================= */
/* RESPONSIVIDADE HEADER - XL (≥ 1200px) */
/* ============================================= */
@media (min-width: 1200px) {
    #HeaderPrincipal {
        min-height: 140px;
    }

    .divConteudoHeader {
        max-width: 1200px;
        width: 1200px !important;
        padding: 20px 15px;
    }

    /* Esconde elementos mobile */
    .mobile-header-row-1,
    .mobile-header-row-2 {
        display: none !important;
    }

    #DivLogoArea {
        display: flex;
        flex-direction: column;
        align-items: flex-start !important;
        justify-content: center !important;
        height: 100%;
    }

    #DivLogoRadioTjMinas {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        height: 100%;
    }

    .textoLogo {
        font-size: 1.1rem;
        margin-left: 15px;
    }

    .socialIcon {
        font-size: 1.9rem;
        margin-left: 0;
    }

    .logoImgPlaceholder {
        font-size: 2.5rem;
    }

    .imgLogoHeader {
        max-width: 170px;
    }

    .desktop-header-slogan {
        font-size: 2rem;
        line-height: 1.3;
        text-align: center;
        margin: 0;
    }

    #DivSocialArea {
        justify-content: flex-start;
        padding-left: 10px !important;
        gap: 10px;
        max-width: 280px !important;
        width: 280px !important;
    }
}

/* ============================================= */
/* =============== PLAYER GERAL ================ */
/* ============================================= */

/* Título do player */
.player-title {
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    color: #ffffff;
    text-transform: uppercase;
}

/* Ajuste para permitir que o player cresça no celular, mas fixe 200px no PC */
.playerContainer {
    min-height: 200px;
    height: auto;
    /* No mobile se ajusta */
    background-color: #111111;
    color: var(--surface);
    border-bottom: 4px solid #631317 !important;
    padding-top: 10px;
    padding-bottom: 10px;
    box-sizing: border-box;
}

#SecPlayer {
    background-color: #111111 !important;
    border-bottom: 4px solid #631317 !important;
    margin-bottom: 0 !important;
    width: 100%;
    max-width: 100vw;
}

@media (min-width: 992px) {
    .playerContainer {
        height: 200px; /* No PC mantém o padrão fixo */
    }
}

/* ============================================= */
/* =============== CONTROLES & VOLUME ========== */
/* ============================================= */

/* --- Ícone de Antena --- */
.icon-antenna-shadow {
    color: #fff;
    height: 50px;
    width: 50px;
    font-size: 26px;
    filter: drop-shadow(0 0 4px #631317);
    transition: filter 0.3s, color 0.3s;
}

.icon-antenna-pulse {
    background: rgb(45 92 248 / 22%);
    border-radius: 50%;
    font-size: 26px;
    animation: pulse-antena 1.1s infinite;
    filter: drop-shadow(0 0 16px 4px #05a8f3);
}

/* --- Linha de controles do player --- */
.player-controls-row {
    gap: 18px;
    width: 300px;
    max-width: 100%;
    justify-content: center;
}

/* Reservar espaço fixo para o contêiner da antena */
.player-controls-row > div:last-child {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* --- Tamanho padrão dos botões do player --- */
.btnPlayerSize {
    display: flex;
    width: 69px;
    height: 69px;
    font-size: 1.8rem;
    flex-direction: row;
    flex-wrap: nowrap;
    align-content: center;
    justify-content: center;
    align-items: center;
}

/* Botão Play/Pause base */
.btnPlayer {
    width: 69px;
    height: 69px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: white;
    font-size: 1.5rem;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    box-sizing: border-box;
    flex: 0 0 69px;
    margin-right: 0;
}

.btnPlayer:hover {
    background-color: var(--surface);
    color: var(--tj-primary);
    transform: scale(1.1);
}

/* Ícone interno — largura fixa para não deslocar o botão */
.btnPlayer > i {
    display: inline-block;
    width: 1.2em;
    text-align: center;
}

/* Botão com animação pulsante (estado: reproduzindo ao vivo) */
.btnPlayerPulsante {
    padding: 0;
    background: var(--tj-primary);
    box-shadow: 0 0 0 0 rgba(255, 0, 0, 0.7);
    animation: pulse-tjminas 1.2s infinite;
    border: none;
    color: #fff;
    transition: background 0.3s, box-shadow 0.3s;
    width: 69px;
    height: 69px;
    box-sizing: border-box;
    flex: 0 0 69px;
}

/* Botão com estado de pause ativo (sem pulsação) */
.btnPlayerPauseActive {
    padding: 0;
    background: var(--tj-primary);
    box-shadow: 0 0 0 0 rgba(255, 0, 0, 0.7);
    animation: none;
    border: none;
    color: #fff;
    transition: background 0.3s, box-shadow 0.3s;
    width: 69px;
    height: 69px;
    box-sizing: border-box;
    flex: 0 0 69px;
}

/* --- Área do Volume --- */
.volContainer {
    display: flex;
    align-items: center;
    width: 226px;
    max-height: 226px;
}

.volIcon {
    margin-right: 10px;
    font-size: 1.4rem;
    color: #ccc;
}

/* Customização do Slider de Volume (Input Range) */
.inpVolumeStyle {
    -webkit-appearance: none;
    width: 100%;
    height: 4px;
    background: #444;
    border-radius: 2px;
    outline: none;
}

/* Bolinha do slider (Chrome/Safari/Edge) */
.inpVolumeStyle::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--tj-primary);
    border: 2px solid white;
    cursor: pointer;
    transition: background .15s ease-in-out;
}

.inpVolumeStyle::-webkit-slider-thumb:hover {
    background: var(--tj-primary-dark);
}

/* Bolinha do slider (Firefox) */
.inpVolumeStyle::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--tj-primary);
    border: 2px solid white;
    cursor: pointer;
}

/* ============================================= */
/* =============== NO AR AGORA ================= */
/* ============================================= */

.divNoArAgora {
    max-width: 350px !important;
}

.timerDisplay {
    font-family: 'Courier New', monospace;
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--surface-muted);
    letter-spacing: 2px;
}

/* Labels */
.lblInfoTitulo {
    font-size: 0.9rem;
    color: var(--surface-muted);
    text-transform: uppercase;
    font-weight: bold;
    margin-bottom: 2px;
}

.lblInfoConteudo {
    font-size: 1.4rem;
    color: var(--surface-muted);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (min-width: 1200px) and (max-width: 1399px) {
    .divNoArAgora {
        margin-left:0 !important;
    }
}

/* ============================================= */
/* =============== LISTA DE MÚSICAS ============ */
/* ============================================= */

.player-list-group {
    flex-grow: 1;
    /* Ocupa o resto da largura */
    display: flex;
    flex-direction: column;
    justify-content: center;
    /* Centraliza verticalmente */
    font-size: 0.8rem;
}

.player-list-item {
    background-color: transparent;
    color: var(--text-muted);
    border: none;
    border-bottom: 1px solid #333;
    padding: 4px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.player-list-item:last-child {
    border-bottom: none;
}

.player-list-item .song-title {
    color: white;
    font-weight: 600;
    margin-right: 5px;
}

.player-list-item .song-artist {
    font-size: 0.75rem;
    color: var(--surface-muted);
}

.player-list-item .song-time {
    font-size: 0.7rem;
    color: white;
    /* Horário em Vinho */
    font-weight: bold;
}

/* ============================================= */
/* =============== STATUS AO VIVO ============== */
/* ============================================= */

/* Versão Grande (NOVA - Lateral) */
.boxAoVivoLarge {
    width: 150px;
    ;
    /* Largura fixa para destacar */
    height: 100%;
    /* Tenta ocupar a altura total do pai */
    min-height: 80px;
    /* Altura mínima de segurança */
    display: flex;
    /* Texto um embaixo do outro */
    justify-content: center;
    align-items: center;

    background-color: #222;
    /* Cor Desligado (Cinza escuro) */
    color: var(--text-muted);
    /* Texto apagado */
    border: 2px solid #333;
    border-radius: 8px;

    font-weight: 900;
    font-size: 1.4rem;
    line-height: 1.1;
    text-align: center;
    transition: all 0.5s ease;
    margin-right: 15px;
    /* Espaço entre o botão e a lista */
}

/* Estado LIGADO (Ativado pelo JS) */
.boxAoVivoLarge.onAir {
    background-color: var(--tj-primary);
    /* Vinho TJ */
    color: var(--surface);
    border-color: #ff0000;
    /* Borda vermelha viva */
    box-shadow: 0 0 15px rgba(99, 19, 23, 0.8);
    /* Brilho externo */
    animation: pulseLiveLarge 2s infinite;
}

/* ============================================= */
/* =============== ANIMAÇÕES =================== */
/* ============================================= */

/* Pulsação do indicador ON AIR pequeno */
@keyframes pulseLive {
    0%   { box-shadow: 0 0 0 0 rgba(255, 0, 0, 0.4); }
    70%  { box-shadow: 0 0 0 10px rgba(255, 0, 0, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 0, 0, 0); }
}

/* Pulsação do indicador ON AIR grande (lateral) */
@keyframes pulseLiveLarge {
    0%   { transform: scale(1);    box-shadow: 0 0 0 0 rgba(255, 0, 0, 0.4); }
    50%  { transform: scale(1.02); }
    70%  { box-shadow: 0 0 0 10px rgba(255, 0, 0, 0); }
    100% { transform: scale(1);    box-shadow: 0 0 0 0 rgba(255, 0, 0, 0); }
}

/* Pulsação do botão de play ao vivo */
@keyframes pulse-tjminas {
    0%   { box-shadow: 0 0 16px 4px rgba(255, 0, 0, 0.7); }
    70%  { box-shadow: 0 0 32px 12px rgba(255, 0, 0, 0); }
    100% { box-shadow: 0 0 16px 4px rgba(255, 0, 0, 0); }
}

/* Pulsação lenta para o estado de pause ativo */
@keyframes pulse-tjminas-pause {
    0%   { box-shadow: 0 0 16px 4px rgba(255, 0, 0, 0.5), 0 0 0 0 rgba(255, 0, 0, 0.7); }
    60%  { box-shadow: 0 0 32px 12px rgba(255, 0, 0, 0.3), 0 0 0 22px rgba(255, 0, 0, 0); }
    100% { box-shadow: 0 0 16px 4px rgba(255, 0, 0, 0.5), 0 0 0 0 rgba(255, 0, 0, 0); }
}

/* Pulsação do ícone de antena */
@keyframes pulse-antena {
    0%   { box-shadow: 0 0 30px 26px rgba(45, 93, 248, 0.945); }
    70%  { box-shadow: 0 0 100px 50px rgba(255, 0, 0, 0); }
    100% { box-shadow: 0 0 57px 9px rgba(255, 0, 0, 0); }
}

/* ============================================= */
/* =============== ABAS DE CONTEÚDO ============ */
/* ============================================= */
.divConteudos {
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
    max-height: 700px !important;
}

.divConteudos::-webkit-scrollbar {
    display: none;
}

/* Personalização das Abas (Nav Pills) */
.nav-pills .nav-link {
    color: white;
    border: 1px solid white;
    font-weight: 600;
    border-radius: 30px;
    /* Abas arredondadas */
    padding: 10px 25px;
    margin-right: 10px;
    transition: all 0.3s;
}

.nav-pills .nav-link:hover {
    background-color: var(--surface);
    color: var(--tj-primary);
}

.nav-pills .nav-link.active {
    background-color: var(--tj-primary) !important;
    /* Cor Vinho */
    color: var(--surface) !important;
}

/* Estilo do Item de Notícia/Programa */
.news-item {
    transition: transform 0.2s, box-shadow 0.2s;
    border: 3px solid var(--tj-primary) !important;
}

.news-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .15) !important;
}

/* Linha de metadados - duração na sequência do autor */
.metadata-line {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.spanDuracao {
    background: var(--text-muted);
    max-width: 60px !important;
    margin-left: 8px;
    margin-right: 4px;
}

/* Caixa de Data (Quadrada) */
.date-box {
    width: 70px;
    height: 70px;
    background-color: var(--surface-muted);
    border: 2px solid var(--tj-primary);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    line-height: 1;
    color: var(--tj-primary);
}

.date-day {
    font-size: 1.8rem;
    font-weight: 800;
}

.date-month {
    font-size: 0.7rem;
    text-transform: uppercase;
    font-weight: 600;
}

/* Botões de Ação na Lista */
.btn-action-list {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #ddd;
    color: var(--text-muted);
    transition: all 0.2s;
    background: var(--surface);
    margin-bottom: 5px;
}

.btn-action-list:hover {
    background-color: var(--tj-primary);
    color: var(--surface);
    border-color: var(--tj-primary);
}

/* Botões de Ação da Lista - Cores específicas por tipo */
/* Botão Play - Vermelho */
.btn-action-play {
    border: 2px solid #DC143C !important;
    color: #4a4a4a;
}

.btn-action-play:hover {
    background-color: #DC143C;
    color: var(--surface);
}

/* Botão Download - Azul */
.btn-action-list[title="Baixar"] {
    border: 2px solid #1976D2 !important;
    color: #4a4a4a;
}

.btn-action-list[title="Baixar"]:hover {
    background-color: #1976D2;
    color: var(--surface);
}

/* Botão Compartilhar - Verde WhatsApp */
.btn-action-list[title="Compartilhar"] {
    border: 2px solid #25D366 !important;
    color: #4a4a4a;
}

.btn-action-list[title="Compartilhar"]:hover {
    background-color: #25D366;
    color: var(--surface);
}

/* ============================================= */
/* =============== SEÇÃO COMENTÁRIOS =========== */
/* ============================================= */

/* Card principal dos comentários */
.card-comments {
    border: 3px solid var(--tj-primary) !important;
    background-color: var(--surface);
    box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .15);
    height: 100%;
    /* Para alinhar altura com a esquerda se precisar */
}

.card-comments .card-header {
    background-color: var(--surface-muted);
    border-bottom: 2px solid var(--tj-primary);
    color: var(--text);
    font-weight: bold;
}

/* Widget de comentários */
.comments-section {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin: 20px 0;
}

.comments-header h2 {
    font-size: 24px;
    margin-bottom: 20px;
    color: #333;
}

.comments-list {
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 20px;
}

.comment-card {
    background: #f8f9fa;
    border-left: 3px solid #007bff;
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 4px;
}

.comment-name {
    font-weight: bold;
    color: #007bff;
    margin-bottom: 8px;
}

.no-comments {
    text-align: center;
    padding: 40px;
    color: #999;
}

.comments-footer {
    text-align: center;
}

.comment-button {
    background: #dc3545;
    border: none;
    padding: 10px 30px;
    font-size: 16px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
}

.comment-button:hover {
    background: #c82333;
}

/* Balãozinho do Comentário Individual */
.comment-bubble {
    background-color: var(--surface-muted);
    border-left: 4px solid var(--tj-primary);
    /* Detalhe Vinho */
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 4px;
    position: relative;
    transition: transform 0.2s, box-shadow 0.2s, background-color 0.3s;
    /* Altura fixa para uniformizar os cards do carrossel */
    min-height: 180px;
    max-height: 180px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.comment-bubble:hover {
    background-color: #fff0f0;
    /* Leve tom rosado no hover */
    transform: translateY(-2px);
    box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .15) !important;
}

.noticia-author {
    font-weight: 600;
    /* Peso pesado para autor */
    color: var(--text-muted);
}

/* Título dos cards de notícias/programas no modelo lista */
.news-item h6 {
    min-height: 48px;
    line-height: 1.4;
    margin: 4px;
}

.noticia-author,
.author-info {
    margin: 4px;
}

.comment-author {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text);
    display: block;
    margin-bottom: 5px;
}

.comment-text {
    font-size: 0.85rem;
    color: #343a40;
    font-style: italic;
    line-height: 1.4;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
}

.comment-date {
    font-size: 0.7rem;
    color: var(--text-muted);
    display: block;
    margin-top: 5px;
    text-align: right;
}

/* Controles do Carrossel de Comentários */
#carouselComentarios .carousel-control-prev,
#carouselComentarios .carousel-control-next,
#carouselComentariosGrade .carousel-control-prev,
#carouselComentariosGrade .carousel-control-next {
    width: 35px;
    height: 35px;
    background-color: rgba(99, 19, 23, 0.4);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.5;
    transition: all 0.3s ease;
}

#carouselComentarios .carousel-control-prev,
#carouselComentariosGrade .carousel-control-prev {
    left: -12px;
}

#carouselComentarios .carousel-control-next,
#carouselComentariosGrade .carousel-control-next {
    right: -12px;
}

#carouselComentarios .carousel-control-prev:hover,
#carouselComentarios .carousel-control-next:hover,
#carouselComentariosGrade .carousel-control-prev:hover,
#carouselComentariosGrade .carousel-control-next:hover {
    opacity: 0.9;
    background-color: rgba(99, 19, 23, 0.7);
}

#carouselComentarios .carousel-control-prev-icon,
#carouselComentarios .carousel-control-next-icon,
#carouselComentariosGrade .carousel-control-prev-icon,
#carouselComentariosGrade .carousel-control-next-icon {
    width: 18px;
    height: 18px;
}

#carouselComentarios,
#carouselComentariosGrade {
    position: relative;
    padding: 0 20px;
}

#carouselComentarios .carousel-inner,
#carouselComentariosGrade .carousel-inner {
    padding: 10px 0;
}

/* Ajuste dos indicadores do carrossel (bolinhas) para não sobrepor texto */
.carousel-indicators {
    bottom: -40px;
}

.carousel-indicators [data-bs-target] {
    background-color: var(--tj-primary);
}

/* Botão Enviar Comentário */
.btn-enviar-comentario {
    max-width: 216px;
    width: 216px;
    background-color: var(--tj-primary) !important;
    color: var(--surface) !important;
    width: 40%;
    border-radius: 15px !important;
    font-weight: 600 !important;
    transition: all 0.3s !important;
}

.btn-enviar-comentario:hover {
    background-color: var(--tj-primary-dark);
    color: var(--surface);
    transform: translateY(-2px);
}

/* Foco visível consistente e acessível */
button:focus-visible,
.btn-action-list:focus-visible,
.btnPlayer:focus-visible,
.btn-enviar-comentario:focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 2px;
}

/* "Mostrar Mais" e "Enviar Comentário" — foco programático via JS não dispara :focus-visible, usa :focus */
.btn-mostrar-mais:focus,
.btn-mostrar-mais:focus-visible,
.btn-enviar-comentario:focus,
.btn-enviar-comentario:focus-visible {
    outline: 3px solid var(--focus) !important;
    outline-offset: 4px !important;
    box-shadow: none !important;
}

/* Sliders (range) — outline substituído por anel de foco visível */
.inpVolumeStyle:focus-visible,
.modal-timeline-slider:focus-visible,
.modal-volume-slider:focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 3px;
    border-radius: 3px;
}

/* Links — redes sociais, rodapé e quaisquer âncoras interativas */
.socialIcon:focus-visible,
a:focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 2px;
    border-radius: 2px;
    text-decoration: none;
}

/* Skip link (visível apenas ao focar) */
.skip-link {
    position: absolute;
    left: -999px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.skip-link:focus {
    left: 10px;
    top: 10px;
    width: auto;
    height: auto;
    padding: 8px 12px;
    background: var(--tj-primary);
    color: var(--surface);
    z-index: 2000;
    border-radius: 4px;
    text-decoration: none;
}

/* ============================================= */
/* =============== FOOTER ====================== */
/* ============================================= */

/* Footer */
.footer-tj-minas {
    background-color: #1a1a1a;
    color: #bdbdcf;
    padding: 60px 0 0 0;
    margin-top: 60px;
}

.footer-section {
    margin-bottom: 0;
}

.footer-title h2 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #bdbdcf;
    margin-bottom: 25px;
    letter-spacing: 0.3px;
}

.footer-text {
    font-size: 0.9rem;
    line-height: 1.6;
    color: #bdbdcf;
    text-align: justify;
    margin-bottom: 20px;
}

.footer-contact {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

.footer-label {
    color: #00aeff;
    font-weight: 600;
}

.footer-value {
    color: #bdbdcf;
}

.footer-expediente p {
    font-size: 0.9rem;
    line-height: 1.8;
    color: #bdbdcf;
    margin-bottom: 8px;
    font-weight: 500;
}

.footer-address {
    font-style: normal;
}

.footer-link {
    text-decoration: none;
    color: inherit;
}

.footer-link:hover {
    color: #00aeff;
}

/* Copyright Section */
.footer-copyright-section {
    background-color: #242440;
    color: #8F8FB5;
    font-size: 0.75rem;
    padding: 20px 0;
}

.copyright-text {
    color: #8F8FB5;
}

.copyright-text strong {
    font-weight: 600;
}

.copyright-text i {
    color: #ff9900;
    margin: 0 4px;
}

.footer-social {
    display: flex;
    gap: 15px;
    list-style: none;
    padding: 0;
    margin: 0;
    justify-content: flex-end;
}

.footer-social li {
    margin: 0;
}

.footer-social li a {
    color: #8F8FB5;
    font-size: 1.1rem;
    transition: color 0.3s ease;
    text-decoration: none;
}

.footer-social li a:hover {
    color: #00aeff;
}

@media (max-width: 768px) {
    .footer-tj-minas {
        padding: 40px 0;
    }

    .footer-section {
        margin-bottom: 30px;
    }

    .footer-title h2 {
        font-size: 1.1rem;
    }

    .footer-text {
        font-size: 0.85rem;
    }

    .footer-copyright-section {
        text-align: center;
    }

    .footer-social {
        justify-content: center;
        margin-top: 15px;
    }
}

.footer-social {
    display: flex;
    gap: 12px;
}

.footer-social-link {
    color: #e0e0e0;
    font-size: 1rem;
    transition: color 0.3s ease;
    text-decoration: none;
}

.footer-social-link:hover {
    color: #0099ff;
}

@media (max-width: 768px) {
    .footer-tj-minas {
        padding: 25px 15px 15px;
    }

    .footer-section {
        margin-bottom: 15px;
    }

    .footer-title {
        font-size: 1rem;
    }

    .footer-text {
        font-size: 0.8rem;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 15px;
    }

    .footer-social {
        justify-content: center;
    }
}

/* ============================================= */
/* =============== FILTER WIDGET =============== */
/* ============================================= */
.filter-widget {
    position: relative;
    display: inline-block;
    margin-left: auto;
}

.btn-filter-icon {
    background: none;
    border: none;
    color: white !important;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 50%;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
}

.btn-filter-icon i {
    color: white !important;
}

.btn-filter-icon:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: scale(1.1);
}

.btn-filter-icon:focus {
    outline: 2px solid var(--focus);
    outline-offset: 2px;
}

.filter-panel {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 10px;
    background-color: var(--surface);
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1050;
    min-width: 280px;
    overflow: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.filter-panel.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.filter-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background-color: var(--tj-primary);
    color: white;
    border-bottom: 1px solid #ddd;
}

.filter-panel-title {
    font-weight: 600;
    font-size: 0.95rem;
}

.btn-close-filter {
    background: none;
    border: none;
    color: white;
    font-size: 1rem;
    cursor: pointer;
    padding: 4px 8px;
    display: flex;
    align-items: center;
    transition: opacity 0.2s;
}

.btn-close-filter:hover {
    opacity: 0.7;
}

.filter-panel-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.filter-label {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text);
    margin: 0;
}

.filter-panel-footer {
    padding: 12px 16px;
    border-top: 1px solid #ddd;
    display: flex;
    justify-content: flex-end;
    background-color: var(--surface-muted);
}

.filter-panel-footer .btn {
    background-color: var(--tj-primary);
    color: white;
    border: 2px solid var(--tj-primary);
    font-weight: 600;
    padding: 8px 20px;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.filter-panel-footer .btn:hover {
    background-color: #8d191f;
    border-color: #8d191f;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(99, 19, 23, 0.3);
}

/* ============================================= */
/* =============== SEARCH BOX ================== */
/* ============================================= */
.search-filter-container {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-left: auto;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 25px;
    padding: 6px 12px;
    transition: all 0.3s ease;
}

.search-box:focus-within {
    background-color: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.6);
    box-shadow: 0 0 0 3px rgba(255, 212, 79, 0.2);
}

.search-input {
    background: none;
    border: none;
    color: white;
    font-size: 0.9rem;
    padding: 6px 8px;
    outline: none;
    width: 200px;
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.btn-search {
    background: none;
    border: none;
    color: white;
    font-size: 1rem;
    cursor: pointer;
    padding: 4px 8px;
    display: flex;
    align-items: center;
    transition: opacity 0.2s;
    margin-left: 4px;
}

.btn-search:hover {
    opacity: 0.8;
}

.btn-clear-search {
    background: none;
    border: none;
    color: white;
    font-size: 1rem;
    cursor: pointer;
    padding: 4px 8px;
    display: flex;
    align-items: center;
    transition: opacity 0.2s;
    margin-left: 4px;
}

.btn-clear-search:hover {
    opacity: 0.8;
}

.btn-clear-search.hidden {
    display: none;
}

/* Ajuste de posicionamento para resoluções entre 1200px e 1399px */
@media (min-width: 1200px) and (max-width: 1399px) {
    .col-11.d-flex.mb-3 .d-flex.align-items-center.gap-2 {
        display: flex !important;
        margin-left: -80px;
        align-items: center;
        gap: 0.5rem;
    }
}

@media (max-width: 768px) {

    /* Layout mobile: abas em uma linha, busca/filtros abaixo */
    .col-lg-7.d-flex {
        flex-direction: column !important;
        gap: 15px;
    }

    .nav-pills {
        width: 100%;
        margin-bottom: 0 !important;
    }

    .nav-pills .nav-item:first-child .nav-link {
        margin-left: 3px;
    }

    .search-filter-container {
        flex-direction: row;
        gap: 8px;
        width: 100%;
    }

    .search-box {
        flex: 1;
    }

    .search-input {
        width: 100%;
    }
}

/* ============================================= */
/* ======== MODAL MINI PLAYER ================== */
/* ============================================= */
#modalAudioPlayer .modal-content {
    border-radius: 12px;
    overflow: hidden;
}

#modalAudioPlayer .modal-header {
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

#modalAudioPlayer .modal-body {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
}

#modalAudioPlayer #modalPlayerIframe {
    background-color: #000;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

#modalAudioPlayer #modalPlayerTitulo {
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.4;
}

#modalAudioPlayer #btnVoltarAoVivo {
    border-width: 2px;
    font-weight: 500;
    padding: 8px 24px;
    transition: all 0.3s ease;
}

#modalAudioPlayer #btnVoltarAoVivo:hover {
    background-color: var(--tj-primary);
    border-color: var(--tj-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 19, 23, 0.4);
}

@media (max-width: 768px) {
    #modalAudioPlayer .modal-lg {
        max-width: 95%;
        margin: 10px auto;
    }

    #modalAudioPlayer .modal-player-controls {
        flex-direction: column;
        gap: 10px;
    }
}

/* ============================================= */
/* ======== MODAL PLAYER CUSTOMIZADO ========== */
/* ============================================= */

.modal-player-container {
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.modal-player-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
}

.modal-player-btn {
    background: var(--tj-primary);
    border: none;
    color: #fff;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.modal-player-btn:hover {
    background: var(--tj-primary-dark);
    transform: scale(1.1);
}

.modal-player-btn:active {
    transform: scale(0.95);
}

/* Pulso quando o autoplay é bloqueado (política do navegador) */
@keyframes autoplay-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(var(--tj-primary-rgb, 0,102,179), 0.7); transform: scale(1); }
    50%  { box-shadow: 0 0 0 14px rgba(var(--tj-primary-rgb, 0,102,179), 0); transform: scale(1.12); }
    100% { box-shadow: 0 0 0 0 rgba(var(--tj-primary-rgb, 0,102,179), 0); transform: scale(1); }
}
.modal-player-btn.autoplay-pulse {
    animation: autoplay-pulse 1.1s ease-in-out infinite;
}

.modal-player-timeline {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.modal-time-current,
.modal-time-total {
    color: #fff;
    font-size: 0.85rem;
    min-width: 40px;
    text-align: center;
}

.modal-timeline-slider {
    flex: 1;
    height: 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.2);
    outline: none;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

.modal-timeline-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    transition: all 0.2s ease;
}

.modal-timeline-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    background: var(--tj-primary);
}

.modal-timeline-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    transition: all 0.2s ease;
}

.modal-timeline-slider::-moz-range-thumb:hover {
    transform: scale(1.2);
    background: var(--tj-primary);
}

.modal-player-volume {
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-player-volume i {
    color: #fff;
    font-size: 1.1rem;
}

.modal-volume-slider {
    width: 80px;
    height: 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.2);
    outline: none;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

.modal-volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
}

.modal-volume-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.modal-volume-slider::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
}

.modal-volume-slider::-moz-range-thumb:hover {
    transform: scale(1.2);
}

.modal-progress-bar {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
    margin-top: 5px;
}

.modal-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--tj-primary) 0%, #ff6b6b 100%);
    border-radius: 2px;
    transition: width 0.1s linear;
}

/* ============================================= */
/* ====== MODELO 2 - LAYOUT EM GRADE ========== */
/* ============================================= */

/* Botão de Toggle Layout */
#btnToggleLayout {
    border: 2px solid var(--tj-primary);
    color: var(--tj-primary);
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.3s ease;
    background: white;
}

#btnToggleLayout:hover {
    background: var(--tj-primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(99, 19, 23, 0.3);
}

body.light-theme #btnToggleLayout {
    background: #e0e0e0;
    border: 2px solid var(--tj-primary);
}

body.light-theme #btnToggleLayout:hover {
    background: var(--tj-primary);
    color: white;
}

/* Grid customizado com largura fixa de cards */
.grid-container-custom {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: flex-start;
    max-height: calc((350px * 5) + (1rem * 4));
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 8px;
    padding-top: 15px;
}

.grid-container-custom::-webkit-scrollbar {
    width: 8px;
}

.grid-container-custom::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.grid-container-custom::-webkit-scrollbar-thumb {
    background: var(--tj-primary);
    border-radius: 4px;
}

.grid-container-custom::-webkit-scrollbar-thumb:hover {
    background: #8d191f;
}

.grid-container-custom>.col {
    flex: 0 0 auto;
    width: 246px;
    min-width: 246px;
    max-width: 246px;
}

/* Largura mínima do card entre 994px e 1994px de largura de tela */
@media (min-width: 992px) and (max-width: 1994px) {
    .grid-container-custom>.col {
        width: 280px;
        min-width: 280px;
        max-width: 280px;
    }
}

/* 5 cards por linha para resoluções maiores que 1400px */
@media (min-width: 1400px) {
    .grid-container-custom>.col {
        width: calc(20% - 0.8rem);
        min-width: calc(20% - 0.8rem);
        max-width: calc(20% - 0.8rem);
    }

    .divFiltrosBusca {
        padding-left: 3rem !important;
    }
}

/* 4 cards por linha entre 1200px e 1399px */
@media (min-width: 1200px) and (max-width: 1399px) {
    .grid-container-custom {
        justify-content: flex-start;
    }

    .grid-container-custom>.col {
        width: calc(25% - 0.75rem);
        min-width: calc(25% - 0.75rem);
        max-width: calc(25% - 0.75rem);
    }
}

/* Responsividade para tablets e dispositivos menores */
@media (min-width: 768px) and (max-width: 991px) {
    .grid-container-custom {
        gap: 0.8rem;
        justify-content: center;
    }

    .grid-container-custom>.col {
        width: calc(50% - 0.8rem);
        min-width: 240px;
        max-width: calc(50% - 0.8rem);
    }
}

/* Responsividade para tablets pequenos */
@media (min-width: 576px) and (max-width: 767px) {
    .grid-container-custom {
        gap: 0.8rem;
        justify-content: center;
    }

    .grid-container-custom>.col {
        width: calc(50% - 0.8rem);
        min-width: 200px;
        max-width: calc(50% - 0.8rem);
    }
}

/* Responsividade para celulares */
@media (max-width: 575px) {
    .grid-container-custom {
        gap: 1rem;
        justify-content: center;
    }

    .grid-container-custom>.col {
        width: 100%;
        min-width: 100%;
        max-width: 100%;
    }
}

/* Card de Notícia/Programa em Grade */
.grid-item-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    height: 100%;
    display: flex;
    flex-direction: column;
    border: 2px solid transparent;
    width: 100%;
    padding: 5px;
}

.grid-item-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 15px rgba(99, 19, 23, 0.3);
    border-color: var(--tj-primary);
}

/* Imagem do Card */
.grid-item-image {
    width: 100%;
    height: 140px;
    object-fit: cover;
    background-color: #f0f0f0;
}

.grid-item-image-container {
    position: relative;
    width: 100%;
    height: 140px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--tj-primary) 0%, #8d191f 100%);
}

/* Badge de Data no Card - Estilo igual ao modelo em linha */
.grid-date-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    width: 60px;
    height: 60px;
    background-color: var(--surface-muted);
    border: 2px solid var(--tj-primary);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    line-height: 1;
    color: var(--tj-primary);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.grid-date-day {
    font-size: 1.5rem;
    font-weight: 800;
}

.grid-date-month {
    font-size: 0.6rem;
    text-transform: uppercase;
    font-weight: 600;
}

/* Placeholder de Categoria quando não há imagem */
.categoria-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.categoria-image-placeholder i {
    font-size: 4rem;
    color: rgba(255, 255, 255, 0.9);
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.2));
}

.grid-item-image-container.categoria-placeholder {
    background: none !important;
}

/* Badge de Categoria */
.grid-categoria-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 3px 8px;
    border-radius: 20px;
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(4px);
    z-index: 2;
}

.grid-categoria-badge i {
    font-size: 0.9rem;
}

.grid-categoria-badge span {
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Conteúdo do Card */
.grid-item-body {
    padding: 12px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.grid-item-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: #333;
    margin: 4px 4px 6px 4px;
    line-height: 1.3;
    min-height: 55px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.grid-item-meta {
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    width: 100%;
    justify-content: space-between;
}

.grid-item-author {
    font-size: 0.7rem;
    color: #666;
    display: inline-flex;
    align-items: center;
    margin: 4px;
}

.grid-item-author i {
    margin-right: 4px;
    color: var(--tj-primary);
    font-size: 0.7rem;
}

.grid-item-description {
    font-size: 0.75rem;
    color: #555;
    line-height: 1.4;
    margin-bottom: 10px;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Footer do Card com Botões - DESIGN PREMIUM */
.grid-item-footer {
    padding-top: 20px;
    border-top: 2px solid rgba(99, 19, 23, 0.1);
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
}

/* ============================================= */
/* BOTÃO PRINCIPAL HERO - DESTAQUE MÁXIMO */
/* ============================================= */
.grid-btn-hero {
    width: 100%;
    padding: 14px 24px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border: none;
    background: linear-gradient(135deg, #DC143C 0%, #A01010 100%);
    color: white;
    font-weight: 700;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(220, 20, 60, 0.35);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.grid-btn-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s ease;
}

.grid-btn-hero:hover::before {
    left: 100%;
}

.grid-btn-hero:hover {
    background: linear-gradient(135deg, #FF1744 0%, #DC143C 100%);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 10px 30px rgba(220, 20, 60, 0.5);
}

.grid-btn-hero:active {
    transform: translateY(-1px) scale(0.98);
}

.grid-btn-hero .btn-icon {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.grid-btn-hero:hover .btn-icon {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(360deg) scale(1.1);
}

.grid-btn-hero .btn-icon i {
    font-size: 1rem;
    margin-left: 2px;
}

.grid-btn-hero .btn-text {
    font-weight: 700;
    letter-spacing: 1px;
}

/* ============================================= */
/* BOTÕES SECUNDÁRIOS - DESIGN MODERNO */
/* ============================================= */
.grid-actions-secondary {
    display: flex;
    gap: 8px;
    justify-content: space-between;
}

.grid-btn-secondary {
    flex: 1;
    padding: 10px 16px;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: 2px solid;
    background: white;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.grid-btn-secondary i {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
    z-index: 1;
    position: relative;
}

.grid-btn-secondary .btn-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 1;
    position: relative;
}

.grid-btn-secondary::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.4s ease, height 0.4s ease;
}

.grid-btn-secondary:hover::before {
    width: 200%;
    height: 200%;
}

.grid-btn-secondary:hover i {
    transform: translateY(-3px) scale(1.15);
}

.grid-btn-secondary:active {
    transform: scale(0.95);
}

/* Botão Download - Azul Moderno */
.btn-download-audio {
    border-color: #1976D2;
    color: #1976D2;
}

.btn-download-audio::before {
    background: #1976D2;
}

.btn-download-audio:hover {
    border-color: #1565C0;
    color: white;
    box-shadow: 0 6px 20px rgba(25, 118, 210, 0.3);
}

/* Botão Compartilhar - Verde WhatsApp */
.btn-compartilhar {
    border-color: #25D366;
    color: #25D366;
}

.btn-compartilhar::before {
    background: #25D366;
}

.btn-compartilhar:hover {
    border-color: #20BA5A;
    color: white;
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.3);
}

/* Estado Loading dos Botões */
.grid-btn-hero.loading,
.grid-btn-secondary.loading {
    pointer-events: none;
    opacity: 0.7;
}

.grid-btn-hero.loading .btn-icon i,
.grid-btn-secondary.loading i {
    animation: spinLoader 0.8s linear infinite;
}

@keyframes spinLoader {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Classes removidas para usar estilo unificado */
.grid-btn-primary,
.grid-btn-outline {
    /* Estilos herdados de .grid-btn */
}

/* Ajuste dos comentários em modo grade */
#modelo-grade .card-comments {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

#modelo-grade .card-comments .card-header {
    font-size: 1.3rem;
    padding: 20px;
}

/* ============================================= */
/* RESPONSIVIDADE DOS BOTÕES DO GRID */
/* ============================================= */

/* Mobile - Menor que 576px */
@media (max-width: 575px) {
    .grid-btn-hero {
        padding: 12px 18px;
        font-size: 0.85rem;
        gap: 8px;
    }

    .grid-btn-hero .btn-icon {
        width: 28px;
        height: 28px;
    }

    .grid-btn-hero .btn-icon i {
        font-size: 0.85rem;
    }

    .grid-btn-secondary {
        padding: 8px 12px;
        gap: 4px;
    }

    .grid-btn-secondary i {
        font-size: 1rem;
    }

    .grid-btn-secondary .btn-label {
        font-size: 0.65rem;
    }

    .grid-actions-secondary {
        gap: 6px;
    }
}

/* Tablet - 576px a 767px */
@media (min-width: 576px) and (max-width: 767px) {
    .grid-btn-hero {
        padding: 13px 20px;
        font-size: 0.9rem;
        gap: 10px;
    }

    .grid-btn-hero .btn-icon {
        width: 30px;
        height: 30px;
    }

    .grid-btn-hero .btn-icon i {
        font-size: 0.9rem;
    }

    .grid-btn-secondary {
        padding: 9px 14px;
    }

    .grid-btn-secondary i {
        font-size: 1.1rem;
    }

    .grid-btn-secondary .btn-label {
        font-size: 0.68rem;
    }
}

/* Tablet Landscape - 768px a 991px */
@media (min-width: 768px) and (max-width: 991px) {
    .grid-btn-hero {
        padding: 13px 22px;
        font-size: 0.95rem;
    }

    .grid-btn-secondary {
        padding: 10px 15px;
    }
}

/* Desktop Pequeno - 992px a 1199px */
@media (min-width: 992px) and (max-width: 1199px) {
    .grid-item-footer {
        gap: 14px;
    }

    .grid-actions-secondary {
        gap: 10px;
    }
}

/* Desktop Grande - 1200px ou mais */
@media (min-width: 1200px) {
    .grid-btn-hero:hover {
        transform: translateY(-4px) scale(1.03);
    }

    .grid-btn-secondary:hover i {
        transform: translateY(-4px) scale(1.2);
    }
}

/* Modo claro - Cards em Grade */
body.light-theme .grid-item-card {
    background-color: #e0e0e0;
    border: 3px solid var(--tj-primary);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

body.light-theme .grid-item-card:hover {
    box-shadow: 0 8px 20px rgba(99, 19, 23, 0.4);
}

body.light-theme .grid-item-title,
body.light-theme .grid-item-description {
    color: #000;
}

body.light-theme .grid-item-author {
    color: #333;
}

body.light-theme .categoria-image-placeholder i {
    color: rgba(255, 255, 255, 0.95);
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

body.light-theme .grid-categoria-badge {
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.35);
}

/* ============================================= */
/* ======== MODAL DE COMPARTILHAMENTO ========== */
/* ============================================= */
#modalCompartilhar .modal-content {
    border-radius: 15px;
    border: none;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

#modalCompartilhar .modal-header {
    background: linear-gradient(135deg, #631317 0%, #8d191f 100%);
    color: white;
    border-radius: 15px 15px 0 0;
    padding: 20px 25px;
    border-bottom: none;
}

#modalCompartilhar .modal-title {
    font-weight: 600;
    font-size: 1.3rem;
}

#modalCompartilhar .btn-close {
    filter: brightness(0) invert(1);
    opacity: 0.8;
}

#modalCompartilhar .btn-close:hover {
    opacity: 1;
}

#modalCompartilhar .modal-body {
    padding: 30px 25px;
}

#modalCompartilhar .modal-body p {
    color: #495057;
    font-size: 1rem;
}

/* Bot�es de compartilhamento */
.btn-share {
    padding: 15px 20px;
    font-size: 1.1rem;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.btn-share i {
    font-size: 1.3rem;
}

.btn-share:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    color: white;
}

.btn-share:active {
    transform: translateY(0);
}

/* WhatsApp */
.btn-whatsapp {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
}

.btn-whatsapp:hover {
    background: linear-gradient(135deg, #128C7E 0%, #075E54 100%);
}

/* Facebook */
.btn-facebook {
    background: linear-gradient(135deg, #1877F2 0%, #0C63D4 100%);
}

.btn-facebook:hover {
    background: linear-gradient(135deg, #0C63D4 0%, #0952B8 100%);
}

/* Twitter */
.btn-twitter {
    background: linear-gradient(135deg, #1DA1F2 0%, #0C85D0 100%);
}

.btn-twitter:hover {
    background: linear-gradient(135deg, #0C85D0 0%, #0A6FB5 100%);
}

/* Modo claro - Modal */
body.light-theme #modalCompartilhar .modal-content {
    background-color: #ffffff;
}

body.light-theme #modalCompartilhar .modal-body p {
    color: #212529;
}

/* Anima��o de abertura do modal */
#modalCompartilhar.fade .modal-dialog {
    transition: transform 0.3s ease-out;
}

#modalCompartilhar.show .modal-dialog {
    transform: none;
}

/* Responsividade */
@media (max-width: 576px) {
    #modalCompartilhar .modal-body {
        padding: 25px 20px;
    }
    
    .btn-share {
        padding: 12px 15px;
        font-size: 1rem;
    }
    
    .btn-share i {
        font-size: 1.1rem;
    }
    
    #modalCompartilhar .modal-title {
        font-size: 1.1rem;
    }
}

/* ============================================= */
/* =============== VLIBRAS ==================== */
/* ============================================= */

/* Garante que o widget VLibras fique acima de todos os elementos */
[vw] .vw-plugin-top-wrapper {
    z-index: 9999 !important;
}

[vw] [vw-access-button] {
    z-index: 9999 !important;
}
