/*
Theme Name: kinzei kainan
Theme URI:
Author: DAS Style
Author URI:
Description: 近畿税理士会海南支部のテーマ
Requires at least: 6.8
Tested up to: 6.8
Requires PHP: 5.7
Version:
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: kinzei-kainan
Tags:
*/

/* ==================================================

    共通

================================================== */

/*** 位置設定  ***/

.ma0 {
    margin: 0 !important;
}

.ma_to0 {
    margin-top: 0 !important;
}

.ma_to05 {
    margin-top: 0.5em !important;
}

.ma_to10 {
    margin-top: 1em !important;
}

.ma_to15 {
    margin-top: 1.5em !important;
}

.ma_to20 {
    margin-top: 2em !important;
}

.ma_to30 {
    margin-top: 3em !important;
}

.ma_to40 {
    margin-top: 4em !important;
}

.ma_to50 {
    margin-top: 5em !important;
}

.ma_to60 {
    margin-top: 6em !important;
}

.ma_to70 {
    margin-top: 7em !important;
}

.ma_bo05 {
    margin-bottom: 0.5em !important;
}

.ma_bo10 {
    margin-bottom: 1em !important;
}

.ma_bo15 {
    margin-bottom: 1.5em !important;
}

.ma_bo20 {
    margin-bottom: 2em !important;
}

.ma_bo30 {
    margin-bottom: 3em !important;
}

.ma_bo40 {
    margin-bottom: 4em !important;
}

.ma_bo50 {
    margin-bottom: 5em !important;
}

.ma_bo60 {
    margin-bottom: 6em !important;
}

.ma_bo70 {
    margin-bottom: 7em !important;
}

.ma_le0 {
    margin-left: 0 !important;
}

.ma_le05 {
    margin-left: 0.5em !important;
}

.ma_le10 {
    margin-left: 1em !important;
}

.ma_le15 {
    margin-left: 1.5em !important;
}

.ma_le20 {
    margin-left: 2em !important;
}

.ma_le30 {
    margin-left: 3em !important;
}

.ma_le40 {
    margin-left: 4em !important;
}

.ma_le50 {
    margin-left: 5em !important;
}

.ma_le60 {
    margin-left: 6em !important;
}

.ma_le70 {
    margin-left: 7em !important;
}

.ma_ri0 {
    margin-right: 0 !important;
}

.ma_ri05 {
    margin-right: 0.5em !important;
}

.ma_ri10 {
    margin-right: 1em !important;
}

.ma_ri15 {
    margin-right: 1.5em !important;
}

.ma_ri20 {
    margin-right: 2em !important;
}

.ma_ri30 {
    margin-right: 3em !important;
}

.ma_ri40 {
    margin-right: 4em !important;
}

.ma_ri50 {
    margin-right: 5em !important;
}

.ma_ri60 {
    margin-right: 6em !important;
}

.ma_ri70 {
    margin-right: 7em !important;
}

.pa0 {
    padding: 0 !important;
}

.pa_to70 {
    padding-top: 7em !important;
}

.pa_to60 {
    padding-top: 6em !important;
}

.pa_to50 {
    padding-top: 5em !important;
}

.pa_to40 {
    padding-top: 4em !important;
}

.pa_to30 {
    padding-top: 3em !important;
}

.pa_to20 {
    padding-top: 2em !important;
}

.pa_to15 {
    padding-top: 1.5em !important;
}

.pa_to10 {
    padding-top: 1em !important;
}

.pa_to05 {
    padding-top: 0.5em !important;
}

.pa_to0 {
    padding-top: 0 !important;
}

.pa_bo70 {
    padding-bottom: 7em !important;
}

.pa_bo60 {
    padding-bottom: 6em !important;
}

.pa_bo50 {
    padding-bottom: 5em !important;
}

.pa_bo40 {
    padding-bottom: 4em !important;
}

.pa_bo30 {
    padding-bottom: 3em !important;
}

.pa_bo25 {
    padding-bottom: 2.5em !important;
}

.pa_bo20 {
    padding-bottom: 2em !important;
}

.pa_bo15 {
    padding-bottom: 1.5em !important;
}

.pa_bo10 {
    padding-bottom: 1em !important;
}

.pa_bo05 {
    padding-bottom: 0.5em !important;
}

.pa_le70 {
    padding-left: 7em !important;
}

.pa_le60 {
    padding-left: 6em !important;
}

.pa_le50 {
    padding-left: 5em !important;
}

.pa_le40 {
    padding-left: 4em !important;
}

.pa_le30 {
    padding-left: 3em !important;
}

.pa_le20 {
    padding-left: 2em !important;
}

.pa_le15 {
    padding-left: 1.5em !important;
}

.pa_le10 {
    padding-left: 1em !important;
}

.pa_le05 {
    padding-left: 0.5em !important;
}

.pa_le0 {
    padding-left: 0 !important;
}

.pa_ri70 {
    padding-right: 7em !important;
}

.pa_ri60 {
    padding-right: 6em !important;
}

.pa_ri50 {
    padding-right: 5em !important;
}

.pa_ri40 {
    padding-right: 4em !important;
}

.pa_ri30 {
    padding-right: 3em !important;
}

.pa_ri25 {
    padding-right: 2.5em !important;
}

.pa_ri20 {
    padding-right: 2em !important;
}

.pa_ri15 {
    padding-right: 1.5em !important;
}

.pa_ri10 {
    padding-right: 1em !important;
}

.pa_ri05 {
    padding-right: 0.5em !important;
}

