/* ============================================================
   HAKU Column - Static Article CSS
   Design: matches haku-t.com (Noto Sans JP, #0284c7, #0c4a6e)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;500;600;700;800&display=swap');

/* ── Reset & Base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: 'Noto Sans JP', 'Hiragino Sans', 'Yu Gothic', sans-serif;
  color: #0f172a;
  background: #fff;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

a { color: #0284c7; text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; height: auto; }

/* ── Layout ───────────────────────────────────────────────── */
.l-container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Header ───────────────────────────────────────────────── */
.l-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 9999;
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  height: 72px;
}

.l-header__inner {
  display: flex;
  align-items: center;
  gap: 0;
  height: 72px;
  padding: 0 24px;
  max-width: 1200px;
  margin: 0 auto;
}

.l-header__logo {
  flex-shrink: 0;
  margin-right: auto;
}

.l-header__logo img {
  height: 44px;
  width: auto;
  display: block;
}

.l-header__gnav .c-gnav,
.l-header__gnav ul {
  display: flex;
  gap: 0;
  list-style: none;
  margin: 0; padding: 0;
}

.l-header__gnav .c-gnav li a,
.l-header__gnav ul li a {
  display: block;
  padding: 0 16px;
  height: 72px;
  line-height: 72px;
  font-size: 14px;
  font-weight: 500;
  color: #334155;
  white-space: nowrap;
  transition: color .2s;
}

.l-header__gnav .c-gnav li a .ttl { pointer-events: none; }

.l-header__gnav .c-gnav li a:hover,
.l-header__gnav ul li a:hover {
  color: #0284c7;
  text-decoration: none;
}

.w-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: 16px;
}

.header-tel img {
  height: 40px;
  width: auto;
}

.header-contact-btn {
  display: inline-flex;
  align-items: center;
  background: #0284c7;
  color: #fff !important;
  font-size: 13px;
  font-weight: 700;
  padding: 10px 18px;
  border-radius: 6px;
  white-space: nowrap;
  transition: background .2s;
}

.header-contact-btn:hover {
  background: #0369a1;
  text-decoration: none !important;
}

.l-header__menuBtn {
  display: none;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  padding: 8px;
  margin-left: 12px;
  color: #334155;
}

/* ── Mobile nav (is-open dropdown) ───────────────────────── */
/* When hamburger is clicked, .l-header gets .is-open class   */
@media (max-width: 768px) {
  .l-header.is-open .l-header__gnav {
    display: block;
    position: fixed;
    top: 52px; left: 0; right: 0;
    background: #fff;
    z-index: 9998;
    border-top: 1px solid #e5e7eb;
    box-shadow: 0 4px 12px rgba(0,0,0,.08);
  }

  .l-header.is-open .l-header__gnav .c-gnav,
  .l-header.is-open .l-header__gnav ul {
    flex-direction: column;
  }

  .l-header.is-open .l-header__gnav .c-gnav li a,
  .l-header.is-open .l-header__gnav ul li a {
    height: auto;
    line-height: 1.5;
    padding: 14px 24px;
    font-size: 15px;
    border-bottom: 1px solid #f1f5f9;
  }

  /* Add お問い合わせ link at bottom of mobile nav */
  .l-header.is-open .l-header__gnav::after {
    content: '';
    display: block;
  }
}

/* ── Page Hero (breadcrumb area) ──────────────────────────── */
.page-hero {
  background: linear-gradient(135deg, #0c4a6e 0%, #075985 100%);
  padding: 40px 0 32px;
  margin-top: 72px;
}

.page-hero__inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  margin-bottom: 20px;
  flex-wrap: wrap;
  list-style: none;
  padding: 0;
  margin-left: 0;
}

