/* ==========================================================================
   BASE.CSS — Reset, Fontes, Variáveis, Shared Components
   Importar em TODAS as páginas
   ========================================================================== */

/* ==========================================================================
   0. RESET & BASE
   ========================================================================== */

* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  font-family: 'diodrum', sans-serif;
  background-color: #0b0f2a;
}

html {
  scroll-behavior: smooth;
} 

/* ==========================================================================
   1. FONTS
   ========================================================================== */

@font-face {
  font-family: 'diodrum';
  src: url('/assets/font/DiodrumCyrillic-Regular.woff2') format('woff2');
  font-weight: 400;
}

@font-face {
  font-family: 'diodrum';
  src: url('/assets/font/DiodrumCyrillic-Bold.woff2') format('woff2');
  font-weight: 700;
}

/* ==========================================================================
   2. ROOT VARIABLES
   ========================================================================== */

:root {
  --primary-color: #60a5fa;
  --primary-gradient: linear-gradient(90deg, #60a5fa, #2563eb);

  --bg-glass: rgba(255, 255, 255, 0.05);
  --bg-glass-hover: rgba(255, 255, 255, 0.1);

  --border-light: rgba(255, 255, 255, 0.15);

  --text-muted: #b0b8d1;
}

/* ==========================================================================
   3. NAVBAR & TICKER
   ========================================================================== */

:root {
  --nav-height: 84px;
}

/* ── NAVBAR ──────────────────────────────────────────────────────────────── */

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 23px;
  height: var(--nav-height);
  background: transparent;
  font-family: 'diodrum', sans-serif;
  font-weight: 400;
  transition: background 0.4s ease;
}

.navbar.scrolled {
  background: rgba(0, 0, 139, 0.7);
  backdrop-filter: blur(10px);
}

.navbar-brand img {
  max-width: 60px;
  display: block;
}

/* ── LINKS DESKTOP ───────────────────────────────────────────────────────── */

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links .nav-link {
  color: #cecece;
  text-decoration: none;
  position: relative;
  padding: 6px 10px;
  transition: color 0.3s;
}

.nav-links .nav-link::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 50%;
  width: 0%;
  height: 2px;
  background: white;
  transform: translateX(-50%);
  transition: width 0.3s;
}

.nav-links .nav-link:hover {
  color: #fff;
}

.nav-links .nav-link:hover::after {
  width: 90%;
}

/* ── HAMBURGUER ──────────────────────────────────────────────────────────── */

.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 6px;
  z-index: 1100;
}

.hamburger span {
  display: block;
  width: 26px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform 0.35s ease, opacity 0.25s ease;
}

.hamburger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger.open span:nth-child(2) {
  opacity: 0;
}

.hamburger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ── OVERLAY MOBILE ──────────────────────────────────────────────────────── */

.nav-overlay {
  position: fixed;
  inset: 0;
  z-index: 1050;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.nav-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.overlay-link {
  color: #818181;
  text-decoration: none;
  font-family: 'diodrum', sans-serif;
  font-size: clamp(1.6rem, 5vw, 2.4rem);
  padding: 14px 20px;
  display: block;
  transition: color 0.3s, letter-spacing 0.3s;
}

.overlay-link:hover {
  color: #f1f1f1;
  letter-spacing: 2px;
}

/* ── TICKER ──────────────────────────────────────────────────────────────── */

.ticker {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 999;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 9px 0;
  overflow: hidden;
  white-space: nowrap;
  transform: translateY(-100%);
  opacity: 0;
  transition: transform 0.4s ease, opacity 0.3s ease;
  }


.ticker.show {
  transform: translateY(var(--nav-height));
  opacity: 1;
}
.ticker-track {
  display: flex;
  width: max-content;
  animation: ticker var(--ticker-duration, 25s) linear infinite;
  will-change: transform;
}

.ticker-group {
  display: flex;
  flex-shrink: 0;
}

.ticker-group span {
  flex-shrink: 0;
  margin: 0 30px;
}

@keyframes ticker {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(var(--ticker-offset, -50%));
  }
}

