/* v3 Header
---------------------------------------------------------- */
.v3-header {
  position: absolute;
  width: 100%;
  z-index: 9900;
  overflow: visible;
  height: 105px;
  font-family: var(--font-meiryo);
  background-color: #fff;
}

body.is-header-pinned .v3-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: transparent;
}

/* White bar fades independently so menu / MENU button are unaffected */
body.is-header-pinned .v3-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background-color: #fff;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0.7s;
}

body.is-header-pinned.is-header-shown .v3-header::before {
  opacity: 1;
  visibility: visible;
}

body.is-header-pinned .v3-header__inner {
  position: relative;
  z-index: 1;
}

body.is-header-pinned .v3-header__left > a,
body.is-header-pinned .v3-header__site-name,
body.is-header-pinned .v3-header__nav {
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0.7s;
}

body.is-header-pinned.is-header-shown .v3-header__left > a,
body.is-header-pinned.is-header-shown .v3-header__site-name,
body.is-header-pinned.is-header-shown .v3-header__nav {
  opacity: 1;
  visibility: visible;
}

@media (prefers-reduced-motion: reduce) {
  body.is-header-pinned .v3-header::before,
  body.is-header-pinned .v3-header__left > a,
  body.is-header-pinned .v3-header__site-name,
  body.is-header-pinned .v3-header__nav {
    transition: none;
  }
}

.v3-header__inner {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  height: 105px;
}

.v3-header__left {
  display: flex;
  align-items: stretch;
}

/* Keep layout space when the menu button is fixed out of flow */
.v3-header__left::before {
  content: "";
  flex-shrink: 0;
  width: 108px;
  height: 105px;
}

.v3-header__menu {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9200;
  flex-shrink: 0;
  width: 108px;
  height: 105px;
  padding: 0;
  border: none;
  background-color: #005f95;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.25s ease;
}
.v3-header__menu:hover {
  background-color: #00578a;
}
.v3-header__menu-icon {
  position: relative;
  width: 32px;
  height: 20px;
  margin-bottom: 8px;
}

.v3-header__menu-line {
  position: absolute;
  left: 0;
  display: block;
  width: 32px;
  height: 4px;
  background-color: #fff;
  transition:
    top 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.25s ease;
}

.v3-header__menu-line:nth-child(1) {
  top: 0;
}

.v3-header__menu-line:nth-child(2) {
  top: 8px;
}

.v3-header__menu-line:nth-child(3) {
  top: 16px;
}

.v3-header__menu.is-open .v3-header__menu-line:nth-child(1) {
  top: 8px;
  transform: rotate(45deg);
}

.v3-header__menu.is-open .v3-header__menu-line:nth-child(2) {
  opacity: 0;
}

.v3-header__menu.is-open .v3-header__menu-line:nth-child(3) {
  top: 8px;
  transform: rotate(-45deg);
}

.v3-header__menu-label {
  position: relative;
  display: block;
  width: 3.5em;
  height: 16px;
  font-size: 13px;
  line-height: 16px;
  color: #fff;
  text-align: center;
}

.v3-header__menu-label-text {
  font-weight: bold;
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
  width: 100%;
  height: 100%;
}
.v3-header__menu-label-text--menu {
  background: url(/v3/img/txt_menu.svg) no-repeat center center;
}
.v3-header__menu-label-text--close {
  opacity: 0;
  transform: translateY(4px);
  background: url(/v3/img/txt_close.svg) no-repeat center center;
}

.v3-header__menu.is-open .v3-header__menu-label-text--menu {
  opacity: 0;
  transform: translateY(-4px);
}

.v3-header__menu.is-open .v3-header__menu-label-text--close {
  opacity: 1;
  transform: translateY(0);
}

/* Logo — reused from existing .header_logo styles */
.v3-header__left > a {
  display: flex;
}

.v3-header__left > a:hover {
  opacity: 1;
}

.v3-header__left > a .header_logo {
  position: relative;
  transform: none;
  margin: 0;
}

