/*
 * MAC Locações - Header Styles
 */

/* ===========================
   HEADER
   =========================== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-fixed);
  background-color: var(--color-primary);
  padding: 1rem 0;
  transition: all var(--transition-base) ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.header.scrolled {
  padding: 0.75rem 0;
  box-shadow: var(--shadow-lg);
  background-color: var(--color-primary-dark);
}

/* Header Wrapper */
.header-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* ===========================
   LOGO
   =========================== */
.header-logo {
  flex-shrink: 0;
}

.logo-img {
  height: 48px;
  width: auto;
  transition: transform var(--transition-base) ease;
}

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

/* ===========================
   NAVEGAÇÃO DESKTOP
   =========================== */
.nav-desktop {
  display: none;
}

@media (min-width: 1024px) {
  .nav-desktop {
    display: block;
  }
}

.nav-list {
  display: flex;
  gap: 0.5rem;
  list-style: none;
  align-items: center;
  margin: 0;
  padding: 0;
}

.nav-item {
  position: relative;
}

.nav-link {
  display: block;
  color: rgba(255, 255, 255, 0.9);
  padding: 0.75rem 1rem;
  border-radius: var(--border-radius-md);
  font-weight: 500;
  font-size: var(--font-size-sm);
  transition: all var(--transition-base) ease;
  text-decoration: none;
}

.nav-link:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: white;
  transform: translateY(-2px);
}

.nav-link.active {
  background-color: var(--color-secondary);
  color: white;
}

.nav-link.btn {
  margin-left: 0.5rem;
}

/* ===========================
   MENU MOBILE TOGGLE
   =========================== */
.mobile-menu-toggle {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 25px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 10;
}

@media (min-width: 1024px) {
  .mobile-menu-toggle {
    display: none;
  }
}

.hamburger-line {
  width: 30px;
  height: 3px;
  background-color: white;
  border-radius: 10px;
  transition: all var(--transition-base) ease;
  transform-origin: center;
}

/* Animação do Hamburger */
.mobile-menu-toggle.active .hamburger-line:nth-child(1) {
  transform: rotate(45deg) translate(7px, 7px);
}

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

.mobile-menu-toggle.active .hamburger-line:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
}

/* ===========================
   NAVEGAÇÃO MOBILE
   =========================== */
.nav-mobile {
  display: none;
  position: fixed;
  top: 72px;
  left: 0;
  right: 0;
  background-color: var(--color-primary-dark);
  box-shadow: var(--shadow-xl);
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-base) ease;
}

.nav-mobile.active {
  display: block;
  max-height: 500px;
  animation: slideDown var(--transition-base) ease-out;
}

@media (min-width: 1024px) {
  .nav-mobile {
    display: none !important;
  }
}

.nav-mobile-list {
  list-style: none;
  margin: 0;
  padding: 0.5rem 0;
}

.nav-mobile-item {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-mobile-item:last-child {
  border-bottom: none;
}

.nav-mobile-link {
  display: block;
  color: rgba(255, 255, 255, 0.9);
  padding: 1rem 1.5rem;
  font-weight: 500;
  transition: all var(--transition-base) ease;
  text-decoration: none;
}

.nav-mobile-link:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: white;
  padding-left: 2rem;
}

.nav-mobile-link.active {
  background-color: var(--color-secondary);
  color: white;
  border-left: 4px solid white;
}

/* ===========================
   ANIMAÇÕES
   =========================== */
@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===========================
   ESTADOS ESPECIAIS
   =========================== */
.header-hidden {
  transform: translateY(-100%);
}

/* Overlay quando menu mobile está aberto */
.nav-mobile-overlay {
  display: none;
  position: fixed;
  top: 72px;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: var(--z-modal-backdrop);
}

.nav-mobile-overlay.active {
  display: block;
}
