/* ─────────────────────────────────────────────
   custom.css — fallbacks e ajustes finos
   (coisas que o WP injetava inline e não vieram no hueman-main.css)
   ───────────────────────────────────────────── */

/* WordPress preset variables (essenciais para hueman-main.css) */
:root {
  --wp--preset--color--black: #000000;
  --wp--preset--color--white: #ffffff;
  --wp--preset--color--cyan-bluish-gray: #abb8c3;
  --wp--preset--color--pale-pink: #f78da7;
  --wp--preset--color--vivid-red: #cf2e2e;
  --wp--preset--color--luminous-vivid-orange: #ff6900;
  --wp--preset--color--luminous-vivid-amber: #fcb900;
  --wp--preset--color--light-green-cyan: #7bdcb5;
  --wp--preset--color--vivid-green-cyan: #00d084;
  --wp--preset--color--pale-cyan-blue: #8ed1fc;
  --wp--preset--color--vivid-cyan-blue: #0693e3;
  --wp--preset--color--vivid-purple: #9b51e0;
  --wp--preset--font-size--small: 13px;
  --wp--preset--font-size--medium: 20px;
  --wp--preset--font-size--large: 36px;
  --wp--preset--font-size--x-large: 42px;
  --wp--preset--spacing--20: 0.44rem;
  --wp--preset--spacing--30: 0.67rem;
  --wp--preset--spacing--40: 1rem;
  --wp--preset--spacing--50: 1.5rem;
}

/* Reset mínimo */
html, body { margin: 0; padding: 0; }
img { max-width: 100%; height: auto; display: block; }

/* Screen reader (usado no skip-link do header) */
.screen-reader-text {
  border: 0;
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
  word-wrap: normal !important;
}
.screen-reader-text:focus {
  background: #ddd;
  clip-path: none;
  color: #444;
  display: block;
  font-size: 1em;
  height: auto;
  left: 5px;
  line-height: normal;
  padding: 15px 23px 14px;
  text-decoration: none;
  top: 5px;
  width: auto;
  z-index: 100000;
}

/* Post thumbnail (thumb no topo do card) */
.post-thumbnail img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

/* Featured post (thumb maior) */
.featured .post-thumbnail img { aspect-ratio: 679 / 340; }
.post-list .post-thumbnail img { aspect-ratio: 720 / 340; }

/* Footer widgets (o WP block-list styles não vieram) */
.footer-widget-1 .wp-block-page-list,
.footer-widget-1 ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.footer-widget-1 ul li { margin-bottom: 0.5em; }
.footer-widget-1 ul li a { text-decoration: none; }

/* Sidebar social links */
.sidebar .social-links { list-style: none; margin: 0; padding: 0; display: flex; gap: 10px; }

/* Back-to-top */
#back-to-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 999;
  cursor: pointer;
  display: none;
}
#back-to-top.visible { display: block; }

/* ─────────────────────────────────────────────
   POST PAGE
   ───────────────────────────────────────────── */

/* Breadcrumb de categoria no topo do post */
.meta-single {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 10px;
}
.meta-single .category a {
  font-size: 0.9em;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  opacity: 0.85;
  text-decoration: none;
}

/* Título grande no post */
.post .post-title.entry-title {
  margin: 0.2em 0 0.4em;
  font-size: 2em;
  line-height: 1.2;
}

/* Byline (autor + datas) */
.post-byline {
  font-size: 0.92em;
  opacity: 0.8;
  margin-bottom: 1.2em;
}
.post-byline a { text-decoration: none; }

/* Corpo do post */
.entry-inner .wp-block-paragraph {
  margin: 0 0 1.1em;
  line-height: 1.7;
}
.entry-inner .wp-block-image { margin: 1.5em 0; }
.entry-inner .wp-block-image img {
  width: 100%;
  height: auto;
  border-radius: 4px;
}

/* Tags abaixo do post */
.post-tags {
  margin: 1.5em 0 2em;
  font-size: 0.9em;
  opacity: 0.85;
}
.post-tags span { font-weight: 600; margin-right: 4px; }
.post-tags a { text-decoration: none; }

