/* ========================= */
/* HEADER TYPOGRAPHY */
/* ========================= */

.header-fixed,
.header-fixed nav,
.header-fixed nav a {
  font-family: var(--font-header) !important;
}

/* ========================= */
/* HEADER SHELL */
/* ========================= */

.header-fixed {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(16px, 3vw, 38px);
  height: 76px;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  transition:
    background-color 0.3s ease,
    border-color 0.3s ease;
}

/* ========================= */
/* LOGO AND NAVIGATION */
/* ========================= */

.header-logo img {
  display: block;
  height: 46px;
  width: auto;
  filter: drop-shadow(0 5px 10px rgba(0, 0, 0, 0.35));
}

.header-nav-container {
  flex: 1;
  display: flex;
  justify-content: center;
}

.header-fixed nav {
  display: flex;
  gap: clamp(12px, 1.5vw, 24px);
  align-items: center;
}

.header-fixed nav a {
  color: #fff;
  text-decoration: none;
  position: relative;
  padding: 11px 0;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.055em;
  transition: color 0.22s ease;
}

.header-fixed nav > a::after,
.header-dropdown > a::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 4px;
  left: 0;
  height: 2px;
  transform: scaleX(0);
  transform-origin: center;
  background: #ef1a23;
  transition: transform 0.22s ease;
}

.header-fixed nav > a:hover,
.header-fixed nav > a:focus-visible,
.header-dropdown > a:hover,
.header-dropdown > a:focus-visible {
  color: #ff9095;
}

.header-fixed nav > a:hover::after,
.header-fixed nav > a:focus-visible::after,
.header-dropdown:hover > a::after,
.header-dropdown > a:focus-visible::after {
  transform: scaleX(1);
}

/* ========================= */
/* HEADER DROPDOWN */
/* ========================= */

.header-dropdown {
  position: relative;
}

.header-dropdown-content {
  display: flex;
  position: absolute;
  top: calc(100% + 12px);
  left: -18px;
  min-width: 250px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-top: 2px solid #ef1a23;
  border-radius: 10px;
  background: rgba(13, 16, 22, 0.98);
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.35);
  flex-direction: column;
  gap: 4px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  pointer-events: none;
  transition:
    opacity 0.2s ease,
    transform 0.2s ease,
    visibility 0.2s ease;
  z-index: 2000;
}

.header-dropdown:hover .header-dropdown-content {
  display: flex;
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.header-dropdown-column {
  display: flex;
  flex-direction: column;
}

.header-dropdown-column a {
  color: rgba(255, 255, 255, 0.72);
  padding: 10px 12px;
  border-radius: 6px;
  background: transparent;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0;
  opacity: 0.82;
  white-space: nowrap;
  transition:
    color 0.28s ease,
    opacity 0.28s ease;
}

.header-dropdown-column a:hover,
.header-dropdown-column a:focus-visible {
  color: #ff9095;
  background: transparent;
  opacity: 1;
}

.header-menu-toggle {
  display: none;
  padding: 0;
}

/* ========================= */
/* HEADER RESPONSIVE */
/* ========================= */

@media (max-width: 768px) {
  .header-menu-toggle {
    display: block;
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    font-size: 22px;
    cursor: pointer;
    z-index: 1100;
  }

  .header-nav-container {
    width: 100%;
  }

  .header-fixed nav {
    flex-direction: column;
    width: 100%;
    display: none;
    top: 76px;
    gap: 0;
    padding: 8px 16px 16px;
    background: rgba(10, 12, 17, 0.98);
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
    position: absolute;
    left: 0;
    z-index: 999;
  }

  .header-fixed nav.active {
    display: flex;
  }

  .header-fixed nav a {
    display: block;
    width: 100%;
    text-align: center;
    padding: 13px 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .header-dropdown-content {
    display: none;
    position: static;
    min-width: 0;
    margin: 0 8px;
    padding: 4px;
    border: 0;
    border-left: 2px solid #ef1a23;
    border-radius: 0;
    background: rgba(255, 255, 255, 0.05);
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    transform: none;
    pointer-events: auto;
  }

  .header-dropdown-content.mobile-visible {
    display: flex;
  }

  .header-logo img {
    height: 36px;
  }
}
