/* rollconnect-nav.css | Version: 1.2.0 | Task 3.1: Add overlay styles | 2026-02-03 */
/* Roll Connect Navigation – Black + Neon Green Hamburger Menu */

:root {
  --color-bg: #0a0a0a;
  --color-text: #e0e0e0;
  --color-green: #00ff9d;
  --color-green-dark: #00cc7a;
  --color-border: #1a1a1a;
  --transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ─── REMOVED: Task 2.4 — Duplicate universal reset ───────────────
   Already declared in main.css. Keeping one source of truth.

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
   ─────────────────────────────────────────────────────────────────── */

/* ─── REMOVED: Task 2.4 — Global body override ────────────────────
   This set the entire page to dark background (#0a0a0a) and changed
   the font, overriding main.css body styles. The nav header already
   has its own dark background via .site-header.

body {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: system-ui, -apple-system, sans-serif;
  line-height: 1.6;
}
   ─────────────────────────────────────────────────────────────────── */

/* Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(10, 10, 10, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border);
}

/* Task 2.4: SCOPED from bare .container → .site-header .container
   The bare .container rule was setting display:flex and height:80px
   on EVERY Bootstrap .container across the entire site. */
.site-header .container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 80px;
}

/* Logo */
.logo {
  font-size: 1.8rem;
  font-weight: 800;
  color: white;
  text-decoration: none;
}

.logo span {
  color: var(--color-green);
}

/* Login icon (always visible) */
.login-icon {
  color: white;
  font-size: 1.8rem;
  text-decoration: none;
  margin-right: 16px;
}

.login-icon:hover {
  color: var(--color-green);
}

/* Hamburger */
.menu-toggle {
  background: none;
  border: none;
  cursor: pointer;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1100;
}

.hamburger {
  width: 28px;
  height: 20px;
  position: relative;
}

.hamburger span {
  position: absolute;
  width: 100%;
  height: 3px;
  background: white;
  border-radius: 2px;
  left: 0;
  transition: var(--transition);
}

.hamburger span:nth-child(1) { top: 0;    }
.hamburger span:nth-child(2) { top: 8px;  }
.hamburger span:nth-child(3) { top: 16px; }

/* Hamburger → X animation */
.menu-toggle[aria-expanded="true"] .hamburger span:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}
.menu-toggle[aria-expanded="true"] .hamburger span:nth-child(2) {
  opacity: 0;
}
.menu-toggle[aria-expanded="true"] .hamburger span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
}

/* ── Overlay / Backdrop (Task 3.1) ─────────────────────────────── */
/* Sits behind the slide-in menu (z-index 999) and below the       */
/* header bar (z-index 1000). Darkens the page content when the    */
/* menu is open. Clicking the overlay closes the menu.             */
.menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
  z-index: 998;
}

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

/* Slide-in menu */
.mobile-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 100%;
  max-width: 380px;
  height: 100vh;
  background: var(--color-bg);
  color: white;
  transition: right 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 999;
  overflow-y: auto;
}

.mobile-menu.active {
  right: 0;
}

/* Menu header (logo + close) */
.menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 32px;
  border-bottom: 1px solid var(--color-border);
}

.menu-close {
  background: none;
  border: none;
  color: white;
  font-size: 2.2rem;
  cursor: pointer;
}

/* Menu items */
.menu-list {
  list-style: none;
  padding: 20px 0;
}

/* Optional: tighten the spacing between items a tiny bit more */
.menu-list li {
  border-bottom: 1px solid var(--color-border);
  margin: 0;                      /* already 0, just confirming */
}

/* Main menu items */
.menu-list a {
  display: block;
  padding: 14px 32px;          /* was 18px → now 14px top/bottom = ~78% height */
  color: var(--color-text);
  text-decoration: none;
  font-size: 1.05rem;          /* was 1.15rem → ~91% */
  font-weight: 500;
  transition: var(--transition);
}

.menu-list a:hover,
.menu-list a:focus {
  color: var(--color-green);
  background: rgba(0, 255, 157, 0.08);
}

/* Submenus */
.has-submenu > a {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.submenu {
  list-style: none;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease-out;
  background: rgba(0, 255, 157, 0.05);
}

.submenu.active {
  max-height: 700px; /* enough for all your current items */
}

/* Submenu items – make them feel proportional */
.submenu a {
  padding: 12px 32px 12px 64px;   /* was 14px → now 12px top/bottom */
  font-size: 0.98rem;             /* slightly smaller than main items */
  color: #ccc;
}

.submenu a:hover {
  color: var(--color-green);
}

/* Special styling */
.highlight {
  color: var(--color-green) !important;
  font-weight: 700;
}

.btn-login {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 32px;
  padding: 14px 28px;
  background: var(--color-green);
  color: #000;
  font-weight: 700;
  border-radius: 50px;
  text-decoration: none;
  transition: var(--transition);
}

.hamburger {
  width: 32px;  /* a bit wider for arrow room */
  height: 22px;
}

.hamburger span:nth-child(3) {
  top: 18px;
  width: 70%;             /* shorter bottom line */
  transform-origin: left center;
}

.menu-toggle[aria-expanded="false"] .hamburger span:nth-child(3)::after {
  content: '▼';
  position: absolute;
  left: 100%;
  top: -4px;
  font-size: 0.9rem;
  color: white;
  margin-left: 4px;
}
