/*
Theme Name: KIOM Blog
Theme URI: https://kiomglobal.com
Author: KIOM Global
Description: Tema proprietário do blog KIOM. Dark, minimalista, alinhado ao site principal.
Version: 1.0.0
Requires PHP: 7.4
Text Domain: kiom
*/

/* ============================================================
   BLOG · estilos sobre a base kiom.css (enfileirada antes)
   ============================================================ */

/* fundo carbono: o blog é um ambiente próprio, um tom acima do site */
body {
  background: #171717;
}
.kh {
  background: rgba(23, 23, 23, 0.78);
}
.kh-menu {
  background: rgba(23, 23, 23, 0.6);
}
.footer {
  background: #101010;
}

/* nada de rolagem horizontal, e capas gigantes ficam contidas */
html,
body {
  overflow-x: hidden;
}

/* botão de tema claro/escuro */
.kb-mode {
  align-items: center;
  border: 1px solid var(--b-strong);
  border-radius: 50%;
  color: var(--t2);
  display: flex;
  height: 36px;
  justify-content: center;
  transition: border-color 0.25s ease, color 0.25s ease, transform 0.25s ease;
  width: 36px;
}
.kb-mode:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: rotate(15deg);
}
.kb-mode svg {
  height: 17px;
  width: 17px;
}
.kb-mode .ico-moon {
  display: none;
}
html[data-kb="light"] .kb-mode .ico-sun {
  display: none;
}
html[data-kb="light"] .kb-mode .ico-moon {
  display: block;
}

/* Texto sobre imagem fica branco nos dois temas: o scrim é sempre escuro */
.kb-hero .inner,
.kb-mini .inner {
  color: #fff;
}
.kb-hero .kb-meta {
  color: rgba(255, 255, 255, 0.72);
}

/* ============================================================
   TEMA CLARO · html[data-kb="light"]
   Papel quente, cartões brancos, mesmo laranja KIOM.
   ============================================================ */
html[data-kb="light"] {
  --bg: #f6f5f2;
  --s1: #ffffff;
  --s2: #efedea;
  --s3: #e6e4e0;
  --b: #e3e1dc;
  --b-strong: #d2cfc9;
  --t: #171614;
  --t2: #4d4c49;
  --t3: #8b8984;
}
html[data-kb="light"] body {
  background: #f6f5f2;
}
html[data-kb="light"] .kh {
  background: rgba(246, 245, 242, 0.85);
  border-bottom-color: rgba(0, 0, 0, 0.07);
}
html[data-kb="light"] .kh-menu {
  background: rgba(246, 245, 242, 0.75);
  border-bottom-color: rgba(0, 0, 0, 0.07);
}
html[data-kb="light"] .kh-logo img,
html[data-kb="light"] .footer-logo img {
  filter: invert(1);
}
html[data-kb="light"] .kb-search {
  background: #ffffff;
  border-color: #ddd9d2;
}
html[data-kb="light"] .kb-hero,
html[data-kb="light"] .kb-mini,
html[data-kb="light"] .kb-card .thumb,
html[data-kb="light"] .kb-single .kb-cover {
  border-color: #e0ddd7;
}
html[data-kb="light"] .kb-author {
  background: #ffffff;
  border-color: #e0ddd7;
}
html[data-kb="light"] .kb-author::before,
html[data-kb="light"] .catg-tile::before {
  background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.14), transparent);
}
html[data-kb="light"] .kb-author-ava {
  background: #efedea;
  border-color: #d8d5cf;
}
html[data-kb="light"] .kb-body {
  color: #3c3b38;
}
html[data-kb="light"] .footer {
  background: #eceae6;
}
html[data-kb="light"] .wa-float {
  background: rgba(255, 255, 255, 0.88);
  border-color: #d8d5cf;
  color: #171614;
}
html[data-kb="light"] .kb-wrap .page-numbers {
  border-color: #d8d5cf;
}
html[data-kb="light"] .kb-wrap .page-numbers.current {
  border-color: var(--accent);
  color: #fff;
}
html[data-kb="light"] .kb-related {
  border-top-color: #e0ddd7;
}
html[data-kb="light"] .kb-empty {
  border-color: #cfccc5;
}
html[data-kb="light"] .kb-single-top .kb-search input,
html[data-kb="light"] .kb-search input {
  color: var(--t);
}
html[data-kb="light"] .ct-field option {
  background: #ffffff;
}

