/*
Theme Name: Anegasaki Ekimae Ganka Theme
Theme URI: https://preview-medical.com
Author: Sasaki
Description: 姉ヶ崎駅前眼科のオリジナルWordPressテーマ
Version: 1.0
*/

@charset "UTF-8";

/* ========================================================= */
/* --- 0. Base: リセット・ボックスサイジング・全体定義 --- */
/* ========================================================= */
*,
*::before,
*::after {
    box-sizing: border-box;
}

/* ========================================================= */
/* --- 1. Variables: 変数定義（ロゴカラーに合わせた更新） --- */
/* ========================================================= */
:root {
    /* --- Colors (Primary) --- */
    /* ロゴの文字色に近い、落ち着いたパープル */
    --color-primary: #8E78B8;
    --color-main: #7360A3;
    /* 花びらの明るい色をベースにしたサブカラー */
    --color-secondary: #A888D1;

    /* 右側のカプセル用（今回追加する濃いパープル） */
    --color-deep-purple: #8e78b8ed;

    /* ホバー用：少し濃いめの紫 */
    --color-dark: #6F5A9A;

    /* 背景用：ごく薄いラベンダー（清潔感と優しさ） */
    --color-pale: #F8F6FC;

    /* 新しい透過ラベンダー色 */
    --color-light-purple: #f2e8ffe8;

    /* 旧 #F4F7FB の代わり：ロゴの紫のエッセンスを入れた、透明感のある背景色 */
    --color-light: #F8F7FC;

    /* カードの枠線など、もう少しだけ強調したい場合用 */
    --color-border-medium: rgba(115, 96, 163, 0.3);

    /* --- Accent (Reservation) --- */
    /* 紫の反対色に近い、視認性の高いオレンジを維持、またはピンク系へ */
    --color-accent-reserve: #FF8E6E;
    /* 元の #00A1E9 に近い鮮やかさを持ちつつ、ロゴの紫と相性が良い「藤色寄りの水色」 */
    --color-accent-blue: #7092E4;
    /* --- Colors (Text & Background) */
    --color-text: #444444;
    /* 少し柔らかい黒 */
    --color-text-light: #777777;
    --color-white: #ffffff;
    /* もし、より明るく清潔感を出したい場合はこちら（少し薄め） */
    --color-overlay-soft: rgba(115, 96, 163, 0.6);
    /* --- Fonts --- */
    --font-base: "Noto Sans JP", sans-serif;
    --font-head: "Noto Serif JP", serif;

    /* --- Box Shadows --- */
    /* シャドウも青みから紫みに微調整 */
    --shadow-sm: 0 4px 12px rgba(142, 120, 184, 0.2);
    --shadow-md: 0 5px 15px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.06);
}


/* ========================================================= */
/* --- 2. Typography & Base Styles (要素のデフォルト設定) --- */
/* ========================================================= */
body {
    font-family: var(--font-base);
    color: var(--color-text);
    line-height: 1.8;
    margin: 0;
    background-color: var(--color-white);
    letter-spacing: 0.05em;
    -webkit-text-size-adjust: 100%;
}

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

a:hover {
    opacity: 0.7;
}

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

ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* bodyのスクロールをロックするCSS (メニュー表示時) */
.is-fixed {
    overflow: hidden;
    position: fixed;
    width: 100%;
    height: 100vh;
}


/* ========================================================= */
/* --- 3. Layout: 共通レイアウトとユーティリティ --- */
/* ========================================================= */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-padding {
    padding: 80px 0;
}

.section-title {
    font-family: var(--font-head);
    font-size: 2rem;
    text-align: center;
    color: var(--color-primary);
    margin-bottom: 40px;
    position: relative;
}

.section-title span {
    display: block;
    font-size: 1rem;
    font-family: var(--font-base);
    color: var(--color-secondary);
    margin-top: 10px;
    font-weight: normal;
}

.bg-white-section {
    background-color: var(--color-white) !important;
}

