/* ============================================
   株式会社まるか 公式サイト 共通スタイル
   ============================================ */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --color-primary: #0a3d62;       /* 深い紺 - 信頼感 */
  --color-accent:  #c0392b;       /* 朱赤 - まるか の丸 */
  --color-bg:      #ffffff;
  --color-soft:    #f4f6f8;
  --color-text:    #2c3e50;
  --color-muted:   #6b7785;
  --color-border:  #e1e5ea;
  --font-jp: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic", "Meiryo", sans-serif;
  --max-width: 1100px;
}

html { scroll-behavior: smooth; }
body {
  font-family: var(--font-jp);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.8;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--color-primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- ヘッダー ---------- */
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 200;
  transition: background .3s, border-color .3s;
}
.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 18px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
.logo a {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--color-primary);
  text-decoration: none;
}
.logo img { width: 180px; max-height: 26px; height: auto !important; display: block; align-self: center; }

/* ハンバーガーボタン（PC非表示） */
.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 32px;
  height: 24px;
  position: relative;
  z-index: 200;
}
.hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--color-text);
  position: absolute;
  left: 0;
  transition: transform .3s, opacity .3s, top .3s, background .3s;
}
.hamburger span:nth-child(1) { top: 0; }
.hamburger span:nth-child(2) { top: 11px; }
.hamburger span:nth-child(3) { top: 22px; }
/* ハンバーガー開いた状態 */
.hamburger.is-open span:nth-child(1) { top: 11px; transform: rotate(45deg); }
.hamburger.is-open span:nth-child(2) { opacity: 0; }
.hamburger.is-open span:nth-child(3) { top: 11px; transform: rotate(-45deg); }

.nav ul {
  display: flex;
  list-style: none;
  gap: 28px;
  align-items: center;
}
.nav a {
  color: var(--color-text);
  font-size: 15px;
  font-weight: 500;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  transition: border-color .2s, color .2s;
}
.nav a:hover { color: var(--color-primary); border-bottom-color: var(--color-accent); text-decoration: none; }
.nav .contact-btn {
  background: var(--color-accent);
  color: #fff;
  padding: 10px 20px;
  border-radius: 4px;
  border: none;
}
.nav .contact-btn:hover { background: #922b1f; color: #fff; border: none; }

/* ---------- スマホ・タブレット ヘッダー ---------- */
@media (max-width: 1024px) {
  .site-header {
    background: rgba(255,255,255,.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(225,229,234,.5);
    position: fixed;
    width: 100%;
  }
  .header-inner { flex-wrap: nowrap; }
  .logo img { width: 130px; max-height: 20px; height: auto !important; }
  .hamburger { display: block !important; }
  .nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 75%;
    max-width: 320px;
    height: 100vh;
    background: rgba(10,61,98,.97);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 100px 32px 40px;
    transition: right .4s cubic-bezier(.25,.46,.45,.94);
    z-index: 150;
    box-shadow: -4px 0 30px rgba(0,0,0,.3);
    visibility: hidden;
    pointer-events: none;
  }
  .nav.is-open { right: 0; visibility: visible; pointer-events: auto; }
  .nav ul {
    flex-direction: column;
    gap: 0;
    align-items: stretch;
  }
  .nav li {
    border-bottom: 1px solid rgba(255,255,255,.12);
  }
  .nav a {
    color: #fff;
    font-size: 16px;
    display: block;
    padding: 18px 0;
    border-bottom: none;
  }
  .nav a:hover { color: var(--color-accent); text-decoration: none; }
  .nav .contact-btn {
    margin-top: 20px;
    text-align: center;
    border-radius: 6px;
    padding: 14px 20px;
  }
  /* オーバーレイ */
  .nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.4);
    z-index: 140;
  }
  .nav-overlay.is-open { display: block; }
}

