/* ==========================================================================
   common.css
   全ページ共通スタイル
   ========================================================================== */


/* ==========================================================================
   CSS Reset / Base
   ========================================================================== */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    font-size: 62.5%; /* 1rem = 10px */
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 1.6rem;
    line-height: 1.6;
    color: rgb(89, 89, 89);
    background-color: #ffffff;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    margin: 0;
    padding: 0;
    font-weight: bold;
}

p {
    margin: 0;
    padding: 0;
}

ul, ol {
    margin: 0;
    padding: 0;
    list-style: none;
}

a {
    color: inherit;
    text-decoration: none;
}

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

button {
    cursor: pointer;
}

/* 水平スクロール封止（position:sticky/fixed に影響しない clip を使用） */
html {
    overflow-x: clip;
}

/* WordPress 管理バー分のオフセット調整 */
/* デスクトップ: 管理バーは position:fixed (32px) */
.admin-bar .site-header {
    top: 32px;
}

/* タブレット幅: 管理バーは position:fixed (46px) */
@media screen and (min-width: 601px) and (max-width: 782px) {
    .admin-bar .site-header {
        top: 46px;
    }
}

/* スマホ幅: 管理バーは position:absolute でスクロールと一緒に消えるため offset 不要 */
@media screen and (max-width: 600px) {
    .admin-bar .site-header {
        top: 0;
    }
}

.wpcf7-spinner {
    position: absolute;
}


/* ==========================================================================
   Site Header
   ========================================================================== */

/* ヘッダー全体
   本番: position sticky, 高さ92px, 白背景(0.9不透明度), ドロップシャドウ
   --header-height: 92px / --bg: rgba(255,255,255,0.9) / --shd: 0 0 5px rgba(0,0,0,0.7)
   -------------------------------------------------------------------- */
.site-header {
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    height: 92px;
    z-index: 1000;
}

/* 背景レイヤー（絶対配置でヘッダー全体を覆う） */
.site-header__bg-layer {
    position: absolute;
    inset: 0;
    width: 100%;
}

.site-header__bg-color {
    position: absolute;
    inset: 0;
    background-color: rgba(255, 255, 255, 0.96);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* 外側ラッパー（フル幅） */
.site-header__outer {
    position: relative;
    width: 100%;
    height: 100%;
}

/* 内側ラッパー（サイト幅 980px でセンタリング）
   本番: --site-width: 980px / padding で左右余白を確保
   -------------------------------------------------------------------- */
.site-header__inner {
    position: relative;
    max-width: 980px;
    height: 100%;
    margin: 0 auto;
    padding: 0 30px;
    box-sizing: border-box;
}

/* コンテンツ行（ロゴ・法人名・ナビの横並び flex）
   ロゴと法人名を左に、ナビを右端に配置
   -------------------------------------------------------------------- */
.site-header__content {
    display: flex;
    align-items: center;
    height: 100%;
}

/* ─── ロゴ ──────────────────────────────────────────────────────── */

.site-header__logo {
    flex-shrink: 0;
}

.site-header__logo-link {
    display: block;
    line-height: 0;
}

/* 本番: width 70px / height 35px / object-fit: cover */
.site-header__logo-img {
    display: block;
    width: 70px;
    height: 35px;
    object-fit: cover;
}

/* ─── 法人名テキスト ──────────────────────────────────────────── */

/* 本番: ロゴ右端から 24px 空けて配置 (left: 125px - left: 30px - width: 70px = 24px) */
.site-header__org-name {
    flex-shrink: 0;
    margin-left: 8px;
}

/* 本番: font-size 18px / line-height 2em / letter-spacing 0.05em
   font-family: helvetica-w01-light,helvetica-w02-light,sans-serif
   color: rgb(89,89,89) (--color_40)
   -------------------------------------------------------------------- */
.site-header__org-name p {
    margin: 0;
    font-size: 18px;
    line-height: 2em;
    letter-spacing: 0.05em;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-weight: 300;
    color: rgb(89, 89, 89);
    white-space: nowrap;
}

/* ─── ナビゲーション ─────────────────────────────────────────── */

/* margin-left: auto でナビを右端へ押し出す */
.site-header__nav {
    margin-left: auto;
    flex-shrink: 0;
    height: 100%;
    display: flex;
    align-items: center;
}

/* ─── ナビ 第1階層 リスト ─────────────────────────────────────── */

/* 本番: height 50px / white-space nowrap / flex横並び */
.site-header__nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: stretch;
    height: 50px;
    white-space: nowrap;
}

/* ─── ナビ 第1階層 アイテム ───────────────────────────────────── */

