main {
  background: linear-gradient(to bottom, #fff 80%, #f4faff 100%);
}

.head-title {
  padding: 20px 0;
  height: 180px;
  margin: auto;
  background: url("../images/page-head-bg.jpg") no-repeat center;
}
@media (min-width: 2800px) {
  .head-title {
    background-size: cover;
  }
}
.head-title .inner {
  display: flex;
  align-items: center;
  height: 100%;
}

.head-title .title {
  font-size: 32px;
  font-weight: 600;
  color: #333;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 30px;
  letter-spacing: 2px;
}

.head-title .title span {
  display: block;
  font-size: 16px;
  font-weight: bold;
  color: #666;
}

@media (max-width: 700px) {
  .head-title .inner {
    width: 100%;
    padding: 0 20px;
    justify-content: center;
  }

  .head-title .title {
    flex-direction: column;
    font-size: 24px;
    gap: 0px;
  }

  .head-title .title span {
    font-size: 14px;
  }
}

/* パンくずリスト */
.breadcrumb {
  width: 1040px;
  margin: auto;
  padding: 20px 0;
}
@media (max-width: 1050px) {
  .breadcrumb {
    width: 100%;
    padding: 10px 20px;
  }
}
@media (max-width: 700px) {
  .breadcrumb {
    display: none;
  }
}

.breadcrumb-list {
  display: flex;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 13px;
}

.breadcrumb-item {
  display: flex;
  align-items: center;
}

.breadcrumb-item:not(:last-child)::after {
  content: "";
  background-image: url("../images/breadcrumb-arrow.svg");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  width: 9px;
  height: 9px;
  margin: 0 10px;
  opacity: 0.5;
}

.breadcrumb-link {
  color: #999;
  text-decoration: none;
  transition: color 0.3s ease;
}

.breadcrumb-link:hover {
  color: #222681;
}

.breadcrumb-current {
  color: #000;
  font-weight: normal;
}

.content {
  display: flex;
  gap: 40px;
  padding: 40px 0 0;
  width: 1040px;
  margin: auto;
}
@media (max-width: 1050px) {
  .content {
    flex-direction: column;
    gap: 5px;
    padding: 20px;
    width: auto;
  }
}

/* サイドバー */
.sidebar-nav {
  flex: 0 0 210px;
  padding: 0;
  border-radius: 8px;
}
@media (max-width: 1050px) {
  .sidebar-nav {
    flex: none;
    width: 100%;
    position: relative;
  }
}
.sidebar-nav.open {
  margin-bottom: 30px;
}

/* ドロップダウンメニュートグル */
.dropdown-toggle {
  display: none;
  width: 100%;
  background: #ffffff;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  padding: 15px 20px;
  font-size: 16px;
  font-weight: 600;
  color: #333;
  cursor: pointer;
  position: relative;
  text-align: left;
}

.dropdown-toggle::after {
  content: "";
  position: absolute;
  right: 20px;
  top: 50%;
  width: 16px;
  height: 16px;
  background-image: url("../images/arrow-bottom.svg");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  transform: translateY(-50%);
  transition: transform 0.2s ease;
}

.dropdown-toggle.active::after {
  transform: translateY(-50%) rotate(180deg);
}

@media (max-width: 1050px) {
  .dropdown-toggle {
    display: block;
  }

  .nav-title,
  .page-navigation {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-5px);
    transition: max-height 0.2s ease-out, opacity 0.2s ease-out,
      transform 0.2s ease-out;
  }

  .sidebar-nav.open .nav-title {
    max-height: 80px;
    opacity: 1;
    transform: translateY(0);
    padding-top: 20px;
  }

  .sidebar-nav.open .page-navigation {
    max-height: 1000px;
    opacity: 1;
    transform: translateY(0);
    border-radius: 0 0 8px 8px;
    border-top: none;
    margin-top: -1px;
    overflow-y: auto;
  }
}

.nav-title {
  font-size: 18px;
  font-weight: 600;
  margin: 0;
  padding: 0 0 20px;
  border-bottom: solid 1px #ccc;
}

.nav-title a {
  display: block;
}
.nav-title a:hover {
  color: #222681;
}

.page-navigation {
  border-radius: 0 0 8px 8px;
}

.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-item {
  border-bottom: 1px solid #e5e5e5;
}

.nav-item:last-child {
  margin-bottom: 20px;
}