.bg-pale-blue-section {
    background-color: var(--color-pale) !important;
}


.btn-wrapper {
    text-align: center;
    margin-top: 30px;
}


/* ========================================================= */
/* --- 4. Component: ボタン (Button) --- */
/* ========================================================= */
.btn-primary {
    display: inline-block;
    padding: 12px 28px;
    font-size: 1rem;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    line-height: 1;
    border: 2px solid var(--color-primary);
}

.btn-primary:not(.btn-outline) {
    background-color: var(--color-primary);
    color: var(--color-white);
    box-shadow: var(--shadow-sm);
}

.btn-primary:not(.btn-outline):hover {
    background-color: var(--color-dark);
    border-color: var(--color-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(30, 64, 176, 0.4);
}

.btn-primary.btn-outline {
    background-color: transparent;
    color: var(--color-primary);
    box-shadow: none;
}

.btn-primary.btn-outline:hover {
    background-color: var(--color-primary);
    color: var(--color-white);
    transform: none;
    box-shadow: var(--shadow-sm);
}

.btn-reserve {
    background: var(--color-secondary);
    color: var(--color-white);
    padding: 10px 25px;
    border-radius: 50px;
    font-weight: bold;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.btn-reserve:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(74, 144, 226, 0.4);
    opacity: 1;
}


/* ========================================================= */
/* --- 5. Component: ヘッダー/ナビゲーション (Header/Nav) --- */
/* ========================================================= */
/* ヘッダー関連のスタイルは header.css に移動しました */




/* ========================================================= */
/* --- 7. Component: カード/リスト (Card/List) --- */
/* ========================================================= */
.grid-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.about-grid-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
}

.card {
    background: var(--color-white);
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    transition: 0.3s;
    box-shadow: var(--shadow-md);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
}

.card-img {
    height: 200px;
    object-fit: cover;
    width: 100%;
}

.card-body {
    padding: 20px;
}

.card-title {
    text-align: center;
    font-size: 1.2rem;
    color: var(--color-primary);
    margin-bottom: 10px;
    font-weight: bold;
}

.news-list li {
    border-bottom: 1px solid #eee;
    padding: 15px 0;
    display: flex;
    align-items: baseline;
    gap: 20px;
}

.news-date {
    color: var(--color-text-light);
    font-size: 0.9rem;
}



.access-info {
    max-width: 550px;
    margin: 0 auto;
}

.address-info {
    max-width: 880px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    flex-wrap: nowrap;
    margin-top: 20px;
    margin-bottom: 20px;
}

.address-info-1,
.address-info-2 {
    width: 48%;
    padding: 15px;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .address-info {
        flex-direction: column;
        margin: 0;
        width: 100%;
    }

    .address-info-1,
    .address-info-2 {
        width: 100%;
        padding: 15px 15px;
    }

    .address-info-1 span {
        font-size: 1em;
    }

    .address-info-2 {
        margin-bottom: 0;
    }
}

.access-info h3 {
    font-size: 1.3rem;
    color: var(--color-primary);
    margin-bottom: 15px;
    text-align: center;
}

.access-info p {
    margin-top: auto;
    margin-bottom: 5px;
    text-align: center;
}

.access-map-wrapper {
    display: flex;
    flex-direction: column;
    gap: 30px;
    align-items: center;
    margin-bottom: 0;
    max-width: 100%;
}

.map {
    width: 100%;
    margin: 0;
    position: relative;
    height: 0;
    padding-bottom: 56.25%;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    max-width: 800px;
}

.map iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* ========================================================= */
/* --- 9. Component: テーブル (Table) --- */
/* ========================================================= */
.table-responsive {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    min-width: 600px;
    table-layout: fixed;
}

th,
td {
    border: 1px solid #ddd;
    padding: 15px;
    text-align: left;
    vertical-align: middle;
}

th {
    background: var(--color-light);
    color: var(--color-primary);
    font-weight: bold;
}

.time-table-wrapper {
    margin: 20px auto;
    max-width: 100%;
    width: 100%;
    overflow-x: auto;
}

