/*
Theme Name: tema REDE DDD BRASIL - Widgets 3 Colunas
Theme URI: https://www.rededddbrasil.com.br/
Author: REDE DDD BRASIL
Author URI: https://www.rededddbrasil.com.br/
Description: Um tema de largura total com grid de colunas personalizável e sliders de categoria com widgets de 3 colunas.
Version: 3.1
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: temaredebrasil
*/

/* Reset Básico e Layout Full-Width */
body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #ffffff;
    color: #1c1e21;
    overflow-x: hidden; /* Medida de segurança contra transbordamento */
}

.container {
    width: 100%;
    padding: 0 15px;
    box-sizing: border-box;
}

/* --- ESTILOS DO CABEÇALHO --- */
.site-header {
    background-color: #ffffff;
    padding: 20px 15px;
    border-bottom: 1px solid #ddd;
}

.site-branding {
    font-size: 1.5em;
    font-weight: bold;
}
.site-branding a {
    text-decoration: none;
    color: #1c1e21;
}

/* --- ESTILOS DO BANNER SLIDER (CARROSSEL) --- */
.main-banner-slider {
    width: 100%;
    background-color: #f7f7f7; /* Um fundo levemente cinza para a área do slider */
    position: relative;
    padding: 20px 15px;
    box-sizing: border-box;
}

#main-banner {
    width: 100%;
    height: auto;
}

#main-banner .swiper-slide {
    height: auto;
    background: none;
    /* Adicionado para garantir que todos os cards tenham a mesma altura */
    display: flex;
    flex-direction: column;
}

.slide-column {
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    overflow: hidden;
    background: #fff;
    border: 1px solid #e7e7e7;
    border-radius: 4px;
    transition: box-shadow 0.3s ease;
}

.slide-column:hover {
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.slide-link {
    display: flex;
    flex-direction: column; /* Organiza imagem e texto verticalmente */
    width: 100%;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

/* ALTERAÇÃO: Estilos da imagem, agora separada */
.slide-image {
    width: 100%;
    padding-top: 56.25%; /* Proporção 16:9 */
    background-size: cover;
    background-position: center;
    order: 1;
}

/* ALTERAÇÃO: Estilos do conteúdo, agora separado */
.slide-content {
    order: 2;
    padding: 15px;
    flex-grow: 1; /* Garante que os cards tenham a mesma altura */
    color: #333;
}

.slide-category {
    display: inline-block;
    background-color: #28a745;
    color: #fff;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.7em;
    font-weight: bold;
    margin-bottom: 10px;
    text-transform: uppercase;
}

/* ALTERAÇÃO: Cor do título */
.slide-title {
    font-size: 1.1em;
    line-height: 1.3;
    margin: 0 0 8px 0;
    font-weight: 600;
    color: #111; /* Cor escura para o título */
}

/* ALTERAÇÃO: Cor do resumo */
.slide-excerpt {
    font-size: 0.9em;
    line-height: 1.4;
    margin: 0;
    color: #555; /* Cor cinza para o resumo */
}

#main-banner .swiper-button-next,
#main-banner .swiper-button-prev {
    color: #333;
    background-color: rgba(255,255,255,0.9);
    border: 1px solid #e7e7e7;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

#main-banner .swiper-button-next:hover,
#main-banner .swiper-button-prev:hover {
    background-color: #fff;
}

#main-banner .swiper-button-next::after,
#main-banner .swiper-button-prev::after {
    font-size: 16px;
    font-weight: bold;
}

#main-banner .swiper-pagination {
    bottom: 5px;
    position: relative;
    padding-top: 20px;
}

#main-banner .swiper-pagination-bullet {
    background: #ccc;
    opacity: 0.8;
    width: 10px;
    height: 10px;
}

#main-banner .swiper-pagination-bullet-active {
    opacity: 1;
    background: #28a745;
}

/* ESTILOS: ABAS DE CATEGORIAS */
.category-tabs-nav {
    border-bottom: 2px solid #e7e7e7;
    margin-bottom: 30px;
    padding: 0 15px;
}

