/* ============================================================
   カスタム CSS ライブラリ
   構成:
     01. フォントサイズ設定
     02. テーマカラー変数 (data-bs-theme=green)
     03. 共通スタイル
     04. スピナー
     05. ボタン
     06. ナビバー
     07. ヘッダー / カルーセル
     08. サービスカード
     09. 当院でできること カード
     10. 特色カード
     11. 透析特色カード
     12. グラデーションカード（防災等）
     13. 入院のしおり
     14. お知らせ
     15. お知らせ詳細
     16. フッター / コピーライト
     17. ユーティリティ
     18. Topbar固定
     19. スマホ / タブレット レスポンシブ（max-width: 768px）
   ============================================================ */


/* ============================================================
   01. フォントサイズ設定
   ============================================================ */

html.font-small {
    font-size: 85%;
}

html.font-normal {
    font-size: 100%;
}

html.font-large {
    font-size: 125%;
}

.fs-7 {
    font-size: 0.9rem !important;
}

.fs-8 {
    font-size: 0.8rem !important;
}


/* ============================================================
   02. テーマカラー変数 (data-bs-theme=green)
   ============================================================ */

[data-bs-theme=green] {
    /* --- Bootstrap カラーパレット --- */
    --bs-blue: #007bff;
    --bs-indigo: #6610f2;
    --bs-purple: #6f42c1;
    --bs-pink: #d63384;
    --bs-red: #dc3545;
    --bs-orange: #fd7e14;
    --bs-yellow: #ffc107;
    --bs-green: #28a745; /* メインの緑色 */
    --bs-teal: #20c997;
    --bs-cyan: #17a2b8;
    --bs-black: #000;
    --bs-white: #fff;
    /* --- グレースケール --- */
    --bs-gray: #6c757d;
    --bs-gray-dark: #343a40;
    --bs-gray-100: #f8f9fa;
    --bs-gray-200: #e9ecef;
    --bs-gray-300: #dee2e6;
    --bs-gray-400: #ced4da;
    --bs-gray-500: #adb5bd;
    --bs-gray-600: #6c757d;
    --bs-gray-700: #495057;
    --bs-gray-800: #343a40;
    --bs-gray-900: #212529;
    /* --- セマンティックカラー --- */
    --bs-primary: var(--bs-green);
    --bs-secondary: var(--bs-gray-600);
    --bs-success: var(--bs-green);
    --bs-info: var(--bs-cyan);
    --bs-warning: var(--bs-yellow);
    --bs-danger: var(--bs-red);
    --bs-light: var(--bs-gray-100);
    --bs-dark: #66B81F; /* bg-dark を緑に統一 */
    /* --- RGB 値 --- */
    --bs-secondary-rgb: 108, 117, 125;
    --bs-success-rgb: 40, 167, 69;
    --bs-info-rgb: 23, 162, 184;
    --bs-warning-rgb: 255, 193, 7;
    --bs-danger-rgb: 220, 53, 69;
    --bs-light-rgb: 248, 249, 250;
    --bs-dark-rgb: 102, 184, 31; /* bg-dark と統一 */
    --bs-white-rgb: 255, 255, 255;
    --bs-black-rgb: 0, 0, 0;
    /* --- テキスト強調色 --- */
    --bs-primary-text-emphasis: #155724;
    --bs-secondary-text-emphasis: #2b2f32;
    --bs-success-text-emphasis: #155724;
    --bs-info-text-emphasis: #055160;
    --bs-warning-text-emphasis: #664d03;
    --bs-danger-text-emphasis: #58151c;
    --bs-light-text-emphasis: #495057;
    --bs-dark-text-emphasis: #fff; /* 緑背景に白字 */
    /* --- サブトル背景色 --- */
    --bs-primary-bg-subtle: #d4edda;
    --bs-secondary-bg-subtle: #e2e3e5;
    --bs-success-bg-subtle: #d4edda;
    --bs-info-bg-subtle: #cff4fc;
    --bs-warning-bg-subtle: #fff3cd;
    --bs-danger-bg-subtle: #f8d7da;
    --bs-light-bg-subtle: #fcfcfd;
    --bs-dark-bg-subtle: #d4efc5; /* 淡い緑 */
    /* --- サブトルボーダー色 --- */
    --bs-primary-border-subtle: #a3cfbb;
    --bs-secondary-border-subtle: #c4c8cb;
    --bs-success-border-subtle: #a3cfbb;
    --bs-info-border-subtle: #9eeaf9;
    --bs-warning-border-subtle: #ffe69c;
    --bs-danger-border-subtle: #f1aeb5;
    --bs-light-border-subtle: #e9ecef;
    --bs-dark-border-subtle: #8bcf55; /* 緑の境界色 */
    /* --- ボディ基本 --- */
    --bs-body-font-size: 1rem;
    --bs-body-font-weight: 400;
    --bs-body-line-height: 1.5;
    --bs-body-color: #212529;
    --bs-body-color-rgb: 33, 37, 41;
    --bs-body-bg: #fff;
    --bs-body-bg-rgb: 255, 255, 255;
    /* --- 強調・サブカラー --- */
    --bs-emphasis-color: #000;
    --bs-emphasis-color-rgb: 0, 0, 0;
    --bs-secondary-color: rgba(33, 37, 41, 0.75);
    --bs-secondary-color-rgb: 33, 37, 41;
    --bs-secondary-bg: #e9ecef;
    --bs-secondary-bg-rgb: 233, 236, 239;
    --bs-tertiary-color: rgba(33, 37, 41, 0.5);
    --bs-tertiary-color-rgb: 33, 37, 41;
    --bs-tertiary-bg: #f8f9fa;
    --bs-tertiary-bg-rgb: 248, 249, 250;
    /* --- リンク色 --- */
    --bs-heading-color: inherit;
    --bs-link-color: #3a7a13; /* 濃い緑 */
    --bs-link-color-rgb: 58, 122, 19;
    --bs-link-hover-color: #28540d;
    --bs-link-hover-color-rgb: 40, 84, 13;
    /* --- コード・ハイライト --- */
    --bs-code-color: var(--bs-pink);
    --bs-highlight-color: #212529;
    --bs-highlight-bg: #fff3cd;
    /* --- ボーダー --- */
    --bs-border-width: 1px;
    --bs-border-style: solid;
    --bs-border-color: #dee2e6;
    --bs-border-color-translucent: rgba(0, 0, 0, 0.175);
    /* --- 角丸 --- */
    --bs-border-radius: 0.375rem;
    --bs-border-radius-sm: 0.25rem;
    --bs-border-radius-lg: 0.5rem;
    --bs-border-radius-xl: 1rem;
    --bs-border-radius-xxl: 2rem;
    --bs-border-radius-2xl: var(--bs-border-radius-xxl);
    --bs-border-radius-pill: 50rem;
    /* --- ボックスシャドウ --- */
    --bs-box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    --bs-box-shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --bs-box-shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.175);
    --bs-box-shadow-inset: inset 0 1px 2px rgba(0, 0, 0, 0.075);
    /* --- フォーカスリング --- */
    --bs-focus-ring-width: 0.25rem;
    --bs-focus-ring-opacity: 0.25;
    --bs-focus-ring-color: rgba(102, 184, 31, 0.25); /* 緑 */
    /* --- フォームバリデーション --- */
    --bs-form-valid-color: var(--bs-success);
    --bs-form-valid-border-color: var(--bs-success);
    --bs-form-invalid-color: var(--bs-danger);
    --bs-form-invalid-border-color: var(--bs-danger);
    /* --- グラデーション --- */
    --bs-gradient: linear-gradient(180deg, rgba(255,255,255,0.15), rgba(255,255,255,0));
    /* --- テーブル --- */
    --bs-table-bg2: #ffffff;
    --bs-table-color2: #2b4a3a;
    --bs-table-border-color2: #c0ead8;
    --bs-table-striped-bg: #eafcf1;
    --bs-table-hover-bg: #dbeaf0;
    --bs-table-header-bg: #d5f0c2;
    --bs-table-header-color: #1f382c;
    /* --- サイト固有カラー --- */
    --bs-title-color: #6BBA26;
    --bs-heading-color-theme: #4d6d3d;
    --bs-service-hover-bg: rgba(190, 237, 190, 0.6);
    --bs-header-mask-bg: rgba(190, 237, 190, 0.6);
    --bs-carousel-title-color: #388e3c;
}