/* タブレット・モバイルでのアニメーション効果 */
@media (max-width: 1050px) {
  .nav-item {
    opacity: 0;
    transition: opacity 0.2s ease-out, transform 0.2s ease-out;
  }

  .sidebar-nav.open .nav-item {
    opacity: 1;
    /* transform: translateX(0); */
  }
}

.nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0 16px 16px;
  text-decoration: none;
  color: #333;
  transition: all 0.2s ease;
  font-size: 14px;
}

.nav-link:hover {
  background: linear-gradient(to left, #fff, #f4faff);
  color: #222681;
  text-shadow: 0 0 0.5px currentColor, 0 0 0.5px currentColor;
}

.nav-item.current .nav-link {
  color: #222681;
  text-shadow: 0 0 0.5px currentColor, 0 0 0.5px currentColor;
  background: linear-gradient(to left, #fff, #f4faff);
}

.nav-text {
  flex: 1;
  padding-right: 5px;
}

.nav-arrow {
  color: #222681;
  font-weight: bold;
  opacity: 1;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

/* 戻るボタン用の矢印アイコンを左右反転 */
.back-arrow {
  transform: scaleX(-1);
}

/* 戻るリンク専用のスタイル */
.back-link {
  display: flex;
  align-items: center;
  gap: 8px;
}

.back-link .nav-text {
  padding-right: 0;
}

/* .nav-link:hover .nav-arrow {
  transform: translateX(2px);
} */

/* メインコンテンツ */
.main-content {
  flex: 1;
  padding: 0 0 100px 40px;
  border-left: solid 1px #e5e5e5;
  position: relative;
  overflow-x: hidden;
}
@media (max-width: 1050px) {
  .main-content {
    border-left: none;
    padding: 0 0 40px;
  }
}

.main-content h1 {
  font-size: 32px;
  margin-bottom: 30px;
  border-left: solid 5px #222681 !important;
  position: relative;
  margin-left: -40px;
  padding-left: 35px;
  line-height: 2.5rem;
  font-weight: normal;
}
@media (max-width: 1050px) {
  .main-content h1 {
    margin: 0 auto 20px;
    padding-left: 15px;
  }
}
@media (max-width: 700px) {
  .main-content h1 {
    font-size: 24px;
    margin-bottom: 20px;
  }
}

.main-content p {
  line-height: 1.7;
  margin-top: 10px;
  margin-bottom: 25px;
  letter-spacing: 0.02em;
}

/* サイドバーがない場合のメインコンテンツ */
.main-content.no-sidebar {
  border-left: none;
  padding: 0 0 140px;
}
@media (max-width: 1050px) {
  .main-content.no-sidebar {
    padding: 0 0 100px;
  }
}
@media (max-width: 700px) {
  .main-content.no-sidebar {
    padding: 0 0 80px;
  }
}

.main-content.no-sidebar h1 {
  margin-left: 0;
  margin-bottom: 50px;
}
@media (max-width: 700px) {
  .main-content.no-sidebar h1 {
    margin-left: 0;
    margin-bottom: 30px;
  }
}

/* 子ページカードグリッド */
.child-pages-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px 40px;
  width: 100%;
}
@media (max-width: 1050px) {
  .child-pages-grid {
    gap: 25px;
  }
}
@media (max-width: 700px) {
  .child-pages-grid {
    gap: 20px;
    grid-template-columns: 1fr;
  }
}

/* 子ページカード */
.child-page-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(to top, #fafafa, #ffffff);
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  padding: 30px;
  text-decoration: none;
  color: #333;
  transition: all 0.3s ease;
  position: relative;
  overflow: visible;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}
@media (max-width: 700px) {
  .child-page-card {
    padding: 20px;
    box-shadow: 0 2px 1px rgba(0, 0, 0, 0.03);
  }
}

.child-page-card::before {
  content: "";
  position: absolute;
  left: -1px;
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
  height: 16px;
  background: #222681;
  border-radius: 0 8px 8px 0;
  z-index: 2;
}

/* .child-page-card::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to right, #f4faff, #fff);
  border-radius: 8px;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1;
}

.child-page-card:hover::after {
  opacity: 1;
} */

.child-page-title {
  font-size: 20px;
  font-weight: 600;
  margin: 0;
  flex: 1;
  transition: color 0.3s ease;
  position: relative;
  z-index: 2;
}
@media (max-width: 700px) {
  .child-page-title {
    font-size: 17px;
  }
}

.child-page-card:hover .child-page-title {
  color: #222681;
}

.child-page-arrow {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease;
  position: relative;
  z-index: 2;
}

.child-page-card:hover .child-page-arrow {
  transform: translateX(3px);
}

.child-page-arrow img {
  width: 16px;
  height: 16px;
}

/* パターン2: テーブル形式の子ページ表示 */
.child-pages-table {
  width: 100%;
  margin-top: 20px;
  position: relative;
  overflow-x: auto;
  scrollbar-width: thin; /* Firefox */
}

/* Webkit系ブラウザ（Chrome, Safari, Edge）のスクロールバースタイル */
.child-pages-table::-webkit-scrollbar {
  height: 8px;
}

.child-pages-table::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
  margin: 0 10px;
}

.child-pages-table::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 4px;
}

