/* ===== RESET SIMPLES ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  /* garante que padding e border não aumentem o tamanho total */
}

body {
  font-family: "Montserrat", sans-serif;
  background-color: var(--color-bg);
  /* cor de fundo principal */
}

/* ===== Container geral do blog ===== */
.blog-container {
  display: flex;
  /* colunas lado a lado (posts + sidebar) */
  max-width: 1410px;
  /* largura máxima para não cortar imagens */
  margin: 10px auto 0 auto;
  /* 40px espaço de topo do container do blog e sidebar */
  gap: 24px;
  /* espaçamento moderno entre colunas */
  padding: 20px;
  /* espaçamento interno */
}

.blog-title {
  display: none;
  /* esconder título blog h1 */
}

/* ===== Coluna de posts ===== */
.blog-posts {
  flex: 1;
  /* ocupa o espaço restante do container */
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  /* 2 posts por linha */
  gap: 28px 24px;
  /* 28px vertical, 24px horizontal entre os cards */
}

/* ===== Card de cada post ===== */
.blog-card {
  background-color: #ffffff;
  border: 1px solid rgba(23, 54, 87, 0.06);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.03), 0 2px 4px -1px rgba(0, 0, 0, 0.02);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s;
  display: flex;
  flex-direction: column;
}

.blog-card:hover {
  transform: translateY(-4px);
  /* elevação suave em vez de scale cru */
  box-shadow: 0 10px 20px -5px rgba(23, 54, 87, 0.08), 0 4px 6px -2px rgba(23, 54, 87, 0.04);
}

/* ===== Wrapper da imagem para overlay ===== */
.blog-card-image-wrapper {
  position: relative;
  /* necessário para o overlay absoluto */
  display: block;
  overflow: hidden;
}

/* ===== Imagem do card ===== */
.blog-card-image {
  width: 100%;
  /* ocupa toda a largura do card */
  height: 250px;
  /* altura fixa */
  object-fit: cover;
  /* mantém proporção sem distorcer */
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  display: block;
}

.blog-card:hover .blog-card-image {
  transform: scale(1.05);
  /* zoom sutil da imagem */
}

/* ===== Overlay sobre a imagem ===== */
.blog-card-overlay {
  position: absolute;
  /* sobrepõe a imagem */
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, rgba(23, 54, 87, 0.4), rgba(15, 23, 42, 0.8));
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  /* invisível inicialmente */
  transition: opacity 0.3s ease;
  /* suaviza a aparição */
  display: flex;
  flex-direction: column;
  justify-content: center;
  /* centraliza verticalmente */
  align-items: center;
  /* centraliza horizontalmente */
  text-align: center;
  /* centraliza o texto */
  color: #fff;
  /* cor do texto dentro do overlay */
  padding: 20px;
  box-sizing: border-box;
}

.blog-card-image-wrapper:hover .blog-card-overlay {
  opacity: 1;
  /* torna visível ao passar o mouse sobre a imagem */
}

/* ===== Texto dentro do overlay ===== */
.blog-card-overlay p {
  margin: 6px 0;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.blog-card-overlay p:first-child {
  font-weight: 700;
  font-size: 1.1rem;
  color: #2bb8fc;
  /* azul claro da marca */
  text-transform: uppercase;
}

/* ===== Texto abaixo da imagem ===== */
.blog-card-text {
  padding: 20px;
  /* mais padding interno para visual premium */
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.blog-card-text h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 8px 0;
  color: var(--color-text);
  /*cor do título do card*/
  line-height: 1.35;
  transition: color 0.25s ease;
}

.blog-card:hover .blog-card-text h2 {
  color: var(--color-accent);
  /* Título fica rosa ao passar o mouse */
}

.blog-card-text p {
  font-size: 0.95rem;
  line-height: 1.45;
  margin: 0;
  color: var(--color-text);
  opacity: 0.8;
  /* texto descritivo mais suave */
}

/* ===== Blocos de anúncios dentro da coluna de posts ===== */
.blog-ad {
  overflow: hidden;
  grid-column: 1 / -1;
}

.blog-ad ins {
  max-width: 970px;
  /* largura máxima do anúncio */
  width: 100%;
  display: block;
}

/* ===== Sidebar ===== */
.blog-sidebar {
  width: 340px;
  /* largura fixa para caber anúncios de 300px */
  flex: none;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 0 10px;
}

.blog-sidebar h3 {
  display: none;
  /* esconde os títulos da sidebar visualmente */
}

.blog-widget {
  background-color: #ffffff;
  border: 1px solid rgba(23, 54, 87, 0.06);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02);
}

