/* Front page (トップページ). Enqueued only when is_front_page(). */

/* ─────────────────────────────────────────
   SECTION BADGE  (①②③⑤⑥ red circles)
───────────────────────────────────────── */
.sec-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-weight: 900;
  font-size: .95rem;
  font-family: var(--font-en);
  flex-shrink: 0;
}

.sec-badge-red {
  border: 3px solid var(--accent-red);
  color: var(--accent-red);
}

/* ─────────────────────────────────────────
   HERO SLIDER  ①
───────────────────────────────────────── */
.hero-slider-section {
  position: relative;
  margin: clamp(10px, 3vw, 40px) clamp(10px, 3vw, 40px) 0;
  border-radius: clamp(20px, 3.5vw, 48px);
  /* Container query root: cqw/cqi in every descendant text (including
     .hero-vertical-label outside .hero-fixed) references the slide width, so
     text scales in proportion as the slide shrinks. */
  container-type: inline-size;
  container-name: hero-slider;
}

.hero-swiper {
  width: 100%;
  aspect-ratio: 150 / 90; /* = 1200/720 (5/3) */
  background: #ffffff;
  border-radius: clamp(20px, 3.5vw, 48px);
  overflow: hidden;
}

@media (min-width: 1280px) {
  .hero-swiper {
    max-height: 720px;
  }
}
/* Smoother slide transition: easeInOutCubic + GPU hint. !important beats
   swiper-bundle's inline transition-timing-function. */
.hero-swiper .swiper-wrapper {
  transition-timing-function: cubic-bezier(0.65, 0, 0.35, 1) !important;
  will-change: transform;
}
/* Slides are background images only; content is in the fixed overlay .hero-fixed.
   `.hero-swiper .hero-slide` selector wins over swiper-bundle's .swiper-slide{height:auto}. */
.hero-swiper .hero-slide {
  height: 100%;
  width: 100%;
  background-size: cover;
  background-position: center;
  /* Swiper is initialised with spaceBetween:16, so mid-transition a white gap
     is visible between the two slides. Round each slide with the same radius as
     .hero-swiper: without this the incoming slide shows square corners against
     the container's rounded clip, which reads as a corner artifact. */
  border-radius: clamp(20px, 3.5vw, 48px);
  overflow: hidden;
}

/* Fixed (non-sliding) content overlays the slider, anchored bottom-left.
   container-type: size preserves cqw/cqh scaling for content/label. */
.hero-fixed {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  align-items: flex-end;
  container-type: size;
  container-name: hero;
  pointer-events: none; /* swipes pass through to the slider below */
}

/* Each slide gets its own full-cover link → clicking the slide follows that slide's URL.
   .hero-fixed sits above but pointer-events:none lets clicks pass through to the active slide's link. */
.hero-slide-link {
  position: absolute;
  inset: 0;
  z-index: 1;
  cursor: pointer;
}
/* CTA is text-only; hover state fires when the mouse enters the hero area. */
.hero-slider-section:hover .hero-slide-cta { opacity: .85; }

/* Hide swiper pagination dots. */
.hero-swiper .swiper-pagination { display: none; }


/* Vertical teal strip on right */
.hero-vertical-label {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: clamp(6px, 1vw, 10px);
  gap: clamp(6px, 1vw, 10px);
  overflow: hidden;

  position: absolute;
  width: clamp(36px, 4.5vw, 64px);
  height: calc(100% - clamp(20px, 3vw, 40px));
  right: clamp(10px, 2vw, 20px);
  top: clamp(10px, 2vw, 20px);

  background: rgba(0, 143, 141, 0.7);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-radius: clamp(10px, 1.5vw, 16px);
  z-index: 3;
}

.hero-vertical-label span {
  display: block;
  font-family: 'Noto Sans JP', sans-serif;
  font-style: normal;
  font-weight: 700;
  /* 3cqi = 36px at 1200px container width (1280px viewport), capped at 36px */
  font-size: clamp(10px, 3cqi, 36px);
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: #FFFFFF;
  text-align: center;
  writing-mode: vertical-rl;
  text-orientation: mixed;
}

@media (min-width: 1280px) {
  .hero-vertical-label span {
    font-size: 36px;
  }
}

.hero-slide-content {
  position: relative;
  z-index: 2;
  color: #fff;
  max-width: clamp(260px, calc(100% - 110px), 900px);
}

.hero-slide-content::before {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100cqi;
  aspect-ratio: 2400 / 1423;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 2400 1423' preserveAspectRatio='none'%3E%3Cpath fill='%23fff' d='M0,1042.7 A37.3,37.3 0 0 0 37.3,1080 L801.5,1080 A56.5,56.5 0 0 1 858,1136.5 L858,1199.3 A49.7,49.7 0 0 0 907.7,1249 L1053.5,1249 A56.5,56.5 0 0 1 1110,1305.5 L1110,1366.5 A56.5,56.5 0 0 0 1166.5,1423 L0,1423 Z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left bottom;
  background-size: 100% 100%;
  pointer-events: none;
  z-index: -1;
}

@media (min-width: 676px) {
  .hero-slide-content {
    padding: clamp(0rem, 0.5rem, 1.5rem) 0;
  }
}

.hero-slide-sub {
  font-size: clamp(0.7rem, 1.3cqw, 0.95rem);
  color: rgba(255,255,255,.85);
  margin-bottom: .4rem;
}

