/*
Theme Name: Jeisael
Theme URI: https://jeisael.com
Author: Jeisael.com
Description: Tema próprio do site do jornalista Jeisael Marx. Leve, rápido, pensado para leitura no celular.
Version: 1.0.0
Requires at least: 6.3
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: jeisael
*/

/* ==========================================================================
   1. Cores e fontes (para mudar o visual do site, comece por aqui)
   ========================================================================== */
:root {
  --cobalt: #1c3f94;   /* azul azulejo: links, destaques */
  --navy:   #0e1b3d;   /* azul escuro: rodapé, títulos em hover */
  --paper:  #f6f7fa;   /* fundo da página */
  --white:  #ffffff;
  --saffron:#f0b323;   /* amarelo: detalhes pontuais */
  --ink:    #1a1f2e;   /* texto principal */
  --muted:  #596277;   /* datas e textos de apoio */
  --rule:   #d9dde7;   /* linhas divisórias */

  --sans:  "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
}

/* ==========================================================================
   2. Base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.7 var(--serif);
  -webkit-font-smoothing: antialiased;
}
img, video, iframe { max-width: 100%; }
img { height: auto; display: block; }
a { color: var(--cobalt); text-underline-offset: .2em; text-decoration-thickness: .08em; }
a:hover { color: var(--navy); }
:focus-visible { outline: 3px solid var(--cobalt); outline-offset: 2px; }
h1, h2, h3, h4 { font-family: var(--sans); line-height: 1.15; letter-spacing: -.01em; margin: 0 0 .6em; }

.wrap { width: min(100% - 2rem, 72rem); margin-inline: auto; }

.screen-reader-text {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px); white-space: nowrap;
}
.skip-link { position: absolute; left: -999px; top: 0; z-index: 100; background: var(--saffron); color: var(--ink); padding: .6rem 1rem; font-family: var(--sans); font-weight: 600; }
.skip-link:focus { left: 0; }

/* ==========================================================================
   3. Friso de azulejo (assinatura visual do site)
   ========================================================================== */
.tile-band {
  height: 20px;
  background-color: var(--cobalt);
  background-size: 20px 20px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 28 28'%3E%3Cpath d='M14 2l3.5 8.5L26 14l-8.5 3.5L14 26l-3.5-8.5L2 14l8.5-3.5z' fill='%23f6f7fa' fill-opacity='.92'/%3E%3Ccircle cx='14' cy='14' r='2' fill='%23f0b323'/%3E%3C/svg%3E");
}

/* ==========================================================================
   4. Cabeçalho e menu
   ========================================================================== */
.site-header { background: var(--white); border-bottom: 1px solid var(--rule); }
.header-inner { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 2rem; padding-block: 1rem; }
.brand { margin-right: auto; }
.brand .custom-logo { max-height: 56px; width: auto; }
.brand-name { font: 800 1.6rem/1 var(--sans); letter-spacing: -.03em; color: var(--navy); text-decoration: none; }
.brand-name:hover { color: var(--cobalt); }

.nav-toggle {
  display: none; font: 600 .95rem var(--sans); background: none; color: var(--navy);
  border: 2px solid var(--navy); padding: .45rem .9rem; cursor: pointer;
}
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .25rem 1.5rem; }
.site-nav a { font: 600 .98rem var(--sans); color: var(--ink); text-decoration: none; padding: .35rem 0; border-bottom: 3px solid transparent; }
.site-nav a:hover, .site-nav .current-menu-item > a, .site-nav .current-cat > a { border-bottom-color: var(--saffron); color: var(--navy); }

.search-form { display: flex; }
.search-form input[type="search"] {
  font: 400 .95rem var(--sans); padding: .5rem .75rem; border: 1px solid var(--rule);
  border-right: 0; background: var(--paper); min-width: 0; width: 11rem; border-radius: 0;
}
.search-form button {
  font: 600 .95rem var(--sans); padding: .5rem .9rem; border: 1px solid var(--cobalt);
  background: var(--cobalt); color: var(--white); cursor: pointer; border-radius: 0;
}
.search-form button:hover { background: var(--navy); border-color: var(--navy); }

@media (max-width: 47.99em) {
  .js .nav-toggle { display: inline-block; }
  .js .site-nav { display: none; flex-basis: 100%; order: 3; }
  .js .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; gap: 0; }
  .site-nav a { display: block; padding: .7rem 0; border-bottom: 1px solid var(--rule); }
  .header-search { flex-basis: 100%; order: 4; }
  .header-search .search-form input[type="search"] { flex: 1; width: auto; }
}

/* ==========================================================================
   5. Destaque da página inicial
   ========================================================================== */
