/* =========================================================
   nav.css (REWRITTEN)
   - Utility top bar
   - Sticky main nav
   - New structure:
     .topbar-center -> (.nav-links + .topbar-btn)
     .topbar-right  -> (.topbar-btn + .topbar-menu)
   - Mobile rule (<=767px):
     show button in center, hide right button, show menu only
========================================================= */

/* ---------------------------------------------------------
   ROOT VARIABLES & LAYOUT SYSTEM
--------------------------------------------------------- */
:root {
  --links: #b7b3c9;
  --fade: rgba(255, 255, 255, 0.04);
  --fade-strong: rgba(255, 255, 255, 0.08);
  --header: rgba(7, 3, 15, 0.6);
  --panel: rgba(255, 255, 255, 0.04);
  --panel-strong: rgba(255, 255, 255, 0.08);
  --border: rgba(0, 0, 0, 0.368);
  --text: #e8e6f3;
  --muted: #858390;
  --accent: #b86bff;
  --accent-strong: #d6a8ff;
  --white: rgba(255, 255, 255, 0.98);
  --black: #000000;
  --success: #15803d;
	--error: #dc2626;
	--info: #2563eb;
  --menu: #ffffff;
  --shadow: 0 20px 70px rgba(0, 0, 0, 0.35);
  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 24px;
  --max: 1400px;
  --maxnav: 1350px;
  --btn: #2b9f21;
  --white: #ffffff;
  --black: #0b0b0c;
  --grey: #6b7280;
  --darkgrey: #3c4148;

  --green: #00cd33;
  --greener: #0a7e27;
  --blue: #1d64fd;
  --bluer: #211bd5;
  --primary: #0612ba;
  --slider: #230b35;
  --util: #0c1122e9; 

  --border: rgba(17, 24, 39, 0.16);
  --shadow: 0 14px 30px rgba(0,0,0,0.15);

  /* Container system */
  --container-min: 320px;
  --container-max: 1400px;

  --content-max: 1180px;
  --container-padding: auto;

  /* Heights */
  --nav-h: 104px;
  --util-h: 36px;

  /* Spacing */
  --nav-gap: clamp(18px, 3vw, 34px);
}

/* ---------------------------------------------------------
   BASE
--------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI",
               "Roboto", "Inter", sans-serif;
  color: var(--black);
}

.page {
  position: relative;
  overflow-x: hidden;
}

/* Accessibility */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: #000;
  color: #fff;
  padding: 8px 12px;
  z-index: 1000;
  text-decoration: none;
  border-radius: 4px;
}
.skip-link:focus { top: 10px; }


.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}


/* remove default nav link styles */
.topbar a,
.topbar a:visited,
.topbar-utility a,
.topbar-utility a:visited {
  color: inherit;
  text-decoration: none;
}

/* ---------------------------------------------------------
   TOP UTILITY BAR
--------------------------------------------------------- */
.topbar-utility {
  position: relative;
  width: 100%;
  min-width: var(--container-min);
  background: #0a0b22;
  color: rgba(255,255,255,0.88);
  font-size: 12px;
  font-weight: 650;
}

.topbar-utility-inner {
  width: 1350px;
  min-width: var(--container-min);
  min-height: var(--util-h);

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

.utility-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.utility-right {
  display: flex;
  align-items: center;
  gap: 24px;
}

.utility-mid {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Optional: make SVG social icons align nicely */
.social-icon {
  display: inline-flex;
  width: 22px;
  height: 22px;
  align-items: center;
  justify-content: center;
  opacity: 0.92;
}
.social-icon svg {
  width: 18px;
  height: 18px;
  fill: rgba(255,255,255,0.88);
}
.social-icon:hover { opacity: 1; }

/* ---------------------------------------------------------
   MAIN NAV (STICKY)
--------------------------------------------------------- */
/* =========================
   Navigation Styles
   ========================= */
/* Base *


/* Navigation Container */
.navigation {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(12px);
  background: rgba(7, 3, 15, 0.6);
  border-bottom: 1px solid var(--border);
}

/* =========================
   Top Navigation Bar
   ========================= */

.topbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(12px);
  background: rgb(255, 255, 255);
  width: 100%;
  margin: 0;
  border-radius: 0;
  left: 0;
}


.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 0px;
  max-width: var(--maxnav);
  margin: 0 auto;
  border-bottom: 1px solid var(--border);
}

/* Left cluster */
.topbar-left {
  display: flex;
  align-items: center;
  padding-left: 0;
}

.topbar-left .chat-btn {
  display: none;
}

