/*
Theme Name: André Abdala Advocacia
Description: Tema exclusivo do site de André Soares Abdala Lacerda – Advocacia. Página inicial institucional com áreas de atuação, formação, missão e contato, além de artigos e vídeos.
Version: 1.2.0
Requires at least: 6.0
Requires PHP: 7.4
License: Proprietário – uso exclusivo
Text Domain: andre-abdala
*/

/* Os estilos principais estão em assets/css/main.css.
   Este arquivo contém os estilos de artigos, vídeos e páginas internas. */

.screen-reader-text {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px); white-space: nowrap;
}

/* ===== Barra de administração do WordPress (quando logado) ===== */
.admin-bar .header { top: 32px; }
.admin-bar .nav { top: calc(var(--header-h) + 32px); }
@media (max-width: 782px) {
  .admin-bar .header { top: 46px; }
  .admin-bar .nav { top: calc(var(--header-h) + 46px); }
}

/* Menu: com o item "Artigos e vídeos" ele precisa de mais espaço,
   então o menu "sanduíche" entra em telas de até 1100px */
.nav a { white-space: nowrap; }
@media (max-width: 1100px) {
  .nav-toggle { display: block; }
  .nav {
    position: fixed; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--border);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, .7);
    padding: .5rem 16px 1.25rem;
    transform: translateY(-120%); visibility: hidden;
    transition: transform .3s ease, visibility 0s linear .3s;
  }
  .nav.is-open { transform: translateY(0); visibility: visible; transition: transform .3s ease, visibility 0s; }
  .nav a:not(.btn) { padding: .9rem 0; border-bottom: 1px solid var(--border); font-size: 1rem; }
  .nav .btn { margin-top: 1rem; }
  .header.menu-open { background: var(--bg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

/* Link ativo no menu */
.nav a[aria-current="page"]:not(.btn) { color: var(--text); }

/* ===== Cabeçalho das páginas internas ===== */
.page-hero {
  position: relative; overflow: hidden;
  padding: calc(var(--header-h) + 4rem) 0 3.5rem;
  background:
    radial-gradient(50rem 25rem at 90% -20%, rgba(129, 140, 248, .2), transparent 60%),
    radial-gradient(40rem 25rem at -10% 10%, rgba(56, 189, 248, .14), transparent 60%),
    var(--bg);
  border-bottom: 1px solid var(--border);
}
.page-hero__inner { position: relative; }
.page-hero h1 { font-size: clamp(2rem, 4.5vw, 3.2rem); max-width: 22ch; }
.page-hero--article h1 { max-width: none; }
.page-hero__lead { color: var(--muted); font-size: 1.1rem; max-width: 60ch; margin: 0; }
.page-hero .hero__actions { margin-top: 2rem; }
@media (max-width: 700px) { .page-hero { padding: calc(var(--header-h) + 2.5rem) 0 2.5rem; } }

.section--tight { padding: 3.5rem 0 5rem; }
.container--article { max-width: 800px; }

.section__head--row {
  max-width: none; display: flex; align-items: flex-end; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap;
}
.section__head--row h2 { margin-bottom: 0; }

/* ===== Filtros por área ===== */
.chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 2rem; }
.chip {
  padding: .45rem 1rem; border-radius: 999px; border: 1px solid var(--border);
  color: var(--muted); font-size: .88rem; font-weight: 500; background: rgba(19, 28, 51, .55);
}
.chip:hover { color: var(--text); text-decoration: none; border-color: rgba(56, 189, 248, .45); }
.chip.is-active { color: var(--accent-ink); background: linear-gradient(90deg, var(--accent), var(--accent-2)); border-color: transparent; }

/* ===== Cards de artigos ===== */
.posts { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 1.5rem; }
.post-card {
  display: flex; flex-direction: column; overflow: hidden;
  border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border);
  transition: transform .25s ease, border-color .25s ease;
}
.post-card:hover { transform: translateY(-4px); border-color: rgba(56, 189, 248, .45); }
.post-card__media { position: relative; display: block; aspect-ratio: 16 / 9; background: var(--surface-2); overflow: hidden; }
.post-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.post-card:hover .post-card__media img { transform: scale(1.04); }
.post-card__ph {
  position: absolute; inset: 0; display: grid; place-items: center; padding: 1rem; text-align: center;
  font-family: var(--font-head); font-weight: 700; font-size: clamp(1.6rem, 3vw, 2.2rem); letter-spacing: -.02em;
  color: rgba(232, 237, 247, .28);
  background:
    radial-gradient(20rem 12rem at 100% 0, rgba(129, 140, 248, .25), transparent 60%),
    radial-gradient(20rem 12rem at 0 100%, rgba(56, 189, 248, .2), transparent 60%),
    var(--surface-2);
}
.post-card__play {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(10, 15, 28, .7); border: 1px solid rgba(255, 255, 255, .3); backdrop-filter: blur(4px);
}
.post-card__play svg { width: 24px; height: 24px; fill: #fff; margin-left: 3px; }
.post-card__body { padding: 1.4rem 1.5rem 1.6rem; display: flex; flex-direction: column; gap: .6rem; flex: 1; }
.post-card__title { font-size: 1.15rem; margin: 0; }
.post-card__title a { color: var(--text); }
.post-card__title a:hover { color: var(--accent); text-decoration: none; }
.post-card__excerpt { color: var(--muted); font-size: .93rem; margin: 0; }

.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .9rem; font-size: .82rem; color: var(--muted); margin: 0; }
.post-meta a { color: var(--muted); }
.post-meta a:hover { color: var(--text); }
.page-hero .post-meta { margin-bottom: 1.2rem; }
.tag {
  padding: .15rem .6rem; border-radius: 999px; font-weight: 600; font-size: .72rem;
  letter-spacing: .08em; text-transform: uppercase;
  color: var(--accent); background: rgba(56, 189, 248, .1); border: 1px solid rgba(56, 189, 248, .25);
}

