/* nav-style.css — AHAVAECHAD Unified Navigation v1
 * Consistent header/nav across all pages.
 * Uses ae- prefix to avoid conflicts with existing .header styles.
 */

/* ===== Header Bar ===== */
.ae-header {
  direction: ltr;
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(250, 250, 250, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, box-shadow 0.3s;
  height: 72px;
}
.ae-header.scrolled {
  border-bottom-color: #e5e7eb;
  box-shadow: 0 1px 12px rgba(0,0,0,0.04);
}

/* Global bar offset */
body.has-global-bar .ae-header { top: 32px; }
body.has-global-bar.global-bar-collapsed .ae-header { top: 0; }

.ae-header__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ===== Logo ===== */
.ae-header__logo {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.5rem;
  font-weight: 900;
  color: #1a1a1a;
  text-decoration: none;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}
.ae-header__logo span { color: #e91e8c; }

/* ===== Nav Links ===== */
.ae-header__nav {
  display: flex;
  gap: 1rem;
  align-items: center;
}
.ae-header__nav a {
  color: #6b7280;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  transition: color 0.2s;
  white-space: nowrap;
}
.ae-header__nav a:hover,
.ae-header__nav a.active {
  color: #1a1a1a;
}
/* Apps link — lime accent */
.ae-header__nav a.nav-apps {
  color: #7fff00;
  font-weight: 700;
}
.ae-header__nav a.nav-apps:hover {
  color: #5fdf00;
}

/* ===== CTA Button ===== */
.ae-header__cta {
  background: #7fff00;
  color: #1a1a1a;
  padding: 0.5rem 1.25rem;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: 0.05em;
  transition: background 0.2s, color 0.2s;
  border: 2px solid #7fff00;
  flex-shrink: 0;
}
.ae-header__cta:hover {
  background: #1a1a1a;
  color: #7fff00;
}

/* ===== Hamburger Menu Button ===== */
.ae-header__menu-btn {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  border: 1.5px solid #1a1a1a;
  border-radius: 6px;
  padding: 6px 10px;
  background: transparent;
  cursor: pointer;
}
.ae-header__menu-label {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.45rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #1a1a1a;
  line-height: 1;
  margin-bottom: 2px;
}
.ae-header__menu-btn span:not(.ae-header__menu-label) {
  display: block;
  width: 18px;
  height: 2px;
  background: #1a1a1a;
  border-radius: 1px;
}

/* ===== Mobile Nav Overlay ===== */
.ae-mobile-nav {
  direction: ltr;
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 15, 0.97);
  z-index: 10001;
  padding: 1.5rem;
  overflow-y: auto;
  filter: none !important;
}
.ae-mobile-nav.open { display: block; }

.ae-mobile-nav__close {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  font-size: 2rem;
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  text-shadow: 0 1px 3px rgba(0,0,0,0.9);
}

.ae-mobile-nav__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  max-width: 360px;
  margin: 4rem auto 0;
  text-align: center;
}
.ae-mobile-nav__grid a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-shadow: 0 1px 3px rgba(0,0,0,0.9), 0 0 8px rgba(0,0,0,0.7);
}
.ae-mobile-nav__icon {
  font-size: 2rem;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.05);
  border-radius: 14px;
}

/* ===== Page Title (uniform across all pages) ===== */
.ae-page-title {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 2rem 1rem;
  text-align: center;
}
.ae-page-title h1 {
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 900;
  color: #1a1a1a;
  margin: 0;
}
.ae-page-title .subtitle {
  color: #6b7280;
  font-size: 1.1rem;
  margin-top: 0.5rem;
}

/* ===== Dark Mode ===== */
body.dark .ae-header,
[data-theme="dark"] .ae-header {
  background: rgba(26, 26, 26, 0.95);
  border-bottom-color: #333;
}
body.dark .ae-header__logo,
[data-theme="dark"] .ae-header__logo {
  color: #fafafa;
}
body.dark .ae-header__nav a,
[data-theme="dark"] .ae-header__nav a {
  color: #9ca3af;
}
body.dark .ae-header__nav a:hover,
body.dark .ae-header__nav a.active,
[data-theme="dark"] .ae-header__nav a:hover,
[data-theme="dark"] .ae-header__nav a.active {
  color: #fafafa;
}
body.dark .ae-header__cta,
[data-theme="dark"] .ae-header__cta {
  background: #7fff00;
  color: #1a1a1a;
}
body.dark .ae-page-title h1,
[data-theme="dark"] .ae-page-title h1 {
  color: #fafafa;
}

/* ===== Responsive ===== */
@media (max-width: 960px) {
  .ae-header__nav { gap: 0.6rem; }
  .ae-header__nav a { font-size: 0.78rem; }
}

@media (max-width: 768px) {
  body.has-global-bar .ae-header { top: 28px; }
  body.has-global-bar.global-bar-collapsed .ae-header { top: 0; }
  .ae-header__nav,
  .ae-header__cta { display: none; }
  .ae-header__menu-btn { display: flex; }
}

/* ===== Hide old header elements (from inject-layout) ===== */
/* In case any pages still have old .header markup alongside nav.js */
#navbar ~ .header,
#navbar ~ .mobile-nav { display: none !important; }