/* Middle cluster */
.topbar-center {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
}

.topbar-center a {
  padding-top: 10px;
  border-radius: 11px;
  border: 1px solid transparent;
  background: #dcdcdc0d;
  color: var(--black);
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

.topbar-center a:hover {
  background: rgba(184, 107, 255, 0.12);
  border-color: rgba(184, 107, 255, 0.242);
  color: var(--accent-strong);
  transform: translateY(-1px);
}

.topbar-center a:active {
  transform: translateY(0);
}

/* Right cluster */
.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-left: 0;
}

/* Navigation */
.topbar-nav {
  display: flex;
  align-items: center;
  gap: 16px;
}

.topbar-link {
  padding: 10px 14px;
  border-radius: 11px;
  border: 1px solid transparent;
  background: #dcdcdc0d;
  color: var(--black);
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

.topbar-link:hover {
  background: rgba(184, 107, 255, 0.12);
  border-color: rgba(184, 107, 255, 0.242);
  color: var(--accent-strong);
  transform: translateY(-1px);
}

.topbar-link:active {
  transform: translateY(0);
}

.topbar-right-top-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar-right-top {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar-right-bottom {
  font-size: 13px;
  color: var(--muted);
  text-align: right;
}

/* Auth User Section */
.auth-user-section {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  font-size: 13px;
}

.auth-user-name {
  font-weight: 600;
  color: var(--text);
  font-size: 14px;
}

.auth-user-headline {
  color: var(--muted);
  font-size: 12px;
}

.auth-user-location {
  color: var(--muted);
  font-size: 12px;
}


.website-logo {
  display: flex;
  align-items: center;  
  width: auto;
  height: 60px;
  margin-bottom: 4px;
  border-radius: 12px;
  background: transparent;
  padding: 0px;
  filter: brightness(1.15) drop-shadow(0 4px 12px rgba(0, 0, 0, 0.15));
  transition: all 0.3s ease;
}

.website-logo:hover {
  filter: brightness(1.25) drop-shadow(0 6px 16px rgba(0, 0, 0, 0.2));
}

.website-title {
  font-size: 1.9rem;
  font-weight: 750;
  color: var(--accent-strong);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}


/* =========================
   Buttons
   ========================= */
.btn {
  min-height: 44px;
  padding: 0.55rem 0.9rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--panel-strong);
  color: var(--white);
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.btn:hover {
  background: var(--panel);
  border-color: var(--accent);
}

.btn:focus-visible {
  outline: 3px solid rgba(184, 107, 255, 0.35);
  outline-offset: 2px;
}

.btn-primary {
  padding: 10px 20px;
  border-radius: 18px;
  border: 1px solid var(--accent);
  background: var(--btn);
  color: var(--text);
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.1s ease;
}

.btn-primary:hover {
  background: var(--accent-strong);
  transform: translateY(-1px);
}

.btn-primary:focus-visible {
  outline: 3px solid rgba(184, 107, 255, 0.5);
  outline-offset: 2px;
}

.btn-secondary {
  padding: 12px 24px;
  border-radius: 30px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.btn-secondary:hover {
  background: var(--panel);
  border-color: var(--accent);
}

.btn-secondary:focus-visible {
  outline: 3px solid rgba(184, 107, 255, 0.5);
  outline-offset: 2px;
}

.btn-nav {
  padding: 6px 24px;
  border-radius: 12px;
  background: var(--btn);
  border: solid 1px var(--muted);
  color: #ffffff;
  font-weight: 650;
  font-size: 13px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, transform 0.15s ease;
}

.btn-nav:hover {
  background: #0a7e27;
  transform: translateY(-1px);
}

.btn-nav:active {
  transform: translateY(0);
}

/* =========================
   Menu
   ========================= */

.menu-btn {
  font-size: 16px;
  height: 40px;
  padding: 0 16px;
  background: rgb(255, 255, 255);
  border: 1px solid rgba(0, 0, 0, 0.304);
  color: var(--black);
  cursor: pointer;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: box-shadow 0.2s ease, transform 0.05s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.menu-btn:hover {
  box-shadow: 0 6px 14px rgba(184, 107, 255, 0.3);
  background: rgba(184, 107, 255, 0.14);
  border-color: rgba(184, 107, 255, 0.45);
  color: var(--accent-strong);
}

.menu-btn:active {
  transform: scale(0.97);
}

.menu-btn:focus-visible {
  outline: 3px solid rgba(48, 25, 218, 0.748);
  outline-offset: 2px;
}

/* Desktop: Show text, hide icon-only */
.menu-icon-desktop {
  display: inline;
}

.menu-icon-mobile {
  display: none;
}

.menu-btn-mobile {
  display: flex;
  cursor: pointer;
  z-index: 1000;
}

.menu-icon span {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--text);
  color: var(--black);
  border-radius: 999px;
}

.menu-icon span:nth-child(1) { top: 0; }
.menu-icon span:nth-child(2) { top: 5px; }
.menu-icon span:nth-child(3) { top: 10px; }


/* Drawer Overlay */
.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.04);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 999;
}

/* Drawer (Left Menu) */
.drawer {
  position: fixed;
  top: 0;
  left: 0;
  width: min(320px, 86vw);
  height: 100%;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(195, 204, 208, 0.98) 100%);
  border-right: 1px solid var(--border);
  box-shadow: var(--shadow);
  transform: translateX(-103%);
  transition: transform 0.25s ease;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  backdrop-filter: blur(12px);
}

