/*
Theme Name: Mediseed Corporate
Theme URI: https://mediseed.jp
Author: MEDISEED Inc.
Description: メディシード株式会社のコーポレートサイト用テーマ。モバイルファースト・シンプル・回遊性重視。
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: mediseed
*/

:root {
  --c-primary: #1e4d40;      /* 深いグリーン */
  --c-primary-dark: #143830;
  --c-accent: #c8a24b;       /* 上品なゴールド */
  --c-bg: #fbfaf7;           /* オフホワイト */
  --c-surface: #ffffff;
  --c-text: #21302b;
  --c-text-muted: #6b7a74;
  --c-line: #e5e3dc;
  --radius: 14px;
  --shadow: 0 6px 24px rgba(20, 56, 48, .08);
  --header-h: 60px;
  --bottomnav-h: 58px;
  --font-sans: "Zen Kaku Gothic New", "Hiragino Kaku Gothic ProN", "Noto Sans JP", sans-serif;
}

/* ---------- Reset / Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.9;
  color: var(--c-text);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
  letter-spacing: .02em;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--c-primary); text-decoration: none; }
a:hover { opacity: .8; }
h1, h2, h3, h4 { line-height: 1.5; font-weight: 700; margin: 0 0 .6em; }
p { margin: 0 0 1.2em; }
ul { padding-left: 1.2em; }

.container {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
}

/* スマホは下部固定ナビの分だけ余白を確保 */
body { padding-bottom: calc(var(--bottomnav-h) + env(safe-area-inset-bottom)); }
@media (min-width: 900px) {
  body { padding-bottom: 0; }
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(251, 250, 247, .92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--c-line);
  display: flex;
  align-items: center;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.site-logo {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: .08em;
  color: var(--c-primary);
}
.site-logo img { max-height: 34px; width: auto; }
.site-logo .logo-sub {
  display: block;
  font-size: 10px;
  font-weight: 500;
  color: var(--c-text-muted);
  letter-spacing: .2em;
  line-height: 1;
}

/* PCナビ */
.global-nav { display: none; }
@media (min-width: 900px) {
  .global-nav { display: block; }
  .global-nav ul {
    display: flex;
    gap: 28px;
    list-style: none;
    margin: 0;
    padding: 0;
  }
  .global-nav a {
    font-size: 14px;
    font-weight: 500;
    color: var(--c-text);
    padding: 8px 0;
    position: relative;
  }
  .global-nav a::after {
    content: "";
    position: absolute;
    left: 0; bottom: 0;
    width: 0; height: 2px;
    background: var(--c-accent);
    transition: width .25s;
  }
  .global-nav a:hover::after { width: 100%; }
}

/* ハンバーガー */
.menu-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: none;
  border: 0;
  cursor: pointer;
}
.menu-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--c-primary);
  transition: transform .3s, opacity .3s;
}
.menu-open .menu-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-open .menu-toggle span:nth-child(2) { opacity: 0; }
.menu-open .menu-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
@media (min-width: 900px) { .menu-toggle { display: none; } }

