/* ===================================================== */
/* HEADER + FOOTER PADRÃO DO PORTAL DO PROFESSOR ARLISSON */
/* ===================================================== */

/* ===================================================== */
/* VARIÁVEIS GLOBAIS (PADRONIZAÇÃO DARK)                 */
/* ===================================================== */
:root {
  --bg-main: #020617;
  --bg-secondary: #0b1120;

  --text: #e2e8f0;
  --text-soft: #94a3b8;

  --primary: #3b82f6;
  --primary-soft: rgba(59, 130, 246, 0.12);

  --card-bg: rgba(15, 23, 42, 0.85);
}

/* ===================================================== */
/* HEADER                                                 */
/* ===================================================== */
.header {
  position: sticky;
  top: 0;
  z-index: 1000;

  display: grid;
  grid-template-columns: 180px 1fr auto;
  align-items: center;
  gap: 24px;

  padding: 14px 28px;

  background: rgba(2, 6, 23, 0.85);
  backdrop-filter: blur(10px);

  color: var(--text);

  border-bottom: 1px solid rgba(255,255,255,0.05);
}

/* ===================================================== */
/* MINI HUD / XP                                          */
/* ===================================================== */
.mini-hud {
  position: relative;

  display: flex;
  align-items: center;
  gap: 10px;
}

.mini-patente {
  width: 42px;
  height: 42px;
  object-fit: contain;
  flex-shrink: 0;
}

.mini-xp {
  width: 90px;
  height: 8px;

  overflow: hidden;
  border-radius: 999px;

  background: var(--primary-soft);
}

#xp-preenchimento {
  width: 0%;
  height: 100%;

  border-radius: inherit;
  background: linear-gradient(90deg, #38bdf8, #2563eb);

  transition: width 0.35s ease;
}

/* Hover card */
.mini-detalhes {
  position: absolute;
  top: calc(100% + 12px);
  left: 0;

  display: flex;
  align-items: center;
  gap: 12px;

  min-width: 220px;
  padding: 14px;

  border-radius: 18px;
  background: rgba(15, 23, 42, 0.97);
  border: 1px solid rgba(255, 255, 255, 0.08);

  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);

  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);

  transition: all 0.22s ease;
}

.mini-hud:hover .mini-detalhes {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.patente-grande {
  width: 56px;
  height: 56px;
  object-fit: contain;
}

.info-texto {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.info-texto strong {
  font-size: 1rem;
  font-weight: 700;
}

.info-texto span {
  font-size: 0.88rem;
  color: var(--text-soft);
}

/* ===================================================== */
/* TÍTULO CENTRAL                                         */
/* ===================================================== */
.header-centro {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.portal-title {
  display: flex;
  flex-direction: column;
  align-items: center;

  text-decoration: none;
  line-height: 1;
}

.portal-brand {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 8px;

  color: #60a5fa;
}

.portal-name {
  font-size: 3.6rem;
  font-weight: 800;
  line-height: 1;

  color: var(--text);
  letter-spacing: -1px;
}

/* Subtítulo */
.hero-subtitle {
  margin-top: 14px;
  padding-top: 10px;

  font-size: 0.95rem;
  color: var(--text-soft);

  border-top: 2px solid rgba(96, 165, 250, 0.25);

  white-space: nowrap;
}

/* ===================================================== */
/* BOTÕES                                                 */
/* ===================================================== */
.header-direita {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.header-botoes {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-botoes button {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-width: 48px;
  height: 48px;
  padding: 0 16px;

  border: none;
  border-radius: 14px;

  background: rgba(255,255,255,0.06);
  color: var(--text);

  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;

  transition: all 0.2s ease;
}

.header-botoes button:hover {
  transform: translateY(-1px);

  background: rgba(255,255,255,0.12);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.25);
}

#toggle-tema {
  width: 48px;
  padding: 0;
}

.btn-sair {
  color: #ef4444 !important;
}

/* ===================================================== */
/* FOOTER                                                 */
/* ===================================================== */
.footer {
  margin-top: 80px;

  background: var(--bg-secondary);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-box {
  max-width: 1200px;
  margin: 0 auto;

  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 42px;

  padding: 52px 28px;
}

.footer-logo {
  display: inline-block;

  text-decoration: none;
  font-size: 1.25rem;
  font-weight: 800;

  color: var(--text);
}

.footer-logo span {
  color: #60a5fa;
}

.footer-brand p {
  margin-top: 14px;
  max-width: 360px;

  line-height: 1.7;
  color: var(--text-soft);
}

.footer-links-coluna {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links-coluna h4 {
  margin-bottom: 8px;

  font-size: 1rem;
  font-weight: 700;

  color: var(--text);
}

.footer-links-coluna a {
  text-decoration: none;
  color: var(--text-soft);

  transition: color 0.2s ease;
}

.footer-links-coluna a:hover {
  color: #3b82f6;
}

.footer-bottom {
  padding: 18px 24px;

  text-align: center;
  font-size: 0.9rem;
  color: var(--text-soft);

  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* ===================================================== */
/* RESPONSIVO                                             */
/* ===================================================== */
@media (max-width: 900px) {
  .header {
    grid-template-columns: 1fr;
    gap: 18px;

    text-align: center;
    padding: 18px;
  }

  .mini-hud,
  .header-direita,
  .header-botoes {
    justify-content: center;
  }

  .mini-xp {
    width: 110px;
  }

  .mini-detalhes {
    left: 50%;
    transform: translate(-50%, 10px);
  }

  .mini-hud:hover .mini-detalhes {
    transform: translate(-50%, 0);
  }

  .hero-subtitle {
    white-space: normal;
  }

  .footer-box {
    grid-template-columns: 1fr;
    gap: 32px;

    text-align: center;
  }
}

/* ===================================================== */
/* HEADER SEM HUD (AUTO AJUSTE)                          */
/* ===================================================== */
.header:not(:has(.mini-hud)) {
  grid-template-columns: 1fr auto;
}

.header:not(:has(.mini-hud)) .header-centro {
  grid-column: 1 / -1;
  justify-self: center;
  text-align: center;
}

.header:not(:has(.mini-hud)) .header-direita {
  position: absolute;
  right: 28px;
}

.header:not(:has(.mini-hud)) .portal-name {
  font-size: 3rem;
}