/* ===== Paginação ===== */
.pagination { margin-top: 3rem; }
.pagination .nav-links { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; }
.pagination .page-numbers {
  min-width: 42px; padding: .55rem .9rem; border-radius: 10px; text-align: center;
  border: 1px solid var(--border); background: var(--surface); color: var(--muted);
}
.pagination .page-numbers.current { color: var(--accent-ink); background: var(--accent); border-color: transparent; }
.pagination a.page-numbers:hover { color: var(--text); text-decoration: none; border-color: rgba(56, 189, 248, .45); }

.empty { text-align: center; padding: 3rem 1rem; border: 1px dashed var(--border); border-radius: var(--radius); }
.empty p { color: var(--muted); }

/* ===== Artigo ===== */
.back-link { display: inline-block; margin-bottom: 1.5rem; font-size: .9rem; color: var(--muted); }
.back-link:hover { color: var(--text); text-decoration: none; }
.article__body { padding-top: 3rem; padding-bottom: 5rem; }
.article__cover { margin: 0 0 2.5rem; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); }
.article__cover img { width: 100%; height: auto; max-height: 480px; object-fit: cover; }

.prose { font-size: 1.08rem; line-height: 1.8; color: #d3dae8; }
.prose > * { margin-top: 0; margin-bottom: 1.25em; }
.prose > :last-child { margin-bottom: 0; }
.prose h2, .prose h3, .prose h4 { color: var(--text); margin: 2em 0 .6em; }
.prose h2 { font-size: 1.7rem; }
.prose h3 { font-size: 1.3rem; }
.prose a { text-decoration: underline; text-underline-offset: 3px; }
.prose ul, .prose ol { padding-left: 1.4em; margin: 0; }
.prose li + li { margin-top: .4em; }
.prose strong { color: var(--text); }
.prose blockquote {
  margin-left: 0; margin-right: 0; padding: 1rem 1.4rem; border-left: 3px solid var(--accent);
  background: var(--surface); border-radius: 0 var(--radius) var(--radius) 0; color: var(--text);
}
.prose blockquote { font-size: 1rem; line-height: 1.75; }
.prose blockquote p { margin: 0; }
.prose blockquote p + p { margin-top: .9em; }
.prose img { height: auto; border-radius: 10px; }
.prose figure { margin-left: 0; margin-right: 0; }
.prose figcaption, .prose .wp-element-caption { font-size: .85rem; color: var(--muted); text-align: center; margin-top: .6rem; }
.prose iframe, .prose video { max-width: 100%; border-radius: 12px; }
.prose .wp-block-embed { margin-left: 0; margin-right: 0; }
.prose .wp-block-embed__wrapper { border-radius: 12px; overflow: hidden; }
.prose hr { border: 0; border-top: 1px solid var(--border); margin: 2.5em 0; }
.prose table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.prose th, .prose td { border: 1px solid var(--border); padding: .6rem .8rem; text-align: left; }
.prose th { background: var(--surface); color: var(--text); }
.prose code { background: var(--surface); padding: .1em .4em; border-radius: 6px; font-size: .9em; }
.prose .alignwide { margin-left: -4vw; margin-right: -4vw; }
@media (max-width: 900px) { .prose .alignwide { margin-left: 0; margin-right: 0; } }
.prose .aligncenter { margin-left: auto; margin-right: auto; text-align: center; }

.page-links { margin-top: 2rem; color: var(--muted); }

/* Imagens alinhadas ao lado do texto */
.prose .alignright, .prose .alignleft { max-width: min(42%, 320px); margin-top: .3em; margin-bottom: 1em; }
.prose .alignright { float: right; margin-left: 1.6em; }
.prose .alignleft { float: left; margin-right: 1.6em; }
.prose .alignright img, .prose .alignleft img { width: 100%; }
.prose h2, .prose h3, .prose hr, .prose blockquote, .prose .notes-title { clear: both; }
.prose figure.size-large img { display: block; max-width: 100%; margin: 0 auto; }
@media (max-width: 600px) {
  .prose .alignright, .prose .alignleft { float: none; max-width: 100%; margin: 1.25em 0; }
}

/* Assinatura, notas e referências */
.prose .article-sign { color: var(--muted); font-style: italic; }
.prose .notes-title { font-size: 1.15rem; margin-top: 1.5em; }
.prose .notes, .prose .references { font-size: .9rem; line-height: 1.65; color: var(--muted); }
.prose .references { list-style: none; padding-left: 0; }
.prose .references li + li { margin-top: .7em; }
.prose .notes li { scroll-margin-top: calc(var(--header-h) + 1rem); }
.prose .notes a, .prose .note-ref a { text-decoration: none; }
.prose .note-ref { font-size: .75em; line-height: 0; padding-left: 1px; }
.prose .note-ref a { scroll-margin-top: calc(var(--header-h) + 1rem); }
.prose .references li, .prose .notes li { overflow-wrap: anywhere; }

.article__disclaimer {
  margin: 3rem 0 0; padding: 1rem 1.2rem; font-size: .88rem; color: var(--muted);
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-alt);
}

