/*
 * Guarai Institucional 1.5.2
 * Proporcoes visuais ajustadas a referencia editorial fornecida pelo municipio.
 * Escopo deliberadamente restrito: largura util, margens, tipografia, gaps,
 * padding e dimensoes de cards. Nao altera cores, ordem, grids ou funcionalidades.
 */
:root{
  --guarai-gov-container:1200px;
  --guarai-gov-page-margin:40px;
  --guarai-gov-total-margin:80px;
  --guarai-gov-column-gap:18px;
  --guarai-reference-section-space:64px;
}

/* Mantem a coluna editorial central em 1200px inclusive em monitores grandes. */
.wrap-wide,
.digital-government-wrap,
.transparency-portal{
  width:min(calc(100% - var(--guarai-gov-total-margin)),1200px);
  max-width:1200px;
  margin-inline:auto;
}
.wrap-content{
  width:min(calc(100% - var(--guarai-gov-total-margin)),840px);
  margin-inline:auto;
}

/* Escala tipografica: leitura confortavel, titulos presentes sem ocupar a tela. */
body{
  font-size:calc(16px * var(--guarai-font-scale));
  line-height:1.55;
}
.utility-bar{font-size:.78rem}
.utility-a11y-links{font-size:.74rem}
.header-search input,
.header-search button,
.primary-menu a,
.primary-nav .menu a{font-size:.9rem}
.primary-menu .sub-menu a,
.primary-nav .sub-menu a{font-size:.875rem}

.home-hero h1{
  max-width:800px;
  font-size:clamp(2.35rem,4.1vw,3.6rem);
  line-height:1.06;
}
.home-hero__copy>p{
  max-width:700px;
  font-size:1.05rem;
  line-height:1.55;
}
.home-hero__panel>strong{font-size:1.08rem}
.home-hero__panel>p{font-size:.88rem;line-height:1.48}
.home-essential__grid a>strong{font-size:.84rem}

.section-heading{margin-bottom:24px}
.section-heading h2{
  font-size:clamp(1.9rem,2.55vw,2.35rem);
  line-height:1.14;
  letter-spacing:-.018em;
}
.section-heading p{
  max-width:760px;
  font-size:1rem;
  line-height:1.55;
}
.eyebrow,.section-heading>span{font-size:.7rem}
.section-link{font-size:.9rem}

.entry-header h1,.archive-header h1{
  font-size:clamp(2rem,3vw,2.6rem);
  line-height:1.12;
}
.entry-lead,.archive-header>p,.archive-description{font-size:1rem;line-height:1.6}
.entry-content{font-size:1rem;line-height:1.68}
.entry-content h2{font-size:1.7rem}
.entry-content h3{font-size:1.3rem}

/* Ritmo vertical semelhante ao portal de referencia, sem mudar a ordem das secoes. */
.home-hero{padding:58px 0}
.home-section{padding:var(--guarai-reference-section-space) 0}
.home-banners{padding-top:var(--guarai-reference-section-space);padding-bottom:var(--guarai-reference-section-space)}
.page-main{padding:34px 0 64px}
.prefeitura-section{padding:56px 0}
.digital-services,.digital-performance,.digital-status,.digital-principles{margin:48px 0}

/* Gaps mais editoriais e consistentes. Nao altera numero de colunas. */
.home-card-grid,
.service-tabs__grid,
.content-card-grid,
.digital-card-grid,
.transparency-grid,
.news-layout,
.home-banner-rail,
.prefeitura-management-grid,
.prefeitura-units-grid{
  gap:18px;
}

/* Cards: mesmas estruturas, apenas dimensoes/padding/tipografia. */
.home-card{
  min-height:118px;
  gap:13px;
  padding:18px;
}
.home-card__icon{width:42px;height:42px}
.home-card__content strong{font-size:.98rem;line-height:1.3}
.home-card__content em{font-size:.87rem;line-height:1.48}

.service-tabs{margin-top:20px}
.service-tabs__nav{margin-bottom:20px}
.service-tabs__tab{font-size:.9rem;padding:8px 14px}
.service-tab-card{
  min-height:118px;
  gap:13px;
  padding:18px;
}
.service-tab-card__icon{width:42px;height:42px}
.service-tab-card__body>strong{font-size:.98rem;line-height:1.3}
.service-tab-card__body>span{font-size:.87rem;line-height:1.48}

.content-card>a{
  min-height:148px;
  gap:13px;
  padding:18px;
}
.content-card__icon{width:42px;height:42px}
.content-card h2{font-size:1rem;line-height:1.3}
.content-card p{font-size:.88rem;line-height:1.5}
.content-card small{font-size:.78rem}

