/* PÁGINA GERAL */
/* === TOKENS DE TEMA === */
:root {
  --bg: #000000;   /* fundo página (light) */
  --text: #000000; /* texto padrão (light) */
  --card: #000000; /* fundo dos blocos (light) */
}

html[data-theme="dark"] {
  --bg: #ffffff;   /* fundo página (dark) */
  --text: #000000; /* texto padrão (dark) */
  --card: #ffffff; /* fundo dos blocos (dark) */
}

html, body {
  font-family: Arial, sans-serif;
  font-size: 16px;
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow-x: hidden;
  background-color: var(--bg); /* <- usa token */
  color: var(--text);
  box-sizing: border-box;
  transition: background-color .25s ease, color .25s ease;
}

/* Modo escuro - menu */
[data-theme="dark"] nav {
  background-color: #555555;
  border-bottom: 1px solid #444444;
}

/* MENU (barra superior) */
nav {
  position: sticky; /* fixa no topo ao rolar */
  top: 0;
  left: 0;
  width: 100%;
  background-color: #000000;
  border-bottom: 1px solid rgba(0, 0, 0, 0.979);
  padding: 8px 12px;
  box-sizing: border-box;
  z-index: 1000;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

/* LINKS padrões */
nav a {
  padding: 8px;
  color: #ffffff;
  display: inline-block;
  font-size: 16px;
  font-weight: bold;
  text-align: center;
  transition: background-color 0.3s, color 0.3s;
  line-height: 1.2;
  white-space: nowrap;
}
nav a:hover {
  text-align: center;
  background-color: #2daf05;
  color: #000000;
}

ul, li { color: white; }

/* BOTÃO DE ALTERNAR TEMA */
.bn62 {
  color: #1cc49d;
  background-color: #1b2f31;
  border-radius: 50px;
  padding: 10px;
  height: 40px;
  width: 140px;
  font-size: small;
  border: none;
  cursor: pointer;
}

/* ===== BASE DO MENU COLAPSÁVEL ===== */
nav .menu {
  list-style: none;
  margin: 0;
  padding: 0;
  position: fixed;
  top: 56px;
  right: 0;
  bottom: 0;
  width: clamp(280px, 30vw, 380px);
  background: #000000;
  border-left: 1px solid rgb(255, 255, 255);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  transform: translateX(100%);
  transition: transform .25s ease;
  padding: 12px;
  z-index: 1001;
}
nav[data-open] .menu { transform: translateX(0); }
nav .menu a, nav .menu .bn62 {
  display: block;
  width: 100%;
  text-align: left;
  padding: 12px;
}

/* ===== HAMBÚRGUER ===== */
.hamburger {
  display: inline-block;
  position: relative;
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: 8px;
}
.hamburger .bar {
  position: absolute;
  left: 9px;
  right: 9px;
  height: 2px;
  background: #fff;
  transition: transform .25s ease, opacity .2s ease;
}
.hamburger .bar:nth-child(1) { top: 12px; }
.hamburger .bar:nth-child(2) { top: 19px; }
.hamburger .bar:nth-child(3) { top: 26px; }
nav[data-open] .hamburger .bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
nav[data-open] .hamburger .bar:nth-child(2) { opacity: 0; }
nav[data-open] .hamburger .bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===== BACKDROP ===== */
.backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgb(0, 0, 0);
  opacity: 0;
  transition: opacity .25s ease;
  z-index: 900;
}
.backdrop[aria-hidden="false"] { display: block; opacity: 1; }

/* ===== TIPOGRAFIA / RESPONSIVIDADE ===== */
@media only screen and (max-width: 600px) { body { font-size: 12px; } }
@media only screen and (min-width: 601px) and (max-width: 1024px) { body { font-size: 16px; } }
@media only screen and (min-width: 1025px) { body { font-size: 18px; } }

/* ====== SUBMENUS (Acordeão) ====== */
.menu .has-sub { position: relative; }
.menu .submenu-toggle {
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  border: 0;
  color: #ffd904;
  font: inherit;
  font-weight: bold;
  width: 100%;
  text-align: left;
  padding: 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color .25s ease, color .25s ease;
}
.menu .submenu-toggle:hover,
.menu .submenu-toggle:focus-visible {
  background: #2daf05;
  color: #000;
  outline: none;
}
.menu .submenu-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.menu .submenu-toggle .caret {
  width: 0; height: 0;
  margin-left: 8px;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 6px solid currentColor;
  transition: transform .2s ease;
}
.menu .has-sub > .submenu {
  list-style: none;
  margin: 0;
  padding: 0 0 0 12px;
  max-height: 0;
  overflow: hidden;
  transition: max-height .25s ease;
  border-left: 1px dashed rgb(255, 0, 0);
}
.menu .has-sub.open > .submenu { max-height: 600px; }
.menu .has-sub.open > .submenu-toggle .caret { transform: rotate(90deg); }
.menu .submenu a {
  display: block;
  padding: 10px 12px;
  border-radius: 6px;
  color: #fff;
}
.menu .submenu a:hover,
.menu .submenu a:focus-visible {
  background: rgba(255,255,255,.12);
  color: #fff;
  outline: none;
}
