/* ----- Layout Basis ----- */
body {
  margin: 0;
  font-family: system-ui, Arial, sans-serif;
}

header {
  position: sticky;
  top: 0;
  z-index: 300;
  background: linear-gradient(160deg, #3b82f6 40%, #1e40af);
  color: white;
  padding: 1rem 2rem;
  box-shadow: 0 2px 15px rgba(0,0,0,0.1);
}

/* Header Content Layout */
.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
}

/* Navbar Layout */
.navbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex: 1;
  background: transparent;
  border-bottom: none;
  padding: 0;
}

/* Branding */
.brand {
  font-weight: bold;
  font-size: 1.24rem;
  color: #21263A;
  letter-spacing: .5px;
}

/* --- Navbar Items (visible on desktop) --- */
.nav-items {
  list-style: none;
  display: flex;
  gap: 1rem;
  margin: 0;
  padding: 0;
  align-items: center;
  justify-content: flex-end;
}

.nav-items a {
  text-decoration: none;
  color: white;
  font-size: 1.08rem;
  font-weight: 500;
  padding: 0.45rem 1.1rem;
  border-radius: 5px;
  transition: all 0.2s;
  white-space: nowrap;
}
.nav-items a:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #f8fafc;
}

/* --- Hamburger Menu Button --- */
.menu-btn {
  display: none;
  position: absolute;
  top: 8px;
  right: 2vw;     /* Moved further to the right */
  width: 32px;
  height: 32px;
  background: transparent;
  border: none;
  border-radius: 8px;
  box-shadow: none;
  cursor: pointer;
  z-index: 1510;
  padding: 0;
}

.menu-btn span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: #fff;
  border-radius: 1.5px;
  transition: 0.32s cubic-bezier(.72, .25, .13, 1.63);
}

.menu-btn.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.menu-btn.open span:nth-child(2) {
  opacity: 0;
  transform: translateX(-16px);
}
.menu-btn.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* --- Side Drawer - Very transparent white --- */
.side-drawer {
  position: fixed;
  top: 0;
  left: 0;
  width: 0vw;
  height: 100vh;
  background: rgba(255,255,255,0.15); /* Very transparent white */
  overflow: hidden;
  box-shadow: none;
  z-index: 1500;
  transition: width 0.33s cubic-bezier(.87, 0, .13, 1.07);
  color: #181818;
  display: flex;
  flex-direction: column;
  backdrop-filter: blur(2px); /* Light frost effect */
}

.side-drawer.open {
  width: 40vw !important;  /* Only 40% of screen width */
  min-width: unset;
  max-width: unset;
  background: rgba(255,255,255,0.22); /* Slightly more visible but still subtle */
}

/* Mobile-friendly menu links */
.side-drawer ul {
  width: 100%;
  padding: 105px 0 0 0;
  margin: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 0;
  min-height: calc(100vh - 100px);
  animation: fadeInT 0.33s cubic-bezier(.47,1.17,.55,1.15);
  background: rgba(255,255,255,0.09); /* Very subtle white */
  backdrop-filter: blur(1.5px);
}
@keyframes fadeInT { from { opacity: 0; transform: translateY(-16px);} to { opacity:1; transform:translateY(0);} }

.side-drawer li {
  margin: 0;
  border-bottom: 1.5px solid rgba(100,100,100,0.12);
}

.side-drawer a {
  display: block;
  width: 100%;
  padding: 1em 1.05em;
  color: #232323;
  text-decoration: none;
  font-size: 0.97rem;
  font-weight: 300;
  text-align: left;
  background: rgba(255,255,255,0.18); /* Subtle white background */
  letter-spacing: 0.01em;
  transition: background 0.17s, color 0.17s;
  font-family: 'Inter', 'Poppins', system-ui, Arial, sans-serif;
}
.side-drawer a:hover {
  background: rgba(200,0,0,0.10); /* Subtle red on hover */
  color: #b90808;
}

/* --- Backdrop --- */
.menu-backdrop {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  background: rgba(33,38,58,.22);
  z-index: 1400;
  opacity: 0;
  transition: opacity 0.22s;
}
.menu-backdrop.open {
  display: block;
  opacity: 1;
}

/* ================ Responsive Breakpoints ================ */
@media (max-width: 900px) {
  .nav-items {
    display: none !important;  /* Hide desktop navigation */
  }
  .menu-btn {
    display: block !important;  /* Show hamburger button */
  }
  .navbar {
    justify-content: flex-end;
  }
  .header-content {
    padding-right: 0;
  }
  header {
    padding: 0.6rem 0.2rem;
  }
  
  /* Make side drawer wider on very small screens for better usability */
  .side-drawer.open {
    width: 60vw !important;  /* 60% width on mobile for better usability */
  }
}

@media (min-width: 901px) {
  .side-drawer,
  .menu-backdrop {
    display: none !important;
  }
  .menu-btn {
    display: none !important;
  }
  .nav-items {
    display: flex !important;
    margin-left: auto;
  }
}