/* ---------- ヒーロー（スライドショー） ---------- */
.hero {
  position: relative;
  color: #fff;
  min-height: 640px;
  height: calc(100vh - 72px);
  max-height: 860px;
  padding: 0;
  text-align: left;
  overflow: hidden;
  isolation: isolate;
  background: linear-gradient(135deg, #264b66 0%, #0a3d62 100%);
  display: flex;
  align-items: flex-end;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0,0,0,.55) 0%, rgba(0,0,0,.25) 40%, rgba(0,0,0,0) 70%),
              linear-gradient(180deg, rgba(0,0,0,0) 40%, rgba(0,0,0,.45) 100%);
  z-index: 1;
  pointer-events: none;
}
.hero-slides {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transform: scale(1.06);
  transition: opacity 1s ease, transform 5s ease;
}
.hero-slide.is-active {
  opacity: 1;
  transform: scale(1);
}
.hero-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 0 48px 70px;
}
.hero-copy {
  max-width: 760px;
}
.hero-title {
  font-size: clamp(28px, 4.4vw, 52px);
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: 2px;
  margin-bottom: 22px;
}
.hero-title .reveal-line {
  display: inline-block;
}
.hero-title .reveal-line + .reveal-line::before,
.hero-title .reveal-line + .reveal-line { }
.hero .since {
  display: inline-block;
  border: 1px solid rgba(255,255,255,.6);
  padding: 6px 18px;
  font-size: 12px;
  letter-spacing: 4px;
  margin-bottom: 22px;
}
.hero .lead {
  font-size: clamp(14px, 1.5vw, 17px);
  line-height: 2;
  margin: 0 0 32px;
  opacity: .95;
}
.hero .lead .reveal-line {
  display: block;
  width: fit-content;
}
.hero .btn {
  display: inline-block;
}

/* ---------- セラベア風 1文字ずつ浮き上がりエフェクト ---------- */
.js-txt-up { opacity: 0; }
.js-txt-up.is-active { opacity: 1; }
._line { position: relative; display: inline; }
._txt {
  will-change: transform, opacity;
  display: inline-block;
  font-weight: inherit;
  opacity: 0;
  transform: translateY(80%);
  clip-path: inset(0% 0% 0% 100%);
  transition: opacity 1s cubic-bezier(0.19, 1, 0.22, 1),
              clip-path 1s cubic-bezier(0.19, 1, 0.22, 1),
              transform 1s cubic-bezier(0.19, 1, 0.22, 1);
}
.is-active ._txt,
._txt.is-active {
  opacity: 1;
  transform: translateY(0);
  clip-path: inset(0px);
}

@media (max-width: 1024px) {
  .hero { height: auto; min-height: 100vh; padding-top: 80px; }
  .hero-inner { padding: 0 24px 50px; }
  .hero-title { letter-spacing: 1px; }
}
.hero .lead {
  font-size: clamp(15px, 1.6vw, 18px);
  max-width: 720px;
  margin: 0 0 36px;
  opacity: .95;
}
.hero .since {
  display: inline-block;
  border: 1px solid rgba(255,255,255,.6);
  padding: 6px 18px;
  font-size: 13px;
  letter-spacing: 3px;
  margin-bottom: 24px;
}

/* ---------- セクション共通 ---------- */
.section {
  padding: 90px 24px;
}
.section.alt { background: var(--color-soft); }
.container {
  max-width: var(--max-width);
  margin: 0 auto;
}
.section-title {
  text-align: center;
  margin-bottom: 56px;
}
.section-title .en {
  display: block;
  color: var(--color-accent);
  letter-spacing: 4px;
  font-size: 13px;
  margin-bottom: 6px;
  font-weight: 700;
}
.section-title h2 {
  font-size: clamp(24px, 3vw, 32px);
  color: var(--color-primary);
  font-weight: 700;
}

/* ---------- カード ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
}
/* 4列固定（PCで1行に4つ並べる） */
.cards.cols-4 {
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.cards.cols-4 .card { padding: 28px 22px; text-align: center; }
.cards.cols-4 .card h3 { font-size: 17px; }
.cards.cols-4 .card p { font-size: 14px; }
@media (max-width: 900px) {
  .cards.cols-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
  .cards.cols-4 { grid-template-columns: 1fr; }
}
.card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 32px 28px;
  transition: transform .2s, box-shadow .2s;
  overflow: hidden;
}
.card.has-image { padding: 0; display: flex; flex-direction: column; }
.card.has-image .card-img {
  height: 200px;
  background-size: cover;
  background-position: center;
}
.card.has-image .card-body { padding: 24px 26px 28px; }

/* ---------- 一貫生産フロー（左右交互 + S字カーブ接続） ---------- */
.flow-v {
  max-width: 1000px;
  margin: 0 auto;
  position: relative;
  padding: 0;
}
/* S字カーブSVG背景（JSで生成） */
.flow-svg-line {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}
.flow-svg-line path {
  fill: none;
  stroke: var(--color-accent);
  stroke-width: 2.5;
  stroke-dasharray: 8 6;
  opacity: .4;
}

