/**
 * Formex Header & Navigation
 * Clean, light design with sticky nav
 */

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

.header {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  background-color: rgb(255, 255, 255);
  border-bottom: 1px solid rgb(217, 217, 217);
  transition: all 0.2s;
}

.header--scrolled {
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07), 0 2px 4px rgba(0, 0, 0, 0.03);
}

.header__container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4rem;
  padding: 0 1rem;
  max-width: 1440px;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .header__container {
    height: 5rem;
  }
}

/* ===========================
   LOGO
   =========================== */

.header__logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  z-index: 210;
}

.header__logo-main {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

.header__logo-icon {
  width: 8px;
  height: 8px;
  color: rgb(0, 1, 5);
  flex-shrink: 0;
}

.header__logo-text {
  font-family: Manrope, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 1.5rem;
  font-weight: 800;
  color: rgb(0, 1, 5);
  line-height: 1;
  letter-spacing: -0.02em;
}

.header__logo-tagline {
  display: none;
  font-family: Manrope, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 0.75rem;
  font-weight: 500;
  color: rgb(90, 93, 91);
  margin-top: 0.25rem;
  letter-spacing: 0.05em;
}

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

/* ===========================
   NAVIGATION - DESKTOP
   =========================== */

.nav {
  display: none;
}

@media (min-width: 768px) {
  .nav {
    display: flex;
    align-items: center;
    gap: 2rem;
  }
}

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

.nav__item {
  position: relative;
}

.nav__link {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.5rem 0;
  font-family: Manrope, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
  color: rgb(90, 93, 91);
  text-decoration: none;
  transition: color 0.2s;
  white-space: nowrap;
}

.nav__link:hover,
.nav__link--active {
  color: rgb(0, 1, 5);
}

.nav__link::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background-color: rgb(0, 1, 5);
  transform: scaleX(0);
  transition: transform 0.2s;
}

.nav__link:hover::after,
.nav__link--active::after {
  transform: scaleX(1);
}

/* Dropdown Icon */
.nav__link-icon {
  width: 16px;
  height: 16px;
  transition: transform 0.2s;
}

.nav__item:hover .nav__link-icon {
  transform: rotate(180deg);
}

/* ===========================
   DROPDOWN MENU
   =========================== */

.nav__dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 200px;
  background-color: rgb(255, 255, 255);
  border: 1px solid rgb(217, 217, 217);
  border-radius: 0;
  box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1), 0 4px 6px rgba(0, 0, 0, 0.05);
  padding: 0.5rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s;
  z-index: 150;
}

.nav__item:hover .nav__dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav__dropdown-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav__dropdown-item {
  margin: 0;
}

.nav__dropdown-link {
  display: block;
  padding: 0.5rem 1rem;
  font-family: Manrope, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 0.875rem;
  color: rgb(90, 93, 91);
  text-decoration: none;
  border-radius: 0;
  transition: all 0.15s;
}

.nav__dropdown-link:hover {
  background-color: rgb(245, 245, 245);
  color: rgb(0, 1, 5);
}

/* ===========================
   MOBILE MENU TOGGLE
   =========================== */

.header__menu-toggle {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  gap: 0.375rem;
  padding: 0;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 210;
}

@media (min-width: 768px) {
  .header__menu-toggle {
    display: none;
  }
}

.header__menu-toggle span {
  display: block;
  width: 1.5rem;
  height: 0.125rem;
  background-color: rgb(0, 1, 5);
  transition: all 0.2s;
}

/* ===========================
   MOBILE NAVIGATION
   =========================== */

.nav-mobile {
  position: fixed;
  top: 4rem;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 200;
  background-color: rgb(255, 255, 255);
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform 0.2s;
}

.nav-mobile--active {
  transform: translateX(0);
}

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