table.clinic-time-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 400px;
    background: var(--color-white);
    margin-top: 0;
    max-width: 100%;
    table-layout: auto;
}

table.clinic-time-table th,
table.clinic-time-table td {
    border: 1px solid #ddd;
    padding: 10px;
    text-align: center;
    vertical-align: middle;
}

table.clinic-time-table th {
    background: var(--color-light);
    color: var(--color-primary);
    font-weight: bold;
}

table.clinic-time-table th:first-child {
    width: 150px;
}

p.reception-time {
    font-size: 0.8rem;
    font-weight: bold;
    color: #969696;
}

/* ========================================================= */
/* --- 10. Page: ページヘッダー (Page Header) --- */
/* ========================================================= */
/* フッター関連のスタイルは footer.css に移動しました */

.page-header {
    background: var(--color-primary);
    color: var(--color-white);
    padding: 60px 0;
    text-align: center;
}

.page-header h1 {
    font-family: var(--font-head);
    margin-bottom: 10px;
}


/* ========================================================= */
/* --- 11. Utility: 表示制御 (前回の青枠重複解消のための修正済み) --- */
/* ========================================================= */

/* SPでのみ表示する要素 (PCでは非表示) */
.u-display-sp-only {
    /* display: none !important; SPでは表示するためコメントアウト */
}

/* PCでのみ表示する要素 (SPでは非表示) */
/* デフォルトでは非表示にし、PCサイズ以上で上書きする */
.u-display-pc-only-block {
    display: none !important;
}

/* SPで非表示にするクラス (768px以上で表示を切り替え) */
@media (min-width: 768px) {

    /* 768px以上 (PC/タブレット) では、SP専用要素を非表示に維持 */
    .u-display-sp-only {
        display: none !important;
    }

    /* 768px以上 (PC/タブレット) では、PC専用要素をFlexコンテナとして表示 */
    .u-display-pc-only-block {
        display: flex !important;
        align-items: center;
    }
}