@media screen and (max-width: 767px) {
  body[class*="_category_faculty"] .v3-header__left > a .header_logo::before {
    width: 7px;
  }
}

body[class*="_category_faculty_economics"] .v3-header__left > a .header_logo::before {
  background-color: #006fbc;
}

.v3-header__left > a .header_logo span {
  display: block;
  padding: 31px 28px 32px;
  width: 235px;
  height: 105px;
  background-color: #00507e;
}

.v3-header__left > a .header_logo span:hover {
  opacity: 1;
}

@media screen and (max-width: 767px) {
  .v3-header__left > a .header_logo span {
    padding: 16px 12px 15px;
    width: 117px;
    height: 54px;
  }
}

.v3-header__left > a .header_logo svg {
  display: block;
  max-height: 45px;
}

.v3-header__left > a .header_logo svg .cls-1 {
  fill: #fff;
}

.v3-header__left > a .header_logo svg .logo-icon {
  fill: #fff;
}

/* Site name */
.v3-header__site-name {
  align-self: center;
  margin: 0 0 0 20px;
  font-weight: bold;
  font-size: 18px;
  line-height: 18px;
  color: #000;
}

.v3-header__site-name-br {
  display: none;
}

/* Nav links */
.v3-header__nav {
  display: flex;
  align-items: center;
  margin-right: 40px;
}

.v3-header__nav-list {
  display: flex;
  gap: 30px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.v3-header__nav-list a {
  font-weight: bold;
  font-size: 15px;
  line-height: 30px;
  color: #000;
  text-decoration: none;
  transition: opacity 0.25s ease;
}

.v3-header__nav-list a:hover,
.v3-header__nav-list a:focus-visible {
  opacity: 0.7;
}

.v3-header__language {
  display: flex;
  align-items: center;
}

.v3-header__language-label {
  position: relative;
  display: block;
  cursor: pointer;
}

.v3-header__language-text {
  display: block;
  font-weight: bold;
  font-size: 15px;
  line-height: 30px;
  color: #000;
  white-space: nowrap;
  transition: opacity 0.25s ease;
}

.v3-header__language-text::after {
  content: "";
  display: inline-block;
  margin-left: 6px;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 4px 3.5px 0 3.5px;
  border-color: #000 transparent transparent transparent;
  vertical-align: middle;
}

.v3-header__language-label:hover .v3-header__language-text,
.v3-header__language-label:focus-within .v3-header__language-text {
  opacity: 0.7;
}

.v3-header__language-select {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: none;
  background-color: transparent;
  font: inherit;
  font-size: 16px;
  opacity: 0;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

@media screen and (max-width: 1200px) {
  .v3-header__site-name {
    line-height: 1.3;
  }

  .v3-header__site-name-br {
    display: inline;
  }
}

@media screen and (max-width: 1080px) {
  .v3-header__nav-list {
    gap: 10px;
  }

  .v3-header__nav-list a,
  .v3-header__language-text {
    font-size: 14px;
  }
}

@media screen and (max-width: 980px) {
  .v3-header__nav {
    display: none;
  }
}

@media screen and (max-width: 768px) {
  .v3-header {
    height: 54px;
  }

  .v3-header__inner {
    height: 54px;
  }

  .v3-header__left::before {
    width: 54px;
    height: 54px;
  }

  .v3-header__menu {
    width: 54px;
    height: 54px;
  }

  .v3-header__menu-icon {
    width: 24px;
    height: 15px;
    margin-bottom: 2px;
  }

  .v3-header__menu.is-open .v3-header__menu-icon {
    margin-bottom: 5px;
  }

  .v3-header__menu-line {
    width: 24px;
    height: 3px;
  }

  .v3-header__menu-line:nth-child(2) {
    top: 6px;
  }

  .v3-header__menu-line:nth-child(3) {
    top: 12px;
  }

  .v3-header__menu-label {
    width:31px;
    height: 12px;
  }

  .v3-header__site-name {
    margin-left: 14px;
    font-size: 12px;
    line-height: 14px;
  }
}