/* --- Variables --- */
:root {
    --main-green: #4a6755;
    --sub-green: #e9f0eb;
    --accent-gold: #c5a36b;
    --text-gray: #6b726e;
    --white: #ffffff;
    --text-main: #3d4540;

    --font-ja: 'Zen Maru Gothic', sans-serif;
    --font-mincho: 'Shippori Mincho', serif;
    --font-en: 'Cormorant Garamond', serif;
    --font-number: 'Montserrat', sans-serif;
}

/* --- Base --- */
* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-ja);
    color: var(--text-main);
    line-height: 1.6;
    background-color: #fff;
}

a { transition: 0.3s; }

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 40px;
}

/* 診療時間・カレンダーなどのエリアをさらにスリムに見せる専用コンテナ */
.container-slim {
    max-width: 800px;
}

/* 見出し */
h1, h2, h3 {
    font-family: var(--font-mincho);
}

/* --- アピールバナー --- */
.top-announcement {
    background-color: #6f8f7a;
    color: #fff;
    text-align: center;
    padding: 8px 0;
    font-size: 13px;
    letter-spacing: 0.1em;
}

.top-announcement .badge {
    background: #fff;
    color: var(--main-green);
    padding: 2px 10px;
    border-radius: 20px;
    font-weight: bold;
    margin-right: 10px;
}

/* --- Header --- */
.site-header {
    height: 100px;
    display: flex;
    align-items: center;
    position: absolute;
    top: 10px;
    width: 100%;
    z-index: 100;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%; }

/* 1. 親要素である .logo に flex を指定して、画像と文字を横並びにする */
.logo {
    display: flex;
    align-items: center;
    gap: 8px;            /* 画像と文字の間の余白 */
    white-space: nowrap; /* 画面が狭くなっても途中で文字が改行されないようにする */
}

/* 2. .logo .ja は、フォントや色などのテキスト装飾だけに設定する */
.logo .ja {
    font-size: 24px;
    font-weight: 400;
    letter-spacing: 0.05em;
    color: var(--main-green);
}

/* 3. アイコンのサイズ（こちらはそのままでOKです） */
.logo-icon {
    width: 32px;
    height: auto;
    display: block; /* 画像の下にできる微妙な隙間を消すおまじない */
}

/* ナビ */
.header-nav ul {
    display: flex;
    gap: 40px;
    list-style: none;
}

.header-nav a {
    text-decoration: none;
    font-size: 14px;
    font-weight: 400;
    letter-spacing: 0.08em;
    color: var(--text-main);
}

.header-nav a:hover {
    color: var(--main-green);
}

/* 電話 */
.btn-tel-nav {
    text-decoration: none;
    border: 1px solid var(--main-green);
    padding: 10px 25px;
    border-radius: 50px;
    color: var(--main-green);
    font-family: var(--font-number);
    font-size: 14px;
    letter-spacing: 0.05em;
}

.btn-tel-nav:hover {
    background: var(--main-green);
    color: var(--white);
}

/* --- Hero --- */
.hero {
    min-height: 70vh; /* 画面高さベースにする */
    display: flex;
    align-items: flex-start; /* 縦中央 */
    background: linear-gradient(to right, #fff 60%, var(--sub-green) 60%);
    padding: 80px 0 30px;
}

.hero-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 60px;
}

.hero-text { flex: 1.2; }

.hero-sub {
    font-family: var(--font-number);
    font-size: 15px;
    color: var(--main-green);
    margin-bottom: 20px;
}

.hero-text h2 {
    font-size: 3.5rem;
    line-height: 1.4;
    margin-bottom: 30px;
    letter-spacing: 0.05em;
}

.hero-desc {
    border-left: 1px solid var(--main-green);
    padding-left: 30px;
}

.hero-visual { flex: 1; }

.hero-img-wrap {
    width: 100%;
    height: 420px;
    border-radius: 300px 300px 0 0;
    overflow: hidden;
}

