/*
Theme Name: PlenaMais
Theme URI: https://plenamaisgestao.com.br
Author: PlenaMais Gestão em Saúde
Description: Tema personalizado minimalista baseado em CSS puro.
Version: 1.0.0
Text Domain: plenamais
*/

/* ====== TOKENS ====== */
:root{
  --pm-bg:#ffffff;
  --pm-text:#0e1b2a;
  --pm-muted:#f5f7fa;
  --pm-line:#e8edf2;
  --pm-accent:#0a3d62;
  --pm-accent-contrast:#ffffff;
  --pm-shadow:0 10px 24px rgba(10,61,98,.15);
}

/* ====== RESET/BASE ====== */
*{box-sizing:border-box}
html,body{margin:0;padding:0}
body{
  font:16px/1.6 system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif;
  color:var(--pm-text);background:var(--pm-bg);
  -webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;
}
img{max-width:100%;height:auto;display:block}
a{color:var(--pm-accent);text-decoration:none}
a:hover{text-decoration:underline}
h1,h2,h3,h4,h5,h6{margin:0 0 .6em;line-height:1.2}
p{margin:0 0 1em}
.container{max-width:1200px;margin:0 auto;padding:0 1.25rem}
.section{padding:3.5rem 0}
.section--muted{background:var(--pm-muted)}
.section__title{font-size:clamp(1.4rem,1.1rem + 1.6vw,2rem);margin-bottom:1rem}
.list{padding-left:1.25rem;margin:0 0 1rem}
.media-placeholder{background:#eef2f6;border:1px dashed #cdd6e1;color:#6b7280;padding:1rem;text-align:center;border-radius:.5rem}

/* Skip link */
.skip-link{position:absolute;left:-9999px;top:auto;width:1px;height:1px;overflow:hidden}
.skip-link:focus{left:10px;top:10px;width:auto;height:auto;padding:.5rem .75rem;background:#0a3d62;color:#fff;border-radius:.5rem;z-index:10000}

/* ====== GRID ====== */
.grid{display:grid;gap:1.25rem}
.grid-2,.grid-3,.grid-4,.grid-5{grid-template-columns:1fr}
@media (min-width:768px){
  .grid-2{grid-template-columns:repeat(2,1fr)}
  .grid-3{grid-template-columns:repeat(3,1fr)}
  .grid-4{grid-template-columns:repeat(4,1fr)}
  .grid-5{grid-template-columns:repeat(5,1fr)}
}

/* ====== HEADER / NAV ====== */
.site-header{background:#fff;border-bottom:1px solid var(--pm-line);position:relative;z-index:10}
.site-header .container{display:flex;align-items:center;gap:1rem;justify-content:space-between;padding:1rem 1.25rem;flex-wrap:wrap}
@media (min-width:900px){ .site-header .container{flex-wrap:nowrap} }
.site-logo img{max-height:48px;width:auto;display:block}
.site-tagline{margin:0;font-size:.9rem;color:#6b7280}
.menu{list-style:none;margin:0;padding:0;display:flex;gap:1rem;align-items:center;flex-wrap:wrap}
.menu li{position:relative}
.menu a{display:block;padding:.5rem .25rem;border-radius:.5rem}
.menu a:hover{background:rgba(10,61,98,.06);text-decoration:none}
.menu--footer{justify-content:center;gap:.75rem}
/* Submenus (desktop) */
.menu .sub-menu{
  list-style:none;margin:0;padding:.5rem 0;position:absolute;left:0;top:calc(100% + .25rem);
  min-width:220px;background:#fff;border:1px solid var(--pm-line);box-shadow:var(--pm-shadow);
  opacity:0;transform:translateY(-4px);pointer-events:none;transition:opacity .15s ease, transform .15s ease;z-index:20
}
.menu .sub-menu li{width:100%}
.menu .sub-menu a{padding:.5rem .75rem;display:block}
.menu li:hover > .sub-menu{opacity:1;transform:translateY(0);pointer-events:auto}
.menu-item-has-children > a::after{content:"▾";font-size:.8em;margin-left:.35em}
/* Mobile nav */
.nav-toggle{display:none;position:relative;border:1px solid var(--pm-line);background:#fff;border-radius:.5rem;padding:.5rem .6rem;line-height:0;cursor:pointer}
.nav-toggle__bar{display:block;width:22px;height:2px;background:#0e1b2a;margin:4px 0;border-radius:1px}
.nav-toggle__label{position:absolute;left:-9999px}
@media (max-width:900px){
  .nav-toggle{display:inline-block}
  .site-nav{display:none;width:100%}
  .site-nav.is-open{display:block}
  .menu{flex-direction:column;align-items:flex-start;padding:.5rem 0}
  .menu .sub-menu{position:static;opacity:1;transform:none;pointer-events:auto;box-shadow:none;border:0;padding:.25rem 0 .5rem 1rem}
  .menu-item-has-children > a::after{content:""}
}

/* ====== HERO ====== */
.hero{padding:3.5rem 0;background:var(--pm-muted)}
.hero__title{font-size:clamp(2rem,1.2rem + 2.5vw,3rem);margin-bottom:.75rem}
.hero__lead{max-width:65ch;margin-bottom:1.25rem;color:#334155}

/* ====== BLOCOS GERAIS ====== */
.card{background:#fff;border:1px solid var(--pm-line);border-radius:.8rem;padding:1rem;box-shadow:var(--pm-shadow)}
.metric{text-align:center}
.metric__num{font-size:2rem;display:block;margin-bottom:.25rem}
.logos .logo-placeholder{background:#fff;border-radius:.5rem}

/* FAQ */
.faq details{border:1px solid var(--pm-line);border-radius:.6rem;padding:.75rem 1rem;background:#fff;box-shadow:var(--pm-shadow)}
.faq details + details{margin-top:.75rem}
.faq summary{cursor:pointer;font-weight:600;list-style:none}
.faq summary::-webkit-details-marker{display:none}
.section--faq ul{list-style:none;padding-left:0;margin:0}
.section--faq li{margin:.5rem 0}

/* Newsletter / CTA */
.newsletter__box{padding:1rem}
.inline-form{display:flex;gap:.5rem;align-items:center;flex-wrap:wrap}
.cta__box{background:#fff;border:1px solid var(--pm-line);border-radius:.8rem;padding:1.25rem;box-shadow:var(--pm-shadow);text-align:center}

/* ====== FLOAT CONTACT ====== */
.float-contact{position:fixed;right:16px;bottom:16px;display:flex;flex-direction:column;gap:.5rem;z-index:9999}
.fc-btn{display:flex;align-items:center;gap:.5rem;background:var(--pm-accent);color:#fff;padding:.6rem .8rem;border-radius:999px;box-shadow:var(--pm-shadow)}
.fc-btn:hover{opacity:.95;text-decoration:none}
.fc-ico{font-size:1rem;line-height:1}
@media (max-width:480px){ .float-contact{right:10px;bottom:10px} .fc-label{display:none} }

/* ====== BACK TO TOP ====== */
.back-to-top{
  position:fixed;left:16px;bottom:16px;width:42px;height:42px;border-radius:999px;border:0;
  background:var(--pm-accent);color:#fff;box-shadow:var(--pm-shadow);cursor:pointer;
  opacity:0;pointer-events:none;transition:opacity .2s ease, transform .2s ease;transform:translateY(6px);z-index:9999
}
.back-to-top.is-visible{opacity:1;pointer-events:auto;transform:none}

/* ====== BOTÕES ====== */
.btn{display:inline-block;padding:.7rem 1rem;border-radius:999px;background:var(--pm-accent);color:var(--pm-accent-contrast);box-shadow:var(--pm-shadow)}
.btn:hover{opacity:.95;text-decoration:none}

/* ====== BLOG LIST ====== */
.blog-header .page__title{margin:1rem 0 1.25rem}
.posts-list{display:grid;gap:1rem}
.post-item{display:grid;gap:1rem;grid-template-columns:1fr;align-items:start}
.post-item .post__thumb img{width:100%;height:auto;border-radius:.6rem}
.post-item .post__meta{color:#64748b;font-size:.9rem;margin:.25rem 0 .75rem}
.post-item .post__cats a{color:inherit}
.post-item .post__title{font-size:clamp(1.2rem,1rem + .9vw,1.6rem);margin-bottom:.25rem}
.post-item .post__more{margin-top:.5rem}
@media (min-width:768px){
  .post-item{grid-template-columns:280px 1fr}
}
.posts-empty{opacity:.7}
.pagination{display:flex;justify-content:center;margin:1.25rem 0}
.pagination .page-numbers{display:inline-block;padding:.5rem .75rem;border:1px solid var(--pm-line);border-radius:.5rem;margin:0 .25rem;background:#fff}
.pagination .page-numbers.current{background:var(--pm-accent);color:#fff;border-color:var(--pm-accent)}
.pagination .page-numbers:hover{text-decoration:none;background:#f1f5f9}

/* ====== SINGLE POST ====== */
.post-single{max-width:800px;margin:1.25rem auto}
.single-hero{margin:0 0 1rem}
.single-hero img{width:100%;height:auto;border-radius:.8rem}
.single-header{margin:0 0 .75rem}
.single-title{font-size:clamp(1.8rem,1.4rem + 1.6vw,2.4rem)}
.single-meta{color:#64748b;font-size:.95rem;margin-top:.25rem}
.single-cats a{color:inherit}

.post-content{color:#0f172a}
.post-content h2{font-size:clamp(1.4rem,1.1rem + 1vw,1.8rem);margin:1.5rem 0 .5rem}
.post-content h3{font-size:clamp(1.2rem,1rem + .6vw,1.4rem);margin:1.25rem 0 .4rem}
.post-content p{margin:0 0 1rem}
.post-content ul, .post-content ol{margin:0 0 1rem 1.25rem}
.post-content blockquote{
  margin:1.25rem 0;padding:.75rem 1rem;border-left:4px solid var(--pm-accent);
  background:#f7fafc;border-radius:.5rem;color:#0e1b2a
}
.post-content pre, .post-content code{background:#0f172a0f;padding:.15rem .35rem;border-radius:.25rem}
.post-content table{width:100%;border-collapse:collapse;margin:1rem 0}
.post-content table th, .post-content table td{border:1px solid var(--pm-line);padding:.5rem}
.post-tags{margin:1rem 0;display:flex;gap:.5rem;flex-wrap:wrap;align-items:center}
.post-tags .label{font-weight:600;margin-right:.25rem}
.post-tags a{display:inline-block;padding:.25rem .5rem;border:1px solid var(--pm-line);border-radius:999px;background:#fff}
.post-nav{display:grid;grid-template-columns:1fr;gap:.75rem;margin:1.5rem 0}
.post-nav a{display:inline-block}
@media (min-width:700px){
  .post-nav{grid-template-columns:1fr 1fr}
  .post-nav-prev{text-align:left}
  .post-nav-next{text-align:right}
}

/* TOC */
.toc{border:1px solid var(--pm-line);background:#fff;border-radius:.6rem;padding:1rem;box-shadow:var(--pm-shadow);margin:1rem 0}
.toc__title{display:block;margin:0 0 .5rem}
.toc__list{margin:0;padding-left:1.25rem}
.toc__item--h2{margin:.25rem 0}
.toc__item--h3{margin:.15rem 0 0 1rem;font-size:.95em}

/* Author box */
.author-box{display:grid;grid-template-columns:64px 1fr;gap:.75rem;align-items:start;margin:1.5rem 0}
.author-box__avatar img{border-radius:50%}
.author-box__name{margin:.1rem 0 .25rem}
.author-box__bio{margin:0 0 .5rem;color:#334155}

/* Related posts */
.related-posts .grid{align-items:stretch}
.related-item .related__thumb img{border-radius:.5rem}
.related__title{font-size:1.05rem;margin:.5rem 0}
.related__title a{color:inherit}
.related__meta{color:#64748b;font-size:.85rem}

/* ====== FOOTER ====== */
.site-footer{background:#0f172a;color:#cbd5e1;padding:2rem 0;margin-top:2rem}
.site-footer a{color:#fff}
.footer-widgets{margin:1rem 0}
.site-copy{text-align:center;font-size:.875rem;margin-top:1rem}

/* === HERO BLEED (full-bleed com box sobreposto) === */
.hero--bleed{position:relative;padding:0;background:#0b1220;color:#fff}
.hero-bleed__media{
  position:absolute;inset:0;
  background:
    linear-gradient(90deg, rgba(0,0,0,.80) 0%, rgba(0,0,0,.55) 35%, rgba(0,0,0,0) 62%),
    var(--hero-img), linear-gradient(#cfd8e3,#cfd8e3);
  background-size:cover; background-position:center;
  min-height:clamp(420px, 52vw, 640px);
}
.hero-bleed__inner{position:relative;display:flex;align-items:center;min-height:clamp(420px, 52vw, 640px)}
.hero-bleed__box{
  max-width:640px;background:rgba(15,23,42,.75);
  border:1px solid rgba(255,255,255,.08);
  padding:1.25rem 1.5rem;border-radius:.8rem;backdrop-filter:saturate(140%) blur(2px);
  box-shadow:0 20px 40px rgba(0,0,0,.25)
}
.hero-bleed__kicker{letter-spacing:.06em;text-transform:uppercase;font-size:.8rem;opacity:.8;margin:0 0 .25rem}
.hero--bleed .hero__title{color:#fff}
.hero--bleed .hero__lead{color:#e2e8f0}

/* === DUO (duas colunas com divisor vertical) === */
.dio, .duo{} /* noop just to avoid lint */
.duo .container{padding-top:0}
.duo__grid{
  display:grid;gap:2rem;grid-template-columns:1fr;align-items:start
}
.duo__eyebrow{letter-spacing:.06em;text-transform:uppercase;font-size:.8rem;color:#475569;margin:0 0 .25rem}
.duo__right{
  border-left:0; padding-left:0;
  background:#fff;border:1px solid var(--pm-line);border-radius:.8rem;padding:1rem;box-shadow:var(--pm-shadow)
}
@media (min-width:900px){
  .duo__grid{grid-template-columns:2fr 1fr}
  .duo__right{
    border-left:2px solid var(--pm-line); padding-left:1.25rem;
    background:transparent;border:0;box-shadow:none
  }
}