/* 本番: inline-block / height 100% / border-left: 1px solid rgba(255,64,64,1)
   font: normal 16px/1.4em helvetica-w01-roman, sans-serif
   -------------------------------------------------------------------- */
.site-header__nav-item {
    display: inline-flex;
    align-items: stretch;
    height: 100%;
    position: relative;
    overflow: visible;
    box-sizing: border-box;
    cursor: pointer;
    font-size: 16px;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    border-left: 1px solid rgba(192, 64, 26, 0.25);
}

.site-header__nav-item:first-child {
    border-left: 0;
}

/* 現在ページのアイテム（リンク色変更は下のセレクタで制御） */

/* ─── ナビ 第1階層 リンク ─────────────────────────────────────── */

/* 本番: display inline-block / width & height 100%
   padding: 0 15px (hAdMV6の5px + bNEwT7の10px)
   line-height: 50px / color: rgb(0,0,0)
   transition: color 0.4s ease
   -------------------------------------------------------------------- */
.site-header__nav-link {
    display: inline-flex;
    align-items: center;
    padding: 0 15px;
    height: 100%;
    color: rgb(0, 0, 0);
    text-decoration: none;
    font-size: 16px;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    line-height: 50px;
    transition: color 0.4s ease 0s;
    white-space: nowrap;
}

/* 現在ページのリンク色: rgb(66,55,55) (本番: --txts) */
.site-header__nav-item--current > .site-header__nav-link {
    color: rgb(66, 55, 55);
}

.site-header__nav-link:hover {
    color: #C0401A;
    transition: color 0.25s ease;
}

/* ─── ドロップダウン開閉ボタン（矢印） ───────────────────────── */

/* 本番: clip-path: inset(50%) で通常は非表示（アクセシビリティ用）
   focus/active 時のみ表示
   -------------------------------------------------------------------- */
.site-header__nav-toggle {
    clip-path: inset(50%);
    width: 24px;
    height: 24px;
    position: absolute;
    top: 0;
    right: 0;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    color: inherit;
}

.site-header__nav-toggle:focus,
.site-header__nav-toggle:active {
    clip-path: unset;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    outline: 2px solid rgba(0, 0, 0, 0.3);
    outline-offset: 2px;
}

/* ─── ナビ 第2階層（ドロップダウン）リスト ──────────────────── */

/* 通常は非表示 / 本番: visibility hidden + margin-top: 7px
   background: rgba(255,255,255,1) / box-shadow: 0 1px 4px rgba(0,0,0,0.6)
   -------------------------------------------------------------------- */
.site-header__nav-sub {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 99999;
    list-style: none;
    padding: 0;
    margin: 0;
    margin-top: 4px;
    background-color: #ffffff;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    border-radius: 6px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    white-space: nowrap;
    min-width: 100%;
}

/* ナビアイテムとドロップダウンの隙間を透明ブリッジで埋める */
.site-header__nav-sub::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 0;
    right: 0;
    height: 8px;
    background: transparent;
}

/* ドロップダウン 表示状態 */
.site-header__nav-item--has-children:hover > .site-header__nav-sub,
.site-header__nav-item--has-children.is-open > .site-header__nav-sub {
    display: block;
}

/* ─── ナビ 第2階層 アイテム ───────────────────────────────────── */

/* 本番: display block / border-top: 1px solid rgba(255,64,64,1)
   先頭は border-top なし
   -------------------------------------------------------------------- */
.site-header__nav-sub-item {
    display: block;
    width: 100%;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    box-sizing: border-box;
}

.site-header__nav-sub-item:first-child {
    border-top: 0;
}

/* ─── ナビ 第2階層 リンク ─────────────────────────────────────── */

/* 本番: padding: 0 0.5em / line-height: 50px / color: rgb(0,0,0) */
.site-header__nav-sub-link {
    display: block;
    padding: 10px 16px;
    color: #333;
    text-decoration: none;
    font-size: 15px;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    transition: color 0.2s ease, background-color 0.2s ease;
}

.site-header__nav-sub-link:hover {
    color: #C0401A;
    background-color: rgba(192, 64, 26, 0.05);
}

/* ─── More アイテム（会員制度・記事・お問い合わせ・プライバシーポリシーをまとめる）
   本番: width:68px, height:50px, aria-haspopup="true"
   ─────────────────────────────────────────────────────── */

/* More ボタン（<button> 要素 / .site-header__nav-link と同じ見た目）
   border/background をリセットして nav-link と揃える
   -------------------------------------------------------------------- */
.site-header__nav-more {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    color: rgb(0, 0, 0);
}

.site-header__nav-more:hover {
    color: #C0401A;
}

