/* =====================================================
   JRMA Common Stylesheet  (/assets/css/jrma.css)
   - Top page & Sub pages shared CSS
   - Mobile-first, minimal, accessible
   ===================================================== */

:root {
  --bg: #ffffff;
  --text: #111827;
  --primary: #0ea5e9; /* brand main */
  --accent: #f59e0b;  /* highlight */
  --muted: #f3f4f6;   /* light gray */
  --border: #e5e7eb;  /* border gray */
}

/* Base ------------------------------------------------ */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--text); line-height: 1.8; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", YuGothic, Meiryo, sans-serif; }
img { max-width: 100%; height: auto; border-radius: 12px; }
a { color: inherit; }
.container { max-width: 1100px; margin: 0 auto; padding: 24px; }
.visually-hidden { position: absolute; clip: rect(0 0 0 0); clip-path: inset(50%); width: 1px; height: 1px; overflow: hidden; white-space: nowrap; }
a[href^="tel"] { white-space: nowrap; }

/* Header / Nav --------------------------------------- */
.header { position: sticky; top: 0; background: rgba(255,255,255,.95); backdrop-filter: blur(6px); border-bottom: 1px solid var(--border); z-index: 50; }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; position: relative; }
.logo a { text-decoration: none; font-weight: 800; letter-spacing: .02em; }
.menu { display: none; flex-direction: column; gap: 6px; position: absolute; right: 0; top: 56px; background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 10px; width: min(90vw, 320px); box-shadow: 0 8px 20px rgba(0,0,0,.08); }
.menu.open { display: flex; }
.menu a { text-decoration: none; padding: 8px 12px; border-radius: 999px; }
.cta-btn { background: var(--primary); color: #fff; padding: 10px 16px; border-radius: 999px; text-decoration: none; }
.hamburger { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--border); background: #fff; }
/* Logo size: SP 24px / PC 30px */
.logo img { height: 24px; width: auto; display: block; border-radius: 0; }
@media (min-width: 1024px) {
  .logo img { height: 30px; }
}
@media (min-width: 768px) {
  .hamburger { display: none; }
  .menu { position: static; display: flex !important; flex-direction: row; background: transparent; border: none; border-radius: 0; box-shadow: none; padding: 0; width: auto; }
}

/* Sections & utilities -------------------------------- */
.section { padding: 56px 0; }
.section h2 { font-size: clamp(22px, 3vw, 32px); margin: 0 0 16px; }
.section.is-muted { background: #f8fafc; }
.section.is-muted-2 { background: var(--muted); }
.lead { font-size: 1.1rem; color: #374151; }
.badge { display: inline-block; background: var(--accent); color: #fff; border-radius: 8px; padding: 2px 8px; font-size: 12px; margin-bottom: 8px; }
#main.subpage .content > header.section { padding-top:0; padding-bottom:0; }

/* Grid helpers ---------------------------------------- */
.grid { display: grid; gap: 20px; }
@media (min-width: 768px) { .grid-2 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: repeat(3, 1fr); } }

/* Cards / Buttons / Lists ----------------------------- */
.card { background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 20px; box-shadow: 0 2px 6px rgba(0,0,0,.04); }
.btn { display: inline-block; background: var(--primary); color: #fff; padding: 12px 18px; border-radius: 10px; text-decoration: none; }
.btn.small { padding: 8px 12px; font-size: .95rem; }
.btn.secondary { background: #111827; }
ul.check { list-style: none; padding: 0; margin: 0; }
ul.check li { position: relative; padding-left: 28px; margin: 8px 0; }
ul.check li::before { content: "✓"; position: absolute; left: 0; top: 2px; color: #059669; }

/* Hero ------------------------------------------------- */
.hero { position: relative; padding: 64px 0; background: linear-gradient(180deg, var(--muted), #fff 60%); }
.hero h1 { font-size: clamp(28px, 4vw, 44px); margin: 0 0 12px; line-height: 1.25; }
.hero.bg-cover { background: none; background-image: var(--hero-bg); background-size: cover; background-position: center; background-repeat: no-repeat; }
.hero .container { position: relative; z-index: 1; }
@media (max-width: 640px){ .hero.bg-cover{ --hero-bg: url('../img/head-sp.jpg'); } }

/* Top page: white text on hero */
.hero.bg-cover h1,
.hero.bg-cover .lead,
.hero.bg-cover p { color: #fff; }
/* Dotted overlay (opt-in with .is-dotted) */
.hero.bg-cover.is-dotted { position: relative; }
.hero.bg-cover.is-dotted::before {
content: ""; position: absolute; inset: 0; pointer-events: none;
background-image: radial-gradient(var(--hero-dot-color, rgba(0,0,0,.15)) var(--hero-dot-size, 1px), transparent var(--hero-dot-size, 1px));
background-size: var(--hero-dot-gap, 6px) var(--hero-dot-gap, 6px);
}
/* Light dots variant */
.hero.bg-cover.is-dotted.dots-light::before {
background-image: radial-gradient(rgba(255,255,255,.35) var(--hero-dot-size, 1px), transparent var(--hero-dot-size, 1px));
}

#about .about-thumb { margin: 10px 0 12px; border-radius: 12px; overflow: hidden; aspect-ratio: 16 / 9; background: #f3f4f6; }
#about .about-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-width:640px) { #about .about-thumb { margin: 8px 0 10px; } }

/* Pricing --------------------------------------------- */
.pricing .plan { text-align: center; }
.price { font-size: 32px; font-weight: 800; }

/* FAQ (details/summary) ------------------------------- */
.faq details { border: 1px solid var(--border); border-radius: 12px; padding: 12px 16px; background: #fff; }
.faq details + details { margin-top: 10px; }
.faq summary { font-weight: 600; cursor: pointer; }

/* Tables (generic) ------------------------------------ */
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { border: 1px solid var(--border); padding: 10px; text-align: left; }
.table th { background: #f9fafb; }

/* Breadcrumb */
.breadcrumb { font-size: .9rem; color: #6b7280; margin: 8px 0 16px; }
.breadcrumb ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.breadcrumb li + li::before { content: "/"; margin-right: 8px; color: #9ca3af; }

/* Subpage 2-column layout */
.layout { display: grid; gap: 24px; grid-template-columns: 1fr; }
@media (min-width: 1024px) { .layout { grid-template-columns: 1fr 300px; } }
.content [id] { scroll-margin-top: 88px; }
.content h1 { font-size: clamp(24px, 3.5vw, 36px); line-height: 1.3; margin: 0 0 8px; }
.prose p { margin: 0 0 14px; }
.prose h2 { font-size: clamp(20px, 2.6vw, 28px); margin: 18px 0 8px; }
.callout { border-left: 4px solid var(--accent); background: #fff8e6; padding: 12px 14px; border-radius: 12px; }
.sidebar { display: flex; flex-direction: column; gap: 16px; }
@media (min-width: 1024px) { .sidebar { position: sticky; top: 80px; height: fit-content; } }
.sidemenu h3 { margin: 0 0 8px; font-size: 1rem; }
.sidemenu ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.sidemenu a { text-decoration: none; padding: 8px 10px; border-radius: 8px; }
.sidemenu a:hover { background: #f3f4f6; }

/* Subpage 右カラムの行間・余白を少し詰める */
#course-basic .grid.grid-2 > :nth-child(2) { line-height: 1.6; }
#course-basic .grid.grid-2 > :nth-child(2) h3 { margin: 8px 0 4px; }
#course-basic .grid.grid-2 > :nth-child(2) p { margin: 2px 0 8px; line-height: 1.5; }
#course-basic .grid.grid-2 > :nth-child(2) .check li { margin: 4px 0; line-height: 1.5; }
/* facility-profile: photos x2 on top, details below. Responsive & accessible */
#facility-profile .profile-card { border: 2px solid #e5e7eb; background:#fff; }
#facility-profile .photo-grid { display:grid; gap:12px; grid-template-columns:1fr; margin: 6px 0 14px; }
#facility-profile .photo-grid img { width:100%; height:auto; aspect-ratio: 4 / 3; object-fit: cover; display:block; }
@media(min-width:768px){ #facility-profile .photo-grid { grid-template-columns: 1fr 1fr; } }
#facility-profile .profile-list { margin: 0; padding: 0; }
#facility-profile .profile-list .row { display:grid; grid-template-columns: 160px 1fr; gap:16px; padding:10px 0; border-bottom:1px dotted #e5e7eb; }
#facility-profile .profile-list .row:last-child { border-bottom:none; }
#facility-profile .profile-list dt { margin:0; font-weight:700; color:#374151; }
#facility-profile .profile-list dd { margin:0; }
@media(max-width:640px){ #facility-profile .profile-list .row { grid-template-columns: 1fr; } }

/* Subpage お問い合わせフォーム専用CSS  */
#inquiry-form .card { background:#fff; border:none; box-shadow:none; padding:0; }
#inquiry-form form { display:block; }
/* すべて1列（PC/スマホ共通） */
#inquiry-form .pairs { display:grid; grid-template-columns:1fr; gap:14px; }
@media (min-width:640px) { #inquiry-form .pairs { grid-template-columns:1fr; } }
/* 各項目ブロック */
#inquiry-form .field { display:block; background:#f8fafc; border:1px solid var(--border); border-radius:12px; padding:12px; }
#inquiry-form .field + .field { margin-top:14px; }
/* ラベル */
#inquiry-form label { display:block; font-weight:700; margin:0 0 6px; color:#374151; }
/* 入力UI */
#inquiry-form input, #inquiry-form select, #inquiry-form textarea { width:100%; padding:12px; border:1px solid var(--border); border-radius:10px; font:inherit; background:#fff; }
#inquiry-form input:focus, #inquiry-form select:focus, #inquiry-form textarea:focus { outline:2px solid rgba(14,165,233,.25); border-color:#0ea5e9; }
#inquiry-form textarea { resize:vertical; min-height:140px; }
/* 同意チェック */
#inquiry-form .agree { display:flex; align-items:flex-start; gap:8px; background:#fff; border:1px dashed var(--border); border-radius:12px; padding:12px; margin-top:12px; }
#inquiry-form .agree input { width:auto; margin-top:4px; }
/* 補助テキスト・ボタン周り */
#inquiry-form .help { color:#6b7280; font-size:.9rem; }
#inquiry-form .actions { margin-top:16px; }

/* ==== News list ==== */
.news-list { list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:8px; }
.news-item { border:1px solid var(--border); background:#fff; border-radius:12px; }
.news-link { display:grid; grid-template-columns:110px 1fr; gap:12px; padding:12px 14px; align-items:baseline; text-decoration:none; }
.news-link:hover { background:#f9fafb; }
.news-date { font-size:.9rem; color:#6b7280; white-space:nowrap; }
.news-title { line-height:1.6; }
.news-title .badge { margin-left:8px; }
.news-actions { margin-top:12px; }

/* モバイルは日付→タイトルの縦並び */
@media (max-width:640px) {
  .news-link { grid-template-columns: 1fr; }
  .news-date { order:-1; margin-bottom:2px; }
}

/* ---------- News list 過去記事一覧 ---------- */
.news-archive { list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:8px; }
.news-archive-item { border:1px solid var(--border); background:#fff; border-radius:12px; }
.news-archive-link { display:grid; grid-template-columns:110px 1fr; gap:12px; padding:12px 14px; align-items:baseline; text-decoration:none; }
.news-archive-link:hover { background:#f9fafb; }
.news-date { font-size:.9rem; color:#6b7280; white-space:nowrap; }
.news-title { line-height:1.6; }
@media (max-width:640px){ .news-archive-link{ grid-template-columns:1fr; } .news-date{ order:-1; margin-bottom:2px; } }
.pagination { display:flex; justify-content:center; }
.pagination ul.page-numbers { display:flex; gap:8px; list-style:none; margin:16px 0 0; padding:0; }
.pagination .page-numbers a, .pagination .page-numbers span { display:inline-block; padding:8px 12px; border:1px solid var(--border); border-radius:8px; text-decoration:none; }
.pagination .page-numbers .current { background: var(--primary); color:#fff; border-color: transparent; }


/* ==== Blog post (left main) ==== */
.post { overflow: hidden; }
.post-header { margin: 0 0 12px; }
.post-title { margin: 0 0 4px; font-size: clamp(22px, 3.2vw, 32px); line-height: 1.3; }
.post-meta { margin: 0; color: #6b7280; font-size: .9rem; }
#blog-post .post { background:none; border:none; box-shadow:none; padding:0; border-radius:0; }
#blog-post.section { padding:0; }
/* 本文 */
.post-body { padding: 56px 0; }
.post-body p { margin: 0 0 14px; }
.post-body ul, .post-body ol { margin: 0 0 14px 20px; }
/* 画像 */
.post-figure { margin: 16px auto 18px; text-align: center; }
.post-figure img { max-width: 100%; height: auto; display: inline-block; }
.post-figure figcaption { font-size: .9rem; color: #6b7280; margin-top: 6px; }
/* 小見出しデコ（3種） */
.h-deco { scroll-margin-top: 88px; } /* 固定ヘッダー対策 */
.h-line { border-left: 6px solid var(--primary); padding-left: 12px; background: linear-gradient(90deg, rgba(14,165,233,.08), transparent 60%); border-radius: 8px; }
.h-underline { position: relative; padding-bottom: 6px; }
.h-underline::after { content:""; position:absolute; left:0; right:0; bottom:0; height:4px; border-radius: 4px; background: linear-gradient(90deg, var(--primary), rgba(14,165,233,.3)); }
.h-tag { display:inline-block; padding: 6px 12px; border-radius: 999px; background: var(--muted); font-weight: 700; }
/* 差し込み囲み枠（3種） */
.box { border-radius: 12px; padding: 12px 14px; margin: 14px 0; border: 1px solid var(--border); background: #fff; }
.box.info { border-left: 4px solid var(--primary); background: linear-gradient(180deg, rgba(14,165,233,.06), #fff); }
.box.point { border-left: 4px solid var(--accent); background: linear-gradient(180deg, rgba(245,158,11,.08), #fff); }
.box.caution { border-left: 4px solid #ef4444; background: linear-gradient(180deg, rgba(239,68,68,.08), #fff); }
/* レスポンシブ余白微調整 */
@media (max-width: 640px) {
  .post-title { font-size: clamp(20px, 6vw, 28px); }
  .post-figure { margin: 12px auto 14px; }
}

/* Legal (特商法) -------------------------------------- */
.legal table { width: 100%; border-collapse: collapse; background: #fff; }
.legal th, .legal td { border: 1px solid var(--border); padding: 12px; vertical-align: top; }
/* PC: first column narrower */
.legal tr > *:first-child { width: clamp(140px, 22%, 220px); white-space: nowrap; }
.legal th { background: #f9fafb; text-align: left; }
@media (max-width: 640px) {
  .legal table, .legal thead, .legal tbody, .legal th, .legal td, .legal tr { display: block; }
  .legal thead { display: none; }
  .legal tr { border: 1px solid var(--border); border-radius: 12px; padding: 8px; margin-bottom: 10px; background: #fff; }
  .legal td { border: none; border-bottom: 1px solid var(--border); padding: 10px 12px; position: relative; }
  .legal td:last-child { border-bottom: none; }
  .legal td::before { content: attr(data-label); font-weight: 700; display: block; margin-bottom: 4px; color: #374151; }
  .legal tr > *:first-child { width: auto; white-space: normal; }
}

/* Footer ---------------------------------------------- */
.footer { background: #0f172a; color: #cbd5e1; }
.footer a { color: #cbd5e1; }
.footer small { display: block; opacity: .8; }
