/* Sass Document */
@import url(https://fonts.googleapis.com/icon?family=Material+Icons);
@import url("https://fonts.googleapis.com/css?family=Teko&display=swap");
/*
@font-face {
  font-family: "Noto Sans JP", serif;
  font-optical-sizing: auto;
  font-weight: 500;
  font-style: normal;
  src: url('/wp/wp-content/themes/meikikou/fonts/NotoSansJP-VariableFont_wght.ttf') format('ttf');
}
*/

header {
  position: fixed;
  width: 100%;
  height: 130px;
  background: #fff;
  top: 0;
  right: 0;
  left: 0;
  z-index: 9999;
}

header h1,
header .logo {
  width: 160px;
  margin: 35px 0 0 40px;
  float: left;
  -webkit-transition: .5s ease;
  transition: .5s ease;
  -webkit-transition-property: margin, width;
  transition-property: margin, width
}

header h1 img,
header .logo img {
  -webkit-transition: opacity 0.5s ease;
  transition: opacity 0.5s ease;
}

header h1 img:hover,
header .logo img:hover,
#nav .other li a:hover {
  opacity: 0.5;
}

#nav .other {
  margin-bottom: -24px;
  font-size: 0;
  text-align: right;
  height: 40px;
  -webkit-transition: .5s ease;
  transition: .5s ease;
  -webkit-transition-property: opacity, height,visibility,margin;
  transition-property: opacity, height,visibility,margin;
  -webkit-transition-delay: .5s, .5s, 0;
  transition-delay: .5s, .5s , 0;
}

#nav .other li {
  display: inline-block;
  margin-right: 20px;
}

#nav .other li a {
  display: block;
  padding: 5px 0;
  font-weight: 500;
  letter-spacing: 0.05em;
  line-height: 2.16667;
  color: #000000;
  font-size: 14px;
  text-decoration: none;
  text-align: center;
  -webkit-transition: 0.5s ease;
  transition: 0.5s ease;
}

#nav .other li.en {
  margin-right: 20px;
}

#nav .other li.en a {
  font-size: 12px;
}

#nav .other li.en a::before {
  content: "";
  width: 20px;
  height: 20px;
  margin-right: 5px;
  display: inline-block;
  vertical-align: middle;
  background: url(../image/ico_en.svg) no-repeat center;
  background-size: contain;
}

#nav .other li.cad {
  width: 105px;
  border: 1px solid #1B9531;
  background: #1B9531;
}

#nav .other li.cad a {
  letter-spacing: 0.1em;
  color: #fff;
}

#nav .other li.login {
  width: 180px;
  border: 1px solid #1B9531;
}

#nav .other li.login a {
  letter-spacing: 0.1em;
  color: #1B9531;
}

#nav .other li.sup {
  width: 105px;
  margin-right: 0;
  vertical-align: top;
}

#nav .other li.sup a {
  font-size: 19px;
  letter-spacing: 0.05em;
  line-height: 1.7;
  color: #fff;
  font-family: "Teko";
  background: #0087B4;
}

#nav .global {
  text-align: right;
}

#nav .global > li {
  margin: 0 0 0 20px;
  display: inline-block;
}

#nav .global li a {
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.05em;
  line-height: 1.46667;
  text-align: center;
  color: #000000;
  text-decoration: none;
  -webkit-transition: color 0.5s ease;
  transition: color 0.5s ease;
}

#nav .global li a:hover {
  color: #1B9531;
}

@media screen and (max-width: 890px) {
  header #nav .global li {
    margin: 0 0 0 13px;
  }
}

/* ナビボタン */
#navibtn,
#menu-navibtn {
  display: none;
  cursor: pointer;
}

/* ドロップダウンメニュー */
#nav input[type="checkbox"] {
  display: none;
}
#nav .global li {
  position: relative;
}
#nav .global .menu-child {
  visibility: hidden;
  /*
  opacity: 0;
  */
  z-index: 1;
  position: absolute;
}

/* 検索欄 */
#nav li:has(#searchform) {
  position: relative;
  border: 1px solid #d0d0d0;
  width: 20%;
  text-align: left;
}
#nav #searchform input {
  width: 85%;
  border: none;
  height: 38px;
  box-sizing: border-box;
}
#nav #searchform button {
  position: absolute;
  top: 8px;
  right: 10px;
  mask-image: url(../image/search.svg);
  background-color: #1B9531;
  width: 1px;
  height: 1px;
  padding: 10px;
}

