/* ===== HEADER MODERNO E RESPONSIVO ===== */

/* Estilo base do navbar */
.navbar {
  padding: 0.8rem 0;
  transition: all 0.3s ease;
  background: rgba(15, 15, 15, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(108, 92, 231, 0.2);
}

/* Quando o header fica com scroll */
.navbar.scrolled {
  padding: 0.4rem 0;
  background: rgba(15, 15, 15, 0.98);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

/* Brand */
.navbar-brand {
  font-weight: 700;
  font-size: 1.4rem;
  color: var(--text-primary) !important;
  transition: all 0.3s ease;
}

.navbar-brand i {
  color: var(--accent-primary);
  transition: transform 0.3s ease;
}

.navbar-brand:hover i {
  transform: rotate(-10deg) scale(1.1);
}

.brand-text {
  background: linear-gradient(135deg, #fff, var(--accent-secondary));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Botão Toggler personalizado */
.navbar-toggler {
  border: 1px solid var(--accent-primary);
  padding: 0.6rem;
  transition: all 0.3s ease;
  position: relative;
}

.navbar-toggler:hover {
  background: rgba(108, 92, 231, 0.1);
  transform: scale(1.05);
}

.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(108, 92, 231, 1)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Itens de navegação */
.nav-item {
  margin: 0 0.2rem;
  position: relative;
}

.nav-link {
  color: var(--text-gray) !important;
  font-weight: 500;
  padding: 0.6rem 1rem !important;
  border-radius: 8px;
  transition: all 0.3s ease;
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-link i {
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.nav-link span {
  transition: all 0.3s ease;
}

.nav-link:hover {
  color: var(--text-primary) !important;
  background: rgba(108, 92, 231, 0.1);
  transform: translateY(-2px);
}

.nav-link:hover i {
  transform: scale(1.1);
  color: var(--accent-primary);
}

/* Indicador de seção ativa */
.nav-link.active {
  color: var(--accent-primary) !important;
  background: rgba(108, 92, 231, 0.15);
}

.nav-link.active i {
  color: var(--accent-primary);
}

/* Linha animada abaixo do link */
.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
  transition: all 0.3s ease;
  transform: translateX(-50%);
  border-radius: 2px;
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 70%;
}

/* ===== DROPDOWN MENU MODERNO ===== */
.dropdown-menu {
  background: rgba(26, 26, 26, 0.98);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(108, 92, 231, 0.3);
  border-radius: 12px;
  padding: 0.5rem;
  margin-top: 0.5rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  animation: dropdownFade 0.3s ease;
}

@keyframes dropdownFade {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.dropdown-item {
  color: var(--text-gray);
  padding: 0.75rem 1rem;
  border-radius: 8px;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.dropdown-item i {
  font-size: 1rem;
  margin-right: 8px;
  width: 24px;
  text-align: center;
}

.dropdown-item:hover {
  background: rgba(108, 92, 231, 0.15);
  color: var(--text-primary);
  transform: translateX(5px);
}

.dropdown-subtitle {
  font-size: 0.7rem;
  color: var(--text-gray);
  margin-top: 2px;
  margin-left: 32px;
  font-weight: normal;
}

.dropdown-divider {
  border-color: rgba(108, 92, 231, 0.2);
  margin: 0.5rem 0;
}

.dropdown-toggle::after {
  margin-left: 0.5rem;
  vertical-align: middle;
  border-top-color: var(--accent-primary);
  transition: transform 0.2s ease;
}

.dropdown-toggle[aria-expanded='true']::after {
  transform: rotate(180deg);
}

/* ===== BARRA DE PROGRESSO PERSONALIZADA ===== */
.progress-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: rgba(108, 92, 231, 0.1);
  z-index: 1041;
  overflow: hidden;
}

.progress-bar-custom {
  position: absolute;
  top: 0;
  left: 0;
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--accent-primary) 0%, var(--accent-secondary) 50%, var(--accent-primary) 100%);
  border-radius: 0 2px 2px 0;
  transition: width 0.1s ease-out;
  box-shadow: 0 0 10px rgba(108, 92, 231, 0.5);
  animation: progressPulse 1.5s ease-in-out infinite;
}

.progress-glow {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.3) 50%, transparent 100%);
  animation: glowMove 2s linear infinite;
  pointer-events: none;
}

@keyframes progressPulse {
  0%,
  100% {
    opacity: 0.8;
  }
  50% {
    opacity: 1;
    box-shadow: 0 0 15px rgba(108, 92, 231, 0.8);
  }
}

@keyframes glowMove {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

.progress-bar-custom.loading {
  width: 30%;
  animation: loadingPulse 1s ease-in-out infinite;
}

@keyframes loadingPulse {
  0%,
  100% {
    opacity: 0.6;
  }
  50% {
    opacity: 1;
  }
}

/* ===== RESPONSIVIDADE ===== */
@media (max-width: 991.98px) {
  .navbar {
    padding: 0.6rem 0;
  }

  .navbar-brand {
    font-size: 1.2rem;
  }

  .navbar-collapse {
    background: rgba(15, 15, 15, 0.98);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    margin-top: 1rem;
    padding: 1rem;
    border: 1px solid rgba(108, 92, 231, 0.2);
    max-height: 80vh;
    overflow-y: auto;
  }

  .nav-item {
    margin: 0.2rem 0;
  }

  .nav-link {
    padding: 0.8rem 1rem !important;
    justify-content: flex-start;
  }

  .nav-link::after {
    display: none;
  }

  .dropdown-menu {
    background: rgba(10, 10, 10, 0.95);
    border: none;
    margin-left: 1rem;
    margin-top: 0;
    animation: none;
  }

  .dropdown-item {
    padding: 0.6rem 1rem;
  }

  .dropdown-subtitle {
    margin-left: 0;
    font-size: 0.65rem;
  }

  .navbar-collapse {
    transition: all 0.3s ease;
  }

  .navbar-collapse.collapsing {
    transition: all 0.3s ease;
  }
}

@media (max-width: 576px) {
  .navbar-brand {
    font-size: 1rem;
  }

  .brand-text {
    font-size: 0.9rem;
  }

  .nav-link {
    padding: 0.6rem 0.8rem !important;
    font-size: 0.9rem;
  }

  .dropdown-subtitle {
    display: none;
  }
}