.hero { display: grid; gap: 1.25rem; padding-block: 2rem; border-bottom: 1px solid var(--rule); }
.hero-media { display: block; background: var(--rule); }
.hero-media img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.hero-title { font-weight: 800; font-size: clamp(1.9rem, 4.2vw, 3.1rem); line-height: 1.05; letter-spacing: -.025em; margin-bottom: .5em; }
.hero-title a { color: var(--ink); text-decoration: none; }
.hero-title a:hover { color: var(--cobalt); }
.hero-excerpt { font-size: 1.15rem; max-width: 38em; margin: 0 0 .9rem; }
@media (min-width: 48em) {
  .hero.has-thumb { grid-template-columns: 1.5fr 1fr; align-items: center; gap: 2.5rem; }
}

.meta { font: 500 .88rem var(--sans); color: var(--muted); }

/* ==========================================================================
   6. Lista de matérias e barra lateral
   ========================================================================== */
.layout { display: grid; gap: 2.5rem; padding-block: 2rem 3rem; }
@media (min-width: 62em) { .layout.has-sidebar { grid-template-columns: minmax(0, 1fr) 19rem; gap: 3.5rem; } }

.page-head { padding-block: 2rem 0; }
.page-title { font-weight: 800; font-size: clamp(1.7rem, 3.5vw, 2.4rem); letter-spacing: -.02em; margin-bottom: .25em; }
.page-sub { color: var(--muted); margin: 0; font-family: var(--sans); }

.card { display: grid; grid-template-columns: 1fr; gap: .5rem 1rem; padding-block: 1.25rem; border-bottom: 1px solid var(--rule); }
.card:first-child { padding-top: 0; }
.card.has-thumb { grid-template-columns: 7.5rem 1fr; align-items: start; }
.card-thumb { display: block; background: var(--rule); }
.card-thumb img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
.card-title { font-weight: 700; font-size: 1.2rem; letter-spacing: -.01em; margin: 0 0 .3em; }
.card-title a { color: var(--ink); text-decoration: none; }
.card-title a:hover { color: var(--cobalt); text-decoration: underline; }
.card-excerpt { margin: 0 0 .5rem; font-size: 1rem; line-height: 1.55; color: #333a4d; display: none; }
@media (min-width: 40em) {
  .card.has-thumb { grid-template-columns: 14rem 1fr; gap: 1.25rem; }
  .card-thumb img { aspect-ratio: 4 / 3; }
  .card-title { font-size: 1.4rem; }
  .card-excerpt { display: block; }
}

.sidebar .widget { margin-bottom: 2rem; }
.widget-title { font: 800 1.05rem var(--sans); margin: 0 0 .8rem; padding-top: .6rem; border-top: 3px solid var(--cobalt); }
.sidebar ul { list-style: none; margin: 0; padding: 0; }
.sidebar li { padding: .45rem 0; border-bottom: 1px solid var(--rule); font-family: var(--sans); font-size: .95rem; line-height: 1.35; }
.sidebar li a { color: var(--ink); text-decoration: none; }
.sidebar li a:hover { color: var(--cobalt); text-decoration: underline; }
.sidebar .search-form input[type="search"] { flex: 1; width: auto; }

/* Paginação */
.pagination { margin-top: 2rem; }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; font-family: var(--sans); }
.pagination .page-numbers { padding: .5rem .85rem; border: 1px solid var(--rule); background: var(--white); color: var(--ink); text-decoration: none; font-weight: 600; font-size: .95rem; }
.pagination a.page-numbers:hover { border-color: var(--cobalt); color: var(--cobalt); }
.pagination .current { background: var(--cobalt); border-color: var(--cobalt); color: var(--white); }
.pagination .dots { border: 0; background: none; }

/* ==========================================================================
   7. Matéria (página individual)
   ========================================================================== */
.entry { padding-block: 2rem 1rem; }
.entry-head, .entry-content, .entry-foot { max-width: 46rem; margin-inline: auto; }
.entry-cats { font: 600 .95rem var(--sans); margin-bottom: .6rem; }
.entry-cats a { color: var(--cobalt); text-decoration: none; margin-right: .9rem; border-bottom: 2px solid var(--saffron); }
.entry-title { font-weight: 800; font-size: clamp(2rem, 5vw, 3.2rem); line-height: 1.05; letter-spacing: -.028em; margin-bottom: .5em; }
.entry-figure { max-width: 56rem; margin: 1.5rem auto 2rem; }
.entry-figure img { width: 100%; }
.entry-figure figcaption { font: .85rem var(--sans); color: var(--muted); margin-top: .5rem; }

.entry-content { font-size: 1.15rem; line-height: 1.75; }
.entry-content > * { margin-block: 0 1.25em; }
.entry-content h2 { font-size: 1.6rem; margin-top: 1.8em; }
.entry-content h3 { font-size: 1.3rem; margin-top: 1.5em; }
.entry-content blockquote { margin-inline: 0; padding: .2rem 0 .2rem 1.25rem; border-left: 4px solid var(--saffron); font-style: italic; }
.entry-content img { margin-inline: auto; }
.entry-content iframe[src*="youtube"], .entry-content iframe[src*="youtu.be"], .entry-content iframe[src*="vimeo"] { width: 100%; aspect-ratio: 16 / 9; height: auto; }
.entry-content .alignleft { float: left; margin: .3rem 1.25rem 1rem 0; }
.entry-content .alignright { float: right; margin: .3rem 0 1rem 1.25rem; }
.entry-content .aligncenter { margin-inline: auto; }
.entry-content table { border-collapse: collapse; width: 100%; font-family: var(--sans); font-size: .95rem; }
.entry-content th, .entry-content td { border: 1px solid var(--rule); padding: .5rem .7rem; text-align: left; }
.wp-caption { max-width: 100%; }
.wp-caption-text, .entry-content figcaption { font: .85rem var(--sans); color: var(--muted); margin-top: .4rem; }

