/* =========================
   BURGER BUTTON
========================= */
.custom-burger{
  position: relative;
  width: 32px;
  height: 22px;
  padding: 0;
  margin: 0;
  border: 0;
  background: none;
  cursor: pointer;
  display: inline-block;
}

.custom-burger .line{
  position: absolute !important;
  left: 0 !important;
  display: block !important;
  width: 32px !important;
  height: 2px !important;
  border-radius: 999px !important;
}

.custom-burger .line-1{ top: 0; }
.custom-burger .line-2{ top: 10px; }
.custom-burger .line-3{ top: 20px; }

.custom-burger:focus,
.custom-burger:focus-visible{
  outline: none;
  box-shadow: none;
}

/* optional hover */
.custom-burger:hover{
  opacity: 0.9;
}

/* lines */
.custom-burger span{
  position: absolute !important;
  left: 0;
  width: 100%;
  height: var(--burger-line);
  background: var(--burger-color);
  border-radius: var(--burger-radius);
  display: block;
  transition:
    transform 0.35s ease,
    top 0.35s ease,
    opacity 0.25s ease,
    background-color 0.25s ease;
  transform-origin: center;
  margin: 0 !important;
  float: none !important;
}

/* top / middle / bottom */
.custom-burger span:nth-child(1){
  top: 0;
}

.custom-burger span:nth-child(2){
  top: 50%;
  transform: translateY(-50%);
}

.custom-burger span:nth-child(3){
  top: calc(100% - var(--burger-line));
}

/* =========================
   OPEN STATE -> X
   add/remove .is-open with JS
========================= */
.custom-burger.is-open span:nth-child(1){
  top: 50%;
  transform: translateY(-50%) rotate(45deg);
}

.custom-burger.is-open span:nth-child(2){
  opacity: 0;
}

.custom-burger.is-open span:nth-child(3){
  top: 50%;
  transform: translateY(-50%) rotate(-45deg);
}

/* =========================
   OFFCANVAS PANEL
========================= */
.offcanvas{
  z-index: 12000 !important;
}

.offcanvas-backdrop{
  z-index: 11990 !important;
}

.offcanvas.offcanvas-end{
  width: min(360px, 88vw);
  border-left: 0;
  background: #0f2f73; /* change if needed */
  color: #fff;
}

.offcanvas-header{
  padding: 22px 22px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}

.offcanvas-title{
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.04em;
  margin: 0;
  color: #fff;
}

/* white close icon */
.offcanvas .btn-close{
  filter: invert(1) grayscale(100%) brightness(200%);
  opacity: 1;
  box-shadow: none;
}

.offcanvas .btn-close:focus{
  box-shadow: none;
}

/* =========================
   MENU LINKS
========================= */
.offcanvas-body{
  padding: 14px 22px 24px;
}

.offcanvas-body a{
  display: block;
  color: #fff;
  text-decoration: none;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255,255,255,0.12);
  font-size: 15px;
  line-height: 1.35;
  transition: padding-left 0.25s ease, opacity 0.25s ease;
}

.offcanvas-body a:hover{
  color: #fff;
  opacity: 0.85;
  padding-left: 8px;
}

/* =========================
   OPTIONAL: DARK BACKDROP
========================= */
.offcanvas-backdrop.show{
  opacity: 0.45;
}

/* =========================
   SMALL MOBILE TWEAK
========================= */
@media (max-width: 767px){
  .custom-burger{
    --burger-width: 28px;
    --burger-height: 20px;
  }

  .offcanvas.offcanvas-end{
    width: min(320px, 90vw);
  }
}