.pa_ri0 {
    padding-right: 0 !important;
}

.w_100 {
    width: 100% !important;
}

@media screen and (max-width: 781px) {
    .ma_to30 {
        margin-top: calc(3em * 0.65) !important;
    }
    .ma_to40 {
        margin-top: calc(4em * 0.65) !important;
    }
    .ma_to50 {
        margin-top: calc(5em * 0.65) !important;
    }
    .ma_to60 {
        margin-top: calc(6em * 0.65) !important;
    }
    .ma_bo30 {
        margin-bottom: calc(3em * 0.65) !important;
    }
    .ma_bo40 {
        margin-bottom: calc(4em * 0.65) !important;
    }
    .ma_bo50 {
        margin-bottom: calc(5em * 0.65) !important;
    }
    .ma_bo60 {
        margin-bottom: calc(6em * 0.65) !important;
    }
    .ma_bo70 {
        margin-bottom: calc(7em * 0.65) !important;
    }
    .ma_le30 {
        margin-left: calc(3em * 0.65) !important;
    }
    .ma_le40 {
        margin-left: calc(4em * 0.65) !important;
    }
    .ma_le50 {
        margin-left: calc(5em * 0.65) !important;
    }
    .ma_le60 {
        margin-left: calc(6em * 0.65) !important;
    }
    .ma_ri30 {
        margin-right: calc(3em * 0.65) !important;
    }
    .ma_ri40 {
        margin-right: calc(4em * 0.65) !important;
    }
    .ma_ri50 {
        margin-right: calc(5em * 0.65) !important;
    }
    .ma_ri60 {
        margin-right: calc(6em * 0.65) !important;
    }
    .ma_ri70 {
        margin-right: calc(7em * 0.65) !important;
    }
    .pa_to70 {
        padding-top: calc(7em * 0.65) !important;
    }
    .pa_bo70 {
        padding-bottom: calc(7em * 0.65) !important;
    }
    .pa_to60 {
        padding-top: calc(6em * 0.65) !important;
    }
    .pa_bo60 {
        padding-bottom: calc(6em * 0.65) !important;
    }
    .pa_to50 {
        padding-top: calc(5em * 0.65) !important;
    }
    .pa_bo50 {
        padding-bottom: calc(5em * 0.65) !important;
    }
    .pa_to40 {
        padding-top: calc(4em * 0.65) !important;
    }
    .pa_bo40 {
        padding-bottom: calc(4em * 0.65) !important;
    }
    .pa_to30 {
        padding-top: calc(3em * 0.65) !important;
    }
    .pa_bo30 {
        padding-bottom: calc(3em * 0.65) !important;
    }
    .pa_le70 {
        padding-left: calc(7em * 0.65) !important;
    }
    .pa_ri70 {
        padding-right: calc(7em * 0.65) !important;
    }
    .pa_le60 {
        padding-left: calc(6em * 0.65) !important;
    }
    .pa_ri60 {
        padding-right: calc(6em * 0.65) !important;
    }
    .pa_le50 {
        padding-left: calc(5em * 0.65) !important;
    }
    .pa_ri50 {
        padding-right: calc(5em * 0.65) !important;
    }
    .pa_le40 {
        padding-left: calc(4em * 0.65) !important;
    }
    .pa_ri40 {
        padding-right: calc(4em * 0.65) !important;
    }
    .pa_le30 {
        padding-left: calc(3em * 0.65) !important;
    }
    .pa_ri30 {
        padding-right: calc(3em * 0.65) !important;
    }
}

.nav-button a {
    background-color: #0050b0;
    color: #ffffff;
    padding: 8px 20px;
    border-radius: 9999px;
}
.nav-button a:hover {
    background-color: #003d8c;
}

/* サイトロゴ：ベース */
.wp-block-site-logo {
    width: auto;
}
.wp-block-site-logo .custom-logo {
    width: clamp(200px, 26.17vw, 356px);
    height: auto;
}

/* ==================================================
    レイアウト切替（PC / モバイル）
================================================== */

/* 999px以下はモバイル表示 */
@media (max-width: 999px) {
    .wp-block-navigation {
        display: none !important;
    }
    .kainan-desktop-nav {
        display: none;
    }
    .kainan-mobile-nav {
        display: block;
    }

    /* モバイルロゴを少し大きめに調整 */
    .wp-block-site-logo .custom-logo {
        width: clamp(200px, 32vw, 360px);
    }
}

/* 1000px以上はPC表示 */
@media (min-width: 1000px) {
    .kainan-desktop-nav {
        display: block;
    }
    .kainan-mobile-nav {
        display: none !important;
    }
    .wp-block-navigation {
        display: flex !important;
    }
}