.entry-foot { padding-top: 1rem; border-top: 1px solid var(--rule); }
.tags { font: .9rem var(--sans); margin-bottom: 1.25rem; }
.tags a { display: inline-block; margin: 0 .5rem .4rem 0; padding: .2rem .6rem; border: 1px solid var(--rule); background: var(--white); color: var(--ink); text-decoration: none; }
.tags a:hover { border-color: var(--cobalt); color: var(--cobalt); }

.share { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; font-family: var(--sans); margin-bottom: 1.5rem; }
.share-label { font-weight: 700; margin-right: .25rem; }
.share a, .share button {
  font: 600 .9rem var(--sans); padding: .5rem .9rem; background: var(--white); color: var(--navy);
  border: 2px solid var(--navy); text-decoration: none; cursor: pointer; border-radius: 0;
}
.share a:hover, .share button:hover { background: var(--navy); color: var(--white); }
.share a.share-whatsapp { background: var(--saffron); border-color: var(--saffron); color: var(--ink); }
.share a.share-whatsapp:hover { background: var(--navy); border-color: var(--navy); color: var(--white); }

.post-nav { display: grid; gap: 1rem; font-family: var(--sans); margin-bottom: 1rem; }
.post-nav a { display: block; padding: 1rem; background: var(--white); border: 1px solid var(--rule); color: var(--ink); text-decoration: none; font-weight: 700; line-height: 1.3; }
.post-nav a:hover { border-color: var(--cobalt); color: var(--cobalt); }
.post-nav small { display: block; font-weight: 500; color: var(--muted); margin-bottom: .25rem; }
@media (min-width: 40em) { .post-nav { grid-template-columns: 1fr 1fr; } }

.related { max-width: 56rem; margin: 2.5rem auto 0; padding-top: 1.5rem; border-top: 3px solid var(--cobalt); }
.related-title { font-size: 1.3rem; font-weight: 800; }
.related .card:first-child { padding-top: 1.25rem; }
.related .card:last-child { border-bottom: 0; }

/* Comentários */
.comments { max-width: 46rem; margin: 2.5rem auto 3rem; font-family: var(--sans); }
.comments-title, .comment-reply-title { font-size: 1.3rem; font-weight: 800; }
.comment-list { list-style: none; padding: 0; }
.comment-list .children { list-style: none; padding-left: 1.5rem; }
.comment-body { padding: 1rem 0; border-bottom: 1px solid var(--rule); }
.comment-author .avatar { float: left; margin-right: .75rem; border-radius: 50%; }
.comment-metadata { font-size: .85rem; color: var(--muted); }
.comment-metadata a { color: var(--muted); }
.comment-form label { display: block; font-weight: 600; margin-bottom: .25rem; }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea {
  width: 100%; font: 1rem var(--sans); padding: .6rem .75rem; border: 1px solid var(--rule); background: var(--white); border-radius: 0;
}
.comment-form .submit { font: 700 1rem var(--sans); padding: .7rem 1.4rem; background: var(--cobalt); color: var(--white); border: 0; cursor: pointer; border-radius: 0; }
.comment-form .submit:hover { background: var(--navy); }

/* ==========================================================================
   8. Páginas simples, busca vazia e 404
   ========================================================================== */
.simple { max-width: 46rem; margin-inline: auto; padding-block: 2.5rem 3rem; }
.empty { padding-block: 1.5rem; font-family: var(--sans); }
.empty .search-form { margin-block: 1rem 2rem; max-width: 26rem; }
.empty .search-form input[type="search"] { flex: 1; width: auto; }

/* ==========================================================================
   9. Rodapé
   ========================================================================== */
.site-footer { margin-top: 2rem; background: var(--navy); color: #d5dbeb; font-family: var(--sans); font-size: .95rem; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: center; justify-content: space-between; padding-block: 1.75rem; }
.site-footer a { color: var(--white); text-underline-offset: .2em; }
.site-footer a:hover { color: var(--saffron); }
.footer-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; }
.footer-name { font-weight: 800; font-size: 1.15rem; color: var(--white); margin: 0 0 .15rem; }
.site-footer :focus-visible { outline-color: var(--saffron); }

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
@media print {
  .tile-band, .site-header, .site-footer, .share, .post-nav, .related, .comments, .sidebar { display: none !important; }
  body { background: #fff; }
}
