/* Estilo Base e Variáveis */
:root {
    --primary-color: #5a2ca0;
    --text-dark: #0a2a43;
    --text-gray: #555;
    --bg-light: #f8fafc;
    --white: #ffffff;
    --shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

.blog-page {
    background-color: var(--bg-light);
    padding: 60px 0;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

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

/* Header do Blog */
.blog-header {
    text-align: center;
    margin-bottom: 50px;
}

.blog-header h1 {
    font-size: 2.5rem;
    color: var(--text-dark);
    margin-bottom: 10px;
}

/* Layout Grid - O Coração da estrutura */
.blog-layout {
    display: grid;
    grid-template-columns: 1fr 320px; /* Define tamanho fixo para sidebar */
    gap: 40px;
    align-items: start;
}

/* Post Cards */
.blog-posts {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.post-card {
    display: grid;
    grid-template-columns: 300px 1fr; /* Imagem à esquerda, texto à direita */
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
}

.post-card:hover {
    transform: translateY(-5px);
}

.post-thumb {
    width: 100%;
    height: 100%;
    min-height: 200px;
    overflow: hidden;
}

.post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Isso impede a distorção */
    transition: scale 0.5s ease;
}

.post-card:hover .post-thumb img {
    scale: 1.05;
}

.post-body {
    padding: 25px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.post-badge {
    background: #f0e7ff;
    color: var(--primary-color);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 5px 12px;
    border-radius: 20px;
    width: fit-content;
    margin-bottom: 15px;
}

.post-title {
    font-size: 1.5rem;
    margin-bottom: 15px;
    line-height: 1.3;
}

.post-title a {
    color: var(--text-dark);
    text-decoration: none;
}

.post-excerpt {
    color: var(--text-gray);
    line-height: 1.6;
    margin-bottom: 20px;
}

.post-readmore {
    color: var(--primary-color);
    font-weight: 700;
    text-decoration: none;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
}

/* Sidebar */
.blog-sidebar {
    position: sticky;
    top: 20px;
    background: var(--white);
    padding: 30px;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.sidebar-title {
    font-size: 1.25rem;
    color: var(--text-dark);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #eee;
}

.category-btn {
    display: block;
    padding: 12px 15px;
    margin-bottom: 8px;
    border-radius: 8px;
    background: #f1f5f9;
    color: var(--text-gray);
    text-decoration: none;
    transition: all 0.3s ease;
}

.category-btn:hover, .category-btn.active {
    background: var(--primary-color);
    color: var(--white);
}

/* Estilos para a página do POST ÚNICO */
.blog-single {
    background: var(--white);
    max-width: 900px;
    margin: 40px auto;
    padding: 40px;
    border-radius: 15px;
    box-shadow: var(--shadow);
}

.post-image {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 30px;
}

.post-content {
    line-height: 1.8;
    font-size: 1.1rem;
    color: #333;
}

.post-content img { max-width: 100%; border-radius: 8px; }

/* Responsivo */
@media (max-width: 992px) {
    .blog-layout { grid-template-columns: 1fr; }
    .post-card { grid-template-columns: 1fr; }
    .post-thumb { height: 250px; }
}