/* 各ステップ行 */
.flow-step {
  display: flex;
  align-items: stretch;
  margin-bottom: 48px;
  position: relative;
  z-index: 1;
}
.flow-step:last-child { margin-bottom: 0; }

/* 奇数：左カード */
.flow-step:nth-child(odd) { flex-direction: row; }
/* 偶数：右カード（HTML側でDOM順が右配置済み） */
.flow-step:nth-child(even) { flex-direction: row; }

/* 番号ノード */
.flow-step .num {
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  font-weight: 900;
  color: #fff;
  background: var(--color-accent);
  width: 48px;
  height: 48px;
  min-width: 48px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1;
  z-index: 3;
  box-shadow: 0 4px 14px rgba(192,57,43,.35);
  border: 3px solid #fff;
  align-self: center;
  position: relative;
}
.flow-step .num small {
  display: block;
  font-size: 6.5px;
  letter-spacing: 1px;
  color: rgba(255,255,255,.8);
  margin-top: 1px;
  font-weight: 600;
}

/* カード */
.flow-card {
  flex: 0 0 calc(50% - 48px);
  max-width: calc(50% - 48px);
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(10,61,98,.07);
  transition: transform .3s, box-shadow .3s;
  display: flex;
  flex-direction: row;
}
.flow-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(10,61,98,.13);
}

/* カード内画像 */
.flow-step .step-img {
  width: 200px;
  min-width: 200px;
  min-height: 100%;
  background-size: cover;
  background-position: center;
}
/* カード内テキスト */
.flow-step .step-content {
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.flow-step .step-content h3 {
  color: var(--color-primary);
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
}
.flow-step .step-content p {
  color: var(--color-muted);
  font-size: 14px;
  line-height: 1.85;
}

/* 横の接続バー（ノード ↔ カード） */
.flow-connector {
  flex: 0 0 24px;
  display: flex;
  align-items: center;
  z-index: 1;
}
.flow-connector::before {
  content: "";
  display: block;
  width: 100%;
  height: 2.5px;
  background: linear-gradient(90deg, var(--color-accent), var(--color-primary));
  border-radius: 2px;
}

/* 空きスペース（反対側） */
.flow-empty {
  flex: 1;
}

/* --- モバイル --- */
@media (max-width: 1024px) {
  .flow-svg-line { display: none; }
  .flow-step {
    flex-direction: column !important;
    margin-bottom: 28px;
    align-items: stretch;
  }
  .flow-step .num {
    width: 44px; height: 44px; min-width: 44px;
    font-size: 16px;
    margin: 0 auto 12px;
    align-self: center;
    order: -1;          /* 常にカードの上に表示 */
  }
  .flow-step .num small { font-size: 6px; }
  .flow-card {
    flex: 1 1 100%;
    max-width: 100%;
    flex-direction: column;
    order: 0;           /* numの下に統一 */
  }
  .flow-connector { display: none; }
  .flow-empty { display: none; }
  .flow-step .step-img { width: 100%; min-width: 100%; height: 180px; }
  .flow-step .step-content { padding: 16px; }
  .flow-step .step-content h3 { font-size: 16px; text-align: center; }
  .flow-step .step-content p { font-size: 13px; }
}
.card:hover { transform: translateY(-4px); box-shadow: 0 10px 30px rgba(10,61,98,.08); }
.card .icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--color-soft);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 900;
  margin: 0 auto 18px;
}
.card h3 { color: var(--color-primary); margin-bottom: 12px; font-size: 19px; }
.card p { color: var(--color-muted); font-size: 15px; }

/* ---------- 会社情報テーブル ---------- */
.info-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
}
.info-table th,
.info-table td {
  padding: 20px 24px;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
  font-size: 15px;
}
.info-table th {
  width: 200px;
  background: var(--color-soft);
  color: var(--color-primary);
  font-weight: 600;
}

/* ---------- お知らせ ---------- */
.news-list { list-style: none; }
.news-list li {
  display: flex;
  gap: 24px;
  padding: 20px 0;
  border-bottom: 1px solid var(--color-border);
  align-items: baseline;
  flex-wrap: wrap;
}
.news-list .date { color: var(--color-muted); font-size: 14px; min-width: 110px; }
.news-list .tag {
  background: var(--color-primary);
  color: #fff;
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 3px;
  letter-spacing: 1px;
}
.news-list a { color: var(--color-text); }
.news-list a:hover { color: var(--color-accent); }

