/*
Theme Name: Santé Central de POPs
Theme URI: https://ajuda.santepos.com.br
Author: Santé Pós
Description: Tema nativo para central interna de procedimentos.
Version: 2.1.1
Requires at least: 6.4
Requires PHP: 8.0
Text Domain: sante-help
*/

:root {
    --ink: #17251f;
    --muted: #67766e;
    --line: #dfe8e2;
    --brand: #174d3c;
    --brand-dark: #103c2f;
    --accent: #d7ac54;
    --soft: #f3f7f4;
    --paper: #ffffff;
    --shadow: 0 14px 40px rgba(23, 77, 60, .08);
    --radius: 18px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    color: var(--ink);
    background: #fff;
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 16px;
    line-height: 1.65;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; }
button, input { font: inherit; }
.container { width: min(1180px, calc(100% - 40px)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.site-header {
    height: 74px;
    background: var(--brand);
    color: #fff;
    border-bottom: 1px solid rgba(255,255,255,.12);
    display: flex;
    align-items: center;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.site-brand { display: flex; align-items: center; gap: 12px; font-weight: 850; font-size: 20px; letter-spacing: -.35px; }
.brand-mark {
    width: 36px; height: 36px; border: 1px solid rgba(255,255,255,.28);
    border-radius: 11px; display: grid; place-items: center; color: #f3d58e; font-family: Georgia, serif; font-size: 20px;
}
.header-actions { display: flex; align-items: center; gap: 18px; font-size: 13px; }
.access-name { color: #d6e6df; }
.access-name strong { color: #fff; }
.logout-link { border: 1px solid rgba(255,255,255,.26); border-radius: 9px; padding: 8px 12px; transition: .2s; }
.logout-link:hover { background: rgba(255,255,255,.1); }
.menu-toggle { display: none; border: 0; background: transparent; color: #fff; padding: 6px; cursor: pointer; }

.hero {
    background: var(--brand);
    color: #fff;
    padding: 76px 0 86px;
    position: relative;
    overflow: hidden;
}
.hero:after {
    content: ""; position: absolute; width: 480px; height: 480px; border-radius: 50%;
    border: 1px solid rgba(255,255,255,.09); right: -230px; top: -260px;
    box-shadow: 0 0 0 72px rgba(255,255,255,.022), 0 0 0 144px rgba(255,255,255,.016);
}
.hero-inner { position: relative; z-index: 1; text-align: center; }
.eyebrow { color: #f0cd78; text-transform: uppercase; letter-spacing: .16em; font-size: 12px; font-weight: 800; }
.hero h1 { font-family: Georgia, serif; margin: 12px 0 18px; font-size: clamp(38px, 5vw, 62px); line-height: 1.1; letter-spacing: -1.8px; font-weight: 500; }
.hero p { color: #d4e3dc; font-size: 18px; margin: 0 auto 30px; max-width: 640px; }
.search-form {
    max-width: 720px; margin: 0 auto; background: #fff; border-radius: 15px; height: 64px;
    padding: 7px 8px 7px 22px; display: flex; align-items: center; gap: 12px; box-shadow: 0 12px 36px rgba(0,0,0,.18);
}
.search-form svg { color: #718078; flex: 0 0 auto; }
.search-form input { flex: 1; min-width: 0; border: 0; outline: 0; font-size: 16px; color: var(--ink); background: transparent; }
.search-form button { border: 0; background: var(--brand); color: #fff; height: 48px; padding: 0 22px; border-radius: 10px; font-weight: 800; cursor: pointer; }
.search-form button:hover { background: var(--brand-dark); }

.main-content { padding: 66px 0 90px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.section-heading h2 { margin: 0; font-size: 28px; letter-spacing: -.8px; }
.section-heading p { margin: 4px 0 0; color: var(--muted); }
.section-heading a { color: var(--brand); font-size: 14px; font-weight: 800; }
.area-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.area-card {
    border: 1px solid var(--line); border-radius: var(--radius); padding: 25px; background: var(--paper);
    min-height: 186px; display: flex; flex-direction: column; transition: .23s ease; position: relative; overflow: hidden;
}
.area-card:hover { transform: translateY(-4px); border-color: #b6ccc0; box-shadow: var(--shadow); }
.area-icon { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; background: var(--soft); color: var(--brand); margin-bottom: 22px; font-weight: 850; }
.area-card h3 { margin: 0 0 6px; font-size: 19px; letter-spacing: -.25px; }
.area-card p { color: var(--muted); font-size: 14px; line-height: 1.5; margin: 0 0 18px; }
.area-meta { margin-top: auto; font-size: 12px; color: #7b8982; display: flex; align-items: center; justify-content: space-between; }
.area-arrow { color: var(--brand); font-size: 20px; }

.recent-section { margin-top: 64px; padding-top: 50px; border-top: 1px solid var(--line); }
.article-list { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.article-row { display: grid; grid-template-columns: 1fr auto; gap: 20px; align-items: center; padding: 20px 22px; border-bottom: 1px solid var(--line); transition: .18s; }
.article-row:last-child { border-bottom: 0; }
.article-row:hover { background: var(--soft); }
.article-row h3 { font-size: 16px; margin: 0 0 4px; letter-spacing: -.1px; }
.article-row p { color: var(--muted); font-size: 13px; margin: 0; }
.article-row time { color: #7c8982; font-size: 12px; white-space: nowrap; }

.page-head { background: var(--soft); border-bottom: 1px solid var(--line); padding: 36px 0 42px; }
.breadcrumbs { font-size: 13px; color: var(--muted); display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 21px; }
.breadcrumbs a:hover { color: var(--brand); }
.page-head h1 { margin: 0 0 9px; font-size: clamp(32px, 4vw, 46px); letter-spacing: -1.5px; line-height: 1.15; }
.page-head p { margin: 0; color: var(--muted); max-width: 680px; }
.page-search { margin-top: 26px; max-width: 620px; box-shadow: none; border: 1px solid var(--line); height: 56px; }
.page-search button { height: 42px; }
.collection-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; margin-bottom: 42px; }
.collection-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; transition: .2s; }
.collection-card:hover { box-shadow: var(--shadow); border-color: #b6ccc0; }
.collection-card h2 { font-size: 19px; margin: 0 0 6px; }
.collection-card p { margin: 0 0 14px; color: var(--muted); font-size: 14px; }
.collection-card span { font-size: 12px; font-weight: 750; color: var(--brand); }

.article-layout { display: grid; grid-template-columns: 250px minmax(0, 760px) 190px; gap: 42px; align-items: start; }
.article-sidebar, .article-toc { position: sticky; top: 28px; }
.sidebar-title, .toc-title { text-transform: uppercase; font-size: 11px; letter-spacing: .12em; color: #829088; font-weight: 850; margin-bottom: 12px; }
.sidebar-tree { list-style: none; padding: 0; margin: 0; }
.sidebar-tree li { margin: 2px 0; }
.sidebar-tree a { display: block; border-radius: 8px; padding: 8px 10px; font-size: 13px; color: #506057; }
.sidebar-tree a:hover, .sidebar-tree a.is-current { background: var(--soft); color: var(--brand); font-weight: 750; }
.sidebar-tree .tree-child { padding-left: 14px; border-left: 1px solid var(--line); margin-left: 10px; }
.article-main { min-width: 0; }
.article-main .breadcrumbs { margin-bottom: 24px; }
.article-main h1 { font-size: clamp(34px, 4.5vw, 50px); line-height: 1.1; letter-spacing: -1.6px; margin: 0 0 18px; }
.article-excerpt { font-size: 19px; color: var(--muted); margin-bottom: 22px; }
.article-meta { display: flex; flex-wrap: wrap; gap: 10px 22px; padding: 14px 0 25px; border-bottom: 1px solid var(--line); color: #748179; font-size: 12px; margin-bottom: 34px; }
.article-content { font-size: 17px; color: #29372f; }
.article-content h2 { font-size: 29px; line-height: 1.25; letter-spacing: -.7px; margin: 52px 0 16px; scroll-margin-top: 25px; }
.article-content h3 { font-size: 22px; line-height: 1.3; margin: 38px 0 12px; scroll-margin-top: 25px; }
.article-content p { margin: 0 0 20px; }
.article-content ul, .article-content ol { padding-left: 24px; margin: 0 0 24px; }
.article-content li { margin-bottom: 8px; }
.article-content img { border-radius: 12px; border: 1px solid var(--line); box-shadow: 0 8px 26px rgba(21,56,44,.08); }
.article-content video, .article-content iframe { max-width: 100%; border-radius: 12px; overflow: hidden; }
.article-content blockquote { margin: 26px 0; padding: 18px 22px; border-left: 4px solid var(--accent); background: #fcf8ee; border-radius: 0 10px 10px 0; }
.article-content .wp-block-file { background: var(--soft); padding: 16px; border-radius: 10px; }
.article-toc nav a { display: block; font-size: 12px; line-height: 1.4; color: #67766e; padding: 6px 0 6px 12px; border-left: 2px solid var(--line); }
.article-toc nav a:hover, .article-toc nav a.is-active { color: var(--brand); border-color: var(--brand); }
.article-toc nav a.toc-h3 { padding-left: 22px; }
.article-feedback { margin-top: 56px; border-top: 1px solid var(--line); padding-top: 26px; color: var(--muted); font-size: 13px; }

.empty-state { text-align: center; background: var(--soft); padding: 48px 24px; border-radius: var(--radius); }
.empty-state h2 { margin-top: 0; }
.search-title em { color: var(--brand); font-style: normal; }
.result-count { color: var(--muted); margin-bottom: 24px; }
.back-link { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 800; color: var(--brand); margin-top: 25px; }

.site-footer { background: #102f25; color: #c9d9d1; padding: 34px 0; font-size: 13px; }
.footer-inner { display: flex; justify-content: space-between; gap: 24px; }
.site-footer a:hover { color: #fff; }

@media (max-width: 1050px) {
    .article-layout { grid-template-columns: 220px minmax(0, 1fr); }
    .article-toc { display: none; }
}
@media (max-width: 780px) {
    .container { width: min(100% - 28px, 1180px); }
    .site-header { height: 66px; }
    .access-name { display: none; }
    .hero { padding: 54px 0 62px; }
    .hero p { font-size: 16px; }
    .search-form { height: 58px; padding-left: 16px; }
    .search-form button { padding: 0 16px; height: 44px; }
    .main-content { padding: 44px 0 64px; }
    .area-grid, .collection-grid { grid-template-columns: 1fr; }
    .area-card { min-height: 0; }
    .article-layout { grid-template-columns: 1fr; gap: 20px; }
    .article-sidebar { position: static; min-width: 0; overflow: hidden; }
    .sidebar-title { display: none; }
    .sidebar-tree { display: flex; width: 100%; max-width: 100%; overflow-x: auto; gap: 8px; padding-bottom: 8px; }
    .sidebar-tree li { flex: 0 0 auto; }
    .sidebar-tree a { border: 1px solid var(--line); white-space: nowrap; }
    .sidebar-tree .tree-child { display: none; }
    .article-main h1 { font-size: 36px; }
    .article-content { font-size: 16px; }
    .article-content h2 { font-size: 25px; }
    .footer-inner { display: block; }
    .footer-inner div + div { margin-top: 8px; }
}
@media (max-width: 480px) {
    .site-brand span:last-child { display: none; }
    .logout-link { padding: 7px 10px; }
    .hero h1 { font-size: 37px; }
    .search-form button span { display: none; }
    .search-form button { width: 44px; padding: 0; }
    .search-form button::before { content: "→"; font-size: 20px; line-height: 1; }
    .section-heading { align-items: start; }
    .article-row { grid-template-columns: 1fr; gap: 8px; }
}

/* Visual system aligned with the help-center reference. */
:root {
    --ink: #000000;
    --muted: #3c3c3c;
    --line: #ebebeb;
    --brand: #2142e7;
    --brand-dark: #001fc4;
    --accent: #2142e7;
    --soft: #f5f5f5;
    --paper: #ffffff;
    --shadow: 0 2px 8px rgba(0, 0, 0, .06);
    --radius: 10px;
}

body {
    color: #000;
    background: #fff;
    font-family: proxima-nova, "Helvetica Neue", system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.35;
}

.container { width: min(945px, calc(100% - 40px)); }

.site-header {
    display: block;
    height: 208px;
    padding-top: 32px;
    color: #fff;
    background: linear-gradient(118deg, #0828c9 0%, #2142e7 100%);
    border: 0;
}
.home .site-header { height: 102px; }
.header-inner { height: 46px; }
.site-brand { font-size: 0; }
.sante-logo-crop {
    display: block;
    position: relative;
    width: 42px;
    height: 36px;
    overflow: hidden;
}
.sante-logo-crop img {
    position: absolute;
    width: 144px;
    max-width: none;
    height: auto;
    left: -14px;
    top: -13px;
    filter: invert(1);
    mix-blend-mode: normal;
}
.header-actions { gap: 16px; font-size: 14px; }
.access-name { display: none; color: rgba(255,255,255,.82); }
.access-name strong { color: #fff; font-weight: 600; }
.logout-link { padding: 0; border: 0; border-radius: 0; color: #fff; }
.logout-link:hover { background: transparent; text-decoration: underline; }
.header-search .search-form { max-width: none; width: 100%; margin-top: 24px; }

.hero {
    height: 356px;
    padding: 76px 0 0;
    color: #fff;
    background: linear-gradient(118deg, #0828c9 0%, #2142e7 100%);
}
.hero::after { display: none; }
.hero h1 {
    margin: 0 0 24px;
    color: #fff;
    font-family: inherit;
    font-size: 28px;
    font-weight: 600;
    line-height: 35px;
    letter-spacing: 0;
}
.hero p, .hero .eyebrow { display: none; }

.search-form,
.page-search {
    width: 620px;
    max-width: 100%;
    height: 66px;
    margin: 0 auto;
    padding: 0 20px;
    gap: 20px;
    border: 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, .2);
    box-shadow: none;
}
.search-form svg { width: 24px; height: 24px; color: #fff; }
.search-form input {
    color: #fff;
    font-size: 18px;
    line-height: 18px;
}
.search-form input::placeholder { color: rgba(255,255,255,.78); opacity: 1; }
.search-form button { display: none; }

.home .main-content { padding: 40px 0 115px; }
.home .main-content .container { width: min(885px, calc(100% - 40px)); }
.area-grid { grid-template-columns: repeat(3, 1fr); gap: 30px; }
.area-card {
    display: block;
    min-height: 240px;
    padding: 30px;
    border: 1px solid #ebebeb;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
}
.area-card:hover {
    transform: none;
    border-color: #dcdcdc;
    box-shadow: 0 4px 14px rgba(0,0,0,.09);
}
.area-icon {
    width: 28px;
    height: 28px;
    margin: 0 0 24px;
    border-radius: 0;
    color: #fff;
    background: linear-gradient(145deg, #2142e7, #80a5ff);
    font-size: 11px;
    font-weight: 700;
}
.area-card h3 {
    margin: 0 0 8px;
    color: #000;
    font-size: 16px;
    font-weight: 600;
    line-height: 21px;
    letter-spacing: 0;
}
.area-card p {
    margin: 0;
    color: #3c3c3c;
    font-size: 16px;
    line-height: 22px;
}
.area-meta, .recent-section { display: none; }

.page-head {
    padding: 40px 0 30px;
    background: #fff;
    border: 0;
}
.page-head .breadcrumbs { margin: 0 0 35px; }
.breadcrumbs {
    gap: 10px;
    color: #3c3c3c;
    font-size: 14px;
    line-height: 20px;
}
.breadcrumbs span { color: #8c8c8c; }
.page-head h1 {
    margin: 0 0 12px;
    color: #000;
    font-size: 28px;
    font-weight: 700;
    line-height: 28px;
    letter-spacing: 0;
}
.page-head p {
    color: #3c3c3c;
    font-size: 16px;
    line-height: 22px;
}
.page-head + .main-content { padding: 10px 0 90px; }

.collection-grid,
.article-list {
    display: block;
    margin: 0 0 20px;
    padding: 10px;
    overflow: visible;
    border: 0;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 0 0 1px rgba(0,0,0,.08), 0 2px 8px rgba(0,0,0,.04);
}
.collection-card,
.article-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 46px;
    margin: 0;
    padding: 15px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    box-shadow: none;
}
.collection-card:hover,
.article-row:hover {
    transform: none;
    border: 0;
    background: #f5f5f5;
    box-shadow: none;
}
.collection-card h2,
.article-row h3 {
    margin: 0;
    color: #000;
    font-size: 16px;
    font-weight: 400;
    line-height: 16px;
    letter-spacing: 0;
}
.collection-card span {
    display: none;
}
.article-row p, .article-row time { display: none; }
.empty-state { background: #f5f5f5; border-radius: 12px; }

.single-sante_pop .main-content { padding: 40px 0 100px; }
.article-layout {
    grid-template-columns: minmax(0, 700px) 190px;
    gap: 55px;
}
.article-main .breadcrumbs {
    height: 20px;
    margin: 0 0 45px;
    overflow: hidden;
    flex-wrap: nowrap;
    white-space: nowrap;
}
.article-main h1 {
    margin: 0 0 10px;
    color: #000;
    font-size: 32px;
    font-weight: 700;
    line-height: 32px;
    letter-spacing: 0;
}
.article-excerpt {
    margin: 0;
    color: #8c8c8c;
    font-size: 17px;
    line-height: 24px;
}
.article-excerpt p { margin: 0; }
.article-meta { display: none; }
.article-content {
    margin-top: 48px;
    color: #3c3c3c;
    font-size: 16px;
    line-height: 1.6;
}
.article-content h2 {
    margin: 42px 0 20px;
    color: #3c3c3c;
    font-size: 22px;
    font-weight: 700;
    line-height: 29px;
    letter-spacing: 0;
}
.article-content h3 {
    margin: 34px 0 16px;
    color: #3c3c3c;
    font-size: 19px;
    line-height: 26px;
}
.article-content a { color: #2142e7; text-decoration: underline; }
.article-content img,
.article-content video,
.article-content iframe {
    border: 0;
    border-radius: 8px;
    box-shadow: none;
}
.article-toc { margin-top: 65px; }
.article-toc .toc-title { display: none; }
.article-toc nav a {
    padding: 8px 0 8px 24px;
    border-left: 1px solid #ebebeb;
    color: #8c8c8c;
    font-size: 14px;
    line-height: 18px;
}
.article-toc nav a:hover,
.article-toc nav a.is-active {
    border-left: 2px solid #000;
    color: #000;
}
.article-feedback {
    display: none;
}

.search-title em, .back-link { color: #2142e7; }
.site-footer {
    padding: 28px 0;
    border-top: 1px solid #f5f5f5;
    background: #fff;
    color: #8c8c8c;
}

@media (max-width: 980px) {
    .container,
    .home .main-content .container { width: min(100% - 40px, 720px); }
    .area-grid { grid-template-columns: repeat(2, 1fr); }
    .article-layout { grid-template-columns: minmax(0, 1fr) 180px; gap: 38px; }
}

@media (max-width: 700px) {
    .container,
    .home .main-content .container { width: calc(100% - 32px); }
    .site-header { height: 180px; padding-top: 20px; }
    .home .site-header { height: 78px; }
    .brand-mark { width: 36px; height: 36px; font-size: 31px; }
    .access-name { display: none; }
    .hero { height: 304px; padding-top: 58px; }
    .hero h1 { font-size: 26px; line-height: 32px; }
    .search-form, .page-search { height: 60px; padding: 0 18px; gap: 14px; }
    .search-form input { font-size: 16px; }
    .header-search .search-form { margin-top: 18px; }
    .home .main-content { padding: 30px 0 70px; }
    .area-grid { grid-template-columns: 1fr; gap: 18px; }
    .area-card { min-height: 190px; }
    .page-head { padding: 30px 0 24px; }
    .page-head .breadcrumbs { margin-bottom: 24px; }
    .page-head h1 { font-size: 25px; line-height: 30px; }
    .collection-card span { display: none; }
    .single-sante_pop .main-content { padding: 30px 0 70px; }
    .article-layout { grid-template-columns: 1fr; gap: 0; }
    .article-main .breadcrumbs { margin-bottom: 30px; }
    .article-main h1 { font-size: 29px; line-height: 35px; }
    .article-content { margin-top: 38px; }
    .article-toc { display: none; }
    .footer-inner { display: block; }
}
