/******************************************************
 * Base Reset & Typography
 ******************************************************/

html {
  font-size: 62.5%;
  /* = 1rem → 10px換算 */
  scroll-behavior: smooth;
}

body {
  font-size: 2rem;
  /*font-family: "Noto Sans JP", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Meiryo", sans-serif;*/
  line-height: 1.8;
  margin: 0;
  padding: 0;
}

/* Font Size */
.text-normal {
  font-size: 2rem;
}

.text-small {
  font-size: 1.6rem;
}

.text-xsmall {
  font-size: 1.4rem;
}

.text-large {
  font-size: 2.4rem;
}

.text-xlarge {
  font-size: 3.2rem;
}

.text-reset {
  all: unset;
  /* ほぼすべてのスタイルをリセット（親継承以外） */
  font: inherit;
  color: inherit;
  text-decoration: none;
  letter-spacing: normal;
  font-weight: normal;
  font-style: normal;
  display: inline;
  /* spanやaにも安全 */
}

@media (max-width: 768px) {
  body {
    font-size: 1.8rem;
    line-height: 1.8;
  }

  /* Font Size */
  .text-normal {
    font-size: 1.8rem;
  }
  .text-small {
    font-size: 1.5rem;
  }
  .text-xsmall {
    font-size: 1.3rem;
  }
  .text-large {
    font-size: 2rem;
  }
  .text-xlarge {
    font-size: 2.6rem;
  }
}

/******************************************************
 * Common Elements
 ******************************************************/

img {
  max-width: 100%;
  height: auto;
  vertical-align: middle;
}

a {
  color: #004AAD;
  text-decoration: none;
  transition: 0.2s ease;
}

a:hover,
a:focus {
  color: #FD5F00;
  text-decoration: underline;
}

/* ボタンのリンク下線を常に削除 */
.wp-block-button__link,
.wp-block-button__link:hover,
.wp-element-button,
.wp-element-button:hover {
  text-decoration: none !important;
}

.wp-block-button__link:hover,
.wp-element-button:hover {
  color: #ffffff;
  background-color: #FD5F00;
}

/******************************************************
 * Header layout & typography
 ******************************************************/
.header-inner {
  width: 84%;
  margin: 0 auto;
}

.header-inner h1 {
  font-size: 4.6rem;
  letter-spacing: 0.2em;
  line-height: 1;
  margin: 0;
}

.header-inner h1 a:hover {
  color: #333333;
  text-decoration: none;
}

.header-inner .header_site-title-english {
  font-size: 1.4rem;
  line-height: 1;
  margin: 0.5em 0 0 0;
}

/******************************************************
 * Base Header Structure
 ******************************************************/
.header-inner {
  width: 84%;
  margin: 0 auto;
}

.header-inner h1 {
  font-size: 4.6rem;
  letter-spacing: 0.2em;
  line-height: 1;
  margin: 0;
}
.header-inner h1 a:hover {
  color: #333333;
  text-decoration: none;
}
.header-inner .header_site-title-english {
  font-size: 1.4rem;
  line-height: 1;
  margin: 0.5em 0 0 0;
}

.header-parts {
  position: relative;
  width: 100%;
  z-index: 999;
  transition: font-size 0.3s ease, padding 0.3s ease;
}

/******************************************************
 * PC（769px以上）：ヘッダー縮小（任意／JSで .is-fixed 付与時）
 ******************************************************/
@media (min-width: 769px) {
  .header-parts.is-fixed {
    position: fixed;
    top: 0; left: 0; width: 100%;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  }
  .header-parts .site-title h1.header_site-title {
    font-size: 4.6rem;
    transition: font-size 0.3s ease;
  }
  .header-parts.is-fixed .site-title h1.header_site-title {
    font-size: 2.8rem;
  }
  .header-parts .header_site-title-english {
    font-size: 1.4rem;
    transition: font-size 0.3s ease, opacity 0.3s ease;
  }
  .header-parts.is-fixed .header_site-title-english {
    font-size: 1.1rem;
    opacity: 0.9;
  }
  .header-parts.is-fixed .header-float {
    padding: 15px 0 !important;
  }
}

@media (max-width: 768px) {
  /* タイトルはメニューの下に */
  /*.header-parts .site-title {
    text-align: center;
  }*/

  .header-parts .header_site-title {
    font-size: 2.4rem;
  }

  .header-parts .header_site-title-english {
    font-size: 1.2rem;
  }

  .header-float {
    padding: 15px 0 !important;
    row-gap: 0;
  }

  /* 検索フォームは非表示 */
  .header-parts form {
    display: none !important;
  }
}


