@charset "UTF-8";
/**
 * Medsalon レスポンシブ対応CSS
 * 作成日: 2025年11月26日
 */

/* ===========================================
   基本設定（全デバイス共通）
   =========================================== */
html {
    -webkit-text-size-adjust: 100%;
}

/* ===========================================
   タブレット対応 (768px〜979px)
   =========================================== */
@media screen and (max-width: 979px) {
    /* テーブルを横スクロール可能に */
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin-bottom: 1em;
    }
    
    table.ta0 {
        min-width: 500px;
    }
    
    /* 日本地図のボタンサイズ調整 */
    .japan_map .area_btn {
        font-size: 12px;
        padding: 5px 3px;
    }
}

/* ===========================================
   スマートフォン対応 (767px以下)
   =========================================== */
@media screen and (max-width: 767px) {
    
    /* ----- ★最重要：全体幅の強制リセット ----- */
    html, body {
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    /* 全ての直接子要素を100%幅に */
    body > * {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    
    /* ----- ★メニューバー重複対策 ----- */
    /* 2つ目以降のcssmenuを非表示 */
    #cssmenu + #cssmenu,
    #cssmenu ~ #cssmenu,
    body > #cssmenu:not(:first-of-type) {
        display: none !important;
        visibility: hidden !important;
        height: 0 !important;
        overflow: hidden !important;
    }
    
    /* 最初のcssmenu以外を全て非表示 */
    #cssmenu:nth-of-type(n+2) {
        display: none !important;
    }
    
    /* wp_nav_menuで出力される可能性のあるメニューを非表示 */
    .menu-primary-container,
    .nav-menu,
    nav.primary-navigation,
    .wp-block-navigation {
        display: none !important;
    }
    
    /* ----- 基本レイアウト ----- */
    body {
        font-size: 14px;
    }
    
    #contents {
        padding: 0 15px !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        margin: 0 auto !important;
    }
    
    #contents p {
        font-size: 15px;
        line-height: 1.7;
    }
    
    #main h1 {
        font-size: 22px;
        padding-bottom: 15px;
    }
    
    #main h2 {
        font-size: 18px;
        padding: 0.4em 0.5em;
    }
    
    /* ----- ★ヘッダー（Hero）対応 ----- */
    .hero {
        width: 100% !important;
        max-width: 100% !important;
        min-height: auto !important;
        padding: 30px 15px !important;
        box-sizing: border-box !important;
    }
    
    .hero__top {
        width: calc(100% - 30px) !important;
        left: 15px !important;
        right: 15px !important;
    }
    
    .hero__content {
        width: 100% !important;
        max-width: 100% !important;
        padding: 20px 10px !important;
    }
    
    .hero__content h1 {
        font-size: 20px !important;
        line-height: 1.4 !important;
    }
    
    .eyebrow {
        font-size: 13px !important;
    }
    
    .btn {
        padding: 12px 20px !important;
        font-size: 14px !important;
    }
    
    /* ----- ★ナビゲーションメニュー対応 ----- */
    #cssmenu {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    
    /* ----- ★フッター対応 ----- */
    footer {
        padding: 20px 15px !important;
        font-size: 13px !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    
    footer a {
        display: inline-block;
        padding: 5px 0;
    }
    
    .copyright {
        font-size: 11px;
        line-height: 1.5;
    }
    
    /* ----- ★「あなたに合った情報を見つけよう」カードセクション ----- */
    .target-cards-section {
        width: 100% !important;
        max-width: 100% !important;
        padding: 30px 15px !important;
        box-sizing: border-box !important;
    }
    
    .target-cards-section h2 {
        font-size: 22px !important;
        margin-bottom: 10px !important;
    }
    
    .target-cards-section .section-subtitle {
        font-size: 14px !important;
        margin-bottom: 20px !important;
    }
    
    .target-cards-container {
        width: 100% !important;
        max-width: 100% !important;
        display: block !important;
        padding: 0 !important;
    }
    
    .target-card {
        width: 100% !important;
        max-width: 100% !important;
        margin-bottom: 15px !important;
        padding: 20px 15px !important;
        box-sizing: border-box !important;
    }
    
    .target-card h3 {
        font-size: 18px !important;
    }
    
    .target-card p {
        font-size: 14px !important;
    }
    
    .target-card-icon {
        font-size: 36px !important;
        margin-bottom: 10px !important;
    }
    
    /* ----- ★31nenshi（平成医療改革）セクション ----- */
    .section-31nenshi {
        width: 100% !important;
        max-width: 100% !important;
        padding: 30px 15px !important;
        box-sizing: border-box !important;
    }
    
    .section-31nenshi-inner {
        width: 100% !important;
        max-width: 100% !important;
        display: block !important;
    }
    
    .section-31nenshi-image,
    .section-31nenshi-content {
        width: 100% !important;
    }
    
    .section-31nenshi-content {
        padding: 20px 15px !important;
    }
    
    .section-31nenshi-content h2 {
        font-size: 20px !important;
    }
    
    /* ----- ★グレーセクション ----- */
    .gray-section {
        padding: 20px 15px !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    
    .gray-section .container {
        padding: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .gray-section .box {
        width: 100% !important;
    }
    
    .gray-section .box p {
        font-size: 14px;
    }
    
    /* ----- ★コンテナ類 ----- */
    .container,
    .inner,
    .gray-box {
        width: 100% !important;
        max-width: 100% !important;
        padding-left: 15px !important;
        padding-right: 15px !important;
        box-sizing: border-box !important;
    }
    
    /* ----- ★fourCol関連 ----- */
    .fourCol,
    .fourColInner {
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .fourColInner div {
        width: 100% !important;
        float: none !important;
    }
    
    /* ----- ★アコーディオン完全リセット（スマホ専用）----- */
    .accordion-008 {
        width: 100% !important;
        box-sizing: border-box !important;
        margin-bottom: 10px !important;
    }
    
    .accordion-008 summary {
        display: block !important;
        position: relative !important;
        font-size: 14px !important;
        padding: 15px 50px 15px 15px !important;
        line-height: 1.5 !important;
        box-sizing: border-box !important;
        color: #333 !important;
        font-weight: 600 !important;
        cursor: pointer !important;
        list-style: none !important;
    }
    
    /* デフォルトマーカーを完全削除 */
    .accordion-008 summary::-webkit-details-marker {
        display: none !important;
    }
    
    .accordion-008 summary::marker {
        display: none !important;
        content: '' !important;
    }
    
    /* 既存の疑似要素を完全リセット */
    .accordion-008 summary::before {
        display: none !important;
        content: none !important;
    }
    
    /* 矢印を統一（∨マーク） */
    .accordion-008 summary::after {
        position: absolute !important;
        right: 20px !important;
        top: 50% !important;
        transform: translateY(-70%) rotate(45deg) !important;
        width: 10px !important;
        height: 10px !important;
        border: none !important;
        border-bottom: 2px solid #999 !important;
        border-right: 2px solid #999 !important;
        content: '' !important;
        margin: 0 !important;
        padding: 0 !important;
        background: transparent !important;
        transition: transform 0.3s ease !important;
        box-sizing: border-box !important;
    }
    
    /* 開いた時の矢印（∧マーク） */
    .accordion-008[open] summary::after {
        transform: translateY(-30%) rotate(225deg) !important;
    }
    
    .accordion-008 p {
        font-size: 13px !important;
        padding: 10px 15px !important;
    }
    
    /* ボックス系 */
    .box-hatena,
    .box-gray,
    .box-blue,
    .box-yellow {
        padding: 15px;
        margin-bottom: 20px;
    }
    
    .box-hatena ul,
    .box-yellow ul {
        padding-left: 5px;
    }
    
    .box-hatena li,
    .box-yellow li {
        font-size: 14px;
        margin-left: 1em;
        margin-bottom: 8px;
    }
    
    /* 画像のフロート解除 */
    .fl, .fr {
        float: none !important;
        display: block;
        margin: 0 auto 15px !important;
        max-width: 80px;
    }
    
    /* ----- テーブル対応 ----- */
    /* テーブルをラップする親要素に .table-responsive を付ける */
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin-bottom: 1em;
        border: 1px solid #ddd;
        border-radius: 4px;
    }
    
    /* スクロールヒントを追加 */
    .table-responsive::after {
        content: "← 横にスクロールできます →";
        display: block;
        text-align: center;
        font-size: 11px;
        color: #888;
        padding: 5px 0;
        background: #f9f9f9;
    }
    
    table.ta0 {
        font-size: 13px;
        min-width: 450px;
    }
    
    table.ta0 th,
    table.ta0 td {
        padding: 8px 6px;
        white-space: nowrap;
    }
    
    /* 都道府県列の幅を固定 */
    table.ta0 td:first-child {
        min-width: 70px;
        white-space: nowrap;
    }
    
    /* 病院名列 */
    table.ta0 td:nth-child(2) {
        min-width: 200px;
    }
    
    /* リンクをタップしやすく */
    table.ta0 td a {
        display: inline-block;
        padding: 3px 0;
    }
    
    /* ----- 日本地図対応 ----- */
    .japan_map {
        width: 100%;
        max-width: 400px;
        margin: 0 auto 20px;
    }
    
    .japan_map img {
        width: 100%;
        height: auto;
    }
    
    /* ボタンを大きく、タップしやすく */
    .japan_map .area_btn {
        font-size: 11px;
        min-height: 36px;
        line-height: 1.3;
        padding: 4px 2px;
        border-width: 2px;
    }
    
    /* 都道府県リストをタップしやすく */
    .japan_map .pref_list {
        width: 95%;
    }
    
    .japan_map .pref_list > div {
        min-height: 44px; /* Appleのタップ推奨サイズ */
        line-height: 44px;
        padding: 0 0.5em;
        font-size: 14px;
    }
    
    /* ----- サイドバー対応 ----- */
    #sub {
        margin-top: 30px;
        padding-top: 20px;
        border-top: 2px solid #ddd;
    }
    
    ul.submenu {
        font-size: 15px;
    }
    
    ul.submenu li {
        padding: 0;
    }
    
    ul.submenu li a {
        display: block;
        padding: 12px 10px;
        min-height: 44px;
        line-height: 1.4;
    }
    
    /* ----- ボタン対応 ----- */
    .btn03 {
        width: 100%;
        padding: 20px 15px;
    }
    
    #contents .btn03 a {
        font-size: 18px;
    }
    
    /* ----- ヘッダー/トップセクション ----- */
    .top-description h2 {
        font-size: 24px;
        margin-bottom: 20px;
    }
    
    .inner-bg {
        padding-bottom: 30px;
    }
    
    /* ----- 2カラム/3カラムレイアウト ----- */
    .twoColInner {
        display: block !important;
        margin-right: 0 !important;
    }
    
    .twoColInner > div {
        width: 100% !important;
        margin-right: 0 !important;
        margin-bottom: 15px !important;
        display: block !important;
    }
    
    .twoColInner div,
    .threeColInner div {
        margin-bottom: 15px;
    }
    
    /* ----- フッター ----- */
    footer {
        padding: 15px 10px;
        font-size: 12px;
    }
    
    /* トップへ戻るボタン */
    .totop {
        bottom: 10px;
        right: 10px;
    }
    
    .totop img {
        width: 40px;
        height: auto;
    }
}

/* ===========================================
   小さいスマートフォン対応 (480px以下)
   =========================================== */
@media screen and (max-width: 480px) {
    
    #main h1 {
        font-size: 20px;
    }
    
    #main h2 {
        font-size: 16px;
    }
    
    #contents p {
        font-size: 14px;
    }
    
    /* アコーディオン（小さい画面）*/
    .accordion-008 summary {
        font-size: 13px !important;
        padding: 12px 45px 12px 12px !important;
    }
    
    .accordion-008 summary::after {
        right: 15px !important;
        width: 9px !important;
        height: 9px !important;
    }
    
    table.ta0 {
        font-size: 12px;
    }
    
    table.ta0 th,
    table.ta0 td {
        padding: 6px 4px;
    }
    
    /* 日本地図ボタンをさらに調整 */
    .japan_map .area_btn {
        font-size: 10px;
        min-height: 32px;
    }
    
    .top-description h2 {
        font-size: 20px;
    }
}

/* ===========================================
   印刷対応（おまけ）
   =========================================== */
@media print {
    .japan_map,
    #cssmenu,
    .totop,
    #sub {
        display: none;
    }
    
    #main {
        width: 100%;
        float: none;
    }
    
    table.ta0 {
        font-size: 10px;
    }
}