/* ---------- ボタン ---------- */
.btn {
  display: inline-block;
  padding: 14px 36px;
  background: var(--color-accent);
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background .2s, transform .2s;
  letter-spacing: 2px;
}
.btn:hover { background: #922b1f; color: #fff; text-decoration: none; transform: translateY(-2px); }
.btn.outline { background: transparent; border: 2px solid #fff; }
.btn.outline:hover { background: #fff; color: var(--color-primary); }

.text-center { text-align: center; }

/* ---------- CTA ---------- */
.cta {
  background: var(--color-primary);
  color: #fff;
  text-align: center;
  padding: 80px 24px;
}
.cta h2 { font-size: 28px; margin-bottom: 16px; }
.cta p { margin-bottom: 32px; opacity: .9; }

/* ---------- フォーム ---------- */
.form {
  max-width: 720px;
  margin: 0 auto;
  background: #fff;
  padding: 48px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
}
.form-group { margin-bottom: 24px; }
.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--color-primary);
  font-size: 14px;
}
.form-group .req { color: var(--color-accent); font-size: 12px; margin-left: 6px; }
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  font-size: 15px;
  font-family: inherit;
}
.form-group textarea { min-height: 160px; resize: vertical; }
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-primary);
}

/* ---------- フッター ---------- */
.footer-wave {
  position: relative;
  margin-top: -1px;
  line-height: 0;
}
.footer-wave svg {
  display: block;
  width: 100%;
  height: 60px;
}
.site-footer {
  background: #17222e;
  color: #b7c0cb;
  padding: 0 24px 30px;
}
.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  padding: 40px 0;
  border-bottom: 1px solid #2d3a48;
}
.footer-logo {
  display: inline-block;
  margin-bottom: 16px;
  transition: opacity .3s;
}
.footer-logo:hover { opacity: .7; text-decoration: none; }
.footer-logo img {
  width: 140px;
  height: auto !important;
}
.footer-inner h4 {
  color: #fff;
  margin-bottom: 16px;
  font-size: 14px;
  position: relative;
  padding-bottom: 10px;
}
.footer-inner h4::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 24px;
  height: 2px;
  background: var(--color-accent);
}
.footer-inner ul { list-style: none; }
.footer-inner li { margin-bottom: 10px; font-size: 14px; }
.footer-inner a {
  color: #b7c0cb;
  position: relative;
  transition: color .3s, padding-left .3s;
}
.footer-inner a:hover {
  color: #fff;
  padding-left: 6px;
}
.footer-company p { font-size: 13px; line-height: 1.9; }
.footer-bottom {
  max-width: var(--max-width);
  margin: 0 auto;
  text-align: center;
  padding-top: 24px;
}
.footer-line {
  width: 60px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-accent), transparent);
  margin: 0 auto 16px;
  animation: footerPulse 3s ease-in-out infinite;
}
@keyframes footerPulse {
  0%, 100% { width: 60px; opacity: .6; }
  50% { width: 120px; opacity: 1; }
}
.footer-bottom p {
  font-size: 12px;
  color: #6b7785;
  margin: 0;
}