/* Mobile: Drawer opens from right */
@media (max-width: 900px) {
  .drawer {
    left: auto;
    right: 0;
    border-right: none;
    border-left: 1px solid var(--border);
    transform: translateX(103%);
  }

  body.drawer-open .drawer {
    transform: translateX(0);
  }
}

/* Drawer Header */
.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
}

.drawer-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--black);
  display: flex;
  gap: 10px;
  max-height: 24px;
  align-items: center;
  justify-content: center;
  margin-left: 4px;
}

.drawer-close {
  width: 40px;
  height: 40px;
  font-weight: 900;
  font-size: 16px;
  border-radius: 12px;
  border: 1px solid var(--grey);
  background: var(--white);
  color: var(--error);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.drawer-close:hover {
  background: var(--panel-strong);
  color: var(--accent-strong);
}

.drawer-close:focus-visible {
  outline: 6px solid rgb(83, 0, 0);
  outline-offset: 2px;
}

/* Drawer Body */
.drawer-body {
  padding: 14px;
  overflow-y: auto;
}

/* Navigation Links */
.drawer-nav {
  display: grid;
  gap: 8px;
}

.drawer-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--black);
  font-weight: 650;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.1s ease;
}

.drawer-link:hover {
  background: var(--panel-strong);
  border-color: var(--accent);
  color: var(--accent-strong);
  transform: translateX(4px);
}

.drawer-link:focus-visible {
  outline: 3px solid rgba(184, 107, 255, 0.35);
  outline-offset: 2px;
}

.drawer-link.active {
  background: rgba(184, 107, 255, 0.15);
  border-color: var(--accent);
  color: var(--accent-strong);
}

/* Drawer CTA */
.drawer-cta {
  margin-top: 16px;
  padding: 14px;
  border-radius: var(--radius);
  background: var(--fade);
  border: 1px solid var(--border);
}

.drawer-cta p {
  margin: 0 0 10px;
  font-size: 0.95rem;
  color: var(--black);
}

/* Open State */
body.drawer-open {
  overflow: hidden;
}

body.drawer-open .drawer-overlay {
  opacity: 1;
  pointer-events: auto;
}

/* Open State - Desktop */
body.drawer-open .drawer {
  transform: translateX(0);
}


/* Chat button */
.chat-btn {
  font-size: 18px;
  width: 40px;
  height: 40px;
  background: var(--accent);
  border: none;
  color: var(--text);
  cursor: pointer;
  border-radius: 12px;
  border: 1px solid var(--border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: box-shadow 0.2s ease, transform 0.05s ease, background 0.2s ease;
  text-decoration: none;
}

.chat-btn:hover {
  box-shadow: 0 6px 14px rgba(184, 107, 255, 0.4);
  background: var(--accent-strong);
  transform: translateY(-2px);
}

.chat-btn:active {
  transform: scale(0.97);
}

/* Right cluster */
.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Profile dropdown container */
.profile-dropdown {
  position: relative;
}

/* Profile button */
.profile-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--muted);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  object-fit: cover;
  background: transparent;
  padding: 0;
  overflow: hidden;
  color: var(--text);
}

.profile-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(184, 107, 255, 0.4);
}

/* Dropdown menu */
.profile-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: rgba(26, 18, 46, 0.98);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  min-width: 200px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  z-index: 1000;
  overflow: hidden;
}

.profile-menu.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.profile-menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: var(--text);
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  font-size: 14px;
  font-weight: 500;
}

.profile-menu-item i {
  width: 20px;
  font-size: 16px;
  color: var(--accent);
}

