/* 横浜浅間町内科クリニック — サイト全体のスタイル（ビルド不要の素の CSS） */

:root {
    --color-main: #007a96;      /* 旧サイトのテーマ色（濃いほう）。白文字でも読める濃さ */
    --color-main-light: #00a7ce;
    --color-main-pale: #e8f6fa;
    --color-text: #222;
    --color-sub: #555;
    --color-line: #dde3e6;
    --color-bg: #fff;
    --color-bg-soft: #f6f8f9;
    --color-alert: #b3261e;
    --color-alert-pale: #fdf0ef;
    --radius: 8px;
    --max: 1040px;
    --narrow: 760px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    color: var(--color-text);
    background: var(--color-bg);
    font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Noto Sans JP", Meiryo, sans-serif;
    font-size: 16px;
    line-height: 1.85;
    letter-spacing: 0.02em;
}

a { color: var(--color-main); }
a:hover { color: var(--color-main-light); }
img, iframe { max-width: 100%; }
h1, h2, h3 { line-height: 1.5; }
p { margin: 0 0 1em; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 16px; }
.narrow { max-width: var(--narrow); }

.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 8px; top: 8px; z-index: 100; background: #fff; padding: 8px 12px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- ボタン ---------- */

.button {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 999px;
    background: var(--color-main);
    color: #fff;
    font-weight: bold;
    text-decoration: none;
    text-align: center;
    line-height: 1.5;
}
.button:hover { background: #00627a; color: #fff; }
.button-small { padding: 6px 16px; font-size: 14px; }
.button-large { display: block; width: 100%; max-width: 480px; margin: 0 auto; padding: 16px 24px; font-size: 17px; }

/* ---------- ヘッダー ---------- */

/* スクロールしても上に残る。スマホではロゴ・web予約・メニューだけ */
.site-header {
    position: sticky;
    top: 0;
    z-index: 60;
    background: rgba(255, 255, 255, 0.97);
    border-bottom: 1px solid var(--color-line);
    box-shadow: 0 2px 12px rgba(0, 60, 80, 0.06);
}
.header-inner { display: flex; align-items: center; gap: 10px; min-height: 60px; padding-top: 8px; padding-bottom: 8px; }

.logo { display: flex; align-items: center; gap: 10px; margin-right: auto; min-width: 0; color: var(--color-text); text-decoration: none; }
.logo:hover { color: var(--color-text); }
.logo-mark { flex-shrink: 0; width: 36px; height: 36px; color: var(--color-main); }
.logo-text { display: block; min-width: 0; }
.logo-name { display: block; font-size: 16px; font-weight: bold; line-height: 1.35; letter-spacing: 0.04em; white-space: nowrap; }
.logo-sub { display: block; font-size: 11px; color: var(--color-sub); line-height: 1.5; letter-spacing: 0.06em; }
.logo-place { display: none; }

/* スマホでは画面下に予約ボタンが常に出るので、ヘッダーの予約ボタンはパソコン幅から出す */
.header-reserve {
    display: none;
    flex-shrink: 0;
    padding: 7px 14px;
    border-radius: 999px;
    background: var(--color-main);
    color: #fff;
    font-size: 13px;
    font-weight: bold;
    text-decoration: none;
    line-height: 1.4;
}
.header-reserve:hover { background: #00627a; color: #fff; }

.global-nav { display: none; }

/* スマホのメニュー */
.drawer > summary {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    width: 44px;
    padding: 4px 0;
    list-style: none;
    cursor: pointer;
    color: var(--color-main);
}
.drawer > summary::-webkit-details-marker { display: none; }
.drawer-icon { position: relative; display: block; width: 22px; height: 16px; }
.drawer-icon span { position: absolute; left: 0; width: 100%; height: 2px; border-radius: 2px; background: currentColor; transition: transform 0.2s, opacity 0.2s; }
.drawer-icon span:nth-child(1) { top: 0; }
.drawer-icon span:nth-child(2) { top: 7px; }
.drawer-icon span:nth-child(3) { top: 14px; }
.drawer[open] .drawer-icon span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.drawer[open] .drawer-icon span:nth-child(2) { opacity: 0; }
.drawer[open] .drawer-icon span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.drawer-label { font-size: 10px; font-weight: bold; letter-spacing: 0.05em; }

.drawer-panel {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    max-height: calc(100vh - 60px);
    overflow-y: auto;
    padding: 8px 16px 24px;
    background: #fff;
    border-top: 1px solid var(--color-line);
    box-shadow: 0 12px 24px rgba(0, 40, 60, 0.12);
}
.drawer-panel ul { margin: 0 0 16px; padding: 0; list-style: none; }
.drawer-panel li { border-bottom: 1px solid var(--color-line); }
.drawer-panel li a { position: relative; display: block; padding: 14px 24px 14px 4px; color: var(--color-text); text-decoration: none; font-weight: bold; }
.drawer-panel li a::after { content: ""; position: absolute; right: 8px; top: 50%; width: 8px; height: 8px; border-top: 2px solid var(--color-main); border-right: 2px solid var(--color-main); transform: translateY(-50%) rotate(45deg); }
.drawer-panel li a[aria-current="page"] { color: var(--color-main); }

/* ---------- トップ ---------- */

/* 写真の上に文字を載せる部分。文字が読めるよう写真を暗くしてから重ねる */
.hero, .page-header {
    position: relative;
    background-color: #1d3a47;
    background-size: cover;
    background-position: center;
    color: #fff;
}
.hero::before, .page-header::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(rgba(0, 30, 45, 0.35), rgba(0, 30, 45, 0.55));
}
.hero > *, .page-header > * { position: relative; }

/* トップの写真（昼のみなとみらいのパノラマ）。
   スマホでは写真全体（3:2）が入る大きさにして、文字はランドマークタワーにかからないよう下の水面側に置く。 */
.hero {
    display: flex;
    align-items: flex-end;
    aspect-ratio: 3 / 2;
    padding: 0 0 16px;
    background-image: url('../images/hero-minatomirai-1200.webp');  /* スマホ用（約100KB） */
    background-position: 50% 55%;
    text-align: center;
}
.hero::before { background: linear-gradient(rgba(0, 30, 50, 0) 45%, rgba(0, 30, 50, 0.7)); }
.hero-catch { margin: 0; font-size: 13px; letter-spacing: 0.1em; }
.hero-title { margin: 0 0 2px; font-size: 24px; text-shadow: 0 1px 8px rgba(0, 0, 0, 0.5); }
.hero-sub { margin: 0; font-size: 13px; }

.page-header { padding: 40px 0; }
.page-header h1 { margin: 0; font-size: 24px; text-shadow: 0 1px 6px rgba(0, 0, 0, 0.35); }


/* ---------- 予約の案内 ---------- */

.reserve-box {
    margin: 20px 0 32px;
    padding: 24px 20px;
    border: 2px solid var(--color-main);
    border-radius: var(--radius);
    background: #fff;
    text-align: center;
}
.reserve-box-label {
    display: inline-block;
    margin: 0 0 8px;
    padding: 2px 12px;
    border-radius: 4px;
    background: var(--color-main);
    color: #fff;
    font-size: 14px;
    font-weight: bold;
}
.reserve-box-lead { font-size: 18px; margin-bottom: 4px; }
.reserve-box-note { color: var(--color-alert); font-size: 15px; }
.reserve-box-small { margin: 8px 0 0; color: var(--color-sub); font-size: 13px; }

/* 臨時休診など、トップの一番上に出すお知らせの帯 */
.closed-banner { position: relative; display: flex; align-items: center; gap: 12px; margin: 20px 0 0; padding: 14px 40px 14px 16px; border-radius: var(--radius); background: var(--color-alert); color: #fff; text-decoration: none; box-shadow: 0 4px 14px rgba(179, 38, 30, 0.25); }
.closed-banner:hover { background: #961f19; color: #fff; }
.closed-banner::after { content: ""; position: absolute; right: 16px; top: 50%; width: 9px; height: 9px; border-top: 2px solid #fff; border-right: 2px solid #fff; transform: translateY(-50%) rotate(45deg); }
.closed-banner-label { flex-shrink: 0; padding: 2px 10px; border-radius: 4px; background: #fff; color: var(--color-alert); font-size: 13px; font-weight: bold; }
.closed-banner-title { font-weight: bold; line-height: 1.5; }
.closed-banner + .closed-banner { margin-top: 8px; }

/* 精神科・心療内科の診療をしていないことの案内 */
.psych-notice { margin: 16px 0; padding: 14px 16px; border: 2px solid var(--color-alert); border-radius: var(--radius); background: var(--color-alert-pale); text-align: left; }
.psych-notice-title { margin: 0 0 6px; color: var(--color-alert); font-size: 17px; font-weight: bold; }
.psych-notice-title::before { content: "！"; display: inline-block; margin-right: 6px; width: 1.4em; height: 1.4em; border-radius: 50%; background: var(--color-alert); color: #fff; text-align: center; line-height: 1.4; font-size: 14px; vertical-align: 2px; }
.psych-notice p:last-child { margin-bottom: 0; }
.psych-notice-compact { margin-top: 20px; font-size: 14px; line-height: 1.7; }
.psych-notice-compact .psych-notice-title { font-size: 14px; letter-spacing: 0; }

/* ---------- セクション共通 ---------- */

.section { margin: 40px 0; }
.section-title { margin: 0 0 16px; padding-left: 12px; border-left: 4px solid var(--color-main); font-size: 20px; }
.lead { font-size: 17px; }
.note { color: var(--color-sub); font-size: 14px; }
.alert { padding: 12px 16px; border-radius: var(--radius); background: var(--color-alert-pale); color: var(--color-alert); font-weight: bold; }
.more { text-align: right; }
.more a::after { content: " →"; }
.breadcrumb { margin: 16px 0 0; font-size: 13px; color: var(--color-sub); }
.signature { text-align: right; }

.plain-list { margin: 0 0 1em; padding-left: 1.4em; }
.plain-list li { margin-bottom: 6px; }

.link-list { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 0; padding: 0; list-style: none; }
.link-list a[aria-current="page"] { font-weight: bold; color: var(--color-text); text-decoration: none; }

.tag-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 1em; padding: 0; list-style: none; }
.tag-list li { padding: 4px 12px; border-radius: 999px; background: var(--color-bg-soft); border: 1px solid var(--color-line); font-size: 14px; }

/* お知らせ */
.news-list { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--color-line); }
.news-list li { border-bottom: 1px solid var(--color-line); }
.news-list a { position: relative; display: block; padding: 14px 28px 14px 0; color: var(--color-text); text-decoration: none; }
.news-list a::after { content: ""; position: absolute; right: 8px; top: 50%; width: 8px; height: 8px; border-top: 2px solid var(--color-main); border-right: 2px solid var(--color-main); transform: translateY(-50%) rotate(45deg); }
.news-list a:hover .news-list-title { color: var(--color-main); text-decoration: underline; }
.news-list-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 2px; }
.news-list time { color: var(--color-sub); font-size: 13px; }
.news-list-title { display: block; font-weight: bold; line-height: 1.6; }

.news-label { display: inline-block; padding: 0 8px; border-radius: 4px; background: var(--color-main-pale); color: var(--color-main); font-size: 12px; font-weight: bold; line-height: 1.8; }
.news-label-closed { background: var(--color-alert-pale); color: var(--color-alert); }

/* お知らせの詳しいページ */
.page-header-title { margin: 0; font-size: 24px; font-weight: bold; text-shadow: 0 1px 6px rgba(0, 0, 0, 0.35); }
.news-article { margin: 28px 0 32px; padding: 24px 20px 28px; border: 1px solid var(--color-line); border-radius: var(--radius); background: #fff; box-shadow: 0 4px 16px rgba(0, 60, 80, 0.06); }
.news-article-header { margin-bottom: 20px; padding-bottom: 16px; border-bottom: 2px solid var(--color-main-pale); }
.news-article-meta { display: flex; align-items: center; gap: 10px; margin: 0 0 8px; }
.news-article-meta time { color: var(--color-sub); font-size: 14px; }
.news-article-title { margin: 0; font-size: 21px; line-height: 1.55; }
.news-article-body { font-size: 16px; line-height: 2; }
.news-article-body p:last-child { margin-bottom: 0; }

.news-pager { display: grid; gap: 10px; margin: 0 0 28px; }
.news-pager a { display: block; padding: 12px 16px; border: 1px solid var(--color-line); border-radius: var(--radius); color: var(--color-text); text-decoration: none; }
.news-pager a:hover { border-color: var(--color-main); }
.news-pager-dir { display: block; color: var(--color-main); font-size: 12px; font-weight: bold; }
.news-pager-older .news-pager-dir::before { content: "← "; }
.news-pager-newer { text-align: right; }
.news-pager-newer .news-pager-dir::after { content: " →"; }
.news-pager-title { display: block; font-size: 14px; }
.news-back { text-align: center; }
.button-outline { background: #fff; color: var(--color-main); border: 2px solid var(--color-main); }
.button-outline:hover { background: var(--color-main-pale); color: var(--color-main); }

/* 診療案内のカード */
.card-list { display: grid; gap: 12px; margin: 16px 0; padding: 0; list-style: none; }
.card { display: block; height: 100%; padding: 0 0 16px; overflow: hidden; border: 1px solid var(--color-line); border-radius: var(--radius); text-decoration: none; color: var(--color-text); }
.card-image { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; margin-bottom: 12px; }
.card-title, .card-text { padding: 0 16px; }
.service-image { display: block; width: 100%; height: auto; margin: 16px 0 0; border-radius: var(--radius); }
.card:hover { border-color: var(--color-main); color: var(--color-text); }
.card-title { display: block; color: var(--color-main); font-weight: bold; font-size: 17px; }
.card-text { display: block; font-size: 14px; color: var(--color-sub); }

/* 診療時間の表 */
.schedule { width: 100%; margin: 0 0 12px; border-collapse: collapse; text-align: center; font-size: 15px; }
.schedule caption { text-align: left; font-weight: bold; margin-bottom: 4px; }
.section .schedule caption { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.schedule th, .schedule td { padding: 8px 2px; border: 1px solid var(--color-line); }
.schedule thead th { background: var(--color-bg-soft); font-weight: normal; }
.schedule tbody th { font-weight: normal; white-space: nowrap; padding: 8px 6px; }
.schedule .open { color: var(--color-main); }
.schedule .closed { color: #999; font-size: 13px; }
.schedule-compact { font-size: 13px; }

/* アクセス */
.access-list { margin: 0 0 1em; }
.access-list div { display: flex; gap: 12px; padding: 6px 0; border-bottom: 1px dashed var(--color-line); }
.access-list dt { min-width: 12.5em; color: var(--color-sub); }
.access-list dd { margin: 0; font-weight: bold; }
.map { position: relative; padding-top: 75%; margin: 16px 0 8px; }
.map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* web予約：できること・できないこと */
.can-cannot { display: grid; gap: 16px; margin: 16px 0; }
.can-cannot > div { padding: 16px 20px; border-radius: var(--radius); }
.can-cannot h3 { margin: 0 0 8px; font-size: 17px; }
.can-cannot ul { margin: 0; padding: 0; list-style: none; }
.can-cannot li { position: relative; padding: 4px 0 4px 1.6em; }
.cannot { background: var(--color-alert-pale); border: 1px solid #f1c8c4; }
.cannot h3 { color: var(--color-alert); }
.cannot li::before { content: "×"; position: absolute; left: 0; color: var(--color-alert); font-weight: bold; }
.can { background: var(--color-main-pale); border: 1px solid #bfe3ec; }
.can h3 { color: var(--color-main); }
.can li::before { content: "○"; position: absolute; left: 0; color: var(--color-main); font-weight: bold; }

.reserve-final { padding: 24px 20px; border: 2px solid var(--color-main); border-radius: var(--radius); text-align: center; }
.reserve-final .section-title { text-align: left; }
.reserve-final .note { margin-top: 16px; text-align: left; }

/* よくある質問 */
.faq-item { border-bottom: 1px solid var(--color-line); }
.faq-item:first-child { border-top: 1px solid var(--color-line); }
.faq-item summary { position: relative; padding: 16px 32px 16px 2em; cursor: pointer; font-weight: bold; list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::before { content: "Q"; position: absolute; left: 0; color: var(--color-main); }
.faq-item summary::after { content: "＋"; position: absolute; right: 4px; color: var(--color-sub); }
.faq-item[open] summary::after { content: "－"; }
.faq-answer { padding: 0 0 8px 2em; }

/* ごあいさつ */
.profile dt { font-weight: bold; color: var(--color-main); }
.profile dd { margin: 0 0 12px; }

/* 掲示事項 */
.notices h2 { margin: 28px 0 8px; font-size: 17px; padding-bottom: 4px; border-bottom: 1px solid var(--color-line); }
.notices section > h2:first-child { margin-top: 0; }
.price-table { width: 100%; margin: 0 0 1em; border-collapse: collapse; }
.price-table th, .price-table td { padding: 8px 12px; border: 1px solid var(--color-line); text-align: left; }
.price-table th { background: var(--color-bg-soft); font-weight: normal; }
.price-table td { white-space: nowrap; }

/* ---------- フッター ---------- */

.site-footer { margin-top: 56px; padding-bottom: 76px; background: #0b4b5b; color: #e3f1f4; font-size: 14px; }
.site-footer a { color: #fff; }
.site-footer a:hover { color: #9fe0ee; }

/* 予約の案内（フッターの一番上） */
.footer-cta { padding: 36px 0 32px; background: linear-gradient(135deg, var(--color-main), #00566b); text-align: center; }
.footer-cta-label { display: inline-block; margin: 0 0 8px; padding: 2px 12px; border: 1px solid rgba(255, 255, 255, 0.7); border-radius: 4px; font-size: 13px; font-weight: bold; letter-spacing: 0.1em; }
.footer-cta-title { margin: 0 0 4px; color: #fff; font-size: 20px; font-weight: bold; }
.footer-cta-text { margin: 0 0 20px; font-size: 14px; }
.button-light { background: #fff; color: var(--color-main); }
.site-footer .button-light { color: var(--color-main); }
.button-light:hover, .site-footer .button-light:hover { background: var(--color-main-pale); color: var(--color-main); }

.footer-main { display: grid; gap: 32px; padding-top: 36px; padding-bottom: 28px; }
.logo-footer { margin-bottom: 16px; }
.logo-footer .logo-mark { color: #fff; }
.logo-footer .logo-mark path { stroke: var(--color-main); }
.logo-footer .logo-mark path:first-of-type { fill: var(--color-main); }
.logo-footer .logo-name { color: #fff; font-size: 17px; }
.logo-footer .logo-sub { color: #a9cdd6; }
.footer-address { margin-bottom: 8px; }
.footer-access { margin: 0 0 12px; padding: 0; list-style: none; color: #c4e0e6; font-size: 13px; }
.footer-map::after { content: " →"; }
.footer-small { color: #a9cdd6; font-size: 13px; }

/* フッターの診療時間の表（濃い背景用） */
.site-footer .schedule { margin-bottom: 10px; background: rgba(255, 255, 255, 0.04); }
.site-footer .schedule caption { color: #fff; font-size: 15px; margin-bottom: 8px; }
.site-footer .schedule th, .site-footer .schedule td { border-color: rgba(255, 255, 255, 0.18); }
.site-footer .schedule thead th { background: rgba(255, 255, 255, 0.08); color: #fff; }
.site-footer .schedule .open { color: #7fd8ec; }
.site-footer .schedule .closed { color: #86aab3; }

.footer-links { padding-top: 8px; padding-bottom: 24px; }
.footer-links ul { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; margin: 0; padding: 0; list-style: none; border-top: 1px solid rgba(255, 255, 255, 0.15); }
.footer-links li { border-bottom: 1px solid rgba(255, 255, 255, 0.1); }
.footer-links li a { display: block; padding: 12px 0 12px 14px; position: relative; text-decoration: none; font-size: 13px; }
.footer-links li a::before { content: ""; position: absolute; left: 0; top: 50%; width: 6px; height: 6px; border-top: 1.5px solid #7fd8ec; border-right: 1.5px solid #7fd8ec; transform: translateY(-50%) rotate(45deg); }
.footer-links-wide { grid-column: 1 / -1; }

.footer-bottom { padding: 14px 0; background: #083b47; color: #86aab3; font-size: 12px; text-align: center; }
.footer-bottom p { margin: 0; }

/* スマホ下部の予約ボタン */
.mobile-reserve { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; padding: 10px 16px; background: rgba(255, 255, 255, 0.96); border-top: 1px solid var(--color-line); }
.mobile-reserve .button { display: block; }

/* ---------- 画面が広いとき ---------- */

@media (min-width: 720px) {
    .logo-name { font-size: 20px; }
    .logo-mark { width: 42px; height: 42px; }
    .logo-place { display: inline; }
    .header-inner { min-height: 76px; }
    .header-reserve { display: inline-block; padding: 10px 22px; font-size: 14px; }
    /* パソコンでは横長に（幅の約4割、画面の高さの65%まで）。予約の案内の頭が最初の画面に入るように低めにし、
       ランドマークタワーの先の上に少しだけ空が残る位置（上から45%）で切り取る。写真は大きいほう（約270KB） */
    .hero {
        aspect-ratio: auto;
        height: min(42vw, 65vh);
        min-height: 360px;
        padding-bottom: 40px;
        background-image: url('../images/hero-minatomirai-2000.webp');
        background-position: 50% 45%;
    }
    .hero-catch { font-size: 15px; }
    .hero-title { font-size: 40px; }
    .hero-sub { font-size: 15px; }
    .page-header { padding: 72px 0; }
    .page-header h1, .page-header-title { font-size: 28px; }
    .news-article { padding: 36px 40px 40px; }
    .news-article-title { font-size: 25px; }
    .news-pager { grid-template-columns: 1fr 1fr; }
    .card-list { grid-template-columns: repeat(2, 1fr); }
    .can-cannot { grid-template-columns: 3fr 2fr; }
    .footer-main { grid-template-columns: 1fr 1fr; gap: 48px; padding-top: 48px; }
    .footer-links ul { grid-template-columns: repeat(4, 1fr); }
    .footer-links-wide { grid-column: span 2; }
    .footer-cta { padding: 48px 0 44px; }
    .footer-cta-title { font-size: 24px; }
    .mobile-reserve { display: none; }
    .site-footer { padding-bottom: 0; }
}

/* パソコン：メニューをヘッダーに並べ、「メニュー」ボタンは隠す */
@media (min-width: 1000px) {
    .site-header .container { max-width: 1240px; }
    .global-nav { display: block; }
    .global-nav ul { display: flex; gap: 2px; margin: 0; padding: 0; list-style: none; }
    .global-nav a { display: block; padding: 8px 10px; border-radius: 6px; color: var(--color-text); font-size: 14px; font-weight: bold; text-decoration: none; white-space: nowrap; }
    .global-nav a:hover { background: var(--color-main-pale); color: var(--color-main); }
    .global-nav a[aria-current="page"] { color: var(--color-main); background: var(--color-main-pale); }
    .drawer { display: none; }
    .logo-place { display: none; }
}
@media (min-width: 1240px) {
    .logo-place { display: inline; }
}
