/*
Theme Name: SWELL CHILD - はなせる薬局だより
Template: swell
Version: 1.2.2
Description: はなせる薬局だより トップページ用の SWELL 子テーマ。front-page.php でトップを差し替える。
*/

/* =========================================================
   はなせる薬局だより トップページ専用スタイル
   すべて hd- prefix。SWELL 本体のクラスとは衝突しない。
   ========================================================= */

:root {
  --hd-teal: #2f8f85;
  --hd-teal-dark: #1f6b63;
  --hd-teal-light: #e3f1ef;
  --hd-cream: #faf6e9;
  --hd-ink: #2b3a38;
  --hd-muted: #6b7c79;
  --hd-white: #ffffff;
  --hd-line: #e5e0d0;
  --hd-radius: 16px;
  --hd-maru: "Zen Maru Gothic", "Hiragino Maru Gothic ProN", sans-serif;
}

body.home.hd-top-body,
body.home.hd-top-body .hd-top {
  font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic", "Noto Sans JP", sans-serif !important;
  color: var(--hd-ink);
  background: var(--hd-cream);
  line-height: 1.7;
  margin: 0;
  overflow-x: hidden;
}
.hd-top :where(a) { color: inherit; text-decoration: none; }
.hd-top img { max-width: 100%; display: block; }
.hd-top * { box-sizing: border-box; }

/* 共通の見出し装飾（追加CSS・SWELL見出しデザイン）をトップページでは無効化 */
.hd-top h1, .hd-top h2, .hd-top h3, .hd-top h4 {
  background: none !important;
  border: none !important;
  padding: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  color: inherit;
}
.hd-top h1::before, .hd-top h2::before, .hd-top h3::before {
  content: none !important;
}
.hd-container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }

