/* =======================
  /assets/css/custom.css（最終・整理版 / Bootstrap5）
  - ブレイクポイント統一：SP〜 → MD(768) → LG(992) → XL(1280)
  - SPメニュー：#globalNav を1つだけ使う（PC/SP共通）
  - 旧 .slide-contents nav は使用しない想定（残すなら別名に）
  - section背景は全幅、内容は920px中央固定
  - セクション余白を統一
  - 明朝系フォント
  - ボタン右上アイコン（DL/外部）
  - mainVisual 背景グラデ：0→10%で白、以降白
======================= */

@charset "utf-8";

/* Fonts */
@import url('https://cdn.jsdelivr.net/npm/yakuhanjp@3.3.1/dist/css/yakuhanjp.min.css');
@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+JP:wght@400;500;600;700;900&display=swap');

/* =======================
  Breakpoints (統一)
  SP: <768
  MD: >=768
  LG: >=992
  XL: >=1280
======================= */

/* =======================
  Variables
======================= */
:root {
  --wrap: 920px;

  --sec-pad-sp: 60px;
  --sec-pad-md: 70px;
  --sec-pad-lg: 80px;

  --inner-pad-sp: 35px 20px;
  --inner-pad-lg: 25px 0 45px;

  --header-h-sp: 62px;
  --header-h-lg: 80px;

  --anchor-offset-sp: 90px;
  --anchor-offset-lg: 95px;

  --bg-alt: #fafafa;

  --menu-w: min(80vw, 420px);
  --menu-bg: rgba(29, 29, 29, 0.94);
  --menu-accent: #b98fc7;
}

/* =======================
  Base
======================= */
html,
body {
  height: 100%;
}

body {
  font-family: YakuHanJP, 'Noto Serif JP', '游明朝', 'Yu Mincho', 'ヒラギノ明朝 ProN', 'Hiragino Mincho ProN', 'MS 明朝', serif;
  font-size: clamp(0.938rem, 0.906rem + 0.16vw, 1rem);
  color: #333;
  line-height: 1.9;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

a {
  color: #333;
  text-decoration: none;
}
a:hover {
  color: #333;
  text-decoration: none;
}

ul {
  list-style: none;
  padding: 0;
  margin: 0;
  line-height: 1.7;
}
ol {
  line-height: 1.7;
}
table {
  line-height: 1.6;
}

.indent-1 {
  padding-left: 1em;
  text-indent: -1em;
}

*:focus {
  outline: none !important;
  box-shadow: none !important;
}

/* clearfix (既存互換) */
.cf {
  zoom: 1;
}
.cf:before,
.cf:after {
  content: '';
  display: table;
}
.cf:after {
  clear: both;
}

/* =======================
  Header
======================= */
.site-header {
  background: #fff;
  height: var(--header-h-sp);
  position: sticky;
  top: 0;
  z-index: 1030;
  display: flex;
  align-items: center;
  gap: 10px;
}

#logo {
  margin: 0;
  padding-left: 10px;
}
#logo img {
  width: 100%;
  max-width: clamp(12.5rem, 8.224rem + 6.9vw, 16.5rem);
  height: auto;
  padding: 10px 0;
}

/* =======================
  SP Menu Toggle
======================= */
.menu-toggle {
  margin-left: auto;
  width: 62px;
  height: 62px;
  border: 0;
  background: #1d1d1d;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding-top: 5px;
  z-index: 9999;
}

.menu-toggle:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.7);
  outline-offset: 2px;
}

.menu-bars {
  position: relative;
  width: 32px;
  height: 18px;
  display: block;
}
.menu-bars span {
  position: absolute;
  left: 0;
  width: 32px;
  height: 2px;
  background: #fff;
  transition:
    transform 0.25s ease,
    top 0.25s ease,
    opacity 0.2s ease;
}
.menu-bars span:nth-child(1) {
  top: 0;
}
.menu-bars span:nth-child(2) {
  top: 8px;
}
.menu-bars span:nth-child(3) {
  top: 16px;
}

.menu-toggle.is-open .menu-bars span:nth-child(1) {
  top: 7px;
  transform: rotate(45deg);
}
.menu-toggle.is-open .menu-bars span:nth-child(2) {
  opacity: 0;
}
.menu-toggle.is-open .menu-bars span:nth-child(3) {
  top: 7px;
  transform: rotate(-45deg);
}

.menu-label {
  font-size: 10px;
  line-height: 1;
  letter-spacing: 0.1em;
}

/* =======================
  Global Nav (PC/SP共通1つ)
  SP: drawer / PC: inline
======================= */

