/*
Theme Name: Palmerinhas de Guaçuí
Theme URI: https://example.org/palmerinhas-de-guacui
Author: Palmerinhas de Guaçuí
Description: Tema institucional com mosaico de fotos, transparência administrável e consentimento de privacidade.
Version: 1.1.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: palmerinhas-guacui
*/

:root {
  --navy: #14233c;
  --navy-soft: #233b5d;
  --surface: #fff;
  --soft: #f0f2f5;
  --text: #172033;
  --muted: #6e7685;
  --line: #dfe3e8;
  --green: #1f6848;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--surface); color: var(--text); font-family: "DM Sans", "Segoe UI", Arial, sans-serif; }
img { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; }
[hidden] { display: none !important; }

.site-shell { width: 100%; min-height: 100vh; margin: 0; overflow: hidden; background: var(--surface); }
.topbar { min-height: 82px; padding: 0 clamp(22px, 4vw, 54px); display: flex; align-items: center; justify-content: space-between; gap: 24px; background: #fff; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-family: Manrope, "Segoe UI", Arial, sans-serif; font-size: 18px; font-weight: 800; letter-spacing: -.03em; }
.brand-mark { width: 35px; height: 35px; display: grid; place-items: center; border-radius: 11px; color: #fff; background: var(--navy); font-size: 17px; }
.custom-logo { width: auto; max-height: 45px; }
.main-nav { display: flex; align-items: center; gap: 24px; }
.main-nav a { color: var(--muted); text-decoration: none; font-size: 13px; font-weight: 700; }
.main-nav a:hover, .main-nav a:focus-visible { color: var(--navy); }
.main-nav .nav-button { padding: 11px 18px; border-radius: 999px; color: #fff; background: var(--navy); }
.main-nav .nav-button:hover, .main-nav .nav-button:focus-visible { color: #fff; background: var(--navy-soft); }

.home .site-shell { height: 100vh; }
.mosaic-slider { height: calc(100vh - 82px); padding: 0 12px 12px; }
.mosaic-stage { height: 100%; position: relative; display: grid; grid-template-columns: repeat(4, 1fr); grid-template-rows: repeat(2, minmax(0, 1fr)); grid-auto-flow: dense; gap: 8px; overflow: hidden; border-radius: 22px; background: #e9edf0; transition: opacity .18s ease; }
.mosaic-stage.is-changing { opacity: .55; }
.mosaic-item { min-width: 0; min-height: 0; position: relative; order: 2; overflow: hidden; padding: 0; border: 0; background: #d7dde0; cursor: pointer; }
.mosaic-item.is-featured { grid-column: span 2; grid-row: span 2; order: 1; }
.mosaic-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease, filter .3s ease; }
.mosaic-item:hover img { transform: scale(1.025); filter: brightness(1.03); }
.mosaic-item:nth-child(2) img { object-position: center 36%; }
.mosaic-item:nth-child(5) img { object-position: 70% center; }
.mosaic-label { position: absolute; bottom: 34px; left: 36px; z-index: 3; display: flex; flex-direction: column; color: #fff; text-shadow: 0 2px 18px rgba(0,0,0,.45); pointer-events: none; }
.mosaic-label strong { font-family: Manrope, "Segoe UI", Arial, sans-serif; font-size: clamp(32px, 5vw, 72px); line-height: .95; letter-spacing: -.055em; text-transform: uppercase; }
.mosaic-label span { margin-top: 7px; font-size: 11px; font-weight: 700; letter-spacing: .15em; text-transform: uppercase; }
.slider-controls { position: absolute; right: 24px; bottom: 24px; z-index: 4; display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 999px; background: rgba(255,255,255,.9); box-shadow: 0 7px 26px rgba(14,30,44,.18); backdrop-filter: blur(10px); }
.slider-arrow { width: 34px; height: 34px; padding: 0; border: 0; border-radius: 50%; color: #fff; background: var(--navy); cursor: pointer; }
.slider-dots { display: flex; align-items: center; gap: 6px; }
.slider-dot { width: 7px; height: 7px; padding: 0; border: 0; border-radius: 50%; background: #aab2bc; cursor: pointer; transition: width .2s ease, border-radius .2s ease, background .2s ease; }
.slider-dot.is-active { width: 20px; border-radius: 999px; background: var(--navy); }

.transparency-main { min-height: calc(100vh - 82px); background: #f7f8fa; }
.documents-section { min-height: calc(100vh - 82px); padding: clamp(52px, 7vw, 88px) 24px; }
.documents-inner { width: min(100%, 1120px); margin: 0 auto; }
.documents-heading { margin-bottom: 34px; }
.eyebrow { display: block; margin-bottom: 14px; color: var(--green); font-size: 10px; font-weight: 800; letter-spacing: .15em; text-transform: uppercase; }
.documents-heading h1 { margin: 0; font-family: Manrope, "Segoe UI", Arial, sans-serif; font-size: clamp(44px, 6vw, 68px); line-height: .95; letter-spacing: -.055em; }
.documents-heading p { margin: 14px 0 0; color: var(--muted); font-size: 16px; }
.documents-list { display: grid; gap: 16px; }
.document-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 32px; align-items: center; padding: 28px 30px; border: 1px solid var(--line); border-radius: 18px; background: #fff; box-shadow: 0 10px 30px rgba(20,35,60,.045); transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.document-card:hover { transform: translateY(-2px); border-color: #cdd4dc; box-shadow: 0 14px 34px rgba(20,35,60,.08); }
.document-year { color: var(--green); font-size: 10px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.document-card h2 { margin: 6px 0; color: var(--navy); font-size: 20px; }
.document-card p { max-width: 680px; margin: 0; color: var(--muted); font-size: 14px; line-height: 1.55; }
.document-link { padding: 12px 18px; border: 1px solid var(--navy); border-radius: 999px; color: #fff; background: var(--navy); text-decoration: none; font-size: 12px; font-weight: 800; white-space: nowrap; }
.document-link:hover, .document-link:focus-visible { background: var(--navy-soft); }
.empty-documents { padding: 28px; border: 1px dashed #b9c0ca; border-radius: 16px; color: var(--muted); text-align: center; }

.content-page { width: min(100% - 40px, 920px); min-height: calc(100vh - 82px); margin: 0 auto; padding: 64px 0 90px; }
.content-page h1 { margin-top: 0; font-size: clamp(38px, 6vw, 68px); letter-spacing: -.05em; }
.entry-content { color: #3d4655; font-size: 16px; line-height: 1.75; }
.entry-content h2 { margin-top: 36px; color: var(--navy); }
.site-footer { padding: 32px clamp(22px, 4vw, 54px); display: flex; align-items: center; justify-content: space-between; gap: 28px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }

.consent-banner { width: min(calc(100% - 28px), 980px); position: fixed; right: 14px; bottom: 14px; left: 14px; z-index: 99999; margin: auto; padding: 20px 22px; display: flex; align-items: center; justify-content: space-between; gap: 28px; border: 1px solid #d9dee5; border-radius: 18px; color: var(--text); background: rgba(255,255,255,.98); box-shadow: 0 20px 60px rgba(20,35,60,.2); }
.consent-copy strong { display: block; margin-bottom: 5px; font-size: 16px; }
.consent-copy p { max-width: 650px; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.consent-copy a { display: inline-block; margin-top: 7px; color: var(--green); font-size: 12px; font-weight: 800; }
.consent-actions { display: flex; flex: 0 0 auto; align-items: center; gap: 9px; }
.consent-actions button { padding: 11px 16px; border-radius: 999px; cursor: pointer; font-size: 12px; font-weight: 800; }
.consent-secondary { border: 1px solid var(--line); color: var(--navy); background: #fff; }
.consent-primary { border: 1px solid var(--navy); color: #fff; background: var(--navy); }
.consent-actions button:hover, .consent-actions button:focus-visible { box-shadow: 0 0 0 3px rgba(31,104,72,.18); }
.consent-reopen { position: fixed; bottom: 12px; left: 12px; z-index: 99998; padding: 8px 12px; border: 1px solid #d9dee5; border-radius: 999px; color: var(--navy); background: rgba(255,255,255,.94); box-shadow: 0 6px 18px rgba(20,35,60,.12); cursor: pointer; font-size: 11px; font-weight: 800; }
.consent-reopen:hover, .consent-reopen:focus-visible { background: #fff; box-shadow: 0 0 0 3px rgba(31,104,72,.18); }

a:focus-visible, button:focus-visible { outline: 3px solid rgba(31,104,72,.35); outline-offset: 3px; }

@media (max-width: 782px) {
  body.admin-bar .topbar { margin-top: 46px; }
}

@media (max-width: 760px) {
  .topbar { min-height: 72px; }
  .brand { font-size: 16px; }
  .brand > span:last-child { max-width: 160px; line-height: 1.05; }
  .mosaic-slider { height: calc(100svh - 72px); padding: 0 6px 6px; }
  .mosaic-stage { grid-template-columns: repeat(2, 1fr); grid-template-rows: repeat(4, minmax(0, 1fr)); gap: 5px; border-radius: 16px; }
  .mosaic-item.is-featured { grid-column: span 2; grid-row: span 2; }
  .mosaic-label { bottom: 86px; left: 20px; }
  .mosaic-label strong { font-size: 38px; }
  .slider-controls { right: 14px; bottom: 14px; }
  .transparency-main, .documents-section { min-height: calc(100svh - 72px); }
  .document-card { grid-template-columns: 1fr; gap: 18px; }
  .document-link { justify-self: start; }
  .consent-banner { align-items: stretch; flex-direction: column; gap: 16px; }
  .consent-actions { width: 100%; }
  .consent-actions button { flex: 1; }
}

@media (max-width: 520px) {
  .topbar { padding: 0 14px; }
  .main-nav .nav-button { padding: 10px 14px; }
  .documents-section { padding: 42px 14px; }
  .documents-heading { margin-bottom: 26px; }
  .documents-heading p { font-size: 14px; }
  .document-card { padding: 22px; border-radius: 15px; }
  .document-card h2 { font-size: 18px; }
  .consent-banner { width: calc(100% - 16px); right: 8px; bottom: 8px; left: 8px; padding: 17px; border-radius: 15px; }
  .consent-actions { align-items: stretch; flex-direction: column-reverse; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
