/* 色の定義 */
:root {
    --main-color: #effeff !important;
    --accent-color: hsla(198, 100%, 63%, 0.792) !important;
    --base-color: #FFFFFF;
    --text-color: #333;
    --light-gray: #f2f2f2;
    /* 追加 */
}

.flex-text {
    display: flex;
    flex-wrap: wrap;
}

.flex-strong {
    display: flex;
    flex-wrap: wrap;
}

.flex-strong span {
    white-space: nowrap;
}


.flex-text span {
    white-space: nowrap;
}



/* ベース設定 */
body {
    margin: 0;

    font-family: "Helvetica Neue",
        Arial,
        "Hiragino Kaku Gothic ProN",
        "Hiragino Sans",
        sans-serif;


    background-color: var(--base-color);
    color: var(--text-color);
    line-height: 1.6;
    font-size: 1.2rem;
}

.container {
    max-width: 1080px;
    margin: 0 auto;
    padding: 20px;
}

/* ヒーローセクション */
.hero-section {
    position: relative;
    /* 子要素のabsolute基準にする */
    height: 100vh;
    /* 画面の高さの80%に設定 */
    min-height: 500px;
    /* 最小の高さも指定 */
    background-color: var(--main-color);
    /* フォールバックカラー */
    text-align: center;
    color: var(--base-color);
    border-radius: 20px;
    /* ここは画像のデザインに合わせて調整 */
    margin: 0;
    /* 画面幅いっぱいに広げるため */
    display: flex;
    /* テキストを中央に配置 */
    justify-content: center;
    align-items: center;
    overflow: hidden;
    /* 角丸設定時に内側の要素がはみ出ないように */
    font-family: "Times New Roman", "游明朝", "Yu Mincho", "游明朝体", "YuMincho", "ヒラギノ明朝 Pro W3", "Hiragino Mincho Pro", "HiraMinProN-W3", "HGS明朝E", "ＭＳ Ｐ明朝", "MS PMincho", serif;
}

/* hero-section の背景画像設定 */
.hero-section.hero-bg-image {
    /* パスの指定は正しいですが、もし表示されない場合は '../images/...' に */
    background-image: url('../images/first-view.jpg');
    background-size: cover;
    background-repeat: no-repeat;
    z-index: 1;
    /* marginを削除 */
    margin: 1% 2%;
    /* color: #fff; */
    /* テキストの色は子要素で指定 */
    background-position: top center;
}



/* テキストコンテナ */
.hero-text-container {
    position: relative;
    z-index: 3;
    /* オーバーレイより手前に表示 */
    text-align: center;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    border-radius: 8px;
    display: inline-block;
    box-decoration-break: clone;
    padding: 0 4px;
}

.hero-text-container p {
    font-size: 2.5rem;
    font-weight: 800;
    margin: 0;
    text-shadow: 5px 5px 5px rgba(0, 0, 0, 0.8);

}

.hero-title-box {
    display: inline-block;
}

.hero-title-box h2 {
    font-size: 4rem;
    /* サイズを大きく */
    font-weight: 800;
    color: var(--base-color);
    text-shadow: 5px 5px 5px rgba(0, 0, 0, 0.8);
    /* テキストの色 */
    margin: 0;
    line-height: 1.2;

}

/* セクション共通 */
section {
    margin-top: 7%;
    margin-bottom: 7%;
    /* 共通の余白設定 */
}

.introduction-heading-box h2 {
    font-family: "Times New Roman", "游明朝", "Yu Mincho", "游明朝体", "YuMincho", "ヒラギノ明朝 Pro W3", "Hiragino Mincho Pro", "HiraMinProN-W3", "HGS明朝E", "ＭＳ Ｐ明朝", "MS PMincho", serif;
}

.introduction-heading-box h2,
.section-title {
    font-size: 1.8rem;
    color: #333;
    text-align: center;
    padding: 10px 20px;
    max-width: 500px;
    margin-bottom: 2rem;
    margin-left: auto;
    margin-right: auto;
    /* ← 中央寄せを追加！ */
}

.introduction-container p {
    text-align: center;
    font-weight: 500;
    font-family: "Times New Roman", "游明朝", "Yu Mincho", "游明朝体", "YuMincho", "ヒラギノ明朝 Pro W3", "Hiragino Mincho Pro", "HiraMinProN-W3", "HGS明朝E", "ＭＳ Ｐ明朝", "MS PMincho", serif;

}


