/**
 * Estilos para o Blog - Império Pharma
 * Compatível com a estética atual do site
 */

/* Containers e layout principal */
.blog-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.625rem;
    animation: fadeIn 0.5s;
}

.blog-header {
    margin-bottom: 2rem;
    text-align: center;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e0e0e0;
}

.blog-header h1 {
    font-size: 1.8rem;
    color: #081c4b;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.blog-subtitle {
    color: #555;
    font-size: 1.1rem;
    max-width: 700px;
    margin: 0 auto;
}

.blog-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

/* Estado vazio (sem posts) */
.blog-empty-state {
    text-align: center;
    padding: 3rem 1rem;
    background-color: #f8f9fc;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.blog-empty-state i {
    font-size: 3rem;
    color: #b0bec5;
    margin-bottom: 1rem;
}

.blog-empty-state h3 {
    color: #546e7a;
    margin-bottom: 0.5rem;
}

.blog-empty-state p {
    color: #78909c;
}

/* Grid de posts */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* Cards de post */
.blog-card {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
    height: 100%;
    border: 1px solid #eaeaea;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.blog-card-image {
    height: 180px;
    background-color: #f7f8fc;
    overflow: hidden;
    position: relative;
}

.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.blog-card:hover .blog-card-image img {
    transform: scale(1.05);
}

.blog-card-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    background-color: #f0f2f5;
}

.blog-card-placeholder i {
    font-size: 3rem;
    color: #c5cae9;
}

.blog-card-content {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.blog-card-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.blog-card-title a {
    color: #081c4b;
    text-decoration: none;
    transition: color 0.2s;
}

.blog-card-title a:hover {
    color: #0033a0;
}

.blog-card-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 0.75rem;
}

.blog-date, .blog-views {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.blog-card-categories {
    margin-bottom: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.blog-category {
    display: inline-block;
    padding: 0.3rem 0.6rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #fff;
    background-color: #0033a0;
    border-radius: 20px;
    text-decoration: none;
    transition: background-color 0.2s;
}

.blog-category:hover {
    background-color: #002780;
}

.blog-card-excerpt {
    font-size: 0.95rem;
    color: #444;
    margin-bottom: 1rem;
    line-height: 1.4;
    flex-grow: 1;
}

.blog-read-more {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    color: #0033a0;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: gap 0.2s;
    margin-top: auto;
}

.blog-read-more:hover {
    gap: 0.5rem;
}

/* Paginação */
.blog-pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.pagination-link {
    display: inline-block;
    min-width: 2rem;
    height: 2rem;
    line-height: 2rem;
    text-align: center;
    background-color: #f1f3fa;
    color: #444;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
}

.pagination-link:hover {
    background-color: #e0e6f5;
}

.pagination-link.active {
    background-color: #0033a0;
    color: #fff;
}

/* Sidebar */
.blog-sidebar {
    margin-top: 1.5rem;
}

.blog-widget {
    background-color: #fff;
    border-radius: 8px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.widget-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #081c4b;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e0e0e0;
}

.blog-categories-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.blog-categories-list li {
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px dashed #e0e0e0;
}

.blog-categories-list li:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.blog-categories-list a {
    display: block;
    color: #444;
    text-decoration: none;
    transition: color 0.2s;
    font-size: 0.95rem;
    padding: 0.25rem 0;
}

.blog-categories-list a:hover {
    color: #0033a0;
}

.blog-popular-posts {
    list-style: none;
    padding: 0;
    margin: 0;
}

.blog-popular-posts li {
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px dashed #e0e0e0;
    position: relative;
}

.blog-popular-posts li:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.blog-popular-posts a {
    display: block;
    color: #444;
    text-decoration: none;
    transition: color 0.2s;
    font-size: 0.95rem;
    padding-right: 3rem;
}

.blog-popular-posts a:hover {
    color: #0033a0;
}

.views-count {
    position: absolute;
    right: 0;
    top: 0.25rem;
    font-size: 0.8rem;
    color: #666;
}

/* Página de post individual */
.blog-post-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0.625rem;
}

.blog-post-navigation {
    margin-bottom: 1.5rem;
}

.back-to-blog {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    color: #0033a0;
    font-weight: 500;
    text-decoration: none;
    padding: 0.5rem 0;
}

.back-to-blog:hover {
    color: #002780;
}

.blog-post {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    margin-bottom: 2rem;
}

.blog-post-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e0e0e0;
}

