/*
Theme Name: HQ Branco
Version: 1.3
*/

/* ================= RESET ================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Inter, Arial, sans-serif;
  background: #ffffff;
  color: #111;
  transition: background .3s, color .3s;
}

/* ================= HEADER ================= */
.site-header {
  background: #000;
  border-bottom: 1px solid #111;
  position: relative;
  z-index: 10;
}

.header-container {
  max-width: 1280px;
  margin: auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 40px; /* espaço entre logo e menu */
}

/* LOGO */
.logo img {
  max-height: 42px;
  display: block;
}

.logo {
  font-size: 26px;
  font-weight: 900;
  color: #fff;
  text-decoration: none;
  z-index: 2;
}

/* MENU */
.main-menu {
  display: flex;
  margin-left: 60px; /* distância da logo */
}

.main-menu ul {
  display: flex;
  gap: 28px;
  list-style: none;
}

.main-menu a {
  color: #ccc;
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  position: relative;
  padding: 6px 0;
}

.main-menu a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: var(--primary-color);
  transition: .25s;
}

.main-menu a:hover::after,
.current-menu-item a::after {
  width: 100%;
}

/* HAMBURGER */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  cursor: pointer;
  z-index: 10;
}

.menu-toggle span {
  width: 26px;
  height: 3px;
  background: #fff;
  border-radius: 2px;
  transition: .3s;
}

.menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}
.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}
.menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* SEARCH */
.header-search {
  display: flex; /* DESKTOP: campo visível por padrão */
  align-items: center;
  margin-left: auto;
  gap: 5px;
}

.header-search input {
  padding: 10px 15px;
  border-radius: 30px;
  border: 1px solid #222;
  background: #111;
  color: #fff;
  font-size: 14px;
}

.header-search button {
  padding: 8px 12px;
  border: none;
  border-radius: 30px;
  background: var(--primary-color);
  color: #fff;
  cursor: pointer;
}

/* ÍCONE SEARCH MOBILE */
.search-toggle {
  display: none; /* só mobile */
  background: none;
  border: none;
  font-size: 18px;
  color: #fff;
  cursor: pointer;
  margin-left: auto;
  z-index: 3;
}

/* ANÚNCIO HEADER */
.ad-header {
  max-width: 1280px;
  margin: 12px auto 0;
  text-align: center;
}

/* ================= CONTAINER PRINCIPAL ================= */
.container {
  max-width: 1280px;
  margin: auto;
  padding: 60px 24px;
}

/* ================= TÍTULO "Últimos HQs adicionados" ================= */
.posts-title {
  font-size: 28px;
  font-weight: 900;
  color: #111;
  margin-bottom: 30px;
  display: flex;
  align-items: center;
}

.posts-title span {
  display: inline-block;
  width: 6px;
  height: 28px;
  background: var(--primary-color);
  margin-left: 12px;
  border-radius: 2px;
}

/* ================= POSTS + SIDEBAR ================= */
.posts-container {
  display: flex;
  gap: 40px;
  align-items: flex-start;
  flex-wrap: wrap; /* permite mobile */
}

/* GRID DE POSTS */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr); /* 4 cards por linha */
  gap: 36px;
}

/* POST CARD */
.post-card {
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  position: relative;
  transition: transform 0.3s, box-shadow 0.3s;
}

.post-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

/* THUMBNAIL */
.post-thumb {
  position: relative;
  height: 460px;
  overflow: hidden;
}

.post-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.post-card:hover .post-thumb img {
  transform: scale(1.06);
}

