/*
===========================================
MAFAR HEADER & NAVIGATION STYLES
Modern Design System
===========================================
*/

/* ===========================================
   SKIP LINK (Accessibility)
   =========================================== */

.mafar-skip-link {
  position: fixed;
  top: -100px;
  left: 20px;
  z-index: 10000;
  padding: 12px 20px;
  background: var(--mafar-dark);
  color: var(--mafar-white);
  text-decoration: none;
  font-weight: 600;
  border-radius: 8px;
  transition: top 0.3s ease;
}

.mafar-skip-link:focus {
  top: 20px;
  outline: 2px solid var(--mafar-gold);
  outline-offset: 2px;
}

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

.mafar-header {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: var(--font-primary);
}

.mafar-header.scrolled {
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 4px 16px rgba(0, 0, 0, 0.03);
  border-bottom-color: transparent;
}

/* ===========================================
   HEADER INNER CONTAINER
   =========================================== */

.mafar-header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 5%;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.mafar-header.scrolled .mafar-header-inner {
  height: 64px;
}

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

.mafar-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.mafar-logo img,
.mafar-logo .custom-logo {
  height: 48px;
  width: auto;
  display: block;
  transition: height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.mafar-header.scrolled .mafar-logo img,
.mafar-header.scrolled .mafar-logo .custom-logo {
  height: 38px;
}

.mafar-logo a {
  display: flex;
  align-items: center;
  text-decoration: none;
}

/* Logo Lockup (Icon + Text) */
.mafar-logo-lockup {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.mafar-logo-icon {
  height: 36px;
  width: auto;
  display: block;
  transition: height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.mafar-header.scrolled .mafar-logo-icon {
  height: 30px;
}

.mafar-logo-text {
  font-family: var(--font-primary);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 1.5px;
  color: var(--mafar-dark);
  text-transform: uppercase;
  white-space: nowrap;
  transition: font-size 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.mafar-header.scrolled .mafar-logo-text {
  font-size: 15px;
}

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

.mafar-desktop-nav {
  display: none;
}

@media (min-width: 1024px) {
  .mafar-desktop-nav {
    display: flex;
    align-items: center;
    gap: 6px;
  }
}

/* Navigation Menu */
.mafar-nav-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.mafar-nav-menu li {
  position: relative;
  margin: 0;
  padding: 0;
  list-style: none;
}

.mafar-nav-menu a {
  display: block;
  padding: 8px 16px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.25s ease;
}

.mafar-nav-menu a:hover {
  color: var(--mafar-dark);
  background: rgba(15, 23, 42, 0.04);
}

/* Active/Current Menu Item */
.mafar-nav-menu .current-menu-item > a,
.mafar-nav-menu .current_page_item > a {
  color: var(--mafar-dark);
  font-weight: 600;
  position: relative;
}

.mafar-nav-menu .current-menu-item > a::after,
.mafar-nav-menu .current_page_item > a::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 16px;
  right: 16px;
  height: 2px;
  background-color: var(--mafar-gold);
  border-radius: 1px;
}

/* ===========================================
   CTA BUTTON (Desktop)
   =========================================== */

.mafar-nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 12px;
  padding: 9px 22px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--mafar-dark);
  background: var(--mafar-gold);
  border-radius: 10px;
  text-decoration: none;
  transition: all 0.25s ease;
}

.mafar-nav-cta svg {
  width: 14px;
  height: 14px;
  transition: transform 0.25s ease;
}

.mafar-nav-cta:hover {
  background: var(--gold-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
}

.mafar-nav-cta:hover svg {
  transform: translateX(2px);
}

/* ===========================================
   MOBILE TOGGLE BUTTON
   =========================================== */

.mafar-mobile-toggle {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  position: relative;
  z-index: 1001;
}

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

.mafar-mobile-toggle .bar {
  display: block;
  width: 20px;
  height: 1.5px;
  background-color: var(--mafar-dark);
  border-radius: 2px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: absolute;
}

.mafar-mobile-toggle .bar:nth-child(1) {
  transform: translateY(-6px);
}

.mafar-mobile-toggle .bar:nth-child(2) {
  transform: translateY(0);
}

.mafar-mobile-toggle .bar:nth-child(3) {
  transform: translateY(6px);
}

/* Active State - X Icon */
.mafar-mobile-toggle.active .bar:nth-child(1) {
  transform: translateY(0) rotate(45deg);
}

.mafar-mobile-toggle.active .bar:nth-child(2) {
  opacity: 0;
}

.mafar-mobile-toggle.active .bar:nth-child(3) {
  transform: translateY(0) rotate(-45deg);
}

.mafar-mobile-toggle:focus {
  outline: 2px solid var(--mafar-gold);
  outline-offset: 4px;
  border-radius: 4px;
}

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

.mafar-mobile-nav {
  position: fixed;
  inset: 0;
  z-index: 999;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.mafar-mobile-nav.active {
  pointer-events: all;
  opacity: 1;
}

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

/* Backdrop */
.mafar-mobile-nav-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

/* Side Panel */
.mafar-mobile-nav-panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 320px;
  max-width: 85vw;
  background: var(--mafar-white);
  padding: 100px 32px 40px;
  overflow-y: auto;
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.1);
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

.mafar-mobile-nav-links {
  list-style: none;
  margin: 0;
  padding: 0;
}

.mafar-mobile-nav-links li {
  border-bottom: 1px solid var(--border-light);
  margin: 0;
  padding: 0;
  list-style: none;
}

.mafar-mobile-nav-links a {
  display: block;
  padding: 18px 0;
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--text-nav);
  text-decoration: none;
  transition: color 0.25s ease;
}

.mafar-mobile-nav-links a:hover,
.mafar-mobile-nav-links .current-menu-item > a,
.mafar-mobile-nav-links .current_page_item > a {
  color: var(--mafar-gold);
}

/* ===========================================
   MOBILE CTA BUTTON
   =========================================== */

.mafar-mobile-cta {
  display: block;
  width: 100%;
  margin-top: 24px;
  padding: 14px 24px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--mafar-dark);
  background: var(--mafar-gold);
  border-radius: 12px;
  text-align: center;
  text-decoration: none;
  transition: all 0.25s ease;
}

