/* ============================================
   BREADCRUMB COMPACTO
   ============================================ */
.news-page-header {
    background: var(--bs-light-bg-subtle, #f8f9fa);
    border-bottom: 1px solid var(--bs-border-color, #dee2e6);
    padding: 0.75rem 0;
}

.news-breadcrumb ol {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex-wrap: wrap;
}

.news-breadcrumb li a {
    color: var(--tenant-primary);
    text-decoration: none;
    font-size: 0.85rem;
}

.news-breadcrumb li a:hover {
    text-decoration: underline;
}

.news-breadcrumb li[aria-current="page"] span {
    color: var(--bs-secondary-color, #6c757d);
    font-size: 0.85rem;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    max-width: 300px;
}

.news-breadcrumb .sep {
    color: var(--bs-border-color, #dee2e6);
    font-size: 0.7rem;
}

/* ============================================
   IMAGEM DE CAPA
   ============================================ */
.news-article__cover {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    max-height: 400px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.news-article__cover-img {
    width: 100%;
    height: 100%;
    max-height: 400px;
    object-fit: cover;
    display: block;
}

/* ============================================
   METADADOS DO ARTIGO
   ============================================ */
.news-article__meta {
    color: #6c757d;
    font-size: 0.85rem;
}

.news-article__date,
.news-article__author,
.news-article__category {
    display: inline-flex;
    align-items: center;
}

/* ============================================
   CORPO DO ARTIGO
   ============================================ */
.news-article__body {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #212529;
    overflow: hidden;
}

.news-article__body h2,
.news-article__body h3,
.news-article__body h4 {
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
    color: #1a1a2e;
}

.news-article__body p {
    margin-bottom: 1rem;
}

.news-article__body img {
    max-width: 100%;
    height: auto;
    border-radius: 0.75rem;
    margin: 1.5rem 0;
}

/* ============================================
   SIDEBAR
   ============================================ */
.news-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    position: sticky;
    top: 1.5rem;
}

.sidebar-widget {
    border: 1px solid var(--bs-border-color, #dee2e6);
    border-radius: 12px;
    background: var(--bs-body-bg, #fff);
}

.sidebar-widget-title {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--bs-secondary-color, #6c757d);
    padding: 0.75rem 1rem;
    margin: 0;
    border-bottom: 1px solid var(--bs-border-color, #dee2e6);
    background: var(--bs-light-bg-subtle, #f8f9fa);
    border-radius: 11px 11px 0 0;
}

.sidebar-widget > .sidebar-news-list:last-child {
    border-radius: 0 0 11px 11px;
}

.sidebar-widget > .d-flex {
    padding: 0.75rem 1rem;
}



.sidebar-news-list {
    display: flex;
    flex-direction: column;
}

.sidebar-news-item {
    border-bottom: 1px solid var(--bs-border-color, #dee2e6);
}

.sidebar-news-item:last-child {
    border-bottom: none;
}

.sidebar-news-link {
    display: flex;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    text-decoration: none;
    color: inherit;
    transition: background 0.12s;
}

.sidebar-news-link:hover {
    background: var(--bs-light-bg-subtle, #f8f9fa);
}

.sidebar-news-thumb {
    width: 70px;
    height: 70px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
}

.sidebar-news-thumb--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bs-light-bg-subtle, #f8f9fa);
    color: var(--bs-secondary-color, #6c757d);
    font-size: 1.5rem;
}

.sidebar-news-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sidebar-news-info {
    flex: 1;
    min-width: 0;
}

.sidebar-news-title {
    font-size: 0.85rem;
    font-weight: 600;
    margin: 0 0 0.25rem;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.sidebar-news-date {
    font-size: 0.72rem;
    color: var(--bs-secondary-color, #6c757d);
}

/* ============================================
   CARDS RELACIONADOS (rodapé do artigo)
   ============================================ */
.related-card {
    border: 1px solid var(--bs-border-color, #dee2e6);
    border-radius: 10px;
    overflow: hidden;
    background: var(--bs-body-bg, #fff);
    transition: box-shadow 0.15s;
}

.related-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.related-card-img-link {
    display: block;
    width: 100%;
    height: 140px;
    overflow: hidden;
}

.related-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.related-card-img-placeholder {
    width: 100%;
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bs-light-bg-subtle, #f8f9fa);
    color: var(--bs-secondary-color, #6c757d);
    font-size: 2rem;
}

.related-card-body {
    padding: 0.75rem;
}

.related-card-title {
    font-size: 0.85rem;
    font-weight: 600;
    margin: 0 0 0.25rem;
    line-height: 1.35;
}

.related-card-title a {
    color: var(--bs-body-color, #212529);
    text-decoration: none;
}

.related-card-title a:hover {
    color: var(--tenant-primary);
}

.related-card-excerpt {
    font-size: 0.75rem;
    color: var(--bs-secondary-color, #6c757d);
    margin: 0 0 0.25rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-card-date {
    font-size: 0.7rem;
    color: var(--bs-secondary-color, #6c757d);
}

@media (max-width: 991px) {
    .news-sidebar { position: static; }
}

/* ============================================
   RESPONSIVE TABLES — content-rich-viewer
   ============================================ */
.content-rich-viewer table,
.content-rich-viewer .table-wrapper {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* ============================================
   GALERIA DE IMAGENS
   ============================================ */
.news-article__gallery {
    border-top: 1px solid var(--bs-border-color, #dee2e6);
}

.news-gallery__grid {
    margin-top: 0.5rem;
}

.news-gallery__img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    display: block;
    border-radius: 8px;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.news-gallery__link {
    display: block;
    width: 100%;
    border: 2px solid transparent;
    background: none;
    padding: 0;
    cursor: pointer;
    border-radius: 8px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.news-gallery__link:hover .news-gallery__img {
    transform: scale(1.03);
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.news-gallery__link:hover,
.news-gallery__link:focus-visible {
    border-color: var(--tenant-primary, #1075ad);
}

.news-gallery__link:focus-visible {
    outline: 2px solid var(--tenant-primary, #1075ad);
    outline-offset: 2px;
    border-radius: 8px;
}

/* ============================================
   MODAL DA GALERIA
   ============================================ */
#newsGalleryModal .modal-content {
    background: #1a1a2e;
    border: none;
}

#newsGalleryModal .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}

.news-gallery-modal__figure {
    padding: 2rem 4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
}

.news-gallery-modal__img {
    max-width: 100%;
    max-height: 78vh;
    object-fit: contain;
    border-radius: 6px;
}

.news-gallery-modal__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1050;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s;
    color: #fff;
    font-size: 1.5rem;
}

.news-gallery-modal__nav:hover,
.news-gallery-modal__nav:focus-visible {
    background: rgba(255, 255, 255, 0.3);
    outline: none;
}

.news-gallery-modal__nav--prev {
    left: 10px;
}

.news-gallery-modal__nav--next {
    right: 10px;
}

.news-gallery-modal__counter {
    position: absolute;
    bottom: 10px;
    right: 16px;
    color: #aaa;
    font-size: 0.8rem;
    z-index: 1050;
}

@media (max-width: 768px) {
    .news-gallery-modal__nav {
        width: 36px;
        height: 36px;
        font-size: 1.1rem;
    }
    .news-gallery-modal__nav--prev { left: 4px; }
    .news-gallery-modal__nav--next { right: 4px; }
    .news-gallery-modal__img {
        max-height: 60vh;
    }
}
