/* header.css: Header only (B&S corporation) */

/* Header container */
.bs-header {
  --content-w: 1440px;
  --header-h: 84px;

  --menu-fs: 15px;
  --menu-color: #1a1a1a;

  --sep-w: 2px;
  --sep-h: 36px;
  --sep-color: #c9c9c9;

  --item-max-w: 168px;

  --btn-w: 128px;
  --btn-h: 36px;
  --btn-blue: #3fa6f2;

  --btn-orange: #e8ac51;
  --orange-w: 300px;

  height: var(--header-h);
  border-bottom: 1px solid #eee;
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
  margin-left: 0;
  margin-right: 0;
  padding-left: 20px;
  padding-right: 20px;
  box-sizing: border-box;
}

.bs-inner {
  max-width: var(--content-w);
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  padding-left: 0;
  padding-right: 0;
  box-sizing: border-box;
}

.bs-logo {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}
.bs-logo img {
  width: 220px;
  height: auto;
  display: block;
}
.bs-logo-text {
  font-size: 9px;
  color: #333;
  margin-top: 3px;
  text-align: right;
  white-space: nowrap;
}

/* Right block: anchored to the left edge of the orange button (minus 42px) */
.bs-right {
  position: absolute;
  right: calc(var(--orange-w) + 42px);
  top: 0;
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 18px;
}

/* Menu */
.bs-nav {
  display: flex;
  align-items: center;
  gap: 0;
}
.bs-item {
  flex: 0 1 var(--item-max-w);
  width: var(--item-max-w);
  min-width: 0;
  height: var(--sep-h);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  border-left: var(--sep-w) solid var(--sep-color);
  box-sizing: border-box;
}
.bs-item:last-child {
  border-right: var(--sep-w) solid var(--sep-color);
}
.bs-item > a,
.bs-item .bs-dd > a,
.bs-item .bs-dd > label {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  text-align: center;
  color: var(--menu-color);
  font-size: var(--menu-fs);
  font-weight: 400;
  text-decoration: none;
  white-space: nowrap;
}

.bs-btns {
  display: flex;
  gap: 12px;
}
.bs-btn {
  width: var(--btn-w);
  height: var(--btn-h);
  background: var(--btn-blue);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
  font-size: 14px;
  font-weight: 400;
  text-decoration: none;
}
.bs-btn:visited {
  color: #fff;
}


/* Right fixed orange button */
.bs-orange {
  position: absolute;
  right: 0;
  top: 0;
  height: var(--header-h);
  width: var(--orange-w);
  background: var(--btn-orange);
  color: #fff;
  font-weight: 400;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  text-decoration: none;
  line-height: 1.4;
  padding: 0 18px;
  box-sizing: border-box;
  position: absolute;
  flex-direction: column;
  gap: 2px;
}
.bs-orange:visited{
  color: #fff;
}
.bs-orange::after{
  content: "";
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  width: 7px;
  height: 12px;
  background: url("../img/top/arrow_w.svg") center / contain no-repeat;
}
.bs-orange-main{
  font-weight: 600;
  font-size: 16px;
}
.bs-orange-sub{
  font-weight: 400;
  font-size: 15px;
}

/* No hover color change */
.bs-btn:hover,
.bs-btn:focus,
.bs-btn:active {
  color: #fff;
  background: var(--btn-blue);
}
.bs-orange:hover,
.bs-orange:focus,
.bs-orange:active {
  color: #fff;
  background: var(--btn-orange);
}