.breadcrumb a { color: #fff; font-weight: 600; text-shadow: 0 1px 3px rgba(0,0,0,.4); }
.breadcrumb a:hover { color: #bae6fd; text-decoration: none; }
.breadcrumb span { color: rgba(255,255,255,.85); text-shadow: 0 1px 2px rgba(0,0,0,.3); }
.breadcrumb .current { color: #fff; font-weight: 600; text-shadow: 0 1px 3px rgba(0,0,0,.4); }

.page-hero__category {
  display: inline-block;
  background: rgba(255,255,255,.15);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 4px;
  margin-bottom: 12px;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.page-hero__title {
  font-size: clamp(18px, 2vw, 26px);
  font-weight: 800;
  color: #fff;
  line-height: 1.45;
  margin-bottom: 16px;
}

@media (max-width: 768px) {
  .page-hero__title {
    font-size: 15px;
    white-space: normal;
  }
}

.page-hero__meta {
  display: flex;
  gap: 16px;
  font-size: 13px;
  font-weight: 500;
  color: rgba(255,255,255,.9);
}

.page-hero__meta span { display: flex; align-items: center; gap: 4px; }

/* ── Main Layout ──────────────────────────────────────────── */
.l-main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 48px 24px 80px;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 48px;
  align-items: start;
}

/* ── Article Body ─────────────────────────────────────────── */
.article-body {
  min-width: 0;
}

/* eyecatch image */
.article-eyecatch {
  margin-bottom: 32px;
  border-radius: 10px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: #e2e8f0;
}

.article-eyecatch img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* author intro */
.article-author-intro {
  font-size: 14px;
  color: #475569;
  font-weight: 500;
  margin-bottom: 28px;
  padding: 14px 18px;
  background: #f8fafc;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
}

.article-author-intro a {
  color: #0284c7;
  font-weight: 700;
  text-decoration: underline;
}

/* lead text */
.article-lead {
  font-size: 16px;
  line-height: 1.9;
  color: #334155;
  background: #f8fafc;
  border-left: 4px solid #0284c7;
  padding: 20px 24px;
  border-radius: 0 8px 8px 0;
  margin-bottom: 40px;
}

/* headings */
.article-body h2 {
  font-size: clamp(18px, 2.5vw, 22px);
  font-weight: 800;
  color: #0f172a;
  border-left: 5px solid #0284c7;
  padding: 10px 0 10px 16px;
  margin: 48px 0 20px;
  line-height: 1.4;
  background: #f8fafc;
  border-radius: 0 6px 6px 0;
}

.article-body h2:first-child { margin-top: 0; }

.article-body h3 {
  font-size: clamp(16px, 2vw, 18px);
  font-weight: 700;
  color: #0f172a;
  margin: 36px 0 14px;
  padding-bottom: 8px;
  border-bottom: 2px solid #e2e8f0;
  line-height: 1.4;
}

.article-body h3::before {
  content: '▍';
  color: #0284c7;
  margin-right: 6px;
  font-size: .9em;
}

.article-body h4 {
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
  margin: 28px 0 10px;
  line-height: 1.4;
}

.article-body h5 {
  font-size: 15px;
  font-weight: 600;
  color: #334155;
  margin: 24px 0 8px;
}

/* paragraphs */
.article-body p {
  font-size: 15px;
  line-height: 1.9;
  color: #334155;
  margin-bottom: 16px;
}

/* lists */
.article-body ul, .article-body ol {
  padding-left: 1.5em;
  margin-bottom: 16px;
}

.article-body li {
  font-size: 15px;
  line-height: 1.9;
  color: #334155;
  margin-bottom: 6px;
}

.article-body li ul, .article-body li ol {
  margin-top: 6px;
  margin-bottom: 0;
}

/* article image — 全記事画像を4:3に統一 */
.article-body figure.article-img {
  margin: 24px 0 32px;
  overflow: hidden;
  border-radius: 8px;
  aspect-ratio: 4 / 3;
  background: #e2e8f0;
}

.article-body figure.article-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.article-body figure.article-img figcaption {
  font-size: 12px;
  color: #64748b;
  text-align: center;
  margin-top: 8px;
  line-height: 1.6;
}
.article-body figure.article-img.article-img--wide {
  aspect-ratio: auto;
}
.article-body figure.article-img.article-img--wide img {
  height: auto;
  object-fit: unset;
}

/* tables */
.article-body figure { margin: 24px 0; overflow-x: auto; }
.article-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.article-body table th {
  background: #0c4a6e;
  color: #fff;
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  white-space: nowrap;
}

.article-body table td {
  padding: 12px 16px;
  border-bottom: 1px solid #e2e8f0;
  vertical-align: top;
}

.article-body table tr:nth-child(even) td { background: #f8fafc; }

/* hr */
.article-body hr {
  border: none;
  border-top: 1px solid #e2e8f0;
  margin: 32px 0;
}

/* strong */
.article-body strong { color: #0f172a; font-weight: 700; }

/* internal links */
.article-body a.internal-link {
  display: block;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 6px;
  padding: 12px 16px;
  margin: 16px 0;
  font-size: 14px;
  font-weight: 500;
  color: #0284c7;
}

/* video embeds */
.video-embed {
  position: relative;
  padding-top: 56.25%;
  margin: 24px 0;
  border-radius: 8px;
  overflow: hidden;
  background: #000;
}

.video-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* related articles box */
.article-body .related-articles {
  background: #f0f7ff;
  padding: 16px 20px;
  border-left: 4px solid #0284c7;
  margin: 32px 0;
  border-radius: 0 6px 6px 0;
}

.article-body .related-articles p { font-weight: 700; margin: 0 0 10px; font-size: 15px; color: #0f172a; }
.article-body .related-articles ul { margin: 0; padding-left: 20px; line-height: 2; }
.article-body .related-articles li { font-size: 14px; margin: 0; }

/* ── CTA Box ──────────────────────────────────────────────── */
.cta-box {
  background: linear-gradient(135deg, #0c4a6e 0%, #075985 100%);
  border-radius: 12px;
  padding: 32px 28px;
  margin: 40px 0;
  text-align: center;
}

.cta-box .cta-box__title {
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 8px;
}

.cta-box .cta-box__sub {
  font-size: 13px;
  color: rgba(255,255,255,.8);
  margin-bottom: 20px;
  line-height: 1.7;
}

.cta-box__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  color: #0c4a6e;
  font-size: 16px;
  font-weight: 800;
  padding: 16px 40px;
  border-radius: 80px;
  transition: opacity .2s;
  text-decoration: none !important;
}

.cta-box__btn:hover { opacity: .9; }

/* ── FAQ Section ──────────────────────────────────────────── */
.faq-section {
  margin: 48px 0;
}

.faq-section h2 {
  font-size: clamp(18px, 2.5vw, 22px);
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 24px;
}

.faq-item {
  margin-bottom: 16px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  overflow: hidden;
}

.faq-item__q {
  background: #f8fafc;
  padding: 16px 20px;
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  -webkit-user-select: none;
  user-select: none;
}

.faq-item__q::after {
  content: '▼';
  font-size: 11px;
  color: #0284c7;
  flex-shrink: 0;
  transition: transform .2s;
}

.faq-item.is-open .faq-item__q::after { transform: rotate(180deg); }

.faq-item__a {
  display: none;
  padding: 16px 20px;
  font-size: 14px;
  line-height: 1.8;
  color: #334155;
  background: #fff;
  border-top: 1px solid #e2e8f0;
}

.faq-item.is-open .faq-item__a { display: block; }

/* ── Sidebar ──────────────────────────────────────────────── */
.l-sidebar {
  position: sticky;
  top: 88px;
}

/* TOC */
.toc-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 24px;
}

.toc-box__title {
  font-size: 13px;
  font-weight: 700;
  color: #0c4a6e;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid #0284c7;
}

.toc-box ol {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: toc;
}

.toc-box ol li {
  counter-increment: toc;
  margin-bottom: 8px;
  font-size: 13px;
  line-height: 1.5;
}

.toc-box ol li::before {
  content: counter(toc) '.';
  color: #0284c7;
  font-weight: 700;
  margin-right: 6px;
  font-size: 12px;
}

.toc-box ol li a {
  color: #334155;
  text-decoration: none;
}

.toc-box ol li a:hover { color: #0284c7; }

/* ── Sidebar Article Widgets ──────────────────────────────── */
.sidebar-widget {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0;
  margin-bottom: 20px;
  overflow: hidden;
}

.sidebar-widget__title {
  background: #0c4a6e;
  color: #fff;
  font-size: .85rem;
  font-weight: 700;
  padding: 8px 14px;
  letter-spacing: .05em;
}

.sidebar-article-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-article-item {
  border-bottom: 1px solid #f1f5f9;
}
.sidebar-article-item:last-child { border-bottom: none; }

.sidebar-article-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  color: #0f172a;
  text-decoration: none;
  transition: background .15s;
}
.sidebar-article-link:hover {
  background: #f0f9ff;
  text-decoration: none;
}

.sidebar-article-rank {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  background: #0284c7;
  color: #fff;
  font-size: .65rem;
  font-weight: 700;
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sidebar-article-list--popular .sidebar-article-item:nth-child(1) .sidebar-article-rank { background: #d4a017; }
.sidebar-article-list--popular .sidebar-article-item:nth-child(2) .sidebar-article-rank { background: #94a3b8; }
.sidebar-article-list--popular .sidebar-article-item:nth-child(3) .sidebar-article-rank { background: #b87333; }

.sidebar-article-thumb {
  flex-shrink: 0;
  width: 64px;
  height: 40px;
  border-radius: 3px;
  overflow: hidden;
  margin: 0;
}
.sidebar-article-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.sidebar-article-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.sidebar-article-title {
  font-size: .72rem;
  line-height: 1.4;
  color: #1e3a5f;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.sidebar-article-date {
  font-size: .65rem;
  color: #94a3b8;
}

/* Sidebar CTA */
.sidebar-cta {
  background: linear-gradient(160deg, #0c4a6e 0%, #075985 100%);
  border-radius: 10px;
  padding: 20px;
  text-align: center;
}

.sidebar-cta__title {
  font-size: 14px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 8px;
  line-height: 1.5;
}

.sidebar-cta__sub {
  font-size: 12px;
  font-weight: 500;
  color: rgba(255,255,255,.85);
  line-height: 1.7;
  margin-bottom: 14px;
}

.sidebar-cta__btn {
  display: block;
  background: #fff;
  color: #0c4a6e;
  font-size: 13px;
  font-weight: 800;
  padding: 12px;
  border-radius: 6px;
  text-decoration: none !important;
  transition: opacity .2s;
}

.sidebar-cta__btn:hover { opacity: .9; }

/* ── Footer ── 本番サイト(haku-t.com)と完全一致 ────────────── */
.l-footer { background: #0c4a6e; }

.l-footer__nav { padding: 48px 0 32px; }

.l-footer__nav .l-container {
  max-width: 1220px;
  margin: 0 auto;
  padding: 0 32px;
}

.footer-nav-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-bottom: 32px;
}

.footer-nav-head {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  letter-spacing: .06em;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255,255,255,.2);
}

.l-footer ul { list-style: none; padding: 0; }
.l-footer ul li { margin-bottom: 8px; }
.l-footer ul li a {
  font-size: 13px;
  font-weight: 500;
  color: rgba(255,255,255,.85);
  text-decoration: none;
}
.l-footer ul li a:hover { color: #fff; }

.footer-nav-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,.1);
}

.footer-nav-bottom a {
  font-size: 12px;
  font-weight: 500;
  color: rgba(255,255,255,.7);
  text-decoration: none;
}

.footer-nav-bottom a:hover { color: #fff; }

.l-footer__foot {
  background: rgba(0,0,0,.15);
  padding: 16px 0;
}

.l-footer__foot .l-container {
  max-width: 1220px;
  margin: 0 auto;
  padding: 0 32px;
  text-align: center;
}

.l-footer .copyright {
  font-size: 12px;
  color: rgba(255,255,255,.7);
  letter-spacing: .04em;
}

@media (max-width: 900px) {
  .footer-nav-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .footer-nav-grid { grid-template-columns: 1fr !important; gap: 20px; }
  .l-footer__nav .l-container { padding: 0 16px !important; }
}

/* ── Column Top ───────────────────────────────────────────── */
.col-hero {
  background: linear-gradient(135deg, #0c4a6e 0%, #075985 100%);
  padding: 40px 0 36px;
  margin-top: 72px;
}
.col-hero__inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}
.col-hero__label {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .2em;
  color: rgba(255,255,255,.7);
  text-transform: uppercase;
  margin-bottom: 8px;
}
.col-hero__title {
  font-size: clamp(22px, 2.5vw, 32px);
  font-weight: 800;
  color: #fff;
  line-height: 1.3;
  margin-bottom: 8px;
  text-shadow: 0 1px 3px rgba(0,0,0,.3);
}
.col-hero__sub {
  font-size: 14px;
  color: rgba(255,255,255,.85);
  margin: 0;
  text-shadow: 0 1px 2px rgba(0,0,0,.2);
}

.col-articles {
  min-width: 0;
}

.col-cat-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
}
.col-cat-btn {
  display: inline-block;
  padding: 6px 14px;
  border: 1.5px solid #0369a1;
  border-radius: 20px;
  font-size: 13px;
  color: #0369a1;
  text-decoration: none;
  font-weight: 600;
  transition: background .15s, color .15s;
}
.col-cat-btn:hover,
.col-cat-btn.is-active {
  background: #0369a1;
  color: #fff;
}

.col-card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.col-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  overflow: hidden;
  transition: box-shadow .2s, transform .2s;
}
.col-card:hover {
  box-shadow: 0 6px 24px rgba(0,0,0,.1);
  transform: translateY(-2px);
}
.col-card__link {
  display: flex;
  flex-direction: column;
  height: 100%;
  text-decoration: none;
  color: inherit;
}
.col-card__thumb {
  margin: 0;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: #f1f5f9;
}
.col-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s;
}
.col-card:hover .col-card__thumb img {
  transform: scale(1.03);
}
.col-card__body {
  padding: 16px 18px 18px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.col-card__cat {
  display: inline-block;
  background: #e0f2fe;
  color: #0369a1;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 4px;
  margin-bottom: 8px;
  letter-spacing: .04em;
}
.col-card__title {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.5;
  color: #1e293b;
  margin: 0 0 8px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.col-card__excerpt {
  font-size: 13px;
  color: #64748b;
  line-height: 1.65;
  margin: 0 0 12px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}
.col-card__meta {
  display: flex;
  gap: 12px;
  font-size: 12px;
  color: #94a3b8;
  margin-top: auto;
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 960px) {
  .l-main {
    display: flex;
    flex-direction: column;
    padding: 32px 16px 60px;
  }

  /* Sidebar moves above article on mobile, but only TOC is shown */
  .l-sidebar {
    order: -1;
    position: static;
  }

  /* Hide non-TOC sidebar widgets on mobile */
  .sidebar-widget,
  .sidebar-cta {
    display: none;
  }

  .toc-box { display: block; }
}

@media (max-width: 768px) {
  .l-header { height: 52px; }
  .l-header__inner { height: 52px; padding: 0 16px; }
  .l-header__logo img { height: 32px; }
  .l-header__gnav { display: none; }
  .w-header .header-tel { display: none; }
  .l-header__menuBtn { display: block; }

  .page-hero { padding: 28px 0 24px; margin-top: 52px; }
  .page-hero__title { font-size: 18px; }

  .col-hero { padding: 28px 0 24px; margin-top: 52px; }
  .col-hero__title { font-size: 22px; }
  .col-card-grid { grid-template-columns: 1fr; }

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

  .cta-box { padding: 24px 20px; }
  .cta-box__btn { font-size: 15px; padding: 14px 28px; }
}
