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

@charset "UTF-8";

/* ========================================================= */
/* --- 0. Base: リセット・ボックスサイジング・全体定義 --- */
/* ========================================================= */

/* Box Sizing: レスポンシブデザインの破綻を防ぐ */
*,
*::before,
*::after {
    box-sizing: border-box;
}

/* ========================================================= */
/* --- 1. Variables: 変数定義（カラーパレットとフォント） --- */
/* ========================================================= */
:root {
    /* --- Colors (Primary) --- */
    --color-primary: #005B98;
    /* 信頼感のある濃い青 (Deep Blue) */
    --color-secondary: #4A90E2;
    /* 明るい青/アクセント (Bright Blue) */
    --color-dark: #1e40b0;
    /* ホバー用濃い青 (Blue-800) */
    --color-pale: #f0f8ff;
    /* 非常に薄い水色 (交互セクション背景用) */
    --color-light: #F4F9FC;
    /* ごく薄い水色（清潔感） */

    /* --- Colors (Text & Background) --- */
    --color-text: #333333;
    /* 読みやすい黒 (Dark Gray/Black) */
    --color-text-light: #666666;
    /* グレー (Medium Gray) */
    --color-white: #ffffff;

    /* --- Fonts --- */
    --font-base: "Noto Sans JP", sans-serif;
    --font-head: "Noto Serif JP", serif;

    /* --- Box Shadows --- */
    --shadow-sm: 0 4px 12px rgba(37, 99, 235, 0.3);
    --shadow-md: 0 5px 15px rgba(0, 0, 0, 0.03);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.05);
}


/* ========================================================= */
/* --- 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%;
    /* iOSでのフォントサイズ調整を無効化 */
}

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: 共通レイアウトとユーティリティ --- */
/* ========================================================= */

/* Max-widthと中央寄せ */
.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;
}

/* 冗長なクラスを統合 */
/* .news-btn-wrapper, .medical-btn-wrapper, .feature-btn-wrapper, .access-btn-wrapper */
.news-btn-wrapper,
.medical-btn-wrapper,
.feature-btn-wrapper,
.access-btn-wrapper {
    /* .btn-wrapper に統合 */
    text-align: center;
    margin-top: 30px;
}

.access-btn-wrapper.aos-init.aos-animate {
    margin-top: 1.2em;
    /* 特定のアニメーションライブラリ用 */
}


/* ========================================================= */
/* --- 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;
    /* a:hover の上書き */
}


/* ========================================================= */
/* --- 5. Component: ヘッダー/ナビゲーション (Header/Nav) --- */
/* ========================================================= */
header {
    background: var(--color-white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 100;
    opacity: 0.95;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--color-primary);
}

/* ナビゲーションと予約ボタンを包含 */
.nav-wrapper {
    display: flex;
    align-items: center;
    gap: 30px;
}

/* PCナビゲーションメニュー */
.nav-menu {
    display: flex;
    gap: 30px;
}

.nav-menu a {
    font-weight: 500;
    color: var(--color-text);
    position: relative;
    padding: 10px 0;
    display: block;
}

/* ハンバーガーメニューボタンの定義 (PCでは非表示) */
.hamburger-btn {
    display: none;
    width: 30px;
    height: 24px;
    position: relative;
    border: none;
    background: none;
    cursor: pointer;
    z-index: 101;
    padding: 0;
}

.hamburger-btn span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: var(--color-primary);
    position: absolute;
    left: 0;
    transition: transform 0.3s, opacity 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);
}


/* ========================================================= */
/* --- 6. Component: メインビジュアル (Hero/Slider) --- */
/* ========================================================= */
.hero {
    position: relative;
    overflow: hidden;
    width: 100%;
    height: auto;
    min-height: 450px;
    padding-bottom: 50px;
}

/* 各スライドの共通スタイル */
.hero-slide {
    position: relative;
    display: flex;
    align-items: center;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* 画像にかけるオーバーレイ */
.hero-slide::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.4);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    background: rgba(255, 255, 255, 0.9);
    padding: 50px 70px;
    border-radius: 10px;
    max-width: 600px;
    box-shadow: var(--shadow-lg);
}

.hero-title {
    font-family: var(--font-head);
    font-size: 2.5rem;
    color: var(--color-primary);
    margin-bottom: 20px;
}

/* Swiper Navigation (矢印) */
.swiper-button-prev,
.swiper-button-next {
    color: var(--color-primary);
    opacity: 0.8;
    transition: opacity 0.3s;
    --swiper-navigation-size: 44px;
    top: 50% !important;
    transform: translateY(-50%) !important;
}

.swiper-button-prev:hover,
.swiper-button-next:hover {
    opacity: 1;
}

/* Swiper Pagination (ドット) */
.swiper-pagination {
    bottom: 20px !important;
    margin-bottom: 0 !important;
}

.swiper-pagination-bullet-active {
    background: var(--color-primary);
}


/* ========================================================= */
/* --- 7. Component: カード/リスト (Card/List) --- */
/* ========================================================= */

/* カードグリッド (PC: 3列, SP: 1列) */
.grid-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    /* ★PCで3列に変更 */
    gap: 30px;
}

.about-grid-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    /* ★PCで3列に変更 */
    /* gap: 30px; */
}

.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;
}


/* ========================================================= */
/* --- 8. Component: 特徴/情報レイアウト (Feature/Info Layout) --- */
/* ========================================================= */

/* 当院の特徴セクションのPCレイアウト */
.feature-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
}

.feature-layout .feature-image {
    border-radius: 10px;
}


/* アクセス・診療時間情報 */
.access-info {
    max-width: 550px;
    margin: 0 auto;
    text-align: center;
}