/* STATUS */
.hq-status {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 8px 14px;
  border-radius: 18px;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  text-transform: uppercase;
  z-index: 9;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.status-novo { background: #2ecc71; }         /* verde */
.status-atualizado { background: #3498db; }  /* azul */
.status-finalizado { background: #e74c3c; }  /* vermelho */

/* CONTEÚDO CARD */
.post-content {
  padding: 16px;
}

.post-title {
  font-size: 16px;
  font-weight: 800;
  margin-bottom: 8px;
  color: #111;
}

.post-title a { text-decoration: none; color: inherit; }

.post-desc {
  font-size: 14px;
  color: #555;
  line-height: 1.5;
}

/* PAGINAÇÃO */
.pagination {
  margin: 40px 0;
  text-align: center;
}

.pagination a,
.pagination span {
  display: inline-block;
  padding: 10px 16px;
  margin: 0 4px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  color: #111;
  border: 2px solid var(--primary-color);
  transition: all .25s ease;
}

/* hover */
.pagination a:hover {
  background: var(--primary-color);
  color: #fff;
}

/* página atual */
.pagination .current {
  background: var(--primary-color);
  color: #fff;
  border-color: var(--primary-color);
}


/* ================= LEITOR DE HQ ================= */
.hq-layout {
  max-width: 1400px;
  margin: auto;
  padding: 70px 20px;
  display: grid;
  grid-template-columns: 1fr 340px; /* Desktop: conteúdo + sidebar */
  gap: 70px;
  align-items: start;
}

.hq-reader {
  display: flex;
  flex-direction: column;
}

/* Header HQ */
.hq-header {
  text-align: center;
  margin-bottom: 40px;
}

.hq-title {
  font-size: 32px;
  font-weight: 900;
  margin-bottom: 10px;
}

.hq-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  margin-top: 8px;
  background: var(--primary-color);
  border-radius: 4px;
}

/* Categorias */
.hq-meta {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}

.hq-meta a {
  display: inline-block;
  margin-right: 8px;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
  transition: all .25s ease;
}

.hq-meta a:hover {
  background: var(--primary-color);
  color: #fff;
}

/* Dark Toggle */
.dark-toggle {
  margin-top: 26px;
  padding: 10px 26px;
  border-radius: 30px;
  border: 1px solid #ddd;
  background: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

/* Conteúdo HQ */
.hq-content {
  display: flex;
  flex-direction: column;
  gap: 26px;
}

.hq-content a {
  color: var(--primary-color);
  font-weight: 700;
  text-decoration: underline;
}

.hq-content a:hover {
  opacity: .85;
}

.hq-content img {
  width: 100%;
  border-radius: 6px;
}

/* ================= SIDEBAR ================= */

.hq-sidebar {
  width: 300px;
  flex-shrink: 0;
  position: sticky;
  top: 40px;
}

/* SIDEBAR POSTS */
.sidebar-post {
  display: flex;
  gap: 14px;
  margin-bottom: 18px;
  padding: 14px;
  border-radius: 10px;
  background: #fafafa;
  text-decoration: none;
  color: inherit;
  transition: 0.2s;
}

.sidebar-post:hover { background: #f0f0f0; }

.sidebar-post img {
  width: 72px;
  height: 100px;
  object-fit: cover;
  border-radius: 6px;
}

.sidebar-post:hover span {
  color: var(--primary-color);
}

.hq-sidebar h3 {
  font-size: 20px;
  font-weight: 900;
  margin-bottom: 16px;
}

.hq-sidebar h3::after {
  content: '';
  display: block;
  width: 40px;
  height: 3px;
  margin-top: 6px;
  background: var(--primary-color);
  border-radius: 3px;
}

/* Mais vistos */
.sidebar-post {
  display: flex;
  gap: 14px;
  margin-bottom: 18px;
  padding: 14px;
  border-radius: 10px;
  background: #fafafa;
  text-decoration: none;
  color: inherit;
}

.sidebar-post:hover {
  background: #f0f0f0;
}

.sidebar-post img {
  width: 72px;
  height: 100px;
  object-fit: cover;
  border-radius: 6px;
}

.sidebar-post:hover span {
  color: var(--primary-color);
}

/* ================= HQs RELACIONADAS ================= */
.related-hqs {
  margin-top: 80px;
}

.related-hqs h3 {
  font-size: 22px;
  font-weight: 900;
  margin-bottom: 20px;
  position: relative;
}

.related-hqs h3::after {
  content: '';
  display: block;
  width: 40px;
  height: 3px;
  margin-top: 6px;
  background: var(--primary-color);
  border-radius: 3px;
}

/* GRID */
.related-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 26px;
}

/* CARD */
.related-grid .post-card {
  position: relative;
  height: 260px;
  border-radius: 14px;
  overflow: hidden;
  background: #000;
  transition: transform .35s ease, box-shadow .35s ease;
}

.related-grid .post-card:hover {
  transform: translateY(-6px) scale(1.03);
  box-shadow: 0 18px 40px rgba(0,0,0,.35);
}

/* LINK */
.related-grid .related-card {
  display: block;
  width: 100%;
  height: 100%;
  text-decoration: none; /* REMOVE SUBLINHADO */
  position: relative;
}

/* IMAGEM FULL */
.related-grid .related-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}

.related-grid .post-card:hover img {
  transform: scale(1.08);
}

/* OVERLAY */
.related-grid .related-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0,0,0,.85) 0%,
    rgba(0,0,0,.25) 50%,
    rgba(0,0,0,0) 100%
  );
}

/* TÍTULO SOBREPOSTO */
.related-grid .related-card h4 {
  position: absolute;
  bottom: 14px;
  left: 14px;
  right: 14px;
  z-index: 2;
  margin: 0;

  font-size: 15px;
  font-weight: 800;
  color: #fff;
  line-height: 1.3;
  text-shadow: 0 3px 10px rgba(0,0,0,.6);
  transition: color .25s ease;
}

.related-grid .post-card:hover h4 {
  color: var(--primary-color);
}



/* ================= COMENTÁRIOS ================= */
.comments-area {
    margin-top: 80px;
}

.comments-area h3 {
    font-size: 28px;
    font-weight: 900;
    margin-bottom: 30px;
    color: #111;
    border-bottom: 3px solid var(--primary-color);
    display: inline-block;
    padding-bottom: 6px;
}

/* LISTA DE COMENTÁRIOS */
.comment-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.comment {
    display: flex;
    gap: 16px;
    background: #fff;
    padding: 20px;
    border-radius: 16px;
    margin-bottom: 20px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.08);
    transition: transform 0.2s, box-shadow 0.2s;
}

.comment:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.12);
}

/* AUTOR */
.comment-author img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary-color);
}

.comment-body {
    flex: 1;
}

.comment-author {
    font-weight: 700;
    font-size: 15px;
    color: #111;
    margin-bottom: 4px;
}

.comment-meta {
    font-size: 13px;
    color: #777;
    margin-bottom: 8px;
}

/* CONTEÚDO DO COMENTÁRIO */
.comment-content {
    font-size: 15px;
    line-height: 1.6;
    color: #333;
}

/* ================= FORMULÁRIO ================= */
.comment-form {
    margin-top: 40px;
    background: #fdfdfd;
    padding: 30px;
    border-radius: 18px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}

/* Inputs */
.comment-form input,
.comment-form textarea {
    width: 100%;
    padding: 16px 18px;
    border-radius: 12px;
    border: 1px solid #ddd;
    margin-bottom: 16px;
    font-size: 15px;
    transition: all 0.25s ease;
}

/* Focus nos inputs */
.comment-form input:focus,
.comment-form textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    outline: none;
}

.comment-form textarea {
    min-height: 120px;
    resize: vertical;
}

