/* header.css - Header-related styles extracted from styles.css */

/*ブラウザ幅が1001px以上の時*/
@media screen and (min-width: 1001px) {
  .header__element--mobile {
    display: none;
  }
}

/*ブラウザ幅が1000px以下の時*/
@media screen and (max-width: 1000px) {
  .header__element--desktop {
    display: none;
  }
}

/*=====
# header
============*/
.header {
  background: #fff;
  left: 0;
  position: fixed;
  right: 0;
  top: 0;
  z-index: 1000;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
}

.header--scrolled .header {
  background: rgba(255, 255, 255, 0.9);
}

.header__nav-home {
  color: var(--main-color);
}

.header__button-list {
  margin-left: 18px;
  display: flex;
}

.header__icon img {
  margin: 1rem 1rem;
}

.header__overlay {
  background: rgba(0, 0, 0, 0.7);
  bottom: 0;
  opacity: 0;
  position: fixed;
  top: 0;
  visibility: hidden;
  width: 100%;
  pointer-events: none;
}

.header--active .header__overlay {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.header__burger {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-color: transparent;
  border: none;
  cursor: pointer;
  outline: none;
  padding: 0;
}

/*=====
# ボタン
============*/
.header__button--tel {
  display: block;
  background-color: var(--section-yellow);
  color: var(--main-color);
  padding: 12px 24px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  font-size: 1.4rem;
  letter-spacing: 0.04em;
  text-align: center;
}

.header__button--tel:hover {
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
  transition: 0.7s;
  opacity: 0.7;
}

.header__button--tel span {
  display: block;
  font-size: 1.6rem;
}

.header__button--line {
  display: block;
  background-color: #01b902;
  color: #fff;
  padding: 12px 24px;
  margin-left: 18px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  font-size: 1.4rem;
  letter-spacing: 0.04em;
  min-width: 160px;
  text-align: center;
}

.header__button--line:hover {
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
  transition: 0.7s;
  opacity: 0.7;
}

.header__button--line span {
  display: block;
  font-size: 1.6rem;
}

/*=====
# ナビバー
============*/
.header__nav {
  align-items: center;
  display: flex;
}

.header__nav-link {
  color: var(--main-color);
  font-family: "mgen-medium";
  font-size: 1.6rem;
  font-weight: 500;
  letter-spacing: -0.025em;
  position: relative;
}

/* ビューポートの幅が769px以上の場合*/
@media (min-width: 769px) {
  .header {
    height: 100px;
    text-align: center;
    z-index: 1000;
  }

  .header__title {
    font-size: 18px;
    position: relative;
    font-family: "mgen-bold";
    position: relative;
  }

  .header__title span {
    font-size: 13px;
    display: block;
    font-family: "mgen-medium";
  }
}

/* ビューポートの幅が1000px以下の場合*/
@media (max-width: 1000px) {
  .header {
    background: rgba(255, 255, 255, -1);
  }

  .header__title {
    margin-top: 1rem;
    display: block;
    transition: opacity 0.2s;
    font-size: 18px;
    font-weight: 700;
    font-family: "mgen-bold", sans-serif;
  }

  .header--active .header__title {
    margin-top: 1rem;
    opacity: 1;
  }

  .header__button--tel {
    margin: 12px auto;
    padding: 8px 12px;
    max-width: 240px;
  }

  .header__button--line {
    margin: 12px auto;
    padding: 8px 12px;
    max-width: 240px;
  }

  .header__nav-list {
    margin-top: 2rem;
    margin-bottom: 2rem;
  }

  .header__burger {
    display: block;
    height: 26px;
    left: -14%;
    position: absolute;
    top: 40px;
    transition: right 0.3s linear;
    width: 26px;
  }

  .header__burger-line {
    background-color: var(--main-color);
    border-radius: 4px;
    display: block;
    height: 1px;
    left: 0;
    position: absolute;
    transition: 0.3s;
    width: 26px;
    z-index: 1;
  }

  .header__burger-line:nth-child(1) {
    top: 2px;
  }

  .header__burger-line:nth-child(2) {
    top: 10px;
  }

  .header__burger-line:nth-child(3) {
    top: 18px;
  }

  .header--active .header__burger-line {
    background-color: #fff;
  }

  .header--active .header__burger-line:nth-child(1) {
    top: 10px;
    transform: rotate(-45deg);
  }

  .header--active .header__burger-line:nth-child(2) {
    left: 100%;
    opacity: 0;
  }

  .header--active .header__burger-line:nth-child(3) {
    top: 10px;
    transform: rotate(45deg);
  }
}

@media (max-width: 600px) {
  .header__button--tel {
    margin: 10px auto;
    padding: 8px 8px;
    max-width: 140px;
  }
  .header__button--tel span {
    font-size: 1.4rem;
  }
  .header__button--line {
    margin: 10px auto;
    padding: 8px 8px;
    max-width: 120px;
    min-width: 100px;
  }
  .header__button--line span {
    font-size: 1.4rem;
  }
}

@media (min-width: 1001px) {
  .header__nav {
    max-width: 1200px;
    height: 100%;
    margin: 0 auto;
    padding: 0px 20px;
  }

  .header__nav-list {
    display: flex;
    margin-left: auto;
  }

  .header__nav-item + .header__nav-item {
    margin-left: 40px;
  }

  .header__nav-link {
    padding: 0.5em 0;
  }

  .header__nav-link:after {
    background: var(--section-yellow);
    bottom: 0;
    content: "";
    height: 1px;
    left: 0;
    position: absolute;
    transform: scaleX(0);
    transition: transform 0.2s;
    width: 100%;
  }

  .header__nav-link:hover:after {
    transform: scaleX(1);
  }
}

@media (max-width: 1000px) {
  .header__nav {
    background: #fff;
    bottom: 0;
    position: fixed;
    right: -300px;
    text-align: center;
    top: 0;
    transition: right 0.3s linear;
    width: 300px;
    z-index: 101;
    display: block;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
  }

  .header--active .header__nav {
    right: 0;
  }
  .header--active .header__button-list {
    display: flex;
    flex-direction: column;
  }
  .header__nav-item + .header__nav-item {
    margin-top: 20px;
  }

  .header__nav-link {
    font-size: 1.8rem;
  }

  /*=====
  # header__nav--mobile
  ============*/
  .header__nav--mobile {
    width: 100%;
    max-width: 1200px;
    height: 100px;
    position: fixed;
    top: 0;
    display: flex;
    justify-content: center;
    background: #fff;
    align-items: center;
    z-index: 1001;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.2);
  }

  .header__nav-home {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-right: 2rem;
  }

  .header__nav-home a {
    color: var(--main-color);
  }

  .header__icon--mobile {
    display: inline;
    width: 50px;
  }

  .header__icon--mobile img {
    margin: 0 auto;
  }

  .header__nav--mobile .header__title {
    font-size: 25px;
    text-align: center;
    font-family: "mgen-medium";
    margin-right: 2rem;
    margin-left: 2rem;
    position: relative;
  }

  .header__nav--mobile .header__title span {
    display: block;
    font-size: 16px;
    line-height: 1.6em;
  }

  .header__title--sub {
    position: relative;
  }

  .header__title--sub::after {
    content: "";
    display: inline-block;
    background-image: url(../images/h-circle-icon.png);
    background-size: contain;
    background-repeat: no-repeat;
    width: 30px;
    height: 30px;
    position: absolute;
    top: -8px;
    right: 35px;
  }
}

