:root {
    --primary: #1F497D;
    --text: #1f2937;
    --bg: #f2f4f6;
    --card-bg: #ffffff;
    --text-muted: #444444;
}

body {
    font-family: system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    margin: 0;
    padding: 20px;
}

.container {
    max-width: 800px;
    margin: 0 auto;
}

/* Flex Helpers para alinhar Ícone + Texto */
.flex-align {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--card-bg);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
}

.logo img {
    max-height: 50px;
    display: block;
}

.btn-assinar {
    background: var(--primary);
    color: white;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: bold;
    font-size: 0.9rem;
    cursor: pointer;
    border: none;
    transition: background 0.2s;
}

.btn-assinar:hover {
    background: #CE922E;
}

.btn-assinar svg {
    fill: currentColor;
    width: 20px;
    height: 20px;
}

/* Paginação por Mês */
.nav-meses { 
    display: flex; 
    gap: 10px; 
    flex-wrap: wrap; /* 1. Mágica acontece aqui: faz os botões quebrarem de linha se faltar espaço */
    margin-bottom: 25px; 
}

.btn-mes {
    background: #8EB4E3;
    color: var(--text); 
    padding: 8px 16px; 
    border-radius: 20px; 
    text-decoration: none; 
    font-size: 0.85rem; 
    /* 2. Removemos o 'white-space: nowrap' para permitir flexibilidade, se necessário */
    transition: all 0.2s; 
}

.btn-mes svg {
    fill: currentColor;
    width: 16px;
    height: 16px;
}

.btn-mes svg { fill: currentColor; width: 16px; height: 16px; }
.btn-mes.active { background: var(--primary); color: white; }

/* Blocos de Postagens */
.grid-posts {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.post-card {
    background: var(--card-bg);
    padding: 24px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.post-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.post-meta svg {
    fill: var(--text-muted);
    width: 14px;
    height: 14px;
}

.post-title {
    margin: 0 0 12px 0;
    font-size: 1.5rem;
    color: #111827;
}

.post-excerpt {
    line-height: 1.6;
    color: #4b5563;
    margin-bottom: 16px;
}

/* Regra para ocultar os cards que passam do limite na paginação */
.post-card.card-oculto {
    display: none !important;
}

.read-more {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.read-more:hover {
    color: #CE922E;
    text-decoration: underline;
}

.read-more svg {
    fill: currentColor;
    width: 18px;
    height: 18px;
    transition: transform 0.2s;
}

.read-more:hover svg {
    transform: translateX(4px);
}

/* Modal */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.modal-box {
    background: white;
    padding: 30px;
    border-radius: 12px;
    max-width: 450px;
    width: 90%;
    position: relative;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    cursor: pointer;
    color: #9ca3af;
    padding: 5px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.modal-close:hover {
    background: #f3f4f6;
    color: #111827;
}

.modal-close svg {
    fill: currentColor;
    width: 24px;
    height: 24px;
}

.modal-box h3 {
    margin-top: 0;
    font-size: 1.4rem;
    color: #111827;
}

.modal-box p {
    color: #4b5563;
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 20px;
}

/* Formulário */
.tnp-form-container {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.input-group {
    position: relative;
    width: 100%;
}

.input-group svg {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    fill: #9ca3af;
    width: 20px;
    height: 20px;
}

.input-field {
    width: 100%;
    padding: 12px 12px 12px 42px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 1rem;
    box-sizing: border-box;
    transition: all 0.2s;
}

.input-field:focus {
    outline: 2px solid var(--primary);
    border-color: transparent;
}

.btn-enviar-assinatura {
    background: var(--primary);
    color: white;
    border: none;
    padding: 14px;
    border-radius: 6px;
    font-weight: bold;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s;
    margin-top: 5px;
}

.btn-enviar-assinatura:hover {
    background: #CE922E;
}

.btn-enviar-assinatura svg {
    fill: currentColor;
    width: 20px;
    height: 20px;
}