.nav-overlay {
  display: none;
}

@media (min-width: 769px) {

  /************************************
   * ▼ メインナビ全体
   ************************************/
  .global-nav {
    position: relative;
    z-index: 1000;
    --wp--style--block-gap: 0;
  }

  .main-nav {
    background: #222; /* ナビ背景 */
  }

  /* ナビ中央揃え */
  .main-nav .wp-block-navigation__container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0;
  }
  .main-nav li {
    margin: 0;
  }

  /************************************
   * ▼ 親メニュー項目
   ************************************/
  .main-nav .wp-block-navigation-item > .wp-block-navigation-item__content,
  .main-nav .wp-block-navigation-item > a {
    display: block;
    padding: 0 30px;
    height: 50px;
    line-height: 50px;
    font-size: 16px; /* = 1.6rem */
    color: #fff;
    text-decoration: none;
    background: transparent;
    transition: background 0.15s ease;
  }

  /* 親 hover（子あり／なし共通）*/
  .main-nav .wp-block-navigation-item > .wp-block-navigation-item__content:hover,
  .main-nav .wp-block-navigation-item > a:hover {
    background-color: #4c4c4c;
    color: #fff;
  }

  /************************************
   * ▼ 子メニュー（ドロップダウン）
   ************************************/
  .main-nav .wp-block-navigation-item.has-child {
    position: relative;
  }

  /* ▼デフォルトのクリックトグルを無効化 */
  .main-nav .wp-block-navigation-item.has-child > button {
    pointer-events: none;
  }

  /* ▼初期状態：非表示 */
.main-nav .wp-block-navigation__submenu-container {
  position: absolute;
  top: 100%;
  left: 0;
  width: 300px !important;
  background: rgb(0,87,146);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity .15s ease, transform .15s ease, visibility .15s ease;
  z-index: 9999;
  padding: 0;
}

  /* ▼ホバー時に展開（アニメーション .15s）*/
  .main-nav .wp-block-navigation-item.has-child:hover > .wp-block-navigation__submenu-container {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  /************************************
   * ▼ サブメニュー内リンク
   ************************************/
  .main-nav .wp-block-navigation__submenu-container li{
    margin: 0;
    padding: 0;
    background: rgb(0,87,146);
  }
  .main-nav .wp-block-navigation__submenu-container a {
    display: block;
    padding: 10px 20px !important;
    font-size: 1.6rem;
    height: 30px;
    line-height: 30px;
    color: #fff;
    text-decoration: none;
    margin: 0;
    border: none;
    width: 100%;
  }

  /* hover */
  .main-nav .wp-block-navigation__submenu-container a:hover {
    background: rgb(16,156,222) !important;
  }

  /************************************
   * ▼ ▼アイコン（白い矢印）
   ************************************/
  .main-nav .wp-block-navigation__submenu-icon {
    display: none;
  }

  .main-nav .has-child > .wp-block-navigation-item__content::after {
    content: "";
    display: inline-block;
    width: 6px;
    height: 6px;
    margin-left: 10px;
    border-right: 2px solid #fff;
    border-bottom: 2px solid #fff;
    transform: translateY(-2px) rotate(45deg);
  }

  /************************************
   * ▼ 1px線（残像）完全消去用 → 強制リセット
   ************************************/
  .main-nav .wp-block-navigation__submenu-container,
  .main-nav .wp-block-navigation__submenu-container li,
  .main-nav .wp-block-navigation__submenu-container a {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    background-clip: padding-box !important;
  }

  /* WPコアが勝手に付与するCSS変数対策 */
  .main-nav .wp-block-navigation__submenu-container {
    --wp--style--root--border-color: transparent !important;
  }

  #nav-toggle { display: none; }
  #global-nav { position: static; transform: none; }
  .nav-overlay { display: none; }

}

/****************************************
 * SPナビ（オーバーレイOFF＋自作トグル）
 ****************************************/
@media (max-width: 768px) {
  #nav-toggle { display: none; }
  .nav-overlay { display: none; }
}


/******************************************************
 * Footer
 ******************************************************/
footer {
  background: #13334C;
  margin: 0;
  padding-top: 2em;
  padding-bottom: 2em;
}

.footer-inner {
  width: 90%;
  margin: 0 auto;
}

.footer-inner p {
  color: #ffffff;
}

