.button {
  display: inline-block;
  padding: 15px 100px;
  border: 1px solid #333;
  border-radius: 30px;
  font-size: 14px;
  letter-spacing: 0.2em;
  transition: all 0.3s ease;

  &:hover {
    background-color: #333;
    color: #fff;
  }

  @media (max-width: 768px) {
    font-size: 12px;
    padding: 20px 60px;
  }
}
/* Section Title */
.section-title {
  font-size: 32px;
  font-weight: 600;
  text-align: center;
  margin-bottom: 50px;
  letter-spacing: 0.1em;

  font-family: 'Noto Serif JP', serif;
  line-height: 1.6;
  color: #333;

  @media (max-width: 768px) {
    font-size: 24px;
    margin-bottom: 30px;
  }
}
/* Hamburger Menu Button */
.hamburger-menu {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 23px;
  position: relative;
  z-index: 1001;

  @media (max-width: 768px) {
    display: block;
  }

  span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: #333;
    position: absolute;
    left: 0;
    transition: all 0.3s ease;

    &:nth-child(1) {
      top: 0;
    }

    &:nth-child(2) {
      top: 50%;
    }

    &:nth-child(3) {
      bottom: 0;
    }
  }
}
/* Hamburger Menu Active State */
.hamburger-menu.active {
  span {
    &:nth-child(1) {
      top: 50%;
      transform: translateY(-50%) rotate(45deg);
    }

    &:nth-child(2) {
      opacity: 0;
    }

    &:nth-child(3) {
      bottom: 50%;
      transform: translateY(50%) rotate(-45deg);
    }
  }
}

/* header */
header {
  position: fixed;
  width: 100%;
  top: 0;
  left: 0;
  background: #f4f5f7;
  z-index: 1000;
  opacity: 1;
  visibility: visible;

  .header-nav {
    height: 70px;
    margin: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;

    @media (max-width: 768px) {
      height: 50px;
    }
  }
}

.header-nav {
  .logo {
    height: clamp(30px, 6vw, 50px);

    img {
      height: 100%;
      width: auto;
    }
  }

  .nav-menu {
    display: flex;
    gap: 32px;
    list-style: none;
    font-size: 1rem;

    @media (max-width: 768px) {
      position: fixed;
      top: 0;
      right: -100%;
      width: 60%;
      height: 100vh;
      background: #f4f5f7;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 30px;
      transition: right 0.3s ease;
      padding: 80px 0;
      box-shadow: -2px 0 5px rgba(0, 0, 0, 0.1);
      text-align: center;

      &.active {
        right: 0;
      }

      a,
      button {
        display: block;
        width: 100%;
        text-align: center;
        padding: 10px 0;
      }

      li {
        width: 100%;

        a {
          width: 100%;
          padding: 15px 0;
        }
      }
    }

    a {
      text-decoration: none;
      color: #333;
      font-weight: 500;
      transition: color 0.3s ease;

      &:hover {
        color: #007aff;
      }
    }
  }
}

.header-nav {
  .nav-menu {
    .has-dropdown {
      position: relative;

      .dropdown-trigger {
        cursor: pointer;
        user-select: none;
        background: none;
        border: none;
        padding: 0;
        font: inherit;
        color: inherit;
        display: inline-flex;
        align-items: center;

        @media (max-width: 768px) {
          justify-content: center;
        }

        &:hover {
          color: #007aff;
        }

        &::after {
          content: '';
          display: inline-block;
          width: 6px;
          height: 6px;
          border-right: 2px solid currentColor;
          border-bottom: 2px solid currentColor;
          margin-left: 8px;
          transform: rotate(45deg);
          transition: transform 0.3s ease;
          position: relative;
          top: -2px;
        }
      }

      &.is-active .dropdown-trigger {
        &::after {
          transform: rotate(-135deg);
          top: 1px;
        }
      }
    }
  }
}
.header-nav {
  .nav-menu {
    .has-dropdown {
      .dropdown-menu {
        position: absolute;
        top: 100%;
        left: 50%;
        transform: translateX(-50%) translateY(-10px);
        background: #f4f5f7;
        min-width: 150px;
        padding: 8px 0;
        opacity: 0;
        margin-top: 30px;
        visibility: hidden;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1000;
        pointer-events: none;

        @media (max-width: 768px) {
          position: static;
          transform: none;
          background: transparent;
          box-shadow: none;
          padding: 0;
          max-height: 0;
          opacity: 1;
          visibility: visible;
          margin-top: 0;
          overflow: hidden;
          transition: all 0.3s ease;
          width: 100%;
          text-align: center;
        }

        &.is-active {
          opacity: 1;
          visibility: visible;
          pointer-events: auto;

          @media (max-width: 768px) {
            max-height: 200px;
            margin-top: 8px;
          }
        }

        li {
          list-style: none;

          &:first-child {
            position: relative;

            a {
              padding-bottom: 12px;
            }

            &::after {
              content: '';
              position: absolute;
              bottom: 0;
              left: 20px;
              right: 20px;
              height: 1px;
              background-color: #ddd;

              @media (max-width: 768px) {
                background-color: rgba(0, 0, 0, 0.1);
                left: 30%;
                right: 20%;
                width: 40%;
                margin: 0 auto;
              }
            }
          }

          &:last-child {
            a {
              padding-top: 12px;
            }
          }

          a {
            display: block;
            padding: 8px 16px;
            text-align: center;
            font-size: 15px;
            transition: all 0.3s ease;

            @media (max-width: 768px) {
              padding: 8px 0;
              font-size: 14px;
              text-align: center;
            }

            &:hover {
              background: #e8e9eb;

              @media (max-width: 768px) {
                background: transparent;
              }
            }
          }
        }
      }
    }
  }
}
/* header end */

