/* =====================================================
   focAs Clone - 残差・上書き用 CSS
   ----
   8throck-style.css / 8throck-base.css の後に読み込まれる。
   このファイルだけ、新住所・FAX・非公開セクション等の差分修正を行う。
   ===================================================== */

/* 旧 8thRock の `html { height: 101% } / body { height: 100% }` は
   position:sticky の scrolling ancestor 認識を阻害するため auto に戻す。
   旧 height:101% は古い iOS のスクロール不具合対策で、現代ブラウザでは不要。 */
html, body {
    height: auto;
}

/* モダン風 sticky ヘッダ (PC・モバイル両対応)
   - #fixed_header は header.php から削除済み (旧サイトの「スクロール時細バー」は廃止)
   - <header> 全体を sticky にして、スクロールしても上部に貼り付く
   - 旧 8thRock は PC: 静的 / モバイル: #fixed_header position:fixed という二系統だったが、
     v1.0.9 から両方ともシンプルに <header> 自体の position:sticky 一本化
*/
header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}
/* WP管理バー (top:32px or 46px) と重ならないよう offset 調整 */
body.admin-bar header {
    top: 32px;
}
@media screen and (max-width: 782px) {
    body.admin-bar header {
        top: 46px;
    }
}
/* ハンバーガーは PC では非表示 (元 8thRock CSS は #fixed_header 内に対してのみ
   非表示指定だったため、移設先 #pc_header では制御が効かない) */
@media (min-width: 980px) {
    header #menu_bars {
        display: none !important;
    }
}

/* dl.table の clearfix が overflow:auto なため、内容が幅を超えると
   横スクロールバーが出てしまう。hidden に変更 (clearfix 機能は維持) */
.single-page dl.table {
    overflow: hidden;
}
/* dt/dd の単語折り返しも保険として有効化 */
.single-page dl.table dd {
    word-break: break-word;
    overflow-wrap: anywhere;
}

/* モバイル (〜979px) では旧 base.css が #pc_header を非表示にしていた。
   旧サイトはここで #fixed_header を見せていたが、こちらは廃止したので
   #pc_header をモバイルでも表示するように上書きする */
@media (max-width: 979px) {
    section#pc_header {
        display: block !important;
    }
    /* メニューリストは初期非表示、ハンバーガーで slideToggle */
    section#pc_header .pc_header_menu ul.header_menu {
        display: none;
    }
    /* ハンバーガーはモバイルで表示・ロゴ右側に置く */
    section#pc_header #menu_bars {
        position: absolute;
        top: 16px;
        right: 16px;
        cursor: pointer;
        z-index: 10;
    }
    section#pc_header #menu_bars i#menu_close {
        display: none;
    }
    section#pc_header #menu_bars.menu_bars_close i#menu_open {
        display: none;
    }
    section#pc_header #menu_bars.menu_bars_close i#menu_close {
        display: inline-block;
    }
}

/* 中小企業診断士・弁護士は非公開（badge-new クラスで識別） */
body.page-experts .badge-new,
body.page-experts h2 + table.expert-table {
    /* 旧8thRockのexpert-tableクラスは新テーマでは未使用だが、
       将来的な手動追加への保険として非表示化 */
}

/* お問い合わせフォームのiframe (page-contact.php) */
.single-page iframe[title="お問い合わせフォーム"] {
    width: 100%;
    border: 0;
    margin-top: 16px;
    display: block;
}

/* フッタ住所 改行調整 */
#footer_contact .span4 p .st {
    font-weight: 700;
    font-size: 14px;
    display: inline-block;
    margin-bottom: 4px;
}

/* certify ロゴ列 (フッタ) */
#footer_contact .certify {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-top: 8px;
}
#footer_contact .certify img {
    max-width: 80px;
    height: auto;
    display: block;
}
#footer_contact .certify a {
    display: inline-block;
}

/* gmap iframe */
#footer_contact .gmap {
    width: 100%;
    margin-top: 8px;
}
#footer_contact .gmap iframe {
    width: 100%;
    height: 200px;
    border: 1px solid #ccc;
}

/* sub_pages: 親ページ配下の兄弟ページリスト */
.sub_pages {
    list-style: none;
    margin: 0 0 16px 0;
    padding: 0;
    border-top: 1px solid #ddd;
}
.sub_pages li {
    border-bottom: 1px solid #ddd;
}
.sub_pages li a {
    display: block;
    padding: 10px 14px;
    color: #222;
    text-decoration: none;
    font-size: 13px;
}
.sub_pages li a:hover {
    background: #f5f5f5;
}

/* WP標準ページネーション */
.pagenation .page-numbers {
    display: inline-block;
    padding: 6px 12px;
    margin: 0 2px;
    border: 1px solid #ccc;
    color: #222;
    text-decoration: none;
    font-size: 13px;
}
.pagenation .page-numbers.current {
    background: #222;
    color: #fff;
}

/* searchform */
.search-form {
    display: flex;
    margin-top: 8px;
}
.search-form input[type=search] {
    flex: 1;
    padding: 6px 8px;
    border: 1px solid #ccc;
}
.search-form button {
    padding: 6px 12px;
    background: #222;
    color: #fff;
    border: none;
    cursor: pointer;
}

/* スクリーンリーダー専用テキスト */
.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    -webkit-clip-path: inset(50%);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute !important;
    width: 1px;
    word-wrap: normal !important;
}