@media (max-width: 540px) {
  .header__title--sub::after {
    top: -10px;
    right: 34px;
    width: 30px;
    max-width: 100%;
  }
}

@media (max-width: 375px) {
  .header__title--sub::after {
    top: -10px;
    right: 34px;
  }
}

/*=====
# ヘッダー/アイコン
============*/
@media (min-width: 769px) {
  .header__decoration--1:before {
    background: #fcd554;
    border-radius: 50%;
    top: 0.2em;
    right: 1.4em;
    height: 4px;
    width: 4px;
    position: absolute;
    transform: rotate(45deg);
    -moz-transform: rotate(45deg);
    -webkit-transform: rotate(45deg);
    -o-transform: rotate(45deg);
    -ms-transform: rotate(45deg);
    content: "";
  }

  .header__decoration--1:after {
    background: #fcd554;
    border-radius: 50%;
    top: -0.36em;
    right: 1.6em;
    height: 4px;
    width: 4px;
    position: absolute;
    transform: rotate(15deg);
    -moz-transform: rotate(15deg);
    -webkit-transform: rotate(15deg);
    -o-transform: rotate(15deg);
    -ms-transform: rotate(15deg);
    content: "";
  }

  .header__decoration--2:before {
    background: #fcd554;
    border-radius: 50%;
    top: -0.8em;
    right: 2em;
    height: 4px;
    width: 4px;
    position: absolute;
    transform: rotate(45deg);
    -moz-transform: rotate(45deg);
    -webkit-transform: rotate(45deg);
    -o-transform: rotate(45deg);
    -ms-transform: rotate(45deg);
    content: "";
  }

  .header__decoration--2:after {
    background: #fcd554;
    border-radius: 50%;
    top: -1.2em;
    right: 2.5em;
    height: 4px;
    width: 4px;
    position: absolute;
    transform: rotate(15deg);
    -moz-transform: rotate(15deg);
    -webkit-transform: rotate(15deg);
    -o-transform: rotate(15deg);
    -ms-transform: rotate(15deg);
    content: "";
  }

  .header__decoration--3:before {
    background: #fcd554;
    border-radius: 50%;
    top: -0.8em;
    right: 3em;
    height: 4px;
    width: 4px;
    position: absolute;
    transform: rotate(15deg);
    -moz-transform: rotate(15deg);
    -webkit-transform: rotate(15deg);
    -o-transform: rotate(15deg);
    -ms-transform: rotate(15deg);
    content: "";
  }
}