@media screen and ( 767px <= width <= 930px) {
  #nav #searchform {
    width: 15vw;
  }
  #nav .other li {
    margin-right: 2vw;
  }
  #nav .other li.cad {
    width: 10vw;
  }
  #nav .other li.login {
    width: 18vw;
    font-size: 1vw;
  }
  #nav .other li.sup {
    width: 10vw;
  }
  #nav .other li a,
  #nav .other li input::placeholder,
  #nav .other li.sup a {
    font-size: 1.6vw;
  }
}


/* wordpressログイン時のメニューバーのズレ修正
---------------------------------------------------- */
.customize-support header {
  top: 32px;
} 

/* スマホメニュー */
@media screen and (max-width: 768px) {
  header {
    height: 49px;
  }

  header .logo {
    margin: 0;
    height: 100%;
  }

  header h1 img,header .logo a {
    display: block;
    width: 84px;
    margin: 10px 0 0 10px;
    -webkit-transition: opacity 0.5s ease;
    transition: opacity 0.5s ease;
  }

  header h1 a img,header .logo a img {
    display: block;
    width: 84px;
    height: 29px;
  }

  header h1 a:hover,header .logo a:hover {
    opacity: 0.5;
  }

  header h1 a:hover img,header .logo a:hover img {
    opacity: 1;
  }

  main {
    padding-top: 49px;
  }

  #navibtn {
    width: 50px;
    height: 50px;
    display: block;
    position: absolute;
    top: -1px;
    right: -6px;
    z-index: 9999;
  }

  /* ハンバーガーボタン */
  #navibtn span span::before {
    top: 19px;
  }

  #navibtn span span::after {
    top: 24px;
  }

  #navibtn span::after {
    bottom: 18px;
  }

  #navibtn span span::before, #navibtn span span::after, #navibtn span::after {
    content: "";
    position: absolute;
    width: 20px;
    height: 2px;
    background-color: #000000;
    transition: .5s;
  }

  /* x ボタン */
  #menu-navibtn:checked ~ #nav label#navibtn span span::before {
    top: 24px;
    transform: rotate(-45deg);
    -webkit-transform: rotate(-45deg);
  }

  #menu-navibtn:checked ~ #nav label#navibtn span span::after {
    display: none;
  }

  #menu-navibtn:checked ~ #nav label#navibtn > span::after {
    bottom: 24px;
    transform: rotate(-135deg);
    -webkit-transform: rotate(-135deg);
  }

  #menu-navibtn:checked ~ #nav label#navibtn span span::before,
  #menu-navibtn:checked ~ #nav label#navibtn > span::after {
    width: 20px;
    height: 2px;
    display: block;
    background: #000000;
    position: absolute;
    -webkit-transition: .5s ease;
    transition: .5s ease;
    -webkit-transition-property: top,bottom,width,-webkit-transform;
    transition-property: top,bottom,width,-webkit-transform;
    transition-property: transform,top,bottom,width;
    transition-property: transform,top,bottom,width,-webkit-transform;
  }

  #menu-navibtn:checked ~ #nav > div {
    padding: 0 0 100vh;
    right: 0;
    bottom: 0;
    left: 0;
    background: #fff;
    -webkit-transition: opacity .5s ease;
    transition: opacity .5s ease;
    display: flex;
    flex-direction: column;
    width: 100%;
  }
  #menu-navibtn:checked ~ #nav div:not(:has(#searchform)) {
    opacity: 0.95;
    position: fixed;
    overflow-y: scroll;
    overflow-x: hidden;
    height: 100vh;
    top: 48px;
    pointer-events: auto;
    box-sizing: border-box;
  }

  #menu-navibtn ~ #nav .other,
  #menu-navibtn ~ #nav .global {
    display: none;
  }
  #menu-navibtn:checked ~ #nav .global {
    display: block;
    box-sizing: border-box;
  }
  #menu-navibtn:checked ~ #nav .other {
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 50%;
    margin-top: 10px;
    flex-shrink: 0;
  }
  #nav .other li {
    margin: 8px 0;
  }
  #nav .other li:has(#searchform),
  #nav .other li.en,
  #nav .other li.cad,
  #nav .other li.login,
  #nav .other li.sup {
    width: 250px;
  }
  #nav .other li.en {
    order: 4; /* cad2 → login → sup → en の順で表示 */
  }
  #nav .global li {
    border-bottom: 1px solid #DDDDDD;
    text-align: left;
    position: relative;
    display: block;
    margin: 0;
  }
  #nav .global li:last-child {
    border-bottom: none;
  }
  #nav .global li:has(> span) {
    padding: 15px 5px;
  }
  #nav .global li label {
    display: inline-block;
    width: 100%;
    height: 50px;
    position: absolute;
  }
  #nav .global li input:checked ~ ul {
    visibility: visible;
    opacity: 1;
  }
  #nav .global li input:checked ~ .menu-child {
    position: relative;
  }
  #nav .global li:has(> :not(a) ~ input:checked) {
    padding-bottom: 0;
  }
  #nav .global li:has(> :not(a) ~ input:checked) .menu-child {
    padding-top: 15px;
  }
  #nav .global li:not(:has(ul)) a {
    display: block;
  }
  #nav .global li a {
    display: inline-block;
    text-align: left;
    padding: 15px 45px 15px 5px;
  }
  #nav .global li span {
    display: inline-block;
    vertical-align: top;
  }
  #nav .global li:has(input:not(:checked))::before {
    font-family: 'Material Icons';
    content: "\e145";
    font-size: 1.5rem;
    display: block;
    position: absolute;
    top: 25%;
    right: 20px;
    color: #1B9531;
  }
  #nav .global li:has(> input:checked)::before {
    font-family: 'Material Icons';
    content: "\e15b";
    font-size: 1.5rem;
    display: block;
    position: absolute;
    top: 10px;
    right: 20px;
    color: #1B9531;
  }
  #nav .global li:not(:has(ul))::before {
    font-family: 'Material Icons';
    content: "\e5cc";
    font-size: 1.5rem;
    display: block;
    position: absolute;
    top: 25%;
    right: 20px;
    color: #1B9531;
  }

  .customize-support header {
    top: 50px;
  } 
  .customize-support #menu-navibtn:checked ~ #nav div {
    top: 99px;
  }
}