.hero-slide-title {
  font-family: var(--font);
  /* 3.7cqw = font-size scale theo container width (hero slider). */
  font-size: clamp(1.2rem, 3.7cqw, 2.8rem);
  font-weight: 900;
  line-height: 1.15;
  color: #fff;
  text-shadow: 0 2px 16px rgba(0,0,0,.5);
  margin-bottom: 1.1rem;
}

.hero-slide-bottom {
  display: flex;
  flex-direction: column;
  gap: clamp(6px, 2.5cqi, 48px);
  padding: clamp(16px, 2.5cqi, 32px) clamp(80px, 10cqi, 140px) clamp(4px, 0.6cqi, 12px) 0;
}

.hero-slide-caption {
  font-family: 'Noto Sans JP', sans-serif;
  font-style: normal;
  font-weight: 700;
  /* 2cqi ≈ 24px at 1200px slide (1280px screen), scales down to 10px on mobile
     and up to 40px on screens > 1280px. */
  font-size: clamp(10px, 2cqi, 40px);
  line-height: 1.4;
  letter-spacing: -0.012em;
  color: #243752;
}

@media (max-width: 490px) {
  .hero-slide-caption {
    font-size: 8px;
  }
}

@media (max-width: 380px) {
  .hero-slide-caption {
    font-size: 7px;
  }
}

.hero-slide-cta {
  font-family: 'Roboto Slab', 'Noto Sans JP', serif;
  font-style: normal;
  font-weight: 700;
  /* 4cqi ≈ 48px at 1200px slide (1280px screen), scales to 15px on mobile and up to 80px on screens > 1280px. */
  font-size: clamp(15px, 4cqi, 80px);
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: #008E8C;
  padding: 0;
}

/* Deliberately no min-width:1280px font-size overrides for .hero-slide-caption
   / .hero-slide-cta: a fixed size there would freeze them at their 1280px value
   and cancel the clamp()s above, which are what let them keep growing to their
   40px / 80px ceilings on wider screens. */

/* Slide number indicator */
.hero-slide-indicator {
  position: absolute;
  bottom: 1.4rem;
  left: calc(50% - 17px);
  z-index: 4;
}
.hero-slide-indicator span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--primary);
  color: var(--primary);
  font-weight: 900;
  font-size: .95rem;
  box-shadow: 0 2px 10px rgba(0,0,0,.2);
}

/* Dots */
.hero-slider-dots {
  position: absolute;
  bottom: 1rem;
  right: 54px;
  display: flex;
  gap: 7px;
  z-index: 5;
}
.hero-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,.8);
  background: transparent;
  cursor: pointer;
  padding: 0;
  transition: background .3s;
}
.hero-dot.active { background: #fff; }

/* Arrows */
.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  background: rgba(255,255,255,.18);
  border: none;
  color: #fff;
  font-size: 1.1rem;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
  transition: background .2s;
}
.hero-arrow:hover { background: rgba(255,255,255,.35); }
.hero-arrow-prev { left: .75rem; }
.hero-arrow-next { right: 2.75rem; }

/* ─────────────────────────────────────────
   NEWS ①-1
───────────────────────────────────────── */
/* ─────────────────────────────────────────
   NEWS ①-1 (Redesigned per Figma Specs)
───────────────────────────────────────── */
.news-section-v3 {
  position: relative;
  background: var(--section-bg);
  padding: 2rem 1.5rem 2rem;
  overflow: hidden;
}

.news-section-v3::after {
  content: '';
  position: absolute;
  top: 100px;
  left: 0;
  width: clamp(160px, 28vw, 400px);
  height: 520px;
  background-image: url('../../images/clip_path_01.png');
  background-position: top right;
  background-size: contain;
  background-repeat: no-repeat;
  pointer-events: none;
  z-index: 0;
}

@media (min-width: 1280px) {
  .news-section-v3 { padding-bottom: 70px; }
  .news-section-v3::after {
    width: 600px;
    height: 600px;
    top: 15px;
    left: -160px;
  }
}

.news-v3-card {
  position: relative;
  z-index: 1;
}

.news-v3-card {
  max-width: 1200px;
  margin: 0 auto;
  background: #FFFFFF;
  box-shadow: 0px 4px 15px rgba(0, 0, 0, 0.1);
  border-radius: 28px;
  padding: 25px clamp(20px, 4vw, 47px) 35px;
}

.news-v3-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
}

.news-v3-cols {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: clamp(24px, 5.5vw, 85px);
}

/* Left Column */
.news-v3-left {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  width: max-content;
}

.news-v3-label {
  font-family: 'Noto Sans JP', sans-serif;
  font-style: normal;
  font-weight: 700;
  font-size: clamp(24px, 4vw, 40px);
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: #008E8C;
}

.news-v3-tabs {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-start;
}

/* Vertical Tab Styling */
.news-v3-tab {
  box-sizing: border-box;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  padding: 1px 12px;
  gap: 10px;
  width: fit-content;
  height: clamp(28px, 3.5vw, 35px);
  border-radius: 10px;
  font-family: 'Noto Sans JP', sans-serif;
  font-style: normal;
  font-weight: 700;
  font-size: clamp(13px, 1.8vw, 20px);
  line-height: 1.3;
  cursor: pointer;
  border: 1px solid #D6E6E6;
  transition: all 0.2s ease;
  width: max-content;
  flex: 0 0 auto;
}

