/* Shared Header Styles — fixed height, consistent across pages */
:root {
  --primary-blue: #2E4BFF;
  --accent-aqua: #00E8C3;
  --charcoal: #0F0F10;
  --muted-gray: #BFC2C7;
  --white: #FFFFFF;
  --max-width: 1200px;
  --header-height: 86px;
}

/* Scope all rules to the header */
header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: linear-gradient(180deg, rgba(15,15,16,0.75), rgba(15,15,16,0.5));
  backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(255,255,255,0.03);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Prevent overflow */
header, header * { box-sizing: border-box; }

/* Main header container */
header .container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 16px;
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  overflow: visible;
}

/* Brand and nav structure */
header .brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
header .brand img {
  height: 70px;
  max-width: 100%;
}

/* Nav layout */
header nav {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
header nav ul {
  display: flex;
  gap: 20px;
  list-style: none;
  align-items: center;
  margin: 0;
  padding: 0;
}

/* Nav links */
header nav a.navlink {
  font-weight: 600;
  color: var(--muted-gray);
  padding: 8px;
  border-radius: 8px;
  display: inline-block;
  line-height: 1;
  text-decoration: none;
  border-bottom: none;
  letter-spacing: 0.2px;
}
header nav a.navlink:hover,
header nav a.navlink:focus {
  color: var(--white);
  text-decoration: none;
  border-bottom: none;
}

/* Mobile menu button */
header .mobile-toggle {
  display: none;
  background: transparent;
  border: 0;
  color: var(--white);
  font-weight: 700;
  font-size: 16px;
  line-height: 1;
  padding: 10px 12px;
  border-radius: 8px;
  flex-shrink: 0;
  z-index: 1001;
}

/* Mobile dropdown (under header) */
@media (max-width: 880px) {
  header .mobile-toggle { display: inline-block; }
  header nav ul { display: none; }

  header nav ul.open {
    display: flex;
    position: fixed;
    z-index: 1000;
    left: 0;
    right: 0;
    top: var(--header-height);
    width: 100%;
    box-sizing: border-box;
    flex-direction: column;
    gap: 12px;
    padding: 12px 16px 16px;
    background: rgba(15,15,16,0.98);
    border-bottom: 1px solid rgba(255,255,255,0.06);
    max-height: 70vh;
    overflow-y: auto;
  }

  header .brand img { height: 56px; } /* shrink logo slightly */
}

/* Accessibility focus ring */
header a:focus,
header button:focus {
  box-shadow: 0 0 0 4px rgba(46,75,255,0.12);
  outline: none;
}

/* Prevent horizontal scroll globally */
html, body {
  max-width: 100%;
  overflow-x: hidden;
}