.blog-post-title {
    font-size: 1.8rem;
    color: #081c4b;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.blog-post-meta {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 1rem;
}

.blog-post-date, .blog-post-views {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.blog-post-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.blog-post-featured-image {
    width: 100%;
    max-height: 500px;
    overflow: hidden;
}

.blog-post-featured-image img {
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: contain;
}

.blog-post-content {
    padding: 2rem;
    font-size: 1.05rem;
    line-height: 1.7;
    color: #333;
}

.blog-post-content h2 {
    font-size: 1.5rem;
    color: #081c4b;
    margin: 2rem 0 1rem;
    font-weight: 600;
}

.blog-post-content h3 {
    font-size: 1.3rem;
    color: #081c4b;
    margin: 1.5rem 0 1rem;
    font-weight: 600;
}

.blog-post-content p {
    margin-bottom: 1.25rem;
}

.blog-post-content ul,
.blog-post-content ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.blog-post-content li {
    margin-bottom: 0.5rem;
}

.blog-post-content a {
    color: #0033a0;
    text-decoration: none;
}

.blog-post-content a:hover {
    text-decoration: underline;
}

.blog-post-content blockquote {
    border-left: 4px solid #0033a0;
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    background-color: #f8f9fa;
    font-style: italic;
}

.blog-post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 1rem 0;
}

.blog-post-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
}

.blog-post-content table th,
.blog-post-content table td {
    padding: 0.75rem;
    border: 1px solid #ddd;
}

.blog-post-content table th {
    background-color: #f1f3fa;
    font-weight: 600;
}

.blog-post-content table tr:nth-child(even) {
    background-color: #f8f9fc;
}

/* Compartilhamento */
.blog-post-share {
    padding: 1rem 2rem 2rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-top: 1px solid #e0e0e0;
}

.share-label {
    font-weight: 500;
    color: #444;
}

.social-share {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    color: #fff;
    text-decoration: none;
    transition: transform 0.2s;
}

.social-share:hover {
    transform: translateY(-3px);
}

.facebook {
    background-color: #1877f2;
}

.twitter {
    background-color: #1da1f2;
}

.whatsapp {
    background-color: #25d366;
}

/* Posts relacionados */
.related-posts {
    margin-bottom: 3rem;
}

.related-posts-title {
    font-size: 1.3rem;
    color: #081c4b;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.related-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.25rem;
}

.related-post-card {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: transform 0.3s, box-shadow 0.3s;
}

.related-post-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
}

.related-post-image {
    height: 150px;
    background-color: #f7f8fc;
    overflow: hidden;
}

.related-post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.related-post-card:hover .related-post-image img {
    transform: scale(1.05);
}

.related-post-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    background-color: #f0f2f5;
}

.related-post-placeholder i {
    font-size: 2.5rem;
    color: #c5cae9;
}

.related-post-content {
    padding: 1rem;
}

.related-post-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.related-post-title a {
    color: #081c4b;
    text-decoration: none;
    transition: color 0.2s;
}

.related-post-title a:hover {
    color: #0033a0;
}

.related-post-date {
    font-size: 0.85rem;
    color: #666;
}

/* Responsividade */
@media (min-width: 768px) {
    .blog-content {
        grid-template-columns: 2fr 1fr;
    }
    
    .blog-sidebar {
        margin-top: 0;
    }
    
    .blog-post-title {
        font-size: 2.2rem;
    }
    
    .blog-header h1 {
        font-size: 2.2rem;
    }
}

