/* RESET */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primaria: #7b2cbf;
  --primaria-dark: #5a189a;
  --texto: #111;
  --texto-suave: #555;
  --cinza: #f5f5f5;
  --radius: 8px;
}

body {
  font-family: 'Inter', sans-serif;
  background: #fff;
  color: var(--texto);
}

h1, h2, h3, h4 {
  font-family: 'DM Sans', sans-serif;
}

/* ==========================
   SECÇÃO PRINCIPAL
=========================== */
.blog-section {
  width: 100%;
  padding: 60px 20px;
  background: #f4f1ed;
  text-align: center;
}

.section-title {
  font-size: 2.2rem;
  letter-spacing: 1px;
  color: var(--texto);
  margin-bottom: 10px;
  font-weight: 600;
}

.section-sub {
  color: var(--texto-suave);
  font-size: 1rem;
  margin-bottom: 35px;
}

/* ==========================
   BUSCA
=========================== */
.blog-search {
  margin-bottom: 35px;
  display: flex;
  justify-content: center;
  gap: 10px;
}

.blog-search input {
  width: 290px;
  padding: 12px 15px;
  border-radius: var(--radius);
  border: 1px solid #ddd;
  background: #fff;
  transition: .2s;
}

.blog-search input:focus {
  outline: none;
  border-color: var(--primaria);
}

.blog-search .btn {
  padding: 12px 20px;
  background: var(--primaria);
  border: none;
  border-radius: var(--radius);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}

.blog-search .btn:hover {
  background: var(--primaria-dark);
}

/* ==========================
   GRID DOS POSTS
=========================== */
.posts-listagem {
  max-width: 1180px;
  margin: auto;
}

.posts-grid {
  display: grid;
  gap: 30px;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

/* ==========================
   CARD
=========================== */
.post-card {
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0,0,0,0.08);
  transition: transform .2s;
}

.post-card:hover {
  transform: translateY(-4px);
}

/* IMAGEM 16:9 */
.post-img-wrapper {
  width: 100%;
  aspect-ratio: 16/9; /* 1200 x 675 */
  overflow: hidden;
}

.post-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* INFO */
.post-info {
  padding: 18px 20px;
  text-align: left;
}

.post-cat {
  font-size: .8rem;
  color: #333;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.post-info h3 {
  font-size: 1.3rem;
  margin: 10px 0;
}

.post-info h3 a {
  color: var(--texto);
  text-decoration: none;
}

.post-info h3 a:hover {
  color: var(--primaria);
}

.post-resumo {
  color: var(--texto-suave);
  font-size: .95rem;
  line-height: 1.55;
  margin-bottom: 14px;
}

.post-date {
  font-size: .8rem;
  color: #666;
}

/* ==========================
   MOBILE
=========================== */
@media (max-width: 600px) {
  .section-title {
    font-size: 1.8rem;
  }

  .blog-search {
    flex-direction: column;
  }

  .blog-search input,
  .blog-search .btn {
    width: 100%;
  }

  .posts-grid {
    grid-template-columns: 1fr;
  }
}

/* FOOTER FIX */
footer,
.footer,
#footer {
  background: #1a1423 !important;
  color: #fff !important;
}

main {
  min-height: 100vh;
}

/* ======================================================
   PAGINAÇÃO
====================================================== */
.paginacao {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin: 45px 0 20px;
    flex-wrap: wrap;
}

.pag-btn,
.pag-num {
    padding: 8px 14px;
    background: #f1f1f1;
    border-radius: var(--radius);
    color: var(--texto);
    text-decoration: none;
    font-size: .95rem;
    border: 1px solid #ddd;
    transition: .2s ease;
}

.pag-btn:hover,
.pag-num:hover {
    background: var(--primaria);
    color: #fff;
}

.pag-num.active {
    background: var(--primaria);
    color: #fff;
    border-color: var(--primaria-dark);
    font-weight: 600;
}

h1, h2, h3, h4, .title {
    font-family: 'DM Sans', sans-serif;
    font-weight: 600;
}