/* Tab - All */
.news-v3-tab.tab-all {
  background: #EDEFF2;
  color: #4B5563;
}
.news-v3-tab.tab-all.active {
  background: #008E8C;
  color: #FFFFFF;
  border: 1px solid #D6E6E6;
  box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.15);
}

/* Tab - お知らせ */
.news-v3-tab.tab-notice {
  background: #DDF1F0;
  color: #007C7A;
  border: 1px solid #D6E6E6;
}
.news-v3-tab.tab-notice.active {
  background: #007C7A;
  color: #FFFFFF;
}

/* Tab - ご案内 */
.news-v3-tab.tab-info {
  background: #EDEFF2;
  color: #4B5563;
  border: 1px solid #D6E6E6;
}
.news-v3-tab.tab-info.active {
  background: #4B5563;
  color: #FFFFFF;
}

/* Tab - セミナー */
.news-v3-tab.tab-seminar {
  background: #E5ECFF;
  color: #1E40AF;
  border: 1px solid #D6E6E6;
}
.news-v3-tab.tab-seminar.active {
  background: #1E40AF;
  color: #FFFFFF;
}

/* Hover effects for tabs (only when NOT active) */
.news-v3-tab:not(.active):hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

/* Right Column */
.news-v3-right {
  display: flex;
  flex-direction: column;
}

.news-v3-viewall {
  font-family: 'Noto Sans JP', sans-serif;
  font-style: normal;
  font-weight: 700;
  font-size: 20px;
  line-height: 24px;
  text-decoration-line: underline;
  color: #008E8C;
  transition: color 0.2s;
}
.news-v3-viewall:hover {
  color: #007C7A;
}

/* Mobile-only CTA below the news list (desktop uses .news-v3-viewall in the header). */
.news-v3-viewall-mobile {
  display: none;
}

.news-v3-iframe-wrap {
  width: 100%;
  overflow: hidden;
}

.newsiframe {
  width: 100%;
  height: 260px;
  border: 0;
}

/* List rows use display: table so tag / date / title columns align to the
   widest cell across every row — no explicit column widths needed. */
.news-v3-list {
  display: table;
  width: 100%;
  border-collapse: collapse;
}

.news-v3-empty {
  font-family: 'Noto Sans JP', sans-serif;
  font-weight: 500;
  font-size: clamp(14px, 1.8vw, 18px);
  line-height: 1.6;
  color: var(--text-mid);
  padding: 2rem 0;
  margin: 0;
  text-align: center;
}

.news-v3-row {
  display: table-row;
  transition: all 0.2s ease;
}
/* Three cells per row = table-cell → columns auto-align across every row. */
.news-v3-cell-tag,
.news-v3-date,
.news-v3-text {
  display: table-cell;
  vertical-align: middle;
  padding: 20px 0;
  border-bottom: 1px solid #CCCCCC;
}
/* Tag + date columns shrink to content; title column takes the rest. */
.news-v3-cell-tag,
.news-v3-date {
  width: 1px;
  white-space: nowrap;
  padding-right: clamp(0.75rem, 2vw, 2.5rem);
  /* Neo đầu hàng: title xuống 2+ dòng thì row cao lên, `middle` sẽ đẩy tag/date
     trôi xuống giữa. `top` giữ chúng thẳng hàng với dòng đầu của title. */
  vertical-align: top;
}
/* Date + title share the tag cell's vertical padding so all three columns sit on
   the same baseline (the tag's own padding differs from the 20px/0 shared rule). */
.news-v3-cell-tag,
.news-v3-date,
.news-v3-text {
  padding-top: 30px;
  padding-bottom: 13px;
}
.news-v3-text { width: auto; }

/* Default "All" view (no JS yet, e.g. block-editor preview) — only show the 4
   top-latest rows the server marked data-in-all=1. front-page.php JS adds
   .nv-live when active then filters via .nv-hide — never touches `display` so
   responsive CSS keeps controlling the table ↔ flex layout. */
.news-v3-row[data-in-all="0"]:not(.nv-live) { display: none; }
.news-v3-row.nv-hide { display: none !important; }

/* Edge rows: bỏ padding-top của row đầu và padding/border-bottom của row cuối.
   :first-child/:last-child chỉ đúng khi JS CHƯA filter (editor preview, no-JS) — vì
   row bị .nv-hide vẫn nằm trong DOM nên vẫn khớp :first-child/:last-child. Sau khi
   JS chạy (.nv-live) thì dùng .nv-first/.nv-last do JS gán cho row đang hiển thị. */
.news-v3-row:not(.nv-live):first-child .news-v3-cell-tag,
.news-v3-row:not(.nv-live):first-child .news-v3-date,
.news-v3-row:not(.nv-live):first-child .news-v3-text { padding-top: 0; }
.news-v3-row:not(.nv-live):last-child .news-v3-cell-tag,
.news-v3-row:not(.nv-live):last-child .news-v3-date,
.news-v3-row:not(.nv-live):last-child .news-v3-text { border-bottom: none; padding-bottom: 0; }
/* First / last VISIBLE row after filtering (JS adds .nv-first / .nv-last). */
.news-v3-row.nv-first .news-v3-cell-tag,
.news-v3-row.nv-first .news-v3-date,
.news-v3-row.nv-first .news-v3-text { padding-top: 0; }
.news-v3-row.nv-last .news-v3-cell-tag,
.news-v3-row.nv-last .news-v3-date,
.news-v3-row.nv-last .news-v3-text { border-bottom: none; padding-bottom: 0; }
.news-v3-row.nv-last { border-bottom: none; } /* mobile: border sits on the row itself */

