/*
Theme Name: IEVI Clínica
Theme URI: https://clinica.ievi.com.br/
Author: IEVI – Instituto Educacional Videira
Author URI: https://ievi.com.br/
Description: Tema próprio do IEVI Clínica. Usa o mesmo cabeçalho, menu e rodapé do plugin IEVI Clínica em todo o site (blog, páginas, busca e página não encontrada), já vem com o ícone do IEVI Clínica (Ψ verde) e o define como ícone do site ao ser ativado. Leve, sem construtor de páginas, com cores e letras do IEVI no editor de blocos.
Version: 1.0.1
Requires at least: 6.4
Tested up to: 6.9
Requires PHP: 8.0
License: Proprietário – todos os direitos reservados ao IEVI
Text Domain: ievi-clinica-tema
Tags: one-column, custom-logo, custom-menu, featured-images, editor-style, wide-blocks, block-styles, accessibility-ready, blog
*/

:root {
	--t-green: #1e5b45;
	--t-green-dark: #143f30;
	--t-soft: #e7f0eb;
	--t-gold: #b38b35;
	--t-gold-soft: #f4ecda;
	--t-ink: #17221d;
	--t-muted: #5c6a64;
	--t-line: #dfe5e1;
	--t-bg: #f6f7f4;
	--t-serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
	--t-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body.ievi-tema { margin: 0; background: var(--t-bg); color: var(--t-ink); font-family: var(--t-sans); font-size: 16px; line-height: 1.65; -webkit-font-smoothing: antialiased; }
body.ievi-tema h1, body.ievi-tema h2, body.ievi-tema h3, body.ievi-tema h4 { font-family: var(--t-serif); color: var(--t-ink); line-height: 1.2; letter-spacing: -.01em; }
body.ievi-tema a { color: var(--t-green); }
body.ievi-tema img { max-width: 100%; height: auto; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; border: 0; }
.screen-reader-text:focus { position: fixed !important; top: 8px; left: 8px; width: auto; height: auto; clip: auto; padding: 10px 14px; background: #fff; z-index: 100000; }
.tema-skip { position: absolute; left: -999px; top: 8px; background: #fff; padding: 8px 12px; z-index: 1000; }
.tema-skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--t-gold); outline-offset: 2px; }
.tema-wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.tema-main { min-height: 50vh; }
.tema-area { padding-top: 40px; padding-bottom: 64px; }

/* ---------- Botões e formulários ---------- */
.tema-btn, .wp-block-button__link, body.ievi-tema input[type="submit"], body.ievi-tema button[type="submit"] { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 20px; border-radius: 10px; background: var(--t-green); color: #fff !important; border: 1.5px solid var(--t-green); font: 600 .95rem var(--t-sans); text-decoration: none !important; cursor: pointer; transition: background .15s, border-color .15s; }
.tema-btn:hover, .wp-block-button__link:hover, body.ievi-tema input[type="submit"]:hover, body.ievi-tema button[type="submit"]:hover { background: var(--t-green-dark); border-color: var(--t-green-dark); }
.tema-btn--ghost, .is-style-outline .wp-block-button__link { background: transparent; color: var(--t-green) !important; }
.tema-btn--ghost:hover, .is-style-outline .wp-block-button__link:hover { background: var(--t-soft); }
body.ievi-tema input[type="text"], body.ievi-tema input[type="email"], body.ievi-tema input[type="url"], body.ievi-tema input[type="search"], body.ievi-tema input[type="password"], body.ievi-tema input[type="tel"], body.ievi-tema input[type="number"], body.ievi-tema textarea, body.ievi-tema select { width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid var(--t-line); border-radius: 10px; background: #fff; color: var(--t-ink); font: 1rem var(--t-sans); }
body.ievi-tema textarea { min-height: 140px; }
body.ievi-tema label { font-weight: 600; font-size: .95rem; }
.tema-search { display: flex; gap: 8px; max-width: 560px; }
.tema-search input[type="search"] { flex: 1; }

/* ---------- Cabeçalho das páginas ---------- */
.tema-pagehead { background: linear-gradient(135deg, var(--t-green) 0%, var(--t-green-dark) 100%); color: #fff; padding: 48px 0 44px; }
.tema-pagehead h1 { color: #fff !important; margin: 0; font-size: clamp(1.9rem, 4.2vw, 2.8rem); max-width: 22em; }
.tema-pagehead--post h1 { max-width: 26em; }
.tema-pagehead .tema-meta { color: rgba(255,255,255,.8); margin: 12px 0 0; }
.tema-pagehead__desc { margin-top: 10px; max-width: 46em; color: rgba(255,255,255,.86); font-size: 1.05rem; }
.tema-pagehead__desc p { margin: 0; }
.tema-pagehead__search { margin-top: 18px; }
.tema-pagehead__search .tema-btn { background: var(--t-gold); border-color: var(--t-gold); }
.tema-kicker { margin: 0 0 10px; text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; font-weight: 700; color: var(--t-gold); }
.tema-pagehead .tema-kicker a { color: #e2c785 !important; text-decoration: none; }
.tema-meta { margin: 0 0 6px; font-size: .88rem; color: var(--t-muted); }

/* ---------- Texto dos posts e páginas ---------- */
.tema-entry { max-width: 760px; margin: 0 auto; }
.tema-entry--wide { max-width: none; }
.tema-entry__img { margin: 0 0 28px; }
.tema-entry__img img { width: 100%; border-radius: 16px; display: block; }
.tema-prose { font-size: 1.0625rem; }
.tema-prose > * { margin-top: 0; margin-bottom: 1.15em; }
.tema-prose h2 { font-size: 1.75rem; margin-top: 1.8em; margin-bottom: .5em; }
.tema-prose h3 { font-size: 1.35rem; margin-top: 1.6em; margin-bottom: .45em; }
.tema-prose h4 { font-size: 1.12rem; margin-top: 1.4em; margin-bottom: .4em; }
.tema-prose a { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.tema-prose a:hover { text-decoration-thickness: 2px; }
.tema-prose ul, .tema-prose ol { padding-left: 1.4em; }
.tema-prose li { margin-bottom: .35em; }
.tema-prose blockquote, .tema-prose .wp-block-quote { margin-left: 0; margin-right: 0; padding: 4px 0 4px 22px; border-left: 4px solid var(--t-gold); font-family: var(--t-serif); font-size: 1.18rem; color: #2e3b35; }
.tema-prose blockquote cite, .tema-prose .wp-block-quote cite { display: block; margin-top: 8px; font: normal .9rem var(--t-sans); color: var(--t-muted); }
.tema-prose .wp-block-pullquote { border-top: 3px solid var(--t-gold); border-bottom: 3px solid var(--t-gold); padding: 28px 0; }
.tema-prose hr, .tema-prose .wp-block-separator { border: 0; border-top: 1px solid var(--t-line); margin: 2.2em auto; }
.tema-prose figure { margin-left: 0; margin-right: 0; }
.tema-prose figcaption, .tema-prose .wp-element-caption { font-size: .88rem; color: var(--t-muted); text-align: center; margin-top: 8px; }
.tema-prose img { border-radius: 12px; }
.tema-prose table { width: 100%; border-collapse: collapse; font-size: .96rem; background: #fff; }
.tema-prose th, .tema-prose td { border: 1px solid var(--t-line); padding: 10px 12px; text-align: left; vertical-align: top; }
.tema-prose th { background: var(--t-soft); }
.tema-prose code { background: var(--t-soft); padding: 2px 6px; border-radius: 6px; font-size: .92em; }
.tema-prose pre { background: #10231c; color: #e7f0eb; padding: 18px; border-radius: 12px; overflow-x: auto; }
.tema-prose pre code { background: none; padding: 0; color: inherit; }
.tema-prose .alignleft { float: left; margin: .3em 1.4em 1em 0; max-width: 50%; }
.tema-prose .alignright { float: right; margin: .3em 0 1em 1.4em; max-width: 50%; }
.tema-prose .aligncenter { margin-left: auto; margin-right: auto; text-align: center; }
.tema-prose::after { content: ""; display: table; clear: both; }
.tema-entry:not(.tema-entry--wide) .alignwide { margin-left: calc(50% - min(590px, 50vw - 24px)); margin-right: calc(50% - min(590px, 50vw - 24px)); max-width: none; width: auto; }
.tema-entry:not(.tema-entry--wide) .alignfull { margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); max-width: 100vw; width: 100vw; }
.tema-prose .wp-block-cover.alignfull, .tema-prose .wp-block-group.alignfull { padding-left: 24px; padding-right: 24px; }
.tema-prose .wp-block-buttons { gap: 10px; }
.tema-prose .wp-block-image img { height: auto; }
.tema-pages { display: flex; gap: 8px; flex-wrap: wrap; margin: 28px 0; font-weight: 600; }
.tema-entry__foot { margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--t-line); }
.tema-tags { display: flex; gap: 8px; flex-wrap: wrap; margin: 0; }
.tema-tags a { display: inline-block; padding: 4px 12px; border-radius: 999px; background: var(--t-soft); font-size: .86rem; text-decoration: none; }

/* Navegação entre posts */
.post-navigation { max-width: 760px; margin: 40px auto 0; }
.post-navigation .nav-links { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.post-navigation a { display: block; height: 100%; padding: 16px 18px; background: #fff; border: 1px solid var(--t-line); border-radius: 14px; text-decoration: none; font-family: var(--t-serif); font-size: 1.05rem; color: var(--t-ink); }
.post-navigation a:hover { border-color: var(--t-green); }
.post-navigation span { display: block; font: 700 .74rem var(--t-sans); text-transform: uppercase; letter-spacing: .1em; color: var(--t-gold); margin-bottom: 4px; }
.post-navigation .nav-next { text-align: right; grid-column: 2; }

/* ---------- Listagens ---------- */
.tema-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.tema-card { background: #fff; border: 1px solid var(--t-line); border-radius: 18px; overflow: hidden; display: flex; flex-direction: column; transition: box-shadow .15s, transform .15s; }
.tema-card:hover { box-shadow: 0 14px 34px rgba(20,50,40,.1); transform: translateY(-2px); }
.tema-card__img img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.tema-card__body { padding: 20px 22px 22px; display: flex; flex-direction: column; flex: 1; }
.tema-card__title { font-size: 1.25rem; margin: 4px 0 8px; }
.tema-card__title a { color: var(--t-ink) !important; text-decoration: none; }
.tema-card__title a:hover { color: var(--t-green) !important; }
.tema-card__excerpt { color: var(--t-muted); font-size: .96rem; }
.tema-card__excerpt p { margin: 0; }
.tema-card__more { margin-top: auto; padding-top: 14px; font-weight: 600; text-decoration: none; }
.tema-empty { max-width: 620px; margin: 0 auto; text-align: center; background: #fff; border: 1px solid var(--t-line); border-radius: 18px; padding: 40px 28px; }
.tema-empty h2 { margin-top: 0; }
.tema-empty .tema-search { margin: 20px auto 0; }
.pagination { margin-top: 40px; }
.pagination .nav-links { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.pagination .page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 0 12px; border-radius: 10px; background: #fff; border: 1px solid var(--t-line); text-decoration: none; font-weight: 600; }
.pagination .page-numbers.current { background: var(--t-green); border-color: var(--t-green); color: #fff; }

/* ---------- Comentários ---------- */
.tema-comments { max-width: 760px; margin: 48px auto 0; padding-top: 32px; border-top: 1px solid var(--t-line); }
.tema-comments__title { font-size: 1.5rem; margin: 0 0 18px; }
.tema-comments__list, .tema-comments__list .children { list-style: none; margin: 0; padding: 0; }
.tema-comments__list .children { margin-left: 28px; }
.tema-comments__list .comment-body { background: #fff; border: 1px solid var(--t-line); border-radius: 14px; padding: 16px 18px; margin-bottom: 14px; }
.tema-comments__list .comment-meta { display: flex; gap: 10px; align-items: center; font-size: .88rem; color: var(--t-muted); margin-bottom: 6px; }
.tema-comments__list .avatar { border-radius: 50%; }
.tema-comments__list .reply a { font-size: .86rem; font-weight: 600; }
.comment-respond { margin-top: 28px; }
.comment-form p { margin: 0 0 14px; }
.comment-form-cookies-consent { display: flex; gap: 8px; align-items: flex-start; }
.comment-form-cookies-consent label { font-weight: 400; }

/* ---------- Página não encontrada ---------- */
.tema-404 { text-align: center; max-width: 720px; }
.tema-404 img { border-radius: 20px; box-shadow: 0 12px 30px rgba(20,63,48,.2); }
.tema-404 h1 { font-size: clamp(2rem, 5vw, 2.8rem); margin: 0 0 12px; }
.tema-404 > p { color: var(--t-muted); }
.tema-404 .tema-kicker { margin-top: 22px; }
.tema-404 .tema-search { margin: 24px auto; }
.tema-404__links { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* ---------- Cabeçalho e rodapé do tema (sem o plugin IEVI Clínica) ---------- */
.tema-head { background: #fff; border-bottom: 1px solid var(--t-line); position: sticky; top: 0; z-index: 50; }
.admin-bar .tema-head { top: 32px; }
.tema-head__bar { display: flex; align-items: center; gap: 20px; min-height: 76px; }
.tema-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--t-ink) !important; }
.tema-brand img { width: 46px; height: 46px; border-radius: 11px; }
.tema-brand span { display: flex; flex-direction: column; line-height: 1.15; }
.tema-brand strong { font-family: var(--t-serif); font-size: 1.3rem; color: var(--t-green); }
.tema-brand small { font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--t-muted); }
.tema-nav { margin-left: auto; }
.tema-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 2px; }
.tema-nav li { position: relative; }
.tema-nav a { display: block; padding: 8px 12px; border-radius: 8px; text-decoration: none; color: var(--t-ink) !important; font-weight: 500; white-space: nowrap; }
.tema-nav a:hover { background: var(--t-soft); }
.tema-nav .current-menu-item > a { color: var(--t-green) !important; box-shadow: inset 0 -2px 0 var(--t-gold); border-radius: 0; }
.tema-nav .sub-menu { display: none; position: absolute; top: 100%; left: 0; min-width: 220px; background: #fff; border: 1px solid var(--t-line); border-radius: 12px; padding: 6px; box-shadow: 0 16px 40px rgba(20,50,40,.14); flex-direction: column; }
.tema-nav li:hover > .sub-menu, .tema-nav li:focus-within > .sub-menu { display: flex; }
.tema-mnav { display: none; margin-left: auto; position: relative; }
.tema-mnav summary { list-style: none; cursor: pointer; width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--t-line); display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 5px; }
.tema-mnav summary::-webkit-details-marker { display: none; }
.tema-mnav summary span { width: 20px; height: 2px; background: var(--t-ink); border-radius: 2px; }
.tema-mnav__panel { position: absolute; right: 0; top: 54px; width: min(320px, calc(100vw - 32px)); background: #fff; border: 1px solid var(--t-line); border-radius: 14px; box-shadow: 0 16px 40px rgba(20,50,40,.16); padding: 10px; }
.tema-mnav__panel ul { list-style: none; margin: 0; padding: 0; }
.tema-mnav__panel a { display: block; padding: 12px; border-radius: 8px; text-decoration: none; color: var(--t-ink) !important; font-weight: 500; }
.tema-mnav__panel a:hover { background: var(--t-soft); }
.tema-foot { background: var(--t-green-dark); color: rgba(255,255,255,.82); font-size: .93rem; }
.tema-foot__grid { display: flex; justify-content: space-between; gap: 36px; flex-wrap: wrap; padding-top: 48px; padding-bottom: 36px; }
.tema-foot__brand { display: flex; gap: 16px; align-items: flex-start; max-width: 480px; }
.tema-foot__brand img { border-radius: 12px; flex-shrink: 0; }
.tema-foot__brand p { margin: 0; }
.tema-foot__brand strong { color: #fff; font-family: var(--t-serif); font-size: 1.15rem; }
.tema-foot nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.tema-foot a { color: #fff !important; text-decoration: none; opacity: .9; }
.tema-foot a:hover { opacity: 1; text-decoration: underline; }
.tema-foot__bottom { border-top: 1px solid rgba(255,255,255,.12); padding: 18px 0 calc(18px + env(safe-area-inset-bottom, 0px)); font-size: .84rem; }
.tema-foot__bottom .tema-wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* ---------- Responsivo ---------- */
@media (max-width: 1000px) {
	.tema-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.tema-nav { display: none; }
	.tema-mnav { display: block; }
}
@media (max-width: 782px) { .admin-bar .tema-head { top: 46px; } }
@media (max-width: 600px) { .admin-bar .tema-head { top: 0; } }
@media (max-width: 640px) {
	.tema-wrap { padding: 0 20px; }
	.tema-pagehead { padding: 34px 0 30px; }
	.tema-area { padding-top: 28px; padding-bottom: 48px; }
	.tema-cards { grid-template-columns: minmax(0, 1fr); }
	.tema-prose { font-size: 1.03rem; }
	.tema-prose .alignleft, .tema-prose .alignright { float: none; margin: 0 0 1em; max-width: 100%; }
	.post-navigation .nav-links { grid-template-columns: minmax(0, 1fr); }
	.post-navigation .nav-next { grid-column: 1; text-align: left; }
	.tema-search { flex-direction: column; }
	.tema-head__bar { min-height: 64px; }
	.tema-brand img { width: 40px; height: 40px; }
	.tema-foot__brand { flex-direction: column; }
}
@media print {
	.ievi-sitehead, .ievi-sitefoot, .tema-head, .tema-foot, .comment-respond, .post-navigation, .ievi-pwa { display: none !important; }
	.tema-pagehead { background: none; color: #000; padding: 0 0 12px; }
	.tema-pagehead h1 { color: #000 !important; }
}
