/* ============================================================
   三豊・観音寺市医師会サイト共通スタイル
   トップページ(index.html)と同じデザインを、下層ページ用に
   外部CSSとして切り出したもの。
   ============================================================ */
:root {
  --coral: #dd6b32;
  --teal: oklch(50% 0.09 195);
  --teal-tint: oklch(94% 0.025 195);
  --coral-tint: oklch(95% 0.04 40);
  --alert: oklch(52% 0.16 25);
  --bg: oklch(98% 0.012 75);
  --bg-soft: oklch(96% 0.018 75);
  --surface: #ffffff;
  --text: oklch(26% 0.02 75);
  --text-soft: oklch(48% 0.02 75);
  --border: oklch(90% 0.014 75);
  --container-w: 1200px;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: 'Noto Sans JP', system-ui, sans-serif; color: var(--text); background: var(--bg); }
img { max-width: 100%; display: block; }
a { color: var(--teal); text-decoration: none; }
a:hover { color: var(--coral); }
h1, h2, h3, p { margin: 0; }
.container { max-width: var(--container-w); margin: 0 auto; padding: 0 24px; }
.btn { transition: transform .15s ease, box-shadow .15s ease; }
.btn:hover { transform: translateY(-2px); }
.btn-primary:hover, .btn.primary:hover { color: #fff; }

/* ---- Utility bar ---- */
.utility-bar { background: var(--bg-soft); border-bottom: 1px solid var(--border); }
.utility-bar .container { display: flex; align-items: center; justify-content: flex-end; gap: 28px; padding-top: 9px; padding-bottom: 9px; overflow-x: auto; }
.utility-bar a { display: flex; align-items: center; gap: 6px; color: var(--text-soft); font-size: 12.5px; font-weight: 500; white-space: nowrap; flex-shrink: 0; }
.utility-bar a.alert { color: var(--alert); font-weight: 700; }

/* ---- Header ---- */
header.site-header { background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 20; }
header.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 88px; }
.logo { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }
.logo-text { display: flex; flex-direction: column; line-height: 1.25; }
.logo-text .org-type { font-size: 10.5px; color: var(--text-soft); letter-spacing: .04em; margin-bottom: 1px; }
.logo-text .org-name { font-family: 'M PLUS Rounded 1c', sans-serif; font-weight: 700; font-size: 19px; letter-spacing: .02em; }
.logo-text .org-name-en { font-size: 11px; color: var(--text-soft); letter-spacing: .06em; }
.logo-text .org-name, .logo-text .org-type, .logo-text .org-name-en { white-space: nowrap; }

nav.main-nav { display: flex; align-items: center; gap: 30px; font-size: 15px; font-weight: 500; flex-shrink: 0; }
nav.main-nav a { color: var(--text); white-space: nowrap; }
nav.main-nav a.active { color: var(--coral); font-weight: 700; }