.news-v3-row:hover {
  background: rgba(0, 142, 140, 0.02);
}

/* Badge tags inside rows */
.news-v3-tag {
  box-sizing: border-box;
  display: inline-flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  padding: 1px clamp(10px, 1.5vw, 20px);
  gap: 10px;
  height: clamp(26px, 3vw, 35px);
  font-family: 'Noto Sans JP', sans-serif;
  font-style: normal;
  font-weight: 700;
  font-size: clamp(12px, 1.6vw, 20px);
  line-height: 1.3;
  text-align: center;
  white-space: nowrap;
  flex-shrink: 0;
}

.news-v3-tag.tag-notice {
  width: clamp(80px, 10vw, 120px);
  background: #DDF1F0;
  color: #007C7A;
  border-radius: 30px;
}
.news-v3-tag.tag-info {
  width: clamp(70px, 8vw, 100px);
  background: #EDEFF2;
  color: #4B5563;
  border-radius: 30px;
}
.news-v3-tag.tag-seminar {
  width: clamp(80px, 10vw, 120px);
  background: #E5ECFF;
  color: #1E40AF;
  border-radius: 30px;
}
.news-v3-tag.tag-important {
  width: clamp(60px, 7vw, 90px);
  background: #FEE2E2;
  color: #E7380D;
  border-radius: 30px;
}

/* Date inside rows */
.news-v3-date {
  font-family: 'Noto Sans JP', sans-serif;
  font-style: normal;
  font-weight: 500;
  font-size: clamp(13px, 1.8vw, 20px);
  line-height: 1.4;
  letter-spacing: -0.012em;
  color: #243752;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Text title inside rows */
.news-v3-text {
  font-family: 'Noto Sans JP', sans-serif;
  font-style: normal;
  font-weight: 500;
  font-size: clamp(13px, 1.8vw, 20px);
  line-height: 1.4;
  letter-spacing: -0.012em;
  color: #243752;
  flex-grow: 1;
  transition: color 0.2s;
}
.news-v3-text:hover {
  color: #008E8C;
}

/* ─────────────────────────────────────────
   SERVICE ACCORDION  ③
───────────────────────────────────────── */
.sn-service-section {
  position: relative;
  background: var(--section-bg);
}

.sn-service-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100%;
  max-height: 1369px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.3) 0%, #FFFFFF 100%),
    url('../../images/build-webp/service_bg.webp') top center / cover no-repeat;
  border-radius: 0 16px 16px 0;
  z-index: 0;
  pointer-events: none;
}

.sn-service-section::after {
  content: '';
  position: absolute;
  bottom: -115px;
  left: 0;
  width: clamp(160px, 28vw, 400px);
  height: min(100%, 520px);
  background: url('../../images/clip_path_02.png') bottom left / contain no-repeat;
  pointer-events: none;
  z-index: 1;
}

@media (min-width: 1280px) {
  .sn-service-section::after {
    width: 600px;
    height: 600px;
  }
}

.sn-service-section .sn-container {
  position: relative;
  z-index: 3;
  max-width: 1200px;
}

@media (min-width: 1280px) {
  .sn-service-section .sn-container {
    padding-left: 104px;
    padding-right: 104px;
  }
}

.sn-service-section .sn-section-head {
  text-align: left;
}

.sn-service-section .sn-label-jp {
  font-family: 'Noto Sans JP', sans-serif;
  font-style: normal;
  font-weight: 700;
  font-size: clamp(18px, 3vw, 32px);
  line-height: 1.3;
  color: #243752;
}

.sn-service-copy {
  margin-top: clamp(0.5rem, 1.5vw, 0.75rem);
  max-width: 991px;
  width: 100%;
}

