@charset "UTF-8";
@import url('https://cdn.jsdelivr.net/npm/line-seed@1.0.0/line-seed-jp/css/line-seed-jp.min.css');

/* ==========================================================================
   CSS Variables & Basic Typography (Machida Hospital Style)
   ========================================================================== */
:root {
    --primary-color: #009B6B;
    /* 温かみのあるグリーン */
    --primary-light: #e6f5f0;
    --text-color: #333333;
    /* チャコールグレー */
    --text-light: #666666;
    --bg-color: #f9f9f9;
    /* やさしい背景色 */
    --white: #ffffff;
    --border-color: #e0e0e0;
    --font-gothic: 'LINE Seed JP', sans-serif;
    --font-mincho: 'LINE Seed JP', sans-serif;
    --sidebar-width: 250px;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-gothic);
}

html,
body {
    overflow-x: hidden;
    width: 100%;
    /* スクロールバー非表示時の幅変動を防止 */
}

body {
    font-family: var(--font-gothic);
    color: var(--text-color);
    background-color: var(--bg-color);
    line-height: 1.8;
    margin: 0;
    padding: 0;
    display: flex;
    /* PC用：サイドバーとメインを横並びに */
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: 0.3s;
}

a:hover {
    opacity: 0.7;
}

/* ==========================================================================
   Layout 2-Column (Sidebar & Main Content)
   ========================================================================== */
.site-wrapper {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

/* --- Left Sidebar (Header) --- */
.site-sidebar {
    width: var(--sidebar-width);
    background-color: var(--white);
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.05);
    /* 紙のような影 */
    z-index: 1000;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.sidebar-logo {
    padding: 20px 20px 10px;
    text-align: center;
    border-bottom: 1px dashed var(--border-color);
}

.sidebar-logo a {
    display: block;
    color: var(--primary-color);
    font-weight: bold;
    font-size: 1.2rem;
    line-height: 1.4;
}

.sidebar-logo img {
    max-width: 80%;
    height: auto;
    margin-bottom: 10px;
}

.sidebar-nav {
    flex-grow: 1;
    padding: 10px 0;
}

.sidebar-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-nav li a {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    color: var(--text-color);
    font-weight: bold;
    border-bottom: 1px solid #f0f0f0;
}

.sidebar-nav li a:hover {
    background-color: var(--primary-light);
    color: var(--primary-color);
    transform: translateX(5px);
    /* ホバーで少し右に動く（padding変更ではなくtransformで横ブレ防止） */
}

/* 「>」アイコンのようなアクセント */
.sidebar-nav li a::before {
    content: "〉";
    color: var(--primary-color);
    margin-right: 10px;
    font-size: 0.8rem;
}

.sidebar-footer {
    padding: 20px;
    background-color: #f5f5f5;
    text-align: center;
}

.btn-contact {
    display: block;
    background-color: var(--primary-color);
    color: var(--white);
    padding: 15px 10px;
    border-radius: 30px;
    /* 角丸ボタン */
    font-weight: bold;
    margin-bottom: 10px;
    box-shadow: 0 4px 6px rgba(0, 155, 107, 0.2);
}

.btn-contact:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 10px rgba(0, 155, 107, 0.3);
    color: var(--white);
    opacity: 1;
}

/* --- Main Content Area --- */
.site-main {
    flex-grow: 1;
    margin-left: var(--sidebar-width);
    width: calc(100% - var(--sidebar-width));
}

/* ==========================================================================
   Hero Section (Top Page)
   ========================================================================== */
.hero-v3 {
    width: 100%;
    height: 100vh;
    background-image: url('../images/hospital_image.jpg?v=20260307');
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    justify-content: flex-end;
    /* 右側にキャッチコピー */
    align-items: center;
    padding: 50px;
    box-sizing: border-box;
}

