/* =======================================================
   1. TELA DE CARREGAMENTO (PRELOADER)
======================================================= */
#xyellow-preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background-color: #050505;
  z-index: 999999;
  display: flex;
  justify-content: center;
  align-items: center;
  transition:
    opacity 0.4s ease,
    visibility 0.4s ease;
}

#xyellow-preloader .loader-content {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

#xyellow-preloader .yellow-spinner {
  width: 50px;
  height: 50px;
  border: 3px solid rgba(255, 215, 0, 0.1);
  border-top: 3px solid #ffd700;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 20px;
}

#xyellow-preloader .loader-text {
  color: #ffd700;
  font-family: "Montserrat", sans-serif;
  font-weight: 600;
  letter-spacing: 4px;
  font-size: 0.85rem;
  text-transform: uppercase;
  animation: pulseText 1.5s infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}
@keyframes pulseText {
  0%,
  100% {
    opacity: 0.4;
  }
  50% {
    opacity: 1;
  }
}

.preloader-hidden {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* =======================================================
   2. HEADER PRINCIPAL (DESKTOP)
======================================================= */
/* Espaçamento global para o header fixo não cobrir o conteúdo */
body {
  padding-top: 80px;
}

.main-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: rgba(5, 5, 5, 0.85); /* Fundo escuro premium */
  backdrop-filter: blur(15px); /* Efeito vidro (glassmorphism) */
  -webkit-backdrop-filter: blur(15px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  z-index: 1000;
  padding: 15px 0;
  transition:
    padding 0.3s ease,
    background-color 0.3s ease;
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo-link {
  display: flex;
  align-items: center;
  z-index: 1002; /* Fica acima do menu mobile */
}

.logo-img {
  max-height: 40px;
  width: auto;
  display: block;
  transition: transform 0.3s ease;
}

.logo-link:hover .logo-img {
  transform: scale(1.05);
}

/* NAVEGAÇÃO DESKTOP */
.desktop-nav {
  display: flex;
  align-items: center;
  gap: 30px;
}

.desktop-nav a {
  color: #aaaaaa;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 0.3s ease;
  position: relative;
}

.desktop-nav a:hover {
  color: #ffd700;
}

.desktop-nav a.yellow-link {
  color: #ffd700;
}

.desktop-nav a.yellow-link:hover {
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

/* ÁREA DIREITA E BOTÕES */
.header-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.user-info {
  color: #fff;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
}

.user-info strong {
  color: #ffd700;
  margin-left: 5px;
}

.btn-inscrever {
  background-color: #ffd700;
  color: #000;
  text-decoration: none;
  padding: 10px 24px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
}

.btn-inscrever:hover {
  background-color: #e6c200;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(255, 215, 0, 0.2);
}

/* =======================================================
   3. MENU MOBILE RESPONSIVO
======================================================= */
/* Botão Hambúrguer (Escondido no Desktop) */
/* =======================================================
   3. MENU MOBILE RESPONSIVO (CORRIGIDO)
======================================================= */
/* Botão Hambúrguer */
.menu-toggle {
  display: none; /* Escondido no Desktop */
  flex-direction: column;
  justify-content: space-around;
  width: 35px; /* Largura definida */
  height: 25px; /* Altura definida */
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 1002;
  padding: 0;
}

.menu-toggle span {
  display: block;
  width: 100%;
  height: 3px;
  background-color: #ffd700; /* Dourado X Yellow */
  border-radius: 10px;
  transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
}

/* Garante que ele apareça em telas menores que 992px */
@media (max-width: 992px) {
  .menu-toggle {
    display: flex !important; /* Força a visibilidade */
    margin-left: auto;
  }
  .desktop-nav,
  .header-right {
    display: none !important;
  }
  .header-container {
    justify-content: space-between;
  }
}

/* Animação do Hambúrguer virando um "X" ao abrir */
.menu-toggle.active span:nth-child(1) {
  transform: translateY(11px) rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
  transform: translateX(-20px);
}

.menu-toggle.active span:nth-child(3) {
  transform: translateY(-11px) rotate(-45deg);
}

/* Sidebar Mobile */
.mobile-nav {
  position: fixed;
  top: 0;
  right: -100%; /* Escondido por padrão */
  width: 80%;
  max-width: 350px;
  height: 100vh;
  background-color: #0a0a0a;
  border-left: 1px solid #222;
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.8);
  display: flex;
  flex-direction: column;
  padding: 100px 30px 40px 30px;
  z-index: 1001;
  transition: right 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  overflow-y: auto;
}

.mobile-nav.open {
  right: 0;
}

.mobile-nav a {
  color: #fff;
  text-decoration: none;
  font-size: 1.1rem;
  font-weight: 600;
  text-transform: uppercase;
  padding: 15px 0;
  border-bottom: 1px solid #1a1a1a;
  transition: 0.3s;
  letter-spacing: 1px;
}

.mobile-nav a:hover,
.mobile-nav a.yellow-link {
  color: #ffd700;
  padding-left: 10px;
}

/* Fundo escuro ao abrir o menu mobile */
.mobile-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: 0.3s ease;
}

.mobile-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* =======================================================
   4. MEDIA QUERIES (RESPONSIVIDADE)
======================================================= */
/* Removido duplicidade: já está acima */

@media (max-width: 480px) {
  body {
    padding-top: 70px;
  }
  .main-header {
    padding: 10px 0;
  }
  .logo-img {
    max-height: 35px;
  }
  .mobile-nav {
    width: 100%;
    padding-top: 90px;
  }
}
/* =======================================================
   REPARAÇÃO DE ALINHAMENTO MOBILE (LOGO <-> MENU)
======================================================= */

@media (max-width: 992px) {
    /* 1. Ajuste Geral do Header (Tamanho Enxuto) */
    .main-header {
        padding: 0 !important; /* Zera padding vertical para controle total da altura */
        height: 70px !important; /* Define altura fixa enxuta */
        display: flex !important;
        align-items: center !important;
    }

    /* 2. FORÇAR ALINHAMENTO EXTREMO (A Correção Principal) */
    .header-container {
        width: 100% !important; /* Container ocupa toda a largura da tela */
        max-width: 100% !important; /* Remove limites de desktop */
        padding: 0 20px !important; /* Dá o respiro nas bordas */
        display: flex !important;
        justify-content: space-between !important; /* Força Logo p/ esquerda, Menu p/ direita */
        align-items: center !important;
        margin: 0 !important; /* Garante que não haja margens centralizadoras */
    }

    /* 3. Ajuste do Logo */
    .logo-link {
        margin: 0 !important; /* Zera margens do link */
        display: flex !important;
        align-items: center !important;
    }

    .logo-img {
        max-height: 35px !important; /* Tamanho mobile refinado */
        width: auto !important;
    }

    /* 4. Ajuste do Menu Hambúrguer */
    .menu-toggle {
        display: flex !important; /* Garante visibilidade */
        margin: 0 !important; /* Zera margens automáticas antigas */
        z-index: 1005 !important; /* Fica acima de tudo */
    }
}

/* Ajustes Finais para Celulares Pequenos */
@media (max-width: 480px) {
    .main-header {
        height: 60px !important; /* Ainda mais enxuto em telas minúsculas */
    }

    .logo-img {
        max-height: 28px !important;
    }
}