/* ================= BOTÃO PUBLICAR COMENTÁRIO ================= */
.comment-form button {
    display: block;                /* garante que o botão seja um bloco completo */
    width: 100%;                   /* ocupa toda a largura */
    padding: 16px 0;
    border: none;                  /* remove borda */
    border-radius: 30px;           /* cantos arredondados */
    font-weight: 800;
    font-size: 16px;
    color: #fff;                   /* texto branco */
    cursor: pointer;
    background: linear-gradient(135deg, var(--primary-color) 0%, #000 100%) !important; /* gradiente */
    box-shadow: 0 6px 18px rgba(0,0,0,0.12);  /* sombra suave */
    transition: all 0.25s ease;
    text-align: center;
}

/* Hover */
.comment-form button:hover {
    opacity: 0.95;
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(0,0,0,0.15);
}



/* ================= RESPONSIVO ================= */
/* RESPONSIVO */
@media (max-width: 1100px) {
  .posts-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 700px) {
  .posts-grid {
    grid-template-columns: repeat(2, 1fr); /* 2 cards lado a lado no mobile */
  }

  .posts-container {
    flex-direction: column;
  }

  .hq-sidebar {
    width: 100%;
    position: relative;
    top: 0;
    order: 2;
    margin-top: 30px;
  }
}

@media (max-width: 500px) {
  .posts-grid {
    grid-template-columns: 1fr; /* 1 card por linha */
  }
}

@media (max-width: 768px) {
    .comment {
        flex-direction: column;
        gap: 12px;
    }

    .comment-author img {
        width: 46px;
        height: 46px;
    }

    .comment-form {
        padding: 24px;
    }

    .comment-form button {
        font-size: 15px;
        padding: 14px 0;
    }
}

@media (max-width: 480px) {
    .comments-area h3 {
        font-size: 22px;
        padding-bottom: 4px;
    }

    .comment-author {
        font-size: 14px;
    }

    .comment-meta {
        font-size: 12px;
    }

    .comment-content {
        font-size: 14px;
    }

    .comment-form input,
    .comment-form textarea {
        font-size: 14px;
        padding: 12px 14px;
    }

    .comment-form button {
        font-size: 14px;
        padding: 12px 0;
    }
}

/* ================= COMENTÁRIOS - DARK MODE ================= */
body.dark-mode .comments-area {
    background: #121212;
}

body.dark-mode .comments-area h3 {
    color: #fff;
    border-bottom-color: var(--primary-color);
}

body.dark-mode .comment {
    background: #1e1e1e;
    box-shadow: 0 6px 18px rgba(0,0,0,0.3);
}

body.dark-mode .comment:hover {
    box-shadow: 0 12px 24px rgba(0,0,0,0.45);
}

body.dark-mode .comment-author {
    color: #fff;
}

body.dark-mode .comment-meta {
    color: #aaa;
}

body.dark-mode .comment-content {
    color: #ddd;
}

body.dark-mode .comment-author img {
    border: 2px solid var(--primary-color);
}

body.dark-mode .comment-form {
    background: #1a1a1a;
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

body.dark-mode .comment-form input,
body.dark-mode .comment-form textarea {
    background: #2a2a2a;
    border: 1px solid #555;
    color: #fff;
}

body.dark-mode .comment-form input::placeholder,
body.dark-mode .comment-form textarea::placeholder {
    color: #aaa;
}

body.dark-mode .comment-form input:focus,
body.dark-mode .comment-form textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

body.dark-mode .comment-form button {
    background: linear-gradient(135deg, var(--primary-color) 0%, #222 100%) !important;
    color: #fff;
    box-shadow: 0 6px 18px rgba(0,0,0,0.3);
}

body.dark-mode .comment-form button:hover {
    box-shadow: 0 8px 22px rgba(0,0,0,0.45);
    opacity: 0.95;
}




/* ================= RANKING MAIS VISTOS ================= */
.hq-ranking {
  position: absolute;
  top: 14px;
  right: 14px;
  background: #000;
  color: #fff;
  font-size: 14px;
  font-weight: 900;
  padding: 6px 12px;
  border-radius: 20px;
  z-index: 8;
  box-shadow: 0 4px 12px rgba(0,0,0,.4);
}

/* Destaque especial para TOP 3 */
.post-card:nth-child(1) .hq-ranking {
  background: linear-gradient(135deg, #ffd700, #ffb700); /* ouro */
  color: #000;
}

.post-card:nth-child(2) .hq-ranking {
  background: linear-gradient(135deg, #c0c0c0, #a9a9a9); /* prata */
  color: #000;
}

.post-card:nth-child(3) .hq-ranking {
  background: linear-gradient(135deg, #cd7f32, #b87333); /* bronze */
  color: #000;
}


/* ================= Tabs mais vistos ================= */
.ranking-tabs {
  display: flex;
  gap: 12px;
  margin-bottom: 30px;
}

.tab-btn {
  padding: 10px 22px;
  border-radius: 30px;
  border: none;
  background: #eee;
  font-weight: 700;
  cursor: pointer;
}

.tab-btn.active {
  background: #7a3cff;
  color: #fff;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* ================= CATEGORIAS ================= */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr); /* Desktop */
  gap: 26px;
  margin-top: 40px;
}

/* CARD DA CATEGORIA */
.category-card {
  background: #fff;
  border-radius: 14px;
  padding: 40px 20px;
  text-align: center;
  text-decoration: none;
  border: 2px solid #eee;
  transition: all .3s ease;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 140px;
}

.category-card:hover {
  border-color: #c200ff;
  transform: translateY(-6px);
  box-shadow: 0 18px 40px rgba(0,0,0,.15);
}

/* NOME */
.category-name {
  font-size: 20px;
  font-weight: 900;
  color: #111;
  margin-bottom: 8px;
  text-transform: uppercase;
}

/* CONTADOR */
.category-count {
  font-size: 13px;
  font-weight: 700;
  color: #777;
}

/* BREADCRUMB */
.hq-breadcrumb {
  font-size: 13px;
  margin-bottom: 14px;
  color: #888;
}

.hq-breadcrumb a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
}

.hq-breadcrumb span {
  margin: 0 6px;
}

/* ================= ANÚNCIO NO MEIO DO POST ================= */
.ad-middle {
  margin: 40px auto;
  text-align: center;
  background: none;
  padding: 0;
  border: none;
}

/* NÃO força tamanho */
.ad-middle img,
.ad-middle iframe {
  display: inline-block;
  max-width: none;
  width: auto;
  height: auto;
}

.ad-sidebar {
  margin-bottom: 30px;
  text-align: center;
}
/* ================= ANÚNCIO SIDEBAR ================= */
.ad-sidebar img,
.ad-sidebar iframe {
  max-width: none; /* IMPORTANTE */
}

/* ================= PEDIDOS ================= */
.pedidos-container {
    max-width: 600px;
    margin: 40px auto;
    padding: 20px;
    background: #111;
    color: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
    font-family: Inter, Arial, sans-serif;
}

.pedidos-title {
    font-size: 28px;
    font-weight: 900;
    margin-bottom: 10px;
    text-align: center;
    color: var(--primary-color);
}

.pedidos-desc {
    font-size: 14px;
    margin-bottom: 20px;
    text-align: center;
    color: #ccc;
}

.pedidos-form .campo {
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
}

.pedidos-form label {
    margin-bottom: 5px;
    font-weight: 600;
}

.pedidos-form input,
.pedidos-form textarea {
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid #222;
    background: #222;
    color: #fff;
    font-size: 14px;
    resize: vertical;
}

.pedidos-form textarea {
    min-height: 80px;
}

.btn-enviar {
    background: var(--primary-color);
    color: #fff;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.3s;
}

.btn-enviar:hover {
    background: #c200ffcc;
}

.pedido-sucesso, .pedido-erro {
    text-align: center;
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.pedido-sucesso {
    background: #1b381b;
    color: #0f0;
}

.pedido-erro {
    background: #381b1b;
    color: #f00;
}

.pedido-acoes {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 10px;
}

.btn-pedido {
    display: inline-block;
    padding: 10px 18px;
    background: var(--primary-color);
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 700;
    transition: 0.3s;
}

.btn-pedido:hover {
    background: #c200ffcc;
}

/* BOTÃO FLOUTANTE */
.hf-btn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 9999;
  background-color: var(--primary-color);
  border: none;
  color: #fff;
  padding: 14px 18px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 24px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  transition: 0.3s;
}
.hf-btn:hover { opacity: 0.85; }

/* BOTÃO FAVORITAR */
.fav-btn {
  padding: 8px 16px;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.2s;
  background: var(--primary-color);
  color: #fff;
}
.fav-btn:hover { opacity: 0.85; }

/* MODAL */
.hf-modal {
  display: none;
  position: fixed;
  z-index: 9998;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.6);
}
.hf-modal-content {
  background-color: #fff;
  margin: 40px auto;
  padding: 20px;
  border-radius: 12px;
  max-width: 1200px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
}
.hf-close {
  color: #aaa;
  position: absolute;
  top: 10px;
  right: 20px;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}
.hf-close:hover { color: #000; }

.hf-tabs { display: flex; gap: 10px; margin-bottom: 15px; }
.hf-tab { flex:1; padding: 10px 15px; border:none; background:#eee; border-radius:6px; cursor:pointer; font-weight:600; transition:0.2s; }
.hf-tab.active { background: var(--primary-color); color: #fff; }

.hf-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(220px,1fr)); gap: 15px; margin-bottom: 15px; }
.hf-grid .hf-card { border: 1px solid #ddd; border-radius: 6px; overflow: hidden; text-align: center; background: #fff; cursor:pointer; }
.hf-grid .hf-card img { width: 100%; height:auto; display:block; }
.hf-grid .hf-card h4 { padding: 8px; font-size: 14px; font-weight:600; }

.hf-pagination { display:flex; justify-content:center; gap:6px; flex-wrap:wrap; margin-bottom:10px; }
.hf-pagination a, .hf-pagination span {
  background: var(--primary-color);
  color: #fff;
  border-radius:6px;
  padding:6px 12px;
  font-weight:600;
  text-decoration:none;
  cursor:pointer;
  transition:0.3s;
}
.hf-pagination a:hover { opacity:0.85; }
.hf-pagination .current { background:#333; color:#fff; }

.hf-clear {
  background: var(--primary-color);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 8px 14px;
  margin-right: 10px;
  cursor: pointer;
  font-weight: 600;
  margin-top: 10px;
}
.hf-clear:hover { opacity:0.85; }

/* ================= FOOTER ================= */
.site-footer {
  background: #000;
  padding: 80px 24px 40px;
  margin-top: 120px;
}

/* TEXTO SEO */
.footer-about {
  max-width: 900px;
  margin: 0 auto 60px;
  text-align: center;
}

.footer-about p {
  color: #bbb;
  font-size: 15px;
  line-height: 1.7;
}

.footer-about strong {
  color: #fff;
}

/* GRID */
.footer-container {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 80px;
}

/* COLUNAS */
.footer-col h4 {
  position: relative;
  color: #fff;
  font-size: 17px;
  font-weight: 900;
  margin-bottom: 26px;
  padding-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Linha decorativa */
.footer-col h4::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 36px;
  height: 3px;
  background: linear-gradient(
    90deg,
    var(--primary-color),
    transparent
  );
  border-radius: 2px;
}

.footer-links {
  list-style: none;
  padding: 0;
}

.footer-links li {
  margin-bottom: 12px;
}

.footer-links a {
  color: #aaa;
  font-size: 14px;
  text-decoration: none;
  transition: color .2s;
}

.footer-links a:hover {
  color: var(--primary-color);
}

/* COPYRIGHT */
.copyright {
  margin-top: 60px;
  text-align: center;
  font-size: 12px;
  color: #666;
}

/* ================== CONTAINER ================== */
.hq-search-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* ================== SEARCH HEADER ================== */
.hq-search-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 30px;
}

.hq-search-header h1 {
    font-size: 28px;
    font-weight: 800;
    margin: 0;
    color: #111;
}

.hq-search-header .hq-search-count {
    font-size: 16px;
    font-weight: 500;
    color: #555;
    margin-top: 10px;
}

/* ================== SEARCH RESULTS GRID ================== */
.hq-search-results {
    width: 100%;
}

.hq-search-results .hq-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* 4 colunas desktop */
    gap: 24px;
    width: 100%;
    justify-items: center;
}

/* CARDS INDIVIDUAIS */
.hq-search-results .post-card {
    width: 100%;
    max-width: 250px;
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
    transition: transform 0.25s, box-shadow 0.25s;
    text-align: center;
    cursor: pointer;
}

.hq-search-results .post-card a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.hq-search-results .post-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: transform 0.3s;
}

.hq-search-results .post-card:hover img {
    transform: scale(1.05);
}

.hq-search-results .post-card h4 {
    font-size: 15px;
    font-weight: 700;
    padding: 10px;
    margin: 0;
}

.hq-search-results .post-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 28px rgba(0,0,0,0.15);
}

/* PAGINAÇÃO */
.hq-search-results .hq-pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 30px;
}

.hq-search-results .hq-pagination a,
.hq-search-results .hq-pagination span {
    background: var(--primary-color);
    color: #fff;
    border-radius: 6px;
    padding: 8px 14px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: 0.3s;
}

.hq-search-results .hq-pagination a:hover {
    opacity: 0.85;
}

.hq-search-results .hq-pagination .current {
    background: #333;
}

/* ================= RESPONSIVO ================= */

/* Tablets */
@media (max-width: 992px) {
    .hq-search-results .hq-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Mobile */
@media (max-width: 768px) {
    .hq-search-results .hq-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .hq-search-results .post-card {
        max-width: 100%;
    }
}

/* Smartphones */
@media (max-width: 480px) {
    .hq-search-results .hq-grid {
        grid-template-columns: 1fr;
    }

    .hq-search-header h1 {
        font-size: 22px;
    }

    .hq-search-header .hq-search-count {
        font-size: 14px;
    }

    .hq-search-results .post-card h4 {
        font-size: 14px;
    }
}


/* =========================================================================== */
/* ================= SINGLE HQ ================= */

.hq-layout {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
}

/* ================= BREADCRUMB ================= */
.hq-breadcrumb {
  font-size: 13px;
  color: #777;
  margin-bottom: 16px;
}

/* ================= CARD DO HQ ================= */

.hq-header-card {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 28px;
  background: #f6f7fb;
  padding: 26px;
  border-radius: 16px;
  align-items: start;
  overflow: hidden;
}

/* DARK MODE */
body.dark-mode .hq-header-card {
  background: #1b1d2b;
}

/* ================= THUMB ================= */

.hq-cover-small img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 12px;
}

/* ================= INFO (COLUNA ÚNICA REAL) ================= */

.hq-header-info {
  display: grid;
  grid-template-rows: auto auto auto auto auto;
  row-gap: 10px;
  align-content: start;
}

/* TÍTULO */
.hq-title {
  margin: 0;
  font-size: 26px;
  line-height: 1.25;
  color: #111;
}

/* DESCRIÇÃO */
.hq-description {
  font-size: 15px;
  line-height: 1.6;
  color: #333;
}

/* ================= META (AGORA ALINHADO COM DESCRIÇÃO) ================= */
.hq-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-start;
  max-width: 100%;
}

/* ANO */
.hq-year {
  font-weight: 600;
}

/* CATEGORIAS */
.hq-categories {
  display: flex;
  flex-wrap: wrap;        /* 🔥 PERMITE QUEBRAR LINHA */
  gap: 8px;
  max-width: 100%;        /* 🔥 IMPEDE ESTOURO */
}

/* LINKS */
.hq-categories a {
  background: #e9ecf2;
  padding: 4px 12px;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  color: #333;
  white-space: nowrap;   /* mantém cada tag inteira */
}

/* KEYWORDS */
.hq-keywords {
  font-size: 13px;
  color: #777;
  font-style: italic;
}


/* ================= AÇÕES ================= */

.hq-actions {
  gap: 10px;
  margin-top: 6px;
}

/* ================= CAPÍTULOS ================= */

.hq-capitulos-premium {
  background: #fff;
  border-radius: 16px;
  padding: 26px;
  margin-top: 28px;
  box-shadow: 0 8px 25px rgba(0,0,0,.05);
}

.capitulo-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}