.blog-widget h3 {
  display: block !important;
  /* Força exibir títulos das widgets na sidebar */
  margin-top: 0;
  margin-bottom: 24px;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-text);
  text-align: center;
  position: relative;
  padding-bottom: 10px;
}

.blog-widget h3::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 3px;
  background: linear-gradient(to right, #2bb8fc, #fe55bd);
  /* gradiente nos títulos */
  border-radius: 2px;
}

.blog-widget ul {
  list-style: none;
  padding-left: 0;
}

.blog-widget ul li {
  display: block;
  /* empilha imagem e texto verticalmente */
  margin-bottom: 36px;
  /* espaço entre os produtos */
  text-align: center;
  /* centraliza o texto */
}

.blog-widget ul li:last-child {
  margin-bottom: 0;
}

/* Sidebar: imagens dos destaques */
.blog-widget ul li .highlight-img {
  width: 100%;
  max-width: 280px;
  /* limite máximo */
  height: auto;
  display: block;
  margin: 0 auto 12px auto;
  /* centraliza horizontalmente e dá espaçamento abaixo */
  border-radius: 12px;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Hover: aumenta levemente */
.highlight-link-sidebar:hover .highlight-img {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(23, 54, 87, 0.1);
}

.blog-widget ul li a {
  text-decoration: none;
  color: var(--color-text);
  font-weight: 600;
  font-size: 0.9rem;
  line-height: 1.4;
  transition: color 0.2s;
  display: block;
}

.blog-widget ul li a:hover {
  color: var(--color-accent);
}

.blog-widget img {
  width: 100%;
}

.highlight-img {
  max-width: 300px;
  height: auto;
  transition: transform 0.2s ease;
}

.highlight-link-sidebar:hover .highlight-img {
  transform: scale(1.02);
}

/* ===== Paginação ===== */
.blog-pagination {
  margin: 40px 0;
  display: flex;
  justify-content: center;
  gap: 12px;
}

.blog-pagination a,
.blog-pagination span {
  text-decoration: none;
  padding: 8px 16px;
  background-color: #ffffff;
  color: var(--color-text);
  border: 1px solid rgba(23, 54, 87, 0.1);
  border-radius: 9999px;
  /* pílula */
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.25s ease;
  box-shadow: 0 2px 4px rgba(23, 54, 87, 0.02);
}

.blog-pagination a:hover {
  background: linear-gradient(135deg, #2bb8fc, #fe55bd);
  color: #ffffff !important;
  border-color: transparent;
  box-shadow: 0 4px 10px rgba(43, 184, 252, 0.2);
}

/* ===============================
       MENU DROPDOWN
================================= */
/* ===== Container do dropdown ===== */
.filter-container {
  max-width: 1410px;
  /* mesma largura do blog */
  margin: 40px auto 10px auto;
  /* topo/fundo do dropdown */
  padding: 0 20px;
  /* mesmo padding horizontal do .blog-container */
  display: flex;
  align-items: center;
  justify-content: flex-start;
  /* alinhado à esquerda no desktop */
}

/* Label escondida */
.filter-container label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Wrapper do select + ícone */
.dropdown-wrapper {
  position: relative;
  display: inline-block;
  min-width: 180px;
  /* ligeiramente maior */
}

/* Select estilizado */
#categoryDropdown {
  width: 100%;
  padding: 10px 16px;
  padding-right: 38px;
  /* espaço para a seta */
  border-radius: 9999px;
  /* pastilha */
  background: linear-gradient(to right, rgba(240, 249, 255, 0.85), rgba(255, 240, 250, 0.85));
  border: 1px solid rgba(23, 54, 87, 0.1);
  font-size: 1rem;
  font-weight: 600;
  font-family: "Montserrat", sans-serif;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  box-sizing: border-box;
  transition: all 0.25s ease;
  color: var(--color-text);
  box-shadow: 0 2px 8px rgba(23, 54, 87, 0.03);
}

#categoryDropdown:hover {
  border-color: var(--color-accent);
  box-shadow: 0 4px 12px rgba(234, 73, 139, 0.12);
  outline: none;
}

#categoryDropdown:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(234, 73, 139, 0.15);
  outline: none;
}

/* Ícone da seta */
.dropdown-icon {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  font-family: "Material Symbols Rounded";
  font-size: 22px;
  color: var(--color-accent);
}

/* ===============================
       ESTILIZAÇÃO DO POST
================================*/

/*Dicas*/
.box-dicas {
  /*background-color: lightgreen;*/
  border: 3px solid aquamarine;
  padding: 1.7rem;
  font-size: 1.05rem;
  font-weight: 500;
  margin: 0;
}

.box-info {
  border: 3px solid #0f9afd;
  padding: 1.7rem;
  font-size: 1.05rem;
  font-weight: 500;
  margin: 0;
}