.author-box {
  display: flex; gap: 1.4rem; align-items: center; margin-top: 2rem; padding: 1.6rem;
  border-radius: 20px; border: 1px solid var(--border); background: var(--surface);
}
.author-box img {
  width: 96px; height: 96px; flex-shrink: 0; border-radius: 50%; object-fit: cover; object-position: 50% 20%;
  border: 2px solid var(--accent);
}
.author-box__name { font-family: var(--font-head); font-weight: 600; font-size: 1.15rem; margin: 0 0 .2rem; }
.author-box__bio { color: var(--muted); font-size: .93rem; margin: 0 0 .9rem; }
@media (max-width: 560px) { .author-box { flex-direction: column; text-align: center; } }

.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 2rem; }
.post-nav__item {
  display: grid; gap: .3rem; padding: 1.2rem 1.4rem; border-radius: var(--radius);
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
}
.post-nav__item:hover { text-decoration: none; border-color: rgba(56, 189, 248, .45); }
.post-nav__item span { font-size: .82rem; color: var(--muted); }
.post-nav__item--next { text-align: right; grid-column: 2; }
@media (max-width: 600px) {
  .post-nav { grid-template-columns: 1fr; }
  .post-nav__item--next { grid-column: auto; }
}

/* ===== Formulário de contato ===== */
.form__hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form__opt { color: var(--muted); font-weight: 400; font-size: .85em; }
.form__alert { margin: 0; padding: .85rem 1rem; border-radius: 10px; font-size: .93rem; }
.form__alert--sucesso { background: rgba(34, 197, 94, .12); border: 1px solid rgba(34, 197, 94, .45); color: #bbf7d0; }
.form__alert--erro { background: rgba(248, 113, 113, .12); border: 1px solid rgba(248, 113, 113, .45); color: #fecaca; }
.form button[disabled] { opacity: .7; cursor: wait; transform: none; }

/* ===== Rodapé com links ===== */
.footer__links { display: flex; flex-wrap: wrap; justify-content: center; gap: .3rem .7rem; font-size: .9rem; color: var(--muted); }
.footer__links a { color: var(--muted); }
.footer__links a:hover { color: var(--text); }


/* =========================================================
   Aprimoramentos sutis (v1.2) — mesma identidade visual
   ========================================================= */

/* Barra fina de progresso de leitura no topo */
.scroll-progress {
  position: absolute; left: 0; bottom: -1px; height: 2px; width: 100%;
  transform-origin: left; transform: scaleX(var(--p, 0));
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  pointer-events: none;
}

/* Menu: item da seção visível fica destacado */
.nav a:not(.btn) { position: relative; }
.nav a.is-active:not(.btn) { color: var(--text); }
@media (min-width: 1101px) {
  .nav a:not(.btn)::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px; border-radius: 2px;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    transform: scaleX(0); transition: transform .3s ease;
  }
  .nav a:not(.btn):hover::after, .nav a.is-active:not(.btn)::after, .nav a[aria-current="page"]:not(.btn)::after { transform: scaleX(1); }
}

/* Hero: grade com movimento lento e brilho suave */
.hero__grid { animation: grid-drift 40s linear infinite; }
@keyframes grid-drift { to { background-position: 56px 56px, 56px 56px; } }
.hero::after {
  content: ""; position: absolute; width: 36rem; height: 36rem; right: -10rem; top: -12rem; border-radius: 50%;
  background: radial-gradient(circle, rgba(129, 140, 248, .22), transparent 65%);
  filter: blur(10px); pointer-events: none; animation: glow 9s ease-in-out infinite alternate;
}
@keyframes glow { from { opacity: .55; transform: scale(1); } to { opacity: 1; transform: scale(1.12); } }
.hero__inner { z-index: 1; }

/* Destaques do topo com filete em degradê */
.hero__stats li { position: relative; overflow: hidden; transition: border-color .3s, transform .3s; }
.hero__stats li::before {
  content: ""; position: absolute; left: 0; top: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2)); opacity: .8;
}
.hero__stats li:hover { border-color: rgba(56, 189, 248, .4); transform: translateY(-2px); }

