:root {
  --navy: #10213A;
  --navy-2: #16305C;
  --blue: #2856E8;
  --teal: #2FE6C9;
  --bg: #F5F7FB;
  --bg-card: #FFFFFF;
  --border: #E2E8F0;
  --text: #1E2A3B;
  --text-muted: #5B6B82;
  --up: #16A34A;
  --down: #DC2626;
  --stable: #64748B;
  --radius: 12px;
  --shadow: 0 4px 18px rgba(16, 33, 58, 0.08);
  --gradient: linear-gradient(135deg, var(--blue), var(--teal));
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}
img { max-width: 100%; display: block; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { font-family: inherit; font-weight: 800; color: var(--navy); line-height: 1.25; margin: 0 0 .5em; }
p { margin: 0 0 1em; }
.container { max-width: 1160px; margin: 0 auto; padding: 0 20px; }
.btn {
  display: inline-block; padding: 10px 20px; border-radius: 8px; font-weight: 700;
  background: var(--gradient); color: #fff; border: none; cursor: pointer;
}
.btn:hover { opacity: .92; text-decoration: none; }
.btn-outline { background: transparent; border: 2px solid var(--navy); color: var(--navy); }
.tag {
  display: inline-block; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  padding: 3px 10px; border-radius: 999px; color: #fff; background: var(--blue);
}
.eyebrow { color: var(--blue); font-weight: 700; text-transform: uppercase; font-size: 13px; letter-spacing: .06em; }

/* Topbar / Header */
.topbar {
  background: var(--navy); color: #cfe0ff; font-size: 13px;
}
.topbar .container { display: flex; justify-content: space-between; align-items: center; height: 34px; }
.topbar a { color: #cfe0ff; }
.doctum-badge { display: flex; align-items: center; gap: 8px; }
.doctum-badge img { height: 18px; width: auto; }

.site-header { background: #fff; border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 50; }
.site-header .container { display: flex; align-items: center; justify-content: space-between; height: 78px; }
.brand img { height: 42px; width: auto; }
.main-nav { display: flex; gap: 22px; align-items: center; }
.main-nav a { color: var(--navy); font-weight: 600; font-size: 15px; }
.main-nav a:hover { color: var(--blue); text-decoration: none; }
.nav-dropdown { position: relative; }
.nav-dropdown-menu {
  display: none; position: absolute; top: 100%; left: 0; background: #fff; border: 1px solid var(--border);
  border-radius: 10px; box-shadow: var(--shadow); padding: 8px; min-width: 260px; margin-top: 10px;
}
.nav-dropdown:hover .nav-dropdown-menu, .nav-dropdown:focus-within .nav-dropdown-menu, .nav-dropdown.open .nav-dropdown-menu { display: block; }
.nav-dropdown-menu a { display: block; padding: 8px 10px; border-radius: 6px; font-weight: 500; font-size: 14px; }
.nav-dropdown-menu a:hover { background: var(--bg); text-decoration: none; }
.menu-toggle { display: none; background: none; border: none; font-size: 26px; color: var(--navy); cursor: pointer; }

/* Banner / carousel */
.banner { position: relative; background: var(--navy); }
.banner-track { position: relative; }
.banner-slide {
  display: none; grid-template-columns: 1.1fr .9fr; align-items: center; gap: 30px;
  color: #fff; padding: 46px 0; text-decoration: none;
}
.banner-slide.active { display: grid; }
a.banner-slide { cursor: pointer; }
a.banner-slide:hover .banner-img img { transform: scale(1.03); }
.banner-slide .banner-text { max-width: 480px; }
.banner-slide .banner-img { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); aspect-ratio: 16/10; }
.banner-slide .banner-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.banner-slide h2 { color: #fff; font-size: 30px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.banner-slide p { color: #cfe0ff; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.banner-slide .btn { margin-top: 6px; }
.banner-nav { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,.15); border: none; color: #fff; width: 38px; height: 38px; border-radius: 50%; cursor: pointer; font-size: 18px; }
.banner-nav:hover { background: rgba(255,255,255,.3); }
.banner-prev { left: 16px; }
.banner-next { right: 16px; }
.banner-dots { position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; }
.banner-dots button { width: 8px; height: 8px; border-radius: 50%; border: none; background: rgba(255,255,255,.4); cursor: pointer; padding: 0; }
.banner-dots button.active { background: #fff; }

/* Layout: content + sidebar */
.page-layout { display: grid; grid-template-columns: 1fr 340px; gap: 32px; padding: 36px 0 60px; align-items: start; }
.sidebar { position: sticky; top: 96px; display: flex; flex-direction: column; gap: 20px; }

/* Indicator panels */
.panel {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden;
}
.panel-header { padding: 14px 18px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.panel-header h3 { margin: 0; font-size: 15px; }
.panel-body { padding: 16px 18px; display: flex; flex-direction: column; gap: 14px; }
.indicador { display: flex; flex-direction: column; gap: 2px; padding-bottom: 12px; border-bottom: 1px dashed var(--border); }
.indicador:last-child { border-bottom: none; padding-bottom: 0; }
.indicador-titulo { font-size: 13px; color: var(--text-muted); font-weight: 600; }
.indicador-valor-row { display: flex; align-items: baseline; gap: 8px; }
.indicador-valor { font-size: 26px; font-weight: 800; color: var(--navy); }
.indicador-unidade { font-size: 13px; color: var(--text-muted); }
.indicador-variacao { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.indicador-variacao.alta { color: var(--up); background: #DCFCE7; }
.indicador-variacao.baixa { color: var(--down); background: #FEE2E2; }
.indicador-variacao.estavel { color: var(--stable); background: #F1F5F9; }
.indicador-periodo { font-size: 12px; color: var(--text-muted); }
.panel-footer { padding: 12px 18px; border-top: 1px solid var(--border); }
.panel-footer a { font-size: 13px; font-weight: 700; }

/* Cards */
.grid { display: grid; gap: 22px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
  display: flex; flex-direction: column;
}
.card-img { aspect-ratio: 16/10; overflow: hidden; background: var(--bg); }
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 16px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-body h3 { font-size: 17px; margin: 0; }
.card-meta { font-size: 12px; color: var(--text-muted); }
.card-body p { font-size: 14px; color: var(--text-muted); margin: 0; }

/* Section headers */
.section { padding: 46px 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 22px; }
.section-head .btn-outline { font-size: 13px; padding: 8px 14px; }

/* Observatory hero */
.obs-hero { color: #fff; padding: 50px 0; }
.obs-hero .eyebrow { color: #cfe0ff; }
.obs-hero h1 { color: #fff; }
.obs-hero p { color: #dbe6fb; max-width: 720px; }

/* Article detail */
.article-head { max-width: 780px; margin: 0 auto 24px; }
.article-body { max-width: 780px; margin: 0 auto; font-size: 16px; }
.article-body p { white-space: pre-line; }
.article-body img { border-radius: var(--radius); margin: 20px 0; }
.article-body .ql-align-center, .ql-align-center { text-align: center; }
.article-body .ql-align-right, .ql-align-right { text-align: right; }
.article-body .ql-align-justify, .ql-align-justify { text-align: justify; }
.article-cover { border-radius: var(--radius); overflow: hidden; margin-bottom: 24px; max-width: 780px; margin-left: auto; margin-right: auto; aspect-ratio: 16/9; }
.article-cover img { width: 100%; height: 100%; object-fit: cover; }
.byline { display: flex; gap: 10px; align-items: center; color: var(--text-muted); font-size: 14px; margin-top: 10px; }
.byline .tag { background: var(--navy); }

/* Footer */
.site-footer { background: var(--navy); color: #cfe0ff; margin-top: 40px; }
.site-footer .container { padding: 46px 20px; display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 30px; }
.site-footer h4 { color: #fff; font-size: 14px; text-transform: uppercase; letter-spacing: .05em; }
.site-footer a { color: #cfe0ff; font-size: 14px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); text-align: center; padding: 16px; font-size: 13px; color: #9db4dd; }
.footer-brand img { height: 40px; margin-bottom: 12px; }
.footer-brand p { color: #9db4dd; font-size: 13px; max-width: 320px; }

/* Breadcrumb */
.breadcrumb { font-size: 13px; color: var(--text-muted); padding: 18px 0 0; }
.breadcrumb a { color: var(--text-muted); }

/* Forms (contato) */
.form-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.form-field label { font-weight: 600; font-size: 14px; }
.form-field input, .form-field textarea {
  padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; font-family: inherit; font-size: 14px;
}
.alert { padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; font-size: 14px; }
.alert-success { background: #DCFCE7; color: #14532D; }
.alert-error { background: #FEE2E2; color: #7F1D1D; }

/* Empty state */
.empty-state { padding: 40px; text-align: center; color: var(--text-muted); background: #fff; border: 1px dashed var(--border); border-radius: var(--radius); }

@media (max-width: 980px) {
  .page-layout { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .banner-slide { grid-template-columns: 1fr; }
  .grid-3, .grid-2 { grid-template-columns: 1fr 1fr; }
  .site-footer .container { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .main-nav { position: fixed; top: 78px; left: 0; right: 0; bottom: 0; background: #fff; flex-direction: column; align-items: stretch; padding: 20px; gap: 4px; transform: translateX(100%); transition: transform .25s ease; overflow-y: auto; }
  .main-nav.open { transform: translateX(0); }
  .main-nav a { padding: 12px 6px; border-bottom: 1px solid var(--border); }
  .nav-dropdown-menu { position: static; display: block; box-shadow: none; border: none; padding: 0 0 0 12px; margin: 0; }
  .menu-toggle { display: block; }
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .site-footer .container { grid-template-columns: 1fr; }
  .topbar .container { flex-direction: column; height: auto; padding: 6px 20px; gap: 4px; }
}
