/* ====================================================================
   BLOG ELEGANTE — CR Contabilidade
   Redesign clean / premium — sem gradientes pesados, mais respiro,
   hierarquia tipográfica clara, cor usada com intenção.

   Paleta oficial do tema (definida em style.css > :root):
   --primary-color: #3f502e  (Verde)
   --accent-color:  #2e3517  (Bege/Dourado escuro)
   --dark-brown:    #372018  (Marrom escuro)
   --text-color:    #1D1D1B
   ==================================================================== */

.blog-container {
    max-width: var(--container-width, 1200px);
    margin: 0 auto;
    padding: 0 20px;
}

.blog-page { background: #ffffff; }

/* -------------------- HERO -------------------- */
/* Fundo claro, sem gradiente escuro. A cor entra só no kicker e no botão. */
.blog-hero-section {
    background: #fafaf8;
    border-bottom: 1px solid #ececE6;
    padding: 64px 0 56px;
    text-align: center;
}
.blog-hero-kicker {
    display: inline-block;
    color: var(--primary-color);
    background: rgba(63,80,46,0.07);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    padding: 6px 16px;
    border-radius: 30px;
    margin-bottom: 20px;
}
.blog-hero-title {
    color: var(--text-color);
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 800;
    margin: 0 0 14px;
    line-height: 1.2;
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
    letter-spacing: -0.5px;
}
.blog-hero-subtitle {
    color: #6b6b66;
    font-size: 16px;
    max-width: 560px;
    margin: 0 auto 32px;
    line-height: 1.6;
}
.blog-hero-search {
    max-width: 480px;
    margin: 0 auto;
    background: #fff;
    border: 1px solid #e4e4de;
    border-radius: 50px;
    display: flex;
    align-items: center;
    padding: 5px 5px 5px 20px;
    transition: border-color 0.25s, box-shadow 0.25s;
}
.blog-hero-search:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(63,80,46,0.08);
}
.blog-hero-search i { color: #b3b3ac; margin-right: 10px; font-size: 13px; }
.blog-hero-search input {
    border: none;
    outline: none;
    flex: 1;
    font-size: 14px;
    padding: 11px 0;
    font-family: inherit;
    background: transparent;
}
.blog-hero-search button {
    background: var(--primary-color);
    color: #fff;
    border: none;
    font-weight: 700;
    font-size: 13px;
    padding: 12px 24px;
    border-radius: 50px;
    cursor: pointer;
    transition: background 0.25s;
}
.blog-hero-search button:hover { background: var(--dark-brown); }

.archive-hero-section { padding: 48px 0 44px; }

/* -------------------- LAYOUT -------------------- */
.blog-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 56px;
    padding: 56px 0 90px;
    align-items: start;
}
.blog-main { min-width: 0; }