/* =========================
   PC用 水平メニュー（カスタムHTML）
========================= */
@media (min-width: 1000px) {
    .kainan-desktop-nav {
        margin-right: 5px !important;
    }
    .kainan-desktop-nav ul {
        display: flex;
        gap: 48px;
        align-items: center;
        justify-content: flex-end;
        list-style: none;
        margin: 0;
        padding: 0;
        gap: clamp(28px, 3vw, 44px);
    }

    /* メニュー項目のリンク（下線アニメーションの基準） */
    .kainan-desktop-nav a {
        color: #222;
        text-decoration: none;
        font-weight: 700;
        font-size: clamp(16px, 1.3vw, 18px);
        position: relative; /* 下線の基準点 */
        padding: 8px 0; /* 下線とのスペース確保 */
    }

    /* 下線の基本スタイル（最初は非表示） */
    .kainan-desktop-nav li:not(.nav-button) a::after {
        content: "";
        position: absolute;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 2px;
        background-color: var(--brand-blue);
        transform: scaleX(0);
        transform-origin: left;
        transition: transform 0.3s ease-in-out;
    }

    /* ホバー時に下線を表示 */
    .kainan-desktop-nav li:not(.nav-button) a:hover::after {
        transform: scaleX(1);
    }

    /* ボタン（会員専用ページ）のスタイル */
    .kainan-desktop-nav .nav-button a {
        background: #0048b5;
        color: #fff;
        padding: 14px 24px;
        border-radius: 6px;
        display: inline-block;
    }
    .kainan-desktop-nav .nav-button a:hover {
        background: #003d8c;
    }

    /* ヒーローヘッダー時のPCメニューボタンのデザイン */
    .hero-header-overlay .kainan-desktop-nav .nav-button a {
        background: transparent;
        border: 2px solid #ffffff;
    }
    .hero-header-overlay .kainan-desktop-nav .nav-button a:hover {
        background: rgba(255, 255, 255, 0.15);
    }
}

/* ==============================
   PCメニュー：外部リンクアイコン（黒）
   ============================== */
li.otherdomeinlink > a {
  position: relative;
  padding-right: 1.3em; /* アイコン分の余白 */
}

/* ::before を使用して、下線(::after)と競合しないようにする */
li.otherdomeinlink > a::before {
  content: "";
  position: absolute;
  right: 0;
  top: 50%;
  width: 0.9em;
  height: 0.9em;
  transform: translateY(-50%);
  background: no-repeat center/contain
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' fill='black' viewBox='0 0 16 16'><path d='M6 10a.5.5 0 0 1 0-1h4.793L5.146 3.354a.5.5 0 1 1 .708-.708L11.5 8.293V3.5a.5.5 0 0 1 1 0v6a.5.5 0 0 1-.5.5h-6z'/><path d='M13 13.5a.5.5 0 0 1-.5.5h-9A1.5 1.5 0 0 1 2 12.5v-9A.5.5 0 0 1 2.5 3H8a.5.5 0 0 1 0 1H3v8.5a.5.5 0 0 0 .5.5h8.5v-5a.5.5 0 0 1 1 0v5.5z'/></svg>");
  opacity: 0.8;
  pointer-events: none; /* ホバー判定を邪魔しない */
}

/* ==============================
   スマホドロワー：外部リンクアイコン（白）
   ============================== */
li.otherdomeinlink_sp > a {
  position: relative;
  padding-right: 1.3em;
  color: #fff;
}

li.otherdomeinlink_sp > a::before {
  content: "";
  position: absolute;
  right: 0;
  top: 50%;
  width: 0.9em;
  height: 0.9em;
  transform: translateY(-50%);
  background: no-repeat center/contain
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' fill='white' viewBox='0 0 16 16'><path d='M6 10a.5.5 0 0 1 0-1h4.793L5.146 3.354a.5.5 0 1 1 .708-.708L11.5 8.293V3.5a.5.5 0 0 1 1 0v6a.5.5 0 0 1-.5.5h-6z'/><path d='M13 13.5a.5.5 0 0 1-.5.5h-9A1.5 1.5 0 0 1 2 12.5v-9A.5.5 0 0 1 2.5 3H8a.5.5 0 0 1 0 1H3v8.5a.5.5 0 0 0 .5.5h8.5v-5a.5.5 0 0 1 1 0v5.5z'/></svg>");
  opacity: 0.9;
  pointer-events: none;
}



/* ==============================
   スマホドロワー用：青背景 × 白文字
   ============================== */
li.otherdomeinlink_sp > a {
  position: relative;
  padding-right: 1.3em;
  color: #fff; /* 白文字 */
}

/* 外部リンクアイコン（白） */
li.otherdomeinlink_sp > a::after {
  content: "";
  position: absolute;
  right: 0;
  top: 50%;
  width: 0.9em;
  height: 0.9em;
  transform: translateY(-50%);
  background: no-repeat center/contain
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' fill='white' viewBox='0 0 16 16'><path d='M6 10a.5.5 0 0 1 0-1h4.793L5.146 3.354a.5.5 0 1 1 .708-.708L11.5 8.293V3.5a.5.5 0 0 1 1 0v6a.5.5 0 0 1-.5.5h-6z'/><path d='M13 13.5a.5.5 0 0 1-.5.5h-9A1.5 1.5 0 0 1 2 12.5v-9A.5.5 0 0 1 2.5 3H8a.5.5 0 0 1 0 1H3v8.5a.5.5 0 0 0 .5.5h8.5v-5a.5.5 0 0 1 1 0v5.5z'/></svg>");
  opacity: 0.9;
}


/* =========================
    モバイル時のロゴ＆ヘッダー余白
========================= */
@media (max-width: 781px) {
    /* ロゴを少し大きめに */
    .wp-block-site-logo .custom-logo {
        width: clamp(250px, 30vw, 380px);
        height: auto;
    }
    /* ヘッダー余白（上寄せ） */
    header .alignfull,
    .wp-block-template-part .alignfull {
        padding-top: 20px !important;
        padding-bottom: 28px !important;
    }
}

