/*
 * Layout Figma (07/10) -- header, footer, página do autor e categorias/arquivos.
 * Fonte: Figma "[CANNALIZE] NOVO SITE", páginas "Matérias" e "Perfil do autor".
 *
 * VISUAL PROVISÓRIO: o Figma só tem versão desktop (1920px) e parece ser
 * uma captura do site antigo (html.to.design, 14/05/2024). Os breakpoints
 * menores abaixo foram inventados por nós para não quebrar no celular.
 *
 * Todas as classes usam o prefixo "cz-" de propósito, para não colidir com
 * as regras antigas de assets/css/main.css (que não conseguimos ler daqui).
 */

:root {
  --cz-coral: #fa6550;
  --cz-coral-social: #fc4a00;
  --cz-ink: #292929;
  --cz-ink-strong: #1c1c1c;
  --cz-ink-muted: #54595f;
  --cz-footer-bg: #f2f3f2;
  --cz-footer-head: #3d3d3d;
  --cz-max: 1314px; /* 1274px de conteúdo + 20px de respiro de cada lado */
  --cz-font: "Roboto Slab", Georgia, "Times New Roman", serif;
}

.cz-wrap {
  width: 100%;
  max-width: var(--cz-max);
  margin-inline: auto;
  padding-inline: 20px;
}

/* =========================================================
   HEADER
   ========================================================= */
.cz-header {
  background: var(--cz-coral);
  color: #fff;
  font-family: var(--cz-font);
  position: relative;
  z-index: 50;
}
.cz-header__inner {
  min-height: 81px;
  display: flex;
  align-items: center;
  gap: 24px;
  padding-block: 17px;
}
.cz-header__logo { display: block; flex: 0 0 auto; line-height: 0; }
.cz-header__logo img { width: 170px; height: auto; }
.cz-header__logo-text { font-size: 28px; font-weight: 700; color: #fff; text-decoration: none; }

/* 07/10 (3): o menu real tem 7 itens e DEVE ficar numa linha só. Por isso:
   menu em nowrap ocupando o espaço que sobra; busca compacta (ícone) que
   se expande sobre o menu ao receber foco, sem empurrar nada; fontes e
   espaços escalonados por largura; abaixo de 1180px vira menu hambúrguer. */
.cz-nav { display: flex; align-items: center; gap: 24px; flex: 1 1 0; justify-content: space-between; min-width: 0; }
.cz-nav nav { flex: 1 1 0; min-width: 0; }
.cz-nav__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 0 16px;
}
.cz-nav__list > li { position: relative; }
.cz-nav__list a {
  color: #fff;
  font-size: 13px;
  font-weight: 400;
  text-decoration: none;
  line-height: 24px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}
/* 07/10: um único padrão de cor em TODOS os estados (normal, visitado,
   foco, clique, atual). Antes o item atual/clicado virava preto, e o time
   achou despadronizado. Estado atual agora = sublinhado + peso 600. */
