@charset "UTF-8";

/* =====================================================
   全ページ共通のベース
   destyle.css の後、ページ個別 CSS の前に読み込む
   ===================================================== */

/* ===== ルート =====
   背景色は html に置く。body に置くと z-index:-1 で背面に敷いた
   固定要素を覆ってしまうため、ここから移動させないこと。
   overscroll-behavior も同じ理由（バウンス時に背面が見える）で外さない。 */
html {
    background-color: #ffffff;
    overscroll-behavior: none;
    scroll-behavior: smooth;
}

body {
    color: #5281b4;
    font-family: "Zen Maru Gothic", "Noto Sans JP", "Hiragino Sans", "Yu Gothic", sans-serif;
    font-size: 16px;
    line-height: 1.6;
    /* ヘッダーが position: fixed のぶんだけ本文を下げる */
    padding-top: 105px;
    -webkit-font-smoothing: antialiased;
}

/* 固定ヘッダーに隠れないよう、アンカー先に余白を持たせる */
[id] {
    scroll-margin-top: 125px;
}

img {
    max-width: 100%;
    height: auto;
}

a {
    color: inherit;
    text-decoration: none;
    transition: opacity 0.3s;
}

@media (hover: hover) {
    a:hover {
        opacity: 0.7;
    }
}

/* ===== ボタンのホバー =====
   文中リンクは上の opacity だけで足りるが、ボタンは「押せる」ことを
   はっきり見せたいので、少し浮かせて色を濃くする。
   opacity: 1 を書き戻しているのは、上の a:hover と二重に効いて
   ボタンが薄くなるのを防ぐため（消さないこと）。
   ページ個別のボタン（.button / .reservation__button）は style.css 側に
   同じ形のルールを置いている。塗りの濃さを変えるときは両方そろえること。 */
.header__tel,
.header__button,
.drawer__button {
    transition: background-color 0.3s, box-shadow 0.3s, transform 0.3s;
}

@media (hover: hover) {

    .header__tel:hover,
    .header__button:hover,
    .drawer__button:hover {
        opacity: 1;
        background-color: #3d8ac2;
        box-shadow: 0 8px 16px rgba(74, 155, 214, 0.4);
        transform: translateY(-3px);
    }

    .header__tel:active,
    .header__button:active,
    .drawer__button:active {
        transform: translateY(-1px);
    }
}

/* ハンバーガーは塗りではなく三本線なので、線の色だけ濃くする */
@media (hover: hover) {
    .header__trigger:hover .header__line {
        background-color: #3d8ac2;
    }
}

/* ===== レイアウト幅 ===== */
.inner {
    width: 88%;
    max-width: 1056px;
    margin-inline: auto;
}

.inner__small {
    width: 88%;
    max-width: 968px;
    margin-inline: auto;
}

/* ===== 表示切替ユーティリティ ===== */
.pc-none {
    display: none;
}

.sp-none {
    display: block;
}

/* ===== 読み上げ専用テキスト =====
   丸印だけでは意味が伝わらない箇所（診療時間表の ● と —）に添える。
   clip と clip-path を両方書かないと文字の一部が描画に残るブラウザがあるので、
   どちらも省略しないこと。 */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    border: 0;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
}

/* =====================================================
   ヘッダー
   ===================================================== */
.header {
    position: fixed;
    inset: 0 0 auto;
    z-index: 100;
    height: 105px;
    background-color: #ffffff;
    transition: box-shadow 0.3s;
}

/* スクロール後だけ影を出す（JS が .is-scrolled を付け外し） */
.header.is-scrolled {
    box-shadow: 0 2px 12px rgba(82, 129, 180, 0.12);
}

.header__inner {
    display: flex;
    align-items: center;
    height: 100%;
    padding-inline: 58px 31px;
}

.header__logo {
    flex-shrink: 0;
    width: 220px;
}

.header__logo img {
    display: block;
    width: 100%;
}

.header__navigation {
    margin-left: auto;
}

.header__list {
    display: flex;
    align-items: center;
    gap: 38px;
}

.header__link {
    font-family: "Noto Sans JP", sans-serif;
    font-size: 19px;
    font-weight: 500;
    white-space: nowrap;
}

.header__buttons {
    display: flex;
    align-items: center;
    gap: 29px;
    margin-left: 52px;
}

.header__tel {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 65px;
    border-radius: 50px;
    background-color: #4a9bd6;
    box-shadow: 0 4px 4px rgba(0, 0, 0, 0.25);
}

.header__tel img {
    display: block;
    width: 31px;
    height: 31px;
}

.header__button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 167px;
    height: 65px;
    border-radius: 200px;
    background-color: #4a9bd6;
    box-shadow: 0 4px 4px rgba(0, 0, 0, 0.25);
    color: #ffffff;
    font-family: "Noto Sans JP", sans-serif;
    font-size: 15px;
    font-weight: 600;
    white-space: nowrap;
}

/* ハンバーガー：PC では非表示 */
.header__trigger {
    display: none;
}

/* =====================================================
   SP 用ドロワー（PC では非表示）
   ===================================================== */
.drawer {
    display: none;
}

/* =====================================================
   フッター
   ===================================================== */
.footer {
    background-color: #4a9bd6;
    color: #ffffff;
}