.news-card__body{padding:18px}
.news-card__body h3{font-size:1.02rem;line-height:1.32}
.news-card--featured .news-card__body h3{font-size:1.35rem}
.news-card__body p{font-size:.9rem;line-height:1.52}

.digital-section-head{margin-bottom:20px}
.digital-section-head h2{font-size:clamp(1.65rem,2.4vw,2rem);line-height:1.18}
.digital-section-head p{font-size:.96rem;line-height:1.55}
.digital-card{min-height:118px;gap:12px;padding:18px}
.digital-card__icon{width:42px;height:42px}
.digital-card strong{font-size:.96rem;line-height:1.3}
.digital-card small{font-size:.84rem;line-height:1.48}
.digital-performance{padding:22px}
.digital-kpis{gap:18px}
.digital-kpis>div{min-height:104px;padding:18px}

.prefeitura-panel{padding:20px}
.prefeitura-panel h3{font-size:1.05rem}
.prefeitura-callout{padding:22px}

/* Portal da Transparencia segue a mesma largura e densidade, sem mudar grupos/cores. */
.transparency-portal{
  margin-top:40px;
  margin-bottom:64px;
  font-size:calc(15px * var(--transparency-font-scale));
}
.transparency-hero{gap:24px;padding:36px}
.transparency-hero h1{font-size:clamp(2.2rem,3.5vw,3rem);line-height:1.08}
.transparency-hero__content>p:not(.transparency-kicker){font-size:1rem;line-height:1.55}
.transparency-hero__summary{padding:20px}
.transparency-tools{padding:14px 24px}
.transparency-portal .breadcrumbs{padding:11px 24px}
.transparency-block{padding:24px}
.transparency-card{min-height:112px;padding:15px;gap:11px}
.transparency-card__icon{flex-basis:40px;width:40px;height:40px}
.transparency-card strong{font-size:.92rem;line-height:1.3}
.transparency-card em{font-size:.82rem;line-height:1.45}
.transparency-card small{font-size:.72rem}
.transparency-result-count{padding:0 24px 9px}
.transparency-groups{padding:0 24px 24px}
.transparency-group{padding:18px;margin-bottom:18px}
.transparency-group__head{margin-bottom:16px}
.transparency-group__head h2{font-size:1.3rem}
.transparency-group__head p{font-size:.9rem}
.transparency-chips{gap:8px}
.transparency-chips a{font-size:.84rem}

/* Rodape conserva conteudo e cores, apenas com proporcao equivalente ao restante. */
.footer-grid{gap:24px;padding-top:48px;padding-bottom:36px}
.site-footer h2{font-size:.94rem}
.footer-brand h2{font-size:1.12rem}
.footer-brand>p,.footer-nav a,.footer-default-links a{font-size:.86rem;line-height:1.5}
.footer-contact{font-size:.86rem}
.footer-social-section{padding:18px 0}
.footer-extra{padding:18px 0}
.footer-legal__inner{min-height:54px;font-size:.78rem}

/* Tablet: preserva respiro sem sacrificar area util. */
@media(max-width:900px){
  :root{
    --guarai-gov-page-margin:24px;
    --guarai-gov-total-margin:48px;
    --guarai-reference-section-space:52px;
  }
  .home-hero{padding:48px 0}
  .home-hero h1{font-size:clamp(2.15rem,6vw,3rem)}
  .section-heading h2{font-size:clamp(1.75rem,4vw,2.15rem)}
  .prefeitura-section{padding:48px 0}
  .transparency-portal{margin-top:24px;margin-bottom:48px}
  .transparency-hero{padding:28px}
}

/* Celular: margem visivel em todas as resolucoes, sem comprimir os controles. */
@media(max-width:559px){
  :root{
    --guarai-gov-page-margin:16px;
    --guarai-gov-total-margin:32px;
    --guarai-gov-column-gap:14px;
    --guarai-reference-section-space:40px;
  }
  .wrap-wide,
  .digital-government-wrap,
  .transparency-portal{width:calc(100% - 32px)}
  .wrap-content{width:calc(100% - 32px)}
  .home-hero{padding:40px 0}
  .home-hero h1{font-size:2.1rem}
  .home-hero__copy>p{font-size:1rem}
  .section-heading{margin-bottom:18px}
  .section-heading h2{font-size:1.75rem}
  .section-heading p{font-size:.96rem}
  .home-card,.service-tab-card,.content-card>a,.digital-card{padding:15px}
  .page-main{padding:24px 0 44px}
  .prefeitura-section{padding:40px 0}
  .transparency-portal{margin-top:16px;margin-bottom:40px}
  .transparency-hero,.transparency-block,.transparency-groups{padding:18px}
  .transparency-tools,.transparency-portal .breadcrumbs{padding-left:18px;padding-right:18px}
  .transparency-result-count{padding-left:18px;padding-right:18px}
}
