/* =========================
   HEADER + NAV (CLEAN)
   ========================= */

:root {
  --header-h: 140px;
  --header-row1: 90px;
  /* centered logo row */
  --header-row2: 50px;
  /* nav row */
  --nav-gap: 32px;
}

/* Push page content below fixed header */
body {
  padding-top: var(--header-h);
}

/* Fixed glass header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-h);
  z-index: 1000;
  font-family: 'Poppins', sans-serif;

  background: rgba(0, 0, 0, .25);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, .08);

  display: grid;
  grid-template-rows: var(--header-row1) var(--header-row2);
  align-items: center;
  justify-items: center;

  overflow: visible !important;
}

/* containers */
.logo-container {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Top-left logo: centered + smooth grow hover */
.top-left-logo {
  position: absolute;
  left: 12px;
  top: 50%;

  /* size */
  height: calc(var(--header-h) * 0.85);
  max-height: 180px;
  width: auto;
  object-fit: contain;

  /* centering transform */
  transform: translateY(-50%) scale(1);

  /* smooth hover */
  transition: transform 0.2s ease;
  z-index: 1002;
  cursor: pointer;
}

.top-left-logo:hover {
  transform: translateY(-50%) scale(1.06);
}


/* Center (long) logo row */
.logo {
  grid-row: 1;
  height: 56px;
  width: auto;
  user-select: none;
  z-index: 1001;
}

/* Desktop nav row */
.desktop-nav {
  grid-row: 2;
  width: 100%;
  display: flex;
  justify-content: center;
  align-self: start;
  padding-top: 6px;
  /* slightly higher */
}

/* Nav list: centered, single line */
.desktop-nav ul {
  width: 100%;
  max-width: 980px;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: nowrap;
  gap: var(--nav-gap);
  white-space: nowrap;

  margin: 0;
  padding: 0 16px;
  list-style: none;

  overflow: hidden;
  /* no scrollbars */
}

/* Nav items */
.desktop-nav li {
  margin: 0;
  padding: 0;
}

/* Links */
.nav-links a {
  color: white;
  text-decoration: none;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: .6px;

  margin: 12px 0;
  transition: color .25s ease, transform .25s ease;
}

.nav-links a:hover {
  color: #00ff88;
  transform: translateY(-2px);
}

.nav-links a {
  position: relative;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 0%;
  height: 2px;
  background: #00ff88;
  transition: width .3s;
}

.nav-links a:hover::after {
  width: 100%;
}

/* Hamburger */
.hamburger {
  display: none;
  /* shown on small screens */
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 2.5rem;
  color: white;
  cursor: pointer;
  z-index: 1003;
}

/* Prevent micro horizontal scroll caused by blur rounding */
html,
body {
  overflow-x: hidden;
}

/* ===== CLEAN FULL-SCREEN MOBILE NAV (TOP-ALIGNED) ===== */
.sidebar {
  position: fixed;
  inset: 0;
  z-index: 2000;

  background: rgba(0, 0, 0, .78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  /* ⬅️ TOP aligned */

  padding-top: 110px;
  /* space below header / close button */

  transform: translateX(-100%);
  transition: transform .25s ease;
}

.sidebar.active {
  transform: translateX(0);
}


/* Close button (top-right) */
.sidebar .close-btn {
  position: absolute;
  top: 18px;
  right: 18px;
  font-size: 2.2rem;
  color: white;
  cursor: pointer;
}

/* Links: centered, no boxes */
.sidebar a {
  color: white;
  text-decoration: none;
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: .6px;

  margin: 12px 0;
  transition: color .25s ease, transform .25s ease;
}

.sidebar a:hover {
  color: #00ff88;
  transform: translateY(-2px);
}

.sidebar a {
  position: relative;
}

.sidebar a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 0%;
  height: 2px;
  background: #00ff88;
  transition: width .3s;
}

.sidebar a:hover::after {
  width: 100%;
}



/* =========================
   RESPONSIVE BREAKPOINTS
   ========================= */

/* 741–990: hide top-left logo, keep center logo + nav */
@media (max-width: 990px) and (min-width: 741px) {
  .top-left-logo {
    display: none;
  }
}

/* 500–740: shrink center logo + nav */
@media (max-width: 740px) and (min-width: 650px) {
  :root {
    --header-h: 130px;
  }

  .top-left-logo {
    display: none;
  }

  .logo {
    height: 50px;
  }

  .nav-links a {
    font-size: 17px;
    bottom: 5px;
  }

  :root {
    --nav-gap: 22px;
  }
}

/* <= 500px: hamburger + top-left logo only */
@media (max-width: 650px) {
  :root {
    --header-h: 100px;
    --header-row1: 100px;
    --header-row2: 0px;
  }

  .desktop-nav {
    display: none !important;
  }

  .logo {
    display: none !important;
  }

  .hamburger {
    display: block !important;
  }

  .top-left-logo {
    display: block !important;
  }
}


/* Hide sidebar on desktop */
@media (min-width: 651px) {
  .sidebar {
    display: none;
  }
}

/* Ensure underline can render and isn't clipped */
.desktop-nav ul {
  overflow: visible;
  /* was hidden */
}

/* Make pseudo-element positioning reliable */
.nav-links a {
  display: inline-block;
  margin: 0;
  /* remove vertical margins */
  /* use padding instead */
  transform: none;
  /* optional: remove translate that can shift underline */
}

/* Keep your hover effect but without moving the link */
.nav-links a:hover {
  color: #00ff88;
}

/* Underline */
.nav-links a::after {
  bottom: -4px;
  /* slightly closer so it stays within nav row */
}

/* ===== ACTIVE NAV LINK ===== */
.nav-links a.active {
  color: #00ff88;
}

/* Keep underline visible for active link */
.nav-links a.active::after {
  width: 100%;
}