/* =========================
    モバイルUI（ドロワー）
========================= */
:root {
    --brand-blue: #0048b5;
    --panel-width: min(78vw, 320px);
    --anim: 280ms cubic-bezier(0.2, 0.8, 0.2, 1);

    /* 右上ボタン/アイコン（横長×用） */
    --btn-size: 72px;
    --icon-w: 3em;
    --icon-h: 16px;
    --bar-thick: 3px;
    --btn-inset-top: 0px;
    --btn-inset-right: 0px;

    --panel-top: calc(var(--btn-size) + 16px);
}

/* =========================
   ハンバーガー：自然フェード＋固定切替
========================= */

.kainan-menu-btn {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 10002;
    width: var(--btn-size);
    height: var(--btn-size);
    padding: 12px 10px 14px;
    border: 0;
    border-radius: 0 0 0 12px;
    background: var(--brand-blue);
    color: #fff;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 12px;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

/* 再登場時：右上に固定＋フェードイン */
.kainan-menu-btn.is-fixed {
    position: fixed;
    top: var(--btn-inset-top, 0);
    right: var(--btn-inset-right, 0);
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* 非表示時：上に消えるような自然なフェード */
.kainan-menu-btn.is-hidden {
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

/* 初期状態で再登場する時の自然なアニメ（ふわっと出現） */
.kainan-menu-btn.is-fixed.fade-in {
    animation: fadeInBtn 0.6s ease forwards;
}
.kainan-menu-btn.is-fixed.fade-out {
    animation: fadeOutBtn 0.6s ease forwards;
}

@keyframes fadeInBtn {
    0% {
        opacity: 0;
        transform: translateY(-10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeOutBtn {
    0% {
        opacity: 1;
        transform: translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateY(-10px);
    }
}

.kainan-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    line-height: 1;
}

/* ハンバーガー（≡） → × へ“線が変形して”切替（横長×） */
.kainan-icon {
    position: relative;
    display: block;
    width: var(--icon-w);
    height: var(--icon-h);
}
.kainan-icon::before,
.kainan-icon::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    height: var(--bar-thick);
    background: #fff;
    border-radius: 2px;
    transform-origin: center;
    transition: transform 0.22s ease, top 0.22s ease, bottom 0.22s ease;
}
.kainan-icon::before {
    top: calc((var(--icon-h) - var(--bar-thick)) * 0.25);
}
.kainan-icon::after {
    bottom: calc((var(--icon-h) - var(--bar-thick)) * 0.25);
}

/* 開いた時：浅い角度のクロス＋少し横に伸ばす → “横長×” */
html.nav-open .kainan-menu-btn {
    border-radius: 0;
}
html.nav-open .kainan-icon::before {
    top: 50%;
    transform: translateY(-50%) rotate(20deg) scaleX(1.08);
}
html.nav-open .kainan-icon::after {
    bottom: auto;
    top: 50%;
    transform: translateY(-50%) rotate(-20deg) scaleX(1.08);
}

/* オーバーレイ（暗転なし） */
.kainan-drawer {
    position: fixed;
    inset: 0;
    background: transparent;
    z-index: 10000;
}

/* ドロワーはボタンの“下から”開始 */
.kainan-drawer__panel {
    position: absolute;
    right: 0;
    top: var(--panel-top);
    width: var(--panel-width);
    height: calc(100% - var(--panel-top));
    background: var(--brand-blue);
    color: #fff;
    transform: translateX(100%);
    transition: transform var(--anim);
    padding: 24px 24px 32px;
    box-shadow: -12px 0 28px rgba(0, 0, 0, 0.22);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 12px 0 0 12px;
}

/* 開いた状態 */
html.nav-open .kainan-drawer[hidden] {
    display: block;
}
html.nav-open .kainan-drawer__panel {
    transform: translateX(0);
}
html.nav-open,
html.nav-open body {
    overflow: hidden;
}

/* メニューの見た目 */
.kainan-drawer__menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 26px;
}
.kainan-drawer__menu a {
    color: #fff;
    text-decoration: none;
    font-weight: 800;
    font-size: 18px;
    display: block;
    padding: 14px 0 18px;
}
.kainan-drawer__menu > li:not(:last-child) > a {
    border-bottom: 2px dotted rgba(255, 255, 255, 0.6);
}
.kainan-drawer__menu .nav-button > a {
    border: 2px solid #fff;
    border-radius: 6px;
    padding: 14px 22px;
    text-align: center;
}
.kainan-drawer__menu .nav-button > a:hover {
    background: rgba(255, 255, 255, 0.12);
}

/* =========================
    ページトップへ戻るボタン（最終版：自然フェード）
========================= */
.page-top-btn {
    position: fixed;
    bottom: 25px;
    right: 25px;
    z-index: 999;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: opacity 1s ease, transform 1s ease, visibility 0.3s ease;
}

/* 表示状態：transitionで自然にフェードイン・アウト */
.page-top-btn.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* フェードインアニメーション：登場時のみ再生 */
.page-top-btn.fade-in {
    animation: fadeInUpBtn 1.5s ease forwards;
}

/* ふわっと上に出るアニメーション */
@keyframes fadeInUpBtn {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* アイコン・テキスト部分 */
.page-top-icon {
    background-color: #0048b5;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 5px;
}
.page-top-icon svg path {
    fill: #ffffff;
}
.page-top-text {
    display: block;
    text-align: center;
    color: #0048b5;
    font-size: 12px;
    font-weight: bold;
    margin-top: 4px;
}
.page-top-btn:hover .page-top-icon {
    background-color: #003d8c;
}

/* スマホ時の位置微調整 */
@media (max-width: 781px) {
    .page-top-btn {
        right: 15px;
    }
}

/* =========================
   共通スクロールアニメーション
========================= */

/* 全要素に適用するフェードイン */
.fade-in-on-scroll {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.9s cubic-bezier(0.165, 0.84, 0.44, 1);
    will-change: transform, opacity;
}

/* 表示状態 */
.fade-in-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ========= 特定クラスで方向指定（2カラム用） ========= */

.scroll-left,
.scroll-right {
    opacity: 0;
    transition: all 0.9s cubic-bezier(0.165, 0.84, 0.44, 1);
    will-change: transform, opacity;
}

.scroll-left {
    transform: translateX(-60px);
}

.scroll-right {
    transform: translateX(60px);
}

.scroll-left.is-visible,
.scroll-right.is-visible {
    opacity: 1;
    transform: translateX(0);
}

/* ========= スマホ用調整 ========= */
@media (max-width: 781px) {
    .scroll-left,
    .scroll-right {
        transform: translateY(20px);
    }
}

/* ============================================
   特定 li だけリストマーカーを「※」に変更（行頭揃え）
   ============================================ */

/* ※マーカー li */
.wp-block-list li.marked-asterisk {
  list-style: none;      /* ドットを消す */
  position: relative;
  padding-left: 1.4rem;
  margin-left: -1.5em;
}

/* ※ の位置（ドットと同じ配置にする） */
.wp-block-list li.marked-asterisk::before {
  content: "※";
  position: absolute;
  left: 0em;               /* li の左端（ul の padding 内）に配置 */
  top: 0.2em;            /* 行頭に揃うよう微調整（必要に応じて調整可能） */
  font-weight: bold;
  line-height: 1;
}


/* ==================================================

   フロントページ

================================================== */

/* =========================
    ヒーローヘッダー オーバーレイ
========================= */

/* オーバーレイ時のテキスト色を白に変更 */
.hero-header-overlay {
    min-height: 60vh !important;
    margin: 0 20px !important;
    display: flex;
    align-items: center; /* 縦中央寄せ */
    justify-content: center; /* 横中央寄せ */
    position: relative;
}
@media (max-width: 781px) {
    .hero-header-overlay {
        min-height: 55vh !important;
    }
}

.hero-header-overlay.wp-block-cover {
    padding: 0 !important;
    width: auto;
    max-width: 100% !important;
    border-radius: 10px !important;
}

.hero-header-overlay .logo-sub-text {
    color: rgba(255, 255, 255, 0.9);
}

header.wp-block-template-part {
    position: relative;
    background: #fff;
    z-index: 100;
}

/* =========================
   ヒーロー ダイアログボックス
========================= */
.hero-dialog-box {
    background-color: rgba(0, 72, 181, 0.75);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    padding: 2.5rem 3rem 2.5rem !important;
    border-radius: 10px;
    text-align: center;
    position: relative;

    opacity: 0;
    transform: scale(0.9);
    will-change: opacity, transform;

    /* 背景フェード：1秒後に3秒かけて出る */
    animation: zoom-in-dialog 3s cubic-bezier(0.075, 0.82, 0.165, 1) 0.5s forwards;
}
@media (max-width: 781px) {
    .hero-dialog-box {
        background-color: rgba(0, 72, 181, 0.65);
        backdrop-filter: blur(1px);
        -webkit-backdrop-filter: blur(1px);
    }
}

/* =========================
   テキスト設定
========================= */
.hero-dialog-box h2,
.hero-dialog-box p {
    color: #fff;
    margin-top: 0 !important;
    margin-left: 0 !important;
}
.hero-dialog-box h2 {
    font-size: clamp(1.8rem, 2vw + 1rem, 2.6rem);
    line-height: 1.3;
    font-weight: 700;
    margin-bottom: 1.5rem;
}
.hero-dialog-box p {
    margin-bottom: 1.3rem;
    font-size: clamp(1rem, 1.2vw + 0.5rem, 1.6rem);
    line-height: 1.6;
}

/* =========================
   PCでは句読点「、」を表示・改行なし
========================= */
.sp-break {
    display: inline;
}

/* =========================
   スマホでは句読点を非表示＆改行を入れる
========================= */
@media (max-width: 781px) {
    .sp-break {
        display: block;
        visibility: hidden;
        height: 0;
    }
}

/* =========================
   スマホ用
========================= */
@media (max-width: 781px) {
    .hero-dialog-box {
        background-color: rgba(0, 72, 181, 0.7);
        padding: 1.8rem 1.6rem 1.5rem !important;
        border-radius: 8px;
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    }
    .hero-dialog-box h2 {
        font-size: clamp(1.2rem, 6vw, 2rem);
    }
    .hero-dialog-box p {
        font-size: clamp(0.9rem, 4vw, 1.1rem);
    }
}

/* =========================
   内部要素アニメーション
========================= */
.hero-dialog-box h2,
.hero-dialog-box p {
    opacity: 0;
    transform: translateY(15px);
    will-change: opacity, transform;
}

/* ✅ 背景が出始めて0.6秒後にタイトル、0.9秒後に段落を開始 */
.hero-dialog-box h2 {
    animation: slide-up-item 0.9s cubic-bezier(0.165, 0.84, 0.44, 1) 1s forwards;
}

.hero-dialog-box p {
    animation: slide-up-item 0.9s cubic-bezier(0.165, 0.84, 0.44, 1) 1.3s forwards;
}

/* =========================
   アニメーション定義
========================= */
@keyframes zoom-in-dialog {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes slide-up-item {
    from {
        transform: translateY(15px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* =========================
   案内バナーセクション
========================= */
.banner-section {
    padding: 80px 20px;
}
@media (max-width: 781px) {
    .banner-section {
        padding: 40px 20px;
    }
}

.banner-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 50px;
    max-width: 1100px;
    margin: 0 auto;
}

.banner-box {
    background-color: #fff;
    border: 1px solid #bebebe; /* ← 枠線を追加 */
    border-radius: 10px;
    padding: 40px 45px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* シャドウを削除 */
.banner-box:hover {
    transform: translateY(-2px);
}

/* アイコンと見出しを横並びにする */
.banner-icon-text {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 18px;
    margin-bottom: 25px;
}

/* アイコン */
.banner-icon-text i {
    font-size: 3rem;
    color: #1e3050;
    flex-shrink: 0;
}

/* タイトルと英語サブタイトル */
.banner-title-wrap h3 {
    color: #004bb1;
    font-weight: 700;
    font-size: 1.6rem;
    margin: 0;
    line-height: 1.3;
}

.banner-subtitle {
    display: block;
    color: #888;
    font-size: 0.85rem;
    margin-top: 2px;
    font-weight: 700;
}

/* 本文 */
.banner-box p {
    color: #333;
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
}

.banner-box-link {
    text-decoration: none;
    color: inherit;
    display: block;
}
.banner-box-link:hover .banner-box {
    transform: translateY(-3px);
    background-color: #f8faff;
    border-color: #aab7c4;
    transition: all 0.3s ease;
}

/* =========================
   スマホ用
========================= */
@media (max-width: 781px) {
    .banner-grid {
        grid-template-columns: 1fr;
    }

    .banner-box {
        padding: 24px;
        text-align: center;
    }

    .banner-icon-text {
        flex-direction: column;
        gap: 10px;
    }

    .banner-title-wrap h3 {
        font-size: 1.4rem;
    }

    .banner-subtitle {
        font-size: 0.8rem;
    }

    .banner-icon-text i {
        font-size: 2rem;
        margin-bottom: 4px;
    }
}

/* =========================
   新着情報セクション
========================= */
.news-section,
.news-article-section {
    padding: 50px 0 80px;
    max-width: 1100px;
    margin: 0 auto;
}

@media (max-width: 1100px) {
    .news-section,
    .news-article-section {
        padding: 30px 5vw 60px; /* ビューポート幅の5%余白をとる */
    }
}

.news-section .wp-block-column {
    padding: 0;
}

.news-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    margin: 0 0 40px 0 !important;
    max-width: 100% !important;
}

.news-title-wrap h2 {
    font-size: clamp(1.2rem, 2vw + 1rem, 2rem);
    font-weight: 700;
    color: #173661;
    margin: 0;
}

.news-title-wrap .en-title {
    display: block;
    font-size: 0.9rem;
    color: #999;
    margin-top: 4px;
    letter-spacing: 0.05em;
}

.news-more-btn {
    background-color: #0048b5;
    color: #fff;
    text-decoration: none;
    padding: 12px 32px;
    border-radius: 9999px;
    font-weight: 700;
    transition: background-color 0.3s ease;
}

.news-more-btn:hover {
    background-color: #003d8c;
}

@media (max-width: 1100px) {
    .news-more-btn {
        font-size: 0.8rem;
        padding: 8px 20px;
    }
}

/* =========================
   新着情報クエリーループ調整
========================= */

.queryloop-waku {
    padding: 0 !important;
}
.queryloop {
    padding: 0 !important;
}

/* 各アイテム */
.news-item {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    border-bottom: 1px solid #ddd;
    padding: 14px 0;
    margin: 0;
    gap: 24px; /* ← 各列の間隔 */
    width: 100%;
}

/* --- 日付＋カテゴリ行 --- */
.news-meta {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 16px;
    color: #666;
    font-size: 0.9rem;
    white-space: nowrap;
    flex-shrink: 0;
    min-width: 250px; /* ← 左2列の幅固定 */
}

/* --- 日付 --- */
.news-meta time {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #98a6b5;
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
}

.news-meta time::before {
    content: "\f017";
    font-family: "Font Awesome 6 Free";
    font-weight: 400;
    font-size: 0.9rem;
    color: #98a6b5;
}

/* --- カテゴリ --- */
.taxonomy-category {
    margin: 0 auto;
    vertical-align: middle;
}

.news-meta a {
    color: #999;
    font-size: 0.85rem;
    text-decoration: none;
    white-space: nowrap;
}

.news-meta a:hover {
    color: #0048b5;
}

/* --- タイトル --- */
.news-item .wp-block-post-title {
    flex: 1;
    font-size: 1rem;
    font-weight: 700;
    margin: 0 !important;
    white-space: nowrap; /* ← PCでは1行 */
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.6;
}

/* スマホでは折り返しを許可 */
@media (max-width: 999px) {
    .news-item .wp-block-post-title {
        white-space: normal; /* ← 折り返し有効化 */
        overflow: visible;
        text-overflow: unset;
    }
}

.news-item .wp-block-post-title a {
    color: #222;
    text-decoration: none;
}

.news-item .wp-block-post-title a:hover {
    color: #0048b5;
}

/* タイトルリンク hoverアニメーション */
.news-item .wp-block-post-title a {
    position: relative;
    display: inline-block; /* ← 必須 */
    color: #222;
    text-decoration: none;
    overflow: visible; /* ← 念のため */
    transition: color 0.3s ease;
}

/* 疑似要素の下線 */
.news-item .wp-block-post-title a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0; /* 文字のすぐ下に線を置く */
    width: 0;
    height: 1.5px;
    background-color: #0048b5;
    transform-origin: left;
    transition: width 0.3s ease;
    z-index: 2; /* ← 背景に隠れないように */
}

/* hover時に線が左→右に伸びる */
.news-item .wp-block-post-title a:hover::after {
    width: 100%;
}

/* hover時に文字色も変化 */
.news-item .wp-block-post-title a:hover {
    color: #0048b5;
}

/* --- スマホで縦並び --- */
@media (max-width: 781px) {
    .news-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
        padding: 12px 8px;
    }

    .news-meta {
        gap: 10px;
        min-width: auto;
        margin-bottom: 4px;
    }
}

/* --- コンテナ全体のリセット（余白削除） --- */
.news-section .wp-block-group,
.wp-block-group.news-item.is-layout-constrained {
    max-width: none !important;
    margin: 0 !important;
    padding-inline: 0 !important;
}

/* ====================================
   ▼ WordPressの max-width 制限解除
   （クエリーループ部を全幅に）
==================================== */
.wp-block-query ul.wp-block-post-template.is-layout-flow {
    max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    width: 100% !important;
}

/* ===============================
   バナーエリア（QR付き・Grid対応）
   =============================== */
.banner-area {
    background: transparent;
    max-width: 1100px;
    margin: 0 auto;
    padding: 40px 0 80px;
}

@media (max-width: 1100px) {
    .banner-area {
        padding: 30px 5vw 60px;
    }
}

/* --- Gridレイアウト --- */
.banner-area__inner {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    justify-content: center;
    align-items: start;
    gap: 50px 60px;
}

.banner-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    text-align: center;
    position: relative;
}

/* バナー画像・QR画像 */
.banner-item__img {
    width: 190px;
    height: auto;
    display: block;
}

.banner-item__qr {
    width: 80px;
    height: auto;
    display: block;
}

/* hover */
.banner-item a {
    display: inline-block;
    transition: opacity 0.3s ease;
}
.banner-item a:hover {
    opacity: 0.8;
}

/* --- 区切り線（PC時のみ） --- */
@media (min-width: 781px) {
    .banner-item::after {
        content: "";
        position: absolute;
        right: -30px;
        top: 10%;
        bottom: 10%;
        width: 1px;
        background-color: #ddd;
    }

    /* ▼ 3列レイアウト時（大画面） */
    @media (min-width: 1025px) {
        /* 各行の右端（3,6,9...）は非表示 */
        .banner-item:nth-child(3n)::after {
            content: none;
        }
        /* 最終行（下段）の要素には線を出さない */
        .banner-item:last-child(-n + 3)::after {
            content: none;
        }
    }

    /* ▼ 2列レイアウト時（中画面） */
    @media (max-width: 1024px) and (min-width: 781px) {
        /* 各行右端（2,4,6...）は非表示 */
        .banner-item:nth-child(2n)::after {
            content: none;
        }
        /* 最終行（下段）の要素には線を出さない */
        .banner-item:nth-last-child(-n + 2)::after {
            content: none;
        }
    }

    /* ▼ 全体最後の要素にも線を出さない（保険） */
    .banner-item:last-of-type::after {
        content: none;
    }
}

/* --- スマホ中央寄せ --- */
@media (max-width: 780px) {
    .banner-area__inner {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .banner-item {
        justify-content: center;
        margin-bottom: 20px;
    }

    .banner-item:last-child {
        margin-bottom: 0;
    }
}

/* ==================================================

   サブページ

================================================== */

/* ====================================
  ヘッダーと帯タイトルとの間の空間を除去
==================================== */

.wp-site-blocks > .wp-block-template-part:first-of-type {
    margin-block-start: 0 !important;
}

/* ====================================
   ▼ サブページ用ヒーロー（共通）
==================================== */
.hero-header-overlay.subhero {
    min-height: 35vh !important;
    margin-top: 0;
    margin-bottom: 0;
}

.hero-dialog-box.subhero {
    padding: 2rem 1rem !important;
    border-radius: 8px;
    max-width: 600px;
}

.hero-dialog-box.subhero h2 {
    font-size: clamp(1.6rem, 2vw + 0.5rem, 2.2rem);
    color: #fff;
    margin: 0 0 5px !important;
}
.hero-dialog-box.subhero p {
    display: block;
    font-size: 0.9rem;
    color: #afafaf;
    margin-top: 4px;
    letter-spacing: 0.05em;
}

/* ====================================
投稿内容（Post Content）を中央1100pxに制限 
==================================== */
.entry-content {
    max-width: 1100px;
    margin: 0 auto !important;
    padding: 50px 5vw 80px;
}
@media (max-width: 1100px) {
    .entry-content {
        padding: 30px 5vw 60px; /* ビューポート幅の5%余白をとる */
    }
}

body.single .entry-content {
    padding: 50px 5vw 10px; /* ページネーション設置のため */
}
@media (max-width: 1100px) {
    body.single .entry-content {
        padding: 30px 5vw 0;
    }
}

/* ====================================
固定ページH2見出しグループ
==================================== */
.heading-group-subeng {
    padding: 0;
    margin: 0 auto;
}
.heading-group-subeng .heading-group-h2 {
    font-size: clamp(1.2rem, 2vw + 1rem, 2rem);
    font-weight: 700;
    color: #173661;
    margin: 0 !important;
}
.heading-group-subeng .heading-group-eng {
    display: block;
    font-size: 0.9rem;
    color: #999;
    margin: 4px 0 0 0 !important;
    letter-spacing: 0.05em;
}

/* 投稿タイトルブロックの横幅制限を解除  */

/* タイトルの幅制限解除（すでに設定済み） */
.is-layout-constrained > .wp-block-post-title {
    max-width: 100% !important;
    width: 100%;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* 日付（.wp-block-post-date）を中央揃えに */
.heading-group .wp-block-post-date {
    display: block;
    text-align: left;
    color: var(--wp--preset--color--neutral-500, #888); /* 任意: 薄いグレー系 */
    margin-top: 0.25em;
}

/* 見出しとの余白バランスを調整 */
.heading-group .wp-block-post-title {
    text-align: left;
    margin-bottom: 0.25em;
}

/* ====================================
サブページ共通H2見出しグループ
==================================== */
.heading-group {
    max-width: 1100px;
    padding: 30px 0 0 0;
    margin-right: auto;
    margin-left: auto;
}

@media (max-width: 1200px) {
    .heading-group {
        padding: 0 5vw;
    }
}

.heading-group .heading-group-h2 {
    font-size: clamp(1.2rem, 2vw + 1rem, 2rem);
    font-weight: 700;
    color: #173661;
    margin: 0 !important;
}
.heading-group .heading-group-date {
    display: block;
    font-size: 0.9rem;
    color: #999;
    margin: 10px 0 0 0 !important;
    letter-spacing: 0.05em;
}

/* ====================================
お知らせページ
==================================== */
.post-list-wrap {
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
    padding-top: 2rem;
    padding-bottom: 3rem;
}

/* =========================
   ページネーション 共通設定
========================= */
.wp-block-query-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 3rem;
    flex-wrap: wrap;
}

.wp-block-query-pagination a,
.wp-block-query-pagination span {
    display: inline-block;
    padding: 0.6rem 1.2rem;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.25s ease;
}

/* =========================
   ページ番号（通常／現在）
========================= */
.wp-block-query-pagination a {
    color: #0048b5;
    background-color: #fff;
    border: 1px solid #0048b5;
}
.wp-block-query-pagination a:hover {
    background-color: #0048b5;
    color: #fff;
}
.wp-block-query-pagination .current,
.wp-block-query-pagination span[aria-current="page"] {
    background-color: #0048b5;
    color: #fff;
    border: 1px solid #0048b5;
}

/* =========================
   前へ・次へ ボタン
========================= */
.wp-block-query-pagination-previous a,
.wp-block-query-pagination-next a {
    display: inline-block;
    font-weight: 600;
    background-color: #0048b5;
    color: #fff !important;
    border-radius: 6px;
    padding: 0.6rem 1.4rem;
    border: 1px solid #0048b5;
    transition: all 0.25s ease;
}

.wp-block-query-pagination-previous a:hover,
.wp-block-query-pagination-next a:hover {
    background-color: #003b94;
    color: #fff !important;
    transform: translateY(-1px);
}

/* =========================
   スマホ調整
========================= */
@media (max-width: 999px) {
    .wp-block-query-pagination {
        gap: 0.4rem;
    }
    .wp-block-query-pagination a,
    .wp-block-query-pagination span {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }
}

/* =========================
   投稿詳細ページ ナビゲーション3ボタン
   前・一覧・次
   通常：白背景＋青文字
   hover：青背景＋白文字
========================= */

.single-page-nation {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.8rem;
    margin: 2.5rem auto 3rem;
    flex-wrap: wrap;
}

/* ---------------------------------
   共通デザイン（前・次・一覧）
--------------------------------- */
.single-page-nation a {
    display: inline-block;
    font-weight: 600;
    border-radius: 6px;
    padding: 0.6rem 1.4rem;
    border: 1px solid #0048b5;
    text-decoration: none;
    transition: all 0.25s ease;
    min-width: 6.5rem; /* ボタンの最小幅を揃える */
    text-align: center;
    letter-spacing: 0.03em;
    line-height: 1.2;
}

@media (max-width: 781px) {
    .single-page-nation a {
        padding: 0.6rem 0;
        letter-spacing: 0.03em;
        line-height: 1.2;
    }
}

/* ---------------------------------
   前・次ボタン（補助動線）
--------------------------------- */
.post-navigation-link-previous a,
.post-navigation-link-next a {
    background-color: #fff;
    color: #0048b5 !important;
}

.post-navigation-link-previous a:hover,
.post-navigation-link-next a:hover {
    background-color: #0048b5;
    color: #fff !important;
    transform: translateY(-1px);
}

/* 矢印を追加 */
.post-navigation-link-previous a::before {
    content: "◀";
    margin-right: 0.3em;
}
.post-navigation-link-next a::after {
    content: "▶";
    margin-left: 0.3em;
}

/* ---------------------------------
   一覧ボタン（メイン動線として強調）
--------------------------------- */
.btn-back {
    background-color: #0048b5;
    color: #fff !important;
}
.btn-back:hover {
    background-color: #003b94;
    transform: translateY(-1px);
}

/* ====================================
投稿、固定ページ
==================================== */
.entry-content h3 {
    line-height: 1.8;
    padding-top: 20px !important;
    padding-bottom: 10px;
    border-bottom: 2px dotted #ccc;
}
.entry-content p {
    line-height: 1.8;
    margin-top: 20px !important;
    margin-bottom: 20px !important;
}