.hero-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 診療内容エリア全体の上の余白 */
.hero-services {
    margin-top: 30px;
    margin-bottom: 20px;
    padding: 0 15px; /* スマホで端にピタッとくっつかないように余白を作る */
    text-align: left; /* 全体を中央寄せの軸にする */
}

/* 「診療内容」というタイトルのスタイル（黒ベースにほんのり緑のニュアンス） */
.services-title {
    font-size: 16px;
    font-weight: 600;
    color: #333333;
    letter-spacing: 0.05em;
    margin-bottom: 12px;
    
    /* 縦線を文字の直前に綺麗に配置する設定 */
    display: inline-flex;
    align-items: center;
    gap: 8px; 
}

/* タイトルの左側の縦線（ズレないように修正） */
.services-title::before {
    content: "";
    display: inline-block;
    width: 3px;
    height: 16px;
    background-color: var(--main-green);
    border-radius: 2px;
}

/* 3. 羅列する文字の調整（ここが一番のポイントです！） */
.services-list {
    font-size: 14px; /* スマホで見やすいように少しだけ小さめに調整 */
    color: #333333;
    line-height: 1.8;
    
    /* flexボックスで中央寄せにする */
    display: flex;
    flex-wrap: wrap;
    justify-content: center; 
    gap: 0 8px; /* 隙間を少しタイトにしてスマホでの収まりを良くする */
}

/* ドット（•）の区切り線の設定 */
.services-list span:not(:last-child)::after {
    content: "•";
    color: #bbbbbb;
    margin-left: 8px;
}

/* --- Section --- */
/* 全体の上下余白のベースを100pxから60pxに縮小 */
.section {
    padding: 60px 0;
}

/* ヒーロー（トップ画像）部分のセクションは余白をなしにする */
.section.about {
    padding: 0;
}

/* 診療時間・カレンダー・アクセスの各セクションの余白を個別に調整（狭めています） */
.time-section {
    /* 上の余白は50pxのまま、下（カレンダーとの間）の余白だけ80pxに広げる */
    padding: 50px 0 90px 0; 
}

.calendar,
.access {
    padding: 50px 0; /* カレンダーとアクセスは元のまま */
}

/* セクションタイトルの下の余白も70pxから35pxに半減 */
.section-title {
    text-align: center;
    margin-bottom: 35px;
}

.en-title {
    font-family: var(--font-en);
    font-size: 14px;
    letter-spacing: 0.3em;
    color: var(--main-green);
}

.section-title h3 {
    font-size: 2.5rem;
}

/* --- Calendar --- */
.calendar-card {
    background: var(--white);
    border-radius: 30px;
    padding: 40px;
    border: 1px solid var(--sub-green);
}

.calendar-placeholder {
    border-radius: 20px;
    overflow: hidden;
}

.calendar-placeholder iframe {
    width: 100%;
    height: 500px;
    border: none;
}

.calendar-info {
    margin-top: 20px;
    text-align: center;
    font-size: 14px;
    color: var(--text-gray);
}

/* --- Access --- */
.access {
    background: var(--sub-green);
}

.access-layout {
    display: flex;
    gap: 80px;
    align-items: center;
}

.address {
    font-style: normal;
    font-size: 1.2rem;
    margin-bottom: 30px;
    font-family: var(--font-mincho);
}

.tel-link {
    display: block;
    margin-bottom: 10px;
    font-size: 2.0rem;
    font-family: var(--font-number);
    color: var(--main-green);
    text-decoration: none;
    font-weight: 300;
}

.access-map {
    flex: 1.7;
}

.map-wrap {
    width: 100%;
    height: 300px;
    border-radius: 0 120px 0 120px;
    overflow: hidden;
    border: 5px solid #fff;   /* 白枠 */
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
}

.map-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* --- Footer --- */
.site-footer {
    padding: 60px 0;
    border-top: 1px solid var(--sub-green);
    text-align: center;
}

.footer-copy {
    font-size: 12px;
    color: var(--text-gray);
    font-family: var(--font-number);
}