.positivo { color: #00ff88; }
.negativo { color: #ff4d4d; }

/* ── RESPONSIVE ──────────────────────────────────────────────────────────── */

@media (max-width: 991px) {
  .nav-links {
    display: none;
  }

  .hamburger {
    display: flex;
  }
}

@media (max-width: 768px) {
  :root {
    --nav-height: 76px;
  }

  .navbar-brand img {
    max-width: 55px;
  }
}

@media (max-width: 360px) {
  .navbar-brand img {
    max-width: 45px;
  }
}

/* ==========================================================================
   4. FOOTER
   ========================================================================== */

footer {
  position: relative;
  background: radial-gradient(circle at 30% 30%, #1a2a6c, #0b0f2a 70%);
  overflow: hidden;
  padding: 25px 30px;
  color: #ffffff;
}

footer > * {
  position: relative;
  z-index: 2;
}

footer::before {
  content: "";
  position: absolute;
  width: 500px;
  height: 500px;
  background: rgba(0, 102, 255, 0.25);
  filter: blur(120px);
  z-index: 0;
  top: -200px;
  left: -150px;
}

footer::after {
  content: "";
  position: absolute;
  width: 400px;
  height: 400px;
  background: rgba(0, 200, 255, 0.15);
  filter: blur(120px);
  z-index: 0;
  bottom: -150px;
  right: -100px;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer1 {
  display: flex;
  align-items: center;
  gap: 15px;
}

.footer1 img {
  max-width: 50px;
  height: auto;
}

.footer-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  font-size: 0.9rem;
  color: #ccc;
  margin-top: 3px;
}

.footer-icons {
  display: flex;
  align-items: center;
  gap: 15px;
}

.footer-icons img {
  width: 26px;
  cursor: pointer;
  transition: 0.3s;
}

.footer-icons img:hover {
  transform: scale(1.15);
}

.footer-bottom {
  text-align: center;
  margin-top: 15px;
  font-size: 0.85rem;
  color: #aaa;
}

/* ==========================================================================
   5. LOADER / ANIMAÇÕES GLOBAIS
   ========================================================================== */

#loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: #0b0f2a;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.5s ease;
}

#loader.hidden {
  opacity: 1 !important;
  pointer-events: none !important;
}

.logo-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-img {
  width: 120px;
  z-index: 2;
  opacity: 0;
  transform: scale(0.8);
  animation: logoFade 1.2s ease forwards;
}

.glow {
  position: absolute;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, #2563eb, transparent 70%);
  filter: blur(40px);
  opacity: 0.7;
  animation: glowPulse 2s ease-in-out infinite;
}

@keyframes logoFade {
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes glowPulse {
  0%   { transform: scale(0.8); opacity: 0.6; }
  50%  { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(0.8); opacity: 0.6; }
}

/* ==========================================================================
   6. RESPONSIVE — Regras globais
   ========================================================================== */

@media (max-width: 768px) {
  :root {
    --nav-height: 76px;
  }

  .navbar-brand img {
    max-width: 55px;
  }

  .navbar-nav {
    align-items: center;
  }

  .navbar-collapse {
    text-align: center;
  }

  .nav-link {
    display: block;
    width: 100%;
    padding: 10px 0;
  }

  .footer-top {
    flex-direction: column;
    align-items: center;
    gap: 20px;
    text-align: center;
  }

  .footer1 {
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }

  .footer-text {
    align-items: center;
  }

  .footer-icons {
    justify-content: center;
  }

  .footer-bottom {
    margin-top: 20px;
  }
}

@media (max-width: 360px) {
  .navbar-brand img {
    max-width: 45px;
  }

  .nav-link {
    font-size: 14px;
    padding: 8px 0;
  }
}