.profile-menu-item:hover {
  background: var(--panel);
  color: var(--accent-strong);
}

.profile-menu-divider {
  height: 1px;
  background: var(--border);
  margin: 4px 0;
}

/* Footer */
.footer {
  padding: 24px 0;
  background: rgb(255, 255, 255);
  border-top: 1px solid var(--border);
  width: 100%;
  text-align: center;
}

.footer__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.footer__logo {
  width: auto;
  height: 40px;
}

.footer__note {
  margin: 0;
  color: var(--black);
  font-weight: 600;
  font-size: 14px;
}

.footer__links {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  justify-content: center;
  margin: 0;
  padding: 0;
}

.footer__links a {
  color: var(--blue);
  border: none;
  box-shadow: none;
  font-size: 12px;
  text-decoration: none;
  transition: opacity 0.2s;
}

.footer__links a:hover {
  opacity: 0.7;
}

@media (max-width: 600px) {
  .btn-nav {
    padding: 6px 10px;
    font-size: 12px;
  }
}
/* =========================
   Responsive Styles
   ========================= */
@media (max-width: 900px) {
  .topbar-inner {
    width: 100%;
    padding: 12px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  .topbar-right {
    margin-right: 0;
  }
  /* Left: Logo */
  .topbar-left {
    flex: 0 0 auto;
    margin-left: 0;
  }

  .website-logo {
    width: 100%;
    height: 40px;
    margin: 0;
    padding: 0;
    filter: brightness(1.15) drop-shadow(0 4px 12px rgba(0, 0, 0, 0.15));
  }

  /* Center: Show menu button in center */
  .topbar-center {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    gap: 0;
  }

  .topbar-center a {
    display: none;
  }

  .topbar-center .menu-btn {
    display: none;
  }

  /* Right: Logout button */
  .topbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    justify-items: space-between;
  }

  .topbar-right-top {
    display: inline;
    align-items: center;
    gap: 18px;
    color: var(--text);
  }

  .topbar-right-bottom {
    display: none;
  }

  .topbar-right-nav {
    display: none;
  }
  .topbar-link {
    display: none;
  }
  /* Logout button styling for mobile - show it */
  .topbar-right .btn-secondary {
    padding: 6px 10px;
    font-size: 12px;
    border-radius: 6px;
    white-space: nowrap;
    display: inline-block;
  }

  /* Menu button styling - on the right */
  .menu-btn {
    font-size: 20px;
    height: 40px;
    width: 40px;
    padding: 0;
    gap: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 11px;
  }

  /* Show only icon on mobile, hide text */
  .menu-icon-desktop {
    display: none;
  }
  .menu-btn-mobile {
    position: relative;
    display: flex;
  }

  .menu-icon-mobile {
    display: inline;
    cursor: pointer;
    z-index: 1000;
  }

  /* Hide profile image on mobile */
  .profile-dropdown {
    display: none;
  }

  .btn-primary {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    border: none;
    background: #7e0d92;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
    max-height: 40px;
  }

  .btn-primary:hover {
    background: #9b3dbf;
  }
}

/* Tablet Responsive (769px - 1024px) */
@media (min-width: 900px) and (max-width: 1050px) {
  .topbar-inner {
    width: 100%;
    padding: 12px 16px;
  }

  .topbar-center {
    gap: 12px;
    margin-left: 0;
  }

  .topbar-center a {
    padding: 8px 12px;
    font-size: 14px;
  }

  .website-logo {
    height: 50px;
    filter: brightness(1.15) drop-shadow(0 4px 12px rgba(0, 0, 0, 0.15));
  }
  .topbar-right {
    align-items: center;
    margin-right: 0;
  }
  .topbar-right-bottom {
    font-size: 12px;
  }
  .topbar-left {
    margin-left: 0;
  }
  .menu-btn-mobile {
    display: none;
  }
  .menu-icon-mobile {
    display: none;
  }
}

@media (min-width: 900px) {
  .topbar-right {
    align-items: center;
  }
  .menu-icon-mobile {
    display: none;
  }
  .menu-btn-mobile {
    display: none;
  }
}
  .btn-primary,
  .btn-nav,
  .topbar-right-top,
  .topbar-right-top .btn-nav,
  .topbar-right-top .btn {
    color: var(--white);
  }
/* Hide utility bar on tablet and below */
@media (max-width: 1350px) {
  .topbar-utility {
    display: none;
  }
  .btn-primary,
  .btn-nav,
  .topbar-right-top,
  .topbar-right-top .btn-nav,
  .topbar-right-top .btn {
    color: var(--white);
  }
}