/* ══════════════════════════════════════════════════════════════
   DARK MODE — COMPLETO (Cabeçalho, Rodapé, e todas as páginas)
══════════════════════════════════════════════════════════════ */

/* ── Base ── */
html.dark-mode,
html.dark-mode body {
  background: #0f0f0f;
  color: #ddd;
}

/* ── Cabeçalho ── */
html.dark-mode .header {
  background: rgba(12, 12, 12, 0.94);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom-color: rgba(255, 255, 255, 0.04);
}

html.dark-mode .header-inner .btn-livro {
  background: #153a63;
}

html.dark-mode .nav-link,
html.dark-mode .dropdown-item {
  color: rgba(255, 255, 255, 0.6);
}

html.dark-mode .nav-link:hover,
html.dark-mode .dropdown-item:hover {
  color: #fff;
}

html.dark-mode .nav-link::after {
  background: #fff;
}

html.dark-mode .dropdown-menu {
  background: #1a1a1a;
  border-color: rgba(255, 255, 255, 0.06);
}

html.dark-mode .dropdown-menu::before {
  background: #1a1a1a;
  border-color: rgba(255, 255, 255, 0.06);
  border-right: none;
  border-bottom: none;
}

html.dark-mode .dropdown-item:hover {
  background: rgba(255, 255, 255, 0.06);
}

html.dark-mode .dropdown-item__icon {
  color: rgba(255, 255, 255, 0.6);
}

html.dark-mode .dropdown-item:hover .dropdown-item__icon {
  color: #fff;
}

html.dark-mode .dropdown-item::after {
  background: #fff;
}

html.dark-mode .dropdown-label {
  color: rgba(255, 255, 255, 0.3);
}

html.dark-mode .dropdown-sep {
  background: rgba(255, 255, 255, 0.08);
}

html.dark-mode .hamburger span {
  background: rgba(255, 255, 255, 0.6);
}

html.dark-mode .mobile-menu {
  background: rgba(12, 12, 12, 0.97);
  border-bottom-color: rgba(255, 255, 255, 0.04);
}

html.dark-mode .mobile-menu .dropdown-menu {
  background: transparent;
}

html.dark-mode .mobile-menu .dropdown-item {
  color: rgba(255, 255, 255, 0.5);
  border-left: none;
}

html.dark-mode .mobile-menu .dropdown-item:hover {
  background: none;
  color: rgba(255, 255, 255, 0.85);
  border-left: none;
}

html.dark-mode .logo-img {
  filter: brightness(0) invert(1);
}