.sn-service-copy .sn-service-intro,
.sn-service-copy .sn-service-tagline,
.sn-service-copy .sn-desc {
  font-family: 'Noto Sans JP', sans-serif !important;
  font-style: normal !important;
  font-weight: 700 !important;
  font-size: clamp(16px, 3vw, 31px) !important;
  line-height: 1.5 !important;
  color: #243752 !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Mobile: 「目指すのは、」 is too short to deserve its own line, and the tagline
   is too long for one — it used to wrap mid-clause at an arbitrary point.
   Running the two as inline text lets them flow together and break at the
   「安心」と / 「企業の…」 boundary instead:

     目指すのは、「科学的根拠に基づく安心」と
     「企業の品質価値を高める検査体制」
     確かな分析技術で、食品の信頼を支え続けます。

   The paragraphs stay separate elements (each is its own editable field), so
   only their display changes. word-break:keep-all + the CJK line-break rules
   keep the bracketed clauses from splitting mid-phrase. */
@media (max-width: 767px) {
  .sn-service-copy .sn-service-intro,
  .sn-service-copy .sn-service-tagline {
    display: inline !important;
  }
  .sn-service-copy .sn-desc {
    display: block !important;
  }
  .sn-service-copy {
    word-break: keep-all;
    line-break: strict;
    overflow-wrap: break-word;
  }
}

/* Below ~390px the 16px floor no longer fits 「目指すのは、…安心」と on one line
   and the copy spills to 4–5 lines. Ease the size down so the intended 3-line
   break survives on the narrowest phones. */
@media (max-width: 389px) {
  .sn-service-copy .sn-service-intro,
  .sn-service-copy .sn-service-tagline,
  .sn-service-copy .sn-desc {
    font-size: 15px !important;
  }
}

@media (max-width: 340px) {
  .sn-service-copy .sn-service-intro,
  .sn-service-copy .sn-service-tagline,
  .sn-service-copy .sn-desc {
    font-size: 13px !important;
  }
}

.sn-service-section .sn-label-en {
  font-family: 'Noto Sans JP', sans-serif;
  font-style: normal;
  font-weight: 700;
  font-size: clamp(40px, 8vw, 96px);
  line-height: 1.2;
  text-transform: uppercase;
  color: rgba(0, 142, 140, 0.4);
  letter-spacing: normal;
}

.sn-accordion {
  display: flex;
  flex-direction: column;
  gap: clamp(0.5rem, 1.5vw, 1rem);
  background: rgba(255, 255, 255, 0.8);
  box-shadow: 0px 4px 50px rgba(0, 0, 0, 0.15);
  border-radius: clamp(10px, 1.5vw, 16px);
  padding: clamp(1.5rem, 3vw, 44px);
  max-width: 991px;
  width: 100%;
}

.sn-acc-item {
  border-radius: 16px;
  overflow: hidden;
  border: none;
  background: rgba(0, 142, 140, 0.8);
}

.sn-acc-header {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 clamp(0.75rem, 2vw, 1.5rem);
  min-height: clamp(60px, 8vw, 102px);
  background: #008E8C;
  color: #fff;
  font-family: 'Noto Sans JP', sans-serif;
  font-style: normal;
  font-weight: 700;
  font-size: clamp(16px, 2.8vw, 32px);
  line-height: 1.3;
  letter-spacing: -0.02em;
  text-align: left;
  cursor: pointer;
  border: none;
  border-radius: 16px;
  transition: background .2s;
}
/* Hover matches the open state: #008E8C at 80%. Scoped to closed items — on an
   open item the parent already paints that colour, so repainting would stack. */
.sn-acc-item:not(.open) .sn-acc-header:hover { background: rgba(0, 142, 140, 0.8); }

.sn-acc-item.open .sn-acc-header { border-radius: 16px 16px 0 0; }

.sn-acc-icon {
  width: clamp(32px, 4vw, 48px);
  height: clamp(32px, 4vw, 48px);
  min-width: clamp(32px, 4vw, 48px);
  background: none;
  border: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 400;
  line-height: 1;
  color: #fff;
  transition: transform .25s;
}


.sn-acc-item.open {
  background: rgba(0, 142, 140, 0.8);
  border-radius: 16px;
}

/* Transparent, not the teal again: .sn-acc-item.open already paints
   rgba(0,142,140,.8). Repainting it here stacked two 80% layers, making the
   header read darker than the body's surrounding border. */
.sn-acc-item.open .sn-acc-header {
  background: transparent;
  border-radius: 16px 16px 0 0;
}

.sn-acc-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height .5s ease, padding .35s ease;
  padding: 0 1.5rem;
  background: transparent;
  font-size: 1rem;
  color: var(--text-mid);
  line-height: 1.8;
  border-radius: 0 0 16px 16px;
}

.sn-acc-item.open .sn-acc-body {
  max-height: 1200px;
  padding: 1rem 1.5rem 1.5rem;
}

.sn-acc-body-inner {
  background: #ffffff;
  border-radius: 6px;
  padding: 1.25rem;
}

.sn-acc-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  column-gap: 12px;
}

.sn-acc-card {
  display: block;
  text-decoration: none;
  color: inherit;
}

.sn-acc-card-thumb {
  display: block;
  overflow: hidden;
  border-radius: 6px;
}

.sn-acc-card img {
  width: 100%;
  height: clamp(100px, 150px, 150px);
  object-fit: cover;
  border-radius: 6px;
  display: block;
  transition: transform .35s ease;
}

.sn-acc-card:hover img {
  transform: scale(1.06);
}

.sn-acc-card-title {
  font-family: 'Noto Sans JP', sans-serif;
  font-weight: 700;
  font-size: 14px;
  line-height: 17px;
  color: #000000;
  margin-top: 8px;
}

.sn-acc-card-desc {
  font-family: 'Noto Sans JP', sans-serif;
  font-weight: 400;
  font-size: 12px;
  line-height: 14px;
  color: #000000;
  margin-top: 6px;
}

/* ─────────────────────────────────────────
   ABOUT / VISION  ②
───────────────────────────────────────── */
.sn-about-section {
  background: var(--section-bg);
  padding-top: 80px;
  position: relative;
}

.sn-about-section::after {
  content: '';
  position: absolute;
  top: -45px;
  right: 0;
  width: clamp(160px, 21vw, 400px);
  height: min(100%, 520px);
  background: url('../../images/clip_path_03.png') top right / contain no-repeat;
  pointer-events: none;
  z-index: 0;
}

@media (min-width: 1280px) {
  .sn-about-section::after {
    width: 600px;
    height: 600px;
  }
}

.sn-about-section .sn-container {
  position: relative;
  z-index: 2;
}

.sn-about-section .sn-container {
  max-width: 1200px;
}

.sn-about-section .sn-section-head {
  text-align: left;
}

.sn-about-section .sn-label-en {
  font-family: 'Noto Sans JP', sans-serif;
  font-style: normal;
  font-weight: 900;
  font-size: clamp(40px, 8vw, 96px);
  line-height: 1.2;
  color: rgba(0, 142, 140, 0.1);
  letter-spacing: normal;
  position: relative;
  top: clamp(-100px, -6vw, -30px);
  margin-bottom: clamp(-30px, -2vw, -10px);
}