/* ============================================================
   03. 共通スタイル
   ============================================================ */

/* フォント設定 */
:root {
    --bs-font-sans-serif: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Meiryo", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-family-monospace: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

body {
    font-family: var(--bs-font-sans-serif);
    font-weight: 400;
    padding-top: 135px; /* Topbar + Navbar の高さ分 */
    overflow-x: hidden;
}

html, body {
    height: 100%;
}

body {
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--bs-font-sans-serif);
}

/* 見出し・太さ */
h1, .h1, h2, .h2, .fw-bold {
    font-weight: 600 !important;
}

h3, .h3, h4, .h4, .fw-medium {
    font-weight: 500 !important;
}

h5, .h5, h6, .h6, .fw-semi-bold {
    font-weight: 400 !important;
}

a {
    text-decoration: none;
}

/* スムーズスクロール */
html {
    scroll-behavior: smooth;
}

/* アンカーリンクのスクロール位置補正 */
[id] {
    scroll-margin-top: 150px;
}

/* テーマ見出し */
.theme-heading {
    color: var(--bs-heading-color-theme);
    font-size: 2rem;
}

.theme-heading2 {
    color: var(--bs-heading-color-theme);
    font-size: 1.75rem;
}

[data-bs-theme] .display-8 {
    color: var(--bs-title-color);
}

/* ページ先頭へ戻るボタン */
.back-to-top {
    position: fixed;
    display: none;
    right: 30px;
    bottom: 30px;
    z-index: 99;
}

/* カスタムボーダー */
.border-custom {
    border-color: #0f4229;
    border-width: 2px;
}

/* 縁取りテキスト */
.outlined-text {
    color: #fff;
    text-shadow: 1px 1px 0 var(--bs-dark), -1px -1px 0 var(--bs-dark), 1px -1px 0 var(--bs-dark), -1px 1px 0 var(--bs-dark);
}

/* object-fit ユーティリティ */
.object-fit-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* スマホでのみ改行 */
.sp-br {
    display: none;
}


/* ============================================================
   03-a. テーブル共通
   ============================================================ */

[data-bs-theme] .table {
    background-color: var(--bs-table-bg);
    color: var(--bs-table-color);
    border-color: var(--bs-table-border-color);
}

    [data-bs-theme] .table thead tr th,
    [data-bs-theme] .table tbody tr th {
        background-color: var(--bs-table-header-bg);
        color: var(--bs-table-header-color);
        border-color: var(--bs-table-border-color);
    }

    [data-bs-theme] .table tbody tr td {
        background-color: var(--bs-table-bg2);
        color: var(--bs-table-color2);
        border-color: var(--bs-table-border-color2);
    }