/* ── Rodapé ── */
html.dark-mode .footer {
  background: linear-gradient(180deg, #080808 0%, #040404 100%);
}

html.dark-mode .footer::before,
html.dark-mode .footer-grid::after {
  opacity: 0.3;
}

html.dark-mode .footer-heading {
  color: rgba(255, 255, 255, 0.22);
}

html.dark-mode .footer-copy {
  color: rgba(255, 255, 255, 0.07);
}

html.dark-mode .navbar-icon svg {
  stroke: rgba(255, 255, 255, 0.6);
}

/* ══════════════════════════════════════════════════════════════
   DARK MODE — HOME PAGE
══════════════════════════════════════════════════════════════ */

/* Home Destaques: já é escuro por padrão (bg #000), apenas ajuste fino */
html.dark-mode .home-destaques {
  background: #0a0a0a;
  border-top-color: rgba(255, 255, 255, 0.04);
}

/* Home CTA Strip */
html.dark-mode .home-cta-strip {
  background: linear-gradient(135deg, #0a0f1a 0%, #0c1525 100%);
}

/* ══════════════════════════════════════════════════════════════
   DARK MODE — SOBRE PAGE
══════════════════════════════════════════════════════════════ */

/* Seção Descrição (fundo claro por padrão) */
html.dark-mode .sobre-desc {
  background: linear-gradient(170deg, #111 0%, #181818 50%, #141414 100%);
  color: #ccc;
}

html.dark-mode .sobre-desc__title {
  color: #eee;
}

html.dark-mode .sobre-desc__body {
  color: rgba(210, 210, 210, 0.75);
}

html.dark-mode .mk {
  color: #d4875e;
  border-bottom-color: rgba(212, 135, 94, 0.4);
}

html.dark-mode .tag-pill {
  background: rgba(212, 135, 94, 0.1);
  color: #d4875e;
  border-color: rgba(212, 135, 94, 0.22);
}

html.dark-mode .sobre-card--front {
  background: linear-gradient(135deg, #2a2a2a 0%, #1e1e1e 100%);
}

html.dark-mode .sobre-card__text {
  color: #ccc;
}

html.dark-mode .sobre-card__text em {
  color: #d4875e;
}

html.dark-mode .sobre-card__icon {
  background: rgba(212, 135, 94, 0.08);
  border-color: rgba(212, 135, 94, 0.2);
}

/* Seção Fontes (fundo claro por padrão) */
html.dark-mode .sobre-fontes-sec {
  background: linear-gradient(180deg, #141414 0%, #101010 100%);
  color: #ccc;
}

html.dark-mode .sobre-fontes-sec__title {
  color: #eee;
}

html.dark-mode .sobre-fontes-sec__sub {
  color: rgba(200, 200, 200, 0.55);
}

html.dark-mode .fonte-item {
  border-bottom-color: rgba(255, 255, 255, 0.07);
}

html.dark-mode .fonte-item:first-child {
  border-top-color: rgba(255, 255, 255, 0.07);
}

html.dark-mode .fonte-item__title {
  color: #ddd;
}

html.dark-mode .fonte-item__desc {
  color: rgba(200, 200, 200, 0.45);
}

html.dark-mode .fontes-links-label {
  color: rgba(200, 200, 200, 0.4);
}

html.dark-mode .fonte-link-ext {
  background: #1e1e1e;
  color: #bbb;
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: none;
}

html.dark-mode .fonte-link-ext:hover {
  border-color: #d4875e;
  color: #d4875e;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

/* ── Antigas seções .sobre / .fontes (páginas antigas) ── */
html.dark-mode .sobre {
  background: linear-gradient(180deg, #141414 0%, #111 100%);
  color: #ccc;
}

html.dark-mode .sobre .highlight {
  color: #d4875e;
  border-bottom-color: #d4875e;
}

html.dark-mode .fonte-link {
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.5);
  border-color: rgba(255, 255, 255, 0.08);
}

html.dark-mode .fonte-link:hover {
  background: rgba(255, 255, 255, 0.09);
  color: rgba(255, 255, 255, 0.8);
}

/* ══════════════════════════════════════════════════════════════
   DARK MODE — HISTÓRIA PAGE
══════════════════════════════════════════════════════════════ */

/* Os capítulos já têm backgrounds escuros por padrão — aqui apenas
   ajustamos o capítulo 1 (marrom) para ficar mais escuro e coerente */
html.dark-mode .capitulo-content[data-chapter="1"] {
  background: linear-gradient(180deg, #1e1005 0%, #100804 100%);
}

/* ══════════════════════════════════════════════════════════════
   DARK MODE — MUNICÍPIO PAGE
══════════════════════════════════════════════════════════════ */

/* Override do tema claro para o escuro */
html.dark-mode[data-page="municipio"],
html.dark-mode [data-page="municipio"],
html.dark-mode[data-page="municipio"] body {
  background: #111 !important;
  color: #ddd !important;
}

/* ── Hero ── */
html.dark-mode .mun-hero__overlay {
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.6) 0%,
    rgba(0, 0, 0, 0.35) 50%,
    rgba(0, 0, 0, 0.7) 100%
  );
}

/* ── Seção Bandeira ── */
html.dark-mode .mun-flag-section {
  background: linear-gradient(160deg, #181818 0%, #121212 100%);
  border-bottom-color: rgba(255, 255, 255, 0.06);
}

html.dark-mode .mun-flag-section::after {
  background: radial-gradient(ellipse 60% 80% at 90% 50%, rgba(176, 168, 141, 0.06) 0%, transparent 70%);
}

html.dark-mode .mun-flag-info__title {
  color: #eee;
}

html.dark-mode .mun-flag-info__desc {
  color: rgba(200, 200, 200, 0.7);
}

html.dark-mode .mun-flag-info__item {
  color: #ccc;
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.06);
}

html.dark-mode .mun-flag-card__label {
  color: #b0a88d;
  background: rgba(176, 168, 141, 0.1);
  border-color: rgba(176, 168, 141, 0.18);
}

html.dark-mode .mun-flag-card__img-wrapper {
  border-color: rgba(255, 255, 255, 0.08);
  outline-color: rgba(255, 255, 255, 0.04);
  box-shadow: 0 4px 28px rgba(0, 0, 0, 0.4);
}

html.dark-mode .mun-section-tag {
  color: #b0a88d;
  background: rgba(176, 168, 141, 0.08);
  border-color: rgba(176, 168, 141, 0.18);
}

/* ── Seção Hino ── */
html.dark-mode .mun-hino-section {
  background: #0f0f0f;
}

html.dark-mode .mun-hino-header__title {
  color: #eee;
}

html.dark-mode .mun-hino-credit__role {
  color: rgba(200, 200, 200, 0.45);
}

html.dark-mode .mun-hino-credit__name {
  color: rgba(200, 200, 200, 0.7);
}

html.dark-mode .mun-hino-credit-sep {
  background: rgba(255, 255, 255, 0.08);
}

html.dark-mode .mun-player {
  background: linear-gradient(135deg, #1e1e1e 0%, #181818 100%);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.3);
}

html.dark-mode .mun-player__play-btn {
  background: linear-gradient(135deg, #3a3a3a, #222);
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.4);
}

html.dark-mode .mun-player__play-btn:hover {
  background: linear-gradient(135deg, #4a4a4a, #333);
}

html.dark-mode .mun-player__time {
  color: rgba(200, 200, 200, 0.5);
}

html.dark-mode .mun-player__progress-bg,
html.dark-mode .mun-player__vol-bg {
  background: rgba(255, 255, 255, 0.1);
}

html.dark-mode .mun-player__vol-btn {
  color: rgba(200, 200, 200, 0.5);
}

html.dark-mode .mun-player__vol-btn:hover {
  color: #ddd;
}

html.dark-mode .mun-hino-stanza {
  border-top-color: rgba(255, 255, 255, 0.07);
}

html.dark-mode .mun-hino-stanza:last-child {
  border-bottom-color: rgba(255, 255, 255, 0.07);
}

html.dark-mode .mun-hino-stanza p {
  color: #ccc;
}

html.dark-mode .mun-hino-refrao {
  background: linear-gradient(135deg, #1e1e1e, #181818);
  border-left-color: #b0a88d;
  box-shadow: none;
}

html.dark-mode .mun-hino-refrao__badge {
  color: #b0a88d;
  background: rgba(176, 168, 141, 0.1);
}

html.dark-mode .mun-hino-refrao__badge::before {
  background: #b0a88d;
}

html.dark-mode .mun-hino-refrao p {
  color: #ddd;
}

/* ── Seção Geográfica ── */
html.dark-mode .mun-geo-section {
  background: linear-gradient(180deg, #141414 0%, #111 100%);
  border-top-color: rgba(255, 255, 255, 0.05);
}

html.dark-mode .mun-geo-header__title {
  color: #eee;
}

html.dark-mode .mun-geo-card {
  background: #1e1e1e;
  border-color: rgba(255, 255, 255, 0.06);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}

html.dark-mode .mun-geo-card:hover {
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
}

html.dark-mode .mun-geo-card__title {
  color: #eee;
}

html.dark-mode .mun-geo-card__text {
  color: rgba(200, 200, 200, 0.65);
}

html.dark-mode .mun-geo-card__text strong {
  color: #ddd;
}

html.dark-mode .mun-geo-card__stat {
  border-top-color: rgba(255, 255, 255, 0.07);
}

html.dark-mode .mun-geo-card__stat-num {
  color: #eee;
}

html.dark-mode .mun-geo-card__stat-label {
  color: rgba(200, 200, 200, 0.4);
}

html.dark-mode .mun-geo-card__temps {
  border-top-color: rgba(255, 255, 255, 0.07);
}

html.dark-mode .mun-geo-temp__value {
  color: #eee;
}

html.dark-mode .mun-geo-temp__label {
  color: rgba(200, 200, 200, 0.4);
}

html.dark-mode .mun-geo-card__rain-months {
  border-top-color: rgba(255, 255, 255, 0.07);
}

html.dark-mode .mun-geo-month--dry {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(200, 200, 200, 0.45);
}

/* ── Seção Demo (já escura — pequenos ajustes) ── */
html.dark-mode .mun-demo-section {
  background: linear-gradient(180deg, #0e0e0e 0%, #0a0a0a 100%);
}

html.dark-mode .mun-demo-section .mun-geo-header__title {
  color: #eee;
}

html.dark-mode .mun-demo-card {
  background: #1a1a1a;
  border-color: rgba(255, 255, 255, 0.07);
}

html.dark-mode .mun-demo-card:hover {
  box-shadow: 0 10px 36px rgba(0, 0, 0, 0.5);
  border-color: rgba(255, 255, 255, 0.12);
}

/* ── Seção Economia ── */
html.dark-mode .mun-econ-section {
  background: linear-gradient(180deg, #141414 0%, #111 100%);
  border-top-color: rgba(255, 255, 255, 0.05);
}

html.dark-mode .mun-econ-section .mun-geo-header__title {
  color: #eee;
}

html.dark-mode .mun-econ-card {
  background: #1e1e1e;
  border-color: rgba(255, 255, 255, 0.06);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}

html.dark-mode .mun-econ-card:hover {
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
}

html.dark-mode .mun-econ-card__title {
  color: #eee;
}

html.dark-mode .mun-econ-card__text {
  color: rgba(200, 200, 200, 0.65);
}

html.dark-mode .mun-econ-card__text strong {
  color: #ddd;
}

html.dark-mode .mun-econ-card__stat {
  border-top-color: rgba(255, 255, 255, 0.07);
}

html.dark-mode .mun-econ-stat__num {
  color: #eee;
}

html.dark-mode .mun-econ-stat__lbl {
  color: rgba(200, 200, 200, 0.4);
}

html.dark-mode .mun-econ-card__routes {
  border-top-color: rgba(255, 255, 255, 0.07);
}

html.dark-mode .mun-econ-route__dot {
  background: #b0a88d;
}

html.dark-mode .mun-econ-route__info strong,
html.dark-mode .mun-econ-route__content strong {
  color: #ddd;
}

html.dark-mode .mun-econ-route__info span,
html.dark-mode .mun-econ-route__content span {
  color: rgba(200, 200, 200, 0.4);
}

html.dark-mode .mun-econ-streets {
  border-top-color: rgba(255, 255, 255, 0.07);
}

html.dark-mode .mun-econ-street__name {
  color: rgba(200, 200, 200, 0.5);
}

html.dark-mode .mun-econ-street__bar-wrap {
  background: rgba(255, 255, 255, 0.08);
}

html.dark-mode .mun-econ-street__dist {
  color: rgba(200, 200, 200, 0.5);
}

/* ── Seção Assets (já escura — pequenos ajustes) ── */
html.dark-mode .mun-assets-section {
  background: linear-gradient(180deg, #0a0a0a 0%, #0e0e0e 100%);
}

html.dark-mode .mun-assets-section .mun-geo-header__title {
  color: #eee;
}