/* 縦書きのタイポグラフィ */
.hero-copy {
    background-color: rgba(255, 255, 255, 0.85);
    /* 半透明の白背景 */
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    writing-mode: vertical-rl;
    /* 縦書き指定 */
    -webkit-writing-mode: vertical-rl;
    text-orientation: upright;
}

.hero-copy h1 {
    font-family: var(--font-gothic);
    font-size: 2rem;
    color: var(--text-color);
    margin: 0;
    line-height: 1.5;
    letter-spacing: 0.2em;
    white-space: nowrap;
}

.hero-highlight {
    color: var(--primary-color);
    font-size: 2.8rem; /* さらに大きく */
    font-weight: bold;
    display: block;
    margin-bottom: 10px;
}

.hero-copy p {
    font-family: var(--font-gothic);
    font-size: 1.1rem;
    margin-top: 20px;
    line-height: 2;
}

/* ==========================================================================
   News Section (Card style)
   ========================================================================== */
.section-v3 {
    padding: 80px 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.section-title-v3 {
    font-family: var(--font-gothic);
    font-size: 2rem;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 40px;
    position: relative;
    padding-bottom: 15px;
}

.section-title-v3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 3px;
    background-color: var(--primary-color);
    border-radius: 3px;
}

.news-card-wrapper {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.news-item-v3 {
    background: var(--white);
    border-radius: 10px;
    padding: 20px 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
    border-left: 5px solid var(--primary-color);
    transition: transform 0.2s;
}

.news-item-v3:hover {
    transform: translateX(5px);
}

.news-summary-v3 {
    display: flex;
    align-items: baseline;
    gap: 20px;
    cursor: pointer;
}

.news-date-v3 {
    font-weight: bold;
    color: var(--text-light);
    font-size: 0.9rem;
    min-width: 120px;
}

.news-title-v3 {
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--text-color);
}

.news-content-v3 {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px dashed var(--border-color);
    font-size: 0.95rem;
    color: var(--text-color);
}

/* ==========================================================================
   News Accordion (<details> based - v4)
   ========================================================================== */
/* アコーディオンのコンテナ */
.news-accordion {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* 各お知らせアイテム（カードスタイル） */
.news-accordion .news-item {
    background: var(--white);
    border-radius: 10px;
    padding: 20px 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
    border-left: 5px solid var(--primary-color);
    transition: transform 0.2s;
    list-style: none;
}

.news-accordion .news-item:hover {
    transform: translateX(5px);
}

/* summaryのデフォルトの三角を非表示 */
.news-accordion .news-summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    align-items: baseline;
    gap: 20px;
}

.news-accordion .news-summary::-webkit-details-marker {
    display: none;
}

/* 日付 */
.news-accordion .news-date {
    font-weight: bold;
    color: var(--text-light);
    font-size: 0.9rem;
    min-width: 120px;
    white-space: nowrap;
}

/* タイトル */
.news-accordion .news-title {
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--text-color);
    flex-grow: 1;
}

/* 開閉アイコン */
.news-accordion .accordion-icon {
    font-size: 0.7rem;
    color: var(--primary-color);
    transition: transform 0.3s;
    margin-left: auto;
}

.news-accordion .accordion-icon::after {
    content: "▼";
}

.news-accordion .news-item[open] .accordion-icon {
    transform: rotate(180deg);
}

/* 本文 */
.news-accordion .news-content {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px dashed var(--border-color);
    font-size: 0.95rem;
    color: var(--text-color);
}

/* スマホ用調整 */
@media screen and (max-width: 768px) {
    .news-accordion .news-item {
        padding: 15px 20px;
    }

    .news-accordion .news-summary {
        flex-wrap: wrap;
        gap: 5px;
    }

    .news-accordion .news-date {
        min-width: auto;
        font-size: 0.85rem;
    }

    .news-accordion .news-title {
        font-size: 1rem;
        width: 100%;
    }
}

/* ==========================================================================
   Service / Department Cards (Grid)
   ========================================================================== */
