header {
  position: relative;
  left: 0;
  top: 0;
  width: 100%;
  height: 72px;
  background: #f7f7f7;
  border-bottom: 4px solid #000;
  z-index: 9;
  transition: 0.4s ease-in-out;
}

header.bg {
  position: sticky;
  background: rgb(255, 255, 255, 1);
  box-shadow: 0 .2rem 0.25rem 0 rgb(4 0 0 / 15%);
}

header .content {
  position: relative;
  width: 100%;
  max-width: 1500px;
  height: 100%;
  margin: 0 auto;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 0 1vw;
}

header .logo {
  width: 100%;
  max-width: 180px;
  transition: all 0.3s;
  z-index: 3;
  flex: 4;
}

header .logo img {
  width: 100%;
  min-width: 120px;
  max-width: 180px;
}

header .right-link {
  display: inline-flex;
  align-items: center;
  justify-content: space-around;
  z-index: 10;
  gap: 10px;
}

header ul.menu>li.mobile a.button-pulse,
header .right-link a {
  display: flex;
  align-items: center;
  justify-content: center;
}

header .right-link a img {
  width: auto;
  height: 36px;
}

header .right-link a img:hover {
  animation: parent-tab-image 0.5s linear;
}

header .right-link a:first-child img {
  margin-left: 0;
}

header .right-link .line {
  width: 1px;
  height: 24px;
  background: #000;
  margin: 0 10px 0 0;
}

/* Button Pulse Styles */
.for-home {
  display: none;
}

.for-home a.button-pulse {
  display: none;
}

header ul.menu>li.mobile a.button-pulse,
header .right-link a.button-pulse {
  width: 102px;
  height: 38px;
  background: #fab3ff;
  animation: pulse 1s infinite 1s cubic-bezier(0.25, 0, 0, 1);
  color: #000;
  font-weight: 700;
  font-size: .875rem;
  gap: 6px;
  border: 1px solid #000;
  animation: unset;
}

header ul.menu>li.mobile a.button-pulse em,
header .right-link a.button-pulse em {
  font-size: .8rem;
  display: none;
}

header ul.menu>li.mobile a.button-pulse {
  width: 100%;
}

header ul.menu>li.mobile a.button-pulse img,
header .right-link a.button-pulse img {
  width: 20px !important;
  min-width: 20px !important;
  display: block;
}

header ul.menu>li.mobile a.button-pulse.buy,
header .right-link a.button-pulse.buy {
  background: #01bc6a;
}

@keyframes pulse {
  to {
    box-shadow: 0 0 0 8px rgba(255, 255, 255, 0);
  }
}

/* Menu Layout & Interaction */
header #memu_mask {
  position: fixed;
  display: none;
  top: 100px;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
}

header #menu {
  display: flex;
  align-items: center;
  height: 100%;
  flex: 6;
}

header ul.menu {
  flex: 1;
  display: flex;
  width: auto;
  height: 100%;
  font-size: 1rem;
  justify-content: flex-end;
}

header ul.menu>li {
  position: relative;
  -webkit-flex: none;
  -ms-flex: none;
  -moz-box-flex: 0;
  flex: none;
  text-align: center;
  padding: 0 10px;
  line-height: 1.8;
}

header ul.menu>li:last-child::after {
  display: none;
}

header ul.menu>li.mobile {
  display: none;
}

header ul.menu>li>a {
  display: flex;
  cursor: pointer;
  height: 100%;
  align-items: center;
  transition: color 0.3s;
  font-weight: 600;
}

header ul.menu>li.active>a {
  color: #1A428A;
  font-weight: bold;
}

header ul.menu>li>a:hover,
header ul.menu>li.active>a {
  color: #1A428A;
}

header ul.menu>li.active>a {
  font-weight: 700;
  color: #1A428A;
}

header ul.menu>li>span {
  display: flex;
  cursor: pointer;
  height: 100%;
  align-items: center;
  transition: color 0.3s;
}

header ul.menu>li>span:hover,
header ul.menu>li>span.on {
  font-weight: bold;
  color: #1A428A;
}

header ul.menu>li>span:hover ol.sub {
  display: block;
}

header ul.menu>li>span>label {
  position: relative;
  display: block;
  cursor: pointer;
  font-weight: 600;
  font-size: 1rem;
  text-align: left;
}

header ul.menu>li.active>span>label {
  font-weight: bold;
  color: #1A428A;
}

header ul.menu>li>span input {
  display: none;
}