/* 角丸テーブル用：最終行の下線を消す */
.table tbody tr:last-child td {
    border-bottom: none;
}

/* テーブルフォントサイズ */
@media (max-width: 767px) {
    .table {
        font-size: 1rem;
        font-weight: 400;
    }
}

@media (min-width: 768px) {
    .table {
        font-size: 1.25rem;
        font-weight: 500;
    }
}

/* 注釈リスト */
.info-list {
    text-align: left;
}

.info-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 0.5rem;
}

.bullet {
    flex-shrink: 0;
    width: 1.2em;
    font-size: 1.1rem;
    line-height: 1.6;
}

/* カードヘッダー共通 */
.card .card-header {
    color: var(--bs-table-header-color);
    background-color: var(--bs-table-header-bg);
    font-weight: 400;
    font-size: 1.1rem;
    padding: 0.75rem 1rem;
    border-bottom: 2px solid rgba(0,0,0,0.1);
    border-radius: 0.25rem 0.25rem 0 0;
}


/* ============================================================
   04. スピナー
   ============================================================ */

/* フェードスピナー（旧 #spinner） */
#spinner {
    opacity: 0;
    visibility: hidden;
    transition: opacity .5s ease-out, visibility 0s linear .5s;
    z-index: 99999;
}

    #spinner.show {
        transition: opacity .5s ease-out, visibility 0s linear 0s;
        visibility: visible;
        opacity: 1;
    }

/* オーバーレイスピナー */
#spinnerOverlay {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.6);
    z-index: 9999;
}