.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.service-card {
    background: var(--white);
    border-radius: 15px;
    padding: 40px 30px;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: 0.3s;
}

.service-card:hover {
    box-shadow: 0 10px 25px rgba(0, 155, 107, 0.15);
    transform: translateY(-5px);
}

/* 右下の斜めアクセント（machida風） */
.service-card::after {
    content: '';
    position: absolute;
    bottom: -20px;
    right: -20px;
    width: 60px;
    height: 60px;
    background-color: var(--primary-light);
    transform: rotate(45deg);
    transition: 0.3s;
}

.service-card:hover::after {
    background-color: var(--primary-color);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer-v3 {
    background-color: #f1f1f1;
    padding: 60px 40px 30px;
    text-align: center;
    border-top: 1px solid var(--border-color);
}

.site-footer-v3 p {
    color: var(--text-light);
    font-size: 0.9rem;
}


/* ==========================================================================
   Inner Pages (About, Department, etc.)
   ========================================================================== */
.page-header {
    background-color: var(--primary-light);
    padding: 60px 40px;
    text-align: center;
    position: relative;
    border-bottom: 2px solid var(--primary-color);
}

.page-title {
    font-family: var(--font-gothic);
    font-size: 2.2rem;
    color: var(--primary-color);
    margin: 0;
    letter-spacing: 0.1em;
}

.breadcrumb {
    padding: 15px 40px;
    background-color: var(--white);
    font-size: 0.9rem;
    color: var(--text-light);
    border-bottom: 1px solid var(--border-color);
}

.breadcrumb a {
    color: var(--text-light);
}

.breadcrumb a:hover {
    color: var(--primary-color);
}

.breadcrumb span {
    color: var(--text-color);
    font-weight: bold;
}

.inner-content {
    padding: 60px 40px;
    max-width: 1000px;
    margin: 0 auto;
}

.content-block {
    margin-bottom: 60px;
    background: var(--white);
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
}

.block-title {
    font-size: 1.6rem;
    color: var(--primary-color);
    border-bottom: 2px dashed var(--primary-light);
    padding-bottom: 10px;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
}

.block-title::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 1.6rem;
    background-color: var(--primary-color);
    margin-right: 15px;
    border-radius: 3px;
}

.lead-text {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 20px;
    text-align: center;
}

.policy-list {
    padding-left: 25px;
    margin-bottom: 30px;
}

.policy-list li {
    margin-bottom: 10px;
    font-size: 1.05rem;
}

.note-box {
    background-color: #fcfcfc;
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--primary-color);
    padding: 20px;
    border-radius: 4px;
    font-size: 0.95rem;
}

.history-list dt {
    font-weight: bold;
    color: var(--primary-color);
    margin-top: 15px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 5px;
}

.history-list dd {
    margin: 10px 0 20px 1em;
}

/* 汎用テーブル・リスト装飾 */
.info-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.info-table th,
.info-table td {
    border: 1px solid var(--border-color);
    padding: 15px;
}

.info-table th {
    background-color: var(--primary-light);
    color: var(--text-color);
    font-weight: bold;
    width: 30%;
    text-align: left;
}

.info-table td {
    background-color: var(--white);
}

/* 下層ページ用スマホ対応 */
@media screen and (max-width: 768px) {
    .page-header {
        padding: 40px 20px;
    }

    .inner-content {
        padding: 40px 20px;
    }

    .content-block {
        padding: 25px 20px;
    }

    .info-table th,
    .info-table td {
        display: block;
        width: 100%;
    }

    .info-table th {
        border-bottom: none;
    }
}

/* ==========================================================================
   Responsive (Smartphone)
   ========================================================================== */