/* Related posts (grid 3 colunas) */
.heading {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 2em 0 1em;
  font-size: 1.1em;
}
.related-posts {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.related-posts .related-inner { padding: 8px 0; }
.related-posts .post-title {
  font-size: 0.95em;
  margin: 0.3em 0;
  line-height: 1.3;
}
.related-posts .post-thumbnail img {
  width: 100%;
  aspect-ratio: 520 / 245;
  object-fit: cover;
}

/* "Previous story" na sidebar S1 */
.post-nav {
  list-style: none;
  margin: 1.2em 0 0;
  padding: 0;
}
.post-nav li strong {
  display: block;
  font-size: 0.85em;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  opacity: 0.75;
  margin-bottom: 4px;
}
.post-nav li a {
  display: flex;
  gap: 8px;
  text-decoration: none;
  line-height: 1.35;
  font-size: 0.95em;
}

/* Responsivo: related posts em 1 coluna no mobile */
@media (max-width: 720px) {
  .related-posts { grid-template-columns: 1fr; }
  .post .post-title.entry-title { font-size: 1.5em; }
}

/* ─────────────────────────────────────────────
   FIX: Related Posts (carrossel em fileira única com 5 posts)
   ───────────────────────────────────────────── */

.related-carousel {
  margin: 1.8em 0 1em;
}
.related-carousel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 0.9em;
}
.related-carousel-header .heading {
  margin: 0;
}
.related-carousel-controls {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}
.related-nav-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid #d1d5db;
  background: #fff;
  color: #334155;
  font-size: 1.2em;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  touch-action: manipulation;
  transition: background .15s, color .15s, border-color .15s;
}
.related-nav-btn:hover {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}
.related-nav-btn:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* Fileira única com rolagem horizontal (carrossel) */
.related-posts {
  display: flex !important;
  flex-wrap: nowrap !important;
  gap: 14px !important;
  overflow-x: auto !important;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
  touch-action: manipulation;
  -webkit-overflow-scrolling: touch;
  list-style: none !important;
  margin: 0 !important;
  padding: 2px 2px 10px !important;
  scrollbar-width: thin;
}
@media (prefers-reduced-motion: no-preference) {
  .related-posts {
    scroll-behavior: smooth;
  }
}

/* Cada card ocupa um tamanho fixo compacto na fileira (peek do próximo) */
.related-posts .related {
  flex: 0 0 210px !important;
  max-width: 210px !important;
  scroll-snap-align: start;
  float: none !important;
  margin: 0 !important;
  width: auto !important;
}

/* Imagem do thumbnail: 100% de largura, altura proporcional */
.related-posts .post-thumbnail {
  width: 100% !important;
  float: none !important;
  margin: 0 0 8px 0 !important;
}
.related-posts .post-thumbnail img {
  width: 100% !important;
  aspect-ratio: 520 / 245;
  object-fit: cover;
  height: auto !important;
  display: block !important;
  border-radius: 6px !important;
}

/* Cancela qualquer float que o tema tenha aplicado no texto */
.related-posts .related-inner {
  float: none !important;
  width: 100% !important;
  padding: 0 !important;
}