/* footer */
footer {
  background-color: #f4f5f7;
  border-top: 1px solid #eee;
  padding: 20px 30px;

  @media (max-width: 768px) {
    padding: 10px 20px 15px;
  }

  .footer-content {
    max-width: 1200px;
    margin: 40px auto 70px;
    display: flex;
    justify-content: space-between;

    @media (max-width: 1200px) {
      padding: 0 20px;
    }

    @media (max-width: 768px) {
      margin: 20px auto 20px;
      flex-direction: column;
      align-items: center;
      text-align: center;
      gap: 40px;
    }

    .footer-left-column {
      .footer-center {
        flex: 0 0 auto;

        .footer-nav {
          ul {
            list-style: none;
            display: flex;
            gap: 30px;

            @media (max-width: 1024px) {
              gap: 20px;
            }

            @media (max-width: 768px) {
              flex-direction: column;
              align-items: center;
              gap: 15px;
            }

            li {
              a {
                color: #333;
                font-size: 13px;
                letter-spacing: 0.1em;
                transition: opacity 0.3s ease;

                &:hover {
                  opacity: 0.7;
                }
              }
            }
          }
        }
      }

      .footer-left {
        flex: 0 0 auto;
        max-width: 800px;
        display: flex;
        align-items: center;
        gap: 30px;

        @media (max-width: 768px) {
          gap: 15px;
          text-align: center;
        }

        .footer-logo {
          flex: 0 0 auto;

          img {
            height: clamp(75px, 10vw, 100px);
            width: auto;
          }
        }

        .company-description {
          flex: 1;
          text-align: left;
          font-size: 12px;
          color: #333;

          @media (max-width: 768px) {
            font-size: 11px;
          }

          p {
            margin: 0;
          }
        }
      }
    }

    .footer-right {
      flex: 0 0 auto;
      display: flex;
      align-items: flex-start;
      gap: 30px;

      @media (max-width: 768px) {
        flex-direction: column;
        gap: 20px;
        align-items: center;
        width: 100%;
      }

      .follow-us {
        text-align: center;
        position: relative;
        padding-left: 30px;

        @media (max-width: 768px) {
          padding-left: 0;
          padding-bottom: 20px;
          border-bottom: 1px solid #333;
          width: 100%;
          max-width: 170px;

          &::before {
            display: none;
          }
        }

        &::before {
          content: '';
          position: absolute;
          left: 0;
          top: 0;
          height: 100px;
          width: 1px;
          background-color: #333;
        }

        h4 {
          font-size: clamp(18px, 2vw, 18px);
          letter-spacing: 0.1em;
          color: #333;
        }
        .subtitle {
          font-size: clamp(11px, 1.5vw, 12px);
          color: #666;
          margin-bottom: 15px;
        }

        .twitter-link {
          display: inline-block;
          width: 25px;
          height: 25px;

          img {
            width: 100%;
            height: 100%;
          }
        }
      }

      .contact-button {
        position: relative;
        padding-left: 30px;
        text-align: center;

        @media (max-width: 768px) {
          padding-left: 0;
          padding-top: 20px;
          width: 100%;
          max-width: 200px;

          &::before {
            display: none;
          }
        }

        &::before {
          content: '';
          position: absolute;
          left: 0;
          top: 0;
          height: 100px;
          width: 1px;
          background-color: #333;
        }

        h4 {
          font-size: clamp(18px, 2vw, 18px);
          letter-spacing: 0.1em;
          color: #333;
        }

        .subtitle {
          font-size: clamp(11px, 1.5vw, 12px);
          color: #666;
          margin-bottom: 15px;
        }

        .button {
          background-color: #000;
          color: #fff;
          padding: 8px 16px;
          font-size: 12px;
          border-radius: 25px;
          border: 1px solid transparent;
          min-width: 120px;
          width: 100%;
          text-align: center;

          @media (max-width: 768px) {
            padding: 20px 16px;
            max-width: 170px;
            border-radius: 40px;
          }

          &:hover {
            background-color: #fff;
            color: #000;
            border: 1px solid #000;
          }
        }
      }
    }
  }

  .copyright {
    text-align: center;
    padding-top: 20px;
    font-size: 11px;
    color: #666;

    @media (max-width: 768px) {
      padding-top: 40px;
    }
  }
}
/* footer end */