.spinner-border {
    width: 5rem;
    height: 5rem;
    border-width: 0.6rem;
    border-style: solid;
    border-color: #28a745 transparent #a8e063 transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}


/* ============================================================
   05. ボタン
   ============================================================ */

.btn {
    transition: .5s;
    font-weight: 500;
}

/* Primary / Outline */
.btn-primary,
.btn-outline-primary:hover {
    color: var(--bs-light);
}

/* 正方形ボタン */
.btn-square {
    width: 38px;
    height: 38px;
}

.btn-sm-square {
    width: 32px;
    height: 32px;
}

.btn-lg-square {
    width: 48px;
    height: 48px;
}

.btn-square,
.btn-sm-square,
.btn-lg-square {
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: normal;
}

/* カラーバリアント */
.btn-blue {
    --bs-btn-color: #fff;
    --bs-btn-bg: #0d6efd;
    --bs-btn-border-color: #0d6efd;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: #0b5ed7;
    --bs-btn-hover-border-color: #0a58ca;
    --bs-btn-focus-shadow-rgb: 49, 132, 253;
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: #0a58ca;
    --bs-btn-active-border-color: #0a53be;
    --bs-btn-active-shadow: inset 0 3px 5px rgba(0,0,0,.125);
    --bs-btn-disabled-color: #fff;
    --bs-btn-disabled-bg: #0d6efd;
    --bs-btn-disabled-border-color: #0d6efd;
}

.btn-green {
    --bs-btn-color: #fff;
    --bs-btn-bg: #6BBA26;
    --bs-btn-border-color: #6BBA26;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: #5ba61f;
    --bs-btn-hover-border-color: #51941b;
    --bs-btn-focus-shadow-rgb: 107, 186, 38;
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: #4a8418;
    --bs-btn-active-border-color: #3f7214;
    --bs-btn-active-shadow: inset 0 3px 5px rgba(0,0,0,.125);
    --bs-btn-disabled-color: #fff;
    --bs-btn-disabled-bg: #6BBA26;
    --bs-btn-disabled-border-color: #6BBA26;
}

.btn-red {
    --bs-btn-color: #fff;
    --bs-btn-bg: #e65c5c;
    --bs-btn-border-color: #e65c5c;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: #cf4e4e;
    --bs-btn-hover-border-color: #c14747;
    --bs-btn-focus-shadow-rgb: 230, 92, 92;
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: #b44141;
    --bs-btn-active-border-color: #a03b3b;
    --bs-btn-active-shadow: inset 0 3px 5px rgba(0,0,0,.125);
    --bs-btn-disabled-color: #fff;
    --bs-btn-disabled-bg: #e65c5c;
    --bs-btn-disabled-border-color: #e65c5c;
}

.btn-orange {
    --bs-btn-color: #fff;
    --bs-btn-bg: #fd8c38;
    --bs-btn-border-color: #fd8c38;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: #e17c2f;
    --bs-btn-hover-border-color: #c96f2b;
    --bs-btn-focus-shadow-rgb: 253, 140, 56;
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: #b96127;
    --bs-btn-active-border-color: #a55524;
    --bs-btn-active-shadow: inset 0 3px 5px rgba(0,0,0,.125);
    --bs-btn-disabled-color: #fff;
    --bs-btn-disabled-bg: #fd8c38;
    --bs-btn-disabled-border-color: #fd8c38;
}

.btn-pink {
    --bs-btn-color: #fff;
    --bs-btn-bg: #d685ad;
    --bs-btn-border-color: #d685ad;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: #c2779c;
    --bs-btn-hover-border-color: #af6b8c;
    --bs-btn-focus-shadow-rgb: 214, 133, 173;
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: #9d5e7c;
    --bs-btn-active-border-color: #8a526c;
    --bs-btn-active-shadow: inset 0 3px 5px rgba(0,0,0,.125);
    --bs-btn-disabled-color: #fff;
    --bs-btn-disabled-bg: #d685ad;
    --bs-btn-disabled-border-color: #d685ad;
}

/* グラデーションホバーボタン */
.btn-hover-gradient {
    background: linear-gradient(45deg, #28a745, #28a745);
    color: #fff;
    border: 1px solid transparent;
    transition: all 0.3s ease;
}

    .btn-hover-gradient:hover {
        background: linear-gradient(45deg, #ff7f50, #ff1493);
        color: #fff;
        border: 1px solid transparent;
    }

/* 読み上げボタン */
.speech-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.speechBtn,
.speechStopBtn {
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}


/* ============================================================
   06. ナビバー
   ============================================================ */

.navbar.sticky-top {
    top: -100px;
    transition: .5s;
}

.navbar .navbar-brand,
.navbar a.btn {
    height: 80px;
}

.navbar .navbar-nav .nav-link {
    margin-right: 35px;
    padding: 25px 0 5px 0;
    color: var(--bs-link-color);
    font-size: 1.1rem;
    font-weight: 400;
    outline: none;
}

    .navbar .navbar-nav .nav-link:hover,
    .navbar .navbar-nav .nav-link.active {
        color: var(--bs-primary);
    }

.navbar .dropdown-toggle::after {
    border: none;
    content: "\f107";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    vertical-align: middle;
    margin-left: 8px;
}

/* サイトロゴ */
.site-logo {
    height: 70px;
    width: auto;
    transition: 0.2s;
}

/* モバイルナビバー */
@media (max-width: 991.98px) {
    .navbar .navbar-nav .nav-link {
        margin-right: 0;
        padding: 10px 0;
    }

    .navbar .navbar-nav {
        border-top: 1px solid #EEEEEE;
    }
}

/* デスクトップ ドロップダウン */
@media (min-width: 992px) {
    .navbar .nav-item .dropdown-menu {
        display: block;
        border: none;
        margin-top: 0;
        top: 150%;
        opacity: 0;
        visibility: hidden;
        transition: .5s;
    }

    .navbar .nav-item:hover .dropdown-menu {
        top: 100%;
        visibility: visible;
        opacity: 1;
    }
}


/* ============================================================
   07. ヘッダー / カルーセル
   ============================================================ */

/* カルーセルキャプション */
.carousel-caption h1 {
    color: var(--bs-carousel-title-color);
    font-size: 2.5rem;
    font-weight: 400;
    text-shadow: -1px -1px 0 #fff, 1px -1px 0 #fff, -1px 1px 0 #fff, 1px 1px 0 #fff;
}

.carousel-caption h3 {
    color: #FFFFFF;
    font-size: 1.5rem;
    font-weight: 400;
    text-shadow: 0 0 4px rgba(0,0,0,.9), 0 0 8px rgba(0,0,0,.8), 0 0 12px rgba(0,0,0,.6), 0 0 16px rgba(0,0,0,.4);
}

@media (max-width: 768px) {
    .carousel-caption h1 {
        font-size: 1.8rem;
    }

    .carousel-caption h3 {
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    .carousel-caption h1 {
        font-size: 1.4rem;
    }

    .carousel-caption h3 {
        font-size: 0.9rem;
    }
}

/* カルーセルコントロール */
.carousel-control-prev,
.carousel-control-next {
    width: 15%;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 3rem;
    background-color: var(--bs-primary);
    border: 10px solid var(--bs-primary);
}

/* カルーセルアイテム（モバイル） */
@media (max-width: 768px) {
    #header-carousel .carousel-item {
        position: relative;
        min-height: 250px;
    }

        #header-carousel .carousel-item img {
            position: absolute;
            width: 100%;
            height: 100%;
            object-fit: cover;
        }
}

/* カルーセルアイテム（PC） */
@media (min-width: 768px) {
    #header-carousel .carousel-item {
        position: relative;
        min-height: 550px;
    }

        #header-carousel .carousel-item img {
            position: absolute;
            width: 100%;
            height: 100%;
            object-fit: cover;
        }
}

/* カルーセル画像フェードマスク */
.carousel-item img {
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%);
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-size: 100% 100%;
    mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%);
    mask-repeat: no-repeat;
    mask-size: 100% 100%;
    mask-composite: intersect;
    display: block;
    width: 100%;
    height: auto;
}

/* ページヘッダー */
.page-header {
    background-size: cover;
}

    .page-header .image {
        background: linear-gradient(var(--bs-header-mask-bg), var(--bs-header-mask-bg)), var(--header-bg) center center no-repeat;
        background-size: cover;
        -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
        -webkit-mask-repeat: no-repeat;
        -webkit-mask-size: cover;
        mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
        mask-repeat: no-repeat;
        mask-size: cover;
    }

    .page-header .breadcrumb-item + .breadcrumb-item::before {
        color: var(--bs-light);
    }

    .page-header .breadcrumb-item,
    .page-header .breadcrumb-item a {
        font-size: 18px;
        color: var(--bs-light);
    }

/* 区切り線 */
.divider-line1 {
    width: calc(100% + 50px);
    height: 20px;
    background-image: url('../image/line1.png');
    background-repeat: no-repeat;
    background-position: center;
    background-size: auto 100%;
    display: block;
    margin-left: -25px;
}

