/* CSS - novo-layout.css - Ajustado para Bootstrap */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap');

/* Padrões do Body */
body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f4f4f4;
    height: 0px !important;
}

/* O Bootstrap usa .container ou .container-fluid, mas podemos aplicar estilos ao #geral se necessário */
#geral {
    background-color: #fff;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* O cabeçalho pode precisar de padding customizado */
#cabecalho {
    padding: 15px;
    padding-bottom: 0;
}

/* A barra de menu agora é controlada pelo componente navbar do Bootstrap.
   A div #menu_bar que a envolve no index.php pode ser zerada para não interferir. */
#menu_bar {
    padding: 0;
}

/* Ajustes no contêiner de conteúdo principal */
#conteudo {
    padding: 0px 0px;
    flex-grow: 1; /* Faz o conteúdo crescer para empurrar o rodapé para baixo */
}

/* Slideshow Responsivo */
#slideshow, #slideshow img {
    width: 100%;
    height: auto;
}

/* Estilizando os cards de notícias (agora colunas do Bootstrap) */
.borda-news {
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 15px;
    background-color: #fff;
    transition: box-shadow 0.3s ease;
    height: 100%; /* Faz com que todos os cards na mesma linha tenham a mesma altura */
}

.borda-news:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* Estrutura do Card de Notícia */
.card-image {
    margin-bottom: 15px;
}

.card-image img {
    width: 100%;
    height: auto;
    border-radius: 5px;
}

.card-body {
    flex-grow: 1;
}

.card-footer {
    padding-top: 10px;
    margin-top: 15px; /* Mantém espaço mesmo se o mt-auto não funcionar */
    border-top: 1px solid #eee;
    background-color: #f9f9f9;
    /* Alinhar o conteúdo do rodapé à direita */
    text-align: right;
    /* Adicionar padding para não colar nas bordas */
    padding: 10px 15px;
    /* Ajuste de margem para compensar o padding do .borda-news */
    margin-left: -15px;
    margin-right: -15px;
    margin-bottom: -15px;
    border-bottom-left-radius: 5px;
    border-bottom-right-radius: 5px;
}

.titulo-noticia {
    font-size: 1.2rem;
    font-weight: bold;
    color: #3498db; /* Azul personalizado */
    margin-bottom: 10px;
}

.corpo-noticia {
    font-size: 1rem;
    text-align: justify;
}

/* Botões primários (garantir azul consistente) */
.btn.btn-primary,
.leia-mais.btn.btn-primary {
    background-color: #0078CF !important;
    border-color: #0078CF !important;
    color: #FFFFFF !important;
    background-image: none !important;
    box-shadow: none !important;
}
.btn.btn-primary:hover,
.leia-mais.btn.btn-primary:hover {
    background-color: #007ead !important;
    border-color: #007ead !important;
    background-image: none !important;
    box-shadow: none !important;
}
/* Reforço de especificidade para páginas principais e cards */
.borda-news .btn.btn-primary,
.card-footer .btn.btn-primary,
.titulo-noticia .btn.btn-primary,
a.btn.btn-primary {
    background-color: #0078CF !important;
    border-color: #0078CF !important;
    color: #FFFFFF !important;
    background-image: none !important;
    box-shadow: none !important;
}
/* Se jQuery UI aplicar estados, mantém azul */
.btn.btn-primary.ui-state-default,
.leia-mais.btn.btn-primary.ui-state-default,
.ui-widget a.btn.btn-primary {
    background-color: #0078CF !important;
    border-color: #0078CF !important;
    color: #FFFFFF !important;
    background-image: none !important;
    box-shadow: none !important;
}

/*
A div #rodape que envolve o include do rodape3.php pode ser zerada,
pois o novo rodapé tem seu próprio contêiner e cor de fundo.
*/
#rodape {
    padding: 0;
    border: none;
    background: none;
}

/* Botão "Voltar ao topo" */
#toTop {
	position:			fixed;
	display:			none;
	padding:			10px;
	bottom:				20px;
	right:				20px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    z-index: 1000;
}

#toTop:hover {
    background-color: #2980b9;
}
.ui-widget-overlay {
    background: rgba(0,0,0,0.85);
}
.lightbox-dialog.ui-dialog {
    padding: 0;
    border: none;
    background: transparent;
}
.lightbox-dialog .ui-dialog-titlebar {
    display: none;
}
.lightbox-dialog .ui-dialog-content {
    padding: 0;
}
.lightbox-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.lightbox-image {
    max-width: 90vw;
    height: auto;
    max-height: 80vh;
    border: none;
}
.lightbox-caption {
    max-width: 90vw;
    color: #fff;
    padding: 12px;
    text-align: left;
}
.lightbox-caption h3 {
    margin: 0 0 8px;
    color: #fff;
    font-size: 1.25rem;
}
.gallery-grid .gallery-card {
    position: relative;
    display: block;
    border-radius: 8px;
    overflow: hidden;
}
.gallery-grid .gallery-thumb {
    width: 100%;
    height: auto;
    display: block;
}
.gallery-grid .gallery-overlay {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 10px 12px;
    color: #fff;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
}
.gallery-grid .gallery-card:hover .gallery-overlay {
    background: linear-gradient(transparent, rgba(0,0,0,0.85));
}
.js-gallery-ready #thumbs ul.thumbs {
    display: none;
}
.modal-backdrop.show {
    opacity: 0.85;
}
.gallery-modal-nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
}
.gallery-prev, .gallery-next {
    position: absolute;
    background: rgba(0,0,0,0.4);
    color: #fff;
    border: none;
    padding: 10px 14px;
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
    border-radius: 4px;
}
.gallery-prev { left: 10px; }
.gallery-next { right: 10px; }
.gallery-prev.disabled, .gallery-next.disabled {
    opacity: 0.3;
    cursor: default;
    pointer-events: none;
}
.gallery-modal-image {
    max-width: 90vw;
    max-height: 80vh;
}
.lightbox-nav {
    position: relative;
    width: 100%;
}
.lightbox-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.4);
    color: #fff;
    border: none;
    padding: 10px 14px;
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
    border-radius: 4px;
}
.lightbox-btn.prev { left: 10px; }
.lightbox-btn.next { right: 10px; }
.lightbox-btn.disabled {
    opacity: 0.3;
    cursor: default;
    pointer-events: none;
}
.lightbox-loading {
    color: #fff;
    padding: 8px;
}
#thumbs ul.thumbs {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}
#thumbs ul.thumbs li {
    margin: 0;
}
#thumbs ul.thumbs a.thumb {
    display: block;
    border: none;
}
#thumbs ul.thumbs img {
    width: 100%;
    height: auto;
    border-radius: 6px;
}
#thumbs .caption {
    padding: 8px 2px;
}
#thumbs .image-title {
    font-weight: 700;
    color: #333;
    margin-bottom: 4px;
}
#thumbs .image-desc {
    font-size: 0.95rem;
    color: #444;
}