/* Botão principal com reflexo ao passar o mouse */
.btn:not(.btn--ghost) { position: relative; overflow: hidden; }
.btn:not(.btn--ghost)::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .45), transparent);
  transform: skewX(-20deg); transition: left .6s ease;
}
.btn:not(.btn--ghost):hover::after { left: 130%; }

/* Títulos de seção: pequeno detalhe antes do rótulo */
.section__head .eyebrow, .about__text .eyebrow, .contact__info .eyebrow { display: inline-flex; align-items: center; gap: .6rem; }
.section__head .eyebrow::before, .about__text .eyebrow::before, .contact__info .eyebrow::before {
  content: ""; width: 22px; height: 2px; border-radius: 2px; background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

/* Áreas: borda em degradê e ícone que se destaca ao passar o mouse */
.card { position: relative; }
.card::before {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; pointer-events: none;
  background: linear-gradient(135deg, var(--accent), transparent 45%, var(--accent-2));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0; transition: opacity .35s ease;
}
.card:hover::before { opacity: 1; }
.card:hover { border-color: transparent; }
.card__icon { transition: transform .35s ease, box-shadow .35s ease, background .35s ease; }
.card:hover .card__icon { transform: translateY(-3px); background: rgba(56, 189, 248, .18); box-shadow: 0 10px 24px -10px rgba(56, 189, 248, .6); }

/* Como funciona: linha que liga as etapas (telas largas) */
@media (min-width: 901px) {
  .steps { position: relative; }
  .steps::before {
    content: ""; position: absolute; left: 1.6rem; right: 1.6rem; top: 3.1rem; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(56, 189, 248, .45), rgba(129, 140, 248, .45), transparent);
  }
  .step { background: var(--surface); z-index: 0; }
}
.step { transition: transform .3s ease, border-color .3s ease; }
.step:hover { transform: translateY(-3px); border-color: rgba(56, 189, 248, .4); }

/* Foto do Sobre: brilho suave e leve aproximação */
.about__photo { position: relative; box-shadow: 0 30px 60px -30px rgba(56, 189, 248, .45); }
.about__photo img { transition: transform .8s ease; }
.about__photo { overflow: hidden; }
.about__photo:hover img { transform: scale(1.03); }

/* Formação e valores: leve elevação */
.edu__group, .mvv__item { transition: transform .3s ease, border-color .3s ease; }
.edu__group:hover, .mvv__item:hover { transform: translateY(-3px); border-color: rgba(56, 189, 248, .35); }

/* Dúvidas: pergunta aberta com destaque lateral */
.faq details { position: relative; }
.faq details[open]::before {
  content: ""; position: absolute; left: -1px; top: 14px; bottom: 14px; width: 2px; border-radius: 2px;
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
}

/* Formulário: campo em foco com halo */
.form input:focus, .form select:focus, .form textarea:focus { box-shadow: 0 0 0 3px rgba(56, 189, 248, .15); outline: none; }

@media (prefers-reduced-motion: reduce) {
  .hero__grid, .hero::after { animation: none; }
}