@charset "UTF-8";

/* ========================================================= */
/* --- 1. Header Structure (ヘッダー全体・配置) --- */
/* ========================================================= */
/* 1. 基本設定：すべてのページで色を付ける */
header.site-header {
    background: var(--color-primary);
    /* 透明から変更 */
    box-shadow: none;
    position: absolute;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 100;
}

/* 2. ホーム（トップページ）の時だけ透明に戻す */
.home header.site-header {
    background: transparent;
}

.header-container {
    display: flex;
    /* ロゴ（左）、ナビ（中央）、電話（右）の3要素を分散配置 */
    justify-content: space-between;
    /* 修正：左右の要素を下端（青線の位置）まで伸ばすため stretch を適用 */
    align-items: stretch;
    padding: 0;
    max-width: 100%;
    margin: 0 auto;
    position: relative;
}

/* ========================================================= */
/* --- 2. Site Branding (左端：ロゴのカプセル) --- */
/* ========================================================= */
.site-branding-wrapper {
    background-color: var(--color-light-purple);
    display: flex;
    justify-content: center;
    /* 修正：幅固定に伴い中央配置 */
    align-items: center;
    width: 360px;
    /* 修正：青枠と幅を統一 */
    padding: 0 20px;
    /* 修正：左右均等に */
    border-radius: 0 0 50px 0;
    box-shadow: 4px 4px 12px rgba(0, 0, 0, 0.1);
    white-space: nowrap;
    z-index: 2;
}

.site-branding {
    display: flex;
    flex-direction: column;
    align-items: center;
    /* センター配置を維持 */
    white-space: nowrap;
    background: transparent;
    padding: 0;
    z-index: 2;
}

.medical-corporation {
    color: var(--color-primary);
    font-size: 0.8rem;
    font-weight: 700;
    margin: 0;
    letter-spacing: 0.4em;
    text-transform: uppercase;
    line-height: 1.2;
    margin-bottom: 4px;
}

.site-logo {
    margin: 0;
    line-height: 1;
    display: flex;
    align-items: center;
    /* 修正：横幅の制限を解除、または十分に広くします */
    width: auto;
    max-width: none;
}

.site-logo a {
    display: block;
    line-height: 0;
    text-decoration: none;
}

/* ロゴの歪みを直し、視認性を最適化 */
.site-logo img {
    height: 65px;
    /* 高さを少しだけ抑えるとバランスが良くなります */
    width: auto;
    /* これで比率が維持されます */
    object-fit: contain;
    /* 念のための歪み防止 */

    /* 修正：ドロップシャドウを少し柔らかくして「ギザギザ感」を解消 */
    filter:
        drop-shadow(0 0 1px #fff) drop-shadow(0 0 2px #fff) drop-shadow(0 0 6px rgba(255, 255, 255, 0.8));

    transition: transform 0.3s ease, opacity 0.3s ease;
}

.site-logo a:hover img {
    opacity: 0.8;
    transform: scale(1.02);
    /* 軽く浮かび上がる演出 */
}

/* ========================================================= */
/* --- 3. Navigation Capsule (中央：メニューの独立カプセル) --- */
/* ========================================================= */
.nav-center-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    /* 上部の余白 */
    margin-top: 5px;
}

/* 1. 基本設定（home.php 以外を含むすべてのページ） */
.header-sub-text {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--color-white);
    /* 基本を白に設定 */
    margin-bottom: 8px;
    letter-spacing: 0.05em;
}

/* 2. トップページ（home.php）のみの上書き設定 */
/* WordPressのbodyタグに .home クラスがついている前提 */
.home .header-sub-text {
    color: var(--color-primary);
}

.nav-and-contact-wrapper {
    display: flex;
    align-items: center;
    background: var(--color-white);
    padding: 0 40px;
    margin-top: 0 !important;
    border-radius: 100px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    height: 65px;
    z-index: 10;
}