/*Mark / Marcador / Destacar*/

.marcatexto {
  background-color: aquamarine;
}

/*videos dentro do post*/

.video-grid-for-post {
  display: flex;
}

.video-grid-for-posts iframe {
  width: 300px;
  /* define largura menor */
  height: 170px;
  /* mantém proporção */
}

/*playlists dentro do post*/
.responsive-video {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  /* proporção 16:9 */
  height: 0;
  overflow: hidden;
}

.responsive-video iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* ===== Container principal do post ===== */
.post-container {
  display: flex;
  /* Post + sidebar lado a lado */
  max-width: 1410px;
  /* mesma largura usada no blog */
  margin: 0 auto;
  gap: 20px;
  /* espaço entre post e sidebar */
  padding: 20px;
}

/* ===== Área principal do post ===== */
.post-main {
  flex: 1;
  /* ocupa o espaço das 2 colunas de posts */
  display: flex;
  flex-direction: column;
  gap: 20px;
  /* espaçamento entre blocos internos */
}

/* ===== Título do post ===== */
.post-title {
  font-size: 2rem;
  font-weight: bold;
  color: var(--color-text);
  /* cor do tema */
  margin-bottom: 15px;
}

/* ===== Cabeçalho do post (imagem + metadados) ===== */
.post-header {
  display: flex;
  gap: 25px;
  /* espaço entre imagem e infos */
  align-items: flex-start;
  margin-bottom: 50px;
  /* espaçamento abaixo do cabeçalho */
}

.post-image {
  width: 491px;
  /* mesmo tamanho dos cards */
  height: 276px;
  object-fit: cover;
  border-radius: 10px;
  flex-shrink: 0;
  /* impede a imagem de encolher */
}

/* ===== Bloco de informações do post ===== */
.post-meta {
  display: flex;
  flex-direction: column;
  /* empilha categoria, data e atualização */
  align-items: flex-start;
  /* alinha texto à esquerda */
  gap: 5px;
  /* espaço entre itens */
  font-size: 0.95rem;
  color: var(--color-text);
  margin-bottom: 10px;
  /* mantém espaçamento original */
}

/* Remove prefixo "Data de publicação:" se necessário */
.post-meta p:nth-of-type(2)::before {
  content: "";
  /* remove só o prefixo */
}

.post-meta p {
  margin: 0;
  /* remove margens verticais extras */
  display: block;
}

.post-meta .post-category {
  font-weight: bold;
  /* garante negrito na categoria */
}

/* Categorias coloridas por tipo */
.post-category.desenho {
  color: #0077cc;
}

.post-category.reviews {
  color: #ea498b;
}

.post-category.equipamentos {
  color: #ff9900;
}

.post-category.softwares {
  color: #01c4aa;
}

/* ===== Descrição do post ===== */
.post-meta .post-description {
  font-size: 1.05rem;
  color: var(--color-text);
  margin: 15px 0;
  /* força 15px acima e abaixo */
}

