/* Custom Blog Styles */

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@600&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap');

/* General */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.7;
    font-size: 16px;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    background-color: #f8fbff;
}

/* Apply Inter to all text elements */
* {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Headings with Poppins Semi Bold */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 600;
    color: #2B80B9;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.3;
}

h1 { 
    font-weight: 600; 
    font-size: 2.5rem;
}
h2 { 
    font-weight: 600; 
    font-size: 2rem;
}
h3 { 
    font-weight: 600; 
    font-size: 1.75rem;
}
h4 { 
    font-weight: 600; 
    font-size: 1.5rem;
}

/* Navigation with Poppins Semi Bold */
.navbar-brand {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 600;
    color: #2B80B9 !important;
}

.navbar-nav .nav-link {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 600;
    color: #2B80B9 !important;
}

.dropdown-item {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 600;
    color: #2B80B9 !important;
}

/* Hover effect for dropdown items */
.dropdown-item:hover {
    color: #ffffff !important;
    background-color: #2B80B9;
    text-decoration: none;
}

/* Menu items */
.nav-link, .navbar-nav .nav-link {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 600;
    color: #2B80B9 !important;
}

/* Links gerais */
a {
    color: #2B80B9;
    text-decoration: none;
}

a:hover {
    color: #1a5a7a;
    text-decoration: underline;
}

/* Títulos dos posts */
.card-title a {
    color: #2B80B9;
    text-decoration: none;
}

.card-title a:hover {
    color: #1a5a7a;
    text-decoration: none;
}

.card-title a {
    color: #2B80B9;
    text-decoration: none;
}

/* Botões primários */
.btn-primary {
    background-color: #2B80B9;
    border-color: #2B80B9;
    color: white;
}

.btn-primary:hover {
    background-color: #1a5a7a;
    border-color: #1a5a7a;
    color: white;
}

.btn-primary:focus, .btn-primary:active {
    background-color: #1a5a7a;
    border-color: #1a5a7a;
    box-shadow: 0 0 0 0.2rem rgba(43, 128, 185, 0.25);
}

/* Botões outline */
.btn-outline-primary {
    color: #2B80B9;
    border-color: #2B80B9;
}

.btn-outline-primary:hover {
    background-color: #2B80B9;
    border-color: #2B80B9;
    color: white;
}

/* Badges e tags */
.badge.bg-primary {
    background-color: #2B80B9 !important;
}

.badge.bg-secondary {
    background-color: #1a5a7a !important;
}

/* Hover para tags/badges */
.badge.bg-secondary:hover {
    background-color: #2B80B9 !important;
    color: #ffffff !important;
    transform: translateY(-1px);
    transition: all 0.3s ease;
}

