/*
Theme Name: Ester Brito Izidoro Advocacia
Theme URI: https://esterbrito.adv.br
Author: Impacta Web
Description: Tema de blocos do escritório Ester Brito Izidoro — Advocacia Previdenciária. Vinho e latão da marca, fotos reais da advogada e tipografia Archivo + Source Serif 4 (fontes SIL Open Font License, hospedadas no próprio tema).
Requires at least: 6.6
Tested up to: 7.1
Requires PHP: 8.1
Version: 2.0.5
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ester-advocacia
*/

/* ---------- Base ---------- */
h1, h2, h3, h4, .wp-block-post-title, .wp-block-query-title { font-stretch: 78%; letter-spacing: -0.01em; }
h3, h4 { letter-spacing: 0; }
a:focus-visible, button:focus-visible, summary:focus-visible, input:focus-visible, textarea:focus-visible { outline: 3px solid var(--wp--preset--color--bege); outline-offset: 3px; }
.wp-element-button, .wp-block-button__link { transition: background-color .15s; }
::selection { background: var(--wp--preset--color--latao-claro); color: var(--wp--preset--color--tinta); }

/* Botão contornado */
.wp-block-button.is-style-outline > .wp-block-button__link { color: var(--wp--preset--color--vinho); border: 2px solid currentColor; background: transparent; padding: 13px 24px; }
.wp-block-button.is-style-outline > .wp-block-button__link:hover { color: #fff; background: var(--wp--preset--color--vinho); border-color: var(--wp--preset--color--vinho); }

/* Link de texto com sublinhado latão */
.eb-link a, a.eb-link { font-weight: 600; text-underline-offset: 6px; text-decoration-thickness: 2px; text-decoration-color: var(--wp--preset--color--bege); }

/* ---------- Cabeçalho ---------- */
.eb-topo { border-bottom: 1px solid #e4dfda; }
.eb-topo .eb-logo img { height: 58px; width: auto; display: block; }
.eb-topo .wp-block-navigation { font-weight: 600; font-size: 1rem; }
.eb-topo .wp-block-navigation a { color: var(--wp--preset--color--tinta); text-decoration: none; }
.eb-topo .wp-block-navigation a:hover { color: var(--wp--preset--color--vinho); }
.eb-topo .wp-block-navigation .current-menu-item > a,
.eb-topo .wp-block-navigation a[aria-current="page"] { color: var(--wp--preset--color--vinho-escuro); text-decoration: underline; text-underline-offset: 8px; text-decoration-thickness: 2px; text-decoration-color: var(--wp--preset--color--bege); }
.eb-topo .eb-topo-whats .wp-block-button__link { padding: 11px 18px; font-size: .95rem; }
@media (max-width: 600px) {
	.eb-topo .eb-logo img { height: 46px; }
	.eb-topo .eb-topo-whats { display: none; }
}

/* ---------- Topo com foto (hero) ---------- */
.eb-hero { overflow: hidden; }
.eb-hero .eb-hero-texto { padding-block: clamp(48px, 7vw, 96px); }
.eb-hero h1 { white-space: pre-line; }
.eb-hero .eb-hero-foto { align-self: flex-end; }
.eb-hero .eb-hero-foto figure, .eb-hero .eb-hero-foto img { margin: 0; display: block; }
.eb-fade img { -webkit-mask-image: linear-gradient(to right, transparent 0, #000 7%, #000 88%, transparent 100%); mask-image: linear-gradient(to right, transparent 0, #000 7%, #000 88%, transparent 100%); }
.eb-credencial { font-size: .95rem; line-height: 1.5; color: #4a403c; }
.eb-credencial strong { color: var(--wp--preset--color--tinta); }
@media (max-width: 781px) {
	.eb-hero .eb-hero-texto { padding-bottom: 0; }
	.eb-fade img { -webkit-mask-image: linear-gradient(to bottom, #000 80%, transparent 100%); mask-image: linear-gradient(to bottom, #000 80%, transparent 100%); max-width: 420px; margin-inline: auto; }
}

/* Cabeçalho de página interna (faixa cinza com título) */
.eb-cabeca-pagina h1 { font-size: clamp(2.5rem, 1.6rem + 3.6vw, 4.25rem); }

/* ---------- Linha do tempo das áreas ---------- */
.eb-linha { display: flex; flex-wrap: wrap; gap: 40px 0 !important; }
.eb-linha > .eb-fase { flex: 1 1 190px; min-width: 0; padding: 0 22px 0 0; margin: 0 !important; position: relative; }
.eb-linha > .eb-fase::before { content: ""; display: block; height: 4px; background: var(--wp--preset--color--vinho); margin-bottom: 26px; }
.eb-linha > .eb-fase::after { content: ""; position: absolute; left: 0; top: -6px; width: 16px; height: 16px; box-sizing: border-box; border-radius: 50%; background: #fff; border: 3px solid var(--wp--preset--color--vinho); }
.eb-linha > .eb-fase:last-child::before { background: var(--wp--preset--color--bege); }
.eb-linha > .eb-fase:last-child::after { background: var(--wp--preset--color--vinho); }
.eb-linha > .eb-fase:last-child h3 { color: var(--wp--preset--color--vinho); }
.eb-linha h3 { margin: 0 0 10px; font-size: 1.25rem; }
.eb-linha p { margin: 0; font-size: .97rem; line-height: 1.55; color: #4a403c; }
@media (max-width: 600px) {
	.eb-linha { gap: 0 !important; }
	.eb-linha > .eb-fase { flex-basis: 100%; padding: 0 0 32px 30px; border-left: 4px solid var(--wp--preset--color--vinho); }
	.eb-linha > .eb-fase:last-child { border-left-color: var(--wp--preset--color--bege); padding-bottom: 0; }
	.eb-linha > .eb-fase::before { display: none; }
	.eb-linha > .eb-fase::after { left: -10px; top: 2px; }
}

/* ---------- Lista com rótulo (diferenciais) ---------- */
.eb-lista > .eb-item { display: flex; flex-wrap: wrap; gap: 4px 24px; padding: 16px 0; margin: 0 !important; border-top: 1px solid var(--wp--preset--color--borda); }
.eb-lista > .eb-item:last-child { border-bottom: 1px solid var(--wp--preset--color--borda); }
.eb-lista > .eb-item h3 { flex: 0 0 230px; margin: 0; font-size: 1.06rem; }
.eb-lista > .eb-item p { flex: 1 1 240px; margin: 0; font-size: 1rem; line-height: 1.5; color: #4a403c; }

/* ---------- Faixa vinho (escritório, vídeo) ---------- */
.eb-faixa-vinho h2, .eb-faixa-vinho h3 { color: #fff; }
.eb-faixa-vinho a:not(.wp-block-button__link) { color: var(--wp--preset--color--latao-claro); }
.eb-faixa-vinho .wp-block-button.is-style-outline > .wp-block-button__link { color: #fff; border-color: var(--wp--preset--color--latao-claro); }
.eb-faixa-vinho .wp-block-button.is-style-outline > .wp-block-button__link:hover { background: var(--wp--preset--color--latao-claro); color: var(--wp--preset--color--vinho-noite); }

/* Vídeo vertical */
.eb-video-vertical { margin: 0; }
.eb-video-vertical video { display: block; width: 100%; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 6px; background: var(--wp--preset--color--vinho-noite); }
@media (max-width: 781px) { .eb-video-vertical { max-width: 320px; margin: 0 auto; } }

/* Foto com cantos suaves */
.is-style-eb-foto img { border-radius: 3px; }

/* ---------- Cartão (contato) ---------- */
.is-style-eb-cartao { background: #fff; border: 1px solid var(--wp--preset--color--borda); border-radius: 4px; padding: 22px 24px; }
.is-style-eb-cartao h3 { margin-top: 0; font-size: 1.06rem; }
.is-style-eb-cartao p { margin-bottom: 0; }

/* Destaque (chamada dentro de artigos e páginas) */
.is-style-eb-destaque { background: var(--wp--preset--color--estudio); border-radius: 6px; padding: clamp(24px, 4vw, 40px); }
.is-style-eb-destaque h3 { margin-top: 0; font-size: clamp(1.5rem, 1.2rem + 1vw, 1.9rem); font-weight: 800; font-stretch: 78%; color: var(--wp--preset--color--vinho-escuro); }

/* Número de telefone grande */
.eb-telefone a { font-size: clamp(2.1rem, 1.2rem + 3.4vw, 3.75rem); line-height: 1; font-weight: 800; color: var(--wp--preset--color--vinho); text-decoration: none; }

/* ---------- Perguntas frequentes ---------- */
.wp-block-details { border: 0; border-top: 1px solid var(--wp--preset--color--borda); padding: 2px 0; margin: 0 !important; background: none; }
.wp-block-details + :not(.wp-block-details) { border-top: 1px solid var(--wp--preset--color--borda); padding-top: 1.25rem; }
.wp-block-details summary { cursor: pointer; padding: 14px 32px 14px 0; font-family: var(--wp--preset--font-family--archivo); font-weight: 700; font-size: 1.1rem; color: var(--wp--preset--color--tinta); list-style: none; position: relative; }
.wp-block-details summary::-webkit-details-marker { display: none; }
.wp-block-details summary::after { content: "+"; position: absolute; right: 4px; top: 10px; color: var(--wp--preset--color--vinho); font-size: 1.5rem; line-height: 1; font-weight: 400; }
.wp-block-details[open] summary::after { content: "–"; }
.wp-block-details > :last-child { padding-bottom: 14px; }

/* ---------- Lista de artigos (formato revista) ---------- */
.eb-artigos .wp-block-post-template { gap: 44px 32px; }
.eb-artigos .wp-block-post-featured-image { margin: 0 0 14px; }
.eb-artigos .wp-block-post-featured-image img { border-radius: 3px; aspect-ratio: 3 / 2; object-fit: cover; }
.eb-artigos .wp-block-post-terms a { color: var(--wp--preset--color--latao-escuro); text-decoration: none; }
.eb-artigos .wp-block-post-title { font-size: 1.4rem; font-weight: 700; font-stretch: 100%; line-height: 1.22; margin: 6px 0 0; }
.eb-artigos .wp-block-post-title a { color: var(--wp--preset--color--tinta); text-decoration: none; }
.eb-artigos .wp-block-post-title a:hover { color: var(--wp--preset--color--vinho); }
.eb-artigos .wp-block-post-excerpt { color: #4a403c; font-size: 1rem; }
.eb-artigos .wp-block-post-excerpt__more-link { font-weight: 600; }

/* ---------- Artigo ---------- */
.eb-artigo-cabeca .wp-block-post-terms a { color: var(--wp--preset--color--latao-escuro); text-decoration: none; }
.eb-artigo-cabeca h1 { font-size: clamp(2.25rem, 1.4rem + 3.2vw, 3.9rem); line-height: 1.02; }
.eb-autor { font-size: .95rem; line-height: 1.45; color: #4a403c; }
.eb-autor img { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; display: block; }
.eb-autor p { margin: 0; }
.eb-capa { margin-bottom: -96px !important; position: relative; z-index: 1; }
.eb-capa img { border-radius: 3px; aspect-ratio: 2 / 1; object-fit: cover; width: 100%; }
.eb-artigo-corpo { padding-top: 140px !important; }
.eb-artigo-corpo .wp-block-post-content > p,
.eb-artigo-corpo .wp-block-post-content > ul li,
.eb-artigo-corpo .wp-block-post-content > ol li,
.eb-artigo-corpo .wp-block-details p { font-family: var(--wp--preset--font-family--serifa); font-size: 1.22rem; line-height: 1.72; }
.eb-artigo-corpo .wp-block-post-content > p:first-child { font-size: 1.36rem; line-height: 1.6; }
.eb-artigo-corpo .wp-block-post-content > h2 { font-size: clamp(1.75rem, 1.4rem + 1.2vw, 2.1rem); margin-top: 2.6rem; }
.eb-artigo-corpo .wp-block-post-content > p.has-pequeno-font-size { font-family: var(--wp--preset--font-family--archivo); font-size: .875rem; color: #5f524d; }
.eb-artigo-corpo .wp-block-table { overflow-x: auto; }
.eb-artigo-corpo .wp-block-table table { border-collapse: collapse; font-size: .97rem; line-height: 1.45; min-width: 520px; }
.eb-artigo-corpo .wp-block-table th, .eb-artigo-corpo .wp-block-table td { border: 0; border-bottom: 1px solid #e4dfda; padding: 12px 14px; text-align: left; vertical-align: top; }
.eb-artigo-corpo .wp-block-table thead { border-bottom: 0; }
.eb-artigo-corpo .wp-block-table thead th { border-bottom: 2px solid var(--wp--preset--color--vinho); color: var(--wp--preset--color--vinho-escuro); }
@media (max-width: 781px) {
	.eb-capa { margin-bottom: -48px !important; }
	.eb-artigo-corpo { padding-top: 84px !important; }
	.eb-artigo-corpo .wp-block-post-content > p, .eb-artigo-corpo .wp-block-post-content li { font-size: 1.12rem; }
}

/* ---------- Rodapé ---------- */
.eb-rodape a { color: var(--wp--preset--color--texto-rodape); }
.eb-rodape a:hover { color: #fff; }
.eb-rodape strong { color: #fff; }
.eb-rodape .eb-aviso { font-size: .8rem; line-height: 1.7; color: #cdbfb4; border-top: 1px solid #6b2a22; padding-top: 24px; }
.eb-rodape .eb-aviso a { color: var(--wp--preset--color--latao-claro); }
.eb-rodape .eb-logo-rodape img { width: 170px; max-width: 48vw; }

/* ---------- Formulário de contato (Contact Form 7) ---------- */
.wpcf7 { margin-top: 12px; }
.wpcf7 form > p { margin: 0 0 16px; }
.wpcf7 label { display: block; font-weight: 600; color: var(--wp--preset--color--tinta); font-size: .95rem; }
.wpcf7 input[type="text"], .wpcf7 input[type="email"], .wpcf7 input[type="tel"], .wpcf7 textarea {
	width: 100%; margin-top: 6px; padding: 13px 14px; font: inherit; font-weight: 400; color: var(--wp--preset--color--tinta);
	border: 1.5px solid #cfc6be; border-radius: 4px; background: #fff; box-sizing: border-box;
}
.wpcf7 textarea { height: 150px; resize: vertical; }
.wpcf7 input:focus, .wpcf7 textarea:focus { outline: none; border-color: var(--wp--preset--color--vinho); box-shadow: 0 0 0 3px var(--wp--preset--color--latao-claro); }
.wpcf7 .wpcf7-acceptance { display: block; background: var(--wp--preset--color--pedra); border-radius: 4px; padding: 14px; font-size: .9rem; }
.wpcf7 .wpcf7-acceptance .wpcf7-list-item { margin: 0; }
.wpcf7 .wpcf7-acceptance label { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
.wpcf7 .wpcf7-acceptance input { margin-top: 3px; width: 18px; height: 18px; flex-shrink: 0; accent-color: var(--wp--preset--color--vinho); }
.wpcf7 input[type="submit"] { background: var(--wp--preset--color--vinho); color: #fff; border: 0; border-radius: 4px; padding: 15px 28px; font: inherit; font-weight: 700; cursor: pointer; }
.wpcf7 input[type="submit"]:hover { background: var(--wp--preset--color--vinho-escuro); }
.wpcf7 input[type="submit"]:disabled { opacity: .45; cursor: not-allowed; }
.wpcf7 .wpcf7-not-valid-tip { color: #a3221a; font-size: .875rem; font-weight: 400; margin-top: 4px; }
.wpcf7 form .wpcf7-response-output { margin: 16px 0 0; padding: 12px 14px; border-radius: 4px; }

/* ---------- WhatsApp flutuante ---------- */
.eb-whatsapp {
	position: fixed; right: 20px; bottom: 20px; z-index: 900;
	width: 58px; height: 58px; border-radius: 50%;
	background: #25d366; display: flex; align-items: center; justify-content: center;
	box-shadow: 0 4px 14px rgba(0, 0, 0, .28); transition: transform .2s;
}
.eb-whatsapp:hover { transform: scale(1.08); }
.eb-whatsapp svg { width: 32px; height: 32px; fill: #fff; }
@media (max-width: 600px) { .eb-whatsapp { width: 52px; height: 52px; right: 16px; bottom: 16px; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