/* More が現在ページグループの場合 */
.site-header__nav-item--current > .site-header__nav-more {
    color: rgb(66, 55, 55);
}

/* More のドロップダウンは右端に揃える
   本番: style="inset: 50px -54px auto auto;" → right 寄せ
   -------------------------------------------------------------------- */
.site-header__nav-sub--more {
    left: auto;
    right: 0;
    min-width: 180px;
    text-align: left;
}

/* More 配下の現在ページアイテム */
.site-header__nav-sub-item--current > .site-header__nav-sub-link {
    color: rgb(66, 55, 55);
}

/* ─── ハンバーガーボタン（PC では非表示） ─── */
.site-header__hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 6px;
    width: 44px;
    height: 44px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    margin-left: auto;
    flex-shrink: 0;
    z-index: 1001;
    border-radius: 6px;
    transition: background 0.2s ease;
}

.site-header__hamburger:hover {
    background: rgba(0, 0, 0, 0.06);
}

.site-header__hamburger-line {
    display: block;
    width: 22px;
    height: 2px;
    background-color: #333333;
    border-radius: 2px;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                opacity   0.2s ease,
                width     0.3s ease;
    transform-origin: center;
}

/* ハンバーガー → ✕ 変形 */
.site-header--open .site-header__hamburger-line:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}
.site-header--open .site-header__hamburger-line:nth-child(2) {
    opacity: 0;
    width: 0;
}
.site-header--open .site-header__hamburger-line:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* ─── 背景オーバーレイ ─── */
.site-header__overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 9998;
    opacity: 0;
    pointer-events: none; /* 閉じているときはクリックを通過させる */
    transition: opacity 0.3s ease;
    cursor: pointer;
    backdrop-filter: blur(2px);
}

.site-header--open .site-header__overlay {
    opacity: 1;
    pointer-events: auto; /* 開いているときだけクリックを受け付ける */
}

/* ─── SP ドロワーナビ（右スライドパネル） ─── */
.site-header__drawer {
    display: none; /* PC では非表示 */
    position: fixed;
    top: 0;
    right: 0;
    width: 300px;
    max-width: 85vw;
    height: 100%;
    flex-direction: column; /* display:flex は media query で適用 */
    background-color: #ffffff;
    z-index: 9999;
    overflow-y: auto;
    overflow-x: hidden;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.15);
}

.site-header--open .site-header__drawer {
    transform: translateX(0);
}

/* ── ドロワーヘッダー ── */
.site-header__drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px 0 20px;
    height: 64px;
    border-bottom: 1px solid #f0f0f0;
    flex-shrink: 0;
}

.site-header__drawer-header-logo img {
    display: block;
    height: 28px;
    width: auto;
}

/* ── 閉じるボタン（× ） ── */
.site-header__drawer-close {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #f5f5f5;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
    transition: background 0.2s ease;
}

.site-header__drawer-close:hover {
    background: #ebebeb;
}

.site-header__drawer-close span {
    position: absolute;
    display: block;
    width: 16px;
    height: 2px;
    background: #333;
    border-radius: 2px;
}

.site-header__drawer-close span:nth-child(1) {
    transform: rotate(45deg);
}

.site-header__drawer-close span:nth-child(2) {
    transform: rotate(-45deg);
}

/* ── ドロワーリスト ── */
.site-header__drawer-list {
    list-style: none;
    margin: 0;
    padding: 8px 0 40px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* ── 各アイテム ── */
.site-header__drawer-item {
    width: 100%;
    display: flex;
    flex-direction: column;
    border-bottom: 1px solid #f3f3f3;
}

.site-header__drawer-item:last-child {
    border-bottom: none;
}

/* ── リンク行（toggle ボタン + リンクを横並び） ── */
.site-header__drawer-row {
    display: flex;
    align-items: center;
    padding: 0 20px 0 20px;
    min-height: 56px;
}

/* ── アコーディオン toggle ボタン ── */
.site-header__drawer-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    margin-right: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
    flex-shrink: 0;
    border-radius: 4px;
    transition: background 0.2s ease, color 0.2s ease;
    order: 2;
    margin-left: auto;
    margin-right: 0;
}

.site-header__drawer-toggle:hover {
    background: #f5f5f5;
    color: #C0401A;
}

/* ── chevron アイコン（展開時に上向き回転） ── */
.site-header__drawer-chevron {
    display: flex;
    align-items: center;
    transition: transform 0.25s ease;
}

.site-header__drawer-chevron-icon {
    display: block;
}

.site-header__drawer-toggle[aria-expanded="true"] .site-header__drawer-chevron {
    transform: rotate(180deg);
}