.badge:hover {
    text-decoration: none !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Footer links */
.text-light a {
    color: #ffffff !important;
}

.text-light a:hover {
    color: #f8f9fa !important;
}

.category-header {
    transition: all 0.3s ease;
    border: none;
    overflow: hidden;
}

.category-header .card-body {
    position: relative;
    z-index: 2;
}



/* Preservar formatação do editor no frontend */
.post-content {
    line-height: 1.7;
}

.post-content p {
    margin: 0 0 12px 0;
    /* Preservar alinhamento inline do editor */
}

/* Seletores genéricos para alinhamento - cobre qualquer elemento */
.post-content *[style*="text-align: center"] {
    text-align: center !important;
}

.post-content *[style*="text-align: right"] {
    text-align: right !important;
}

.post-content *[style*="text-align: justify"] {
    text-align: justify !important;
}

.post-content *[style*="text-align: left"] {
    text-align: left !important;
}

/* Remover as regras específicas antigas para p, div, h1-h6 */
/* Elas não são mais necessárias com os seletores genéricos acima */

.post-content blockquote {
    border-left: 4px solid #2B80B9;
    padding-left: 16px;
    margin: 16px 0;
    font-style: italic;
    color: #666;
}

.post-content ul, .post-content ol {
    margin: 12px 0;
    padding-left: 20px;
}

.post-content li {
    margin-bottom: 4px;
}

.post-content strong {
    font-weight: 600;
}

.post-content em {
    font-style: italic;
}

.post-content h1, .post-content h2, .post-content h3, 
.post-content h4, .post-content h5, .post-content h6 {
    margin: 20px 0 12px 0;
}

.post-content img {
    max-width: 100%;
    height: auto;
    margin: 12px 0;
    border-radius: 8px;
}

/* Personalização da Paginação */
.pagination .page-link {
    color: #2B80B9;
    border-color: #dee2e6;
    padding: 0.5rem 0.75rem;
    margin-left: -1px;
    line-height: 1.25;
    text-decoration: none;
    background-color: #fff;
    border: 1px solid #dee2e6;
    transition: all 0.3s ease;
}

.pagination .page-link:hover {
    color: #fff;
    background-color: #2B80B9;
    border-color: #2B80B9;
    box-shadow: 0 2px 4px rgba(43, 128, 185, 0.2);
}

.pagination .page-link:hover {
    background: #2B80B9;
    color: white;
    border-color: #2B80B9;
}

/* Featured post - SEM efeitos de movimento */
.featured-post .btn-primary:hover {
    background: linear-gradient(45deg, #1e5f8b, #2B80B9);
    box-shadow: 0 2px 8px rgba(43, 128, 185, 0.2);
}

.featured-post .btn-primary:hover {
    background: linear-gradient(45deg, #1e5f8b, #2B80B9);
    box-shadow: 0 2px 8px rgba(43, 128, 185, 0.2);
}

.pagination .page-item.active .page-link {
    color: #fff;
    background-color: #2B80B9;
    border-color: #2B80B9;
    z-index: 3;
}

.pagination .page-item.disabled .page-link {
    color: #6c757d;
    background-color: #fff;
    border-color: #dee2e6;
    cursor: not-allowed;
}

.pagination .page-item:first-child .page-link {
    border-top-left-radius: 0.375rem;
    border-bottom-left-radius: 0.375rem;
}

.pagination .page-item:last-child .page-link {
    border-top-right-radius: 0.375rem;
    border-bottom-right-radius: 0.375rem;
}

/* Responsividade para paginação */
@media (max-width: 576px) {
    .pagination .page-link {
        padding: 0.375rem 0.5rem;
        font-size: 0.875rem;
    }
}

/* Post em destaque - layout vertical */
.featured-post {
    background: #ffffff;
    border-radius: 0;
    border: 1px solid #e9ecef;
}

.featured-post .card-img-top {
    border-radius: 0;
}

.featured-post .card-title {
    text-align: left !important;
    font-family: math;
}

.featured-post .card-title a {
    color: inherit;
    text-decoration: none;
}

.featured-post .btn-primary {
    border-radius: 0;
    background: linear-gradient(45deg, #2B80B9, #1e5f8b);
    border: none;
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
}

/* Responsividade */
@media (max-width: 768px) {
    .featured-post .card-img-top {
        height: 200px !important;
    }
    
    .featured-post .card-title {
        font-size: 1.5rem;
    }
    
    .featured-post .btn-sm {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
    
    .featured-post .d-flex {
        flex-direction: column;
        align-items: flex-start;
    }
    
    /* Ocultar barra de pesquisa em telas reduzidas */
    .navbar .d-flex form {
        display: none !important;
    }
    
    /* Melhorar responsividade do post em destaque */
    .featured-post {
        margin-bottom: 2rem;
    }
    
    .featured-post .card-body {
        padding: 1rem;
    }
    
    .featured-post .card-title {
        font-size: 1.25rem;
        margin-bottom: 0.75rem;
        line-height: 1.3;
    }
    
    .featured-post .card-text {
        font-size: 0.9rem;
        margin-bottom: 1rem;
        line-height: 1.5;
    }
    
    .featured-post .d-flex.justify-content-between {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .featured-post .btn {
        width: 100%;
        text-align: center;
    }
    
    .featured-post .text-muted {
        width: 100%;
        text-align: left;
        font-size: 0.8rem;
    }
}

/* Responsividade adicional para telas muito pequenas */
@media (max-width: 576px) {
    .featured-post .card-img-top {
        height: 180px !important;
    }
    
    .featured-post .card-title {
        font-size: 1.1rem;
    }
    
    .featured-post .card-text {
        font-size: 0.85rem;
    }
    
    .featured-post .card-body {
        padding: 0.75rem;
    }
}

/* Banner Principal */
.banner-section {
    margin: 0 !important;
    padding: 0 !important;
}

.banner-container {
    position: relative;
    width: 100%;
    height: 300px;
    overflow: hidden;
}

.banner-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Removido: transition: transform 0.3s ease; */
}

/* Removido completamente o efeito hover do banner */
/* .banner-container:hover img {
    transform: scale(1.05);
} */
.banner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* background: linear-gradient(45deg, rgba(43, 128, 185, 0.3), rgba(43, 128, 185, 0.1)); */
    display: flex;
    align-items: center;
    justify-content: center;
}

.banner-content h1 {
    color: #2B80B9;
    /* text-shadow: 2px 2px 4px rgba(0,0,0,0.5); */
    margin-bottom: 1rem;
}

.banner-content p {
    color: #6C757D;
    /* text-shadow: 1px 1px 2px rgba(0,0,0,0.5); */
    max-width: 600px;
    margin: 0 auto;
}

/* Responsividade do Banner */
@media (max-width: 768px) {
    .banner-container {
        height: 200px;
    }
    
    .banner-content h1 {
        font-size: 2rem;
    }
    
    .banner-content p {
        font-size: 1rem;
        padding: 0 1rem;
    }
}

@media (max-width: 576px) {
    .banner-container {
        height: 150px;
    }
    
    .banner-content h1 {
        font-size: 1.5rem;
    }
    
    .banner-content p {
        font-size: 0.9rem;
    }
}

/* Padrão global para todos os cards */
.card {
    background: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 0 !important;
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1) !important;
    border-color: #dee2e6;
}

.card-header {
    background: #ffffff;
    border-bottom: 1px solid #e9ecef;
    border-radius: 0 !important;
}

/* Padrão para todos os botões */
.btn {
    border-radius: 0 !important;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(45deg, #2B80B9, #1e5f8b);
    border: none;
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(45deg, #1e5f8b, #2B80B9);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(43, 128, 185, 0.2);
}

.btn-sm {
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
}

/* Imagens dos cards */
.card img {
    border-radius: 0 !important;
}

.rounded, .rounded-start {
    border-radius: 0 !important;
}

/* Post em destaque mantém suas configurações específicas */
.featured-post {
    background: #ffffff;
    border-radius: 0;
    border: 1px solid #e9ecef;
    /* Removido: transition: all 0.3s ease; */
}

.featured-post .card-img-top {
    border-radius: 0;
    /* Removido: transition: transform 0.3s ease; */
}

.featured-post .card-title a {
    /* Removido: transition: color 0.3s ease; */
}

.featured-post .card-title a:hover {
    color: #2B80B9 !important;
}

.featured-post .btn-primary {
    border-radius: 0;
    background: linear-gradient(45deg, #2B80B9, #1e5f8b);
    border: none;
    /* Removido: transition: all 0.3s ease; */
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
}

.featured-post .btn-primary:hover {
    background: linear-gradient(45deg, #1e5f8b, #2B80B9);
    /* Removido: transform: translateY(-1px); */
    box-shadow: 0 2px 8px rgba(43, 128, 185, 0.2);
}

/* Paginação */
.pagination .page-link {
    border-radius: 0 !important;
    border: 1px solid #e9ecef;
    color: #2B80B9;
    background: #ffffff;
    transition: all 0.3s ease;
}

.pagination .page-link:hover {
    background: #2B80B9;
    color: white;
    border-color: #2B80B9;
    transform: translateY(-1px);
}

.pagination .page-item.active .page-link {
    background: #2B80B9;
    border-color: #2B80B9;
    color: white;
}

.pagination .page-item.disabled .page-link {
    background: #f8f9fa;
    border-color: #e9ecef;
    color: #6c757d;
}

/* Responsividade */
@media (max-width: 768px) {
    .featured-post .card-img-top {
        height: 200px !important;
    }
    
    .featured-post .card-title {
        font-size: 1.5rem;
    }
    
    .featured-post .btn-sm {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
    
    .featured-post .d-flex {
        flex-direction: column;
        align-items: flex-start;
    }
    
    /* Ocultar barra de pesquisa em telas reduzidas */
    .navbar .d-flex form {
        display: none !important;
    }
    
    /* Melhorar responsividade do post em destaque */
    .featured-post {
        margin-bottom: 2rem;
    }
    
    .featured-post .card-body {
        padding: 1rem;
    }
    
    .featured-post .card-title {
        font-size: 1.25rem;
        margin-bottom: 0.75rem;
        line-height: 1.3;
    }
    
    .featured-post .card-text {
        font-size: 0.9rem;
        margin-bottom: 1rem;
        line-height: 1.5;
    }
    
    .featured-post .d-flex.justify-content-between {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .featured-post .btn {
        width: 100%;
        text-align: center;
    }
    
    .featured-post .text-muted {
        width: 100%;
        text-align: left;
        font-size: 0.8rem;
    }
}

/* Responsividade melhorada para títulos de posts individuais */
@media (max-width: 768px) {
    /* Responsividade para imagens dos posts recentes */
    @media (max-width: 768px) {
        /* Limitar altura das imagens dos posts recentes em tablets */
        .card .row .col-md-4 img {
            height: 200px !important;
            width: 100% !important;
            object-fit: cover;
        }
        
        /* Ajustar layout dos cards em tablets */
        .card .row {
            flex-direction: column;
        }
        
        .card .col-md-4,
        .card .col-md-8 {
            flex: none;
            width: 100%;
        }
    }
    
    @media (max-width: 576px) {
        /* Limitar ainda mais a altura em celulares */
        .card .row .col-md-4 img,
        .card img.img-fluid {
            height: 150px !important;
            width: 100% !important;
            object-fit: cover;
        }
        
        /* Reduzir padding dos cards em celulares */
        .card .card-body {
            padding: 1rem;
        }
        
        /* Ajustar título dos posts recentes */
        .card .card-title {
            font-size: 1.1rem;
            line-height: 1.3;
            margin-bottom: 0.75rem;
        }
        
        /* Ajustar texto dos posts recentes */
        .card .card-text {
            font-size: 0.9rem;
            line-height: 1.4;
        }
    }
    
    @media (max-width: 375px) {
        /* Para telas muito pequenas */
        .card .row .col-md-4 img,
        .card img.img-fluid {
            height: 120px !important;
        }
        
        .card .card-body {
            padding: 0.75rem;
        }
        
        .card .card-title {
            font-size: 1rem;
        }
    }
    
    /* Título principal do post individual */
    body[data-page="post"] .card-title {
        font-size: 1.75rem !important;
        line-height: 1.2;
        margin-bottom: 1rem;
    }
    
    /* Ajustar espaçamento do conteúdo do post */
    body[data-page="post"] .card-body {
        padding: 1.25rem;
    }
    
    /* Meta informações do post */
    body[data-page="post"] .card-text.text-muted {
        font-size: 0.85rem;
        margin-bottom: 1rem;
    }
    
    /* Badges das tags */
    body[data-page="post"] .badge {
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
        margin-bottom: 0.25rem;
    }
}

@media (max-width: 576px) {
    /* Título ainda menor para celulares */
    body[data-page="post"] .card-title {
        font-size: 1.5rem !important;
        line-height: 1.2;
        margin-bottom: 0.75rem;
    }
    
    /* Reduzir padding em telas muito pequenas */
    body[data-page="post"] .card-body {
        padding: 1rem;
    }
    
    /* Meta informações ainda menores */
    body[data-page="post"] .card-text.text-muted {
        font-size: 0.8rem;
    }
    
    /* Ajustar botões de compartilhamento */
    body[data-page="post"] .btn-sm {
        font-size: 0.75rem;
        padding: 0.375rem 0.75rem;
        margin-bottom: 0.5rem;
    }
    
    /* Melhorar espaçamento dos posts relacionados */
    body[data-page="post"] .related-posts .card-title {
        font-size: 1rem !important;
        line-height: 1.3;
    }
}

@media (max-width: 375px) {
    /* Para telas muito pequenas (iPhone SE, etc.) */
    body[data-page="post"] .card-title {
        font-size: 1.25rem !important;
        line-height: 1.2;
    }
    
    body[data-page="post"] .card-body {
        padding: 0.75rem;
    }
}

/* Ocultar completamente o banner nas páginas de posts individuais */
body[data-page="post"] .banner-container {
    display: none !important;
}

/* Media queries para garantir que funcione em todos os dispositivos */
@media (max-width: 768px) {
    body[data-page="post"] .banner-container {
        display: none !important;
    }
}

@media (max-width: 576px) {
    body[data-page="post"] .banner-container {
        display: none !important;
    }
}

/* Ajustar espaçamento do conteúdo principal quando o banner está oculto */
body[data-page="post"] main.container {
    margin-top: 2rem !important;
}

/* Media queries para dispositivos móveis - ocultar banner em posts */
@media (max-width: 768px) {
    body[data-page="post"] .banner-section {
        display: none !important;
    }
    
    body[data-page="post"] main.container {
        margin-top: 1.5rem !important;
    }
}

@media (max-width: 576px) {
    body[data-page="post"] main.container {
        margin-top: 1rem !important;
    }
}