/* topo do blog: título + busca */
.blog-top {
  align-items: end;
  display: flex;
  gap: 2rem;
  justify-content: space-between;
  margin: 0 auto;
  max-width: var(--container);
  padding: clamp(8.5rem, 14vw, 10.5rem) clamp(1.25rem, 4vw, 2.5rem) clamp(2rem, 4vw, 3rem);
}
.blog-top .ttl {
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  font-weight: 900;
  letter-spacing: -0.035em;
  line-height: 1.05;
}
.blog-top .ttl em {
  background: linear-gradient(180deg, #ff8a50 0%, #e8501e 100%);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  font-style: normal;
}
/* marca da home: logo KIOM + News, alinhados pela linha de base */
.kb-brand {
  align-items: flex-end;
  display: flex;
  gap: 0.85rem;
}
.kb-brand img {
  height: clamp(30px, 4.2vw, 42px);
  margin-bottom: 0.12em;
  width: auto;
}
html[data-kb="light"] .kb-brand img {
  filter: invert(1);
}

/* footer compacto no blog */
.footer {
  padding: 2.2rem clamp(1.25rem, 4vw, 2.5rem) 1.4rem;
}
.footer-inner {
  gap: 1.6rem 2.5rem;
}
.footer-logo img {
  height: 24px;
}
.footer-row {
  font-size: 0.85rem;
  margin-top: 0.7rem;
}
.footer-office p {
  font-size: 0.8rem;
}
.footer-office + .footer-office {
  margin-top: 1rem;
}
.footer-nota {
  font-size: 0.72rem;
  margin-top: 1.6rem;
  padding-top: 1rem;
}

/* busca minimalista */
.kb-search {
  align-items: center;
  background: #161616;
  border: 1px solid #2e2e2e;
  border-radius: 999px;
  display: flex;
  gap: 0.6rem;
  padding: 0.65rem 1.2rem;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
  width: min(320px, 100%);
}
.kb-search:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(232, 80, 30, 0.15);
}
.kb-search svg {
  color: var(--t3);
  flex-shrink: 0;
  height: 16px;
  width: 16px;
}
.kb-search input {
  background: none;
  border: none;
  color: var(--t);
  font: inherit;
  font-size: 0.9rem;
  outline: none;
  width: 100%;
}
.kb-search input::placeholder {
  color: var(--t3);
}
@media (max-width: 700px) {
  .blog-top {
    align-items: flex-start;
    flex-direction: column;
    gap: 1.4rem;
  }
}

/* container geral das listagens */
.kb-wrap {
  margin: 0 auto;
  max-width: var(--container);
  padding: 0 clamp(1.25rem, 4vw, 2.5rem) clamp(4rem, 8vw, 6rem);
}