.child-pages-table::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

/* スクロール可能なテーブルのみ上部にスペース確保 */
.child-pages-table.has-scroll {
  padding-top: 25px;
}

/* スクロールヒント */
.child-pages-table.has-scroll::before {
  content: "スクロールできます→";
  position: absolute;
  top: 0;
  left: 0;
  background: rgba(0, 0, 0, 0.05);
  color: #666;
  padding: 6px 10px;
  font-size: 11px;
  font-weight: normal;
  border-radius: 3px;
  z-index: 10;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.child-pages-table.has-scroll.scrolled::before {
  opacity: 0;
}

.pages-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.table-row {
  border-bottom: 1px solid #e5e5e5;
}

.table-row:last-child {
  border-bottom: none;
}

.table-cell {
  padding: 0;
  vertical-align: middle !important;
}

.table-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px;
  text-decoration: none;
  color: #333;
  transition: all 0.3s ease;
  width: 100%;
  position: relative;
}

.table-title {
  font-size: 18px;
  font-weight: 500;
  flex: 1;
}

.table-arrow {
  width: 16px;
  height: 16px;
  transition: transform 0.3s ease;
}

@media (max-width: 700px) {
  .table-link {
    padding: 15px 20px;
  }

  .table-title {
    font-size: 16px;
  }
}

/* パターン3: 詳細ブロック形式の子ページ表示 */
.child-pages-details {
  display: flex;
  flex-direction: column;
  gap: 30px;
  margin-top: 30px;
}

.detail-block {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.detail-link {
  display: block;
  padding: 40px;
  text-decoration: none;
  color: inherit;
  position: relative;
}

.main-content .detail-title {
  font-size: 20px;
  font-weight: 600;
  margin: 0 0 15px 0;
  color: #333;
}

.main-content .detail-description {
  line-height: 1.6;
  color: #666;
  margin: 0 0 30px 0;
  padding-left: 0;
}

.detail-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #383c9e 0%, #222681 100%);
  color: #fff !important;
  text-decoration: none;
  font-weight: 500;
  padding: 20px 60px 20px 32px;
  border-radius: 12px;
  transition: all 0.3s ease;
  position: relative;
  margin: auto;
  min-width: 200px;
  font-size: 18px;
}
.detail-btn::after {
  content: "";
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  background: url(../images/arrow-right.svg) center no-repeat;
  background-size: contain;
  transition: transform 0.3s ease;
}
.detail-link:hover .detail-btn::after {
  transform: translateX(4px) translateY(-50%);
}
@media (max-width: 700px) {
  .detail-btn {
    padding: 15px 45px 15px 20px;
    font-size: 13px;
    min-width: 150px;
  }
  .detail-btn::after {
    right: 15px;
    width: 15px;
    height: 15px;
  }
}

@media (max-width: 700px) {
  .child-pages-details {
    gap: 15px;
  }

  .detail-link {
    padding: 20px;
  }

  .detail-title {
    font-size: 18px;
  }

  .detail-description {
    font-size: 13px;
    margin-bottom: 15px;
  }

  .detail-arrow {
    right: 20px;
  }

  .detail-arrow img {
    width: 16px;
    height: 16px;
  }
}

/* アーカイブページ */
.archive .main-content {
  overflow: visible;
}
.news-archive-item {
  border-bottom: 1px solid #e5e5e5;
}