.category-tabs-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.category-tabs-nav li a {
    display: block;
    padding: 10px 20px;
    text-decoration: none;
    color: #555;
    font-weight: 600;
    font-size: 0.9em;
    border-radius: 5px 5px 0 0;
    margin-bottom: -2px;
    border: 2px solid transparent;
    transition: all 0.2s ease-in-out;
}

.category-tabs-nav li a:hover {
    color: #111;
    background-color: #f0f0f0;
}

/* --- ESTILOS DO CONTEÚDO PRINCIPAL (GRID DA HOME) --- */
.main-content {
    display: grid;
    gap: 15px;
    padding-top: 20px;
    padding-bottom: 20px;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

/* --- ESTILOS PARA O GRID DE POSTS (CARD) --- */
.post-item {
    background-color: #fff;
    border: 1px solid #ddd;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.post-link-wrapper {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.post-thumbnail {
    width: 100%;
    height: 183px; /* Nova altura fixa */
    background-color: #eee;
    position: relative; /* Essencial para o posicionamento do overlay */
    overflow: hidden;
}

.post-thumbnail img {
    width: 100%;
    height: 100%; /* Força a imagem a preencher a altura do container */
    object-fit: cover;
    transition: transform 0.3s ease;
}

.post-item:hover .post-thumbnail img {
    transform: scale(1.05);
}

.post-category-tag {
    position: absolute;
    top: 10px;
    left: 10px;
    transform: none;
    background-color: #dc3545;
    color: #fff;
    padding: 5px 10px;
    border-radius: 50px;
    font-size: 0.63em;
    font-weight: bold;
    text-transform: uppercase;
    z-index: 2;
    white-space: nowrap;
    opacity: 1;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

.post-text-content {
    padding: 15px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.post-item .post-title {
    color: #0073aa;
    margin: 0 0 10px 0;
    padding: 0;
    font-size: 1.2em;
    line-height: 1.3;
    font-weight: 600;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

.post-item .post-title a {
    text-decoration: none;
    color: inherit;
}

.post-excerpt {
    font-size: 0.9em;
    color: #555;
    line-height: 1.5;
    margin: 0;
    flex-grow: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

/* --- ESTILOS PARA O SLIDER NO CONTEÚDO --- */
.incontent-slider-wrapper {
    padding: 30px 15px;
    margin: 20px 0;
    background-color: #f7f7f7;
    border-top: 1px solid #e7e7e7;
    border-bottom: 1px solid #e7e7e7;
    grid-column: 1 / -1;
    position: relative;
    box-sizing: border-box;
}

.swiper.incontent-slider {
    overflow: visible;
}

.incontent-slider .swiper-slide {
    height: auto;
}

.incontent-slide-item {
    text-align: center;
}

.incontent-slide-title {
    font-size: 1em;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
    height: 2.4em;
    line-height: 1.2em;
    overflow: hidden;
}

.incontent-slider .slide-image {
    width: 100%;
    padding-top: 100%;
    background-size: cover;
    background-position: center;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    margin: 0 auto;
}

.incontent-slider .slide-content {
    display: none;
}

.incontent-slider-wrapper .swiper-pagination {
    position: static;
    margin-top: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.incontent-slider-wrapper .swiper-pagination-bullet {
    width: 10px;
    height: 10px;
    display: inline-block;
    border-radius: 50% !important;
    background: #bbb;
    opacity: 1;
    margin: 0 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.incontent-slider-wrapper .swiper-pagination-bullet-active {
    background: #333;
}

.incontent-slider-wrapper .swiper-button-next,
.incontent-slider-wrapper .swiper-button-prev {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    z-index: 10;
    cursor: pointer;
    background-color: rgba(255, 255, 255, 0.8);
    color: #333;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background-color 0.3s ease;
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

.incontent-slider-wrapper .swiper-button-next:hover,
.incontent-slider-wrapper .swiper-button-prev:hover {
    background-color: #fff;
}

.incontent-slider-wrapper .swiper-button-next::after,
.incontent-slider-wrapper .swiper-button-prev::after {
    font-size: 16px;
    font-weight: bold;
}

.incontent-slider-wrapper .swiper-button-prev {
    left: 15px;
}

.incontent-slider-wrapper .swiper-button-next {
    right: 15px;
}

/* --- ESTILOS PARA A PÁGINA DE POST INDIVIDUAL (single.php) --- */
.single-post-grid-container {
    display: grid;
    grid-template-columns: 280px 1fr 280px;
    gap: 30px;
    max-width: 1400px;
    margin: 30px auto;
    padding: 0 15px;
}

.main-content-single {
    max-width: 100%;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
    border: none;
    box-shadow: none;
}

.sidebar .widget {
    background-color: #fff;
    padding: 20px;
    border: 1px solid #ddd;
    margin-bottom: 20px;
    border-radius: 5px;
}

.sidebar .widget-title {
    font-size: 1.2em;
    margin-top: 0;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.sidebar .widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar .widget ul li {
    margin-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 10px;
}

.sidebar .widget ul li:last-child {
    margin-bottom: 0;
    border-bottom: none;
    padding-bottom: 0;
}

.sidebar .widget ul li a {
    text-decoration: none;
    color: #333;
}

.sidebar .widget ul li a:hover {
    color: #0073aa;
}

.post-full-header {
    margin-bottom: 25px;
    text-align: center;
    border-bottom: 1px solid #eee;
    padding-bottom: 25px;
}

.post-full-title {
    font-size: 2.5em;
    margin: 0 0 10px;
    color: #111;
}

.post-full-meta {
    font-size: 0.9em;
    color: #666;
}

.post-full-image {
    margin: 0;
    position: relative; /* Essencial para o posicionamento do overlay */
}

.post-full-image img {
    width: 100%;
    height: auto;
    border-radius: 5px;
    display: block; /* Garante que não haja espaço extra abaixo da imagem */
}

.post-full-content {
    line-height: 1.7;
    font-size: 1.1em;
    max-width: 730px; /* Largura máxima para o conteúdo, similar ao site de referência */
    margin-left: auto;   /* Centraliza o bloco de conteúdo na sua coluna */
    margin-right: auto;  /* Centraliza o bloco de conteúdo na sua coluna */
}

.post-full-content img,
.post-full-content figure {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
}

.post-full-content h1, .post-full-content h2, .post-full-content h3 {
    margin-top: 2em;
    margin-bottom: 1em;
}

.post-full-content p { margin-bottom: 1.5em; }
.post-full-content a { color: #0073aa; text-decoration: none; }
.post-full-content a:hover { text-decoration: underline; }

/* --- ESTILOS DO RODAPÉ --- */
.site-footer {
    background-color: #333;
    color: #fff;
    padding: 20px 15px;
    margin-top: 20px;
}

.category-slider {
    width: 100%;
    height: 50px;
}
.category-slider .swiper-slide {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #e4e6eb;
    border-radius: 20px;
    font-size: 0.9em;
    color: #050505;
    height: 40px;
    align-self: center;
}
.category-slider .swiper-slide a {
    text-decoration: none;
    color: inherit;
    padding: 0 15px;
    display: block;
    line-height: 40px;
}

/* --- REGRAS DE RESPONSIVIDADE --- */
@media (max-width: 1200px) {
    /* Ajustes para telas menores */
}

@media (max-width: 992px) {
    .home-sliders-container { grid-template-columns: 1fr; }
    /* CORREÇÃO: Ajusta o layout do post para tablet */
    .single-post-grid-container {
        grid-template-columns: 1fr;
        gap: 25px;
        padding: 0 20px;
    }
    #sidebar-left { order: 2; }
    #sidebar-right { order: 3; }
    .main-content-single { order: 1; }
}

@media (max-width: 767px) {
    .site-header { grid-template-columns: 1fr; }
    .post-full-title { font-size: 1.8em; }

    /* CORREÇÃO: Ajusta o layout do post para celular */
    .single-post-grid-container {
        gap: 20px;
        padding: 0 15px;
    }
    .main-content-single {
        padding: 0;
        margin: 0;
    }
    
    .container {
        padding: 0 10px; /* Reduz o padding lateral para evitar excesso*/
    }

    #main-banner .swiper-button-next { right: 5px; }
    #main-banner .swiper-button-prev { left: 5px; }
    .incontent-slider-wrapper .swiper-button-prev { left: 5px; }
    .incontent-slider-wrapper .swiper-button-next { right: 5px; }

    /* --- CORREÇÃO DEFINITIVA PARA IMAGENS LARGAS NO CONTEÚDO --- */
    .post-full-content figure,
    .post-full-content img {
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        box-sizing: border-box !important;
    }

    /* --- AJUSTE PARA FORÇAR 1 COLUNA NA PÁGINA PRINCIPAL --- */
    .main-content {
        grid-template-columns: 1fr; /* Força uma única coluna em celulares */
    }
}

/* --- ESTILOS ADICIONAIS PARA O RODAPÉ --- */
.footer-bottom-bar {
    padding: 25px 15px;
    border-top: 1px solid #444;
    text-align: center;
}
.footer-copyright {
    margin: 0 0 8px 0;
    font-size: 0.9em;
    font-weight: bold;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.footer-tagline {
    margin: 0;
    font-size: 0.8em;
    color: #ccc;
}

/* --- ESTILOS PARA SLIDER PRINCIPAL DE LARGURA TOTAL --- */
#main-banner {
    padding: 0;
}
#main-banner .swiper-button-next,
#main-banner .swiper-button-prev {
    top: 50%;
    transform: translateY(-50%);
}
#main-banner .swiper-button-next { 
    right: 15px;
}
#main-banner .swiper-button-prev { 
    left: 15px;
}

/* --- CORREÇÃO PARA SLIDERS DE LARGURA TOTAL --- */
#top-banner-slider .swiper-wrapper,
#main-banner .swiper-wrapper,
#main-banner-1 .swiper-wrapper {
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}

/* --- ESTILOS PARA O SLIDER DE BANNERS SUPERIOR --- */
.top-banner-slider-section {
    width: 100%;
    position: relative;
    line-height: 0; /* Remove espaço extra abaixo da imagem */
    background-color: #f0f0f0; /* Cor de fundo caso a imagem não carregue */
    padding-left: 15px;
    padding-right: 15px;
    box-sizing: border-box;
}

#top-banner-slider .swiper-slide a {
    display: block;
}

#top-banner-slider .swiper-slide img {
    width: 100%;
    height: auto;
    display: block;
}

#top-banner-slider .swiper-pagination-bullet {
    background-color: #fff;
    opacity: 0.7;
}

#top-banner-slider .swiper-pagination-bullet-active {
    opacity: 1;
    background-color: #28a745; /* Cor verde para combinar */
}

#top-banner-slider .swiper-button-next,
#top-banner-slider .swiper-button-prev {
    color: #333;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    transition: background-color 0.3s ease;
}

#top-banner-slider .swiper-button-next::after,
#top-banner-slider .swiper-button-prev::after {
    font-size: 18px;
    font-weight: bold;
}