.sn-about-section .sn-label-jp {
  font-family: 'Noto Sans JP', sans-serif;
  font-weight: 700;
  /* 20px floor = the mobile spec; 3vw takes over above 667px up to a 32px cap. */
  font-size: clamp(20px, 3vw, 32px);
  line-height: 1.3;
  color: #243752;
  margin-bottom: 26px;
}

.sn-about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4.5rem;
  align-items: center;
}

.sn-about-left {
  display: flex;
  flex-direction: column;
}

.sn-about-right {
  position: relative;
  z-index: 2;
}

.sn-about-heading {
  font-family: 'Noto Sans JP', sans-serif;
  font-weight: 700;
  font-size: clamp(18px, 2.2vw, 24px);
  line-height: 1.35;
  letter-spacing: -0.02em;
  color: #243752;
  margin-bottom: 1rem;
}

.sn-about-desc {
  font-family: 'Noto Sans JP', sans-serif;
  font-weight: 400;
  font-size: clamp(14px, 1.5vw, 16px);
  line-height: 1.6;
  color: #243752;
  margin-bottom: 1rem;
}

.sn-about-btns {
  display: flex;
  flex-direction: column;
  gap: .75rem;
  margin-top: .5rem;
}

@media (min-width: 1280px) {
  .sn-about-btns {
    gap: 1.25rem;
    margin-top: 1.5rem;
  }
}

.sn-about-btn-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* About image grid */
.sn-about-imgs {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.625rem;
  width: calc(190px * 3 + 0.625rem * 2);
  max-width: 100%;
  height: clamp(320px, 42vw, 516px);
}

.sn-about-img-item {
  overflow: hidden;
}

.sn-about-img-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
  transition: transform .3s;
}

.sn-about-img-item:first-child img {
  border-radius: 16px 0 0 16px;
}

.sn-about-img-item:last-child img {
  border-radius: 0 16px 16px 0;
}

.sn-about-img-item:hover img {
  transform: scale(1.03);
}

/* ─────────────────────────────────────────
   EVENTS & MEMBERS ⑤  /  RECRUITMENT ⑥
───────────────────────────────────────── */
.sn-events-section {
  background: var(--section-bg);
  position: relative;
  overflow: hidden;
}

.sn-events-section .sn-container {
  position: relative;
  z-index: 3;
}
.sn-recruit-section { background: var(--section-bg); padding-bottom: 64px; }

.sn-events-section .sn-container,
.sn-recruit-section .sn-container {
  max-width: 1200px;
}

.sn-events-section .sn-section-head,
.sn-recruit-section .sn-section-head { text-align: left; }

.sn-events-section .sn-label-en,
.sn-recruit-section .sn-label-en {
  font-family: 'Noto Sans JP', sans-serif;
  font-weight: 700;
  font-size: clamp(40px, 8vw, 96px);
  line-height: 1.2;
  color: rgba(0, 142, 140, 0.1);
  letter-spacing: normal;
}

.sn-events-section .sn-label-jp,
.sn-recruit-section .sn-label-jp {
  font-family: 'Noto Sans JP', sans-serif;
  font-weight: 700;
  font-size: clamp(18px, 3vw, 32px);
  line-height: 1.3;
  color: #243752;
}

/* Event cards grid */
.sn-events-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(16px, 2.2vw, 27px);
}

.sn-event-card {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  height: clamp(180px, 22vw, 256px);
  display: block;
  cursor: pointer;
}

.sn-event-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .35s;
}

.sn-event-card:hover img { transform: scale(1.05); }

.sn-event-card-title {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  transform: translateY(-50%);
  text-align: center;
  font-family: 'Noto Sans JP', sans-serif;
  font-style: normal;
  font-weight: 700;
  font-size: clamp(18px, 3.5vw, 36px);
  line-height: 1.2;
  color: #008F8D;
}

.sn-event-card-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 64px;
  height: 64px;
}

.sn-cards-grid {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 1.25rem;
}

.sn-card {
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  transition: var(--trans);
}
.sn-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}

.sn-card-img {
  position: relative;
  height: 160px;
  overflow: hidden;
}
.sn-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s;
}
.sn-card:hover .sn-card-img img { transform: scale(1.07); }

.sn-card-img-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 50%, rgba(0,0,0,.25));
}

/* Teal placeholder for e-Service card */
.sn-card-img-teal {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}
.sn-card-img-label {
  color: #fff;
  font-family: var(--font-en);
  font-weight: 800;
  font-size: 1.2rem;
  text-align: center;
  line-height: 1.3;
}
.sn-card-img-label small { font-size: .75rem; font-weight: 400; display:block; }

.sn-card-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: .6rem;
  flex-grow: 1;
}

.sn-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

.sn-card-desc {
  font-size: .82rem;
  color: var(--text-mid);
  line-height: 1.7;
  flex-grow: 1;
}

.sn-card-link {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  font-size: .82rem;
  font-weight: 700;
  color: var(--primary);
  margin-top: .25rem;
  transition: gap .2s;
}
.sn-card-link:hover { gap: .6rem; color: var(--primary-dark); }

/* ─────────────────────────────────────────
   RESPONSIVE — FRONT PAGE ONLY
───────────────────────────────────────── */
/* Hero text sizes have no media queries — cqi/cqw already scale with slide width. */