/* Título compacto em até 3 linhas */
.related-posts .post-title {
  font-size: 0.9em !important;
  line-height: 1.35 !important;
  margin: 0.35em 0 !important;
  word-break: normal !important;
  overflow-wrap: break-word !important;
  white-space: normal !important;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.related-posts .post-title a {
  display: block !important;
  text-decoration: none !important;
}

/* Data pequena embaixo */
.related-posts .post-meta {
  font-size: 0.78em !important;
  opacity: 0.7 !important;
}

/* No celular: cards menores para aparecer ~2 + pedaço do 3º indicando arraste */
@media (max-width: 720px) {
  .related-posts {
    gap: 10px !important;
  }
  .related-posts .related {
    flex: 0 0 165px !important;
    max-width: 165px !important;
  }
  .related-posts .post-title {
    font-size: 0.84em !important;
  }
}

/* ─────────────────────────────────────────────
   PÁGINAS ESTÁTICAS (About us, Contact, etc)
   ───────────────────────────────────────────── */

.page .entry-inner .wp-block-paragraph {
  margin: 0 0 1.2em;
  line-height: 1.7;
  font-size: 1.05em;
}

.page .page-title h1 {
  margin: 0;
  font-size: 1.8em;
  line-height: 1.3;
}

/* ─────────────────────────────────────────────
   PÁGINAS ESTÁTICAS: headings do conteúdo
   ───────────────────────────────────────────── */

.page .entry-inner h1.wp-block-heading {
  font-size: 1.9em;
  line-height: 1.25;
  margin: 0 0 0.8em;
}

.page .entry-inner h2.wp-block-heading {
  font-size: 1.4em;
  line-height: 1.3;
  margin: 1.6em 0 0.6em;
}

.page .entry-inner .wp-block-separator {
  border: none;
  border-top: 2px solid #ddd;
  margin: 1.5em 0;
}

/* Páginas estáticas: h3 e listas */
.page .entry-inner h3.wp-block-heading {
  font-size: 1.15em;
  line-height: 1.35;
  margin: 1.4em 0 0.5em;
}

.page .entry-inner ul.wp-block-list {
  margin: 0 0 1.2em 1.4em;
  padding: 0;
  list-style: disc;
}

.page .entry-inner ul.wp-block-list li {
  margin-bottom: 0.5em;
  line-height: 1.6;
}

/* ─────────────────────────────────────────────
   CATEGORIA: título com ícone
   ───────────────────────────────────────────── */

.category .page-title h1 i.fas,
.page-title h1 i.fas {
  margin-right: 0.4em;
  color: var(--color-accent);
  font-size: 0.9em;
}

/* Paginação prev/next */
.pagination ul {
  list-style: none;
  margin: 1.5em 0;
  padding: 0;
  display: flex;
  justify-content: space-between;
}
.pagination .next a,
.pagination .prev a {
  padding: 0.5em 1em;
  border-radius: 4px;
  background: #f5f5f5;
  text-decoration: none;
  font-size: 0.9em;
}
.pagination .next a:hover,
.pagination .prev a:hover {
  background: var(--color-accent);
  color: white;
}

/* ── Busca: notebox + ícone do título ── */
.page-title h1 .fas { color: var(--color-accent); margin-right: 6px; }
.notebox {
  background: #fff8e5;
  border-left: 4px solid var(--color-accent);
  padding: 15px 20px;
  margin: 0 0 20px;
  color: #444;
  line-height: 1.6;
}
.notebox .search-again { margin-top: 10px; }
.notebox .search-again .search-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.notebox .search-again .search-field {
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 3px;
  min-width: 200px;
}
.notebox .search-again .search-submit {
  padding: 8px 14px;
  background: var(--color-accent);
  color: #fff;
  border: 0;
  border-radius: 3px;
  cursor: pointer;
}
.notebox .search-again .search-submit:hover { filter: brightness(0.9); }





/* se Hueman esconde por pointer-events, garante clicável */


@media (max-width: 720px) {
  
  #nav-mobile.nav-mobile-open .nav-wrap,
  
}




/* ══════════════════════════════════════════════════════════════
   MOBILE MENU — barra + painel retrátil (busca + links de navegação)
   ══════════════════════════════════════════════════════════════ */

/* Barra superior (título + hamburger) */
#nav-mobile,
#header #nav-mobile {
  background: var(--color-header);
  color: #fff;
}
#nav-mobile .mobile-title-logo-in-header .site-title a,
#nav-mobile .mobile-title-logo-in-header .site-title {
  color: #fff;
  font-weight: 400;
}
#nav-mobile .ham__navbar-toggler-two { color: #fff; }
#nav-mobile .ham__navbar-toggler-two .line {
  background: #fff;
  width: 22px;
  height: 2px;
  display: block;
  margin: 4px 0;
}

/* Painel retrátil (escondido por padrão; abre com .nav-mobile-open) */
#nav-mobile .nav-wrap {
  display: none;
  background: var(--color-header);
  padding: 10px 16px 16px;
  box-sizing: border-box;
  border-top: 1px solid rgba(255, 255, 255, .14);
  box-shadow: 0 12px 26px rgba(0, 0, 0, .28);
}
#nav-mobile.nav-mobile-open .nav-wrap { display: block; }