/* 親コンテナ .hospitals のスタイルはそのまま */
.hospitals {
    display: flex;
    justify-content: center;
    /* これで .partner-hospitals が水平方向に中央に配置されます */
    align-items: center;
    /* 必要であれば、垂直方向も中央に配置できます */
    /* min-height: 100vh; */
    /* 垂直方向の中央寄せを試す場合、親要素に高さが必要です */
    margin-bottom: 2rem;
}

/* 画像を横に並べ、同じ大きさにするための .partner-hospitals スタイル */
.partner-hospitals {
    display: flex;
    /* Flexboxコンテナにする */
    justify-content: center;
    /* 子要素（リンクと画像）を水平方向に中央寄せ */
    align-items: center;
    /* 子要素を垂直方向に中央寄せ */
    gap: 30px;
    /* 画像間の隙間（お好みで調整） */
    flex-wrap: wrap;
    /* 画面幅が狭い場合に画像を折り返す */
}

/* リンクと画像自体のスタイル */
.partner-hospitals a {
    display: flex;
    /* リンク自体もFlexboxにして、中の画像を中央に配置しやすくする */
    justify-content: center;
    align-items: center;
    /* リンク自体のサイズを統一したい場合はここで指定 */
    /* width: 150px; */
    /* height: 100px; */
}

.partner-hospitals img {
    /* ここで画像のサイズを統一します */
    width: 20rem;
    /* 画像の固定幅（お好みで調整） */
    height: auto;
    /* アスペクト比を維持 */
    max-width: 100%;
    /* 親要素（aタグ）の幅を超えないように */
    /* height: 80px; */
    /* もし高さを固定したい場合、object-fitと併用がおすすめ */

    /* 画像が要素に収まるように調整 */
    object-fit: contain;
    /* アスペクト比を維持しつつ要素内に収める */
    /* object-fit: cover; */
    /* アスペクト比を維持しつつ要素を覆い、はみ出しはトリミング */
    /* object-fit: fill; */
    /* アスペクト比を無視して要素に合わせて引き伸ばす */
}

/* .partner-hospitals の幅は必要に応じて設定してください。
   margin: 0 auto; は display: flex と justify-content: center が親要素にある場合は不要です。 */
/* .partner-hospitals {
    width: 80%;
} */
/*
 * 新しいラッパーコンテナ
 * 全体の余白と中央寄せをここで管理します
 */

.main-container {
    max-width: 1200px;
    margin: 0 auto;
    /* ← ここに5%余白を持たせる */
    box-sizing: border-box;
}



/*
 * 全体をグリッドコンテナとして設定
 */
.grid-layout {
    display: grid;
    grid-template-rows: 1fr 1fr;
    grid-template-columns: 45% 5% 45%;
    gap: 20px;
    margin: 0.25%
}




/* 他のスタイルは変更なし */
/* ... 省略 ... */