.cz-nav__list a:visited,
.cz-nav__list a:focus,
.cz-nav__list a:active,
.cz-nav__list a:hover { color: #fff; }
.cz-nav__list a:hover,
.cz-nav__list a:focus-visible { text-decoration: underline; text-underline-offset: 6px; }
.cz-nav__list .current-menu-item > a,
.cz-nav__list .current-menu-ancestor > a,
.cz-nav__list .current-menu-parent > a { color: #fff; font-weight: 600; text-decoration: underline; text-underline-offset: 6px; }

/* seta dos itens com submenu (Font Awesome 5 "angle-down") */
.cz-nav__list .menu-item-has-children > a::after {
  content: "\f107";
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
  font-size: 13px;
  line-height: 13px;
}

/* submenu */
.cz-nav__list .sub-menu {
  list-style: none;
  margin: 0;
  padding: 10px 0;
  position: absolute;
  top: 100%;
  left: -16px;
  min-width: 220px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .15);
  display: none;
  z-index: 60;
}
.cz-nav__list li:hover > .sub-menu,
.cz-nav__list li:focus-within > .sub-menu { display: block; }
.cz-nav__list .sub-menu a {
  color: var(--cz-ink);
  padding: 8px 20px;
  width: 100%;
}
.cz-nav__list .sub-menu a:hover { color: var(--cz-coral); }

/* busca: largura fluida (130–200px conforme a tela), sempre visível. */
.cz-search {
  background: #fff;
  border-radius: 22px;
  display: flex;
  align-items: center;
  flex: 0 0 clamp(130px, 11vw, 200px);
  width: clamp(130px, 11vw, 200px);
  height: 44px;
  padding: 0 18px;
  position: relative;
  z-index: 5;
}
.cz-search:focus-within { box-shadow: 0 0 0 3px rgba(255, 255, 255, .55); }
.cz-search input[type="search"] {
  border: 0;
  outline: 0;
  background: transparent;
  font-family: var(--cz-font);
  font-weight: 300;
  font-size: 14px;
  color: #000;
  padding: 10px 0;
  width: 100%;
  min-width: 0;
  flex: 1 1 0;
}
.cz-search button {
  border: 0;
  background: transparent;
  color: #000;
  cursor: pointer;
  padding: 0;
  min-height: 0;
  min-width: 0;
  width: auto;
  height: 44px;
  flex: 0 0 auto;
  font-size: 14px;
}

/* botão de menu (mobile) */
.cz-toggle {
  display: none;
  margin-left: auto;
  background: transparent;
  border: 0;
  width: 44px;
  height: 44px;
  cursor: pointer;
  padding: 10px;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
}
.cz-toggle span { display: block; height: 2px; background: #fff; border-radius: 2px; }
.cz-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Tudo fluido por largura de tela (vw), para não depender de saber a
   resolução: logo, fonte do menu, espaços e busca encolhem juntos. */
.cz-header__logo img { width: clamp(140px, 10vw, 197px); }
.cz-header__inner { gap: clamp(16px, 1.6vw, 32px); }
.cz-nav { gap: clamp(16px, 1.6vw, 40px); }
.cz-nav__list { gap: 0 clamp(8px, 0.8vw, 20px); }
.cz-nav__list a { font-size: clamp(12px, 0.86vw, 14px); gap: 5px; }
@media (min-width: 1700px) {
  .cz-header__inner { max-width: 1520px; }
}

/* Mobile / tablet (até 1180px): hambúrguer abre uma aba lateral (vem da
   direita) com busca no topo e todas as categorias do menu. Fecha no X, no
   fundo escurecido, com Esc ou ao tocar num link. (07/10) */
.cz-nav__close, .cz-overlay { display: none; }
@media (max-width: 1180px) {
  .cz-header__inner { flex-wrap: nowrap; justify-content: space-between; gap: 12px; min-height: 64px; padding-block: 10px; }
  .cz-header__logo img { width: 140px; }
  .cz-toggle { display: flex; margin-left: auto; }

  .cz-nav {
    display: flex;
    position: fixed;
    top: 0; right: 0; bottom: 0;
    width: min(86vw, 340px);
    flex: none;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 20px;
    padding: 16px 24px 32px;
    background: #fff;
    overflow-y: auto;
    overscroll-behavior: contain;
    box-shadow: -10px 0 30px rgba(0, 0, 0, .25);
    transform: translateX(105%);
    visibility: hidden;
    transition: transform .28s ease, visibility 0s linear .28s;
    z-index: 100;
  }
  .cz-header.cz-open .cz-nav { transform: none; visibility: visible; transition: transform .28s ease; }

  .cz-nav__close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: flex-end;
    width: 44px; height: 44px;
    margin-right: -10px;
    background: transparent;
    border: 0;
    color: var(--cz-coral);
    font-size: 22px;
    cursor: pointer;
  }

  .cz-overlay {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .5);
    opacity: 0;
    visibility: hidden;
    transition: opacity .28s ease, visibility 0s linear .28s;
    z-index: 90;
  }
  .cz-header.cz-open .cz-overlay { opacity: 1; visibility: visible; transition: opacity .28s ease; }
  body.cz-noscroll { overflow: hidden; }

  .cz-search { order: 1; flex: 0 0 auto; width: 100%; height: 46px; border-radius: 10px; padding: 0 18px; background: #f2f3f2; border: 1px solid #e0e1e0; }
  .cz-search:focus-within { box-shadow: 0 0 0 2px var(--cz-coral); }
  .cz-search input[type="search"] { font-size: 16px; } /* 16px evita o zoom automático do iOS */
  .cz-nav nav { order: 2; flex: none; }
  .cz-nav__list { flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 0; }
  .cz-nav__list > li { border-bottom: 1px solid #e5e5e5; }
  .cz-nav .cz-nav__list a,
  .cz-nav .cz-nav__list a:visited,
  .cz-nav .cz-nav__list a:hover,
  .cz-nav .cz-nav__list a:focus,
  .cz-nav .cz-nav__list a:active { color: #292929; }
  .cz-nav .cz-nav__list .current-menu-item > a,
  .cz-nav .cz-nav__list .current-menu-ancestor > a,
  .cz-nav .cz-nav__list .current-menu-parent > a,
  .cz-nav .cz-nav__list a:hover { color: var(--cz-coral); }
  .cz-nav__list a { display: flex; font-size: 17px; line-height: 24px; padding: 14px 0; }
  .cz-nav__list .sub-menu {
    position: static;
    display: block;
    background: transparent;
    box-shadow: none;
    padding: 0 0 8px 16px;
  }
  .cz-nav .cz-nav__list .sub-menu a { color: #292929; font-size: 15px; padding: 8px 0; }
}

/* =========================================================
   HERO (autor / categoria / arquivo)
   ========================================================= */
.cz-main { font-family: var(--cz-font); color: var(--cz-ink); }

.cz-crumbs { padding-top: 24px; font-size: 13px; color: var(--cz-ink-muted); }

.cz-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 60px;
  padding-block: 107px 80px;
}
.cz-hero--simple { padding-block: 80px 60px; }
.cz-hero__id { display: flex; align-items: flex-end; gap: 27px; min-width: 0; }
.cz-hero__avatar {
  width: 252px;
  height: 282px;
  object-fit: cover;
  border-radius: 3px;
  flex: 0 0 auto;
}
.cz-hero__text { display: flex; flex-direction: column; gap: 40px; min-width: 0; }
.cz-hero__title {
  margin: 0;
  font-family: var(--cz-font);
  font-weight: 700;
  font-size: 50px;
  line-height: 1.1;
  color: var(--cz-ink);
}
.cz-hero__bio {
  margin: 0;
  max-width: 411px;
  font-weight: 300;
  font-size: 24px;
  line-height: 1.2;
}
.cz-hero__bio p { margin: 0; }
.cz-hero--simple .cz-hero__bio { max-width: 760px; }
.cz-hero__contact { flex: 0 0 364px; }
.cz-hero__contact-label { font-size: 16px; text-decoration: underline; margin: 0 0 27px; }
.cz-hero__contact-value { font-weight: 300; font-size: 24px; line-height: 1.2; margin: 0; word-break: break-word; }
.cz-hero__contact-value a { color: inherit; text-decoration: none; }

@media (max-width: 900px) {
  .cz-hero { flex-direction: column; align-items: flex-start; padding-block: 48px 40px; gap: 32px; }
  .cz-hero__id { flex-direction: column; align-items: flex-start; }
  .cz-hero__title { font-size: 36px; }
  .cz-hero__bio, .cz-hero__contact-value { font-size: 20px; }
  .cz-hero__avatar { width: 180px; height: 200px; }
  .cz-hero__contact { flex-basis: auto; }
}

/* =========================================================
   GRADE DE CARDS (3 colunas)
   ========================================================= */
.cz-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: 62px;
  row-gap: 58px;
  padding-block: 20px 20px;
}
@media (max-width: 1000px) { .cz-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 32px; } }
@media (max-width: 640px)  { .cz-grid { grid-template-columns: minmax(0, 1fr); } }

.cz-card { display: flex; flex-direction: column; gap: 17px; }
.cz-card__thumb { display: block; aspect-ratio: 386 / 279; overflow: hidden; background: #e8e8e6; }
.cz-card__thumb img { width: 100%; height: 100%; object-fit: cover; }
.cz-card__meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  font-size: 14px;
  line-height: 27px;
}
.cz-card__author { font-weight: 400; }
.cz-card__date { font-weight: 300; display: inline-flex; align-items: center; gap: 10px; white-space: nowrap; }
.cz-card__date::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cz-coral);
}
.cz-card__body { border-top: 1px solid var(--cz-coral); padding-top: 7px; display: flex; flex-direction: column; gap: 15px; }
.cz-card__title { margin: 0; font-weight: 700; font-size: 26px; line-height: 1.1; color: var(--cz-ink-strong); }
.cz-card__title a { color: inherit; text-decoration: none; }
.cz-card__title a:hover { text-decoration: underline; }
.cz-card__excerpt { margin: 0; font-weight: 300; font-size: 18px; line-height: 1.1; color: #000; }

.cz-more { text-align: center; padding-block: 40px 30px; display: flex; justify-content: center; gap: 28px; }
.cz-more a { font-size: 20px; color: #000; text-decoration: underline; }
.cz-empty { padding-block: 40px; font-size: 18px; }

.cz-banner-slot { padding-block: 10px 40px; }

/* =========================================================
   FOOTER
   ========================================================= */
.cz-footer { font-family: var(--cz-font); margin-top: 20px; }
.cz-footer__main { background: var(--cz-footer-bg); padding-block: 22px 12px; }
.cz-footer__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px 40px;
  flex-wrap: wrap;
  margin-bottom: 0;
}
.cz-footer__logo { line-height: 0; display: block; }
.cz-footer__logo img { width: 199px; height: auto; }
.cz-footer__links { display: flex; align-items: center; gap: 36px; flex-wrap: wrap; }
.cz-footer__links a {
  font-weight: 600;
  font-size: 16px;
  line-height: 30px;
  color: #000;
  text-decoration: underline;
}
.cz-footer__dot { font-size: 6px; color: #000; line-height: 1; }
.cz-social { display: flex; gap: 5px; margin-left: 60px; }
.cz-social a {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--cz-coral-social);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  text-decoration: none;
}
.cz-social a:hover { filter: brightness(.92); }
.cz-icon-svg { width: 1em; height: 1em; display: block; fill: currentColor; }

.cz-footer__cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 48px 60px;
  align-items: start;
}
.cz-footer__col h2 {
  margin: 0 0 20px;
  font-family: var(--cz-font);
  font-weight: 700;
  font-size: 16px;
  line-height: 18px;
  color: var(--cz-footer-head);
  text-decoration: underline;
}
.cz-footer__col ul { list-style: none; margin: 0; padding: 4px 0; display: flex; flex-direction: column; gap: 14px; }
.cz-footer__col a { font-weight: 300; font-size: 12px; line-height: 18px; color: var(--cz-ink); text-decoration: none; }
.cz-footer__col a:hover { text-decoration: underline; }