/* Busca dentro do painel */
#nav-mobile .nav-wrap .search-form {
  position: relative;
  display: flex;
  align-items: center;
  margin: 2px 0 14px;
  padding: 0 6px 0 14px;
  background: rgba(255, 255, 255, .13);
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 10px;
  box-sizing: border-box;
}
#nav-mobile .nav-wrap .search-form label {
  display: flex;
  align-items: center;
  flex: 1;
  margin: 0;
  min-width: 0;
}
#nav-mobile .nav-wrap .search-form .mobile-search-icon {
  color: rgba(255, 255, 255, .75);
  margin-right: 10px;
  font-size: .95em;
}
#nav-mobile .nav-wrap .search-form .search-field {
  flex: 1;
  height: 44px;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 15px;
  outline: none;
  min-width: 0;
  -webkit-appearance: none;
  appearance: none;
}
#nav-mobile .nav-wrap .search-form .search-field::placeholder { color: rgba(255, 255, 255, .65); }
#nav-mobile .nav-wrap .search-form .search-field::-webkit-search-cancel-button { display: none; }
#nav-mobile .nav-wrap .search-form .search-submit {
  border: 0;
  height: 34px;
  padding: 0 16px;
  border-radius: 7px;
  background: rgba(255, 255, 255, .92);
  color: var(--color-header);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

/* Links de navegação */
#nav-mobile .mobile-links {
  list-style: none;
  margin: 0;
  padding: 0;
}
#nav-mobile .mobile-links li a {
  display: block;
  padding: 12px 4px;
  border-bottom: 1px solid rgba(255, 255, 255, .1);
  color: rgba(255, 255, 255, .92);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  transition: padding-left .15s ease, color .15s ease;
}
#nav-mobile .mobile-links li:last-child a { border-bottom: 0; }
#nav-mobile .mobile-links li a:hover { color: #fff; padding-left: 10px; }

/* ══════════════════════════════════════════════════════════════
   CORES DO TEMA — personalizáveis pelo painel (Configurações)
   Mapeia o teal (#16cfc1) → --color-primary e o gold (#efb93f) → --color-accent
   ══════════════════════════════════════════════════════════════ */
:root {
  --color-primary: #2563eb;
  --color-accent: #f59e0b;
  --color-header: #454e5c;
  --color-footer: #33363b;
}