.footer__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 58px 20px 45px;
}

.footer__logo {
    width: 277px;
}

.footer__logo img {
    display: block;
    width: 100%;
}

.footer__info {
    display: flex;
    justify-content: center;
    gap: 19px;
    margin-top: 45px;
    font-family: "Noto Sans JP", sans-serif;
    font-size: 16px;
}

.footer__data {
    white-space: nowrap;
}

.footer__list {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px 60px;
    margin-top: 21px;
    font-family: "Noto Sans JP", sans-serif;
    font-size: 16px;
}

.footer__link--external {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.footer__link--external img {
    display: block;
    width: 19px;
    height: 19px;
}

.footer__copyright {
    margin-top: 45px;
    font-family: "Noto Sans JP", sans-serif;
    font-size: 16px;
}

/* =====================================================
   1400px 以下：ロゴ・ナビ・ボタンを並べると 1440px 前提の余白では
   足りなくなるので、ヘッダーだけ詰める
   （ここで詰めておかないと 1200px 前後でナビがロゴに重なる）
   ===================================================== */
@media (max-width: 1400px) {

    .header__inner {
        padding-inline: 24px;
    }

    .header__list {
        gap: 20px;
    }

    .header__link {
        font-size: 16px;
    }

    .header__buttons {
        gap: 16px;
        margin-left: 24px;
    }
}

/* =====================================================
   1180px 以下：詰めてもグローバルナビが収まらなくなる幅
   ここからハンバーガー＋ドロワーに切り替える
   ===================================================== */
@media (max-width: 1180px) {

    .header__inner {
        justify-content: space-between;
        padding-inline: 24px;
    }

    .header__navigation,
    .header__buttons {
        display: none;
    }

    .header__trigger {
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 6px;
        width: 32px;
        height: 32px;
    }

    .header__line {
        display: block;
        width: 100%;
        height: 2px;
        border-radius: 2px;
        background-color: #4a9bd6;
        transition: transform 0.3s, opacity 0.3s;
    }

    /* 開いている間は×印にする */
    .header__trigger.is-active .header__line:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .header__trigger.is-active .header__line:nth-child(2) {
        opacity: 0;
    }

    .header__trigger.is-active .header__line:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    /* --- ドロワー ---
       body の overflow は触らず、ドロワー側だけスクロールさせる */
    .drawer {
        display: block;
        position: fixed;
        inset: 105px 0 0;
        z-index: 90;
        overflow-y: auto;
        padding: 56px 40px 80px;
        background-color: #ffffff;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-8px);
        transition: opacity 0.3s, visibility 0.3s, transform 0.3s;
    }

    .drawer.is-open {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .drawer__list {
        display: flex;
        flex-direction: column;
        gap: 24px;
    }

    .drawer__link {
        font-family: "Noto Sans JP", sans-serif;
        font-size: 18px;
        font-weight: 500;
    }

    .drawer__button {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        max-width: 320px;
        height: 60px;
        margin-top: 40px;
        border-radius: 200px;
        background-color: #4a9bd6;
        color: #ffffff;
        font-family: "Noto Sans JP", sans-serif;
        font-size: 16px;
        font-weight: 600;
    }

    .drawer__tel {
        display: block;
        max-width: 320px;
        margin-top: 20px;
        font-family: "Noto Sans JP", sans-serif;
        font-size: 16px;
        font-weight: 600;
        text-align: center;
    }
}

/* =====================================================
   SP（768px 以下）
   ===================================================== */
@media (max-width: 768px) {

    body {
        padding-top: 64px;
    }

    [id] {
        scroll-margin-top: 74px;
    }

    .pc-none {
        display: block;
    }

    .sp-none {
        display: none;
    }

    .inner,
    .inner__small {
        width: 88%;
    }

    /* --- ヘッダー：SP ではさらに背を低くする --- */
    .header {
        height: 64px;
    }

    .header__inner {
        padding-inline: 16px;
    }

    .header__logo {
        width: 150px;
    }

    /* ヘッダーが 64px になるぶん、ドロワーの開始位置も上げる */
    .drawer {
        inset: 64px 0 0;
        padding: 40px 24px 60px;
    }

    /* --- フッター --- */
    .footer__inner {
        padding: 40px 20px 32px;
    }

    .footer__logo {
        width: 220px;
    }

    .footer__info {
        flex-direction: column;
        align-items: center;
        gap: 8px;
        margin-top: 28px;
        font-size: 14px;
    }

    .footer__list {
        gap: 14px 24px;
        margin-top: 24px;
        font-size: 14px;
    }

    .footer__copyright {
        margin-top: 28px;
        font-size: 11px;
        text-align: center;
    }
}

/* =====================================================
   アニメーションを控えたい設定のとき
   ここで全ページ共通の動きを止める
   ===================================================== */
@media (prefers-reduced-motion: reduce) {

    html {
        scroll-behavior: auto;
    }

    * {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }

    /* ボタンのホバーは浮き上がり（動き）をやめ、色の変化だけ残す */
    .header__tel:hover,
    .header__button:hover,
    .drawer__button:hover,
    .header__tel:active,
    .header__button:active,
    .drawer__button:active {
        transform: none;
    }
}