.capitulo-header h2 {
  margin: 0;
  font-size: 22px;
  color: #111;
}

/* BOTÃO PREMIUM */
.capitulo-order-btn {
  padding: 8px 18px;
  border-radius: 10px;
  border: none;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  background: linear-gradient(
    135deg,
    var(--primary-color),
    color-mix(in srgb, var(--primary-color) 70%, #000)
  );

  color: #fff;

  box-shadow: 
    0 6px 18px color-mix(in srgb, var(--primary-color) 45%, transparent);

  transition: 
    transform .25s ease,
    box-shadow .25s ease,
    filter .25s ease;
}

.capitulo-order-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.05);
  box-shadow: 
    0 10px 26px color-mix(in srgb, var(--primary-color) 55%, transparent);
}

/* ACTIVE */
.capitulo-order-btn:active {
  transform: translateY(0);
  box-shadow: 
    0 4px 12px color-mix(in srgb, var(--primary-color) 40%, transparent);
}

/* LISTA */
.capitulo-premium-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.capitulo-item {
  padding: 16px 0;
  border-bottom: 1px solid #eee;
}

.capitulo-item:last-child {
  border-bottom: none;
}

.capitulo-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.capitulo-title a {
  font-size: 16px;
  font-weight: 600;
  color: #111;
  text-decoration: none;
}