/* --- Table --- */
.time-table {
    width: 100%;
    margin-top: 30px;
    border-collapse: collapse;
    font-size: 17px;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
}

.time-table th {
    background: var(--main-green);
    color: #fff;
    padding: 12px 5px;
}

.time-table td {
    padding: 12px 5px;
    text-align: center;
    border-bottom: 1px solid var(--sub-green);
}

.time-note {
    font-size: 14px;
    color: var(--text-gray);
    margin-top: 10px;
    text-align: center;
}

/* --- Mobile --- */
.sp-fixed-cta { display: none; }

@media (max-width: 960px) {
    /* --- 【修正】ヘッダー全体の重なりと高さを解消 --- */
    .site-header {
        position: static;   /* 絶対配置を解除して、上のバナーと被らないようにします */
        height: auto;       /* 高さを自動にして中身がはみ出るのを防ぎます */
        padding: 15px 0;    /* 上下に程よい余白を作ります */
    }

    /* 【修正】ヘッダーの中身を縦並び（または綺麗に整列）にします */
    .header-inner {
        flex-direction: column; /* ロゴとナビを上下2段に分けてゆとりを持たせます */
        gap: 15px;
        text-align: center;
    }

    /* 【修正】ロゴの文字サイズを小さくし、スマホで改行されないようにします */
    .logo .ja {
        font-size: 20px;       /* 24pxから20pxに縮小 */
        display: block;
        white-space: nowrap;   /* 絶対に改行させない設定 */
        letter-spacing: 0.02em;
    }

    /* 【修正】ナビゲーションの文字サイズと位置の微調整 */
    .header-nav ul {
        justify-content: center; /* メニューを中央寄せにします */
        gap: 15px;               /* メニュー同士の間隔を少し広げて押しやすく */
    }
    
    .header-nav a {
        display: inline-block;
        font-size: 11px;               /* ボタン内に収まるよう文字を少し小さく */
        font-weight: bold;
        color: var(--white);       /* 文字の色を深い緑に */
        background-color: #8fa499; /* ボタンの背景は白にしてクッキリと */
        padding: 6px 16px;             /* ボタンの縦横のふくらみ（余白） */
        border-radius: 50px;           /* これで完璧な楕円（ピル型）になります */
        text-decoration: none;
        letter-spacing: 0.05em;
        transition: all 0.2s ease;
    }
    /* ヒーローエリアの調整 */
    .hero {
        /* 白一色（var(--white)）にするのをやめ、上下にグラデーションを敷きます */
        background: linear-gradient(to bottom, #ffffff 47%, var(--sub-green) 40%);
        padding-top: 30px;  
        padding-bottom: 40px; /* 下側の余白を少し作って背景色を見せます */
        min-height: auto;
    }

    .hero-container {
        flex-direction: column;
        text-align: center;
        gap: 30px;
    }

    .hero-text h2 {
        font-size: 2.0rem; /* 2.5remからさらに少し小さく */
    }

    .hero-desc {
        border-left: none;
        padding-left: 0;
    }

    /* 【修正】スマホでも上部メニューバーを表示する設定 */
    .header-nav {
        display: block; /* 非表示を解除 */
    }
    .header-nav ul {
        gap: 20px; /* メニュー間の幅をスマホ用に狭める */
    }
    .header-nav a {
        font-size: 12px; /* 文字を少し小さく */
    }

    .header-cta {
        display: none; /* 電話ボタンだけは誤動作防止で隠し、下部固定CTAに譲る */
    }

    .access-layout {
        flex-direction: column;
        gap: 40px;
    }

    /* 下部固定の電話ボタン */
    .sp-fixed-cta {
    display: flex;
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%); /* 画面の中央に配置します */
    width: calc(100% - 80px);     /* 左右に少しゆとりを持たせた幅 */
    max-width: 340px;
    
    /* 背景色と文字色の調整 */
    background-color: #8fa499; 
    color: var(--white);          /* 文字とアイコンの色を「白」に統一 */
    height: 50px;                 /* 少しスリムで上品な高さ */
    
    /* 【修正】フォントとおしゃれな細さに調整 */
    font-family: var(--font-number); /* 数字や英語が含まれるならMontserratに */
    font-weight: 300;             /* 【変更】500（中太）から300（細め）にして上品に */
    font-size: 15px;              /* 16pxから15pxにして文字の繊細さを強調 */
    letter-spacing: 0.08em;       /* 【変更】文字の間隔を少しだけ広げてヌケ感を演出 */
    
    border-radius: 50px;          /* 綺麗な角丸ピル型 */
    align-items: center;
    justify-content: center;
    gap: 10px;                    /* アイコンと文字の間の隙間 */
    text-decoration: none;
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(74, 103, 85, 0.12); /* 優しく上品な影 */
    transition: all 0.3s ease;
}

    /* タップした時にPCのホバー時のように色が反転する演出 */
    .sp-fixed-cta:active {
        background-color: var(--main-green);
        color: var(--white);
    }
}