/* 上段・左側: mission-content-box (40%) */
.mission-content-box {
    /* 1列目のみを占める */
    grid-column: 1;
    grid-row: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 2rem;
    background-color: #FFF;
    color: #333;
    border: 1px solid color(#333);
    border-radius: 20px;
    font-weight: 500;
}

/* 上段・右側: mission-image-box (60%) */
.mission-image-box {
    /* 2列目と3列目を占める (20% + 40% = 60%) */
    grid-column: 2 / span 2;
    grid-row: 1;
    position: relative;
    overflow: hidden;
    border-radius: 20px;
}

.image-caption-overlay {
    position: absolute;
    bottom: 20px;
    /* 下からの位置 */
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    /* 半透明の背景 */
    color: #fff;
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 1.2rem;
    font-weight: bold;
    text-align: center;
    white-space: nowrap;
    /* 1行に収めたい場合はこれを有効に */
}

/* 下段・左側: stats-panel (60%) */
.stats-panel {
    /* 1列目と2列目を占める (40% + 20% = 60%) */
    grid-column: 1 / span 2;
    grid-row: 2;
    background-size: cover;
    background-position: center;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #333;
    border-radius: 20px;
    padding: 20px;
    background-color: var(--main-color);
    position: relative;
    overflow: hidden;
}


/* 下段・右側: info-panel (40%) */
.info-panel {
    /* 3列目のみを占める */
    grid-column: 3;
    grid-row: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 2rem;
    border-radius: 20px;
    padding: 20px;
    background-color: #FFF;
    color: #333;
    border: 1px solid color(#333);
    position: relative;
    background-size: cover;
    background-position: center;
    font-weight: 500;
}

/*
 * 画像を親要素のサイズに合わせてトリミング
 */
.mission-image-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 90% 20%;
}


.btn-primary {
    display: inline-block;
    background-color: #FFF;
    color: var(--text-color);
    padding: 12px 20px;
    border-radius: 30px;
    text-decoration: none;
    margin-top: 15px;
    font-weight: bold;
    transition: background-color 0.3s;
    border: 2px solid #333;
}

.btn-primary:hover {
    background-color: #b0b0b0;
}




.panel-overlay {
    border-radius: 20px;
    padding: 20px;
    height: auto;
    width: auto;
    /* 親要素の高さに合わせる */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    background-color: rgba(0, 0, 0, 0.3);
}

.panel-overlay h3 {
    color: #FFF
}

.stats-numbers {
    display: flex;
    justify-content: space-around;
    /* margin: auto; をここに置くと、.stats-numbers 自体が親要素の中で中央に配置されます。 */
    /* しかし、justify-content: space-around; と併用する場合、flexアイテム間のスペースが優先されるため、 */
    /* コンテナ自体の左右中央寄せ効果は薄れるか、意図しない挙動になる可能性があります。 */
    /* コンテナを中央寄せしたい場合は、親要素にdisplay: flex; と justify-content: center; */
    /* または text-align: center; を設定することを検討してください。 */
    /* 今回は元のコードの意図を尊重し、セミコロンを追加して残しておきますが、挙動にご注意ください。*/
    margin: auto;
    /* ここにセミコロンを追加 */
    color: #fff;
}

.stat-item {
    border-radius: 20px;
    padding: 20px;
    height: 6rem;
    width: 8rem;
    margin: 2%;
    /* line-height: 0.6; を削除または適切な値（例: normal, 1.2など）に調整 */
    /* これが文字の重なりの原因になっている可能性が高いです */
    line-height: normal;
    /* または削除 */
    border: 4px solid #FFF;

    display: flex;
    flex-direction: column;
    /* 縦方向に要素を並べる */
    justify-content: center;
    /* 縦方向の中央寄せ */
    align-items: center;
    /* 横方向の中央寄せ */
}

.stat-item p {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
    /* p要素のデフォルトの上下マージンをリセット */
    margin-top: 5px;
    /* 必要であれば、stat-numberとpの間に少しスペースを開ける */
    line-height: 1.2;
    /* pタグ内の行の高さを調整 */
}

.stat-number {
    font-size: 4rem;
    font-weight: bold;
    margin-bottom: 0;
    /* stat-unitとの間の余分なマージンを削除 */
    line-height: 1;
    /* 数値の行の高さを調整して、他の要素とのバランスを取る */
}

.stat-unit {
    font-size: 1rem;
    margin-left: 5px;
    /* stat-numberのすぐ隣に表示されるので、縦並びの場合、このスタイルはあまり影響しません。 */
    /* もし単位を次の行にしたい場合は、stat-unitをdisplay: block; にするか、
       stat-numberとpの間に配置するなど、HTML構造の変更が必要です。 */
    /* 今回はHTMLの変更を最小限にするため、stat-numberの直後に表示される想定です。 */
}

.btn-stay {
    margin-top: 10px;
}

.voice-short-section {
    margin-top: 7%;
    margin-bottom: 7%;
}

.voice-short-heading-box h2 {
    font-size: 1.8rem;
    color: var(--text-color);
    text-align: center;
    margin-bottom: 2rem;
}


.voice-short-list {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: center;
}

.voice-short-item {
    background-color: #FFF;
    border-radius: 20px;
    padding: 20px;
    width: 300px;
    box-sizing: border-box;
    text-align: left;
    transition: background-color 0.3s ease;
    border: 2px solid #333;
}

.voice-short-item {
    border-radius: 20px;
    padding: 20px;
    width: 300px;
    box-sizing: border-box;
    text-align: left;
    transition: background-color 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
}



.voice-short-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    margin-bottom: 10px;
    border: 2px solid #333;
}