.office-name {
  margin-top: 0;
  font-size: 2.4rem;
  font-weight: 900;
}

.office-address {
  font-size: 1.6rem;
}

.copyright {
  font-size: 1.4rem;
}

@media (max-width: 768px) {
  footer {
    padding-top: 1em;
    padding-bottom: 0.5em;
  }

  .office-name {
    font-size: 2rem;
  }

  .office-address {
    font-size: 1.4rem;
  }

  .copyright {
    font-size: 1.2rem;
  }
}

/******************************************************
 * Layout Helpers
 ******************************************************/
/*.site-content {
  margin-bottom: 3em;
}*/

.page-title-cover {
  text-align: center;
}

/* メイン＋サイドバー構成のカラム間隔 */
.wp-block-columns.layout-main-area {
  width: 90%;
  margin: 50px auto;
  gap: 70px !important;
}
.wp-block-group:last-child {
  margin-bottom: 0;
}
/**/
@media (max-width: 768px) {
  .wp-block-columns.layout-main-area {
    margin: 30px auto;
    gap: 30px !important;
  }

  /*.site-content {
    padding: 0 0.5em;
    margin-bottom: 3em;
  }*/

  .page-title-cover {
    min-height: 100px !important;
  }

  .page-title-cover h1 {
    font-size: 2.8rem;
    line-height: 1.4;
  }
}


/******************************************************
 * Lists / Paragraphs
 ******************************************************/

p {
  margin-bottom: 1em;
}

ul,
ol {
  margin: 0 0 1.3em 2em;
  padding: 0;
}

li {
  margin-bottom: 0.3em;
}

/******************************************************
 * Tables
 ******************************************************/

table {
  border-collapse: collapse;
  width: 100%;
}

th,
td {
  border: 1px solid #ccc;
  padding: 0.8rem;
}

th {
  background-color: #f5f8ff;
  color: #004AAD;
  font-weight: 600;
  text-align: left;
}

/******************************************************
 * Content
 ******************************************************/
.main_contennt h1 {
  font-size: 4.6rem;
  letter-spacing: 0.2em;
  margin-top: 0;
}

.main_contennt h2 {
  font-size: 3.6rem;
  letter-spacing: 0.1em;
  margin-top: 0;
  padding: 0.4em 0;
  border-top: solid 2px #666;
  border-bottom: solid 2px #666;
}

.main_contennt h3 {
  margin-top: 0;
  padding: 0 12px;
  font-size: 2.8rem;
  line-height: 1.2;
  border-left: solid 7px #005792;
}

.main_contennt h4 {
  margin-top: 0;
  padding: 0 12px;
  font-size: 2.2rem;
  line-height: 1.2;
  border-left: solid 7px #666;
}

/* タブレット、スマホ*/
@media (max-width: 768px) {
  .main_contennt h1 {
    font-size: 2.8rem;
    line-height: 1.4;
    margin-bottom: 0.8em;
  }

  .main_contennt h2 {
    font-size: 2.4rem;
    line-height: 1.5;
    margin-bottom: 0.6em;
  }

  .main_contennt h3 {
    font-size: 2rem;
    line-height: 1.5;
    margin-bottom: 0.5em;
  }

  .main_contennt h4 {
    font-size: 1.8rem;
    line-height: 1.6;
    margin-bottom: 0.4em;
  }
}


/******************************************************
 * Front page
 ******************************************************/
.main_contennt.front-page h2 {
  font-size: 3rem;
  line-height: 1;
  margin-top: 0;
  position: relative;
  padding-bottom: 2rem;
  border: none;
}