.nav-mobile__list {
  display: flex;
  flex-direction: column;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-mobile__item {
  margin: 0;
}

.nav-mobile__link {
  display: block;
  padding: 1rem 1.5rem;
  font-family: Manrope, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 1.125rem;
  font-weight: 500;
  color: rgb(0, 1, 5);
  text-decoration: none;
  transition: all 0.2s;
}

.nav-mobile__link:hover,
.nav-mobile__link--active {
  background-color: rgb(245, 245, 245);
  color: rgb(0, 1, 5);
}

/* Mobile link as button (for dropdowns) */
.nav-mobile__link[data-dropdown-toggle] {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  cursor: pointer;
  font-family: Manrope, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Mobile Dropdown */
.nav-mobile__dropdown {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.nav-mobile__dropdown--active {
  max-height: 500px;
}

.nav-mobile__dropdown-list {
  list-style: none;
  margin: 0;
  padding: 0.5rem 0 0.5rem 1.5rem;
  background-color: rgb(245, 245, 245);
}

.nav-mobile__dropdown-item {
  margin: 0;
}

.nav-mobile__dropdown-link {
  display: block;
  padding: 0.5rem 1rem;
  font-family: Manrope, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 1rem;
  color: rgb(90, 93, 91);
  text-decoration: none;
  border-radius: 0;
  transition: all 0.15s;
}

.nav-mobile__dropdown-link:hover {
  background-color: rgb(255, 255, 255);
  color: rgb(0, 1, 5);
}

/* Mobile CTA */
.nav-mobile__cta {
  padding: 1.5rem;
  border-top: 1px solid rgb(217, 217, 217);
}

/* ===========================
   MEGA MENU
   =========================== */

.nav__mega-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-10px);
  width: 700px;
  background-color: rgb(255, 255, 255);
  border: 1px solid rgb(217, 217, 217);
  border-radius: 0;
  box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1), 0 4px 6px rgba(0, 0, 0, 0.05);
  padding: 2rem;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s;
  z-index: 150;
}

.nav__item--mega:hover .nav__mega-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.nav__mega-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

.nav__mega-left {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: 0 1.5rem 0 0;
}

.nav__mega-section {
  padding-bottom: 1rem;
}

.nav__mega-section:not(:last-child) {
  border-bottom: 1px solid rgb(217, 217, 217);
}

.nav__mega-link {
  display: block;
  text-decoration: none;
  transition: all 0.15s;
}

.nav__mega-link:hover .nav__mega-title {
  color: rgb(0, 1, 5);
}

.nav__mega-title {
  font-family: Manrope, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 1.125rem;
  font-weight: 600;
  color: rgb(0, 1, 5);
  margin: 0 0 0.25rem 0;
  transition: color 0.15s;
}

.nav__mega-tagline {
  font-family: Manrope, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 0.875rem;
  color: rgb(90, 93, 91);
  margin: 0;
  line-height: 1.5;
}

.nav__mega-right {
  background-color: rgb(245, 245, 245);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  margin: -2rem;
  margin-left: 0;
  padding-left: 2rem;
}

.nav__mega-featured {
  display: flex;
  flex-direction: column;
}

.nav__mega-featured .badge {
  align-self: flex-start;
  width: fit-content;
  margin-bottom: 0.5rem;
}

.nav__mega-featured .btn {
  align-self: flex-start;
  width: fit-content;
  display: inline-flex;
  align-items: center;
}

.nav__mega-featured-title {
  font-family: Manrope, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: rgb(0, 1, 5);
  margin: 0.5rem 0 0.25rem 0;
  line-height: 1.4;
}

.nav__mega-featured-date {
  font-family: Manrope, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 0.875rem;
  color: rgb(90, 93, 91);
  margin: 0 0 0.5rem 0;
}

.nav__mega-featured-desc {
  font-family: Manrope, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 0.875rem;
  color: rgb(90, 93, 91);
  margin: 0 0 1rem 0;
  line-height: 1.6;
}

/* ===========================
   HEADER CTA BUTTON
   =========================== */

.header__cta {
  margin-left: 1.5rem;
}

@media (max-width: 767px) {
  .header__cta {
    display: none;
  }
}