.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%;
}


/* Google Map */
.map {
    width: 100%;
    margin: 0;
    position: relative;
    height: 0;
    padding-bottom: 56.25%;
    /* 16:9のアスペクト比 */
    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) --- */
/* ========================================================= */

/* 汎用テーブル（PC用スタイル） */
.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: 700px;
    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;
    /* SP対応のため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:first-child,
table.clinic-time-table td:first-child {
    text-align: left;
    width: 120px;
}

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


/* ========================================================= */
/* --- 10. Page: フッター/ヘッダー (Footer/Page Header) --- */
/* ========================================================= */

/* 下層ページヘッダー */
.page-header {
    background: var(--color-primary);
    color: var(--color-white);
    padding: 60px 0;
    text-align: center;
}

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

/* フッター */
footer {
    background: var(--color-primary);
    color: var(--color-white);
    padding: 60px 0 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.copyright {
    text-align: center;
    font-size: 0.8rem;
    opacity: 0.8;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 20px;
}


/* ========================================================= */
/* --- 11. Utility: 表示制御 --- */
/* ========================================================= */
/* PCでのみ表示/SPでのみ表示のクラス定義を追加 (WPテーマでよく使われます) */

/* PCで非表示にするクラス */
.u-display-sp-only {
    display: none !important;
}

/* SPで非表示にするクラス (768px以上で非表示) */
@media (min-width: 768px) {
    .u-display-sp-only {
        display: none !important;
    }
}


/* ========================================================= */
/* --- 12. Media Query: スマホ対応（768px以下） --- */
/* ========================================================= */
@media (max-width: 768px) {

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

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

    .container {
        padding: 0 15px;
    }

    .logo {
        font-size: 1.5em;
    }

    .access-btn-wrapper.aos-init.aos-animate {
        margin-top: .1em;
    }


    /* Header/Navigation */
    .hamburger-btn {
        display: block;
    }

    .nav-wrapper {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background: var(--color-white);
        padding-top: 80px;
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        transition: right 0.4s ease;
        z-index: 90;
        overflow-y: auto;
    }

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

    .nav-menu {
        display: block;
        width: 100%;
        margin-bottom: 30px;
        border-top: 1px solid #eee;
    }

    .nav-menu li {
        border-bottom: 1px solid #eee;
        text-align: center;
    }

    .nav-menu a {
        padding: 15px 0;
        font-size: 1.1rem;
        font-weight: bold;
        padding-left: 20px;
        padding-right: 20px;
        display: block;
    }

    .btn-reserve {
        width: 90%;
        max-width: 350px;
        text-align: center;
        margin-bottom: 40px;
    }

    /* Hero/Slider */
    .hero {
        min-height: 300px;
    }

    .hero-title {
        font-size: 1.8rem;
    }

    .hero-content {
        padding: 30px 20px;
        margin: 0 15px;
        width: auto;
        border-radius: 5px;
    }

    /* Card/List */
    .grid-cards {
        grid-template-columns: 1fr;
        /* SPでは1列 */
    }

    .about-grid-cards {
        grid-template-columns: 1fr;
        /* SPでは1列 */
    }

    /* Feature/Info Layout */
    .feature-layout {
        display: block;
        text-align: center;
    }

    .feature-layout>div {
        margin-bottom: 30px;
    }

    .feature-layout>div:first-child {
        margin-bottom: 30px;
    }

    .feature-layout img {
        width: 80%;
        max-width: 300px;
        height: auto;
        margin: 0 auto;
        display: block;
    }

    .feature-layout p,
    .feature-layout ul {
        text-align: left;
        max-width: 100%;
        margin: 10px auto;
    }

    .feature-layout ul {
        margin-top: 20px;
        list-style: disc;
        padding-left: 20px;
    }

    /* Footer */
    footer {
        padding: 40px 0 15px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .footer-grid>div:last-child {
        margin-bottom: 0;
    }


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

    .map {
        height: auto;
        padding-bottom: 65%;
        /* SPでは少し高めに */
        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 (Flex-based) */
    table.clinic-time-table {
        min-width: auto;
        width: calc(100% - 30px);
        margin: 20px 15px;
        display: table;
        padding: 0;
        box-sizing: border-box;
        border: 1px solid #ddd;
        border-radius: 5px;
        overflow: hidden;
    }

    table.clinic-time-table tbody,
    table.clinic-time-table thead,
    table.clinic-time-table tfoot {
        display: table-row-group;
    }

    table.clinic-time-table tr {
        display: flex;
        flex-wrap: nowrap;
        border-top: 1px solid #eee;
    }

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

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


    table.clinic-time-table th,
    table.clinic-time-table td {
        border: none;
        border-right: 1px solid #eee;
        padding: 10px 5px;
        text-align: center;
        font-size: 0.95rem;
        flex: 1 1 0;
        min-width: 0;
        width: auto;
    }

    table.clinic-time-table th:first-child,
    table.clinic-time-table td:first-child {
        text-align: left;
        flex: 0 0 110px;
        padding-left: 15px;
        padding-right: 5px;
        width: 110px;
    }

    table.clinic-time-table th {
        background: var(--color-light);
        color: var(--color-primary);
        font-size: 0.95rem;
        border-right: 1px solid #ddd;
    }

    table.clinic-time-table td:first-of-type {
        background: var(--color-secondary);
        color: var(--color-white);
        font-weight: bold;
        border-right: 1px solid rgba(255, 255, 255, 0.3);
    }

    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;
    }

    /* Utility Display SP */
    .u-display-sp-only {
        display: block !important;
    }
}

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

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

/* ========================================================= */
/* --- CSS END --- */
/* ========================================================= */