@media screen and (min-width: 767px) {
  header {
    min-width: 767px;
  }

  header.active {
    height: 80px;
  }

  header.active h1,
  header.active .logo {
    width: 130px;
    margin: 15px 0 0 40px;
  }

  #nav {
    padding: 20px 30px;
  }

  #nav div {
    display: flex;
    flex-direction: column-reverse;
  }

  #nav .global {
    margin-top: 45px;
  }

  header.active #nav .global{
    margin-top: 0;
  }
  
  header.active #nav .other {
    margin-bottom: 10px;
    opacity: 0;
    height: 0;
    -webkit-transition-delay: 0, 0 , .5s;
    transition-delay: 0, 0 , .5s;
    pointer-events: none;
    visibility: hidden;
  }

  /* ドロップダウンメニュー */
  #nav .global .menu-child {
    width: 200px;
    background: #fff;
    box-sizing: border-box;
    border: 1px solid #000;
    top: 35px;
    left: 35%;
    margin-left: -91px;
  }
  #nav .global li:hover > .menu-child {
    visibility: visible;
    transition: all .2s;
    opacity: 1;
    text-align: center;
    border: solid 1px #dddddd;
    border-top: solid 6px #1B9531;
  }
  #nav .global li:hover > ul .menu-child {
    top: -1px;
    left: 146%;
    border-top: 1px solid #dddddd;
  }
  #nav .global > li:hover ul .menu-child::before {
    content: "";
    visibility: visible;
    border-left: 7px solid #1b9531;
    border-top: 7px solid transparent;
    border-bottom: 7px solid transparent;
    top: 18px;
    left: -6%;
    transform: translate(-50%, 0);
    position: absolute;
  }
  #nav .global li:hover > ul .menu-child li:first-child::before {
    display: none;
  }
  #nav .global li:hover .menu-child li:first-child::before {
    content: "";
    position: absolute;
    display: block;
    width: 0;
    height: 0;
    top: -9px;
    left: 50%;
    margin-top: -1px;
    border-left: solid 7px transparent;
    border-right: solid 7px transparent;
    border-bottom: solid 12px #1B9531;
    transform: translateY(-50%) translateX(-50%);
  }
  #nav .global li:hover .menu-child li {
    padding: .7rem .2rem;
  }
  #nav .global li:hover .menu-child li:not(:last-child) {
    border-bottom: solid 1px #dddddd;
  }
  #nav .global li span,
  #nav .global li a {
    padding-bottom: 15px;
  }
}