.voice-short-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.voice-short-name {
    font-weight: bold;
    margin-bottom: 10px;
    color: var(--text-color);
    text-align: center;
}

.voice-short-text {
    font-size: 1rem;
    color: var(--text-color);
    text-align: center;
}



.voice-short-name {
    font-weight: bold;
    margin-bottom: 10px;
    color: var(--text-color);
}

.voice-short-text {
    font-size: 1rem;
    color: var(--text-color);
}

.voice-short-more {
    margin-top: 30px;
    text-align: center;
}




/* ===== News Section ===== */

.news-list {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: center;
    margin-top: 2rem;
}

.news-card {
    width: 300px;
    background-color: var(--light-gray);
    border-radius: 20px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    border: 2px solid var(--text-color);
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.news-card-inner {
    padding: 20px;
    display: flex;
    flex-direction: column;
    height: 100%;
    justify-content: space-between;
}

.news-date {
    color: var(--accent-color);
    font-weight: bold;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.news-title {
    font-size: 1.2rem;
    font-weight: bold;
    margin: 0 0 10px 0;
    color: var(--text-color);
}

.news-title a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s;
}

.news-title a:hover {
    color: var(--accent-color);
}

.news-excerpt {
    font-size: 0.95rem;
    color: var(--text-color);
    margin-bottom: 20px;
    line-height: 1.4;
}

.btn-news-detail {
    align-self: flex-start;
    margin-top: auto;
    font-size: 0.95rem;
    padding: 8px 16px;
}



/*
 * レスポンシブデザイン用CSS
 * 画面幅が768px以下の場合に適用される
 */
@media screen and (max-width: 768px) {
    .grid-layout {
        display: block;
        width: auto;
        margin: 0.3rem;
    }

    .mission-content-box,
    .stats-panel,
    .info-panel {
        width: 100%;
        margin-bottom: 3rem;
        padding: 1.5rem;
        box-sizing: border-box;
    }

    .mission-image-box {
        margin-bottom: 3rem;
    }

    .stats-numbers {
        flex-direction: column;
        align-items: center;
    }


}

@media screen and (max-width: 768px) {
    .main-container {
        width: 100%;
        max-width: 100%;
        margin: 0 auto;
        padding: 0 10px;
        box-sizing: border-box;
    }
}


@media screen and (max-width: 768px) {

    .stats-panel {
        /* 高さ固定を解除して自然な縦伸びにする */
        height: auto;
        min-height: 200px;
        padding: 20px;
    }

    .stats-panel .panel-overlay {
        /* パネル内のコンテンツが見切れないよう調整 */
        width: 100%;
        box-sizing: border-box;
    }

}

@media screen and (max-width: 768px) {


    .mission-image-box {
        width: 100%;
        height: auto;
    }

    .mission-image-box img {
        width: 100%;
        height: auto;
        object-fit: cover;
    }

    .stats-panel {
        width: 100%;
        height: auto;
        background-size: cover;
        background-position: center;
    }

    .info-panel {
        width: 100%;
    }
}

@media screen and (max-width: 768px) {
    body {
        font-size: 0.9rem;
    }

    .hero-text-container p {
        font-size: 1.2rem;
    }

    .hero-title-box h2 {
        font-size: 2.5rem;
    }

    .introduction-heading-box h2,
    .section-title {
        font-size: 1.2rem;
    }

    .introduction-heading-box h2 {
        margin-top: 3rem;
    }

    .stat-number {
        font-size: 3rem;
    }

    .stat-item p,
    .stat-unit {
        font-size: 0.9rem;
    }
}

@media (max-width: 768px) {
    .hero-section {
        height: auto;
        aspect-ratio: 1 / 1;
        /* 正方形に近い比率を確保 */
        min-height: auto;
        margin: 0%;
        border-radius: 0;
    }

    .hero-section.hero-bg-image {
        margin: 0;
        width: 100%;
        background-position: center center;
    }
}

@media (max-width: 768px) {
    .partner-hospitals img {
        /* ここで画像のサイズを統一します */
        width: 10rem;
    }
}


/* 初期状態: 不透明度0・下に少しずらす */
.float-in {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease-out;
}

/* 表示トリガーが入ったとき */
.float-in.show {
    opacity: 1;
    transform: translateY(0);
}