.header-actions { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.btn-login { display: flex; align-items: center; gap: 6px; padding: 10px 18px; border: 1.5px solid var(--border); border-radius: 999px; font-size: 14px; font-weight: 700; color: var(--text); white-space: nowrap; }
.btn-primary { padding: 10px 22px; background: var(--coral); color: #fff; border-radius: 999px; font-size: 14px; font-weight: 700; box-shadow: 0 8px 18px -8px var(--coral); white-space: nowrap; }

.nav-toggle-checkbox { display: none; }
.nav-toggle-label { display: none; cursor: pointer; padding: 8px; }

/* ---- Page hero (下層ページ用の簡易タイトルバー) ---- */
.page-hero { background: linear-gradient(100deg, oklch(34% 0.06 195) 0%, oklch(40% 0.07 195) 100%); padding: 40px 0; }
.page-hero .breadcrumb { font-size: 13px; color: rgba(255,255,255,0.75); margin-bottom: 10px; }
.page-hero .breadcrumb a { color: rgba(255,255,255,0.85); }
.page-hero .breadcrumb a:hover { color: #fff; }
.page-hero h1 { font-family: 'M PLUS Rounded 1c', sans-serif; font-weight: 700; font-size: 28px; color: #fff; }

/* ---- Sub navigation (医師会について内の4ページ切り替え) ---- */
.subnav { background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 88px; z-index: 10; }
.subnav .container { display: flex; gap: 8px; overflow-x: auto; }
.subnav a { padding: 16px 18px; font-size: 14.5px; font-weight: 600; color: var(--text-soft); white-space: nowrap; border-bottom: 3px solid transparent; }
.subnav a:hover { color: var(--coral); }
.subnav a.active { color: var(--coral); border-bottom-color: var(--coral); }

/* ---- Page content / prose ---- */
.page-content { padding: 56px 0 80px; }
.page-content .inner { max-width: 780px; }
.prose p { font-size: 15.5px; line-height: 2; color: var(--text-soft); margin-bottom: 22px; }
.prose h2 { font-family: 'M PLUS Rounded 1c', sans-serif; font-size: 21px; font-weight: 700; color: var(--text); margin: 40px 0 18px; padding-left: 14px; border-left: 4px solid var(--coral); }
.prose h2:first-child { margin-top: 0; }
.prose strong { color: var(--text); }
.prose .signature { text-align: right; font-size: 15.5px; color: var(--text-soft); margin-top: 8px; }
.prose ul.history-list { list-style: none; padding: 0; margin: 0 0 22px; }
.prose ul.history-list li { font-size: 14.5px; color: var(--text-soft); line-height: 2; padding-left: 18px; position: relative; }
.prose ul.history-list li::before { content: ""; position: absolute; left: 0; top: 12px; width: 6px; height: 6px; border-radius: 50%; background: var(--teal); }

.info-note { background: var(--coral-tint); border: 1px solid oklch(88% 0.05 40); border-radius: 12px; padding: 14px 18px; font-size: 13.5px; color: oklch(40% 0.09 40); margin: 28px 0; line-height: 1.8; }

/* ---- Officers table (役員一覧) ---- */
.officer-table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; overflow: hidden; margin-bottom: 10px; }
.officer-table tr { border-bottom: 1px solid var(--border); }
.officer-table tr:last-child { border-bottom: none; }
.officer-table th { text-align: left; background: var(--bg-soft); font-size: 13.5px; font-weight: 700; color: var(--text); padding: 16px 20px; width: 140px; vertical-align: top; white-space: nowrap; }
.officer-table td { padding: 16px 20px; font-size: 14.5px; color: var(--text-soft); line-height: 1.9; }
.officer-names { list-style: none; margin: 0; padding: 0; }
.officer-names li { white-space: nowrap; }
.officer-asof { text-align: right; font-size: 12.5px; color: var(--text-soft); margin-bottom: 30px; }

/* ---- PDF list (決算公告 / 予防接種情報) ---- */
.pdf-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; overflow: hidden; }
.pdf-list li { border-bottom: 1px solid var(--border); }
.pdf-list li:last-child { border-bottom: none; }
.pdf-list a { display: flex; align-items: center; gap: 12px; padding: 16px 20px; font-size: 15px; color: var(--text); }
.pdf-list a:hover { background: var(--bg-soft); color: var(--coral); }
.pdf-list svg { flex-shrink: 0; }
.pdf-list .pdf-soon { display: flex; align-items: center; gap: 12px; padding: 16px 20px; font-size: 15px; color: var(--text-soft); }
.pdf-list .pdf-date { margin-left: auto; font-size: 12.5px; color: var(--text-soft); white-space: nowrap; flex-shrink: 0; }

/* ---- Link grid (健康情報トップなど、下層メニューへのカード一覧) ---- */
.link-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; margin-bottom: 10px; }
.link-grid .card { display: flex; flex-direction: column; gap: 10px; padding: 26px; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; transition: transform .15s ease, box-shadow .15s ease; }
.link-grid .card:hover { transform: translateY(-3px); box-shadow: 0 12px 28px -14px rgba(60,40,20,0.28); }
.link-grid .card-icon { width: 42px; height: 42px; border-radius: 12px; background: var(--teal-tint); display: flex; align-items: center; justify-content: center; }
.link-grid .card-title { font-family: 'M PLUS Rounded 1c', sans-serif; font-weight: 700; font-size: 16.5px; color: var(--text); }
.link-grid .card-desc { font-size: 13px; color: var(--text-soft); line-height: 1.7; }

/* ---- Article list (学校医部会・一口メモなど、日付つき記事一覧) ---- */
.article-list { list-style: none; padding: 0; margin: 0 0 16px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; overflow: hidden; }
.article-list li { display: flex; align-items: baseline; gap: 16px; padding: 14px 20px; border-bottom: 1px solid var(--border); font-size: 14px; color: var(--text-soft); line-height: 1.7; }
.article-list li:last-child { border-bottom: none; }
.article-list .a-title { flex: 1; color: var(--text); }
.article-list .a-date { flex-shrink: 0; font-size: 12.5px; color: var(--text-soft); white-space: nowrap; }

/* ---- Footer ---- */
footer.site-footer { background: oklch(24% 0.02 75); color: oklch(88% 0.01 75); padding: 52px 0 32px; }
.footer-top { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 36px; border-bottom: 1px solid oklch(38% 0.02 75); }
.footer-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.footer-brand span { font-family: 'M PLUS Rounded 1c', sans-serif; font-weight: 700; font-size: 16px; color: #fff; }
.footer-address { font-size: 13px; line-height: 1.9; color: oklch(70% 0.01 75); }
.footer-col-title { font-weight: 700; font-size: 13px; color: #fff; margin-bottom: 14px; }
.footer-links { display: flex; flex-direction: column; gap: 10px; font-size: 13px; color: oklch(72% 0.01 75); }
.footer-links a { color: inherit; }
.footer-bottom { padding-top: 22px; font-size: 12px; color: oklch(60% 0.01 75); }

/* =========================================================
   Responsive breakpoints
   ========================================================= */
@media (max-width: 1320px) {
  header.site-header .container { height: 72px; }
  .logo-text .org-name-en { display: none; }
  nav.main-nav { gap: 22px; }
  .subnav { top: 72px; }

  .header-actions .btn-login span.label-text { display: none; }
  .btn-login { padding: 10px; }

@media (max-width: 1040px) {
  nav.main-nav {
    position: absolute;
    top: 72px; left: 0; right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height .2s ease;
    z-index: 30;
  }
  nav.main-nav a { padding: 14px 18px; width: 100%; border-bottom: 1px solid var(--border); }
  .nav-toggle-checkbox:checked ~ nav.main-nav { max-height: 320px; overflow-y: auto; }
  .nav-toggle-label { display: flex; align-items: center; justify-content: center; }
}
}

@media (max-width: 900px) {
  .footer-top { grid-template-columns: 1fr 1fr; }
  .officer-table th { width: 110px; }
}

@media (max-width: 640px) {
  .container { padding: 0 18px; }
  .utility-bar .container { justify-content: flex-start; gap: 18px; }
  header.site-header .container { height: 68px; }
  .logo-text .org-name { font-size: 16px; }
  .subnav { top: 68px; }

  nav.main-nav { top: 68px; }

  .btn-primary { padding: 10px 14px; font-size: 12.5px; }

  .page-hero { padding: 26px 0; }
  .page-hero h1 { font-size: 21px; }

  .officer-table, .officer-table tbody, .officer-table tr, .officer-table th, .officer-table td { display: block; width: 100%; }
  .officer-table tr { padding: 14px 20px; }
  .officer-table th { padding: 0 0 6px; }
  .officer-table td { padding: 0; }

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

  .article-list li { flex-direction: column; gap: 4px; }
  .pdf-list a { flex-wrap: wrap; }
  .pdf-list .pdf-date { margin-left: 0; }
}

/* ---- 旧サイトから移植したページ用 ---- */
.page-content .inner.wide { max-width: 1100px; }
.old-content { font-size: 15px; line-height: 1.9; color: var(--text-soft); }
.old-content h3 { font-family: 'M PLUS Rounded 1c', sans-serif; font-size: 17px; font-weight: 700; color: var(--text); margin: 28px 0 12px; }
.old-content ul, .old-content ol { padding-left: 1.4em; margin: 0 0 22px; }
.old-content li { margin-bottom: 6px; }
.old-content img { height: auto; margin: 16px 0; border-radius: 10px; }
.old-content a { text-decoration: underline; text-underline-offset: 3px; }
.table-wrap { overflow-x: auto; margin: 0 0 24px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }
.data-table { width: 100%; border-collapse: collapse; font-size: 13.5px; line-height: 1.7; }
.data-table td, .data-table th { border-bottom: 1px solid var(--border); border-right: 1px solid var(--border); padding: 10px 12px; color: var(--text); vertical-align: top; }
.data-table tr:first-child td, .data-table th { background: var(--bg-soft); font-weight: 700; }
.data-table tr:last-child td { border-bottom: none; }
.data-table td:last-child, .data-table th:last-child { border-right: none; }
ul.sitemap { list-style: none; padding-left: 0; }
ul.sitemap ul.sitemap { padding-left: 1.4em; margin: 6px 0 12px; border-left: 2px solid var(--teal-tint); }
ul.sitemap > li { margin-bottom: 8px; }
.old-content img { max-width: min(100%, 640px); }
.old-content p > img:first-child { float: left; max-width: 180px; margin: 6px 22px 12px 0; }
.old-content h2 { clear: both; }
@media (max-width: 640px) { .old-content p > img:first-child { float: none; max-width: 100%; margin: 0 0 14px; } }