.capitulo-excerpt {
  font-size: 14px;
  color: #555;
}

/* REMOVE ITENS INDESEJADOS */
.capitulo-thumb,
.capitulo-meta {
  display: none !important;
}

/* ======================================================
   HEADER DO CAPÍTULO
====================================================== */
.capitulo-header {
  text-align: center;
  margin-bottom: 28px;
}



/* ======================================================
   NAVEGAÇÃO DE CAPÍTULOS (PREMIUM)
====================================================== */
.capitulo-navigation {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  margin: 32px 0;
  flex-wrap: wrap;
}

/* BOTÕES PADRÃO */
.cap-btn {
  padding: 10px 24px;
  border-radius: 16px;
  text-decoration: none;

  font-size: 14px;
  font-weight: 600;

  background: linear-gradient(
    135deg,
    var(--primary-color),
    color-mix(in srgb, var(--primary-color) 70%, #000)
  );

  color: #fff;

  box-shadow:
    0 6px 18px color-mix(in srgb, var(--primary-color) 45%, transparent);

  transition:
    transform .25s ease,
    box-shadow .25s ease,
    filter .25s ease;
}

.cap-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.05);
  box-shadow:
    0 12px 34px color-mix(in srgb, var(--primary-color) 65%, transparent);
}

/* BOTÃO LISTA DE CAPÍTULOS */
.cap-btn-list {
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--primary-color) 25%, #000),
    color-mix(in srgb, var(--primary-color) 10%, #000)
  );

  box-shadow:
    0 6px 18px rgba(0,0,0,.45);
}