header ul.menu>li>span ol.sub {
  display: none;
  position: absolute;
  min-width: 124px;
  max-width: 124px;
  top: 80%;
  left: 50%;
  text-align: center;
  padding: 0px;
  font-size: 1rem;
  line-height: 1.4;
  background: #F8F8F8;
  border: 2px solid #000;
  border-top: 4px solid #000;
  transform: translateX(-50%);
}

header ul.menu>li>span ol.sub li {
  display: block;
}

header ul.menu>li>span ol.sub li>a {
  display: block;
  padding: 10px 12px;
  color: #484848;
  font-size: .93rem;
  font-weight: 500;
}

header ul.menu>li>span ol.sub li>a:hover {
  color: #000;
  background: #FF5421;
}

/* Hamburger Icon Logic */
header #menu-ck {
  display: none;
}

header #menu-ck:checked~#memu_mask {
  opacity: 1;
  pointer-events: auto;
}

header #menu-ck:checked~label i,
header #menu-ck:checked~label o,
header #menu-ck:checked~label u {
  transition: top 0.2s, opacity 0.1s 0.2s, transform 0.2s 0.2s, -webkit-transform 0.2s 0.2s, -moz-transform 0.2s 0.2s, -o-transform 0.2s 0.2s;
}

header #menu-ck:checked~label i {
  top: 15px;
  opacity: 1;
  transform: rotate(45deg);
}

header #menu-ck:checked~label o {
  top: 15px;
  opacity: 0;
}

header #menu-ck:checked~label u {
  top: 15px;
  opacity: 1;
  transform: rotate(-45deg);
}

header #menu-ck~label {
  display: none;
  position: relative;
  width: 32px;
  min-width: 32px;
  height: 32px;
  right: 0;
  z-index: 3;
  cursor: pointer;
}

header #menu-ck~label i,
header #menu-ck~label o,
header #menu-ck~label u {
  position: absolute;
  width: 24px;
  height: 2px;
  background: #000;
  opacity: 1;
  transform: rotate(0deg);
  transition: top 0.2s 0.2s, opacity 0.1s 0.2s, transform 0.2s, -webkit-transform 0.2s, -moz-transform 0.2s, -o-transform 0.2s;
}

header #menu-ck~label i {
  top: 8px;
  left: 4px;
}

header #menu-ck~label o {
  top: 15px;
  left: 4px;
}

header #menu-ck~label u {
  top: 22px;
  left: 4px;
}

header ul.menu>li:last-child a {
  position: relative;
}

.select-dropdown {
  font-size: 1rem;
}

.select-dropdown select {
  background: #f7f7f7;
}

/* Brutalist Button Overrides */
.button {
  border: var(--nb-border) !important;
  box-shadow: var(--nb-shadow) !important;
  font-weight: 800 !important;
  text-transform: uppercase;
  transition: all 0.15s ease-in-out !important;
  background-image: none !important;
}

.button:hover {
  transform: translate(4px, 4px) !important;
  box-shadow: 2px 2px 0px var(--nb-black) !important;
}


/* =========================================
   2. MEDIA QUERIES (Consolidated)
   ========================================= */

/* Max Width: 1500px */
@media (max-width: 1500px) {
  header ul.menu>li {
    padding: 0 .8vw;
  }
}

/* Max Width: 1450px */
@media (max-width: 1450px) {
  header .content {
    padding: 0 2.4vw;
    gap: 12px;
  }
}