.site-header__drawer-toggle[aria-expanded="true"] {
    color: #C0401A;
}

/* ── リンク本体 ── */
.site-header__drawer-link {
    display: flex;
    align-items: center;
    flex: 1;
    padding: 0;
    font-size: 15px;
    font-weight: 600;
    color: #222;
    text-decoration: none;
    letter-spacing: 0.03em;
    line-height: 1.4;
}

/* ── カレントページ ── */
.site-header__drawer-item--current > .site-header__drawer-row > .site-header__drawer-link {
    color: #C0401A;
}

.site-header__drawer-item--current > .site-header__drawer-row {
    background: rgba(192, 64, 26, 0.04);
}

/* ── サブメニュー（アコーディオン） ── */
.site-header__drawer-sub {
    list-style: none;
    margin: 0;
    padding: 0;
    width: 100%;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: #fafafa;
}

.site-header__drawer-sub.is-open {
    max-height: 500px;
}

.site-header__drawer-sub-item {
    border-top: 1px solid #f0f0f0;
}

.site-header__drawer-sub-link {
    display: flex;
    align-items: center;
    padding: 14px 20px 14px 32px;
    font-size: 13px;
    font-weight: 500;
    color: #555;
    text-decoration: none;
    letter-spacing: 0.03em;
    transition: color 0.2s ease, background 0.2s ease;
    position: relative;
}

.site-header__drawer-sub-link::before {
    content: '';
    display: block;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #ccc;
    margin-right: 10px;
    flex-shrink: 0;
    transition: background 0.2s ease;
}

.site-header__drawer-sub-link:hover {
    color: #C0401A;
    background: rgba(192, 64, 26, 0.04);
}

.site-header__drawer-sub-link:hover::before {
    background: #C0401A;
}

.site-header__drawer-sub-item--current > .site-header__drawer-sub-link {
    color: #C0401A;
}

.site-header__drawer-sub-item--current > .site-header__drawer-sub-link::before {
    background: #C0401A;
}

/* ─── レスポンシブ ─── */
@media (max-width: 1024px) {

    .site-header {
        height: 64px;
    }

    .site-header__inner {
        padding: 0 20px;
    }

    .site-header__org-name,
    .site-header__nav {
        display: none;
    }

    .site-header__hamburger {
        display: flex;
    }

    .site-header__drawer {
        display: flex;
    }

    .site-header__overlay {
        display: block;
    }
}

/* ========================================
   フッター
======================================== */
.site-footer {
    background-color: #2c2c2c;
}

.site-footer__inner {
    max-width: 980px;
    margin: 0 auto;
    padding: 48px 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 48px;
}

/* ─── 左カラム ─── */
.site-footer__left {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.site-footer__logo-link {
    display: inline-block;
    line-height: 0;
    transition: opacity 0.2s ease;
}

.site-footer__logo-link img {
    filter: brightness(0) invert(1);
    opacity: 0.85;
    transition: opacity 0.2s ease;
}

.site-footer__logo-link:hover img {
    opacity: 1;
}

.site-footer__org-name {
    font-size: 13px;
    line-height: 1.7;
    letter-spacing: 0.04em;
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
}

.site-footer__sns-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 10px;
}

.site-footer__sns-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.8);
    transition: background 0.2s ease, color 0.2s ease;
}

.site-footer__sns-link:hover {
    background: #C0401A;
    color: #ffffff;
}

.site-footer__sns-link img {
    display: block;
    width: 20px;
    height: 20px;
    object-fit: contain;
    filter: brightness(0) invert(1);
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.site-footer__sns-link:hover img {
    opacity: 1;
}

/* ─── 右カラム（ナビ）─── */
.site-footer__nav {
    display: flex;
    gap: 48px;
    align-items: flex-start;
}

.site-footer__nav-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}


.site-footer__nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.site-footer__nav-link {
    font-size: 15px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    display: block;
    padding: 6px 0;
    transition: color 0.2s ease;
}

.site-footer__nav-link:hover {
    color: #C0401A;
}

/* ─── フッター レスポンシブ ─── */
@media (max-width: 768px) {
    .site-footer__inner {
        flex-direction: column;
        align-items: flex-start;
        padding: 40px 20px 32px;
        gap: 32px;
    }

    .site-footer__nav {
        flex-direction: column;
        gap: 28px;
        width: 100%;
    }

    .site-footer__nav-list {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 0;
    }

    .site-footer__nav-link {
        font-size: 14px;
    }
}

/* ─── コピーライト ─── */
.site-footer__copy {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 16px 0;
    text-align: center;
}

.site-footer__copy p {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.3);
    margin: 0;
}
