/* Quality solution page (食品の品質課題解決).
   Extends page-food-inspection.css (shared layout/sidebar/FAQ/hero). */

:root {
  --qs-teal:       #008F8D;
  --qs-teal-dark:  #00736f;
  --qs-teal-soft:  #E6F4F3;
  --qs-ink:        #061C3D;
}

/* ---- Layout padding (matches 検査の依頼方法 / sn-req-body-layout) ---- */
.qs-page-layout {
  padding: 40px 40px 54px;
}

/* Header band (matches sn-req-title, no hero image). */
.qs-hero-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 40px 0;
}
.qs-hero { display: flex; }
.qs-hero-title {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  min-height: 64px;
  padding: 10px 24px;
  margin: 0;
  background: rgba(0, 143, 141, 0.85);
  backdrop-filter: blur(6px);
  color: #fff;
  font-weight: 700;
  font-size: 32px;
  line-height: 1.3;
  letter-spacing: -0.02em;
}
.qs-breadcrumb-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 40px 0;
}

/* Sidebar (teal header + link box, req-sidebar style). */
.qs-sidebar {
  width: 100%;
  position: sticky;
  /* Offset below sticky .site-header-wrap (105px). Matches .sn-req-sidebar. */
  top: 129px;
}
/* Sidebar text sizing — scoped so we don't override mail-magazine.css's
   responsive scale. Explicit font-size per breakpoint below. */
.qs-sidebar .sn-mm-sidebar-title { font-size: 16px; }
.qs-sidebar .sn-mm-sidebar-link  { font-size: 16px; }
.qs-sidebar-menu {
  display: flex;
  flex-direction: column;
  border-radius: 12px;
  overflow: hidden;
}
.qs-sidebar-title {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  text-align: left;
  min-height: 60px;
  padding: 12px 16px;
  background: var(--qs-teal);
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  line-height: 1.4;
  border-bottom: 1px solid #fff;
}
.qs-sidebar-link {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  text-align: left;
  min-height: 60px;
  padding: 12px 16px;
  background: #E9ECEE;
  color: var(--qs-teal);
  font-weight: 700;
  font-size: 16px;
  line-height: 1.5;
  text-decoration: none;
  border-bottom: 1px solid #fff;
  transition: background .15s ease, color .15s ease;
}
.qs-sidebar-link:last-child { border-bottom: none; }
.qs-sidebar-link.is-active,
.qs-sidebar-link:hover {
  background: var(--qs-teal);
  color: #fff;
}

/* Section title (centered, rules on both sides — mockup ⑥⑧). */
.qs-section-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 31px;
  text-align: center;
  font-weight: 700;
  font-size: 32px;
  line-height: 40px;
  letter-spacing: -0.02em;
  color: var(--qs-teal);
  margin: 0 0 28px;
}
.qs-section-title::before,
.qs-section-title::after {
  content: "";
  flex: 1;
  height: 0;
  border-top: 1px solid var(--qs-teal);
}