/* ---------- 下層ページヘッダー ---------- */
.page-head {
  background:
    linear-gradient(135deg, rgba(10,61,98,.88), rgba(10,61,98,.6)),
    linear-gradient(135deg, #264b66, #0a3d62);
  color: #fff;
  padding: 80px 24px;
  text-align: center;
}
.page-head h1 { font-size: clamp(26px, 3.5vw, 36px); letter-spacing: 3px; }
.page-head .en { display: block; font-size: 12px; letter-spacing: 4px; color: var(--color-accent); margin-top: 8px; }

/* ---------- レスポンシブ ---------- */
@media (max-width: 1024px) {
  .header-inner { padding: 14px 16px; }
  .hero { padding: 70px 20px 80px; }
  .page-head { padding-top: 100px; }
  .section { padding: 60px 20px; }
  .info-table th { width: 120px; padding: 14px 12px; font-size: 13px; }
  .info-table td { padding: 14px 12px; font-size: 14px; }
  .form { padding: 28px 20px; }
  .footer-inner { grid-template-columns: 1fr; gap: 28px; }
  .footer-logo img { width: 120px; height: auto !important; }
}

/* ---------- 主要設備スライダー ---------- */
.equip-slider {
  position: relative;
  width: 100%;
  overflow: hidden;
  padding: 10px 0 20px;
  mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
}
.equip-track {
  display: flex;
  gap: 24px;
  width: max-content;
  animation: equipScroll 70s linear infinite;
}
.equip-slider:hover .equip-track {
  animation-play-state: paused;
}
@keyframes equipScroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.equip-card {
  flex: 0 0 calc((100vw - 48px - 72px) / 4);
  max-width: 300px;
  min-width: 220px;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,.04);
  transition: transform .25s, box-shadow .25s;
}
.equip-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 24px rgba(10,61,98,.12);
}
.equip-img {
  width: 100%;
  height: 170px;
  background-size: cover;
  background-position: center;
  background-color: #eee;
}
.equip-body {
  padding: 16px 18px 20px;
}
.equip-body h3 {
  font-size: 15px;
  color: var(--color-primary);
  margin-bottom: 8px;
  line-height: 1.4;
}
.equip-body p {
  font-size: 12.5px;
  color: var(--color-muted);
  line-height: 1.7;
  margin: 0;
}
.equip-note {
  text-align: center;
  font-size: 12.5px;
  color: var(--color-muted);
  margin-top: 24px;
  line-height: 1.8;
}
.section-lead {
  text-align: center;
  color: var(--color-muted);
  margin-top: -8px;
  margin-bottom: 28px;
  font-size: 14px;
}

@media (max-width: 1024px) {
  .equip-card { flex: 0 0 calc((100vw - 48px - 48px) / 3); }
}
@media (max-width: 1024px) {
  .equip-card { flex: 0 0 calc((100vw - 32px - 24px) / 2); min-width: 180px; }
  .equip-img { height: 140px; }
  .equip-track { animation-duration: 55s; }
}
@media (max-width: 480px) {
  .equip-card { flex: 0 0 78%; }
}

/* ---------- スクロールフェードイン ---------- */
.fade-in {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity .9s ease, transform .9s ease;
  will-change: opacity, transform;
}
.fade-in.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.fade-in.delay-1 { transition-delay: .12s; }
.fade-in.delay-2 { transition-delay: .24s; }
.fade-in.delay-3 { transition-delay: .36s; }
.fade-in.delay-4 { transition-delay: .48s; }

@media (prefers-reduced-motion: reduce) {
  .fade-in { opacity: 1; transform: none; transition: none; }
  .hero-slide { transition: opacity .4s ease; transform: none; }
  ._txt { opacity: 1; transform: none; clip-path: none; transition: none; }
  .js-txt-up { opacity: 1; }
}

/* ---------- 認定・加盟バナー ---------- */
.cert-banner {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 40px;
  align-items: center;
  max-width: 1040px;
  margin: 56px auto 0;
  padding: 36px 40px;
  background: linear-gradient(135deg, #fff 0%, #f6f8fb 100%);
  border: 1px solid var(--color-border);
  border-left: 6px solid var(--color-accent);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(10,61,98,.08);
  position: relative;
}
.cert-banner::before {
  content: "";
  position: absolute;
  top: 16px;
  right: 20px;
  width: 58px;
  height: 58px;
  background: radial-gradient(circle, var(--color-accent) 0%, var(--color-accent) 60%, transparent 61%);
  opacity: .08;
  border-radius: 50%;
}
.cert-img {
  display: block;
  position: relative;
  width: 100%;
  aspect-ratio: 7/10;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(0,0,0,.12);
  transition: transform .3s, box-shadow .3s;
}
.cert-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}
.cert-img:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 14px 30px rgba(0,0,0,.18);
}
.cert-zoom {
  position: absolute;
  left: 50%;
  bottom: 10px;
  transform: translateX(-50%);
  background: rgba(10,61,98,.9);
  color: #fff;
  font-size: 11px;
  letter-spacing: 1px;
  padding: 5px 12px;
  border-radius: 3px;
  white-space: nowrap;
}
.cert-body .cert-eyebrow {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 3px;
  color: var(--color-accent);
  font-weight: 700;
  margin-bottom: 10px;
  padding: 4px 10px;
  border: 1px solid var(--color-accent);
  border-radius: 2px;
}
.cert-body h3 {
  color: var(--color-primary);
  font-size: 21px;
  line-height: 1.5;
  margin-bottom: 14px;
}
.cert-body p {
  color: var(--color-muted);
  font-size: 14.5px;
  line-height: 1.9;
  margin-bottom: 18px;
}
.cert-body strong {
  color: var(--color-primary);
  font-weight: 700;
}
.cert-points {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
}
.cert-points li {
  font-size: 13.5px;
  color: var(--color-primary);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}