/*トピックス一覧ページのスタイル */
/* 記事一つひとつのスタイル */
.topics-item {
  display: flex; /* 日付とタイトルを横並びにする */
  align-items: center; /* 上下の位置を中央に揃える */
  padding: 1.5em 0;
}

/* 日付のスタイル */
.topics-item__date {
  margin-right: 1.5em; /* タイトルとの間の余白 */
  font-size: 0.9em;
  color: #666;
  flex-shrink: 0; /* 幅が狭まっても日付が改行されにくくする */
}

/* タイトルのスタイル */
.topics-item__title {
  margin: 0;
  font-size: 1.1em;
}
.topics-item__title a {
  color: #1a0dab;
  text-decoration: none; /* 下線を消す */
}
.topics-item__title a:hover {
  text-decoration: underline; /* マウスを乗せたら下線を出す */
}

/* ページネーション全体の位置調整 */
.pagination {
  margin-top: 40px;
  text-align: center;

  .screen-reader-text {
    display: none;
  }
}

/* ページ番号のリスト */
.nav-links {
  display: inline-flex;
  gap: 5px; /* 番号間の余白 */
}

/* 各ページ番号のスタイル */
.page-numbers {
  display: inline-block;
  padding: 8px 15px;
  border: 1px solid #ccc;
  color: #333;
  text-decoration: none;
  border-radius: 4px;
}

/* 現在表示しているページの番号のスタイル */
.page-numbers.current {
  background-color: #333;
  color: #fff;
  border-color: #333;
}

/* マウスを乗せた時のスタイル */
.page-numbers:not(.current):hover {
  background-color: #f0f0f0;
}

/* ----------------------- 
  ------------------------
-------------------------*/

/* Contact Page Styles */
.contact-main {
  padding-top: 75px; /* ヘッダーの高さ分 */
  padding-bottom: 100px;
  background-color: #fafafa;
  @media screen and (max-width: 768px) {
    padding-top: 75px;
  }
}

.page-title {
  text-align: center;
  font-size: 32px;
  margin: 50px auto 16px;
  font-weight: 800;

  font-family: 'Noto Serif JP', serif;
  line-height: 1.6;
  color: #333;

  @media screen and (max-width: 768px) {
    margin-top: 30px;
  }
}

.wpcf7-form {
  max-width: 1000px; /* 最大幅を1000pxに変更 */
  margin: 0 auto;
  padding: 0 20px;
}

.contact-description {
  text-align: center;
  margin-bottom: 60px;
  line-height: 1.8;
  font-size: 14px;
}

/* フォームスタイル */
.contact-form {
  max-width: 800px;
  width: calc(100% - 40px);
  margin: 0 auto;
  background-color: #fff;
  padding: 40px 80px;
}

.form-group {
  margin-bottom: 24px;
  display: flex;
}

.form-label {
  width: 180px; /* ラベルの幅を180pxに拡大 */
  padding-top: 8px;
  font-size: 0.875rem;
  flex-shrink: 0;
}

.form-field {
  flex: 1;
}

.required {
  display: inline-block;
  background: #333;
  color: #fff;
  font-size: 0.6875rem;
  padding: 1px 6px;
  margin-left: 8px;
  border-radius: 2px;
}