/* --- ESTILOS PARA O BOTÃO FLUTUANTE DE COMENTÁRIOS (RETANGULAR) --- */
.floating-comment-btn {
    position: fixed;
    z-index: 999;
    /* Tamanho retangular - ajuste os valores conforme necessário */
    width: 160px; 
    height: 55px;
    /* Removemos o fundo e a borda para que a imagem seja o botão */
    background-color: transparent;
    box-shadow: none;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.2s ease-in-out;
}

.floating-comment-btn:hover {
    transform: scale(1.1);
}

.floating-comment-btn img {
    /* Faz a imagem preencher todo o contêiner */
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Posições */
.floating-comment-btn.bottom-right {
    bottom: 25px;
    right: 25px;
}

.floating-comment-btn.bottom-left {
    bottom: 25px;
    left: 25px;
}
/* --- ESTILOS PARA OS BANNERS ESTÁTICOS SUPERIORES --- */
.static-banners-container-wrapper {
    padding: 20px 15px;
    background-color: #f7f7f7;
    border-top: 1px solid #e7e7e7;
    border-bottom: 1px solid #e7e7e7;
    box-sizing: border-box;
}

.static-banners-container {
    display: grid;
    /* 6 colunas em desktop por padrão */
    grid-template-columns: repeat(6, 1fr);
    gap: 15px;
    max-width: 1400px;
    margin: 0 auto;
}

.static-banner-item a {
    display: block;
    line-height: 0; /* Remove espaços extras em links de imagem */
}

.static-banner-item img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.static-banner-item a:hover img {
    transform: translateY(-3px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

/* Responsividade para os banners estáticos */
@media (max-width: 1024px) {
    .static-banners-container {
        /* 3 colunas em tablets */
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 767px) {
    .static-banners-container-wrapper {
        padding: 15px 10px;
    }
    .static-banners-container {
        /* 2 colunas em smartphones */
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
}
/* --- CORREÇÃO: Imagens e Elementos no Conteúdo do Post --- */
.post-full-content {
    overflow-wrap: break-word;
    word-wrap: break-word; /* Garante que textos longos sem espaço também quebrem a linha */
}

/* Regra principal para todos os elementos de mídia */
.post-full-content img,
.post-full-content figure,
.post-full-content video,
.post-full-content iframe {
    max-width: 100% !important; /* Garante que o elemento nunca seja maior que a coluna */
    height: auto !important;     /* Mantém a proporção correta de altura */
    display: block;             /* Facilita o controle de margens */
    margin-left: auto;
    margin-right: auto;
    border-radius: 5px;         /* Mantém o estilo de borda arredondada */
    box-shadow: 0 2px 8px rgba(0,0,0,0.1); /* Adiciona uma sombra suave */
}

/* Tratamento para as classes de alinhamento do WordPress */
.post-full-content .aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 1.5em;
}

.post-full-content .alignleft {
    float: left;
    margin-right: 1.5em;
    margin-bottom: 1.5em;
    max-width: 50%; /* Evita que a imagem ocupe muito espaço quando flutuada */
}

.post-full-content .alignright {
    float: right;
    margin-left: 1.5em;
    margin-bottom: 1.5em;
    max-width: 50%; /* Evita que a imagem ocupe muito espaço quando flutuada */
}

/* Limpa a flutuação para que elementos seguintes não fiquem ao lado */
.post-full-content::after {
    content: "";
    display: table;
    clear: both;
}

/* --- ESTILOS PARA SOBREPOSIÇÃO DE ESTATÍSTICAS (GERAL) --- */
.post-thumbnail-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1; /* Sempre visível */
    z-index: 1;
    pointer-events: none;
}

.post-stats-container {
    display: flex;
    gap: 20px;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.7);
}

.stat-item {
    display: flex;
    align-items: center;
    font-size: 1.1em;
    font-weight: bold;
}

.stat-item i {
    margin-right: 8px;
}

/* --- ESTILOS PARA O BOTÃO "COMENTE" NO SINGLE POST --- */
.single-post-image-area {
    margin-bottom: 30px;
}

.button-comment-single {
    display: inline-block;
    background-color: #3498db;
    color: #fff;
    padding: 12px 25px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1em;
    text-align: center;
    margin-bottom: 20px;
    transition: background-color 0.3s ease;
}

.button-comment-single:hover {
    background-color: #2980b9;
    color: #fff;
}

.button-comment-single i {
    margin-right: 8px;
}

/* Responsividade das Estatísticas e Botão */
@media (max-width: 767px) {
    .stat-item {
        font-size: 0.9em;
    }
    .post-stats-container {
        gap: 15px;
    }
    .button-comment-single {
        display: block; /* Ocupa a largura toda */
    }
}

/* --- ESTILO PARA DATA E HORA ABAIXO DA IMAGEM DESTACADA (single.php) --- */
.post-date-time-under-image {
    text-align: center;
    margin-top: 15px;
    margin-bottom: 20px;
    color: #666;
    font-size: 0.9em;
    font-style: italic;
}