.cert-points li span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  background: var(--color-accent);
  color: #fff;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 700;
}

@media (max-width: 820px) {
  .cert-banner {
    grid-template-columns: 1fr;
    padding: 28px 24px;
    gap: 24px;
    text-align: center;
  }
  .cert-img {
    max-width: 220px;
    margin: 0 auto;
  }
  .cert-body h3 { font-size: 18px; }
  .cert-points {
    justify-content: center;
  }
}

/* ---------- 画像保存防止 ---------- */
img,
.card-img,
.equip-img,
.step-img,
.hero-slide,
.cert-img {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
  -khtml-user-drag: none;
  -moz-user-drag: none;
  -o-user-drag: none;
  user-drag: none;
  pointer-events: auto;
  -webkit-touch-callout: none;
}
img {
  pointer-events: none;
}
.logo img,
.cert-img img {
  pointer-events: none;
}

/* ---------- Instagram セクション ---------- */
.ig-section {
  background: #fafafa;
}
.ig-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 40px;
  align-items: center;
  max-width: 880px;
  margin: 0 auto;
  padding: 48px 52px;
  background: linear-gradient(135deg, #fff 0%, #fef6f9 100%);
  border: 1px solid var(--color-border);
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0,0,0,.05);
  position: relative;
  overflow: hidden;
}
.ig-card::before {
  content: "";
  position: absolute;
  top: -60px;
  right: -60px;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
  opacity: .08;
  filter: blur(10px);
}
.ig-icon {
  width: 90px;
  height: 90px;
  border-radius: 22px;
  background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 24px rgba(220,39,67,.35);
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}
.ig-text {
  position: relative;
  z-index: 1;
}
.ig-text .ig-eyebrow {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 3px;
  color: #dc2743;
  font-weight: 700;
  margin-bottom: 8px;
}
.ig-text h2 {
  font-size: clamp(18px, 2.4vw, 24px);
  color: var(--color-primary);
  margin-bottom: 12px;
  line-height: 1.5;
}
.ig-text p {
  color: var(--color-muted);
  font-size: 14.5px;
  line-height: 1.9;
  margin-bottom: 20px;
}
.ig-btn {
  display: inline-flex;
  align-items: center;
  background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
  color: #fff !important;
  font-weight: 700;
  font-size: 14.5px;
  padding: 12px 26px;
  border-radius: 999px;
  text-decoration: none;
  box-shadow: 0 6px 18px rgba(220,39,67,.3);
  transition: transform .2s, box-shadow .2s;
}
.ig-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(220,39,67,.4);
}

@media (max-width: 720px) {
  .ig-card {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 36px 26px;
    text-align: center;
  }
  .ig-icon { margin: 0 auto; width: 72px; height: 72px; border-radius: 18px; }
  .ig-icon svg { width: 38px; height: 38px; }
}

/* ---------- フッター Instagram リンク ---------- */
.footer-sns {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}
.footer-sns a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(45deg, #f09433, #dc2743, #bc1888);
  color: #fff;
  transition: transform .2s, box-shadow .2s;
}
.footer-sns a:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(220,39,67,.35);
}

/* ---------- Instagram 3投稿グリッド ---------- */
.ig-lead {
  text-align: center;
  color: var(--color-muted);
  line-height: 2;
  margin: -8px 0 36px;
  font-size: 14.5px;
}
.ig-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: 1100px;
  margin: 0 auto;
  align-items: start;
  justify-items: center;
}
.ig-grid .instagram-media {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 360px !important;
  border-radius: 10px !important;
  box-shadow: 0 6px 20px rgba(0,0,0,.08) !important;
}
@media (max-width: 960px) {
  .ig-grid { grid-template-columns: repeat(2, 1fr); }
  .ig-grid .instagram-media:nth-child(3) { grid-column: 1 / -1; max-width: 360px !important; }
}
@media (max-width: 640px) {
  .ig-grid { grid-template-columns: 1fr; gap: 18px; }
  .ig-grid .instagram-media:nth-child(3) { grid-column: auto; }
}