/* ===== Bloco de ações: download, compartilhar, doar ===== */
.post-actions {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.post-download,
.post-share button,
.post-donate {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 22px;
  border-radius: 50px;
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  border: none;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease, filter 0.25s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  color: #ffffff !important;
  line-height: 1;
}

.post-download {
  background: linear-gradient(135deg, #2bb8fc, #0077cc);
  box-shadow: 0 4px 12px rgba(43, 184, 252, 0.2);
}

.post-download:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(43, 184, 252, 0.3);
  filter: brightness(1.05);
}

.post-share {
  display: inline-flex;
}

.post-share button {
  background: linear-gradient(135deg, #fe55bd, #ea498b);
  box-shadow: 0 4px 12px rgba(254, 85, 189, 0.2);
  width: auto;
}

.post-share button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(254, 85, 189, 0.3);
  filter: brightness(1.05);
}

.post-donate {
  background: linear-gradient(135deg, #ffb300, #ff6600);
  box-shadow: 0 4px 12px rgba(255, 102, 0, 0.2);
}

.post-donate:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(255, 102, 0, 0.3);
  filter: brightness(1.05);
}

/* ===== Conteúdo do post ===== */
.post-content {
  margin-top: 20px;
  line-height: 1.6;
  color: var(--color-text);
}

.post-content p {
  /* Espaçamento */
  line-height: 1.6;
  /* altura da linha (melhora a legibilidade) */
  font-size: 1.05rem;
  padding-bottom: 1.05rem;
}

/*Links do post*/

.post-content a {
  color: #ea498b;
  text-decoration: none;
  font-weight: 500;
}

/* Diminui a largura do conteúdo do post individual */
.post-content-area {
  max-width: 900px;
  margin: 0 auto;
  /* centraliza horizontalmente */
}

.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4,
.post-content h5,
.post-content h6 {
  margin: 20px 0 10px 0;
  line-height: 1.3;
}

.post-content>* {
  /*margin-top: 40px;*/
  margin-bottom: 40px;
}

.post-content h1 {
  font-size: 2.2rem;
  margin: 1.2em 0 0.6em;
}

.post-content h2 {
  font-size: 1.9rem;
  margin: 1.1em 0 0.55em;
}

.post-content h3 {
  font-size: 1.2rem;
  margin: 1em 0 0.5em;
}

.post-content h4 {
  font-size: 1.1rem;
  margin: 0.9em 0 0.45em;
}

.post-content h5 {
  font-size: 1rem;
  margin: 0.8em 0 0.4em;
}

.post-content h6 {
  font-size: 1rem;
  margin: 0.7em 0 0.35em;
}

.post-content p {
  margin: 10px 0;
  line-height: 1.6;
}

.post-content ul,
.post-content ol {
  margin: 18px 0 40px 40px;
}

.post-content li {
  margin-bottom: 6px;
}

.post-content img {
  margin: 25px auto;
  max-width: 100%;
  height: auto;
  display: block;
}

/* ===== ícones dos posts ===== */

img[src*="krita-icons"] {
  width: 22px;
  /* tamanho do ícone */
  height: 22px;
  vertical-align: middle;
  /* alinha com o texto */
  margin: 0 4px;
  /* espaçamento antes e depois */
  display: inline-block;
  /* garante comportamento inline */
}

/* ===== Mostrar versão em inglês ao passar o mouse ===== */

.post-content a[title] {
  color: inherit;
  text-decoration: none;
  cursor: text;
  border-bottom: 1px dotted #0077cc;
  transition: border-color 0.2s;
}

/* ===== Anúncios ===== */
.post-ad {
  margin: 30px 0;
  display: flex;
  justify-content: center;
  background-color: #0077cc;
}

.post-ad ins {
  max-width: 970px;
  width: 100%;
  display: block;
}

/* ===== Rodapé do post ===== */
.post-footer {
  margin-top: 30px;
  font-size: 0.9rem;
  color: var(--color-text);
}

/* ===== Sidebar ===== */
.post-sidebar {
  width: 340px;
  flex: none;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ===== Responsividade do post ===== */
@media screen and (max-width: 1024px) {
  .post-container {
    flex-direction: column;
    gap: 20px;
  }

  .post-header {
    flex-direction: column;
    /* imagem e infos empilhados */
  }

  .blog-sidebar {
    width: 100%;
    order: 2;
    /* aparece abaixo do post */
  }
}

/* ===== Responsividade blog ===== */

@media screen and (max-width: 1024px) {
  .blog-posts {
    grid-template-columns: 1fr;
    /* 1 coluna em telas pequenas */
  }

  .blog-container {
    flex-direction: column;
    gap: 20px;
  }

  .blog-container * {
    max-width: 100%;
    /*força o layout a “respeitar” a tela* adicionei em 30/11 pra tentar corrigir espaçamento no mobile, verificar se vai quebrar algo/
    box-sizing: border-box; /*força o layout a “respeitar” a tela*/
  }

  .blog-sidebar {
    width: 100%;
  }
}

@media screen and (max-width: 768px) {
  .post-header img {
    width: 100%;
    /* imagem ocupa toda largura */
    height: auto;
    /* altura proporcional */
  }

  .post-meta {
    gap: 3px;
  }

  .post-actions {
    gap: 8px;
  }

  .post-actions a,
  .post-actions button {
    font-size: 0.9rem;
    padding: 6px 10px;
  }

  .filter-container {
    justify-content: center;
    /* centraliza apenas em telas pequenas */
    flex-direction: column;
    /* empilha label e dropdown se houver label */
    text-align: center;
    gap: 10px;
    margin: 30px auto 10px auto;
    /* ajusta margem topo e fundo */
  }

  #categoryDropdown {
    width: 100%;
    /* ocupa quase toda a largura do container */
    min-width: 0;
    /* remove o mínimo fixo */
  }

  .post-title {
    font-size: 1.7rem;
  }

  .post-content h2 {
    font-size: 1.6rem;
    margin: 1.1em 0 0.55em;
  }

  .post-content h3 {
    font-size: 1.5rem;
    margin: 1em 0 0.5em;
  }

  .post-content h4 {
    font-size: 1.4rem;
    margin: 0.9em 0 0.45em;
  }

  .post-content h5 {
    font-size: 1.1rem;
    margin: 0.8em 0 0.4em;
  }

  .post-content h6 {
    font-size: 1rem;
    margin: 0.7em 0 0.35em;
  }
}