/* ── Cor principal (era teal) ── */
::selection, ::-moz-selection { background: var(--color-primary); color: #fff; }
a { color: var(--color-primary); }
a:hover, a:focus { color: var(--color-primary); }
.themeform label .required { color: var(--color-primary); }
.themeform button[type=submit],
.themeform input[type=submit] { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }
.sidebar.s1 .sidebar-toggle,
.sidebar.s1 .sidebar-top { background: var(--color-primary); }
.post-hover:hover .post-title a,
.post-title a:hover,
.post-tags a:hover { color: var(--color-primary); }
.sidebar.s1 .post-nav li a:hover i,
.content .post-nav li a:hover i { color: var(--color-primary); }
.wp-pagenavi a,
.wp-pagenavi a:active,
.wp-pagenavi a:hover,
.wp-pagenavi span.current { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }
.author-bio .bio-avatar:after { background: var(--color-primary); }
.child-menu a:hover,
.child-menu .current_page_item > a { color: var(--color-primary); }
.comment-awaiting-moderation { color: var(--color-primary); }
.commentlist li.bypostauthor > .comment-body:after,
.commentlist li.comment-author-admin > .comment-body:after { background: var(--color-primary); }
#footer .widget_calendar caption,
.sidebar.s1 .widget_calendar caption { background: var(--color-primary); }
.post-format .format-container { background: var(--color-primary); }
a > span.hu-external:after { color: var(--color-primary); }

/* ── Cor de destaque (era gold) ── */
.sidebar.s2 .sidebar-toggle,
.sidebar.s2 .sidebar-top { background: var(--color-accent); }
.post-comments,
.post-comments::before { color: var(--color-accent); }
.sidebar.s2 .post-nav li a:hover i { color: var(--color-accent); }
.hu-placeholder-widget { background: var(--color-accent); }

/* ══════════════════════════════════════════════════════════════
   SIDEBAR WIDGETS — S2 "Mais" (últimos posts, categorias, tags)
   ══════════════════════════════════════════════════════════════ */
.sidebar .widget {
  margin: 0 0 16px;
  padding: 0 4px;
}
.sidebar .widget-title {
  font-size: 0.85em;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px;
  margin: 0 0 8px;
}
.sidebar .widget ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.sidebar .widget ul li {
  margin-bottom: 6px;
  line-height: 1.35;
}
.sidebar .widget ul li a {
  text-decoration: none;
}

/* Categorias compactas em pílulas lado a lado */
.sidebar .widget_categories ul {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.sidebar .widget_categories ul li {
  margin: 0;
}
.sidebar .widget_categories ul li a {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 4px;
  background: rgba(0, 0, 0, .06);
  font-size: 0.8em;
  line-height: 1.3;
  transition: background .15s, color .15s;
}
.sidebar .widget_categories ul li a:hover {
  background: var(--color-primary);
  color: #fff;
}

/* Tags compactas */
.sidebar .tagcloud {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.sidebar .tagcloud a.tag-link {
  display: inline-block;
  margin: 0;
  padding: 2px 7px;
  border-radius: 3px;
  background: rgba(0, 0, 0, .06);
  text-decoration: none;
  font-size: 0.76em;
  line-height: 1.35;
  transition: background .15s, color .15s;
}
.sidebar .tagcloud a.tag-link:hover {
  background: var(--color-primary);
  color: #fff;
}

/* Últimos posts na sidebar: 2 colunas compactas no mobile */
@media (max-width: 720px) {
  .sidebar .widget_recent_entries ul {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .sidebar .widget_recent_entries ul li {
    margin: 0;
    padding: 8px 10px;
    background: rgba(0, 0, 0, .035);
    border-radius: 6px;
    font-size: 0.82em;
    line-height: 1.3;
  }
  .sidebar .widget_recent_entries ul li a {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
}

/* ── Cabeçalho / rodapé ── */
#header { background: var(--color-header); }
#footer-bottom { background: var(--color-footer); }

/* ══════════════════════════════════════════════════════════════
   BLOCOS DE CÓDIGO (Quill 2: ql-code-block-container)
   O editor carrega quill.snow.css; o site público não — daí este bloco.
   ══════════════════════════════════════════════════════════════ */
.entry-inner .ql-code-block-container {
  background: #23241f;
  color: #f8f8f2;
  padding: 12px 16px;
  border-radius: 6px;
  margin: 1.2em 0;
  font-family: Consolas, Monaco, "Courier New", monospace;
  font-size: 0.9em;
  line-height: 1.55;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
}
.entry-inner .ql-code-block {
  white-space: pre-wrap;
  word-break: break-word;
}


/* ══════════════════════════════════════════════════════════════
   BUSCA — barra em destaque + estado vazio
   ══════════════════════════════════════════════════════════════ */
.search-form-hero {
  display: flex;
  max-width: 640px;
  margin: 0 auto 6px;
  background: #fff;
  border: 2px solid var(--color-primary);
  border-radius: 50px;
  overflow: hidden;
  box-shadow: 0 3px 14px rgba(0, 0, 0, .08);
}
.search-form-hero label {
  display: flex;
  align-items: center;
  flex: 1;
  margin: 0;
  padding-left: 18px;
  min-width: 0;
}
.search-form-hero .search-hero-icon {
  color: var(--color-primary);
  font-size: 1.05em;
  margin-right: 10px;
}
.search-form-hero .search-field {
  flex: 1;
  border: 0;
  outline: none;
  background: transparent;
  padding: 14px 10px;
  font-size: 1.05em;
  color: #333;
  min-width: 0;
  -webkit-appearance: none;
  appearance: none;
}
.search-form-hero .search-submit {
  border: 0;
  padding: 0 28px;
  background: var(--color-primary);
  color: #fff;
  font-weight: 700;
  font-size: .92em;
  letter-spacing: .3px;
  cursor: pointer;
  transition: filter .15s;
}
.search-form-hero .search-submit:hover { filter: brightness(.92); }

/* Evita ícone de busca duplicado (o tema injeta label:after; nós usamos <i>) */
.search-form.search-form-hero label:after,
#nav-mobile .nav-wrap .search-form label:after { display: none; }

.search-empty {
  text-align: center;
  padding: 50px 20px;
  color: #666;
}
.search-empty i {
  display: block;
  font-size: 2.6em;
  color: var(--color-primary);
  opacity: .7;
  margin-bottom: 14px;
}
.search-empty p { margin: 0; font-size: 1.1em; }
.search-empty .search-empty-hint { margin-top: 6px; font-size: .9em; opacity: .75; }

@media (max-width: 520px) {
  .search-form-hero { border-radius: 12px; }
  .search-form-hero .search-submit { padding: 0 18px; }
}