.divider-line2 {
    width: calc(100% + 40px);
    height: 20px;
    background-image: url('../image/line2.png');
    background-repeat: repeat-x;
    background-position: center;
    background-size: auto 100%;
    display: block;
    margin-left: -20px;
}


/* ============================================================
   08. サービスカード
   ============================================================ */

.service-item {
    position: relative;
    text-align: center;
    border-radius: 10px;
    cursor: pointer;
}

    /* 背景画像エリア */
    .service-item .service-img {
        position: absolute;
        width: 100%;
        height: 100%;
        top: 0;
        left: 0;
        overflow: hidden;
        z-index: -1;
        border-radius: 10px;
    }

        .service-item .service-img img {
            position: absolute;
            width: 100%;
            height: 100%;
            left: 0;
            object-fit: cover;
            transform: scale(1);
            transition: .3s;
            z-index: -1;
        }

    .service-item:hover .service-img img {
        transform: scale(1.2);
    }

    /* テキストエリア */
    .service-item .service-text {
        background: rgba(255,255,255,0.95);
        box-shadow: 0 0 45px rgba(0,0,0,0.08);
        transition: .3s;
        border-radius: 10px 0 0 10px;
        margin-right: -10px;
        border-top: 1px solid #cfe8d5;
        border-left: 1px solid #cfe8d5;
        border-bottom: 1px solid #cfe8d5;
    }

    .service-item:hover .service-text {
        background: var(--bs-service-hover-bg);
    }

    .service-item .service-text h4 {
        color: var(--bs-dark);
    }

    .service-item .service-text h4,
    .service-item .service-text p {
        transition: .3s;
    }

    .service-item:hover .service-text h4 {
        color: #FFFFFF;
    }

    .service-item:hover .service-text p {
        color: var(--bs-light);
    }

    /* アイコンボタン */
    .service-item .service-text .btn-square {
        width: 100px;
        height: 100px;
        background: transparent;
        transition: .5s;
    }

    .service-item:hover .service-text .btn-square {
        background: var(--bs-light);
    }

    /* 詳細ボタン（ホバーで展開） */
    .service-item .service-text .btn {
        width: 31px;
        height: 31px;
        display: inline-flex;
        align-items: center;
        color: var(--bs-dark);
        background: var(--bs-primary-bg-subtle);
        white-space: nowrap;
        overflow: hidden;
        transition: .3s;
    }

    .service-item:hover .service-text .btn {
        width: 112px;
    }


/* ============================================================
   09. 当院でできること カード
   ============================================================ */

/* グリッドレイアウト */
.row-auto-fit {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    max-width: 1600px;
    margin: 0 auto;
}

