/*
メディアクエリを使用したレスポンシブデザイン
- PCファーストで設計しているので、部分的に@media (max-width: 500px)などで指定する
*/

.site_global_header {
  /*CSSで画像と色を重ねる*/
  background-image: url(../images/common/main-visual.jpg?v=3);
  background-color: rgba(255, 255, 255, 0.5);
  background-blend-mode: overlay;
  background-size: cover;
  border-radius: 0 0 30px 30px;
  display: flex;
  gap: 1em;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  padding: 1em;
  position: sticky;
  top: 0;
  @media (min-width: 1000px) {
    position: unset;
    top: unset;
    padding: 20px;
    justify-content: center;
    border-radius: 0;
    max-width: 1200px;
    margin-inline: auto;
    box-sizing: border-box;
    display: none;
  }
  .site_logo {
    max-width: 200px;
    img {
      width: 100%;
      height: auto;
      @media (min-width: 1000px) {
        opacity: 1;
      }
    }
  }
  button {
    background-color: #634529;
    color: white;
    padding: 1em;
    border-radius: 10px;
    cursor: pointer;
    @media (min-width: 1000px) {
      display: none;
    }
  }
}

.site_nav {
  position: fixed;
  z-index: 9999;
  top: 0;
  right: 0;
  width: 100%;
  background-color: #634529f4;
  height: 100%;
  display: none;
  padding: 3em;
  box-sizing: border-box;
  &.is_open {
    display: block;
  }
  @media (min-width: 1000px) {
    display: block; /* PCでのみ表示 */
    position: sticky;
    z-index: auto;
    top: 20px; /* ヘッダーの下に固定 */
    right: unset;
    width: 100%;
    height: auto;
    background: none;
    padding: 1em;
    box-sizing: border-box;
    align-self: start; /* グリッドアイテムを上揃え */
    /*background-color: #f8f8f8;*/
    border-radius: 10px;
    /*box-shadow: 0px 0px 15px -5px #777777;*/
    margin-bottom: 2em;
  }
  .site_logo {
    display: none;
    img {
      width: 100%;
      height: auto;
    }
    &:hover {
      opacity: 0.7;
    }
    @media (min-width: 1000px) {
      display: block;
      width: 200px;
      height: auto;
      margin-bottom: 1em;
    }
  }
  header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1em;
    margin-bottom: 2em;
    h2 {
      color: white;
      text-align: center;
      font-size: 2em;
      @media (min-width: 1000px) {
        color: #634529;
        font-size: 1.5em;
        margin-bottom: 0.5em;
        justify-content: center; /* 中央揃え */
      }
    }
    button {
      background-color: white;
      color: #634529;
      padding: 1em;
      border-radius: 10px;
      cursor: pointer;
      @media (min-width: 1000px) {
        display: none;
      }
    }
  }
  ul {
    display: flex;
    flex-direction: column;
    gap: 1em;
    @media (min-width: 1000px) {
      gap: 0.5em;
    }
    li {
      &.sub-level {
        padding-left: 2em;
        @media (min-width: 1000px) {
          padding-left: 1em;
        }
      }
      a {
        color: white;
        text-decoration: none;
        font-size: 1em;
        cursor: pointer;
        font-weight: bold;
        display: flex;
        align-items: center;
        transition: transform 0.3s;
        &:hover {
          transform: translateX(0.5em);
        }
        i {
          margin-right: 0.5em;
          font-size: 1.2em;
          @media (min-width: 1000px) {
            font-size: 1em;
          }
        }
        @media (min-width: 1000px) {
          color: #634529;
          font-size: 0.9em;
          padding: 0.5em 0;
          border-bottom: 1px solid #e0e0e0;
          &:last-child {
            border-bottom: none;
          }
        }
      }
    }
  }
  .login_message {
    margin-top: 2em;
    color: white;
    @media (min-width: 1000px) {
      color: #634529;
      font-size: 0.8em;
      margin-top: 1em;
      padding: 1em;
      background-color: #f0f0f0;
      border-radius: 10px;
    }
  }
}

.page_body {
  padding-inline: 1em;
  box-sizing: border-box;

  @media (min-width: 1000px) {
    padding-inline: 0;
    grid-column: 2; /* PCではグリッドの2列目に配置 */
  }
}

.gray_box {
  max-width: 900px;
  border-radius: 10px;
  box-shadow: 0px 0px 15px -5px #777777;
  background-color: #f5f5f5;
  padding: 2em;
  width: 100%;
  box-sizing: border-box;
  margin-bottom: 3em;
  margin-inline: auto;

  @media (min-width: 1000px) {
    max-width: none; /* PC用では最大幅を無制限に */
    margin-inline: 0; /* 左右マージンをリセット */
  }
}

/*縦に並べて長方形で囲む*/

.common_article_header {
  display: none;
  flex-direction: column;
  gap: 1em;
  justify-content: center;
  align-items: center;
  border: 5px solid #634529;
  border-radius: 10px;
  max-width: 26em;

  padding: 2em 2em;
  margin-block: 2em;

  h1 {
    font-size: 2em;
    color: #634529;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    text-align: center;
  }

  p.description {
    color: #634529;
    text-align: justify;
  }
}

.main-visual-image {
  display: none;
  /*フォールバック*/
  display: contents;
  background: none !important;
  /*高さはブラウザの高さから300px引いた値にする*/
  width: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border-radius: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-inline: auto;

  /*内側シャドウ*/
  box-shadow: inset 0px 4px 34px rgba(0, 0, 0, 0.25);

  &.is_home {
    background-image: url(../images/common/main-visual.jpg?v=3);
  }

  &.is_not_home {
    /*CSSで画像と色を重ねる*/
    background-image: url(../images/common/main-visual.jpg?v=3);
    background-color: rgba(255, 255, 255, 0.7);
    background-blend-mode: overlay;
  }
}