/* ラジオボタン */
.radio-group {
  display: flex;
  gap: 24px;
  padding-top: 8px;
}

.radio-label {
  display: flex;
  align-items: center;
  cursor: pointer;
  font-size: 0.875rem;
}

.radio-label input[type='radio'] {
  margin-right: 8px;
  cursor: pointer;
}

/* セレクトボックス */
.form-select {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: #fff;
  font-size: 14px;
  color: #666;
}

/* 入力フィールド */
.form-input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
}

/* テキストエリア */
.form-textarea {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  resize: vertical;
  min-height: 160px;
  font-size: 14px;
}

/* プライバシーセクション */
.privacy-section {
  margin: 40px 0;
}

.privacy-title {
  font-size: 14px;
  margin-bottom: 12px;
}

.privacy-content {
  height: 140px;
  overflow-y: auto;
  margin-bottom: 16px;
  padding: 16px;
  background: #f8f8f8;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  line-height: 1.6;
}

.privacy-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 14px;
}

.privacy-checkbox input[type='checkbox'] {
  cursor: pointer;
}

/* 送信ボタン */
.form-button {
  text-align: center;
}

.back-button {
  background: #fff;
  color: #000;
  border: 1px solid #ccc;
  width: 100%;
  max-width: 200px;
  padding: 10px 20px;
  font-size: 14px;
  border-radius: 30px;
  cursor: pointer;
  transition:
    background 0.3s,
    color 0.3s,
    border-color 0.3s;

  &:hover {
    opacity: 0.7;
  }
}

.submit-button {
  background: #000;
  color: #fff;
  border: 1px solid transparent;
  width: 100%;
  max-width: 200px;
  padding: 10px 20px;
  font-size: 14px;
  border-radius: 30px;
  cursor: pointer;
  transition:
    background 0.3s,
    color 0.3s,
    border-color 0.3s;
}

.submit-button:hover {
  background: #fff;
  border-color: #000;
  color: #000;
}

/* フォーム要素のプレースホルダー */
::placeholder {
  color: #999;
}

/* レスポンシブ対応 */
@media screen and (max-width: 768px) {
  .contact-container {
    max-width: 100%;
  }

  .form-group {
    flex-direction: column;
  }

  .form-label {
    width: 100%;
    margin-bottom: 8px;
    padding-top: 0;
  }

  .radio-group {
    padding-top: 0;
  }

  .contact-form {
    padding: 30px 40px;
  }
}

@media screen and (max-width: 480px) {
  .page-title {
    font-size: 24px;
    margin-bottom: 16px;
  }

  .contact-description {
    margin-bottom: 40px;
  }

  .form-group {
    margin-bottom: 20px;
  }

  .privacy-section {
    margin: 30px 0;
  }

  .submit-button {
    width: 100%;
  }

  .contact-form {
    padding: 20px 20px 50px;
  }
}

/* エラーメッセージ全体 */
.form-errors {
  max-width: 800px;
  width: 100%;
  color: red;
  padding: 15px;
  margin: 0 auto 10px;
}

/* エラーメッセージ内のPタグ */
.form-errors p {
  margin: 0;
  font-size: 0.875rem;
}

/* エラーメッセージ内のリスト */
.form-errors ul {
  margin: 10px 0 0;
  padding-left: 20px;
  font-size: 0.875rem;
}

/* 確認画面のボタンエリア */
.confirm-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 50px;
  flex-direction: column;
  align-items: center;
}

/* 完了（サンクス）画面 */
.thanks-message {
  text-align: center;
  padding: 40px 20px 120px;
  max-width: 800px;
  width: 100%;
  margin: 50px auto;
  background-color: #fff;
  border-radius: 15px;

  @media screen and (max-width: 768px) {
    margin: 50px 20px;
    width: fit-content;
  }

  h2 {
    font-size: clamp(20px, 1.5vw, 32px);
  }

  .thanks-gif {
    margin: 40px auto 60px;
  }

  p {
    font-size: clamp(14px, 1.5vw, 16px);
  }
  .return-top {
    margin: 50px auto;
    background: #000;
    color: #fff;
    border: 1px solid transparent;
    width: 100%;
    max-width: 200px;
    padding: 10px 20px;
    font-size: 14px;
    border-radius: 30px;
    cursor: pointer;
    transition:
      background 0.3s,
      color 0.3s,
      border-color 0.3s;

    &:hover {
      background: #fff;
      border-color: #000;
      color: #000;
    }
  }
}
