/*
Theme Name: S. Bernardes Advogados — Artigos
Theme URI: https://sbernardesadvogados.com.br
Author: Y9 Estúdio de Criação
Author URI: https://y9estudio.com.br
Description: Tema para o blog de artigos do S. Bernardes Advogados, com a mesma identidade visual do site institucional (sbernardesadvogados.com.br).
Version: 1.0
Requires at least: 6.0
Requires PHP: 7.4
License: Uso exclusivo do cliente
Text Domain: sbernardes-artigos
*/

:root {
  --ink: #111315;
  --black: #050607;
  --charcoal: #0d0f11;
  --paper: #f6f5f2;
  --white: #fff;
  --muted: #6b7075;
  --line: #dededa;
  --wood: #a1734a;
  --max: 1240px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: Arial, Helvetica, sans-serif; line-height: 1.55; }
a { color: inherit; }
img { display: block; max-width: 100%; }
.shell { width: min(calc(100% - 40px), var(--max)); margin-inline: auto; }

/* Cabeçalho (igual ao site institucional) */
.topline { background: #000; color: #babec2; font-size: .75rem; }
.toplineInner { min-height: 34px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.topline a { color: white; text-decoration: none; }
.siteHeader { position: sticky; top: 0; z-index: 50; background: #000000; border-bottom: 1px solid rgba(255,255,255,.1); }
.nav { min-height: 92px; display: flex; align-items: center; gap: 24px; }
.brand { height: 76px; overflow: visible; display: block; }
.brand img { width: auto; height: 100%; object-fit: contain; object-position: center; }
.navLinks { margin-left: auto; display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.navLinks a { padding: 10px 12px; color: #d8dcdf; font-size: .86rem; font-weight: 700; text-decoration: none; border-radius: 999px; }
.navLinks a:hover, .navLinks a:focus-visible { background: rgba(255,255,255,.08); color: white; }
.navLinks .navCta { margin-left: 6px; padding-inline: 17px; background: white; color: black; }
.navLinks .navCurrent { background: rgba(255,255,255,.12); color: white; }

/* Selo "você está no blog" */
.blogFlag { background: #16181a; color: #c7cbce; text-align: center; padding: 8px 0; font-size: .76rem; }
.blogFlag a { color: #fff; text-decoration: underline; }

.eyebrow { margin: 0 0 14px; text-transform: uppercase; letter-spacing: .17em; font-size: .7rem; font-weight: 800; color: #71777c; }
.eyebrow.light { color: #c0c5ca; }

/* Listagem de artigos */
.articlesHero { padding: 56px 0 30px; background: var(--paper); }
.articlesHero h1 { font-family: Georgia, "Times New Roman", serif; font-weight: 400; font-size: clamp(2.1rem, 4.6vw, 3rem); line-height: 1.1; letter-spacing: -.02em; margin: 12px 0 10px; }
.articlesHero p { color: var(--muted); font-size: 1rem; max-width: 640px; margin: 0; }

.articlesList { padding: 10px 0 90px; display: grid; gap: 22px; }
.articleCard { display: grid; grid-template-columns: 260px 1fr; gap: 28px; align-items: center; padding: 22px; border: 1px solid var(--line); border-radius: 22px; background: var(--white); text-decoration: none; color: inherit; }
.articleCard:hover { border-color: var(--wood); }
.articleCard .thumb { margin: 0; border-radius: 16px; overflow: hidden; background: #e2e2df; aspect-ratio: 4/3; }
.articleCard .thumb img { width: 100%; height: 100%; object-fit: cover; }
.articleCard .thumb.noImage { display: flex; align-items: center; justify-content: center; }
.articleCard .thumb.noImage img { width: 56px; height: 56px; object-fit: contain; opacity: .35; }
.articleCard .meta { color: var(--muted); font-size: .78rem; margin: 0 0 8px; }
.articleCard h2 { font-family: Georgia, serif; font-weight: 400; font-size: 1.5rem; margin: 0 0 10px; line-height: 1.25; }
.articleCard .excerpt { color: #45494c; font-size: .92rem; line-height: 1.6; margin: 0; }
.articleCard .readMore { display: inline-block; margin-top: 14px; font-size: .82rem; font-weight: 700; color: var(--wood); }

.pagination { display: flex; gap: 10px; justify-content: center; padding-bottom: 80px; }
.pagination a, .pagination span { padding: 10px 16px; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; color: var(--ink); font-size: .85rem; }
.pagination .current { background: var(--ink); color: white; border-color: var(--ink); }

.emptyState { padding: 60px 0 100px; text-align: center; color: var(--muted); }

/* Página de artigo individual */
.articleBreadcrumb { background: #000; padding: 16px 0; }
.articleBreadcrumb a { color: #c7cbce; font-size: .8rem; text-decoration: none; font-weight: 600; }
.articleBreadcrumb a:hover { color: #fff; }
.articleHero { padding: 56px 0 40px; background: var(--paper); }
.articleHero .eyebrow { color: var(--wood); }
.articleHero h1 { font-family: Georgia, "Times New Roman", serif; font-weight: 400; font-size: clamp(2.1rem, 4.6vw, 3.3rem); line-height: 1.1; letter-spacing: -.02em; margin: 12px 0 20px; max-width: 880px; }
.articleMeta { display: flex; gap: 18px; flex-wrap: wrap; color: var(--muted); font-size: .85rem; margin: 0 0 4px; }
.articleCover { margin: 0; background: #d7d7d4; }
.articleCover img { width: 100%; max-height: 560px; object-fit: cover; display: block; }
.articleBody { max-width: 760px; margin: 0 auto; padding: 56px 0 10px; }
.articleBody p { font-size: 1.05rem; line-height: 1.8; margin: 0 0 22px; color: var(--ink); }
.articleBody h2, .articleBody h3 { font-family: Georgia, serif; font-weight: 400; font-size: 1.7rem; margin: 44px 0 16px; }
.articleBody blockquote { margin: 34px 0; padding: 2px 0 2px 22px; border-left: 3px solid var(--wood); font-family: Georgia, serif; font-size: 1.28rem; line-height: 1.5; color: #3a3d40; }
.articleBody ul, .articleBody ol { font-size: 1.05rem; line-height: 1.8; color: var(--ink); padding-left: 22px; }
.articleBody li { margin-bottom: 8px; }
.articleBody img { border-radius: 18px; margin: 20px 0; }
.articleBody figure { margin: 20px 0; }
.articleBody .wp-block-embed, .articleBody .wp-embed-responsive { position: relative; width: 100%; padding-top: 56.25%; margin: 10px 0 40px; border-radius: 20px; overflow: hidden; background: #000; }
.articleBody .wp-block-embed iframe, .articleBody .wp-embed-responsive iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.articleBody .wp-block-gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 10px 0 40px; }
.articleBody .wp-block-gallery figure { margin: 0; border-radius: 18px; overflow: hidden; background: #e2e2df; }
.articleBody .wp-block-gallery img { width: 100%; height: 220px; object-fit: cover; display: block; margin: 0; border-radius: 0; }
.articleCta { max-width: 760px; margin: 10px auto 72px; padding: 34px; border: 1px solid rgba(255,255,255,.12); border-radius: 24px; background: #0d0f11; color: #fff; display: flex; align-items: center; justify-content: space-between; gap: 22px; flex-wrap: wrap; }
.articleCta p { margin: 0; font-size: 1.05rem; max-width: 460px; color: #fff; }
.articleCta a { display: inline-flex; align-items: center; gap: 8px; padding: 13px 22px; background: white; color: black; border-radius: 999px; text-decoration: none; font-weight: 800; font-size: .86rem; white-space: nowrap; }
.articleShare { max-width: 760px; margin: 0 auto 60px; display: flex; align-items: center; gap: 14px; color: var(--muted); font-size: .82rem; }
.articleShare a { color: var(--ink); font-weight: 700; text-decoration: none; padding: 8px 16px; border: 1px solid var(--line); border-radius: 999px; }
.articleShare a:hover { background: var(--ink); color: #fff; }

/* Rodapé (igual ao site institucional) */
.footer { padding: 58px 0 22px; background: #030405; color: white; }
.footerGrid { display: grid; grid-template-columns: 1.4fr .7fr .9fr; gap: 50px; }
.footerBrand img { width: 150px; height: auto; object-fit: contain; object-position: left center; }
.footerBrand p { max-width: 500px; margin: 15px 0 0; color: #a8aeb3; font-size: .83rem; }
.footer nav { display: flex; flex-direction: column; gap: 9px; }
.footer nav strong { margin-bottom: 7px; text-transform: uppercase; letter-spacing: .14em; font-size: .7rem; }
.footer nav a { color: #aeb4b9; text-decoration: none; font-size: .82rem; overflow-wrap: anywhere; }
.footerLegal { margin-top: 38px; padding-top: 20px; display: flex; justify-content: space-between; gap: 24px; border-top: 1px solid rgba(255,255,255,.1); color: #838a90; font-size: .72rem; flex-wrap: wrap; }

.floatingWhatsApp { position: fixed; right: 20px; bottom: 20px; z-index: 70; padding: 13px 17px; display: flex; align-items: center; gap: 9px; border: 1px solid #d8d8d6; border-radius: 999px; background: white; box-shadow: 0 18px 45px rgba(0,0,0,.22); color: black; text-decoration: none; font-size: .84rem; font-weight: 800; }

.menuButton { display: none; margin-left: auto; width: 44px; height: 44px; border-radius: 12px; border: 1px solid rgba(255,255,255,.2); background: transparent; }
.menuButton span { display: block; width: 20px; height: 2px; margin: 4px auto; background: white; }

@media (max-width: 900px) {
  .articleCard { grid-template-columns: 1fr; }
  .articleCard .thumb { aspect-ratio: 16/9; }
}

@media (max-width: 780px) {
  .articleBody .wp-block-gallery { grid-template-columns: 1fr 1fr; }
  .articleCover img { max-height: 380px; }
}

@media (max-width: 680px) {
  .menuButton { display: block; }
  .navLinks { position: fixed; inset: 92px 0 0 0; background: #000; flex-direction: column; align-items: flex-start; padding: 20px; gap: 4px; transform: translateY(-8px); opacity: 0; pointer-events: none; transition: .2s ease; }
  .navLinks.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .navLinks a { width: 100%; padding: 14px 12px; }
  .footerGrid { grid-template-columns: 1fr; gap: 30px; }
  .articleBody .wp-block-gallery { grid-template-columns: 1fr; }
  .articleCta { flex-direction: column; align-items: flex-start; }
}