@media (max-width: 768px) {
    /* 【修正】各セクションのタイトルが大きすぎるのを調整 */
    .section-title {
        margin-bottom: 25px; /* タイトル下の余白を縮小 */
    }
    .section-title h3 {
        font-size: 1.6rem; /* 2.5rem から 1.6rem に大幅縮小してすっきりと */
    }
    .en-title {
        font-size: 11px; /* 英語の補足タイトルも少し小さく */
        letter-spacing: 0.2em;
    }
    .time-section {
        padding-top: 40px;
        padding-bottom: 25px; /* 下側の余白を大幅に減らします */
    }
    .calendar {
        padding-top: 25px;    /* 診療時間と挟み込むように上の余白を減らします */
        padding-bottom: 40px;
    }

    .calendar-placeholder iframe {
        height: 420px;
    }

    /* 診療時間テーブルの調整 */
    .time-table { font-size: 13px; }
    .time-table th, 
    .time-table td {
        padding: 10px 2px;
    }
    .sat-time {
        font-size: 10px;
    }

    /* 【修正】住所・電話番号の文字が大きすぎるのを調整 */
    .address {
        font-size: 0.95rem; /* 1.2rem からスマホで見やすいサイズに縮小 */
        text-align: center; /* 中央寄せにしてレイアウトを綺麗に */
        line-height: 1.8;
    }
    .address span {
        font-size: 0.85rem; /* 「徒歩1分」などの補足文字をさらに小さく */
        opacity: 0.8;
    }
    .tel-link { 
        font-size: 1.5rem; /* 2.0rem / 1.8rem から 1.5rem に縮小 */
        text-align: center;
        margin-top: 15px;
    }
    
    .access-text {
        width: 100%;
        text-align: center; /* アクセスエリア全体を中央寄せに */
    }
}

/* ==========================================================================
   ふんわりフェードインのアニメーション
   ========================================================================== */

/* 1. アニメーションの動きを定義（透明度0＆少し下から、透明度1＆元の位置へ） */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px); /* 30px下からスタート */
    }
    to {
        opacity: 1;
        transform: translateY(0);    /* 元の位置に戻る */
    }
}

/* 2. 動かしたいセクションにアニメーションを適用 */
.hero-container,
.time-section .container,
.calendar .container,
.access .container {
    opacity: 0; /* 最初は消しておく */
    animation: fadeInUp 1.2s ease-out forwards; /* 1.2秒かけてふんわり表示 */
}

/* 3. 各セクションが順番に表示されるようにズラす（遅延処理） */
.hero-container {
    animation-delay: 0.2s; /* ヒーローエリアはすぐ表示 */
}

.time-section .container {
    animation-delay: 0.5s; /* 診療時間は少し遅れて */
}

.calendar .container {
    animation-delay: 0.8s; /* カレンダーはさらに遅れて */
}

.access .container {
    animation-delay: 1.1s; /* アクセスは最後に */
}