@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-subject-section {
    padding: 80px 0;
}

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

/* 各セクションブロック（グレー枠を外し、下部に余白と区切り線を持たせる） */
.p-subject-block {
    margin-bottom: 60px;
    border: none;
    background-color: transparent;
    padding: 0;
    border-bottom: 1px solid #eaeaea; /* ブロックごとの薄い区切り線 */
    padding-bottom: 60px;
}
.p-subject-block:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

/* 2カラムレイアウト（精神科外来・思春期外来用） */
.p-subject-grid {
    display: flex;
    align-items: center;
    gap: 40px;
}
.p-subject-grid--rev {
    flex-direction: row-reverse;
}

.p-subject-grid__img {
    width: 45%;
    flex-shrink: 0;
}
.p-subject-grid__img img {
    width: 100%;
    aspect-ratio: 3 / 2;
    object-fit: cover;
    border-radius: 4px;
    display: block;
}

.p-subject-grid__content {
    width: 55%;
}

/* タイトルの左側に細く縦に四角い棒をつける装飾 */
.p-subject-heading {
    position: relative;
    font-size: 1.3rem;
    font-weight: bold;
    color: var(--color-main);
    padding-left: 15px;
    margin-bottom: 25px;
    border-bottom: 2px solid var(--color-main);
    padding-bottom: 12px;
}
.p-subject-heading::before {
    content: '';
    position: absolute;
    left: 0;
    top: 3px;
    bottom: 15px;
    width: 4px;
    background-color: var(--color-main);
    border-radius: 2px;
}

.p-subject-body {
    font-size: 0.95rem;
    line-height: 1.8;
}

.p-subject-body p {
    margin-bottom: 15px;
}
.p-subject-body p:last-child {
    margin-bottom: 0;
}

@media screen and (max-width: 768px) {
    .p-subject-section { padding: 40px 0; }
    .p-subject-intro { text-align: left; margin-bottom: 40px; }
    .p-subject-block { padding-bottom: 40px; margin-bottom: 40px; }
    .p-subject-grid, .p-subject-grid--rev {
        flex-direction: column;
        gap: 20px;
    }
    .p-subject-grid__img, .p-subject-grid__content {
        width: 100%;
    }
    .p-subject-heading { font-size: 1.15rem; }
}