/* ========================================
   HEADER STYLES
   Based on TSM Design System v1.0
   ======================================== */

/* ----------------------------------------
   Site Header
   ---------------------------------------- */
.site-header {
  background: var(--color-white, #FFFFFF);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  top: 0;
  z-index: 1000;
  width: 1200px;
  margin: 12px auto 0px;
  padding: 3px 0px;
  border-radius: 40px;
  transition: all 0.3s ease;
}

/* Sticky state (scrolled) */
.site-header.scrolled {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Header Inner Container */
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
/*   padding: 16px 0; */
  gap: 40px;
}

/* ----------------------------------------
   Logo
   ---------------------------------------- */
.site-logo {
  flex-shrink: 0;
  line-height: 0;
}

.site-logo a {
  display: inline-block;
  line-height: 0;
  transition: opacity 0.2s ease;
}

.site-logo a:hover {
  opacity: 0.8;
}

.site-logo .logo {
  height: 32px;
  width: auto;
  display: block;
}

/* ----------------------------------------
   Main Navigation
   ---------------------------------------- */
.main-nav {
  display: flex;
  align-items: center;
  gap: 32px;
  flex: 1;
  justify-content: center;
}

.nav-link {
  font-size: 16px;
  font-weight: 500;
  color: var(--color-text-heading, #222222);
  text-decoration: none;
  position: relative;
  transition: color 0.2s ease;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-link:hover {
  color: var(--color-brand-primary, #FF3B85);
}

/* Active link indicator */
.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--color-brand-primary, #FF3B85);
}

/* ----------------------------------------
   Dropdown Menu
   ---------------------------------------- */
.nav-dropdown {
  position: relative;
}

.dropdown-toggle {
  cursor: pointer;
}

.dropdown-icon {
  transition: transform 0.2s ease;
  margin-left: 4px;
}

.nav-dropdown:hover .dropdown-icon {
  transform: rotate(180deg);
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 16px);
  left: 50%;
  transform: translateX(-50%);
  background: white;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  padding: 8px;
  min-width: 220px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 100;
}

.nav-dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  top: calc(100% + 8px);
}

.dropdown-menu a {
  display: block;
  padding: 12px 16px;
  font-size: 15px;
  font-weight: 500;
  color: var(--color-text-heading, #222222);
  text-decoration: none;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.dropdown-menu a:hover {
  background: var(--color-light-gray, #FAFAFA);
  color: var(--color-brand-primary, #FF3B85);
  transform: translateX(4px);
}

/* ----------------------------------------
   Header Actions (Right Side)
   ---------------------------------------- */
.header-actions {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-shrink: 0;
}

.header-link {
  font-size: 16px;
  font-weight: 500;
  color: var(--color-text-body, #555555);
  text-decoration: none;
  transition: color 0.2s ease;
  white-space: nowrap;
}

.header-link:hover {
  color: var(--color-brand-primary, #FF3B85);
}

/* ----------------------------------------
   Primary Button (Phone)
   ---------------------------------------- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--color-brand-primary, #FF3B85);
  color: white;
  font-size: 16px;
  font-weight: 600;
  padding: 8px 20px;
  border-radius: 40px;
  text-decoration: none;
  transition: all 0.2s ease;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(255, 59, 133, 0.25);
}

.btn-primary:hover {
  background: var(--color-brand-primary-dark, #E22870);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 59, 133, 0.35);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(255, 59, 133, 0.25);
}

/* ----------------------------------------
   Mobile Menu Toggle (Hidden on Desktop)
   ---------------------------------------- */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 28px;
  height: 20px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1001;
}

.hamburger-line {
  width: 100%;
  height: 3px;
  background: var(--color-text-heading, #222222);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.mobile-menu-toggle[aria-expanded="true"] .hamburger-line:nth-child(1) {
  transform: translateY(8.5px) rotate(45deg);
}

.mobile-menu-toggle[aria-expanded="true"] .hamburger-line:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle[aria-expanded="true"] .hamburger-line:nth-child(3) {
  transform: translateY(-8.5px) rotate(-45deg);
}

/* ----------------------------------------
   Mobile Navigation Overlay
   ---------------------------------------- */
.mobile-nav-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.mobile-nav-overlay.active {
  opacity: 1;
  visibility: visible;
}

.mobile-nav-content {
  position: absolute;
  top: 0;
  right: 0;
  width: 320px;
  max-width: 85vw;
  height: 100%;
  background: white;
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.15);
  transform: translateX(100%);
  transition: transform 0.3s ease;
  overflow-y: auto;
  padding: 80px 24px 24px;
}

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

.mobile-nav-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mobile-nav-close svg {
  color: var(--color-text-heading, #222222);
}



/* ----------------------------------------
   Mobile Navigation Links
   ---------------------------------------- */
.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mobile-nav a {
  padding: 16px;
  font-size: 18px;
  font-weight: 500;
  color: var(--color-text-heading, #222222);
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.mobile-nav a:hover {
  background: var(--color-light-gray, #FAFAFA);
  color: var(--color-brand-primary, #FF3B85);
}

.mobile-nav-divider {
  height: 1px;
  background: var(--color-light-gray, #E6E6E6);
  margin: 16px 0;
}

.mobile-phone {
  background: var(--color-brand-primary, #FF3B85);
  color: white !important;
  font-weight: 600;
  margin-top: 8px;
}

/* Mobile Dropdown Styles */
.mobile-nav-dropdown {
  display: flex;
  flex-direction: column;
}

.mobile-dropdown-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.mobile-dropdown-link {
  flex: 1;
  padding: 16px;
  font-size: 18px;
  font-weight: 500;
  color: var(--color-text-heading, #222222);
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.mobile-dropdown-link:hover {
  background: var(--color-light-gray, #FAFAFA);
  color: var(--color-brand-primary, #FF3B85);
}

.mobile-dropdown-icon-btn {
  background: none;
  border: none;
  padding: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.mobile-dropdown-icon-btn:hover {
  background: var(--color-light-gray, #FAFAFA);
}

.mobile-dropdown-icon {
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

.mobile-nav-dropdown.active .mobile-dropdown-icon {
  transform: rotate(180deg);
}

.mobile-dropdown-menu {
  display: none;
  flex-direction: column;
  padding-left: 16px;
  gap: 0;
}

.mobile-nav-dropdown.active .mobile-dropdown-menu {
  display: flex;
}

.mobile-dropdown-menu a {
  padding: 12px 16px;
  font-size: 16px;
  font-weight: 400;
  color: var(--color-text-body, #555555);
  text-decoration: none;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.mobile-dropdown-menu a:hover {
  background: var(--color-light-gray, #FAFAFA);
  color: var(--color-brand-primary, #FF3B85);
  padding-left: 20px;
}

/* ----------------------------------------
   Responsive Breakpoints
   ---------------------------------------- */

/* Tablet (≤1024px) */
@media (max-width: 1024px) {
  .site-header {
    width: 100%;
  }
  .header-inner {
    gap: 24px;
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .main-nav {
    gap: 24px;
  }
  
  .header-actions {
    gap: 16px;
  }
}
/* Mobile (≤768px) */
@media (max-width: 768px) {
  .site-header {
    width: 100%;
  }
  .header-inner {
    padding: 12px 0;
    justify-content: space-between;
  }
  
  /* Hide desktop navigation */
  .main-nav,
  .header-actions {
    display: none;
  }
  
  /* Show mobile menu toggle */
  .mobile-menu-toggle {
    display: flex;
  }
  
  .site-logo .logo {
    height: 40px;
  }
}

/* Small Mobile (≤480px) */
@media (max-width: 480px) {
  .site-header {
    width: 100%;
  }
  .mobile-nav-content {
    width: 100%;
    max-width: 100%;
  }
}

/* ----------------------------------------
   Accessibility & Focus States
   ---------------------------------------- */
.nav-link:focus,
.header-link:focus,
.btn-primary:focus,
.mobile-menu-toggle:focus {
  outline: 2px solid var(--color-brand-primary, #FF3B85);
  outline-offset: 2px;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  .site-header,
  .nav-link,
  .dropdown-menu,
  .btn-primary,
  .mobile-menu-toggle,
  .mobile-nav-overlay,
  .mobile-nav-content {
    transition: none;
  }
}