/* Gutters below the 1200px container width. Previously these were only set at
   <=480px, leaving 481-1024px with sections flush to the viewport edge. */
@media (max-width: 1024px) {
  .news-section-v3,
  .sn-service-section,
  .sn-about-section,
  .sn-events-section,
  .sn-recruit-section {
    padding-left: clamp(16px, 3vw, 32px);
    padding-right: clamp(16px, 3vw, 32px);
  }
  .news-v3-card {
    padding: 24px 28px;
    border-radius: 22px;
  }
  .news-v3-cols {
    grid-template-columns: max-content 1fr;
    gap: clamp(20px, 3.5vw, 40px);
  }
}

@media (max-width: 900px) {
  .sn-about-grid,
  .sn-cards-grid {
    grid-template-columns: 1fr;
  }
  /* Stacked layout puts the images first: .sn-about-left (text) precedes
     .sn-about-right (images) in the DOM — correct for desktop's 2-column grid
     and for reading order — so reorder visually rather than moving the markup. */
  .sn-about-grid .sn-about-right { order: -1; }
  /* Drop the global .sn-container 2rem top padding (style.css) here — the
     section's own padding-top already spaces the block on mobile. */
  .sn-about-section .sn-container { padding-top: 0; }
  .sn-about-imgs {
    display: flex;
    flex-direction: row;
    gap: 7px;
    height: 324px;
    width: 100%;
  }
  .sn-about-img-item {
    flex: 1;
    height: 324px;
    overflow: hidden;
  }
  .sn-about-img-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
  }
  .sn-about-img-item:first-child img { border-radius: 10px 0 0 10px; }
  .sn-about-img-item:last-child img  { border-radius: 0 10px 10px 0; }
}