@media (max-width: 767px) {
    .blog-grid {
        grid-template-columns: 1fr;
    }
    
    .related-posts-grid {
        grid-template-columns: 1fr;
    }
    
    .blog-post-content {
        padding: 1.25rem;
    }
}

/* Animações */
@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}


/* Correções de responsividade para evitar expansão lateral */
html, body {
  overflow-x: hidden;
  max-width: 100%;
}

.blog-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
  box-sizing: border-box;
}

@media (max-width: 576px) {
  .blog-grid {
    grid-template-columns: 1fr;
  }
  
  .blog-card-image {
    height: 160px;
  }
  
  .blog-header h1 {
    font-size: 1.8rem;
  }
}

/* Garantir que todas as imagens sejam responsivas */
img {
  max-width: 100%;
  height: auto;
}

/* Ajustes para conteúdo de posts */
.blog-post-content {
  overflow-wrap: break-word;
  word-wrap: break-word;
}

.blog-post-content img,
.blog-post-content iframe,
.blog-post-content table {
  max-width: 100% !important;
  height: auto !important;
}

/* Melhorar visualização em dispositivos móveis */
@media (max-width: 768px) {
  .blog-content {
    grid-template-columns: 1fr;
  }
  
  .blog-sidebar {
    margin-top: 2rem;
  }
  
  .blog-card-title {
    font-size: 1.1rem;
  }
  
  .blog-card-excerpt {
    font-size: 0.9rem;
  }
}


/* Estilos para a seção de compartilhamento */
.blog-post-share {
    padding: 1.5rem 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    border-top: 1px solid #e0e0e0;
    flex-wrap: wrap;
}

.blog-post-share h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #444;
    margin: 0;
}

.share-buttons {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.share-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    color: #fff;
    text-decoration: none;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.share-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.share-button i {
    margin-right: 0.5rem;
    font-size: 1rem;
}

.facebook {
    background-color: #1877f2;
}

.twitter {
    background-color: #1da1f2;
}

.whatsapp {
    background-color: #25d366;
}

/* Responsividade para telas pequenas */
@media (max-width: 576px) {
    .blog-post-share {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .share-buttons {
        margin-top: 0.5rem;
    }
}


/* Estilos adicionais para modernização do blog */

/* Melhorias na tipografia e espaçamento */
.blog-post-title {
    font-size: 2.2rem;
    font-weight: 700;
    line-height: 1.3;
    color: #081c4b;
    margin-bottom: 1.2rem;
}

/* Tempo de leitura */
.blog-reading-time {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: #666;
    font-size: 0.9rem;
}

/* Melhoria na organização de categorias no topo do post */
.blog-post-categories {
    margin-bottom: 1rem;
}

/* Efeito de imagem expandida ao clicar */
.blog-post-content img {
    cursor: pointer;
    transition: transform 0.3s ease;
}

.blog-post-content img.expanded {
    transform: scale(1.03);
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

/* Melhoria da barra de pesquisa */
.search-container {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input {
    padding-right: 35px;
}

#searchButton {
    position: absolute;
    right: 5px;
    background: none;
    border: none;
    color: white;
    font-size: 0.9rem;
    cursor: pointer;
    padding: 6px;
}

/* Melhorias nos posts relacionados */
.related-posts-title {
    position: relative;
    padding-bottom: 0.8rem;
}

.related-posts-title:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 80px;
    height: 3px;
    background-color: #0066cc;
    border-radius: 3px;
}

/* Animação de entrada suave */
.blog-post {
    animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Melhorias na navegação */
.blog-nav-link {
    display: inline-flex;
    align-items: center;
    color: #0066cc;
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 0.8rem;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.blog-nav-link:hover {
    background-color: rgba(0, 102, 204, 0.1);
}

.blog-nav-link i {
    margin-right: 0.5rem;
}