.nav-list {
    display: flex;
    align-items: center;
    gap: 25px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-list li {
    position: relative;
    white-space: nowrap;
}

.nav-list a {
    font-weight: 700;
    color: var(--color-primary);
    font-size: 1.15rem;
    padding: 20px 5px;
    display: block;
    text-decoration: none;
    transition: color 0.3s ease;
}

.nav-list a::after {
    content: '';
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background-color: var(--color-accent-blue);
    transition: width 0.3s ease-out;
}

.nav-list a:hover::after {
    width: 80%;
}

/* --- ドロップダウンメニュー (sub-menu) --- */
.nav-list ul.sub-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    z-index: 110;
    background: var(--color-white);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    border-radius: 12px;
    min-width: 200px;
    padding: 10px 0;
    list-style: none;
    display: block !important;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.nav-list li:hover>ul.sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.nav-list ul.sub-menu li {
    width: 100%;
    border-bottom: 1px solid #f5f5f5;
}

.nav-list ul.sub-menu li:last-child {
    border-bottom: none;
}

.nav-list ul.sub-menu a {
    padding: 12px 20px;
    font-size: 0.9rem;
    color: var(--color-text);
    font-weight: 500;
    text-align: left;
}

.nav-list ul.sub-menu a:hover {
    background: var(--color-pale);
    color: var(--color-primary);
}

.nav-list ul.sub-menu a::after {
    display: none;
}

/* ========================================================= */
/* --- 4. Independent Contact Area (右端：青いカプセル) --- */
/* ========================================================= */
.header-contact {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: var(--color-deep-purple);
    width: 360px;
    /* 修正：赤枠と幅を統一 */
    padding: 0 20px 15px;
    /* 修正：左右均等に */
    border-radius: 0 0 0 50px;
    box-shadow: -4px 4px 15px rgba(0, 0, 0, 0.1);
    white-space: nowrap;
    color: var(--color-white);
    position: relative;
    z-index: 2;
}

/* 白抜きテキストのスタイルを大きく調整 */
.contact-label {
    font-size: 1.0rem;
    /* 修正：サイズアップ (0.85 -> 1.0) */
    font-weight: 700;
    color: var(--color-white);
    margin-bottom: 5px;
    letter-spacing: 0.1em;
    line-height: 1.2;
}

.header-contact .tel-number {
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    color: var(--color-white) !important;
    font-size: 2.1rem;
    /* 修正：サイズアップ (1.6 -> 2.1) */
    font-weight: 800;
    /* 修正：より太く */
    line-height: 1;
}

.header-contact .tel-number i {
    margin-right: 12px;
    font-size: 1.6rem;
    /* 修正：アイコンも大きく */
}

.reception-hours {
    font-size: 0.85rem;
    /* 修正：サイズアップ (0.75 -> 0.85) */
    color: rgba(255, 255, 255, 0.95);
    margin: 8px 0 0 0;
    /* 修正：少し間隔を広げた */
    line-height: 1.2;
    font-weight: 500;
}

/* ========================================================= */
/* --- 5. Responsive (レスポンシブ：1400px以下での調整) --- */
/* ========================================================= */

/* 画面幅が狭まってきたときに、固定幅がはみ出さないよう調整 */
@media (max-width: 1450px) {

    .site-branding-wrapper,
    .header-contact {
        width: 300px;
        /* 少し縮める */
    }

    .header-contact .tel-number {
        font-size: 1.7rem;
    }
}

@media (min-width: 992px) {

    .nav-wrapper,
    .nav-wrapper .menu-menu-container,
    .hamburger-btn {
        display: none !important;
    }

    /* PC表示の時だけ、ヘッダーの高さ分（約140px〜160px）下にずらす */
    .site-content-wrapper {
        padding-top: 69px;
        /* 画像を見ながら数値を微調整してください */
    }
}

@media (max-width: 1400px) {
    .nav-list {
        gap: 15px;
    }

    .nav-and-contact-wrapper {
        padding: 0 25px;
    }
}

@media (max-width: 1200px) {
    .header-contact {
        min-width: 210px;
        /* レスポンシブ時も高さを維持するためパディングで調整 */
        padding: 0 15px 0 25px;
    }

    .contact-label {
        font-size: 0.75rem;
    }

    .header-contact .tel-number {
        font-size: 1.3rem;
    }

    .site-logo {
        font-size: 1.5rem;
    }

    .nav-list a {
        font-size: 0.85rem;
    }
}

@media (max-width: 991px) {

    /* スマホ表示の時は、ヘッダーが absolute ではなくなるので余白をリセット */
    .site-content-wrapper {
        padding-top: 0;
    }

    header.site-header {
        position: relative !important;
        background: var(--color-light-purple);
    }

    .u-display-pc-only-block {
        display: none !important;
    }

    .header-container {
        justify-content: center;
        padding: 15px 20px;
        align-items: center;
        position: relative;
        /* スマホ時は高さを伸ばす必要がないため auto に */
        height: auto;
    }

    .site-branding-wrapper {
        background: none;
        box-shadow: none;
        padding: 0;
        border-radius: 0;
        flex: 1;
        display: flex;
        justify-content: center;
        height: auto;
    }

    .site-branding {
        background: transparent;
        box-shadow: none;
        padding: 0;
        border-radius: 0;
        z-index: 101;
        align-items: center;
        text-align: center;

        /* ✅ 追加：ロゴエリア全体をふわっと白く浮かび上がらせる */
        filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.9));
    }

    .medical-corporation {
        color: var(--color-primary);
        font-size: 0.85rem;
        margin-bottom: 3px;
        /* ✅ 追加：文字の周りにわずかに白縁をつけて読みやすくする */
        text-shadow: 0 0 5px #fff, 0 0 10px #fff;
    }

    .site-logo {
        font-size: 1.4rem;
    }

    .site-logo a {
        color: var(--color-white);
    }

    /* .header-contact {
        display: none !important;
    } */
    /* SP版のロゴも白い影で視認性を確保 */
    .site-logo img {
        height: 45px;
        /* ✅ 修正：より白く、くっきりとした影に変更 */
        filter:
            drop-shadow(0 0 2px #fff) drop-shadow(0 0 4px rgba(255, 255, 255, 0.8));
    }

    .hamburger-btn {
        display: block !important;
        position: absolute;
        right: 20px;
        width: 30px;
        height: 24px;
        border: none;
        background: none;
        z-index: 102;
    }

    .hamburger-btn span {
        display: block;
        width: 100%;
        height: 2px;
        background-color: var(--color-main);
        position: absolute;
        left: 0;
        transition: 0.3s;
    }

    .hamburger-btn span:nth-child(1) {
        top: 0;
    }

    .hamburger-btn span:nth-child(2) {
        top: 50%;
        transform: translateY(-50%);
    }

    .hamburger-btn span:nth-child(3) {
        bottom: 0;
    }

    .hamburger-btn.is-active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 6px);
    }

    .hamburger-btn.is-active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger-btn.is-active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -6px);
    }

    .nav-wrapper {
        display: flex !important;
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background: var(--color-white);
        transition: right 0.4s ease;
        z-index: 110;
        overflow-y: auto;
        flex-direction: column;
    }

    .nav-wrapper.is-active {
        right: 0;
    }

    .nav-header-top {
        width: 100%;
        height: 60px;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0 60px;
        border-bottom: 1px solid #eee;
        box-sizing: border-box;
        flex-shrink: 0;
    }

    .nav-header-title {
        font-size: 1.75rem;
        font-weight: bold;
        color: var(--color-main);
        margin: 0;
    }

    .nav-menu {
        list-style: none;
        padding: 0;
        margin: 0;
    }

    .nav-menu a {
        padding: 9px 20px;
        font-size: 1.1rem;
        font-weight: bold;
        text-align: center;
        color: var(--color-text);
        display: block;
        border-bottom: 1px solid #eee;
        text-decoration: none;
    }

    .nav-tel-link {
        display: flex !important;
        justify-content: center;
        align-items: center;
        margin: 30px auto;
        width: 90%;
        padding: 15px;
        background: var(--color-primary);
        color: var(--color-white);
        font-weight: bold;
        border-radius: 5px;
        text-decoration: none;
    }

    .nav-extra-info {
        padding: 0 20px 40px;
        font-size: 0.9rem;
    }
}