.cap-btn-list:hover {
  filter: brightness(1.08);
  box-shadow:
    0 12px 32px rgba(0,0,0,.65);
}

/* ======================================================
   CONTEÚDO DO CAPÍTULO
====================================================== */
.capitulo-content {
  max-width: 820px;
  margin: 0 auto;
  line-height: 1.75;
  font-size: 16px;
}

/* ======================================================
   CONTAINER DE DADOS HQ/CAPÍTULOS (HISTÓRICO / FAVORITOS)
   NÃO PARTICIPA DO LAYOUT
====================================================== */
.hq-cap-reader {
  position: absolute !important;
  width: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* ======================================================
   MOBILE
====================================================== */
@media (max-width: 768px) {

  .capitulo-navigation {
    gap: 10px;
  }

  .cap-btn {
    width: 100%;
    text-align: center;
  }
}

/* ================= CONTAINER ================= */
.premium-hq-container,
main.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
    font-family: 'Roboto', sans-serif;
    color: #333;
}

/* ================= TÍTULO ================= */
.posts-title {
    font-size: 2.2rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 2rem;
    position: relative;
}

.posts-title span {
  display: inline-block;
  width: 4px;      /* comprimento da linha */
  height: 30px;      /* espessura */
  background: var(--primary-color);
  margin-left: 12px; /* distância do título */
  border-radius: 2px;
  vertical-align: middle; /* alinha com o centro do texto */
}

/* ================= FILTROS PREMIUM ================= */
.premium-filters,
.premium-alphabet {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.filter-label {
    font-weight: 600;
    margin-right: 0.5rem;
    align-self: center;
}

.filter-btn,
.alpha-btn {
    padding: 0.5rem 0.9rem;
    border: none;
    background: #eee;
    color: #333;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    transition: 
        transform 0.25s ease,
        box-shadow 0.25s ease,
        filter 0.25s ease;
}

.filter-btn:hover,
.alpha-btn:hover {
    background: linear-gradient(
        135deg,
        var(--primary-color),
        color-mix(in srgb, var(--primary-color) 70%, #000)
    );
    color: #fff;
    box-shadow: 0 6px 18px color-mix(in srgb, var(--primary-color) 45%, transparent);
    transform: translateY(-2px);
}

.filter-btn.active,
.alpha-btn.active {
    background: linear-gradient(
        135deg,
        var(--primary-color),
        color-mix(in srgb, var(--primary-color) 70%, #000)
    );
    color: #fff;
    box-shadow: 0 6px 18px color-mix(in srgb, var(--primary-color) 45%, transparent);
}

/* ================= GRID PREMIUM ================= */
.premium-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.5rem;
}

/* ================= POST CARD ================= */
.post-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    display: flex;
    flex-direction: column;
    height: 100%; /* 🔥 garante cards iguais no grid */
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 28px rgba(0,0,0,0.12);
}

/* ================= POST THUMB ================= */
.post-thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 3 / 4; /* 🔥 altura consistente */
    overflow: hidden;
}

.post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* 🔥 corta sem deformar */
    display: block;
}