/* Max Width: 1300px - Mobile Menu Breakpoint */
@media (max-width: 1300px) {

  /* Header Base */
  header {
    height: 64px;
    background: rgb(255, 255, 255, 0.6);
  }

  header:after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #f7f7f7;
    z-index: 2;
  }

  /* Hamburger Icon Display */
  header #menu-ck~label {
    display: block;
  }

  /* Menu Container - Modified for Left Slide */
  header #menu {
    position: fixed;
    width: 100%;
    height: calc(100vh - 64px);
    max-height: calc(100vh - 64px);
    top: 64px;
    left: 0;
    right: 0;
    padding: 1.8vw 4.8vw;
    background: rgb(245, 245, 245, 1);
    border-top: 2px solid #000;
    flex-direction: column-reverse;
    overflow: auto;
    pointer-events: none;

    /* Animation Change: Slide from Left */
    opacity: 0;
    transform: translateX(-100%);
    /* Start off-screen left */
    transition: transform 0.3s ease-in-out, opacity 0.3s;
  }

  /* Menu Activation - Modified for Left Slide */
  header #menu-ck:checked~#menu {
    display: flex;
    pointer-events: auto;
    opacity: 1;
    transform: translateX(0);
    /* Slide into view */
  }

  /* Menu Layout Reset */
  header ul.menu {
    -webkit-flex: none;
    -ms-flex: none;
    -moz-box-flex: 0;
    flex: none;
    font-size: 1.2rem !important;
    display: block;
    width: 100%;
  }

  header ul.menu>li {
    display: block;
    padding: 0;
    text-align: center;
    border-bottom: 1px solid #e0e0e0;
  }

  header ul.menu>li:last-of-type {
    border-bottom: none;
    padding-bottom: 0;
  }

  header ul.menu>li::after {
    display: none;
  }

  header ul.menu>li>a {
    display: block;
    margin: 10px 0;
    text-align: left;
    font-size: 1rem;
  }

  header ul.menu>li>span {
    display: block;
    margin: 6px 0;
  }

  header ul.menu>li>span:hover ol.sub {
    display: none;
  }

  /* Submenu Accordion Style */
  header ul.menu>li>span>label:after {
    content: "";
    position: absolute;
    top: 50%;
    right: 0rem;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0.5rem 0.4rem 0 0.4rem;
    border-color: #1A428A transparent transparent transparent;
    transform: translateY(-50%) rotate(0deg);
    transition: all 0.3s;
  }

  header ul.menu>li>span input:checked~ol.sub {
    display: flex !important;
    min-width: auto;
    max-width: unset;
    border: 0px;
  }

  header ul.menu>li>span input:checked~label:after {
    transform: translateY(-50%) rotate(180deg);
  }

  header ul.menu>li>span ol.sub {
    position: relative;
    padding: 0;
    background: none;
    font-size: 1rem;
    margin-top: 10px;
    flex-wrap: wrap;
    border-top: 0px solid;
  }

  header ul.menu>li>span ol.sub li {
    position: relative;
    flex: none;
    width: 100%;
  }

  header ul.menu>li>span ol.sub li:after {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 5px;
    height: 5px;
    background: #868788;
    border-radius: 50%;
  }

  header ul.menu>li>span ol.sub li>a {
    width: 100%;
    margin: 0 auto;
    padding: 10px 10px 10px 12px;
    white-space: normal;
    text-align: left;
  }

  /* Other Elements in Mobile Menu */
  header .logo {
    max-width: unset;
  }

  header .right-link {
    justify-content: flex-end;
  }

  header .right-link a.button-pulse img {
    width: 18px !important;
  }

  header .right-link a.button-pulse b {
    font-size: .8rem;
    font-weight: 500;
  }

  header .right-link .line {
    display: none;
  }

  .select-dropdown {
    font-size: .8rem;
    margin-left: 10px;
  }
}

.for-home a.button-pulse.buy,
header .right-link a.button-pulse.buy,
header ul.menu>li.mobile a.button-pulse.buy {
  display: none !important;
}

/* Max Width: 768px */
@media(max-width:768px) {
  .for-home {
    display: grid;
    grid-template-columns: 1fr;
  }

  .for-home a.button-pulse {
    width: 100%;
    height: 48px;
    animation: pulse 1s infinite 1s cubic-bezier(0.25, 0, 0, 1);
    color: #000;
    font-size: 1.125rem;
    border: 1px solid #000;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 0px auto;
    animation: unset;
  }

  .for-home a.button-pulse em {
    display: none;
  }

  .for-home a.button-pulse.signup {
    background: #fab3ff;
  }

  .for-home a.button-pulse.buy {
    background: #01bc6a;
  }

  .for-home a.button-pulse img {
    width: 30px !important;
  }
}

/* Max Width: 767px */
@media (max-width: 767px) {
  header ul.menu {
    font-size: 1rem !important;
  }

  header ul.menu>li.mobile {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin-top: 16px;
  }

  header .right-link a.button-pulse {
    display: none;
  }

  header ul.menu>li>span ol.sub {
    font-size: 1.2rem;
    border: 0px;
  }

  header #menu {
    top: 64px;
  }

  header .right-link a img {
    margin-left: 3px;
  }

  .select-dropdown {
    font-size: .75rem;
    margin-left: 4px;
  }
}

/* Max Width: 500px */
@media (max-width:500px) {
  header .right-link a.button-pulse {
    width: 90px;
    height: 38px;
    font-size: .75rem;
  }

  header .logo img {
    max-width: 150px;
  }
}

header ul.menu>li:nth-child(3) ol.sub>li:nth-child(3) {
  display: none;
}