/* ---------- destaques: 1 herói + 2 menores ---------- */
.kb-feat {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1.7fr 1fr;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}
.kb-feat-side {
  display: grid;
  gap: 1rem;
  grid-template-rows: 1fr 1fr;
}
.kb-hero,
.kb-mini {
  border: 1px solid #242424;
  border-radius: 18px;
  display: flex;
  overflow: hidden;
  position: relative;
}
.kb-hero {
  aspect-ratio: 16 / 10;
}
.kb-hero img,
.kb-mini img {
  filter: grayscale(0.2) brightness(0.85);
  height: 100%;
  inset: 0;
  object-fit: cover;
  position: absolute;
  transition: filter 0.5s ease, transform 0.7s cubic-bezier(0.32, 0.72, 0.28, 1);
  width: 100%;
}
.kb-hero:hover img,
.kb-mini:hover img {
  filter: none;
  transform: scale(1.04);
}
.kb-hero::after,
.kb-mini::after {
  background: linear-gradient(to top, rgb(10 10 10 / 0.88) 0%, rgb(10 10 10 / 0.25) 55%, transparent 100%);
  content: "";
  inset: 0;
  pointer-events: none;
  position: absolute;
}
.kb-hero .inner,
.kb-mini .inner {
  align-self: flex-end;
  padding: clamp(1.2rem, 3vw, 2rem);
  position: relative;
  width: 100%;
  z-index: 2;
}
.kb-hero .t,
.kb-mini .t {
  display: block;
}
.kb-hero .t {
  font-size: clamp(1.4rem, 2.8vw, 2.2rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.15;
  text-wrap: balance;
}
.kb-mini .t {
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.25;
}
@media (max-width: 860px) {
  .kb-feat {
    grid-template-columns: 1fr;
  }
  .kb-feat-side {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr;
  }
  .kb-mini {
    aspect-ratio: 4 / 3;
  }
}
@media (max-width: 560px) {
  .kb-feat-side {
    grid-template-columns: 1fr;
  }
}

/* ---------- rótulos ---------- */
.kb-cat {
  color: var(--accent);
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  margin-bottom: 0.6rem;
  text-transform: uppercase;
}
.kb-meta {
  color: var(--t3);
  display: block;
  font-size: 0.78rem;
  margin-top: 0.7rem;
}

/* ---------- grid de posts ---------- */
.kb-grid {
  display: grid;
  gap: 1.4rem 1rem;
  grid-template-columns: repeat(3, 1fr);
}
.kb-card {
  display: flex;
  flex-direction: column;
}
.kb-card .thumb {
  aspect-ratio: 16 / 10;
  border: 1px solid #242424;
  border-radius: 14px;
  overflow: hidden;
  position: relative;
}
.kb-card .thumb img {
  filter: grayscale(0.25) brightness(0.9);
  height: 100%;
  object-fit: cover;
  transition: filter 0.5s ease, transform 0.7s cubic-bezier(0.32, 0.72, 0.28, 1);
  width: 100%;
}
.kb-card:hover .thumb img {
  filter: none;
  transform: scale(1.05);
}
.kb-card .kb-cat {
  margin: 1rem 0 0.35rem;
}
.kb-card .t {
  font-size: 1.08rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.3;
  transition: color 0.25s ease;
}
.kb-card:hover .t {
  color: var(--accent-hover);
}
.kb-card .kb-meta {
  margin-top: 0.45rem;
}
@media (max-width: 860px) {
  .kb-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 560px) {
  .kb-grid {
    grid-template-columns: 1fr;
  }
}

/* rótulo de seção */
.kb-label {
  color: var(--t3);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  margin-bottom: 1.4rem;
  text-transform: uppercase;
}

/* ---------- paginação ---------- */
.kb-wrap .navigation.pagination {
  margin-top: clamp(2.5rem, 5vw, 4rem);
}
.kb-wrap .nav-links {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
}
.kb-wrap .page-numbers {
  align-items: center;
  border: 1px solid #2e2e2e;
  border-radius: 10px;
  color: var(--t2);
  display: inline-flex;
  font-size: 0.9rem;
  font-weight: 600;
  height: 40px;
  justify-content: center;
  min-width: 40px;
  padding: 0 0.6rem;
  transition: border-color 0.25s ease, color 0.25s ease;
}
.kb-wrap .page-numbers:hover {
  border-color: var(--accent);
  color: var(--t);
}
.kb-wrap .page-numbers.current {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.kb-wrap .page-numbers.dots {
  border: none;
}

/* ---------- post individual ---------- */
.kb-single {
  margin: 0 auto;
  max-width: 760px;
  padding: clamp(8.5rem, 14vw, 10.5rem) clamp(1.25rem, 4vw, 2.5rem) clamp(4rem, 8vw, 6rem);
}
.kb-single .kb-title {
  font-size: clamp(2rem, 4.6vw, 3.4rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.1;
  text-wrap: balance;
}
.kb-single .kb-meta {
  margin: 1rem 0 0;
}
.kb-single .kb-cover {
  border: 1px solid #242424;
  border-radius: 18px;
  margin-top: 2rem;
  overflow: hidden;
}
/* capa em faixa baixa: presença sem roubar espaço do texto */
.kb-single .kb-cover img {
  display: block;
  height: clamp(180px, 26vw, 300px);
  object-fit: cover;
  width: 100%;
}
.kb-body {
  color: #d6d3ce;
  font-size: 1.05rem;
  line-height: 1.9;
  margin-top: clamp(2rem, 4vw, 3rem);
}
.kb-body > * + * {
  margin-top: 1.4em;
}
.kb-body h2 {
  color: var(--t);
  font-size: 1.5rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  margin-top: 2.2em;
}
.kb-body h3 {
  color: var(--t);
  font-size: 1.2rem;
  font-weight: 800;
  margin-top: 2em;
}
.kb-body a {
  color: var(--accent-hover);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.kb-body blockquote {
  border-left: 2px solid var(--accent);
  color: var(--t2);
  font-style: italic;
  padding-left: 1.4rem;
}
.kb-body img {
  border-radius: 14px;
  height: auto;
  max-width: 100%;
}
/* vídeos enviados ou incorporados (YouTube etc.) sempre responsivos */
.kb-body video,
.kb-body iframe {
  aspect-ratio: 16 / 9;
  border: 0;
  border-radius: 14px;
  height: auto;
  max-width: 100%;
  width: 100%;
}
.kb-body figure {
  margin: 1.4em 0;
}
.kb-body figcaption {
  color: var(--t3);
  font-size: 0.8rem;
  margin-top: 0.6rem;
  text-align: center;
}
.kb-body ul,
.kb-body ol {
  padding-left: 1.4rem;
}
/* botão de voltar: pill chamativa no laranja KIOM */
.kb-back {
  align-items: center;
  background: rgba(232, 80, 30, 0.12);
  border: 1px solid rgba(232, 80, 30, 0.5);
  border-radius: 999px;
  color: var(--t);
  display: inline-flex;
  font-size: 0.75rem;
  font-weight: 700;
  gap: 0.5rem;
  margin-bottom: 2rem;
  padding: 0.55rem 1.1rem;
  transition: background 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}
.kb-back:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  transform: translateX(-3px);
}

/* título reduzido na página de busca */
.blog-top .ttl-sm {
  font-size: clamp(1.5rem, 2.8vw, 2.2rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.blog-top .ttl-sm em {
  color: var(--accent);
  font-style: normal;
}
.blog-top .kb-back {
  margin: 1.4rem 0 0;
}

/* barra do artigo: voltar + busca, no início; voltar de novo no fim */
.kb-single-top {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  margin-bottom: 2.2rem;
}
.kb-single-top .kb-back {
  margin: 0;
}
.kb-single-top .kb-search {
  width: min(250px, 100%);
}
.kb-back-end {
  margin: 2.8rem 0 0;
}

/* caixa de autor */
.kb-author {
  align-items: center;
  background: linear-gradient(180deg, #1f1f1f 0%, #171717 100%);
  border: 1px solid #2e2e2e;
  border-radius: 18px;
  display: flex;
  gap: 1.1rem;
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
  overflow: hidden;
  padding: 1.4rem 1.6rem;
  position: relative;
}
.kb-author::before {
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  content: "";
  height: 1px;
  left: 50%;
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  width: 55%;
}
.kb-author-ava {
  align-items: center;
  background: #262626;
  border: 2px solid #3a3a3a;
  border-radius: 50%;
  display: flex;
  flex-shrink: 0;
  height: 64px;
  justify-content: center;
  overflow: hidden;
  position: relative;
  width: 64px;
}
.kb-author-ava img {
  border-radius: 50%;
  height: 100%;
  object-fit: cover;
  position: relative;
  width: 100%;
  z-index: 2;
}
.kb-author-ava .ini {
  color: var(--t3);
  font-size: 1.1rem;
  font-weight: 900;
  inset: 0;
  align-items: center;
  display: flex;
  justify-content: center;
  position: absolute;
}
.kb-author-lbl {
  color: var(--t3);
  display: block;
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.kb-author-nome {
  display: block;
  font-size: 1.02rem;
  font-weight: 800;
  margin-top: 0.15rem;
}
.kb-author-bio {
  color: var(--t2);
  display: block;
  font-size: 0.88rem;
  line-height: 1.6;
  margin-top: 0.3rem;
}

/* leia também: 4 cards em miniatura */
.kb-related {
  border-top: 1px solid #2a2a2a;
  padding-top: clamp(2.5rem, 5vw, 3.5rem);
}
.kb-related .kb-grid {
  gap: 1rem 0.9rem;
  grid-template-columns: repeat(4, 1fr);
}
.kb-related .kb-card .kb-cat {
  font-size: 0.6rem;
  margin: 0.7rem 0 0.25rem;
}
.kb-related .kb-card .t {
  font-size: 0.88rem;
  line-height: 1.35;
}
.kb-related .kb-card .kb-meta {
  display: none;
}
@media (max-width: 860px) {
  .kb-related .kb-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ---------- vazio / sem resultados ---------- */
.kb-empty {
  border: 1px dashed #333333;
  border-radius: 18px;
  color: var(--t2);
  padding: 4rem 2rem;
  text-align: center;
}


/* ============================================================
   MOBILE · blog
   ============================================================ */
@media (max-width: 640px) {
  .blog-top {
    padding-top: 7.5rem;
  }
  .blog-top .eyebrow {
    font-size: 0.58rem;
    letter-spacing: 0.12em;
  }
  .kb-brand {
    gap: 0.6rem;
  }
  .kb-brand img {
    height: 24px;
  }
  .blog-top .ttl {
    font-size: 1.8rem;
  }
  .kb-hero .t {
    font-size: 1.15rem;
  }
  .kb-single .kb-title {
    font-size: 1.6rem;
  }
  .kb-body {
    font-size: 0.98rem;
  }
  /* rodapé enxuto: só marca, WhatsApp e e-mail */
  .footer-inner > div:nth-child(2) {
    display: none;
  }
}
/* touch: nada de hover grudado no blog */
@media (hover: none) {
  .kb-card:hover .t {
    color: inherit;
  }
  .kb-card:hover .thumb img,
  .kb-hero:hover img,
  .kb-mini:hover img {
    filter: grayscale(0.2) brightness(0.85);
    transform: none;
  }
  .kb-back:hover {
    background: rgba(232, 80, 30, 0.12);
    border-color: rgba(232, 80, 30, 0.5);
    color: var(--t);
    transform: none;
  }
  .catg-tile:hover {
    transform: none;
  }
}


/* varredura de brilho da pill no tema claro: risco escuro sutil (wa-shine claro) */
html[data-kb="light"] .wa-float::before {
  background: linear-gradient(115deg, transparent 30%, rgba(0, 0, 0, 0.07) 50%, transparent 70%);
}