.main_contennt.front-page h2::before {
  /*斜めストライプ部分*/
  position: absolute;
  content: '';
  left: 0;
  bottom: 0;
  width: 100%;
  height: 8px;
  background-image: repeating-linear-gradient(-45deg, #999, #999 1px, transparent 1px, transparent 5px);
  background-size: 7px 7px;
  -webkit-background-size: 7px 7px;
  /*Lightning見出しデザイン設定のCSS対策*/
  border: none;
  top: unset;
}

.front-news-content {
  margin-bottom: 3em;
}

.front-news-list {
  margin-bottom: 2em;
}

.front-news-list li {
  margin-bottom: 1em;
}

.front-news-content .btn_list {
  font-size: 1.6rem;
}

@media (max-width: 768px) {
  .main_contennt.front-page h2 {
    font-size: 2.6rem;
  }

  .front-cover {
    min-height: 200px !important;
  }

  .front-news-content .btn_list {
    font-size: 1.6rem;
  }
}


/******************************************************
 * Archive page
 ******************************************************/
.post-card section {
  margin-bottom: 1.5em;
}
ul.post-list,
.archives-list   {
  margin: 0;
  padding: 0;
}
ul.post-list li {
  margin-bottom: 2em;
}
ul.post-list li:last-child {
  margin-bottom: 0;
}

.post-list .post-card h2 {
  font-size: 2.6rem;
  letter-spacing: 0.02em;
  line-height: 1.4;
  padding: 0.5em 0;
  border-top: solid 1px;
  border-bottom: dotted 1px;
}
.post-card-excerpt p {
  margin-bottom: 1em;
}
.post-card-excerpt p:last-child {
  margin-bottom: 0;
} 
.post-meta {
  font-size: 1.6rem;
  margin-top: 1em;
}
.wp-block-post-excerpt__more-text {
  font-size: 1.8rem;
}

/*search result*/
.search-result-title {
  font-size: 2.4rem;
  margin-bottom: 1.5em;
}

.search-result-title .search-term {
  font-weight: 700;
}
@media (max-width: 768px) {
  .search-result-title {
  font-size: 2.2rem;
  margin-bottom: 1em;
}

.post-list .post-card h2 {
  font-size: 2.4rem;
}
}

/******************************************************
 * Sidebar
 ******************************************************/
 .sidebar-section {
  margin-bottom: 3em;
  font-size: 1.6rem;
  line-height: 1.6;
}

.sidebar-section h3 {
  margin-top: 0;
  padding: 0 12px;
  font-size: 2rem;
  line-height: 1.2;
  border-left: solid 7px #005792;
}

/*  */
.sideber_search {
  display: none;
}

/* タブレット以下で表示（例：768px以下） */
@media (max-width: 768px) {
  .sideber_content {
  padding-top: 30px;
  border-top: solid 2px #ccc;
}
 .sidebar-section {
  margin-bottom: 2.6em;
}

  .sideber_search {
    display: block;
  }
  .sideber_search .wp-block-search__inside-wrapper {
    width: 80% !important;
  }
}

/******************************************************
 * Pagination（フラット・小さめ・Font Awesome対応）
 ******************************************************/
.wp-block-query-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.4em;
  margin: 3em 0 2em 0;
  flex-wrap: wrap;
}

/* ボタン共通 */
.wp-block-query-pagination a,
.wp-block-query-pagination span.page-numbers {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 36px;
  height: 36px;
  font-size: 1.6rem;
  font-weight: 500;
  color: #333;
  text-decoration: none;
  border: none;
  background: none;
  transition: all 0.2s ease;
}

/* 現在ページ */
.wp-block-query-pagination .current {
  background: #004aad !important;
  color: #fff !important;
  border-radius: 4px !important;
}

/* ホバー時 */
.wp-block-query-pagination a:hover {
  background: rgba(0, 74, 173, 0.1);
  color: #004aad;
  border-radius: 4px;
}

/* 省略記号 */
.wp-block-query-pagination .dots {
  background: none;
  color: #888;
  width: auto;
  pointer-events: none;
}

/* 「前のページ」「次のページ」テキスト非表示 */
.wp-block-query-pagination-previous,
.wp-block-query-pagination-next {
  font-size: 0; /* テキストを非表示にしてアイコンだけ */
  line-height: 0;
}

/* Font Awesomeアイコン */
.wp-block-query-pagination-previous::before {
  font-family: "Font Awesome 5 Free"; /* または "Font Awesome 6 Free" */
  content: "\f100"; /* fa-angle-double-left */
  font-weight: 900;
  font-size: 1.6rem;
  color: #333;
}

.wp-block-query-pagination-next::after {
  font-family: "Font Awesome 5 Free"; /* または "Font Awesome 6 Free" */
  content: "\f101"; /* fa-angle-double-right */
  font-weight: 900;
  font-size: 1.6rem;
  color: #333;
}

/* ホバー時（アイコンも青に） */
.wp-block-query-pagination-previous:hover::before,
.wp-block-query-pagination-next:hover::after {
  color: #004aad;
}

/* スマホ対応 */
@media (max-width: 768px) {
  .wp-block-query-pagination a,
  .wp-block-query-pagination span.page-numbers {
    width: 32px;
    height: 32px;
    font-size: 1.4rem;
  }

  .wp-block-query-pagination-previous::before,
  .wp-block-query-pagination-next::after {
    font-size: 1.4rem;
  }
}
