/* Top page (2026-11): layout modelled on the reference site (db-clinic.jp).
   Loaded on every page for the shared .go icon; everything else is scoped to .home. */

/* ---------- Unified link icon (every link / transition button) ---------- */
.go{display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;width:24px;height:24px;margin-left:14px;border:1px solid currentColor;border-radius:50%;opacity:.65;vertical-align:middle;transition:transform .25s,opacity .25s}
.go::after{content:"";width:5px;height:5px;border-top:1px solid currentColor;border-right:1px solid currentColor;transform:translateX(-1px) rotate(45deg)}
a:hover .go,a:focus-visible .go{opacity:1;transform:translateX(3px)}
.s-more{display:inline-flex;align-items:center;font-size:14px;letter-spacing:.08em;color:var(--brown);padding:8px 0;border-bottom:1px solid #cdbdac}

/* ---------- Common type ---------- */
.home .h-en{font:400 clamp(30px,3.4vw,46px)/1.2 "Cormorant Garamond",Georgia,"Times New Roman",serif;letter-spacing:.08em;color:var(--ink);margin:0 0 22px}
.home .h-catch{font-size:clamp(19px,1.7vw,24px);line-height:1.9;letter-spacing:.16em;margin-bottom:22px}
.home .h-lead{font-size:14px;line-height:2.2;letter-spacing:.06em;margin-bottom:34px}

/* ---------- Hero ---------- */
.home .n-hero{height:min(calc(100svh - 106px),820px);min-height:480px}
.home .n-hero-copy>p:first-child{margin-bottom:18px}

/* ---------- WELCOME (楢原産婦人科とは：ひとこと) ---------- */
.h-topics{max-width:760px;margin:0 auto;padding:88px 24px 80px;text-align:center;border-bottom:1px solid var(--line)}
.h-topics .h-en{margin-bottom:24px}
.h-topics-text{font-size:16px;line-height:2.2;letter-spacing:.1em;margin-bottom:26px}

/* ---------- Image + text sections ---------- */
.h-sec{padding:120px 0}
.h-inner{width:min(1160px,calc(100% - 112px));margin:0 auto;display:grid;grid-template-columns:minmax(0,1.3fr) minmax(0,1fr);gap:clamp(40px,6vw,96px);align-items:center}
.h-sec.is-reverse .h-imgs{order:2}
.h-imgs{position:relative;display:grid;grid-template-columns:1fr 1fr;gap:clamp(20px,3vw,44px);align-items:start}
.h-img{overflow:hidden;background:#eee6dc;aspect-ratio:3/4}
.h-img img{width:100%;height:100%;object-fit:cover}
.h-img-2{margin-top:clamp(60px,8vw,120px);aspect-ratio:4/5}
.h-sec.is-reverse .h-img-1{margin-top:clamp(60px,8vw,120px);aspect-ratio:4/5}
.h-sec.is-reverse .h-img-2{margin-top:0;aspect-ratio:3/4}
#concept .h-img-2 img{object-position:center 25%}
.h-links{list-style:none;margin:0;padding:0;border-top:1px solid #cdbdac}
.h-links li{border-bottom:1px solid #cdbdac}
.h-links a{display:flex;align-items:center;justify-content:space-between;padding:17px 6px;font-size:14px;letter-spacing:.1em}
.h-links a:hover{background:#faf6f1}

/* ---------- NEWS (左に写真、右に一覧) ---------- */
.home .n-news.h-news{display:grid;grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr);gap:clamp(40px,6vw,96px);align-items:center;padding:40px 0 100px;background:#fff}
.h-news-img{height:min(520px,42vw);overflow:hidden;background:#eee6dc}
.h-news-img img{width:100%;height:100%;object-fit:cover}
.h-news-body{padding-right:max(56px,calc((100vw - 1160px)/2))}
.h-news-body .news-list{border-top:0}
.home .news-item summary{padding:20px 6px 20px 0}

/* ---------- 院内写真（自動で流れる） ---------- */
.h-loop{overflow:hidden;padding:0 0 110px}
.h-loop-track{display:flex;gap:24px;width:max-content;list-style:none;margin:0;padding:0;animation:h-loop 60s linear infinite}
.h-loop-track li{width:clamp(220px,24vw,340px);aspect-ratio:4/3;overflow:hidden;flex:0 0 auto;background:#eee6dc}
.h-loop-track img{width:100%;height:100%;object-fit:cover}
.h-loop:hover .h-loop-track{animation-play-state:paused}
@keyframes h-loop{to{transform:translateX(calc(-50% - 12px))}}
@media (prefers-reduced-motion:reduce){.h-loop-track{animation:none}.h-loop{overflow-x:auto}}

/* ---------- 診療時間（院長紹介の下・タップで開く） ---------- */
.h-hours-item{scroll-margin-top:130px}
.h-hours-item summary{display:flex;align-items:center;justify-content:space-between;padding:17px 6px;font-size:14px;letter-spacing:.1em;cursor:pointer;list-style:none}
.h-hours-item summary::-webkit-details-marker{display:none}
.h-hours-item summary:hover{background:#faf6f1}
.h-hours-item summary .go{transform:rotate(90deg);transition:transform .2s}
.h-hours-item details[open] summary .go{transform:rotate(-90deg)}
.h-hours-body{padding:6px 0 20px}
.h-hours-item .h-detail{background:#fff;table-layout:fixed;white-space:normal;font-size:11px}
.h-hours-item .h-detail th,.h-hours-item .h-detail td{padding:12px 1px;text-align:center}
.h-hours-item .h-detail th:first-child{width:23%}
.h-hours-item .h-detail th small{display:block;font-size:9px;color:var(--muted)}
.h-hours-item .h-detail .h-special{font-size:10px;line-height:1.6}
.h-hours-item .h-note{margin:12px 0 0}
.h-fold-text{padding-left:6px;padding-right:6px}
.h-fold-text p{font-size:13px;line-height:2;margin:0}
.h-fold-text h3{font-size:15px;font-weight:500;letter-spacing:.08em;margin:18px 0 8px}
.h-emergency{margin-top:16px;padding:18px 16px;background:var(--sand);text-align:center}
.h-emergency h3{font-size:16px;font-weight:500;letter-spacing:.1em;margin:0 0 8px}
.h-emergency p{font-size:12px;line-height:1.9;text-align:left;margin:0}
.h-emergency a{display:inline-block;font-size:22px;letter-spacing:.06em;margin:10px 0;text-decoration:underline;text-underline-offset:5px}
@media (min-width:768px){
  #concept .h-text{align-self:start;padding-top:48px}
  #concept .h-imgs{align-self:start}
  #stay .h-imgs,#stay .h-text{align-self:start}
}

/* ---------- ACCESS ---------- */
.h-access{background:var(--sand)}
.h-access .h-lead{margin-bottom:22px}
.h-access .hours-table-wrap{margin-bottom:14px}
.h-access .n-hours{background:#fff}
.h-note{font-size:12px;line-height:2;color:var(--muted);margin-bottom:28px}

/* ---------- Tablet ---------- */
@media (max-width:1000px){
  .h-sec{padding:90px 0}
  .h-inner{width:calc(100% - 64px)}
  .h-news-body{padding-right:32px}
}

/* ---------- Smartphone：写真2枚 → 文字の縦並び ---------- */
@media (max-width:767px){
  /* 動画は画面の3分の2ほど。下に次の項目が見えるように */
  .home .n-hero{height:66svh;min-height:360px;max-height:600px}
  .home .n-hero-copy{top:52%}
  .home .n-hero h1{font-size:clamp(24px,6.6vw,32px);line-height:1.8}
  .home .n-hero-bottom{bottom:14px}

  .home .h-en{font-size:30px;margin-bottom:16px}
  .home .h-catch{font-size:18px;letter-spacing:.1em;margin-bottom:14px}
  .home .h-lead{font-size:13px;line-height:2;letter-spacing:.03em;margin-bottom:26px}

  .h-topics{padding:44px 22px 48px}
  .h-topics .h-en{margin-bottom:14px}
  .h-topics-text{font-size:14px;line-height:2;letter-spacing:.05em;margin-bottom:18px}

  .h-sec{padding:56px 0}
  .h-inner{width:calc(100% - 44px);grid-template-columns:1fr;gap:34px}
  .h-sec.is-reverse .h-imgs{order:0}
  .h-imgs{gap:16px}
  .h-img-2,.h-sec.is-reverse .h-img-1{margin-top:44px}
  .h-links a{padding:15px 4px;font-size:13px}

  .home .n-news.h-news{display:block;padding:48px 22px 24px}
  .h-news-img{display:none}
  .h-news-body{padding:0}

  .h-loop{padding-bottom:56px}
  .h-loop-track{gap:12px;animation-duration:45s}
  .h-loop-track li{width:46vw}
  @keyframes h-loop{to{transform:translateX(calc(-50% - 6px))}}
}

/* ---------- Smartphone：下層ページのトップ画像は短く（参考サイトと同程度） ---------- */
@media (max-width:767px){
  .inner-page .page-hero.visual-hero{height:clamp(210px,30svh,280px)!important;min-height:0!important}
  .inner-page .visual-hero .hero-copy{padding-bottom:44px!important}
  .inner-page .visual-hero .hero-badge{margin-bottom:8px!important}
  .inner-page .visual-hero .page-title{font-size:clamp(24px,6.6vw,30px)!important;line-height:1.5!important}
  .inner-page .visual-hero .hero-caption{display:none}
}


/* 院長ページ：「医師紹介」の横に、院長ごあいさつ（写真・文章・資格）を並べる */
.inner-page .doctor-top{background:var(--sand);padding:64px 0 72px;border-bottom:1px solid #eee7df}
.inner-page .doctor-top-inner{width:min(1160px,calc(100% - 112px));margin:0 auto;display:grid;grid-template-columns:minmax(0,.75fr) minmax(0,1.25fr);gap:clamp(36px,6vw,88px);align-items:start}
.inner-page .doctor-top .hero-badge{font:11px/1.6 Georgia,serif;letter-spacing:.2em;color:#9a7e63;margin-bottom:6px}
.inner-page .doctor-top .page-title{font-size:clamp(30px,3.2vw,42px);letter-spacing:.14em;line-height:1.5;margin:0 0 32px}
.inner-page .doctor-top-photo{aspect-ratio:4/5;overflow:hidden;background:#e9e1d7}
.inner-page .doctor-top-photo img{width:100%;height:100%;object-fit:cover;object-position:center 22%}
.inner-page .doctor-top-text .section-en{margin-bottom:6px}
.inner-page .doctor-top-text .section-h2{margin-bottom:22px}
.inner-page .doctor-top-text .doctor-name{font-size:21px;letter-spacing:.1em;line-height:1.7;margin-bottom:14px}
.inner-page .doctor-top-text p{font-size:14px;line-height:2.2;margin-bottom:16px}
.inner-page .doctor-top-text .profile-list{background:#fff;padding:22px 26px;margin-top:24px}
@media (max-width:767px){
  .inner-page .doctor-top{padding:32px 0 44px}
  .inner-page .doctor-top-inner{width:calc(100% - 44px);grid-template-columns:1fr;gap:28px}
  .inner-page .doctor-top .page-title{margin-bottom:20px}
  .inner-page .doctor-top-photo{max-width:260px}
}

/* スマホの最初の画面で「初めての方へ」まで見えるようにする */
@media (max-width:767px){
  .home .n-hero{height:calc(100svh - 76px - 54px - 128px - env(safe-area-inset-bottom,0px));min-height:300px;max-height:600px}
  .home .h-topics{padding:16px 22px 18px}
  .home .h-topics .h-en{font-size:26px;line-height:1.3;margin-bottom:10px}
  .home .h-topics .s-more{justify-content:center;min-width:240px;min-height:50px;padding:10px 24px;background:var(--brown);color:#fff;border-bottom:0;font-size:15px}
  .home .h-topics .s-more .go{color:#fff;border-color:#ffffffaa}
}
