/*
 * Header Styles
 * NYT-style header navigation and mobile menu
 */

/* ===== NYT HEADER STYLES ===== */

.nyt-header {
  background-color: var(--bg-primary);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(10px);
}

.nyt-header-container {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0.75rem 1rem;
  max-width: 100%;
  margin: 0 auto;
  min-height: 60px;
}

/* Header Left Section */
.header-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nyt-menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 50%;
  transition: var(--transition);
}

.nyt-menu-toggle:hover {
  background-color: var(--bg-secondary);
}

.nyt-menu-toggle .material-symbols-outlined {
  font-size: 1.5rem;
}

.nyt-site-logo {
  font-family: var(--font-headline);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.nyt-site-logo a {
  color: inherit;
  text-decoration: none;
}

.nyt-site-logo img {
  max-height: 40px;
  width: auto;
}

/* Center Navigation */
.nyt-main-navigation {
  justify-self: center;
}

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

.nyt-nav-menu a {
  font-family: var(--font-ui);
  color: var(--text-primary);
  font-weight: 500;
  font-size: 0.875rem;
  text-decoration: none;
  padding: 0.75rem 0;
  border-bottom: 2px solid transparent;
  transition: var(--transition);
  text-transform: capitalize;
}

.nyt-nav-menu a:hover,
.nyt-nav-menu .current-menu-item a {
  color: var(--text-primary);
  border-bottom-color: var(--text-primary);
}

/* Header Right Section */
.header-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  justify-self: end;
}

.nyt-search-toggle,
.nyt-theme-toggle {
  background: none;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 50%;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.nyt-search-toggle:hover,
.nyt-theme-toggle:hover {
  background-color: var(--bg-secondary);
}

.nyt-search-toggle .material-symbols-outlined,
.nyt-theme-toggle .material-symbols-outlined {
  font-size: 1.25rem;
}

/* Theme Toggle Icons */
.nyt-theme-toggle {
  position: relative;
}

.theme-icon {
  display: none;
  transition: var(--transition);
}

.nyt-theme-toggle[data-theme="light"] .theme-light,
.nyt-theme-toggle[data-theme="dark"] .theme-dark,
.nyt-theme-toggle[data-theme="auto"] .theme-auto {
  display: block;
}

/* Subscribe Button */
.nyt-subscribe-btn {
  font-family: var(--font-ui);
  background-color: var(--text-primary);
  color: var(--bg-primary);
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  font-size: 0.875rem;
  font-weight: 600;
  transition: var(--transition);
  white-space: nowrap;
}

.nyt-subscribe-btn:hover {
  background-color: var(--text-secondary);
  color: var(--bg-primary);
}

/* Mobile Navigation Overlay */
.nyt-mobile-nav-overlay {
  position: fixed;
  top: 60px;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--bg-primary);
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  z-index: 999;
  overflow-y: auto;
}

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

.nyt-mobile-nav {
  padding: 2rem 1rem;
}

.nyt-mobile-menu {
  list-style: none;
  margin: 0;
  padding: 0;
}

.nyt-mobile-menu li {
  border-bottom: 1px solid var(--border-color);
}

.nyt-mobile-menu a {
  font-family: var(--font-ui);
  display: block;
  color: var(--text-primary);
  text-decoration: none;
  padding: 1rem 0;
  font-size: 1.125rem;
  font-weight: 500;
  transition: var(--transition);
}

.nyt-mobile-menu a:hover,
.nyt-mobile-menu .current-menu-item a {
  color: var(--accent-color);
}

/* NYT Header Mobile Responsive Styles */
@media (max-width: 768px) {
  .nyt-header-container {
    grid-template-columns: auto 1fr auto;
    padding: 0.5rem 1rem;
    gap: 1rem;
  }
  
  .nyt-menu-toggle {
    display: flex;
  }
  
  .nyt-main-navigation {
    display: none;
  }
  
  .nyt-site-logo {
    font-size: 1.5rem;
    justify-self: start;
  }
  
  .header-right {
    gap: 0.5rem;
  }
  
  .nyt-subscribe-btn {
    display: none;
  }
}
