@charset "UTF-8";

/* =========================================================
   下層ページ メインビジュアル (Sub Hero)
========================================================= */
.p-sub-hero {
    position: relative;
    width: 100%;
    height: 395px;
    padding-top: 75px;
    background-color: var(--color-main);
    background-size: cover;
    background-position: center;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: #fff;
    margin-top: 0;
}

.p-sub-hero::after {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.4);
}

.p-sub-hero__inner {
    position: relative;
    z-index: 2;
    transform: translateY(10px);
    opacity: 0;
    animation: fadeUp 1s ease forwards;
}

@keyframes fadeUp {
    100% { transform: translateY(0); opacity: 1; }
}

.p-sub-hero__title {
    font-family: var(--font-english);
    font-size: 2.8rem;
    font-weight: normal;
    margin-bottom: 5px;
    letter-spacing: 0.05em;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.p-sub-hero__en {
    display: block;
    font-family: var(--font-english);
    font-size: 1.1rem;
    letter-spacing: 0.15em;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

@media screen and (max-width: 768px) {
    .p-sub-hero { height: 280px; padding-top: 60px; }
    .p-sub-hero__title { font-size: 1.8rem; }
    .p-sub-hero__en { font-size: 0.9rem; }
}

/* =========================================================
   医院紹介（ギャラリー・カルーセル） ページ固有スタイル
========================================================= */
.p-facility-section {
    padding: 80px 0;
}

.p-facility-intro {
    font-size: 1rem;
    line-height: 1.8;
    margin-bottom: 50px;
    text-align: center;
}

/* ギャラリー全体ラッパー */
.p-facility-gallery {
    max-width: 900px;
    margin: 0 auto;
}

/* 1段目：大きな写真の表示エリア */
.p-facility-main-img {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 25px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    background-color: #eee;
}
.p-facility-main-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: opacity 0.3s ease;
}

/* 2段目：写真の説明テキスト */
.p-facility-main-desc {
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--color-main);
    text-align: center;
    margin-bottom: 40px;
    min-height: 2.2em;
    line-height: 1.6;
}

/* 3段目：サムネイルカルーセル（横並びリスト ＆ 左右矢印） */
.p-facility-thumbs {
    position: relative;
    padding: 0 50px; /* 左右の矢印ボタンを配置するための余白 */
}

.p-facility-thumbs__list {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    scroll-behavior: smooth;
    /* サムネイル下のバー・スクロールバーを非表示にする */
    scrollbar-width: none; /* Firefox用 */
    -ms-overflow-style: none; /* IE, Edge用 */
    padding-bottom: 5px;
}
.p-facility-thumbs__list::-webkit-scrollbar {
    display: none; /* Chrome, Safari用（バーを完全に消す） */
}

/* 各サムネイルアイテム */
.p-facility-thumb-item {
    flex: 0 0 140px;
    cursor: pointer;
    border-radius: 4px;
    overflow: hidden;
    border: 2px solid transparent;
    opacity: 0.6;
    transition: all 0.3s ease;
}
.p-facility-thumb-item img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    display: block;
}

/* ホバー時および選択中（Active）の状態 */
.p-facility-thumb-item:hover {
    opacity: 0.9;
}
.p-facility-thumb-item.is-active {
    border-color: var(--color-main);
    opacity: 1;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

/* 黒い丸で中に矢印がある左右のカーソルボタン */
.p-facility-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 38px;
    height: 38px;
    background-color: #333333;
    color: #fff;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    transition: background-color 0.3s ease, transform 0.3s ease;
}
.p-facility-arrow:hover {
    background-color: #555555;
    transform: translateY(-50%) scale(1.05);
}

/* 矢印の形状（CSS擬似要素） */
.p-facility-arrow::after {
    content: '';
    width: 8px;
    height: 8px;
    border-top: 2px solid #fff;
    border-right: 2px solid #fff;
}

.p-facility-arrow--prev {
    left: 0;
}
.p-facility-arrow--prev::after {
    transform: rotate(-135deg);
    margin-left: 3px; /* 微調整 */
}

.p-facility-arrow--next {
    right: 0;
}
.p-facility-arrow--next::after {
    transform: rotate(45deg);
    margin-right: 3px; /* 微調整 */
}

@media screen and (max-width: 768px) {
    .p-facility-section { padding: 40px 0; }
    .p-facility-intro { margin-bottom: 30px; text-align: left; }
    .p-facility-main-desc { font-size: 1rem; margin-bottom: 30px; }
    .p-facility-thumbs { padding: 0 40px; }
    .p-facility-arrow { width: 32px; height: 32px; }
    .p-facility-thumb-item { flex: 0 0 110px; }
}