/* ========================================================= */
/* --- 12. Media Query: スマホ対応（768px以下） (★赤枠中央揃えを修正) --- */
/* ========================================================= */
@media (max-width: 768px) {

    /* Layout */
    .section-padding {
        padding: 40px 0;
    }

    /* Page Header の縦幅を狭くする */
    .page-header {
        /* 上下のpaddingを60pxから10pxに縮小（調整してください） */
        padding: 10px 0 22px 0;
    }

    /* ページタイトル (h1) の余白も微調整が必要であれば */
    .page-header h1 {
        margin-bottom: 5px;
        font-size: 1.6rem;
        font-weight: bold;
    }

    .page-header p {
        display: none;
    }

    .section-title {
        font-size: 1.6rem;
        margin-bottom: 30px;
    }

    .container {
        padding: 0 15px;
    }




    /* Card/List */
    .grid-cards,
    .about-grid-cards {
        grid-template-columns: 1fr;
    }



    /* Access/Map/Time Table SP Optimization */
    .access-map-wrapper {
        display: block;
    }

    .map {
        height: auto;
        padding-bottom: 65%;
        margin: 0 auto 30px auto;
        width: calc(100% - 30px);
        max-width: 100%;
    }

    .access-info {
        margin: 0;
        width: 100%;
        background-color: var(--color-light);
        display: block;
        text-align: left;
        padding: 20px 0;
        box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
    }

    img.info-card-icon {
        width: 15px !important;
    }

    .access-info h3,
    .access-info p {
        padding-left: 15px;
        padding-right: 15px;
        box-sizing: border-box;
        width: 100%;
    }

    .access-info p:last-of-type {
        font-size: 0.9rem;
    }


    /* Clinic Time Table SP Optimization (Horizontal Scroll based) */

    .time-table-wrapper {
        margin: 20px auto;
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    table.clinic-time-table {
        width: 100%;
        min-width: 500px;
        table-layout: fixed;
        border-collapse: collapse;
        background: var(--color-white);
        margin-top: 0;
        max-width: none;
    }

    table.clinic-time-table tr {
        display: table-row;
        align-items: auto;
        border-top: 1px solid #eee;
    }

    table.clinic-time-table thead tr {
        border-top: none;
        border-bottom: 1px solid #ddd;
    }

    table.clinic-time-table tbody tr:first-child {
        border-top: none;
    }


    table.clinic-time-table th,
    table.clinic-time-table td {
        display: table-cell;
        width: auto;
        padding: 8px 5px;
        font-size: 0.9rem;
        text-align: center;
        vertical-align: middle;
        border-right: 1px solid #ddd;
    }

    table.clinic-time-table th:first-child,
    table.clinic-time-table td:first-child {
        min-width: 120px;
        width: 120px;
        text-align: left;
        padding: 8px 8px;
        border-right: 1px solid #ddd;
    }

    table.clinic-time-table th {
        background: var(--color-light);
        color: var(--color-primary);
        padding-top: 8px;
        padding-bottom: 8px;
        font-size: 0.9rem;
    }

    table.clinic-time-table th:first-child {
        text-align: center;
        padding-left: 8px;
        padding-right: 8px;
    }

    table.clinic-time-table th:last-child {
        font-size: 0.85rem;
        padding-left: 3px;
        padding-right: 3px;
        border-right: 1px solid #ddd;
    }

    table.clinic-time-table td:first-of-type {
        background: #fff;
        color: #2c3338;
        font-weight: bold;
        text-align: left;
        padding: 8px 8px;
    }

    table.clinic-time-table td:first-of-type p {
        margin: 0;
        line-height: 1.2;
        font-size: 0.9em;
    }

    table.clinic-time-table td:first-of-type .reception-time {
        font-size: 0.75em;
        display: block;
        line-height: 1.2;
        color: var(--color-text-light);
    }

    table.clinic-time-table tr th:last-child,
    table.clinic-time-table tr td:last-child {
        border-right: none;
    }

    /* Table (募集要項) SP Optimization */
    .table-responsive {
        overflow-x: hidden;
    }

    div[style*="margin-bottom:50px;"]>.table-responsive>table {
        display: block;
        min-width: auto;
    }

    div[style*="margin-bottom:50px;"]>.table-responsive>table>tbody>tr {
        display: block;
        width: 100%;
        margin-bottom: 15px;
        border: 1px solid #E0E0E0;
        border-radius: 5px;
        overflow: hidden;
    }

    div[style*="margin-bottom:50px;"]>.table-responsive th,
    div[style*="margin-bottom:50px;"]>.table-responsive td {
        display: block;
        width: 100%;
        text-align: left;
        border: none;
        padding: 12px 15px;
        margin: 0;
        box-sizing: border-box;
    }

    div[style*="margin-bottom:50px;"]>.table-responsive th {
        background: var(--color-secondary);
        color: var(--color-white);
        font-size: 1rem;
        font-weight: bold;
        border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    }

    div[style*="margin-bottom:50px;"]>.table-responsive td {
        background: var(--color-white);
        border-bottom: 1px solid #EEEEEE;
    }

    div[style*="margin-bottom:50px;"]>.table-responsive tr td:last-child {
        border-bottom: none;
    }

    div[style*="margin-bottom:50px;"]>.table-responsive>table>tbody>tr:last-of-type {
        margin-bottom: 0;
    }

    div[style*="margin-bottom:50px;"]>.table-responsive>table>thead {
        display: none;
    }
}

/* 767px以下の追加調整 */
@media (max-width: 767px) {
    .clinic-info-pc-table {
        display: none !important;
    }

    .access-grid-cards {
        display: grid;
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* 768px以上の追加調整 */
@media (min-width: 768px) {
    .clinic-info-sp-list {
        display: none !important;
    }

    .access-grid-cards {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }

    .about-grid-cards {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Doctor Page Styles moved to page-doctor.css */