/* SP drawer (default) */
#globalNav {
  position: fixed;
  top: 0;
  right: 0;
  width: var(--menu-w);
  height: 100vh;
  background: var(--menu-bg);
  transform: translateX(100%);
  transition: transform 0.28s ease;
  z-index: 1200;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

#globalNav.is-open {
  transform: translateX(0);
}

#globalNav ul {
  margin-top: 70px; /* トグルと被らない余白 */
}

#globalNav li {
  border-bottom: 1px solid rgba(255, 255, 255, 0.35);
  white-space: nowrap;
  font-size: clamp(0.875rem, 0.85rem + 0.13vw, 1rem);
}

#globalNav a {
  color: #fff;
  display: block;
  padding: 14px 16px;
}
#globalNav a:hover {
  background: var(--menu-accent);
}

/* SP backdrop (JSで .is-open と合わせて付ける想定) */
.nav-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 1100;
  display: none;
}
.nav-backdrop.is-open {
  display: block;
}

/* =======================
  MainVisual
======================= */
#mainVisual {
  text-align: center;
  /* background: linear-gradient(to right, #c5c5c5 0%, #ffffff 40%, #ffffff 100%); */
  background: linear-gradient(135deg, #c5c5c5 0%, #c5c5c5 40%, #ffffff 70%, #ffffff 100%);
}
#mainVisual img {
  width: 100%;
  height: auto;
  display: block;
}

#main {
  padding-top: var(--header-h-sp);
}

/* =======================
  Sections (spacing unified)
======================= */
#main > section {
  margin: 0;
  padding: var(--sec-pad-sp) 0;
  scroll-margin-top: var(--anchor-offset-sp);
}

/* 中身固定幅 */
.section-inner,
.content-area {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
}

.content-area {
  padding: var(--inner-pad-sp);
}
.content-area p.lead {
  font-size: clamp(0.938rem, 0.912rem + 0.13vw, 1.063rem);
  font-weight: 500;
  line-height: 1.65;
}

/* boder（元class名維持） */
.boder {
  border: 1px solid #e5e5e5;
  background: #fff;
  border-radius: 0.25rem;
}

/* section背景（全幅で付けるなら section に class を付与） */
.section-bg-alt {
  background: var(--bg-alt);
}

/* =======================
  Headings
======================= */
#main h2.ttl {
  font-size: clamp(1.5rem, 1.307rem + 0.96vw, 2.5rem);
  text-align: center;
  position: relative;
  margin-bottom: 35px;
}
#main h2.ttl::after {
  content: '';
  position: absolute;
  height: 15px;
  width: 15px;
  border-top: 1px solid #83b1cf;
  border-right: 1px solid #83b1cf;
  bottom: -20px;
  right: 50%;
  transform: translateX(50%) rotate(135deg);
}

.ls10 {
  letter-spacing: -0.19rem !important;
}
@media (min-width: 400px) {
  .ls10 {
    letter-spacing: initial !important;
  }
}

#greeting p {
  margin-bottom: 1rem;
  line-height: 2 !important;
}

.img-container {
  display: flex;
  justify-content: flex-end;
  align-items: flex-end;
  text-align: right;
}

.chaiman-img {
  width: clamp(11.25rem, 11rem + 1.25vw, 12.5rem);
  height: auto;
}

.chaiman li:last-child {
  font-size: 0.95em;
  color: #555;
}

.fs--1-05 {
  font-size: 1.1em;
}

/* =======================
  Outline dl
======================= */
#outline dl {
  margin: 0;
  padding: 0;
  width: 100%;
}
#outline dl dt {
  margin: 0;
  padding: 5px 0 0 5px;
  font-weight: 600;
  white-space: nowrap;
}
#outline dl dd {
  margin: 0 0 15px;
  padding: 3px 0 7px 5px;
  border-bottom: 1px solid #cccccc;
  box-sizing: border-box;
  line-height: 1.65;
}
#outline dl dd span {
  display: inline-block;
  margin-right: 0.5rem;
}

/* =======================
  endai
======================= */

/* デフォルト：上部に配置（重ならない） */
.pdt-image {
  display: block;
  margin: 0 auto 16px; /* 上・中央 */
  width: 100%;
  max-width: 380px;
  height: auto;
}

/* 画面が十分広い時だけ右に回す */
@media (min-width: 768px) {
  .pdt-image {
    float: right;
    margin: 0 0 10px 20px;
    width: clamp(15.625rem, 13.975rem + 8.25vw, 23.875rem) !important;
    max-width: none;
  }
}

.abstract-area {
  overflow: hidden; /* float対策 */
}

/* =======================
  Access
======================= */
#access iframe {
  width: 100%;
  min-height: 350px;
  border: 0;
}