/* ---- Intro (Figma: Frame 1000007079) ---- */
.qs-intro-head {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 31px;
  margin-bottom: 24px;
}
.qs-intro-head::before,
.qs-intro-head::after {
  content: "";
  flex: 1;
  height: 0;
  border-top: 1px solid var(--qs-teal);
}
.qs-intro-heading {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin: 0;
  text-align: center;
}
.qs-intro-lead {
  font-weight: 700;
  font-size: 24px;
  line-height: 32px;
  letter-spacing: -0.02em;
  color: var(--qs-ink);
}
.qs-intro-main {
  font-weight: 700;
  font-size: 32px;
  line-height: 40px;
  letter-spacing: -0.02em;
  color: var(--qs-teal);
}
.qs-intro {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  min-height: 320px;
  padding: 0;
  border-radius: 8px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.qs-intro-sub {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 446px;
  padding: 20px 28px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 3px 4px 4px rgba(0, 0, 0, 0.33);
  backdrop-filter: blur(4.5px);
  border-radius: 2px;
  font-weight: 700;
  font-size: 24px;
  line-height: 32px;
  letter-spacing: -0.02em;
}
.qs-intro-sub-lead { color: #061C3D; }
.qs-intro-sub-main { color: #E7380D; }

/* ---- Box checklist (おすすめ / 実施例) — Figma Group 1000007240 ---- */
.qs-checkbox-section {
  position: relative;
  overflow: hidden;            /* clip the top half of the ellipse */
  background: #DDEBEB;
  border-radius: 10px;
  padding: 0 0 36px;
}
/* Title ellipse: wider than the box, pulled up ~half its height so only the
   bottom half (the arch) shows. */
.qs-band-title {
  width: 112%;
  margin-left: -6%;
  margin-top: -68px;
  margin-bottom: 28px;
  height: 155px;
  border-radius: 50%;
  background: #00C48A;
  color: #fff;
  font-weight: 700;
  font-size: 32px;
  line-height: 40px;
  letter-spacing: -0.02em;
  text-align: center;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 26px;
}
.qs-check-card {
  background: #fff;
  border-radius: 8px;
  padding: 36px 48px 36px 75px;
  margin: 0 30px;
}
.qs-check-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.qs-check-list li {
  display: flex;
  align-items: center;
  gap: 32px;
}
.qs-check-icon {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  display: block;
}
.qs-check-text {
  font-weight: 500;
  font-size: 24px;
  line-height: 32px;
  color: #061C3D;
}

/* ---- Flow (製造現場の支援の流れ) — Figma Group 1000007295 ---- */
.qs-flow {
  display: flex;
  flex-direction: column;
  gap: 63px;
  background: #fff;
  box-shadow: 0 4px 50px rgba(0, 0, 0, 0.15);
  border-radius: 16px;
  padding: 50px 53px;
}
.qs-flow-step {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 108px;
  padding: 12px 32px;
  border: 2px solid var(--qs-teal);
  border-radius: 10px;
}
/* Teal down-arrow between steps (arrow_down.svg). */
.qs-flow-step:not(:first-child)::before {
  content: "";
  position: absolute;
  top: -44px;
  left: 50%;
  transform: translateX(-50%);
  width: 44px;
  height: 27px;
  background: url('../../images/svg/arrow_down.svg') center / contain no-repeat;
}
.qs-flow-num {
  flex: 0 0 60px;
  font-family: 'Work Sans', 'Noto Sans JP', sans-serif;
  font-weight: 700;
  font-size: 64px;
  line-height: 1;
  letter-spacing: 0.9px;
  color: var(--qs-teal);
}
.qs-flow-step-title {
  flex: 0 0 213px;
  margin: 0;
  font-family: 'Noto Sans JP', sans-serif;
  font-weight: 700;
  font-size: 25.6px;
  line-height: 28px;
  letter-spacing: 0.9px;
  color: var(--qs-teal);
}
.qs-flow-step-desc {
  flex: 1;
  margin: 0;
  font-weight: 500;
  font-size: 18px;
  line-height: 29px;
  letter-spacing: 0.9px;
  color: #061C3D;
}

/* 分析×課題解決 section (single image image_159.png). */
.qs-analysis img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
}

/* FAQ / 一例: drop margin-bottom (spacing comes from .sn-page-main-content gap). */
.sn-faq-section { margin-bottom: 0; }

/* ---- クロージング (サナテックなら、) — 24/41, highlight teal ---- */
.qs-closing-text {
  margin: 0;
  font-weight: 400;
  font-size: 24px;
  line-height: 41px;
  color: #061C3D;
}
.qs-closing-lead {            /* サナテックなら、 */
  font-weight: 700;
  color: #061C3D;
}
.qs-closing-text .qs-hl {     /* emphasis span — teal, not bold */
  font-weight: 400;
  color: #008F8D;
}

/* ---- Responsive ---- */
/* Keep tablet 2-col but narrow the sidebar so main gets more room. */
@media (max-width: 991px) {
  /* Title shares the links' type scale (desktop is 16px for both). */
  .qs-sidebar .sn-mm-sidebar-title { font-size: 14px; line-height: 20px; }
  .qs-sidebar .sn-mm-sidebar-link  { font-size: 14px; line-height: 20px; }
  /* Ease content spacing so a narrower main stays readable. */
  .qs-hero-title { font-size: 28px; min-height: 60px; }
  .qs-intro-head { gap: 20px; margin-bottom: 20px; }
  .qs-intro-lead { font-size: 20px; line-height: 28px; }
  .qs-intro-main { font-size: 26px; line-height: 34px; }
  .qs-intro { min-height: 280px; }
  .qs-intro-sub { font-size: 20px; line-height: 28px; padding: 18px 22px; max-width: 380px; }
  .qs-section-title { font-size: 26px; line-height: 34px; gap: 20px; }
  .qs-band-title { height: 130px; margin-top: -56px; font-size: 26px; line-height: 34px; padding-bottom: 22px; }
  .qs-check-card { padding: 28px 32px 28px 48px; margin: 0 20px; }
  .qs-check-list { gap: 22px; }
  .qs-check-list li { gap: 20px; }
  .qs-check-icon { flex-basis: 40px; width: 40px; height: 40px; }
  .qs-check-text { font-size: 20px; line-height: 28px; }
  .qs-flow { padding: 36px 32px; gap: 48px; }
  .qs-flow-num { flex-basis: 52px; font-size: 52px; }
  .qs-flow-step-title { flex: 0 0 180px; font-size: 22px; line-height: 26px; }
  .qs-flow-step-desc { font-size: 16px; line-height: 26px; }
  .qs-closing-text { font-size: 20px; line-height: 34px; }
}

@media (max-width: 768px) {
  .qs-intro-head { gap: 14px; margin-bottom: 18px; }
  .qs-intro-lead { font-size: 16px; line-height: 24px; }
  .qs-intro-main { font-size: 22px; line-height: 30px; }
  .qs-intro { min-height: 220px; padding: 0; }
  .qs-intro-sub { max-width: 100%; font-size: 18px; line-height: 26px; padding: 16px 18px; }
  /* Full-width compact sidebar — same responsive style as the shared sidebars. */
  .qs-sidebar { position: static; }
  .qs-sidebar .sn-mm-sidebar-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1px;
    overflow: hidden;
    border-radius: 12px;
    background: #fff;
    margin-bottom: 20px;
  }
  .qs-sidebar .sn-mm-sidebar-title,
  .qs-sidebar .sn-mm-sidebar-link { min-height: 52px; padding: 12px 16px; }
  .qs-sidebar .sn-mm-sidebar-title {
    grid-column: 1 / -1;
    border-radius: 0;
    font-size: 14px;
    line-height: 20px;
  }
  .qs-sidebar .sn-mm-sidebar-link  {
    border: 0;
    border-radius: 0 !important;
    font-size: 14px;
    line-height: 20px;
  }
  .qs-section-title { font-size: 20px; gap: 12px; }
  .qs-checkbox-section { padding: 0 0 24px; }
  .qs-band-title { height: 110px; margin-top: -46px; margin-bottom: 20px; font-size: 19px; line-height: 26px; padding-bottom: 18px; }
  .qs-check-card { padding: 20px 18px; margin: 0 16px; }
  .qs-check-list { gap: 16px; }
  .qs-check-list li { gap: 14px; }
  .qs-check-icon { flex-basis: 34px; width: 34px; height: 34px; }
  .qs-check-text { font-size: 16px; line-height: 24px; }
  .qs-flow { padding: 28px 18px; gap: 34px; }
  .qs-flow-step { flex-wrap: wrap; padding: 16px 18px; min-height: 0; }
  /* Small arrow between steps — matches fqs-numflow (page-fqs-management-system.css). */
  .qs-flow-step:not(:first-child)::before { top: -26px; width: 24px; height: 16px; opacity: 0.85; }
  .qs-flow-num { flex-basis: 44px; font-size: 44px; }
  .qs-flow-step-title { flex: 1 1 auto; font-size: 20px; line-height: 26px; }
  .qs-flow-step-desc { flex: 1 1 100%; margin-top: 8px; font-size: 15px; line-height: 25px; }
  .qs-closing-text { font-size: 17px; line-height: 30px; }
  .qs-hero-wrap, .qs-breadcrumb-wrap { padding-left: 16px; padding-right: 16px; }
  .qs-hero-title { font-size: 22px; min-height: 52px; padding: 8px 16px; }
  .qs-page-layout { padding: 24px 16px 40px; }
}

/* Small landscape phones — content + sidebar compact */
@media (max-width: 480px) {
  .qs-sidebar .sn-mm-sidebar-nav { margin-bottom: 16px; }
  .qs-sidebar .sn-mm-sidebar-title,
  .qs-sidebar .sn-mm-sidebar-link { min-height: 48px; padding: 10px 14px; }
  .qs-sidebar .sn-mm-sidebar-title,
  .qs-sidebar .sn-mm-sidebar-link  { font-size: 12px; line-height: 1.45; }
  /* Content */
  .qs-hero-wrap, .qs-breadcrumb-wrap { padding-left: 12px; padding-right: 12px; }
  .qs-hero-title { font-size: 18px; min-height: 46px; padding: 8px 14px; }
  .qs-intro-head { gap: 10px; margin-bottom: 14px; }
  .qs-intro-lead { font-size: 14px; line-height: 22px; }
  .qs-intro-main { font-size: 19px; line-height: 26px; }
  .qs-intro { min-height: 200px; }
  .qs-intro-sub { font-size: 15px; line-height: 22px; padding: 14px 16px; }
  .qs-section-title { font-size: 17px; line-height: 24px; gap: 10px; margin-bottom: 22px; }
  .qs-band-title { height: 96px; margin-top: -40px; font-size: 16px; line-height: 22px; padding-bottom: 14px; }
  .qs-check-card { padding: 16px 14px; margin: 0 12px; border-radius: 6px; }
  .qs-check-list { gap: 14px; }
  .qs-check-list li { gap: 12px; }
  .qs-check-icon { flex-basis: 28px; width: 28px; height: 28px; }
  .qs-check-text { font-size: 14px; line-height: 22px; }
  .qs-flow { padding: 22px 14px; gap: 30px; border-radius: 12px; }
  .qs-flow-step { padding: 14px 14px; }
  .qs-flow-step:not(:first-child)::before { top: -24px; }
  .qs-flow-num { flex-basis: 38px; font-size: 36px; }
  .qs-flow-step-title { font-size: 17px; line-height: 24px; }
  .qs-flow-step-desc { font-size: 14px; line-height: 22px; }
  .qs-closing-text { font-size: 15px; line-height: 26px; }
  .qs-page-layout { padding: 20px 12px 32px; }
}

/* Small portrait phones */
@media (max-width: 420px) {
  .qs-hero-title { font-size: 17px; padding: 8px 12px; }
  .qs-intro-main { font-size: 17px; line-height: 24px; }
  .qs-intro-sub { font-size: 14px; line-height: 21px; padding: 12px 14px; }
  .qs-band-title { height: 88px; margin-top: -36px; font-size: 15px; line-height: 20px; padding-bottom: 12px; }
  .qs-check-text { font-size: 13px; line-height: 20px; }
  .qs-flow-num { flex-basis: 32px; font-size: 30px; }
  .qs-flow-step-title { font-size: 16px; }
  .qs-flow-step-desc { font-size: 13px; line-height: 20px; }
  .qs-closing-text { font-size: 14px; line-height: 24px; }
}

/* Very small phones (iPhone SE 1st gen) */
@media (max-width: 359px) {
  .qs-sidebar .sn-mm-sidebar-title,
  .qs-sidebar .sn-mm-sidebar-link { min-height: 44px; padding: 8px 12px; }
  .qs-sidebar .sn-mm-sidebar-title { font-size: 12px; line-height: 17px; }
  .qs-sidebar .sn-mm-sidebar-link  { font-size: 12px; line-height: 17px; }
  /* Content */
  .qs-hero-title { font-size: 15px; padding: 6px 10px; min-height: 42px; }
  .qs-intro-lead { font-size: 12px; line-height: 20px; }
  .qs-intro-main { font-size: 15px; line-height: 22px; }
  .qs-intro { min-height: 180px; }
  .qs-intro-sub { font-size: 13px; line-height: 19px; padding: 10px 12px; }
  .qs-section-title { font-size: 15px; }
  .qs-band-title { height: 78px; margin-top: -30px; font-size: 14px; line-height: 18px; padding-bottom: 10px; }
  .qs-check-icon { flex-basis: 24px; width: 24px; height: 24px; }
  .qs-check-text { font-size: 12px; line-height: 18px; }
  .qs-flow { padding: 18px 12px; gap: 24px; }
  .qs-flow-num { font-size: 26px; }
  .qs-flow-step-title { font-size: 14px; line-height: 20px; }
  .qs-flow-step-desc { font-size: 12px; line-height: 18px; }
}