/* ---------- ヒーロー右下 認定バッジ ---------- */
.hero-badge {
  position: absolute;
  right: 32px;
  bottom: 32px;
  z-index: 5;
  display: flex;
  align-items: stretch;
  background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 8px;
  overflow: hidden;
  text-decoration: none;
  color: #fff;
  box-shadow: 0 12px 30px rgba(0,0,0,.35);
  opacity: 0;
  transform: translateY(20px);
  animation: heroBadgeIn .9s ease .8s forwards;
  transition: transform .25s, box-shadow .25s;
  max-width: 340px;
}
.hero-badge:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 38px rgba(0,0,0,.45);
}
@keyframes heroBadgeIn {
  to { opacity: 1; transform: translateY(0); }
}
.hero-badge-body {
  padding: 14px 16px 12px;
  flex: 1;
  min-width: 170px;
}
.hero-badge-title {
  font-size: 14.5px;
  font-weight: 700;
  line-height: 1.55;
  letter-spacing: .5px;
  margin-bottom: 10px;
  color: #fff;
}
.hero-badge-title .hl {
  color: #ffd34d;
}
.hero-badge-cta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  background: #fff;
  color: #1a1a1a;
  padding: 5px 12px;
  border-radius: 2px;
  font-weight: 700;
  letter-spacing: .5px;
}
.hero-badge-cta span {
  font-size: 14px;
  line-height: 1;
  transform: translateY(-1px);
}
.hero-badge-thumb {
  width: 80px;
  flex-shrink: 0;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
}
.hero-badge-thumb img {
  width: 100%;
  height: 100%;
  max-height: 82px;
  object-fit: cover;
  object-position: top center;
  border-radius: 2px;
  display: block;
}
@media (max-width: 1024px) {
  .hero-badge {
    right: 16px;
    bottom: 16px;
    max-width: 320px;
  }
  .hero-badge-body { padding: 14px 16px 12px; min-width: 160px; }
  .hero-badge-title { font-size: 14px; }
  .hero-badge-thumb { width: 76px; }
  .hero-badge-thumb img { max-height: 78px; }
}
@media (max-width: 480px) {
  .hero-badge { max-width: 280px; }
  .hero-badge-body { padding: 12px 14px 10px; }
  .hero-badge-title { font-size: 13px; }
  .hero-badge-thumb { width: 64px; }
}

/* ========== 記事ページ共通 ========== */
.article-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}
.article-date {
  color: var(--color-muted);
  font-size: 14px;
}
.article-tag {
  background: var(--color-primary);
  color: #fff;
  font-size: 11px;
  padding: 3px 12px;
  border-radius: 3px;
  letter-spacing: 1px;
}
.article-tag.media { background: #c0392b; }
.article-title {
  font-size: clamp(20px, 3.5vw, 28px);
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1.55;
  margin-bottom: 32px;
  padding-bottom: 22px;
  border-bottom: 2px solid var(--color-border);
}
.article-body {
  font-size: 16px;
  line-height: 1.9;
  color: var(--color-text);
}
.article-body p { margin-bottom: 1.5em; }
.article-body h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--color-primary);
  margin: 2em 0 0.8em;
  padding-left: 14px;
  border-left: 4px solid var(--color-accent);
}
.article-body strong { color: var(--color-primary); }
.article-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5em;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.article-list li {
  padding-left: 20px;
  position: relative;
}
.article-list li::before {
  content: '▶';
  position: absolute;
  left: 0;
  color: var(--color-accent);
  font-size: 10px;
  top: 6px;
}
/* YouTube埋め込み（レスポンシブ） */
.video-wrap {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: 8px;
  margin: 32px 0;
  box-shadow: 0 4px 20px rgba(0,0,0,.12);
}
.video-wrap iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border: 0;
}
.article-info-box {
  background: var(--color-soft);
  border-radius: 8px;
  padding: 24px 28px;
  margin-top: 32px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.article-info-row {
  display: flex;
  gap: 20px;
  font-size: 14px;
  align-items: baseline;
  flex-wrap: wrap;
}
.article-info-row .label {
  font-weight: 700;
  color: var(--color-primary);
  min-width: 80px;
}
.article-hero {
  margin: 0 0 36px;
  border-radius: 8px;
  overflow: hidden;
}
.article-hero img {
  width: 100%;
  height: auto;
  display: block;
}