@media screen and (max-width: 1024px) {
    .site-wrapper {
        flex-direction: column;
    }

    .site-sidebar {
        width: 100vw;
        max-width: 100%;
        height: auto;
        position: relative;
        /* PC用の左固定を解除して上部に */
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        padding: 10px 20px;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
        z-index: 1000;
        box-sizing: border-box;
    }

    .sidebar-logo {
        padding: 5px 0;
        border: none;
        text-align: left;
        flex-grow: 1;
    }

    .sidebar-logo img {
        max-width: 150px;
        margin: 0;
    }

    .hamburger-v3 {
        margin-left: 15px;
    }

    /* スマホ時はハンバーガーメニューにする想定だが、長くなるため一旦ナビゲーション直置きで非表示化などを検討。今回はモックアップとして簡易化 */
    .sidebar-nav,
    .sidebar-footer {
        display: none;
        /* スマホ用には別途ハンバーガーを用意する */
    }

    .site-main {
        margin-left: 0;
        width: 100vw;
        max-width: 100%;
        overflow-x: hidden;
    }

    .hero-v3 {
        padding: 20px;
        justify-content: center;
        height: 60vh;
        /* スマホでは画像が見えるよう高さ調整 */
    }

    .hero-copy {
        padding: 15px;
        max-height: 55vh;
    }

    .hero-copy h1 {
        font-size: 1.5rem;
    }

    .hero-highlight {
        font-size: 2rem;
    }

    /* V3 Hamburger Menu Button */
    .hamburger-v3 {
        display: block;
        width: 40px;
        height: 40px;
        background: transparent;
        border: none;
        cursor: pointer;
        position: relative;
        z-index: 1001;
        /* サイドバー内でも一番上に */
        padding: 0;
        margin-left: auto;
        /* 右端に寄せる */
    }

    .hamburger-v3 span {
        display: block;
        width: 100%;
        height: 3px;
        background-color: var(--primary-color);
        border-radius: 3px;
        position: absolute;
        transition: all 0.3s ease-in-out;
    }

    .hamburger-v3 span:nth-child(1) {
        top: 10px;
    }

    .hamburger-v3 span:nth-child(2) {
        top: 19px;
    }

    .hamburger-v3 span:nth-child(3) {
        top: 28px;
    }

    /* Hamburger Active State (X) */
    .hamburger-v3.active span:nth-child(1) {
        top: 19px;
        transform: rotate(45deg);
    }

    .hamburger-v3.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger-v3.active span:nth-child(3) {
        top: 19px;
        transform: rotate(-45deg);
    }

    /* Sidebar Mobile Display */
    .site-sidebar {
        height: auto;
        padding-bottom: 0;
        transition: background-color 0.3s;
    }

    /* サイドバーが開いたときの状態 */
    .site-sidebar.active {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        height: 100dvh;
        /* 画面全体を覆う（dvhでモバイルブラウザのアドレスバーにも対応） */
        background-color: rgba(255, 255, 255, 0.98);
        flex-direction: column;
        justify-content: flex-start;
        align-items: flex-start;
        overflow-y: auto;
        overflow-x: hidden;
        box-sizing: border-box;
    }

    .site-sidebar.active .sidebar-logo {
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
        border-bottom: 1px dashed var(--border-color);
    }

    /* 普段は非表示のナビとフッターを開いたときだけ表示 */
    .site-sidebar.active .sidebar-nav,
    .site-sidebar.active .sidebar-footer {
        display: block;
        width: 100%;
        box-sizing: border-box;
    }

    /* メニュー展開時のフッター内ボタンの右端切れ防止 */
    .site-sidebar.active .sidebar-footer {
        padding: 20px 15px;
    }

    .site-sidebar.active .sidebar-footer .btn-contact {
        box-sizing: border-box;
        max-width: 100%;
    }

    .site-sidebar.active .sidebar-footer .instagram-link {
        max-width: 100%;
        box-sizing: border-box;
    }

    .site-sidebar.active .sidebar-nav ul {
        width: 100%;
    }

    .site-sidebar.active .sidebar-nav li a {
        font-size: 1.2rem;
        padding: 20px;
    }

}