/* =======================
  Contact
======================= */
#contact ul a {
  color: #007bff !important;
}

/* =======================
  Scroll to top
======================= */
.scroll-to-top {
  z-index: 9999;
  right: 1rem;
  bottom: 1rem;
  display: none;
}
.scroll-to-top a {
  width: 3.5rem;
  height: 3.5rem;
  background-color: rgba(33, 37, 41, 0.5);
  line-height: 3.1rem;
}

/* =======================
  Footer
======================= */
#copyright {
  margin: 20px 0 !important;
  text-align: center;
  font-size: 12px;
}

/* =======================
  Modal（Bootstrapのmodalを使うならそのまま）
======================= */
.modal {
  background-color: rgba(0, 0, 0, 0.8);
}
.btn_close {
  display: block;
  text-decoration: none;
  background: #000;
  color: #fff;
  text-align: center;
  padding: 20px 40px;
  width: 200px;
  margin: 0 auto;
  border: none !important;
  font-size: clamp(1rem, 0.975rem + 0.13vw, 1.125rem) !important;
  font-weight: bold;
}
.btn_close:hover {
  background: #ff0000;
  border: none !important;
}

/* =======================
  Icons (top-right)
======================= */
.ext-link-btn::after {
  content: '\f35d'; /* external-link-alt */
  font-family: 'Font Awesome 5 Free';
  font-weight: 900;
  position: absolute;
  top: 0.3rem;
  right: 0.5rem;
  font-size: 0.9rem;
  opacity: 0.9;
  pointer-events: none;
}
.download-btn::after {
  content: '\f019'; /* download */
  font-family: 'Font Awesome 5 Free';
  font-weight: 900;
  position: absolute;
  top: 0.3rem;
  right: 0.5rem;
  font-size: 0.95rem;
  opacity: 0.9;
  pointer-events: none;
}

/* =======================
  MD (>=768)
======================= */
@media (min-width: 768px) {
  .site-header {
    height: var(--header-h-lg);
  }

  #main > section {
    padding: var(--sec-pad-md) 0;
  }
}

/* =======================
  LG (>=992) PC表示
======================= */
@media (min-width: 992px) {
  /* drawer無効化→横並びメニュー */
  #globalNav {
    position: static;
    transform: none !important;
    width: auto;
    height: auto;
    background: transparent;
    overflow: visible;
  }

  #globalNav ul {
    margin-top: 0;
    margin-right: 25px;
    display: flex;
    gap: 1rem;
    align-items: center;
  }

  #globalNav li {
    border-bottom: none;
  }

  #globalNav a {
    color: #111;
    padding: 0;
    text-decoration: underline;
    background: transparent !important;
  }
  #globalNav a:hover {
    color: #c0385f;
    font-weight: 900;
  }

  .menu-toggle {
    display: none;
  }

  #main {
    padding-top: var(--header-h-lg);
  }

  #logo img {
    width: 100%;
    /* max-width: 264px; */
    height: auto;
    padding: 10px 0;
  }

  #mainVisual {
    background: linear-gradient(135deg, #c5c5c5 0%, #c5c5c5 30%, #ffffff 50%, #ffffff 100%);
  }

  #main > section {
    padding: var(--sec-pad-lg) 0;
    scroll-margin-top: var(--anchor-offset-lg);
  }

  .content-area {
    padding: var(--inner-pad-lg);
  }

  #mainVisual img {
    max-width: 1400px;
    height: auto;
    margin: 0 auto;
  }

  /* outline を2カラムっぽく */
  #outline dl {
    max-width: 700px;
    display: flex;
    flex-wrap: wrap;
  }
  #outline dl dt {
    width: calc(5rem + 30px);
    padding: 15px;
    border-bottom: 1px solid #000;
    text-align: justify;
    text-align-last: justify;
    text-justify: inter-ideograph;
  }
  #outline dl dd {
    width: calc(100% - 5rem - 30px);
    margin: 0;
    padding: 15px;
  }

  /* #endai .content-area{
    max-width: 700px;
  } */

  #contact .content-area {
    max-width: 500px;
  }
}

/* =======================
  XL (>=1280)
======================= */
@media (min-width: 1280px) {
  #logo {
    padding-left: 25px;
  }
  #logo img {
    width: auto;
    padding: 0;
  }

  #globalNav ul {
    gap: 1.2rem;
  }
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  transition: transform 0.3s ease;
}

.site-header.is-hidden {
  transform: translateY(-100%);
}

/* PCのみ有効（768px以上） */
@media (max-width: 767px) {
  .site-header {
    transform: translateY(0);
  }
}