.news-archive-link {
  display: flex;
  align-items: flex-start;
  gap: 30px;
  padding: 20px 0;
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
}
@media (max-width: 700px) {
  .news-archive-link {
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
    padding: 15px 0;
  }
}
.news-archive-link:hover {
  padding-left: 10px;
  padding-right: 10px;
  margin-left: -10px;
  margin-right: -10px;
  background: linear-gradient(to left, #fff, #f4faff);
  text-shadow: 0 0 0.5px currentColor, 0 0 0.5px currentColor;
}

.news-archive-link .news-date {
  flex-shrink: 0;
  font-size: 16px;
  color: #666666;
  font-weight: 400;
}
@media (max-width: 700px) {
  .news-archive-link .news-date {
    font-size: 14px;
  }
}

.news-archive-link .news-title {
  flex: 1;
  margin: 0;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.6;
  color: #333333;
  transition: color 0.3s ease;
  display: flex;
  gap: 30px;
  align-items: center;
  width: 100%;
}
@media (max-width: 700px) {
  .news-archive-link .news-title {
    font-size: 14px;
    gap: 10px;
  }
}

.news-archive-link:hover .news-title {
  color: #222681;
}

.news-archive-link .news-arrow {
  flex-shrink: 0;
  margin: 0 0 0 auto;
  transition: transform 0.3s ease;
}

/* 検索結果ページ */
.search .main-content {
  overflow: visible;
}
.search-info {
  margin-bottom: 40px;
  padding: 20px;
  background-color: #f8f9fa;
  border-radius: 8px;
}

.main-content .search-query {
  margin: 0;
}

.search-count {
  color: #666;
  font-weight: normal;
  margin-left: 10px;
}

/* 検索結果専用のレイアウト */
.search-results .news-archive-link {
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
}

.search-results .news-title {
  flex-direction: row;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin-bottom: 0;
}

/* 検索結果の抜粋文 */
.search-excerpt {
  font-size: 13px;
  color: #666;
  line-height: 1.5;
  margin-top: 8px;
  width: 100%;
}

@media (max-width: 700px) {
  .search-excerpt {
    font-size: 11px;
  }
}

/* 検索結果なしの場合 */
.no-results {
  text-align: center;
  padding: 60px 20px;
}

.no-results > p {
  font-size: 18px;
  margin-bottom: 40px;
  color: #666;
}

.search-suggestions {
  text-align: left;
  max-width: 400px;
  margin: 0 auto 40px;
}

.search-suggestions h3 {
  font-size: 16px;
  margin-bottom: 15px;
  color: #333;
}

.search-suggestions ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.search-suggestions li {
  padding: 8px 0;
  border-bottom: 1px solid #eee;
  font-size: 14px;
  color: #666;
}

.search-suggestions li:last-child {
  border-bottom: none;
}

/* 再検索フォーム */
.search-again {
  max-width: 400px;
  margin: 0 auto;
  text-align: left;
}

.search-again h3 {
  font-size: 16px;
  margin-bottom: 15px;
  color: #333;
}

.search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  border-radius: 25px;
  overflow: hidden;
  border: 1px solid #ddd;
  background: #fff;
}

.search-input-page {
  flex: 1;
  padding: 12px 20px;
  border: none;
  font-size: 14px;
  background: transparent;
  outline: none;
}

.search-input-page::placeholder {
  color: #999;
}

.search-submit-page {
  background: #222681;
  color: white;
  border: none;
  padding: 12px 20px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background-color 0.3s ease;
  padding: 12.2px 10px;
  width: 20%;
  min-width: 80px;
}

.search-submit-page:hover {
  background: #1a1d5a;
}

@media (max-width: 1200px) {
  .search-input-page {
    padding: 12px 10px;
    width: 80%;
  }
}

@media (max-width: 1050px) {
  .search-info {
    margin-bottom: 30px;
    padding: 15px;
  }
}

@media (max-width: 700px) {
  .search-info {
    margin-bottom: 20px;
    padding: 12px;
  }

  .no-results {
    padding: 40px 15px;
  }

  .no-results > p {
    font-size: 16px;
    margin-bottom: 30px;
  }
}

/* ページネーション（WP PageNavi） */
.wp-pagenavi {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin: 40px 0;
}
.wp-pagenavi .pages {
  display: none;
}

.wp-pagenavi a,
.wp-pagenavi span.current,
.wp-pagenavi span.extend {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 16px;
  font-weight: normal;
  transition: all 0.3s ease;
  background: #ffffff;
  color: #333333;
}