@media (max-width: 768px) {
  /* Overrides the global .sn-section 2rem bottom padding (style.css). */
  .sn-about-section { padding-bottom: 60px; }

  /* Tighter head gap on mobile (global .sn-section-head is 2.5rem). */
  .sn-section-head { margin-bottom: 28px; }

  /* Keep the desktop proportions: the card's fixed height (clamp 180-256px)
     against a full-width mobile column stretched it to ~2.0-2.5:1 and
     over-cropped the art. 382/256 is what the card measures at desktop width
     and the true size of the webp sources (the width="400" attribute in the
     markup does not match the files). */
  .sn-event-card {
    height: auto;
    aspect-ratio: 382 / 256;
  }

  /* Tighter label gap for these two sections only — scoped so the About
     label keeps the global .sn-label-jp spacing (style.css: 32px/24px). */
  .sn-events-section .sn-label-jp,
  .sn-recruit-section .sn-label-jp {
    margin-bottom: 20px;
  }

  /* Accordion runs flush on mobile: the white card (bg + shadow + radius) and
     its gutters eat horizontal space the items need, so drop the container
     chrome and let .sn-acc-item sit directly on the section background. */
  .sn-accordion {
    background: none;
    box-shadow: none;
    border-radius: 0;
    padding: 0;
    /* Figma stacks the rows as one continuous block divided by 1px white
       rules, so the inter-item gap goes away on mobile. */
    gap: 0;
  }

  /* ── Mobile accordion row — Figma spec (Group 1000007196) ──────────────
     370x64 teal row, square corners, divided by a 1px white rule. Title
     20/24 at 16px inset; 24x24 icon 8px from the right edge. */
  .sn-acc-item {
    border-radius: 0;
    border-bottom: 1px solid #FFFFFF;
  }
  .sn-acc-item:last-child {
    border-bottom: none;
  }
  .sn-acc-header {
    min-height: 64px;
    padding: 0 8px 0 16px;
    font-size: 20px;
    line-height: 24px;
    border-radius: 0;
  }
  .sn-acc-icon {
    width: 24px;
    height: 24px;
    min-width: 24px;
  }
  /* Glyph is 14px inside the 24px tap target — the box keeps the Figma
     hit area, the plus/minus mark itself stays small. */
  .sn-acc-icon img {
    width: 14px;
    height: 14px;
  }
  /* Open state keeps the square corners of the closed row. */
  .sn-acc-item.open,
  .sn-acc-item.open .sn-acc-header {
    border-radius: 0;
  }
  .news-v3-card        { padding: 0 18px 20px; border-radius: 18px; }
  .news-v3-cols        { grid-template-columns: 1fr; gap: 1.25rem; }
  .news-v3-left        { gap: 0.85rem; }
  .news-v3-tabs        { flex-direction: row; flex-wrap: wrap; gap: 0.5rem; }
  .news-v3-tab         { width: max-content; flex: 0 0 auto; padding: 0.4rem 0.8rem; }
  .news-v3-header       { margin-bottom: 0; }
  .news-v3-list        { display: block; }
  .news-v3-row         { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; padding: 1rem 0; border-bottom: 1px solid #CCCCCC; }
  .news-v3-cell-tag,
  .news-v3-date,
  .news-v3-text        { display: block; width: auto; border-bottom: none; padding: 0; }
  .news-v3-cell-tag    { width: auto; margin-right: 0.75rem; }
  .news-v3-date        { width: auto; }
  .news-v3-text        { width: 100%; margin-top: 0.25rem; }

  .sn-acc-grid         { grid-template-columns: 1fr 1fr; }
  .sn-events-grid      { grid-template-columns: 1fr 1fr; }
  /* .sn-cards-grid stays 1fr from the <=900px rule — re-widening it to two
     columns here made the layout gain a column as the screen narrowed. */
  .sn-about-btns       { align-items: center; }
  .sn-acc-card img     { height: 150px; }

  .news-section-v3::after,
  .sn-service-section::after,
  .sn-about-section::before,
  .sn-about-section::after {
    width: clamp(120px, 42vw, 220px);
    height: 260px;
    opacity: .65;
  }
  .news-section-v3::after {
    top: 70px;
    left: -60px;
  }
  .sn-service-section::after {
    left: 0;
    bottom: -40px;
  }
  .sn-about-section::after {
    right: 0;
    top: -20px;
  }
}

@media (max-width: 480px) {
  .sn-about-section { padding-top: 1rem; }
  .sn-about-section .sn-section-head { text-align: right; }
  .sn-about-section .sn-label-en {
    display: block;
    text-align: right;
    font-size: 64px;
    line-height: 77px;
    top: -30px;
  }
  .sn-about-btns { align-items: center; }

  .news-v3-label { display: none; }
  .news-v3-card        { border: none; padding: 0; box-shadow: none; border-radius: 0; }
  .news-v3-tabs    { display: flex; flex-direction: row; flex-wrap: wrap; gap: 14px; justify-content: center; }
  .news-v3-viewall { display: none; }
  .news-v3-viewall-mobile {
    display: block;
    width: fit-content;
    margin: 40px auto 0;
    font-family: 'Noto Sans JP', sans-serif;
    font-style: normal;
    font-weight: 700;
    font-size: 16px;
    line-height: 19px;
    text-decoration-line: underline;
    color: #008E8C;
    transition: color 0.2s;
  }
  .news-v3-viewall-mobile:hover {
    color: #007C7A;
  }
  /* News rows mobile */
  .news-v3-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0;
    padding: 8px 0;
    border-bottom: 0.317px solid #CCCCCC;
    flex-wrap: nowrap;
  }
  .news-v3-cell-tag {
    flex-shrink: 0;
    margin-right: 8px;
  }
  .news-v3-tag {
    flex-shrink: 0;
    padding: 4px 8px;
    height: 20px;
    border-radius: 30px;
    font-size: 10px;
    line-height: 12px;
    font-weight: 700;
    margin-right: 0;
  }
  .news-v3-tag.tag-notice { background: #DDF1F0; color: #007C7A; }
  .news-v3-tag.tag-info { background: #EDEFF2; color: #4B5563; }
  .news-v3-tag.tag-seminar { background: #E5ECFF; color: #1E40AF; }
  .news-v3-tag.tag-important { background: #FEE2E2; color: #E7380D; }
  .news-v3-date {
    font-size: 9px;
    line-height: 11px;
    color: #243752;
    flex-shrink: 0;
    margin-right: 8px;
    width: auto;
  }
  .news-v3-text {
    font-size: 14px;
    line-height: 17px;
    font-weight: 500;
    color: #243752;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 0;
    flex: 1;
    min-width: 0;
  }
  .news-v3-card        { padding: 0 12px 16px; border-radius: 14px; }
  .news-v3-cols        { gap: 12px; }
  .news-v3-tabs        { flex-wrap: nowrap; overflow-x: auto; width: 100%; padding-bottom: 4px; scrollbar-width: none; -ms-overflow-style: none; }
  .news-v3-tabs::-webkit-scrollbar { display: none; }
  .sn-service-section .sn-section-head { text-align: center; }
  .sn-service-section .sn-label-en,
  .sn-service-section .sn-label-jp { text-align: center; }
  /* Mobile Figma spec: solid teal 32/38 replaces the desktop clamp outline. */
  .sn-service-section .sn-label-en {
    font-size: 32px;
    line-height: 38px;
    color: #008E8C;
  }
  .news-v3-header       { margin-bottom: 0; }
  .news-v3-right       { min-width: 0; width: 100%; }
  .news-v3-list {
    background: #fff;
    box-shadow: 0px 4px 15px rgba(0,0,0,0.1);
    border-radius: 8px;
    padding: 32px 8px;
    overflow: hidden;
    width: 100%;
  }
  .news-v3-tab {
    padding: 4px 8px;
    height: 27px;
    background: transparent;
    border: 1px solid #D6E6E6;
    box-shadow: none;
    border-radius: 4px;
  }
  .news-v3-tab.active {
    background: #008E8C;
    border-color: #D6E6E6;
    box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    color: #fff;
  }
  /* Horizontal gutters come from the <=1024px clamp (resolves to 16px here). */
  .news-section-v3     { border: none; }
  .sn-recruit-section  { padding-bottom: 38px; }
  .sn-acc-grid         { grid-template-columns: repeat(2, 1fr); row-gap: 8px; column-gap: 12px; }
  .sn-acc-body-inner   { padding: 16px; }
  .sn-acc-body         { padding: 0 8px; }
  .sn-acc-item.open .sn-acc-body { padding: 16px 8px; }
  .sn-events-grid      { grid-template-columns: 1fr; gap: 24px; }
  .sn-cards-grid       { grid-template-columns: 1fr; }
  /* Hero text drops hardcoding — cqi/cqw scales with slide width. */
  .hero-slide-content  { padding: 0 }
  .news-section-v3::after,
  .sn-service-section::after,
  .sn-about-section::before,
  .sn-about-section::after {
    width: 150px;
    height: 190px;
    opacity: .5;
  }
  .sn-acc-card img      { height: 100px; }
}