.mafar-mobile-cta:hover {
  background: var(--gold-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
}

/* ===========================================
   MOBILE CONTACT INFO
   =========================================== */

.mafar-mobile-contact {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border-light);
}

.mafar-mobile-contact-item {
  margin-bottom: 16px;
}

.mafar-mobile-contact-item:last-child {
  margin-bottom: 0;
}

.mafar-contact-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.mafar-contact-link {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--mafar-gold);
  text-decoration: none;
  transition: color 0.25s ease;
}

.mafar-contact-link:hover {
  color: var(--gold-hover);
}

/* ===========================================
   PREVENT BODY SCROLL WHEN MOBILE MENU OPEN
   =========================================== */

body.menu-open {
  overflow: hidden;
}

/* ===========================================
   RESPONSIVE ADJUSTMENTS
   =========================================== */

@media (max-width: 768px) {
  .mafar-header-inner {
    padding: 0 4%;
  }
  
  .mafar-logo img,
  .mafar-logo .custom-logo {
    height: 40px;
  }
  
  .mafar-header.scrolled .mafar-logo img,
  .mafar-header.scrolled .mafar-logo .custom-logo {
    height: 34px;
  }
  
  .mafar-logo-icon {
    height: 32px;
  }
  
  .mafar-header.scrolled .mafar-logo-icon {
    height: 28px;
  }
}

@media (max-width: 480px) {
  .mafar-mobile-nav-panel {
    padding: 90px 24px 32px;
  }
  
  .mafar-logo img,
  .mafar-logo .custom-logo {
    height: 36px;
  }
  
  .mafar-header.scrolled .mafar-logo img,
  .mafar-header.scrolled .mafar-logo .custom-logo {
    height: 30px;
  }
  
  .mafar-logo-icon {
    height: 30px;
  }
  
  .mafar-header.scrolled .mafar-logo-icon {
    height: 26px;
  }
}