/* ================= BADGES ================= */
.post-type-label {
    position: absolute;
    top: 10px;
    left: 10px;
    background: linear-gradient(
        135deg,
        var(--primary-color),
        color-mix(in srgb, var(--primary-color) 70%, #000)
    );
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    text-transform: uppercase;
}

/* ================= POST CONTENT ================= */
.post-content {
    padding: 8px 12px 12px; /* 🔥 menos espaço entre thumb e título */
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.post-title {
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.25;
    margin: 4px 0 2px; /* 🔥 quase colado na imagem */
    
    display: -webkit-box;
    -webkit-line-clamp: 2; /* 🔥 máximo 2 linhas */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-title a {
    color: #333;
    transition: color 0.25s ease;
}

.post-title a:hover {
    color: var(--primary-color);
}

.post-desc {
    font-size: 0.9rem;
    line-height: 1.4;
    color: #666;
    margin-top: 2px;

    display: -webkit-box;
    -webkit-line-clamp: 2; /* 🔥 mantém cards alinhados */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ================= PAGINAÇÃO PREMIUM ================= */
.premium-pagination {
    margin-top: 2rem;
    text-align: center;
}

.premium-pagination ul {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

.premium-pagination li {
    margin: 0;
}

.premium-pagination a,
.premium-pagination span {
    display: block;
    padding: 0.5rem 0.9rem;
    border-radius: 8px;
    background: #eee;
    color: #333;
    font-weight: 500;
    transition: 
        transform 0.25s ease,
        box-shadow 0.25s ease,
        filter 0.25s ease;
    text-decoration: none;
}

.premium-pagination a:hover {
    background: linear-gradient(
        135deg,
        var(--primary-color),
        color-mix(in srgb, var(--primary-color) 70%, #000)
    );
    color: #fff;
    transform: translateY(-2px);
}

.premium-pagination .current {
    background: linear-gradient(
        135deg,
        var(--primary-color),
        color-mix(in srgb, var(--primary-color) 70%, #000)
    );
    color: #fff;
    box-shadow: 0 6px 18px color-mix(in srgb, var(--primary-color) 45%, transparent);
    font-weight: 600;
}

/* ================= RESPONSIVO ================= */
@media (max-width: 768px) {
    .premium-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    }

    .filter-btn,
    .alpha-btn {
        padding: 0.4rem 0.7rem;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .posts-title {
        font-size: 1.8rem;
    }

    .post-title {
        font-size: 0.95rem;
    margin: 4px 0 2px;
    }

    .post-desc {
        font-size: 0.85rem;
    }

    .post-content {
        padding: 8px 10px 12px;
    }
}



/* ======================================================
   DARK MODE GLOBAL
====================================================== */
body.dark-mode {
  background: var(--bg-dark);
  color: #eaeaea;
}

body.dark-mode .hq-reader {
  background: transparent;
}

/* ================= DARK MODE ================= */

body.dark-mode .hq-title {
  color: #fff;
}

body.dark-mode .hq-description,
body.dark-mode .hq-meta,
body.dark-mode .hq-keywords {
  color: #bbb;
}

body.dark-mode .hq-categories a {
  background: #2d2f45;
  color: #ddd;
}

body.dark-mode .hq-capitulos-premium {
  background: #1b1d2b;
}

body.dark-mode .capitulo-header h2 {
  color: #fff;
}

body.dark-mode .capitulo-item {
  border-bottom-color: #2d2f45;
}

body.dark-mode .capitulo-title a {
  color: #fff;
}

body.dark-mode .capitulo-excerpt {
  color: #bbb;
}

body.dark-mode .capitulo-order-btn {
  background: linear-gradient(135deg, #3d4fd1, #5c3fcf);
}

/* ================= RESPONSIVO ================= */

@media (max-width: 768px) {

  .hq-header-card {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hq-cover-small {
    max-width: 220px;
    margin: 0 auto;
  }

  .hq-meta {
    justify-content: center;
  }

  .hq-categories {
    justify-content: center;
  }

  .hq-actions {
    justify-content: center;
  }
}


/* ================= DARK MODE ================= */
body.dark-mode {
  background: #0e0e0e;
  color: #e5e5e5;
}

body.dark-mode .post-card,
body.dark-mode .sidebar-post,
body.dark-mode .comment {
  background: #151515;
}

body.dark-mode .hq-meta a {
  background: #1f1f1f;
  color: #ddd;
}

body.dark-mode .hq-meta a:hover {
  background: #fff;
  color: #000;
}

body.dark-mode .site-footer {
  background: #111;
}

/* DARK MODE MODAL */
body.dark-mode .hf-modal {
  background-color: rgba(0,0,0,0.85);
}

body.dark-mode .hf-modal-content {
  background-color: #1e1e1e;
  color: #f1f1f1;
}

body.dark-mode .hf-close {
  color: #ccc;
}

body.dark-mode .hf-close:hover {
  color: #fff;
}

body.dark-mode .hf-tab {
  background: #333;
  color: #fff;
}

body.dark-mode .hf-tab.active {
  background: var(--primary-color);
  color: #fff;
}

body.dark-mode .hf-grid .hf-card {
  background: #2c2c2c;
  border-color: #444;
  color: #f1f1f1;
}

body.dark-mode .hf-grid .hf-card h4 {
  color: #f1f1f1;
}

body.dark-mode .hf-pagination a,
body.dark-mode .hf-pagination span {
  background: #555;
  color: #fff;
}

body.dark-mode .hf-pagination .current {
  background: var(--primary-color);
  color: #fff;
}

body.dark-mode .hf-clear {
  background: var(--primary-color);
  color: #fff;
}

/* ================= RESPONSIVO TABLET GRANDE ================= */
@media (max-width: 1100px) {
  .posts-grid {
    grid-template-columns: repeat(3, 1fr); /* 3 cards por linha tablet grande */
  }

  .related-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .related-grid .post-card {
    height: 200px;
  }

  .related-grid .related-card h4 {
    font-size: 14px;
  }

  .categories-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .footer-container {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }

  .footer-links li {
    margin-bottom: 10px;
  }

  .footer-about {
    margin-bottom: 40px;
  }

  .footer-col h4 {
    text-align: center;
  }

  .footer-col h4::after {
    left: 50%;
    transform: translateX(-50%);
  }
}

/* ================= RESPONSIVO TABLET PEQUENO / MOBILE ================= */
@media (max-width: 900px) {

  /* LAYOUT PRINCIPAL */
  .hq-layout {
    grid-template-columns: 1fr; /* empilha conteúdo + sidebar */
    gap: 40px;
  }

  /* CONTEÚDO DO POST */
  .hq-reader {
    display: flex;
    flex-direction: column;
    order: 1;
    max-width: 100%;
  }

  /* SIDEBAR */
  .hq-sidebar {
    width: 100%;
    order: 2;
    position: relative;
    margin: 30px 0;
    top: 0;
  }

  /* REORDENA ELEMENTOS DENTRO DO POST */
  .related-hqs {
    order: 1;
  }

  .comments-area {
    order: 3;
  }

  /* POSTS GRID */
  .posts-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* RELATED GRID */
  .related-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .related-grid .post-card {
    height: 200px;
  }

  .related-grid .related-card h4 {
    font-size: 14px;
  }

  /* CATEGORIAS */
  .categories-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* FOOTER */
  .footer-container {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }

  .footer-links li {
    margin-bottom: 10px;
  }

  .footer-about {
    margin-bottom: 40px;
  }

  .footer-col h4 {
    text-align: center;
  }

  .footer-col h4::after {
    left: 50%;
    transform: translateX(-50%);
  }
  
/* HEADER */
  .header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    position: relative;
    z-index: 20;
  }

  /* LOGO CENTRAL */
  .logo {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
  }

  /* HAMBURGER LEFT */
  .menu-toggle {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: 0;
    cursor: pointer;
    z-index: 10;
  }

  .menu-toggle span {
    width: 26px;
    height: 3px;
    background: #fff;
    border-radius: 2px;
    transition: 0.3s;
  }

  .menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
  }
  .menu-toggle.active span:nth-child(2) {
    opacity: 0;
  }
  .menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
  }

  /* SEARCH ICON RIGHT */
  .search-toggle {
    display: block;
    background: none;
    border: none;
    font-size: 20px;
    color: #fff;
    cursor: pointer;
    z-index: 10;
  }

  /* MENU MOBILE – ABAIXO DO HAMBURGER */
  .main-menu {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%; /* colado abaixo do header */
    left: 0;   /* alinhado ao hamburger */
    width: 220px; /* largura do menu */
    background: #000;
    padding: 15px 20px;
    gap: 0;
    box-shadow: 2px 4px 12px rgba(0,0,0,0.5);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease;
    opacity: 0;
    z-index: 9999;
  }

  .main-menu.active {
    max-height: 500px;
    opacity: 1;
  }

  .main-menu ul {
    flex-direction: column;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .main-menu a {
    font-size: 16px;
    font-weight: 700;
    color: #ccc;
    text-decoration: none;
    padding: 8px 0;
    display: block;
  }

  .main-menu a:hover {
    color: var(--primary-color);
  }
  


  /* ================= SEARCH MOBILE ================= */
  .header-search {
    display: none;
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%) translateY(-100%);
    width: 90%;
    max-width: 400px;
    background: rgba(0,0,0,0.95);
    padding: 12px 20px;
    border-radius: 8px;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.4);
    transition: transform 0.3s ease, opacity 0.3s ease;
    opacity: 0;
    z-index: 15;
  }

  .header-search.active {
    display: flex;
    transform: translateX(-50%) translateY(60px);
    opacity: 1;
  }

  .header-search input {
    width: 100%;
    font-size: 14px;
    padding: 10px 15px;
    border-radius: 30px;
    border: 1px solid #222;
    background: #111;
    color: #fff;
  }

  .header-search button {
    padding: 8px 12px;
    border: none;
    border-radius: 30px;
    background: var(--primary-color);
    color: #fff;
    cursor: pointer;
  }
  .hf-grid { grid-template-columns: repeat(auto-fill,minmax(140px,1fr)); }
}

/* ================= RESPONSIVO MOBILE ================= */
@media (max-width: 500px) {

  /* POSTS GRID */
  .posts-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* RELATED GRID */
  .related-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .related-grid .post-card {
    height: 200px;
  }

  .related-grid .related-card h4 {
    font-size: 14px;
  }

  /* SIDEBAR */
  .hq-sidebar {
    width: 100%;
    position: relative; /* remove sticky */
    margin: 30px 0;
    order: 2; /* logo abaixo de related-hqs */
  }

  /* FOOTER */
  .footer-container {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }

  .footer-links li {
    margin-bottom: 10px;
  }

  .footer-about {
    margin-bottom: 40px;
  }

  .footer-col h4 {
    text-align: center;
  }

  .footer-col h4::after {
    left: 50%;
    transform: translateX(-50%);
  }

  .categories-grid {
    grid-template-columns: 1fr;
  }
  .hf-grid { grid-template-columns: repeat(auto-fill,minmax(140px,1fr)); }
}

/* ================= RESPONSIVO MOBILE PEQUENO ================= */
@media (max-width: 350px) {
  .posts-grid {
    grid-template-columns: 1fr; /* 1 card por linha */
  }
}

/* ================= RESPONSIVO HEADER ================= */
@media (max-width: 600px) {
/* HEADER */
  .header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    position: relative;
    z-index: 20;
  }

  /* LOGO CENTRAL */
  .logo {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
  }

  /* HAMBURGER LEFT */
  .menu-toggle {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: 0;
    cursor: pointer;
    z-index: 10;
  }

  .menu-toggle span {
    width: 26px;
    height: 3px;
    background: #fff;
    border-radius: 2px;
    transition: 0.3s;
  }

  .menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
  }
  .menu-toggle.active span:nth-child(2) {
    opacity: 0;
  }
  .menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
  }

  /* SEARCH ICON RIGHT */
  .search-toggle {
    display: block;
    background: none;
    border: none;
    font-size: 20px;
    color: #fff;
    cursor: pointer;
    z-index: 10;
  }

  /* MENU MOBILE – ABAIXO DO HAMBURGER */
  .main-menu {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%; /* colado abaixo do header */
    left: 0;   /* alinhado ao hamburger */
    width: 220px; /* largura do menu */
    background: #000;
    padding: 15px 20px;
    gap: 0;
    box-shadow: 2px 4px 12px rgba(0,0,0,0.5);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease;
    opacity: 0;
    z-index: 20;
  }

  .main-menu.active {
    max-height: 500px;
    opacity: 1;
  }

  .main-menu ul {
    flex-direction: column;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .main-menu a {
    font-size: 16px;
    font-weight: 700;
    color: #ccc;
    text-decoration: none;
    padding: 8px 0;
    display: block;
  }

  .main-menu a:hover {
    color: var(--primary-color);
  }

  /* ================= SEARCH MOBILE ================= */
  .header-search {
    display: none;
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%) translateY(-100%);
    width: 90%;
    max-width: 400px;
    background: rgba(0,0,0,0.95);
    padding: 12px 20px;
    border-radius: 8px;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.4);
    transition: transform 0.3s ease, opacity 0.3s ease;
    opacity: 0;
    z-index: 15;
  }

  .header-search.active {
    display: flex;
    transform: translateX(-50%) translateY(60px);
    opacity: 1;
  }

  .header-search input {
    width: 100%;
    font-size: 14px;
    padding: 10px 15px;
    border-radius: 30px;
    border: 1px solid #222;
    background: #111;
    color: #fff;
  }

  .header-search button {
    padding: 8px 12px;
    border: none;
    border-radius: 30px;
    background: var(--primary-color);
    color: #fff;
    cursor: pointer;
  }

  .categories-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .category-card {
    padding: 28px 14px;
    min-height: 110px;
  }

  .category-name {
    font-size: 16px;
  }

  .category-count {
    font-size: 12px;
  }

  /* FOOTER */
  .footer-container {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }

  .footer-links li {
    margin-bottom: 10px;
  }

  .footer-about {
    margin-bottom: 40px;
  }

  .footer-col h4 {
    text-align: center;
  }

  .footer-col h4::after {
    left: 50%;
    transform: translateX(-50%);
  }
}
