/* --- 基本設定 --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth; /* スクロールを滑らかに */
    /* ページ内リンクで飛んだ時にヘッダーに重ならないよう隙間を作る */
    scroll-padding-top: 160px;
}

body {
    font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
    line-height: 1.8;
    color: #444; /* 少し柔らかい色に */
    background-color: #fcfcfc;
    /* 固定ヘッダーの高さ分、全体を下げる */
    padding-top: 140px;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- ヘッダー --- */
header {
    background-color: #fff;
    border-bottom: 3px solid #0056b3;
    padding: 20px 0;
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 100;
    transition: transform 0.4s ease-in-out;
}

header.is-hidden {
    transform: translateY(-100%);
}

header h1 {
    font-size: 1.5rem;
    color: #0056b3;
}

header h1 span {
    font-size: 1.8rem;
    display: block;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 20px;
    margin-top: 10px;
}

nav a {
    text-decoration: none;
    color: #555;
    font-weight: bold;
    font-size: 0.9rem;
}

nav a:hover {
    color: #0056b3;
}

/* --- メインビジュアル --- */
.hero {
    background-color: #eef6ff;
    padding: 80px 0;
    border-bottom: 1px solid #ddecff;
}

.hero-flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}

.hero-text {
    flex: 1;
}

.hero h2 {
    font-size: 2rem;
    color: #0056b3;
    margin-bottom: 10px;
}

.hero-image {
    flex: 1;
}

.hero-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.caption {
    font-size: 0.8rem;
    color: #666;
    margin-top: 5px;
    text-align: center;
}

/* --- セクション共通 --- */
.content-section {
    padding: 80px 0;
}

.bg-light {
    background-color: #f4f7f9;
    margin: 0 -20px;
    padding: 80px 20px;
}

h2 {
    font-size: 1.8rem;
    border-left: 5px solid #0056b3;
    padding-left: 15px;
    margin-bottom: 40px;
    color: #0056b3;
}

h3 {
    margin: 40px 0 20px;
    font-size: 1.4rem;
    color: #333;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

/* --- お知らせセクション (追加) --- */
.news-section {
    padding: 20px 0;
    background-color: #fff;
}

.news-box {
    display: flex;
    align-items: center;
    border: 1px solid #eee;
    padding: 10px 20px;
    background-color: #fff;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}

.news-label {
    background-color: #0056b3;
    color: #fff;
    padding: 2px 10px;
    font-size: 0.8rem;
    font-weight: bold;
    border-radius: 3px;
    margin-right: 20px;
    white-space: nowrap;
}

.news-list {
    list-style: none;
    font-size: 0.9rem;
    overflow: hidden;
}

.news-list li {
    margin-bottom: 5px;
}

.news-list li:last-child {
    margin-bottom: 0;
}

.news-date {
    font-weight: bold;
    color: #888;
    margin-right: 15px;
}

/* --- 院長挨拶 (写真のレイアウト調整) --- */
.greeting-flex {
    display: flex;
    align-items: center;
    gap: 40px;
    margin-bottom: 30px;
}

.greeting-text {
    flex: 2;
}

.director-image {
    flex: 1;
    text-align: center;
}

.director-image img {
    width: 100%;
    max-width: 250px; /* 写真が大きくなりすぎないように制限 */
    height: auto;
    border-radius: 10px; /* 角を少し丸く */
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* --- 院長略歴（枠線の追加） --- */
.biography {
    margin-top: 40px;
    background: #fff;
    padding: 30px;
    border-radius: 10px;
    /* 枠線の設定 */
    border: 1px solid #ddd;
    border-top: 5px solid #0056b3; /* 上部だけアクセント */
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.biography h4 {
    font-size: 1.2rem;
    color: #0056b3;
    margin-bottom: 20px;
}

.bio-table dl {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 15px;
}

.bio-table dt {
    font-weight: bold;
    color: #0056b3;
}

.bio-table dd {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px dashed #eee;
}

/* --- 診療案内 --- */
.table-wrapper {
    overflow-x: auto;
    margin-bottom: 20px;
}

table {
    width: 100%;
    min-width: 600px;
    border-collapse: collapse;
    background: #fff;
}

table th, table td {
    border: 1px solid #eee;
    padding: 18px 10px;
    text-align: center;
}

table th {
    background-color: #0056b3;
    color: #fff;
}

table td:not(:first-child) {
    font-size: 1.8rem;
    font-weight: bold;
    color: #0056b3;
    line-height: 1;
    padding: 2px 5px;
    vertical-align: middle;
}

/* 特別な「★」だけを赤色にしてさらに目立たせる（お好みで） */
table td {
    position: relative;
}

.specialist-notice {
    margin: 20px 0;
    padding: 20px;
    background-color: #fff4f4;
    border-left: 4px solid #d32f2f;
    border-radius: 4px;
}

/* --- 診療内容 --- */
.treatment-details ul {
    list-style: none;
    margin-top: 15px;
    display: grid;
    grid-template-columns: 1fr 1fr; /* PCでは2列に並べて縦長を解消 */
    gap: 12px; /* 項目間の隙間 */
}

.treatment-details li {
    background: #fff;
    margin-bottom: 0; /* gridのgapを使うので0でOK */
    padding: 15px 20px;
    border-radius: 8px;
    border: 1px solid #eee;
    line-height: 1.6;
    box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}

.treatment-details li strong {
    display: block; /* ラベルを一行目に */
    font-size: 1rem;
    margin-bottom: 3px; /* 下の余白を最小限に */
    color: #0056b3;
}

/* --- アクセス・お問合せ --- */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.tel {
    font-size: 1.8rem;
    font-weight: bold;
    color: #d32f2f;
}

.map-container iframe {
    width: 100% !important;
    height: 450px;
    border: 2px solid #eee;
    border-radius: 8px;
    margin-bottom: 30px;
}

/* --- フッター --- */
footer {
    background-color: #333;
    color: #fff;
    padding: 40px 0;
    margin-top: 60px;
    text-align: center;
}

footer p {
    font-size: 0.9rem;
    letter-spacing: 0.05em;
}

/* --- スマホ対応 --- */
@media (max-width: 768px) {
    body { padding-top: 150px; }
    html { scroll-padding-top: 180px; }
    header h1 { text-align: center; }
    nav ul { justify-content: center; flex-wrap: wrap; gap: 10px; }
    .hero-flex { flex-direction: column; text-align: center; }
    .contact-grid { grid-template-columns: 1fr; }
    .bio-table dl { grid-template-columns: 1fr; }
    .content-section, .bg-light { padding: 50px 20px; }
    .treatment-details ul {
        grid-template-columns: 1fr; /* スマホは1列 */
    }
    .news-box {
        flex-direction: column;
        align-items: flex-start;
    }
    .news-label {
        margin-bottom: 10px;
    }
    .greeting-flex {
        flex-direction: column-reverse; /* スマホでは写真が下、またはテキストが先に来るように */
        gap: 20px;
    }
    .director-image img {
        max-width: 200px;
    }
}