/* 現在のページ */
.wp-pagenavi span.current {
  background: linear-gradient(135deg, #383c9e 0%, #222681 100%);
  color: #ffffff !important;
}

/* 通常のページリンク */
.wp-pagenavi a:hover {
  background: linear-gradient(to left, #ecfaff, #f4faff);
  color: #222681;
  border-color: #bfbfbf !important;
}

/* 前後のナビゲーション */
.wp-pagenavi a.previouspostslink,
.wp-pagenavi a.nextpostslink {
  background-image: url(../images/page-nav.svg);
  background-repeat: no-repeat;
  background-position: center;
  font-size: 0;
  border: none;
  padding: 0;
}
.wp-pagenavi a.previouspostslink {
  transform: rotate(180deg);
}

.wp-pagenavi a.previouspostslink:hover,
.wp-pagenavi a.nextpostslink:hover {
  opacity: 0.8;
}

/* 省略記号 */
.wp-pagenavi span.extend {
  border: none;
  background: transparent;
  color: #999999;
  cursor: default;
}

/* モバイル対応 */
@media (max-width: 700px) {
  .wp-pagenavi {
    gap: 6px;
    margin: 30px 0;
  }

  .wp-pagenavi a,
  .wp-pagenavi span.current,
  .wp-pagenavi span.extend {
    width: 36px;
    height: 36px;
    font-size: 14px;
  }
}

/* ニュース記事専用のスタイル */
.news-single {
  margin-bottom: 0;
}

/* 記事終了後のボーダー */
.news-border {
  border: none;
  height: 1px;
  background-color: #e5e5e5;
  margin: 60px 0 40px;
}

/* ニュース記事ナビゲーション */
.news-post-navigation {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 40px;
}

.news-nav-previous,
.news-nav-next {
  flex: 1;
}

.news-nav-previous a {
  justify-content: flex-start;
}
.news-nav-next a {
  justify-content: flex-end;
}

.news-nav-link {
  display: flex;
  align-items: center;
  gap: 15px;
  text-decoration: none;
  font-size: 16px;
  transition: opacity 0.3s ease;
}

.news-nav-link:hover {
  opacity: 0.8;
}

.news-nav-arrow {
  width: 30px;
  height: auto;
  flex-shrink: 0;
}

/* 前のお知らせ用の矢印を左右反転 */
.prev-arrow {
  transform: scaleX(-1);
}

/* 一覧に戻るボタン */
.news-back-button {
  text-align: center;
  margin: 40px 0;
}

.news-back-button .button-blue {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #383c9e 0%, #222681 100%);
  color: #fff !important;
  text-decoration: none;
  font-weight: 500;
  padding: 16px 32px;
  border-radius: 8px;
  transition: all 0.3s ease;
  min-width: 200px;
  font-size: 16px;
}

.news-back-button .button-blue:hover {
  opacity: 0.8;
}

/* シングルニュースページ専用：タブレット以下でサイドバーを非表示 */
@media (max-width: 1050px) {
  .single-news .sidebar-nav {
    display: none;
  }

  .single-news .content {
    display: block;
  }
}

/* モバイル対応 */
@media (max-width: 700px) {
  .news-post-navigation {
    gap: 8px;
  }

  .news-nav-next {
    text-align: left;
  }

  .news-nav-link {
    font-size: 13px;
    justify-content: center;
    gap: 10px;
  }
  .news-nav-arrow {
    width: 20px;
  }

  .news-border {
    margin: 40px 0 30px;
  }

  .news-back-button .button-blue {
    padding: 12px 24px;
    font-size: 13px;
    min-width: 180px;
  }
}

/* Snow Monkey Forms（お問い合わせフォーム） */
.smf-placeholder[data-name="consent"] {
  text-align: center;
}
.smf-action .smf-button-control__control[data-action="confirm"],
.smf-action .smf-button-control__control[data-action="complete"] {
  border-radius: 12px;
  border: none;
  padding: 15px 30px;
  background: linear-gradient(135deg, #383c9e 0%, #222681 100%);
  color: #fff;
  min-width: 200px;
}
.smf-action .smf-button-control__control[data-action="back"] {
  border-radius: 12px;
  padding: 15px 30px;
  background: #999;
  color: #fff;
}
.main-content ol.smf-progress-tracker {
  padding-left: 0;
}
.smf-placeholder {
  word-break: break-word;
}