/* カード本体 */
.custom-card-toin {
    height: auto;
    min-height: 420px;
    border-radius: 20px;
    overflow: hidden;
    background: linear-gradient(to top, #d5f0c2 0%, #ffffff 40%);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    display: flex;
    flex-direction: column;
}

/* 5列表示できる大画面だけ固定 */
@media (min-width: 1400px) {

    .custom-card-toin {
        height: 420px;
    }
}

/* 画像エリア（斜め clip） */
.card-image {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    clip-path: polygon(0 0, 100% 0, 100% 70%, 50% 70%, 0 100%);
}

    .card-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

/* コンテンツエリア */
.card-content {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    padding: 1rem;
    margin-top: -3rem;
    flex-grow: 1;
}

/* タイトル */
.card-title {
    width: 100%;
    padding-right: 1rem;
    text-align: right;
    margin-bottom: 1rem;
    font-size: 1.3rem;
    font-weight: 400;
    line-height: 1.4;
    color: #2b4b2b;
    box-sizing: border-box;
}

/* バッジリスト */
.badge-list {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    align-items: flex-end;
}

.badge-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0.65rem 1rem;
    border-radius: 999px;
    transition: all 0.3s ease;
}

    .badge-link:hover {
        background: linear-gradient(45deg, #ff7f50, #ff1493);
        color: #fff;
    }

/* スマホ調整 */
@media (max-width: 768px) {
    .custom-card-toin {
        height: auto;
        min-height: 420px;
    }

    .card-content {
        margin-top: -1.5rem;
        align-items: center;
    }

    .card-title {
        text-align: center;
        margin-right: 0;
        padding-right: 0;
        display: flex;
        justify-content: center;
    }

    .badge-list {
        align-items: center;
    }

    .badge-link {
        width: 85%;
        max-width: 320px;
    }
}


/* ============================================================
   10. 特色カード
   ============================================================ */

/* トップページ：3色バリエーション */
.feature-card {
    border-radius: 16px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

    /* 左アクセントライン */
    .feature-card::before {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        width: 6px;
        height: 100%;
        background: #66B81F;
    }

    /* 右上装飾円 */
    .feature-card::after {
        content: "";
        position: absolute;
        top: -30px;
        right: -30px;
        width: 120px;
        height: 120px;
        background: rgba(102,184,31,0.08);
        border-radius: 50%;
    }

    .feature-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    }

/* カラーバリエーション */
.feature-card, .feature-1 {
    background: linear-gradient(135deg, #ffffff 0%, rgba(102,184,31,0.08) 100%);
}

.feature-2 {
    background: linear-gradient(135deg, #ffffff 0%, rgba(23,162,184,0.08) 100%);
}

.feature-3 {
    background: linear-gradient(135deg, #ffffff 0%, rgba(255,193,7,0.08) 100%);
}

.feature-1:hover {
    background: linear-gradient(135deg, #ffffff 0%, rgba(102,184,31,0.16) 100%);
}

.feature-2:hover {
    background: linear-gradient(135deg, #ffffff 0%, rgba(23,162,184,0.16) 100%);
}

.feature-3:hover {
    background: linear-gradient(135deg, #ffffff 0%, rgba(255,193,7,0.16) 100%);
}

/* 詳細ページ：特色カード */
.feature-card-detail {
    min-height: 200px;
    border-radius: 16px;
    overflow: hidden;
    background: linear-gradient(135deg, #ffffff 0%, rgba(102,184,31,0.05) 100%);
    transition: all 0.3s ease;
}

    .feature-card-detail .card-body {
        padding: 0.8rem;
    }

    .feature-card-detail .card-title {
        margin-bottom: 12px;
        font-weight: 600;
        color: #333;
        position: relative;
        word-break: keep-all;
        padding-bottom: 10px;
    }

        /* タイトル下線 */
        .feature-card-detail .card-title::after {
            content: "";
            position: absolute;
            left: 0;
            bottom: 0;
            width: 80px;
            height: 2px;
            background: #66B81F;
        }

    .feature-card-detail .card-text {
        margin-top: 8px;
        margin-left: 3px;
        color: #555;
        line-height: 1.7;
        font-size: 0.95rem;
    }


/* ============================================================
   11. 透析特色カード
   ============================================================ */

.toseki-feature-card {
    border-radius: 14px;
    padding: 24px;
    border: 1px solid #e5e7eb;
    transition: transform 0.22s ease, box-shadow 0.22s ease;
    background: linear-gradient(180deg, #ffffff 0%, #f0f9f6 75%);
    border-top: 3px solid #4aab8a;
}

    .toseki-feature-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 10px 28px rgba(0,0,0,0.08);
    }

    /* カラーバリエーション */
    .toseki-feature-card.card-history {
        background: linear-gradient(180deg, #ffffff 0%, #eef8f5 75%);
        border-top: 3px solid #3a9e88;
    }

    .toseki-feature-card.card-hospital {
        background: linear-gradient(180deg, #ffffff 0%, #f2f9ec 75%);
        border-top: 3px solid #7aba45;
    }

    .toseki-feature-card.card-lab {
        background: linear-gradient(180deg, #ffffff 0%, #ebf7ee 75%);
        border-top: 3px solid #3aaa5e;
    }

    .toseki-feature-card.card-hdf {
        background: linear-gradient(180deg, #ffffff 0%, #edf5fb 75%);
        border-top: 3px solid #4a90c4;
    }

/* アイコンバッジ */
.toseki-feature-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    margin-bottom: 16px;
}

.icon-history {
    background: #e2f5f1;
    color: #2e8a72;
}

.icon-hospital {
    background: #eef7e4;
    color: #5e9a2a;
}

.icon-lab {
    background: #e2f5e8;
    color: #2e9450;
}

.icon-hdf {
    background: #e4f0f9;
    color: #3478b0;
}

/* テキスト */
.toseki-feature-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 10px;
}

.toseki-feature-text {
    font-size: 1.2rem;
    color: #444;
    line-height: 1.85;
    margin-bottom: 10px;
}

.toseki-feature-note {
    font-size: 1rem;
    color: #4b5563;
    line-height: 1.7;
    padding-top: 10px;
    border-top: 1px dashed #d1d5db;
}


/* ============================================================
   12. グラデーションカード（防災・施設案内等）
   ============================================================ */

.gradient-card {
    display: flex;
    flex-direction: row;
    min-height: 140px;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    border: 1px solid #eee;
}

/* 左：テキストエリア（背景画像 + 白レイヤー） */
.card-text-area {
    flex: 1;
    position: relative;
    background-size: contain;
    background-position: center -2px;
    background-repeat: no-repeat;
    color: #333;
}

    .card-text-area::before {
        content: "";
        position: absolute;
        inset: 0;
        background: rgba(255,255,255,0.6);
        z-index: 0;
    }

    .card-text-area > * {
        position: relative;
        z-index: 1;
    }

/* 右：画像エリア */
.card-image-area {
    flex: 1;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* 採用情報バナー */
.recruit-banner {
    position: relative;
    height: 250px;
    border-radius: 12px;
    overflow: hidden;
    background-image: url('../image/backimage4.jpg');
    background-size: cover;
    background-position: center;
}

    .recruit-banner .content {
        position: relative;
        z-index: 1;
    }


/* ============================================================
   13. 入院のしおり
   ============================================================ */

.hospital-guide {
    background-color: #fdfdfd;
    border: 2px solid #228B22;
    padding: 20px;
    border-radius: 10px;
    max-width: 600px;
    width: 100%;
    margin: 10px auto;
    position: relative;
    overflow: hidden;
}

.hospital-guide-wide {
    max-width: none;
}

/* 右上ロゴ装飾 */
.hospital-guide::after {
    content: "";
    position: absolute;
    top: 30px;
    right: 10px;
    transform: translateY(-50%);
    width: 60px;
    height: 60px;
    background-image: url('../img/ロゴ.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0.2;
    pointer-events: none;
}

/* リスト */
.hospital-guide ul {
    list-style: none;
    padding-left: 1rem;
}

    .hospital-guide ul li {
        font-weight: 400;
        margin-left: 20px;
        position: relative;
        line-height: 1.6;
    }

        .hospital-guide ul li::before {
            content: "●";
            color: #6BBA26;
            font-weight: 400;
            position: absolute;
            left: -30px;
            width: 1em;
        }

/* 注意書き */
.hospital-guide .note {
    background-color: #fff3cd;
    border-left: 4px solid #ffe066;
    padding: 10px;
    margin-top: 15px;
    font-weight: 400;
}

/* 背景付きカード（ページ内） */
.custom-card {
    border: 2px solid #228B22;
    border-radius: 20px;
    padding: 1.5rem 0;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    position: relative;
}

    /* 下→上フェード */
    .custom-card::before {
        content: "";
        position: absolute;
        left: 0;
        top: 0;
        right: 0;
        bottom: 0;
        background: linear-gradient(to top, rgba(255,255,255,0.5) 0%, rgba(255,255,255,0.8) 30%, rgba(255,255,255,0.9) 70%, rgba(255,255,255,1) 100%);
        z-index: 0;
    }


/* ============================================================
   14. お知らせ
   ============================================================ */

.notice-wrapper {
    width: 100%;
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
    box-sizing: border-box;
}

.notice-content {
    display: inline-block;
    padding: 1.5rem;
    background-color: #fdfdfd;
    border-radius: 6px;
    font-size: 1.2rem;
    line-height: 1.6;
    color: #333;
    width: fit-content;
    max-width: 100%;
    word-break: break-word;
    box-sizing: border-box;
    margin: 0 auto;
    min-width: min(300px, 100%);
}

/* お知らせリスト */
.notice-item {
    line-height: 1.6;
}

.notice-date {
    width: 115px;
    font-size: 1rem;
    flex-shrink: 0;
}

.notice-title {
    flex: 1;
    word-break: break-word;
    font-size: 1.1rem;
    line-height: 1.6;
}

    .notice-title a {
        text-decoration: none;
    }

        .notice-title a:hover {
            text-decoration: underline;
        }


/* ============================================================
   15. お知らせ詳細
   ============================================================ */

.notice-detail-container {
    max-width: 1000px;
}

.notice-detail-wrapper {
    padding: 2rem;
    background: #fff;
    border-radius: 12px;
}

.notice-detail-title {
    font-size: 2rem;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.notice-detail-date {
    color: #6c757d;
    margin-bottom: 2rem;
}

.notice-detail-content {
    line-height: 2;
    font-size: 1.05rem;
}

    .notice-detail-content pre {
        white-space: pre-wrap;
        word-break: break-word;
        font-family: inherit;
        font-size: inherit;
        line-height: inherit;
        margin: 0;
    }

/* お知らせコンテナ（白背景・中央固定幅） */
.notice-container .container {
    background-color: #ffffff;
    max-width: 960px;
}

@media (max-width: 767px) {
    .notice-container .container {
        padding: 2rem 1.5rem;
    }
}


/* ============================================================
   16. フッター / コピーライト
   ============================================================ */

.footer .btn.btn-link {
    display: block;
    margin-bottom: 5px;
    padding: 0;
    text-align: left;
    color: var(--bs-light);
    font-weight: 400;
    text-transform: capitalize;
    transition: .3s;
}

    .footer .btn.btn-link::before {
        position: relative;
        content: "\f105";
        font-family: "Font Awesome 6 Free";
        font-weight: 900;
        margin-right: 10px;
    }

    .footer .btn.btn-link:hover {
        color: var(--bs-primary);
        letter-spacing: 1px;
        box-shadow: none;
    }

.copyright {
    color: var(--bs-light);
    background: #072A19;
}

    .copyright a {
        color: #FFFFFF;
    }

        .copyright a:hover {
            color: var(--bs-primary);
        }


/* ============================================================
   17. ユーティリティ（透析QA）
   ============================================================ */

.page-title {
    font-weight: bold;
    margin-bottom: 1.5rem;
}

.qa-section {
    margin-bottom: 2rem;
}

.accordion-button {
    font-weight: 500;
}


/* ============================================================
   18. Topbar 固定サイズ
   ============================================================ */

.topbar-fixed-size {
    font-size: 16px !important;
    padding-top: 8px !important;
    padding-bottom: 8px !important;
}

    .topbar-fixed-size .btn {
        font-size: 14px !important;
        padding: 0.25rem 0.5rem !important;
    }

    .topbar-fixed-size .btn-group {
        gap: 0 !important;
    }

    .topbar-fixed-size .topbar-phone {
        font-size: 22px !important;
        line-height: 1 !important;
    }

    .topbar-fixed-size .fa-phone-alt {
        font-size: 16px !important;
    }

    .topbar-fixed-size .topbar-note {
        font-size: 12px !important;
    }

    .topbar-fixed-size .topbar-inner {
        gap: 12px !important;
    }


/* ============================================================
   19. スマホ / タブレット レスポンシブ（max-width: 768px）
   ============================================================ */

@media (max-width: 768px) {

    /* Bootstrap フォントサイズ上書き */
    .fs-1 {
        font-size: 2rem !important;
    }

    .fs-2 {
        font-size: 1.8rem !important;
    }

    .fs-3 {
        font-size: 1.5rem !important;
    }

    .fs-4 {
        font-size: 1.2rem !important;
    }

    .fs-5 {
        font-size: 1rem !important;
    }

    .fs-6 {
        font-size: 0.9rem !important;
    }

    /* 見出し */
    h1 {
        font-size: 1.8rem;
        line-height: 1.4;
    }

    h2 {
        font-size: 1.6rem;
        line-height: 1.4;
    }

    h3 {
        font-size: 1.4rem;
        line-height: 1.4;
    }

    h4 {
        font-size: 1.2rem;
        line-height: 1.4;
    }

    h5 {
        font-size: 1.1rem;
        line-height: 1.4;
    }

    /* テーマ見出し */
    .theme-heading {
        font-size: 1.4rem;
        line-height: 1.4;
    }

    /* カルーセルキャプション */
    .carousel-caption {
        bottom: 10%;
        padding-left: 1rem;
        padding-right: 1rem;
    }

        .carousel-caption h1 {
            font-size: 1.5rem;
            line-height: 1.4;
        }

        .carousel-caption h3 {
            font-size: 1rem;
            line-height: 1.4;
        }

    /* マージン */
    .ms-1 {
        margin-left: 0.15rem !important;
    }

    .ms-2 {
        margin-left: 0.25rem !important;
    }

    .ms-3 {
        margin-left: 0.5rem !important;
    }

    .ms-4 {
        margin-left: 0.75rem !important;
    }

    .ms-5 {
        margin-left: 1rem !important;
    }

    .me-1 {
        margin-right: 0.15rem !important;
    }

    .me-2 {
        margin-right: 0.25rem !important;
    }

    .me-3 {
        margin-right: 0.5rem !important;
    }

    .me-4 {
        margin-right: 0.75rem !important;
    }

    .me-5 {
        margin-right: 1rem !important;
    }

    /* パディング */
    .p-5 {
        padding: 1.5rem !important;
    }

    .px-5 {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }

    .py-5 {
        padding-top: 1.5rem !important;
        padding-bottom: 1.5rem !important;
    }

    /* テーブル */
    table th, table td {
        white-space: nowrap;
        font-size: 0.95rem;
        padding: 0.5rem;
    }

    /* ボタン */
    .btn {
        font-size: 0.95rem;
        padding: 0.5rem 1rem;
    }

    /* カード */
    .card-body {
        padding: 1rem;
    }

    .custom-card,
    .custom-card-toin,
    .feature-card,
    .gradient-card {
        height: auto !important;
        min-height: unset !important;
    }

    /* Instagram 画像 */
    .card-img-top {
        height: 220px !important;
        object-fit: cover;
    }

    /* iframe（Google Map 等） */
    iframe {
        min-height: 300px !important;
    }

    /* バッジ */
    .badge {
        font-size: 0.85rem !important;
    }

    /* 防災カード */
    .card-text-area h5 {
        font-size: 1rem;
    }

    .card-text-area p {
        font-size: 0.9rem;
    }

    /* Facebook 埋め込み */
    .fb-page {
        width: 100% !important;
    }

    /* お知らせリスト */
    .notice-item {
        display: block !important;
    }

    .notice-date {
        width: auto;
        margin-bottom: 0.15rem;
        font-size: 0.8rem;
    }

    .notice-title {
        font-size: 0.92rem;
    }

    /* お知らせ詳細 */
    .notice-detail-container {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }

    .notice-detail-wrapper {
        padding: 1rem;
        border-radius: 8px;
    }

    .notice-detail-title {
        font-size: 1.4rem;
        line-height: 1.5;
    }

    .notice-detail-date {
        font-size: 0.9rem;
        margin-bottom: 1rem;
    }

    .notice-detail-content {
        font-size: 0.97rem;
        line-height: 1.9;
    }

    /* スマホ改行 */
    .sp-br {
        display: inline;
    }

    /* サイトロゴ */
    .site-logo {
        height: 50px;
    }

    /* 透析特色 */
    .toseki-feature-title {
        font-size: 1.25rem;
        margin-bottom: 8px;
        line-height: 1.45;
    }

    .toseki-feature-text {
        font-size: 1rem;
        line-height: 1.75;
        margin-bottom: 8px;
    }

    .toseki-feature-note {
        font-size: 0.9rem;
        line-height: 1.65;
        padding-top: 8px;
    }

    /* 読み上げボタン */
    .speech-buttons {
        gap: 0.6rem;
    }

    .speechBtn .fs-6, .speechStopBtn .fs-6 {
        font-size: 0.85rem !important;
    }

    .topbar-phone {
        font-size: 1.1rem;
    }

    /* AI診断フォーム */
    .ai-form-table th,
    .ai-form-table td {
        display: block;
        width: 100% !important;
    }

    .ai-form-table tr {
        border-bottom: 1px solid #dee2e6;
    }

    .ai-form-table th {
        border: none;
        background-color: #cfe5bf;
        padding: 0.9rem 1rem 0.6rem;
        font-size: 1rem;
        font-weight: 700;
        color: #1b4332;
    }

    .ai-form-table td {
        border: none;
        padding: 0.75rem 0 1rem;
    }

    .ai-form-table .form-control,
    .ai-form-table .form-select {
        width: 100%;
    }

    .ai-form-table .form-check-inline {
        display: block;
        margin-bottom: 0.5rem;
    }

    .symptom-check-list {
        padding-left: 0.75rem;
        padding-right: 0.5rem;
    }

        .symptom-check-list .form-check-inline {
            display: block;
            margin-bottom: 0.75rem;
        }

        .symptom-check-list .form-check-label {
            font-size: 1rem;
        }
}