/* -------------------- POST EM DESTAQUE -------------------- */
/* Sem card "flutuante" com sombra pesada — usa borda fina e separação por espaço. */
.featured-post {
    background: #fff;
    border: 1px solid #ececE6;
    border-radius: 18px;
    overflow: hidden;
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    margin-bottom: 56px;
    transition: border-color 0.3s;
}
.featured-post:hover { border-color: #d8d8ce; }
.featured-post-image { position: relative; display: block; height: 100%; min-height: 300px; }
.featured-post-image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.featured-post-placeholder, .blog-card-placeholder, .recent-post-placeholder {
    width: 100%; height: 100%; min-height: 220px;
    display: flex; align-items: center; justify-content: center;
    background: #f4f3ee;
    color: #c2c2b8; font-size: 38px;
}
.blog-card-placeholder.small { min-height: 80px; font-size: 22px; }
.featured-badge {
    position: absolute; top: 18px; left: 18px;
    background: #fff; color: var(--primary-color);
    font-size: 11px; font-weight: 700; text-transform: uppercase;
    padding: 6px 14px; border-radius: 30px; letter-spacing: 0.5px;
    border: 1px solid #ececE6;
}
.featured-post-content { padding: 40px 44px; display: flex; flex-direction: column; justify-content: center; }
.featured-post-content h2 { font-size: 25px; line-height: 1.32; margin: 12px 0; letter-spacing: -0.2px; }
.featured-post-content h2 a { color: var(--text-color); }
.featured-post-content h2 a:hover { color: var(--primary-color); }
.featured-post-content p { color: #767570; font-size: 14.5px; line-height: 1.7; margin: 0 0 20px; }

/* -------------------- CATEGORIAS / META -------------------- */
.post-categories { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.post-categories a {
    font-size: 11px; font-weight: 700; text-transform: uppercase;
    color: var(--primary-color); background: rgba(63,80,46,0.07);
    padding: 4px 12px; border-radius: 20px; letter-spacing: 0.5px;
    transition: background 0.2s, color 0.2s;
}
.post-categories a:hover { background: var(--primary-color); color: #fff; }

.post-meta { display: flex; gap: 18px; flex-wrap: wrap; font-size: 12.5px; color: #999590; margin-bottom: 10px; }
.post-meta i { color: var(--primary-color); margin-right: 4px; }

.read-more-btn, .blog-card-link {
    display: inline-flex; align-items: center; gap: 8px;
    font-weight: 700; font-size: 13px; color: var(--primary-color);
    align-self: flex-start;
}
.read-more-btn i, .blog-card-link i { transition: transform 0.3s; font-size: 12px; }
.read-more-btn:hover i, .blog-card-link:hover i { transform: translateX(4px); }

/* -------------------- GRID DE CARDS -------------------- */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 28px;
}
.blog-card {
    background: #fff;
    border: 1px solid #ececE6;
    border-radius: 16px;
    overflow: hidden;
    transition: border-color 0.3s ease, transform 0.3s ease;
    display: flex; flex-direction: column;
}
.blog-card:hover { transform: translateY(-4px); border-color: #d8d8ce; }
.blog-card-image { position: relative; display: block; height: 200px; overflow: hidden; }
.blog-card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.blog-card:hover .blog-card-image img { transform: scale(1.06); }
.blog-card-cat {
    position: absolute; bottom: 12px; left: 12px;
    background: rgba(255,255,255,0.95); color: var(--primary-color);
    font-size: 10.5px; font-weight: 700; text-transform: uppercase;
    padding: 5px 12px; border-radius: 20px;
}
.blog-card-content { padding: 22px 24px 26px; display: flex; flex-direction: column; flex: 1; }
.blog-card-content h3 { font-size: 17.5px; line-height: 1.35; margin: 4px 0 10px; letter-spacing: -0.1px; }
.blog-card-content h3 a { color: var(--text-color); }
.blog-card-content h3 a:hover { color: var(--primary-color); }
.blog-card-content p { font-size: 13.5px; color: #838378; line-height: 1.65; margin: 0 0 16px; flex: 1; }

/* -------------------- PAGINAÇÃO -------------------- */
.blog-pagination { display: flex; justify-content: center; gap: 8px; margin-top: 54px; flex-wrap: wrap; }
.blog-pagination .page-numbers {
    width: 40px; height: 40px; display: flex; align-items: center; justify-content: center;
    border-radius: 50%; background: #fff; color: var(--text-color); font-weight: 700; font-size: 13px;
    border: 1px solid #ececE6; transition: 0.25s;
}
.blog-pagination .page-numbers.current { background: var(--primary-color); color: #fff; border-color: var(--primary-color); }
.blog-pagination .page-numbers:hover:not(.current) { border-color: var(--primary-color); color: var(--primary-color); }

/* -------------------- ESTADO VAZIO -------------------- */
.blog-empty { text-align: center; padding: 70px 20px; color: #b3b3ac; }
.blog-empty i { font-size: 40px; color: var(--primary-color); margin-bottom: 16px; opacity: 0.7; }
.blog-empty h2 { color: var(--text-color); margin-bottom: 8px; }

/* ==================== SIDEBAR ==================== */
.blog-sidebar { display: flex; flex-direction: column; gap: 24px; }
.blog-widget {
    background: #fff; border: 1px solid #ececE6; border-radius: 16px; padding: 26px;
}
.blog-widget-title {
    font-size: 14px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.6px;
    color: var(--text-color); margin: 0 0 18px; padding-bottom: 12px;
    border-bottom: 2px solid var(--accent-color); display: inline-block;
}
.sidebar-search { display: flex; border: 1px solid #ececE6; border-radius: 10px; overflow: hidden; }
.sidebar-search input { flex: 1; border: none; padding: 12px 14px; font-size: 13.5px; outline: none; font-family: inherit; }
.sidebar-search button { background: var(--primary-color); color: #fff; border: none; padding: 0 16px; cursor: pointer; }
.sidebar-search button:hover { background: var(--dark-brown); }

.sidebar-categories li a {
    display: flex; justify-content: space-between; align-items: center;
    padding: 11px 0; border-bottom: 1px solid #f2f2ee; font-size: 13.5px; color: var(--text-color); font-weight: 600;
    transition: 0.2s;
}
.sidebar-categories li:last-child a { border-bottom: none; }
.sidebar-categories li a:hover { color: var(--primary-color); padding-left: 4px; }
.cat-count { background: #f4f3ee; color: #999590; font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: 20px; }

.sidebar-recent-posts li { display: flex; gap: 12px; padding: 14px 0; border-bottom: 1px solid #f2f2ee; }
.sidebar-recent-posts li:last-child { border-bottom: none; padding-bottom: 0; }
.recent-post-thumb { width: 58px; height: 58px; flex-shrink: 0; border-radius: 10px; overflow: hidden; display: block; }
.recent-post-thumb img { width: 100%; height: 100%; object-fit: cover; }
.recent-post-placeholder { font-size: 15px; min-height: 58px; border-radius: 10px; }
.recent-post-info { display: flex; flex-direction: column; justify-content: center; gap: 4px; min-width: 0; }
.recent-post-info a { font-size: 13px; font-weight: 700; color: var(--text-color); line-height: 1.4; }
.recent-post-info a:hover { color: var(--primary-color); }
.recent-post-info span { font-size: 11px; color: #b3b3ac; }

/* CTA sem gradiente escuro — usa a cor principal sólida, mais sóbria */
.sidebar-cta {
    text-align: center; background: var(--primary-color); color: #fff; border: none;
}
.sidebar-cta i { font-size: 32px; margin-bottom: 12px; color: #25D366; }
.sidebar-cta h3 { font-size: 16px; margin: 0 0 8px; color: #fff; }
.sidebar-cta p { font-size: 13px; color: rgba(255,255,255,0.78); margin: 0 0 18px; line-height: 1.5; }
.sidebar-cta a {
    display: inline-block; background: #fff; color: var(--primary-color); font-weight: 700; font-size: 13px;
    padding: 12px 22px; border-radius: 30px; transition: 0.25s;
}
.sidebar-cta a:hover { background: #25D366; color: #fff; }

/* ==================== POST ÚNICO ==================== */
.single-hero { position: relative; }
.single-hero-image { position: relative; height: 380px; }
.single-hero-image img { width: 100%; height: 100%; object-fit: cover; }
/* Overlay mais leve — só o suficiente para o texto ler bem */
.single-hero-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.08) 0%, rgba(0,0,0,0.55) 100%);
}
.single-hero-content {
    position: relative; z-index: 2; padding: 50px 20px 0;
}
.single-hero:not(:has(.single-hero-image)) {
    background: #fafaf8;
    border-bottom: 1px solid #ececE6;
    padding-bottom: 44px;
    color: var(--text-color);
}
.single-hero:not(:has(.single-hero-image)) .post-meta,
.single-hero:not(:has(.single-hero-image)) .post-meta i { color: #999590; }
.single-hero:not(:has(.single-hero-image)) .post-categories a { background: rgba(63,80,46,0.07); color: var(--primary-color); }
.single-hero-image ~ .single-hero-content { position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%); width: 100%; padding: 0 20px; color: #fff; }
.single-hero-content h1 { font-size: clamp(26px, 3.6vw, 38px); margin: 6px 0 14px; line-height: 1.25; max-width: 820px; }
.single-hero-image ~ .single-hero-content .post-meta { color: rgba(255,255,255,0.85); }
.single-hero-image ~ .single-hero-content .post-meta i { color: #fff; }
.single-hero-image ~ .single-hero-content .post-categories a { background: rgba(255,255,255,0.18); color: #fff; }

.single-layout { margin-top: 46px; }
.single-post-content {
    background: #fff; border: 1px solid #ececE6; border-radius: 18px; padding: 44px 48px;
}
.entry-content { font-size: 16px; line-height: 1.85; color: #333; }
.entry-content h2 { font-size: 23px; color: var(--primary-color); margin: 36px 0 16px; letter-spacing: -0.2px; }
.entry-content h3 { font-size: 18px; color: var(--dark-brown); margin: 28px 0 14px; }
.entry-content p { margin: 0 0 20px; }
.entry-content img { max-width: 100%; border-radius: 12px; margin: 20px 0; }
.entry-content a { color: var(--primary-color); text-decoration: underline; text-decoration-color: rgba(63,80,46,0.35); }
.entry-content blockquote {
    border-left: 3px solid var(--primary-color); background: #fafaf8;
    padding: 18px 24px; margin: 26px 0; font-style: italic; color: #5c5c56; border-radius: 0 10px 10px 0;
}
.entry-content ul, .entry-content ol { margin: 0 0 20px; padding-left: 22px; }
.entry-content li { margin-bottom: 8px; }

.post-tags { margin-top: 30px; padding-top: 24px; border-top: 1px solid #ececE6; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.post-tags i { color: var(--primary-color); }
.post-tags a { font-size: 12px; background: #f4f3ee; color: #6b6b66; padding: 5px 14px; border-radius: 20px; font-weight: 600; transition: 0.2s; }
.post-tags a:hover { background: var(--primary-color); color: #fff; }

.post-share { display: flex; align-items: center; gap: 12px; margin-top: 24px; }
.post-share span { font-size: 13px; font-weight: 700; color: #999590; }
.post-share a { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 14px; transition: 0.25s; }
.share-whatsapp { background: #25D366; }
.share-facebook { background: #1877F2; }
.share-linkedin { background: #0A66C2; }
.post-share a:hover { opacity: 0.85; transform: translateY(-2px); }

.post-author-card {
    display: flex; gap: 18px; align-items: center; margin-top: 36px; padding: 24px;
    background: #fafaf8; border: 1px solid #ececE6; border-radius: 14px;
}
.author-avatar { border-radius: 50%; }
.author-label { font-size: 11px; text-transform: uppercase; color: #b3b3ac; font-weight: 700; letter-spacing: 0.4px; }
.author-name { display: block; font-size: 16px; color: var(--text-color); margin: 2px 0 6px; }
.author-bio { font-size: 13px; color: #838378; margin: 0; line-height: 1.5; }

.post-nav-links { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 36px; }
.post-nav-prev, .post-nav-next {
    display: flex; align-items: center; gap: 12px; padding: 18px 20px;
    background: #fafaf8; border: 1px solid #ececE6; border-radius: 12px; font-size: 13px; transition: 0.25s;
}
.post-nav-next { justify-content: flex-end; text-align: right; }
.post-nav-links i { color: var(--primary-color); }
.post-nav-links span { display: block; color: #b3b3ac; font-size: 11px; text-transform: uppercase; }
.post-nav-links strong { color: var(--text-color); font-size: 13.5px; }
.post-nav-prev:hover, .post-nav-next:hover { background: var(--primary-color); border-color: var(--primary-color); }
.post-nav-prev:hover *, .post-nav-next:hover * { color: #fff !important; }

.related-posts { margin-top: 46px; padding-top: 36px; border-top: 1px solid #ececE6; }
.related-posts h3 { font-size: 19px; margin-bottom: 20px; color: var(--text-color); }
.related-posts-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.related-post-card { display: block; border-radius: 12px; overflow: hidden; background: #fafaf8; border: 1px solid #ececE6; transition: border-color 0.25s; }
.related-post-card:hover { border-color: #d8d8ce; }
.related-post-card img { width: 100%; height: 130px; object-fit: cover; display: block; }
.related-post-card span { display: block; padding: 12px 14px; font-size: 13px; font-weight: 700; color: var(--text-color); line-height: 1.4; }
.related-post-card:hover span { color: var(--primary-color); }

/* ==================== COMENTÁRIOS ==================== */
.blog-comments { margin-top: 46px; padding-top: 36px; border-top: 1px solid #ececE6; }
.comments-title { font-size: 19px; margin-bottom: 22px; }
.comment-list { list-style: none; margin: 0 0 30px; padding: 0; }
.comment-list .comment { background: #fafaf8; border: 1px solid #ececE6; border-radius: 12px; padding: 18px; margin-bottom: 14px; }
.comment-author .fn { font-weight: 700; font-size: 14px; color: var(--text-color); }
.comment-metadata { font-size: 11px; color: #b3b3ac; margin-bottom: 8px; }
.comment-content p { font-size: 13.5px; color: #5c5c56; line-height: 1.6; }
.comment-respond { background: #fafaf8; border: 1px solid #ececE6; border-radius: 14px; padding: 28px; }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form textarea {
    width: 100%; border: 1px solid #e4e4de; border-radius: 10px; padding: 12px 14px;
    font-family: inherit; font-size: 13.5px; outline: none; margin-top: 6px; transition: border-color 0.2s;
}
.comment-form input[type="text"]:focus, .comment-form input[type="email"]:focus, .comment-form textarea:focus {
    border-color: var(--primary-color);
}
.comment-form label { font-size: 12.5px; font-weight: 700; color: #6b6b66; }
.comment-submit-btn {
    background: var(--primary-color); color: #fff; border: none; font-weight: 700;
    padding: 12px 28px; border-radius: 30px; cursor: pointer; font-size: 13px; margin-top: 10px; transition: 0.25s;
}
.comment-submit-btn:hover { background: var(--dark-brown); }

/* ==================== RESPONSIVO ==================== */
@media (max-width: 1024px) {
    .blog-layout { grid-template-columns: 1fr; }
    .blog-sidebar { order: -1; }
    .featured-post { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
    .blog-grid { grid-template-columns: 1fr; }
    .single-post-content { padding: 30px 22px; }
    .post-nav-links { grid-template-columns: 1fr; }
    .related-posts-grid { grid-template-columns: 1fr 1fr; }
    .single-hero-image { height: 260px; }
    .blog-hero-section { padding: 44px 0 40px; }
}