/* ===== Header ===== */
.hd-header {
  background: var(--hd-white);
  border-bottom: 1px solid var(--hd-line);
  position: sticky; top: 0; z-index: 100;
}
.hd-svcbar { background: var(--hd-white); }
.hd-svcbar-inner {
  max-width: 1100px; margin: 0 auto; padding: 12px 20px;
  display: flex; align-items: center; gap: 24px;
}
.hd-svc-logo { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.hd-logo-mark { width: 42px; height: 42px; object-fit: contain; }
.hd-svc-text { display: flex; flex-direction: column; }
.hd-svc-caption { font-size: 10px; font-weight: 600; color: var(--hd-muted); letter-spacing: .14em; }
.hd-svc-name {
  font-family: var(--hd-maru);
  font-weight: 900; font-size: 21px; letter-spacing: .04em; color: var(--hd-ink); line-height: 1.3;
}
.hd-svcnav { margin-left: auto; display: flex; gap: 20px; }
.hd-svcnav a { font-size: 13px; font-weight: 600; white-space: nowrap; }
.hd-svcnav a:hover { color: var(--hd-teal); }
.hd-mediabar { background: var(--hd-teal); }
.hd-media-nav {
  max-width: 1100px; margin: 0 auto; padding: 0 20px;
  display: flex; justify-content: center; gap: 8px;
  overflow-x: auto; scrollbar-width: none;
}
.hd-media-nav::-webkit-scrollbar { display: none; }
.hd-media-nav a {
  color: var(--hd-white); font-size: 14px; font-weight: 700; white-space: nowrap;
  padding: 12px 18px;
}
.hd-media-nav a:hover { background: rgba(255,255,255,.14); }
.hd-media-top { font-family: var(--hd-maru); }
.hd-media-nav .hd-media-h1 {
  display: block; margin: 0 !important; padding: 0 !important;
  font-size: 14px !important; font-weight: 700; line-height: inherit;
  letter-spacing: normal; background: none; border: none;
}
.hd-media-nav .hd-media-h1 a { display: block; }

/* ===== Hero ===== */
.hd-hero { padding: 36px 0 28px; }
.hd-hero-grid {
  display: grid; grid-template-columns: 1fr 320px; gap: 28px; align-items: start;
}
.hd-hero-grid > * { min-width: 0; }
.hd-carousel {
  position: relative; border-radius: var(--hd-radius); overflow: hidden;
  box-shadow: 0 6px 24px rgba(47,143,133,.12);
}
.hd-slides { position: relative; aspect-ratio: 1734 / 907; }
.hd-slide {
  position: absolute; inset: 0; display: flex; align-items: center; gap: 24px;
  padding: 40px 48px; opacity: 0; pointer-events: none;
  transition: opacity .8s ease;
}
.hd-slide.active { opacity: 1; pointer-events: auto; }
.hd-slide-3 { background: linear-gradient(120deg, #fdf3df 0%, #fef9ec 100%); }
.hd-slide-copy { flex: 1; min-width: 0; }
.hd-slide-tag {
  display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .1em;
  padding: 4px 12px; border-radius: 999px; margin-bottom: 14px;
  background: var(--hd-white); color: var(--hd-teal);
}
.hd-slide-title { font-size: 30px; font-weight: 800; line-height: 1.45; margin: 0 0 12px; }
.hd-slide p { font-size: 14px; color: var(--hd-muted); margin: 0; }
.hd-slide-art { width: 220px; flex-shrink: 0; }
.hd-slide-image { background: var(--hd-white); padding: 0; }
.hd-slide-image img { width: 100%; height: 100%; object-fit: contain; object-position: center bottom; }
.hd-dots {
  position: absolute; bottom: 14px; right: 20px;
  display: flex; gap: 8px;
}
.hd-dot {
  width: 8px; height: 8px; border-radius: 50%; border: none; cursor: pointer;
  background: rgba(43,58,56,.25); padding: 0;
}
.hd-dot.active { background: var(--hd-teal); }

/* Hero side links */
.hd-hero-links { display: flex; flex-direction: column; gap: 12px; align-self: stretch; }
.hd-hero-link {
  flex: 1; display: flex; align-items: center; gap: 14px;
  background: var(--hd-white); border: 1px solid var(--hd-line); border-radius: var(--hd-radius);
  padding: 18px 20px; transition: box-shadow .15s ease, transform .15s ease;
}
.hd-hero-link:hover { box-shadow: 0 6px 18px rgba(47,143,133,.16); transform: translateY(-2px); }
.hd-hero-link-icon {
  width: 48px; height: 48px; border-radius: 12px; flex-shrink: 0;
  display: grid; place-items: center; overflow: hidden;
}
.hd-hero-link-icon img { width: 100%; height: 100%; object-fit: cover; }
.hd-hero-link-body { flex: 1; }
.hd-hero-link-title { font-weight: 700; font-size: 15px; }
.hd-hero-link-desc { font-size: 12px; color: var(--hd-muted); }
.hd-arrow {
  width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0;
  background: var(--hd-teal); color: var(--hd-white);
  display: grid; place-items: center; font-size: 13px;
}

/* ===== Mid banner ===== */
.hd-mid-banner { padding: 36px 0 8px; }
.hd-mid-banner a {
  display: block; max-width: 760px; margin: 0 auto; border-radius: 18px; overflow: hidden;
  box-shadow: 0 6px 20px rgba(47,143,133,.10);
  transition: box-shadow .15s ease, transform .15s ease;
}
.hd-mid-banner a:hover { box-shadow: 0 10px 26px rgba(47,143,133,.2); transform: translateY(-2px); }
.hd-mid-banner img { width: 100%; display: block; }

/* ===== Intro (h1) ===== */
.hd-intro { padding: 28px 0 0; text-align: center; }
.hd-intro h1 {
  font-family: var(--hd-maru);
  font-size: 22px; font-weight: 900; color: var(--hd-teal-dark);
  letter-spacing: .04em; margin: 0 0 8px;
}
.hd-intro p {
  font-size: 13px; color: var(--hd-muted); max-width: 720px; margin: 0 auto; line-height: 1.9;
}

/* ===== Sections ===== */
.hd-section { padding: 32px 0; }
.hd-section-head { display: flex; align-items: baseline; gap: 16px; margin-bottom: 18px; }
.hd-section-title { font-size: 22px; font-weight: 800; letter-spacing: .02em; margin: 0; }
.hd-section-title::after {
  content: ""; display: block; width: 44px; height: 4px; border-radius: 2px;
  background: var(--hd-teal); margin-top: 6px;
}
.hd-section-more { margin-left: auto; font-size: 13px; font-weight: 700; color: var(--hd-teal); display: flex; align-items: center; gap: 6px; }

/* New articles scroller */
.hd-scroller-wrap { position: relative; }
.hd-scroller {
  display: flex; gap: 16px; overflow-x: auto; scroll-behavior: smooth;
  padding: 4px 2px 14px; scrollbar-width: thin;
}
.hd-card {
  min-width: 240px; max-width: 240px; background: var(--hd-white);
  border: 1px solid var(--hd-line); border-radius: var(--hd-radius); overflow: hidden;
  transition: box-shadow .15s ease, transform .15s ease;
}
.hd-card:hover { box-shadow: 0 8px 20px rgba(47,143,133,.16); transform: translateY(-3px); }
.hd-card-thumb { height: 130px; overflow: hidden; background: var(--hd-teal-light); }
.hd-card-thumb img { width: 100%; height: 100%; object-fit: cover; }
.hd-card-body { padding: 12px 14px 14px; }
.hd-card-cat {
  display: inline-block; font-size: 11px; font-weight: 700; color: var(--hd-teal);
  background: var(--hd-teal-light); border-radius: 999px; padding: 2px 10px; margin-bottom: 8px;
}
.hd-card-title {
  font-size: 14px; font-weight: 700; line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.hd-card-date { font-size: 11px; color: var(--hd-muted); margin-top: 8px; }
.hd-scroll-btn {
  position: absolute; top: 42%; transform: translateY(-50%);
  width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--hd-line);
  background: var(--hd-white); color: var(--hd-teal); font-size: 16px; cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,.12); z-index: 5;
}
.hd-scroll-btn.prev { left: -16px; }
.hd-scroll-btn.next { right: -16px; }

/* Category cards */
.hd-cat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.hd-cat-card {
  background: var(--hd-white); border: 1px solid var(--hd-line); border-radius: var(--hd-radius);
  padding: 22px 18px; text-align: center;
  transition: box-shadow .15s ease, transform .15s ease;
}
.hd-cat-card:hover { box-shadow: 0 8px 20px rgba(47,143,133,.16); transform: translateY(-3px); }
.hd-cat-icon { height: 64px; display: grid; place-items: center; margin-bottom: 10px; overflow: hidden; }
.hd-cat-icon img { height: 64px; width: auto; max-width: 90px; object-fit: contain; }
.hd-cat-name { font-weight: 800; font-size: 15px; }
.hd-cat-desc { font-size: 12px; color: var(--hd-muted); margin-top: 4px; }

/* ===== Banners ===== */
.hd-banner-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.hd-banner {
  border-radius: var(--hd-radius); padding: 32px 32px 28px; overflow: hidden; position: relative;
  display: flex; flex-direction: column; gap: 10px; min-height: 210px;
  transition: box-shadow .15s ease, transform .15s ease;
}
.hd-banner:hover { box-shadow: 0 10px 26px rgba(47,143,133,.22); transform: translateY(-3px); }
.hd-banner-online { background: linear-gradient(120deg, var(--hd-teal) 0%, #35998d 100%); color: var(--hd-white); }
.hd-banner-clinic { background: var(--hd-white); border: 2px solid var(--hd-teal); }
.hd-banner-label { font-size: 12px; font-weight: 700; letter-spacing: .12em; opacity: .85; }
.hd-banner-title { font-size: 22px; font-weight: 800; line-height: 1.45; }
.hd-banner-desc { font-size: 13px; opacity: .9; }
.hd-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: 999px; font-weight: 700; cursor: pointer; white-space: nowrap;
  margin-top: auto; align-self: flex-start;
  transition: opacity .15s ease, transform .15s ease;
}
.hd-btn:hover { opacity: .88; }
.hd-banner-online .hd-btn { background: var(--hd-white); color: var(--hd-teal); padding: 12px 26px; }
.hd-banner-clinic .hd-btn {
  background: var(--hd-white); color: var(--hd-teal); padding: 10px 20px; font-size: 14px;
  border: 2px solid var(--hd-teal);
}
.hd-banner-clinic .hd-banner-label { color: var(--hd-teal); }
.hd-banner-clinic .hd-banner-desc { color: var(--hd-muted); }
.hd-banner-deco { position: absolute; right: -20px; bottom: -24px; font-size: 110px; opacity: .12; pointer-events: none; }

/* Tags */
.hd-tag-cloud { display: flex; flex-wrap: wrap; gap: 10px; }
.hd-tag {
  font-size: 13px; font-weight: 600; color: var(--hd-teal);
  background: var(--hd-white); border: 1px solid var(--hd-line);
  border-radius: 999px; padding: 6px 16px;
}
.hd-tag:hover { background: var(--hd-teal-light); }

/* ===== Footer ===== */
.hd-footer { background: var(--hd-teal-dark); color: rgba(255,255,255,.85); margin-top: 40px; }
.hd-footer-inner { max-width: 1100px; margin: 0 auto; padding: 44px 20px 28px; }
.hd-footer-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr 1fr; gap: 28px; }
.hd-footer h4 { color: var(--hd-white); font-size: 14px; margin: 0 0 12px; }
.hd-footer ul { list-style: none; font-size: 13px; display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; }
.hd-footer a:hover { text-decoration: underline; }
.hd-footer-brand {
  font-family: var(--hd-maru);
  font-weight: 700; font-size: 17px; color: var(--hd-white); margin-bottom: 8px;
}
.hd-footer-note { font-size: 12px; line-height: 1.8; opacity: .8; margin: 0; }
.hd-footer-seal { display: inline-block; margin-top: 14px; }
.hd-copyright {
  border-top: 1px solid rgba(255,255,255,.15); margin-top: 32px; padding-top: 18px;
  font-size: 12px; text-align: center; opacity: .7;
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .hd-svcnav { display: none; }
  .hd-svcbar-inner { padding: 10px 14px; }
  .hd-svc-name { font-size: 17px; }
  .hd-media-nav { justify-content: flex-start; padding: 0 8px; }
  .hd-media-nav a { font-size: 13px; padding: 10px 12px; }
  .hd-hero-grid { grid-template-columns: 1fr; }
  .hd-slide { padding: 16px 20px; }
  .hd-slide-title { font-size: 17px; margin-bottom: 6px; }
  .hd-slide-tag { font-size: 10px; padding: 3px 10px; margin-bottom: 8px; }
  .hd-slide p {
    font-size: 12px; display: -webkit-box; -webkit-line-clamp: 2;
    -webkit-box-orient: vertical; overflow: hidden;
  }
  .hd-slide-art { display: none; }
  .hd-dots { bottom: 8px; right: 12px; }
  .hd-cat-grid { grid-template-columns: repeat(2, 1fr); }
  .hd-scroll-btn.prev { left: -6px; }
  .hd-scroll-btn.next { right: -6px; }
  .hd-banner-grid { grid-template-columns: 1fr; }
  .hd-footer-grid { grid-template-columns: 1fr 1fr; }
}