/* ドロワー */
.drawer {
  position: fixed;
  inset: var(--header-h) 0 0 0;
  background: var(--c-bg);
  transform: translateX(100%);
  transition: transform .3s ease;
  z-index: 99;
  overflow-y: auto;
  padding: 28px 24px calc(var(--bottomnav-h) + 40px);
}
.menu-open .drawer { transform: translateX(0); }
.drawer ul { list-style: none; margin: 0; padding: 0; }
.drawer li { border-bottom: 1px solid var(--c-line); }
.drawer a {
  display: block;
  padding: 16px 4px;
  font-size: 16px;
  font-weight: 500;
  color: var(--c-text);
}
.drawer .drawer-shops {
  margin-top: 24px;
  display: grid;
  gap: 10px;
}
.drawer .drawer-shops a { padding: 14px 32px; }
.drawer .drawer-shops .btn-primary { color: #fff; }
.drawer .drawer-shops .btn-outline { color: var(--c-primary); }
@media (min-width: 900px) { .drawer { display: none; } }

/* ---------- ボタン ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 700;
  border: 0;
  cursor: pointer;
  transition: transform .2s, box-shadow .2s;
}
.btn:hover { transform: translateY(-2px); opacity: 1; }
.btn-primary { background: var(--c-primary); color: #fff; box-shadow: var(--shadow); }
.btn-outline {
  background: transparent;
  color: var(--c-primary);
  border: 1.5px solid var(--c-primary);
}
.btn-block { width: 100%; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 72px 0 64px;
  background:
    radial-gradient(ellipse 80% 60% at 85% 10%, rgba(200, 162, 75, .12), transparent),
    radial-gradient(ellipse 70% 60% at 10% 90%, rgba(30, 77, 64, .08), transparent),
    var(--c-bg);
  overflow: hidden;
}
.hero-inner { max-width: 720px; position: relative; z-index: 1; }
.hero-art {
  position: absolute;
  top: 50%;
  right: -60px;
  transform: translateY(-50%);
  width: 340px;
  opacity: .5;
  pointer-events: none;
}
@media (min-width: 900px) {
  .hero-art {
    right: 4%;
    width: min(44vw, 520px);
    opacity: 1;
  }
}
.hero-catch {
  font-size: clamp(28px, 6.5vw, 44px);
  line-height: 1.4;
  letter-spacing: .04em;
  color: var(--c-primary-dark);
  margin-bottom: 18px;
}
.hero-catch em {
  font-style: normal;
  color: var(--c-accent);
}
.hero-lead {
  font-size: clamp(14px, 3.6vw, 16px);
  color: var(--c-text-muted);
  margin-bottom: 32px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
@media (min-width: 900px) {
  .hero { padding: 120px 0 100px; }
}

/* ---------- セクション共通 ---------- */
.section { padding: 64px 0; }
.section-alt { background: var(--c-surface); }
.section-head { text-align: center; margin-bottom: 40px; }
.section-en {
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .25em;
  color: var(--c-accent);
  text-transform: uppercase;
  margin-bottom: 8px;
}
.section-title { font-size: clamp(22px, 5vw, 30px); color: var(--c-primary-dark); }
@media (min-width: 900px) { .section { padding: 96px 0; } }

/* ---------- 事業カード ---------- */
.service-grid {
  display: grid;
  gap: 20px;
}
@media (min-width: 900px) {
  .service-grid { grid-template-columns: repeat(3, 1fr); gap: 28px; }
}
.service-card {
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform .25s;
}
.service-card:hover { transform: translateY(-4px); }
.service-visual { border-bottom: 1px solid var(--c-line); }
.service-visual img { width: 100%; display: block; }
.service-body { padding: 24px 26px 30px; }
.service-card h3 { font-size: 18px; color: var(--c-primary-dark); }
.service-card p { font-size: 14px; color: var(--c-text-muted); margin: 0; }

/* ---------- ショップ導線 ---------- */
.shop-grid { display: grid; gap: 14px; }
@media (min-width: 900px) { .shop-grid { grid-template-columns: repeat(3, 1fr); gap: 20px; } }
.shop-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  padding: 20px 22px;
  box-shadow: var(--shadow);
  font-weight: 700;
  color: var(--c-text);
  transition: transform .25s;
}
.shop-link:hover { transform: translateY(-3px); opacity: 1; }
.shop-link .shop-name { display: flex; align-items: center; gap: 12px; font-size: 15px; }
.shop-badge {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}
.shop-badge.own { background: var(--c-primary); }
.shop-badge.amazon { background: #232f3e; }
.shop-badge.rakuten { background: #bf0000; }
.shop-arrow { color: var(--c-accent); font-size: 18px; }

/* ---------- お知らせ ---------- */
.news-list { list-style: none; margin: 0 0 32px; padding: 0; }
.news-list li { border-bottom: 1px solid var(--c-line); }
.news-list a {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 18px 4px;
  color: var(--c-text);
}
.news-date {
  font-size: 12px;
  color: var(--c-accent);
  font-weight: 700;
  letter-spacing: .05em;
}
.news-title { font-size: 15px; font-weight: 500; }
@media (min-width: 900px) {
  .news-list a { flex-direction: row; align-items: center; gap: 28px; padding: 20px 8px; }
}
.section .more-wrap { text-align: center; }

/* ---------- 会社概要 ---------- */
.company-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--c-surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.company-table th, .company-table td {
  padding: 16px 18px;
  font-size: 14px;
  border-bottom: 1px solid var(--c-line);
  text-align: left;
  vertical-align: top;
}
.company-table tr:last-child th, .company-table tr:last-child td { border-bottom: 0; }
.company-table th {
  width: 32%;
  color: var(--c-primary-dark);
  font-weight: 700;
  background: rgba(30, 77, 64, .04);
  white-space: nowrap;
}
@media (min-width: 900px) {
  .company-table th { width: 22%; }
  .company-table th, .company-table td { padding: 20px 28px; font-size: 15px; }
}

/* ---------- CTA ---------- */
.cta {
  background: linear-gradient(135deg, var(--c-primary), var(--c-primary-dark));
  color: #fff;
  text-align: center;
  padding: 64px 0;
}
.cta .section-title { color: #fff; }
.cta p { color: rgba(255, 255, 255, .8); font-size: 14px; }
.cta .btn-primary { background: #fff; color: var(--c-primary); }

/* ---------- 記事・固定ページ ---------- */
.page-hero {
  background: var(--c-surface);
  border-bottom: 1px solid var(--c-line);
  padding: 48px 0;
  text-align: center;
}
.page-hero h1 { font-size: clamp(22px, 5vw, 32px); color: var(--c-primary-dark); margin: 0; }
.entry-body { padding: 48px 0 72px; }
.entry-content {
  max-width: 760px;
  margin: 0 auto;
  background: var(--c-surface);
  border-radius: var(--radius);
  padding: 28px 22px;
  box-shadow: var(--shadow);
}
@media (min-width: 900px) { .entry-content { padding: 48px 56px; } }
.entry-content h2 {
  font-size: 20px;
  color: var(--c-primary-dark);
  border-left: 4px solid var(--c-accent);
  padding-left: 12px;
  margin-top: 2em;
}
.entry-content h3 { font-size: 17px; color: var(--c-primary-dark); margin-top: 1.6em; }
.entry-content img { border-radius: 10px; }
.entry-meta {
  text-align: center;
  font-size: 13px;
  color: var(--c-text-muted);
  margin-top: 10px;
}

/* アーカイブ一覧 */
.archive-list {
  max-width: 760px;
  margin: 0 auto;
  display: grid;
  gap: 16px;
}
.archive-card {
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  padding: 22px 24px;
  box-shadow: var(--shadow);
  display: block;
  color: var(--c-text);
  transition: transform .2s;
}
.archive-card:hover { transform: translateY(-3px); opacity: 1; }
.archive-card h2 { font-size: 17px; margin: 6px 0 8px; color: var(--c-primary-dark); }
.archive-card .excerpt { font-size: 13px; color: var(--c-text-muted); margin: 0; }

/* ページネーション */
.pagination { text-align: center; margin-top: 40px; }
.pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 8px;
  margin: 0 3px;
  border-radius: 10px;
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  font-size: 14px;
  color: var(--c-text);
}
.pagination .current { background: var(--c-primary); color: #fff; border-color: var(--c-primary); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--c-primary-dark);
  color: rgba(255, 255, 255, .85);
  padding: 48px 0 32px;
  font-size: 14px;
}
.footer-grid { display: grid; gap: 32px; }
@media (min-width: 900px) {
  .footer-grid { grid-template-columns: 1.2fr 1fr 1fr; gap: 48px; }
}
.footer-logo { font-size: 18px; font-weight: 700; color: #fff; letter-spacing: .08em; }
.footer-desc { font-size: 12px; color: rgba(255, 255, 255, .6); margin-top: 8px; }
.footer-heading {
  font-size: 12px;
  letter-spacing: .2em;
  color: var(--c-accent);
  font-weight: 700;
  margin-bottom: 12px;
  text-transform: uppercase;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 8px; }
.site-footer a { color: rgba(255, 255, 255, .85); }
.copyright {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, .15);
  text-align: center;
  font-size: 11px;
  color: rgba(255, 255, 255, .5);
}

/* ---------- モバイル下部固定ナビ ---------- */
.bottom-nav {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 100;
  height: calc(var(--bottomnav-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--c-line);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
}
.bottom-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-size: 10px;
  font-weight: 500;
  color: var(--c-text-muted);
}
.bottom-nav a .bn-icon { font-size: 20px; line-height: 1; }
.bottom-nav a.is-active,
.bottom-nav a:hover { color: var(--c-primary); opacity: 1; }
@media (min-width: 900px) { .bottom-nav { display: none; } }

/* ---------- スクロールアニメーション ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .7s ease, transform .7s ease;
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- 404 ---------- */
.error-404 { text-align: center; padding: 96px 20px; }
.error-404 .code { font-size: 72px; font-weight: 700; color: var(--c-accent); line-height: 1; }

/* WordPress 標準クラス */
.aligncenter { margin-left: auto; margin-right: auto; }
.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: 12px; color: var(--c-text-muted); text-align: center; }
.screen-reader-text {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}