/* Dropdown (PC hover) */
.bs-dd {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.bs-dd-menu {
  position: absolute;
  top: calc((var(--header-h) - var(--sep-h)) / 2 + var(--sep-h));
  left: 50%;
  transform: translateX(-50%);
  min-width: 200px;
  background: #fff;
  border: 1px solid #d6d6d6;
  box-shadow: 0 6px 16px rgba(0,0,0,.08);
  padding: 0;
  display: none;
  z-index: 1200;
}
.bs-dd-menu::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: calc((var(--header-h) - var(--sep-h)) / -2);
  height: calc((var(--header-h) - var(--sep-h)) / 2);
}
.bs-dd-menu a {
  display: block;
  padding: 12px 14px;
  font-size: 14px;
  color: #222;
  text-decoration: none;
  border-top: 1px solid #d6d6d6;
}
.bs-dd-menu a:first-child { border-top: 0; }
.bs-dd-menu a.is-active { background: transparent; }
.bs-dd-menu a:hover,
.bs-dd-menu a:focus-visible { background: #c2c2e6; }
.bs-dd:hover .bs-dd-menu,
.bs-dd:focus-within .bs-dd-menu { display: block; }
.bs-dd-toggle { display: none; }
.bs-item .bs-dd > .bs-dd-label { display: none; }

.bs-sp-panel { display: none; }
.bs-sp-primary {
  margin: 0;
  padding: 0;
}

/* Pack tighter as the screen shrinks */
@media (max-width: 1410px) {
  .bs-header{ --item-max-w: 148px; }
  .bs-right { right: calc(var(--orange-w) + 20px); gap: 12px; }
  .bs-btns { gap: 8px; }
}
@media (max-width: 1315px) {
  .bs-header{ --item-max-w: 132px; }
  .bs-right { right: calc(var(--orange-w) + 12px); gap: 8px; }
  .bs-btns { gap: 6px; }
}
@media (max-width: 1250px) {
  .bs-header{ --item-max-w: 118px; }
  .bs-right { right: calc(var(--orange-w) + 6px); gap: 6px; }
  .bs-btns { gap: 4px; }
}

/* <=1200px: keep menu usable */
@media (max-width: 1200px) {
  .bs-header { overflow: visible; }
  .bs-right {
    left: 300px;
    right: calc(var(--orange-w) + 42px);
  }
}

/* Burger */
.bs-burger {
  display: none;
  position: absolute;
  right: 12px;
  top: 12px;
  width: 40px;
  height: 32px;
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 0;
}
.bs-burger::after {
  content: "";
}
.bs-burger span {
  display: block;
  width: 28px;
  height: 2px;
  background: #1a1a1a;
  margin: 6px auto;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.bs-toggle { display: none; }

.bs-toggle:checked + .bs-burger span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}
.bs-toggle:checked + .bs-burger span:nth-child(2) { opacity: 0; }
.bs-toggle:checked + .bs-burger span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

@media (max-width: 768px) {
  .bs-header {
    --header-h: 66px;
    overflow: visible;
    height: auto;
    padding-bottom: 0;
  }

  .bs-inner {
    min-height: var(--header-h);
    padding-left: 0;
    padding-right: calc(48px + env(safe-area-inset-right));
  }

  .bs-logo {
    align-items: flex-start;
  }

  .bs-logo img {
    width: 210px;
  }

  .bs-burger {
    display: block;
    right: 20px;
    top: 16px;
    width: 34px;
    height: 34px;
    overflow: visible;
  }
  .bs-burger::after {
    content: "MENU";
    position: absolute;
    left: 50%;
    top: 100%;
    transform: translateX(-50%);
    margin-top: -4px;
    font-size: 9px;
    line-height: 1;
    letter-spacing: 0.08em;
    color: #202934;
    font-weight: 500;
    white-space: nowrap;
  }
  .bs-toggle:checked + .bs-burger::after {
    display: none;
  }

  .bs-burger span {
    position: absolute;
    left: 3px;
    width: 28px;
    height: 2px;
    margin: 0;
    background: #202934;
    transform-origin: center;
  }

  .bs-burger span:nth-child(1) {
    top: 8px;
  }

  .bs-burger span:nth-child(2) {
    top: 15px;
  }

  .bs-burger span:nth-child(3) {
    top: 22px;
  }

  .bs-toggle:checked + .bs-burger span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }
  .bs-toggle:checked + .bs-burger span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .bs-right,
  .bs-orange {
    display: none;
  }

  .bs-right {
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    height: auto;
    display: none;
    width: 100%;
    padding: 0;
    box-sizing: border-box;
    border-top: 1px solid #bdbee4;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: #fff;
    box-shadow: 0 6px 10px rgba(0,0,0,.10);
    max-height: none;
    overflow-y: visible;
  }

  .bs-toggle:checked ~ .bs-right {
    display: flex;
    max-height: calc(100vh - var(--header-h));
    max-height: calc(100dvh - var(--header-h));
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }

  .bs-sp-panel {
    display: none !important;
  }

  .bs-nav {
    display: flex;
    flex-direction: column;
    width: 100%;
    background: #fff;
    overflow: visible;
  }

  .bs-item {
    flex: none;
    display: block;
    width: 100%;
    border-left: 0;
    border-right: 0;
    border-bottom: 1px solid #bdbee4;
    min-height: 58px;
    height: auto;
    padding: 0;
    box-sizing: border-box;
    overflow: visible;
  }

  .bs-item:last-child {
    border-right: 0;
  }

  .bs-dd {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    width: 100%;
    height: auto;
    position: static !important;
    text-align: left;
    overflow: visible;
  }

  .bs-item > a,
  .bs-item .bs-dd > a,
  .bs-item .bs-dd > label {
    text-align: left;
    padding: 0 44px 0 22px;
    position: relative;
    font-size: 15px;
    font-weight: 400;
    color: var(--menu-color);
    background: #f7f7f7;
    display: block;
    height: 58px;
    line-height: 58px;
  }

  .bs-item > a::after,
  .bs-item .bs-dd > a::after,
  .bs-item .bs-dd > label::after {
    content: "";
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    width: 7px;
    height: 12px;
    background: url("../img/top/arrow_b.svg") center / contain no-repeat;
  }

  .bs-dd-menu {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    transform: none !important;
    box-shadow: none;
    border: 0;
    display: none;
    padding: 0;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    background: #fff;
    z-index: auto;
  }

  .bs-dd-menu::before {
    display: none;
  }

  .bs-dd-menu a {
    display: block;
    height: auto;
    min-height: 58px;
    line-height: 1.4;
    padding: 14px 44px 14px 22px;
    font-size: 15px;
    font-weight: 400;
    color: var(--menu-color);
    background: #f7f7f7;
    text-align: left;
    border-top: 0;
    border-bottom: 1px solid #bdbee4;
    box-sizing: border-box;
  }

  .bs-dd-menu a:last-child {
    border-bottom: 0;
  }

  .bs-dd:hover .bs-dd-menu {
    display: none;
  }

  .bs-item .bs-dd > a {
    display: none;
  }

  .bs-item .bs-dd > .bs-dd-label {
    display: block;
    cursor: pointer;
  }

  .bs-dd-toggle:checked + .bs-dd-label::after {
    transform: translateY(-50%) rotate(90deg);
  }

  .bs-dd-toggle:checked ~ .bs-dd-menu {
    display: block;
    border-top: 1px solid #bdbee4;
  }

  .bs-dd-toggle:checked ~ .bs-dd-menu a {
    background: #e8f2fd;
    color: #1a1a1a;
  }

  .bs-item .bs-dd:has(.bs-dd-toggle:checked) {
    height: auto;
  }

  .bs-dd-toggle:checked + .bs-dd-label {
    background: #f7f7f7;
    color: #1a1a1a;
  }

  .bs-dd-toggle:checked + .bs-dd-label::after {
    background-image: url("../img/top/arrow_b.svg");
  }

  .bs-btns {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    padding: 0;
    margin: 0;
  }

  .bs-btn {
    width: 100%;
    height: 52px;
    border: 0;
    border-radius: 0;
    display: flex;
    align-items: center;
    background: var(--btn-blue);
    color: #fff;
    justify-content: flex-start;
    padding: 0 44px 0 22px;
    text-align: left;
    font-size: 15px;
    font-weight: 400;
    position: relative;
  }

  .bs-btn::after {
    content: "";
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    width: 7px;
    height: 12px;
    background: url("../img/top/arrow_w.svg") center / contain no-repeat;
  }

  .bs-btns .bs-btn:last-child {
    border-bottom: 0;
  }

  .bs-orange-inline {
    display: flex !important;
    width: 100%;
    min-height: 64px;
    margin: 0;
    border: 1px solid #bdbee4;
    border-top: 0;
    border-radius: 0;
    background: #e8ac51;
    color: #fff;
    padding: 10px 52px;
    align-items: center;
    justify-content: center;
    text-align: center;
    box-sizing: border-box;
  }

  .bs-orange-inline::after {
    content: "";
    right: 15px;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 7px;
    height: 12px;
    background: url("../img/top/arrow_w.svg") center / contain no-repeat;
  }

  .bs-orange-inline .bs-orange-main,
  .bs-orange-inline .bs-orange-sub {
    display: block;
    width: 100%;
    text-align: center;
    font-size: 15px;
    line-height: 1.4;
    white-space: normal;
    word-break: keep-all;
  }
}

.bs-orange-inline {
  display: none;
  width: 100%;
  height: 44px;
  background: #e8ac51;
  color: #fff;
  font-weight: 400;
  align-items: center;
  justify-content: center;
  text-align: center;
  text-decoration: none;
  line-height: 1.4;
  margin: 0;
  border-radius: 0;
  flex-direction: column;
  gap: 2px;
  position: relative;
}

.bs-orange-inline:visited,
.bs-orange-inline:hover,
.bs-orange-inline:focus,
.bs-orange-inline:active{
  color: #fff;
}

.bs-header .bs-btn,
.bs-header .bs-btn:visited,
.bs-header .bs-btn:hover,
.bs-header .bs-btn:focus,
.bs-header .bs-btn:active,
.bs-header .bs-orange,
.bs-header .bs-orange:visited,
.bs-header .bs-orange:hover,
.bs-header .bs-orange:focus,
.bs-header .bs-orange:active,
.bs-header .bs-orange-inline,
.bs-header .bs-orange-inline:visited,
.bs-header .bs-orange-inline:hover,
.bs-header .bs-orange-inline:focus,
.bs-header .bs-orange-inline:active,
.bs-header .bs-orange-main,
.bs-header .bs-orange-sub{
  color: #fff !important;
}