.cz-footer__bar { background: transparent; padding-block: 6px 0; }
.cz-footer__bar-inner { display: flex; justify-content: flex-end; align-items: center; gap: 20px; flex-wrap: wrap; }
.cz-footer__copy { margin: 0; font-size: 13px; line-height: 20px; color: #070707; }
.cz-footer__legal { display: flex; flex-wrap: wrap; }
.cz-footer__legal a { font-size: 13px; line-height: 19.5px; color: var(--cz-ink-muted); text-decoration: none; padding-inline: 10px; border-left: 1px solid #ddd; }
.cz-footer__legal a:first-child { border-left: 0; }
.cz-footer__legal a:hover { text-decoration: underline; }

@media (max-width: 700px) {
  .cz-social { margin-left: 0; }
  .cz-footer__top { margin-bottom: 0; }
}

/* =========================================================
   REVISÃO DO DESKTOP (07/10)
   ========================================================= */

/* --- Cards da home (card-post.php): links separados ------------------ */
.post-card__thumb { display: block; }
.post-card__title a,
.post-card__author { color: inherit; text-decoration: none; }
.post-card__title a:hover,
.post-card__author:hover,
a.post-card__eyebrow:hover { text-decoration: underline; }
a.post-card__eyebrow { text-decoration: none; }

/* --- Cards das listagens: autor clicável ----------------------------- */
.cz-card__author { color: inherit; text-decoration: none; }
.cz-card__author:hover { text-decoration: underline; }
.cz-card--sugestao .cz-card__sugestao {
  font-size: 11px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--cz-coral);
  font-weight: 600;
  margin-bottom: -8px;
}

/* --- Redes na página do autor --------------------------------------- */
.cz-social--hero { margin: 20px 0 0; }

/* --- Rolagem infinita ------------------------------------------------ */
.cz-status { text-align: center; padding-block: 12px 30px; font-size: 16px; color: var(--cz-ink-muted); }
.cz-js .cz-more .cz-next { visibility: hidden; height: 1px; overflow: hidden; display: block; }
.cz-js .cz-more { padding-block: 10px; }

/* --- Carrossel de colunistas (home) ---------------------------------- */
.cz-colunistas { font-family: var(--cz-font); padding-block: 40px 20px; }
.cz-colunistas__header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.cz-colunistas__header h2 { margin: 0; font-family: var(--cz-font); font-weight: 700; font-size: 28px; color: var(--cz-ink); }
.cz-colunistas__nav { display: none; gap: 8px; }
.cz-colunistas__btn {
  width: 40px; height: 40px; min-width: 40px; min-height: 40px; padding: 0;
  border-radius: 50%; border: 1px solid var(--cz-coral); background: #fff; color: var(--cz-coral);
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
}
.cz-colunistas__btn:hover { background: var(--cz-coral); color: #fff; }
.cz-colunistas__track {
  list-style: none; margin: 0; padding: 4px 0 12px;
  display: flex; gap: 40px; overflow-x: auto; scroll-snap-type: x mandatory;
  scrollbar-width: none; justify-content: center;
}
.cz-colunistas__track::-webkit-scrollbar { display: none; }
/* 4 por vez no desktop; o resto roda (ver cannalize-layout.js, item 2) */
.cz-colunista { flex: 0 0 calc((100% - 120px) / 4); scroll-snap-align: start; text-align: center; }
.cz-colunista__link { display: flex; flex-direction: column; align-items: center; gap: 10px; color: var(--cz-ink); text-decoration: none; }
.cz-colunista__foto {
  width: min(160px, 100%); height: auto; aspect-ratio: 1 / 1; border-radius: 50%; object-fit: cover; background: #e8e8e6;
  border: 3px solid transparent; transition: border-color .15s;
}
.cz-colunista__link:hover .cz-colunista__foto,
.cz-colunista__link:focus-visible .cz-colunista__foto { border-color: var(--cz-coral); }
.cz-colunista__nome { font-weight: 700; font-size: 18px; line-height: 1.2; }
.cz-colunista__bio { font-weight: 300; font-size: 14px; line-height: 1.3; color: var(--cz-ink-muted); }
/* quando não cabe tudo, vira carrossel de verdade: setas aparecem, alinha à esquerda */
.cz-colunistas.cz-has-overflow .cz-colunistas__nav { display: flex; }
.cz-colunistas.cz-has-overflow .cz-colunistas__track { justify-content: flex-start; }
@media (max-width: 1000px) {
  .cz-colunista { flex-basis: calc((100% - 80px) / 3); }
}
@media (max-width: 700px) {
  .cz-colunistas__track { gap: 16px; }
  .cz-colunista { flex-basis: calc((100% - 16px) / 2); }
  .cz-colunista__nome { font-size: 16px; }
}

/* --- Footer: slogan e newsletter ------------------------------------ */
.cz-footer__brand { display: flex; flex-direction: column; gap: 14px; max-width: 420px; }
.cz-footer__slogan { margin: 0; font-weight: 300; font-size: 14px; line-height: 1.4; color: var(--cz-ink); }

/* =========================================================
   HOME: título + linha fina por editoria (07/10), como no print do time.
   Título em Roboto Slab Light na cor da editoria, linha fina de 1px
   embaixo, do começo do título ao fim do "Veja mais". A cor vem da slug
   (classe editorial-section--{slug}). --cz-linha = linha; --cz-titulo =
   texto (versão mais escura nos tons claros, para ser legível sobre
   branco). Editorias sem cor definida (ex.: Notícias) usam coral.
   ========================================================= */
.editorial-section { --cz-linha: #fa6550; --cz-titulo: #fa6550; }
.editorial-section--saude-e-ciencia { --cz-linha: #3b5998; --cz-titulo: #3b5998; }
.editorial-section--cannabis-medicinal { --cz-linha: #8a9a5b; --cz-titulo: #6f7d44; }
.editorial-section--cultura-e-sociedade { --cz-linha: #b39ddb; --cz-titulo: #8c6fc0; }
.editorial-section--industria-da-cannabis,
.editorial-section--industria-cannabis { --cz-linha: #f1d27a; --cz-titulo: #b8921f; }
.editorial-section--politica-e-regulacao { --cz-linha: #a1805f; --cz-titulo: #7a5a3c; } /* marrom (13/10; era cinza) */
.editorial-section__header {
  border-bottom: 1px solid var(--cz-linha);
  padding-bottom: 8px;
  margin-bottom: 24px;
}
.editorial-section__header h2 {
  font-family: var(--cz-font);
  font-weight: 300;
  font-size: 26px;
  line-height: 1.2;
  color: var(--cz-titulo);
  margin: 0;
}
.editorial-section__veja-mais { color: var(--cz-titulo); }

/* 07/10: botão sanduíche desenhado com o ícone (Font Awesome) em branco, 28px.
   As três "barrinhas" em CSS puro não apareciam (sem contraste/estilo herdado),
   e o time precisava clicar sem ver o botão. */
.cz-toggle { align-items: center; justify-content: center; padding: 0; color: #fff; font-size: 28px; line-height: 1; }
.cz-toggle i { color: #fff; font-size: 28px; line-height: 1; display: block; }
.cz-toggle:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* Mobile (07/10): o bloco "Siga a Cannalize" passa para antes do footer, então
   os botões de redes sociais saem do footer no mobile. */
@media (max-width: 700px) {
  .cz-footer .cz-footer__links .cz-social { display: none; }
}

/* Cores das linhas/títulos também pela classe por nome (robusto a slug editado) */
.editorial-section--m-saude { --cz-linha: #3b5998; --cz-titulo: #3b5998; }
.editorial-section--m-medicinal { --cz-linha: #8a9a5b; --cz-titulo: #6f7d44; }
.editorial-section--m-industria { --cz-linha: #f1d27a; --cz-titulo: #b8921f; }
.editorial-section--m-cultura { --cz-linha: #b39ddb; --cz-titulo: #8c6fc0; }
.editorial-section--m-politica { --cz-linha: #a1805f; --cz-titulo: #7a5a3c; }
