@charset "UTF-8";

/* ==========================================================================
   Design Tokens — Figma「Smary Pages（コピー）」PC 1920 / SP 375 実測値ベース
   px@1920 → vw 換算: px / 19.2
   ========================================================================== */
:root {
  color-scheme: light;

  /* Brand palette (Figma variables) */
  --counselor-mint: #56c6b4;
  --counselor-mint-dark: #3aa793;
  --counselor-mint-soft: #e4f6f2;
  --counselor-green: #9fd69a;
  --counselor-green-dark: #82c37c;
  --counselor-blue: #469db8;
  --counselor-blue-dark: #357d94;

  /* Surfaces */
  --counselor-bg: #f8f7f7;
  --counselor-surface: #ffffff;
  --counselor-panel: #f5f5f5;
  --counselor-ink: #333333;
  --counselor-ink-muted: #6f6f6f;
  --counselor-line: #d8d8d8;

  /* Section backgrounds (Figma のグラデーション背景を再現) */
  --counselor-hero-sky: linear-gradient(100deg, #aee0ec 0%, #cdedf3 34%, #8ad5e0 72%, #56c6c2 100%);
  --counselor-concept-bg: linear-gradient(180deg, #d7f1f6 0%, #f1fbfc 34%, #ffffff 72%, #f4fbf8 100%);
  --counselor-search-bg: linear-gradient(180deg, #ffffff 0%, #eef8f1 46%, #f8f7f7 100%);

  /* Typography */
  --counselor-font-ja: "Noto Sans JP", -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans", "Yu Gothic", sans-serif;
  --counselor-font-en: "Open Sans", "Outfit", "Noto Sans JP", sans-serif;

  /* Fluid type scale (min = SP実測 / preferred = PC実測の vw / max = PC実測) */
  /* ファーストビュー WHO YOU CHOOSE:
     PC: 1920px以上で最大132px、1000px〜1920pxで改行されないよう流動縮小(6.875vw)、1000px以下は68.75pxで固定
     SP: 767px以下で26px */
  --counselor-fs-hero: clamp(68.75px, 6.875vw, 132px);
  --counselor-fs-display: clamp(1.125rem, 4.27vw, 5.125rem);
  /*  18 →  82 */
  --counselor-fs-watermark: clamp(1.125rem, 1.46vw, 1.75rem);
  /* 18 →  28 */
  --counselor-fs-h2: clamp(1.25rem, 2.08vw, 2.5rem);
  /*  20 →  40 */
  --counselor-fs-lead: clamp(0.875rem, 1.46vw, 1.75rem);
  /*  14 →  28 */
  --counselor-fs-body: clamp(0.875rem, 1.15vw, 1.375rem);
  /*  14 →  22 */
  --counselor-fs-panel-title: clamp(0.9375rem, 1.67vw, 2rem);
  /* 15 →  32 */
  --counselor-fs-cta: clamp(0.875rem, 1.3vw, 1.5625rem);
  /*  14 →  25 */

  /* Layout */
  --counselor-content: 1313px;
  /* カード一覧の版面 (Figma Group 21) */
  --counselor-panel-width: 1049px;
  --counselor-gutter: clamp(1.25rem, 2vw, 2.5rem);

  --counselor-radius: 8px;
  --counselor-radius-pill: 9999px;

  --counselor-ease: cubic-bezier(0.16, 1, 0.3, 1);
  --counselor-dur: 0.24s;
}

/* ==========================================================================
   Reset & base
   ========================================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
}

body:has(.counselor-main) {
  font-family: var(--counselor-font-ja);
  font-weight: 500;
  background-color: var(--counselor-bg);
  color: var(--counselor-ink);
  line-height: 1.7;
  accent-color: var(--counselor-mint);
  /* 明朝的なフォントフォールバック時も行送りが崩れないように */
  font-optical-sizing: auto;
  /* smaryu.com 同等のソリッドレイアウト仕様:
     PC（768px以上）: 幅1000px以上は100%伸長、1000px以下は固定（ソリッドレイアウト） */
  width: 100%;
  min-width: 1000px;
}

@media (width < 768px) {
  body:has(.counselor-main) {
    min-width: unset;
    width: 100%;
    max-width: 100svw;
    overflow-x: hidden;
  }
}

img,
picture,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

button {
  font: inherit;
  border: none;
  background: none;
  color: inherit;
  cursor: pointer;
}

:where(a) {
  color: inherit;
}

:focus-visible {
  outline: 3px solid var(--counselor-blue);
  outline-offset: 2px;
}

/* ==========================================================================
   Layout utilities
   ========================================================================== */
.counselor-container {
  width: min(100% - (var(--counselor-gutter) * 2), var(--counselor-content));
  margin-inline: auto;

  @media (width < 768px) {
    width: calc(100% - 40px);
  }
}

.counselor-container--narrow {
  --counselor-content: var(--counselor-panel-width);
}

.counselor-section {
  padding-block: clamp(2.5rem, 5.2vw, 6.25rem);
}

.counselor-br-sp {
  display: inline;
}

.counselor-br-pc {
  display: none;
}

@media (width >= 768px) {
  .counselor-br-sp {
    display: none;
  }

  .counselor-br-pc {
    display: inline;
  }
}

/* 英字ウォーターマーク見出し（WHO YOU CHOOSE） */
.counselor-wordmark {
  font-family: var(--counselor-font-en);
  font-weight: 600;
  letter-spacing: 0.22em;
  /* 字間ぶんの余白で中央がずれるのを補正 */
  text-indent: 0.22em;
  line-height: 1.1;
  text-transform: uppercase;
  white-space: nowrap;
  text-align: center;
}

/* ==========================================================================
   Counselor Main Wrapper (ファーストビュー〜ページネーション共通背景)
   ※将来的には Three.js / WebGL / Canvas 等による動的アニメーションを実装予定
   ========================================================================== */
/* サイト共通の reset.css が p に text-align: left を直接指定しているため、親の指定を継承させる
   :where() で詳細度を p 単体と同じにし、各クラスの text-align 指定を打ち消さないようにする */
:where(.counselor-main) p {
  text-align: inherit;
}

.counselor-main {
  position: relative;
  background-color: #eaf8fa;
  background-image: url("../img/bg.png");
  background-repeat: no-repeat;
  background-position: center top;
  background-size: 100% 100%;
}

/* ==========================================================================
   1. Hero
   Figma: WHO YOU CHOOSE (PC: 3435:7001, SP: 3435:7599)
   ========================================================================== */
.counselor-hero {
  position: relative;
  background: transparent;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.counselor-hero__inner {
  width: min(1920px, 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.counselor-hero__title {
  color: rgba(255, 255, 255, 0.8);
  font-size: var(--counselor-fs-hero);
  font-family: var(--counselor-font-en);
  font-weight: 700;
  white-space: nowrap;
  /* Figma PC: letter-spacing 52.8px (132pxに対して 0.4em)
     1000pxまで改行・はみ出しを防ぎながら流動縮小 */
  letter-spacing: 0.4em;
  text-indent: 0.4em;
  /* Figma PC: 文字の上端がパンくずのすぐ下に来るよう、行の上下余白を詰める */
  line-height: 1;
  /* 文字サイズ（6.875vw）に比例: 1920pxで-24px、1000pxで-12.5px */
  margin-block-start: clamp(-24px, -1.25vw, -12.5px);
  margin-block-end: 0.52em;

  @media (width < 768px) {
    /* 文字を画面幅いっぱいに広げる。
       文字列の幅は約14.53em（末尾の字間を除く）なので 100vw ÷ 14.53 ≒ 6.88vw、少し余裕をみて6.8vw */
    font-size: 6.8vw;
    /* 左右の字間ぶんの余白をなくし、字面の端を画面端に合わせる */
    text-indent: 0;
    margin-inline-end: -0.4em;
    line-height: 1;
    margin-block-start: -2px;
    margin-block-end: 16px;
  }
}

.counselor-hero__copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(0.35rem, 0.7vw, 0.75rem);
  padding-inline: var(--counselor-gutter);

  @media (width < 768px) {
    gap: 4px;
    padding-inline: 0;
  }
}

.counselor-hero__copy-line {
  display: inline-block;
  background-color: #ffffff;
  color: var(--counselor-mint);
  font-size: 32px;
  font-family: var(--counselor-font-ja);
  font-weight: 700;
  letter-spacing: 0.15em;
  text-indent: 0.15em;
  line-height: 1.35;
  padding: 0.5em 1em;

  @media (width < 768px) {
    font-size: 16px;
    padding: 4px 10px;
  }
}

.counselor-hero__visual {
  position: relative;
  width: 100%;
  max-width: 1920px;
  margin-block-start: 0;
  line-height: 0;

  @media (width < 768px) {
    margin-block-start: 26px;
  }
}

.counselor-hero__img {
  width: 100%;
  height: auto;
  object-fit: cover;
  vertical-align: bottom;
}

/* ==========================================================================
   2. Concept — カウンセラーを、自分で選ぶ？
   ========================================================================== */
.counselor-concept {
  position: relative;
  background: transparent;
  padding-block-start: 94px;

  @media (width < 768px) {
    /* Figma SP: ヒーロー画像の下端から WHO YOU CHOOSE まで 約32px */
    padding-block-start: 30px;
  }
}

.counselor-concept__wordmark {
  width: fit-content;
  margin-inline: auto;
  color: var(--counselor-mint);
  font-family: var(--counselor-font-en);
  font-weight: 600;
  font-size: 17px;
  letter-spacing: 22.1px;
  margin-block-end: 38px;

  /* Figma SP: 背景画像内の文字を実測（字面の幅 約264px、白枠との間隔 約17px） */
  @media (width < 768px) {
    font-size: 11px;
    letter-spacing: 12px;
    /* 末尾の字間ぶん右にずれるのを、左にも同じ幅を足して中央に揃える */
    text-indent: 12px;
    line-height: 1;
    margin-block-end: 16px;
  }
}

.counselor-concept__heading {
  width: fit-content;
  margin-inline: auto;
  background-color: #ffffff;
  color: var(--counselor-mint);
  font-family: var(--counselor-font-ja);
  font-size: 35px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-indent: 0.15em;
  line-height: 1.4;
  padding-block: 0.4em;
  padding-inline: 0.8em;

  @media (width < 768px) {
    font-size: 18px;
    letter-spacing: 0.1em;
    text-indent: 0.1em;
    padding-block: 6px;
    padding-inline: 14px;
  }
}

.counselor-concept__body {
  margin-inline: auto;
  margin-block-start: 48px;
  text-align: center;
  font-family: var(--counselor-font-ja);
  font-size: 20px;
  font-weight: 700;
  color: #3e3e3e;
  line-height: 2.6;
  letter-spacing: 0.046em;

  & .counselor-concept__text+.counselor-concept__text {
    margin-block-start: 52px;

    @media (width < 768px) {
      margin-block-start: 30px;
    }
  }

  @media (width < 768px) {
    font-size: 13px;
    line-height: 2.3;
    margin-block-start: 28px;
    padding-inline: 16px;
  }
}

/* ==========================================================================
   2.1. Infinite Marquee Slide (HTML & CSS Pure Loop)
   右から左へゆっくり流れるエンドレスループスライド
   ========================================================================== */
.counselor-marquee {
  position: relative;
  width: 100%;
  overflow: hidden;
  user-select: none;
  margin-block-start: 88px;

  @media (width < 768px) {
    margin-block-start: 24px;
  }
}

.counselor-marquee__track {
  display: flex;
  width: max-content;
  will-change: transform;
  animation: counselor-marquee-scroll 160s linear infinite;
}

.counselor-marquee__group {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-inline-end: 14px;
  flex-shrink: 0;
}

.counselor-marquee__item {
  margin: 0;
  width: 577px;
  aspect-ratio: 577 / 429;
  flex-shrink: 0;
  overflow: hidden;

  @media (width < 768px) {
    width: 319px;
    aspect-ratio: 319 / 210;
  }
}

.counselor-marquee__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@keyframes counselor-marquee-scroll {
  from {
    transform: translate3d(0, 0, 0);
  }

  to {
    transform: translate3d(-50%, 0, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .counselor-marquee__track {
    animation: none;
  }

  .counselor-marquee {
    overflow-x: auto;
    scrollbar-width: thin;
  }
}

/* ==========================================================================
   3. Search & list section
   ========================================================================== */
.counselor-search-section {
  position: relative;
  background: transparent;
  padding-block-start: 212px;
  padding-block-end: clamp(4rem, 8vw, 8rem);

  @media (width < 768px) {
    padding-block-start: 40px;
    padding-block-end: 60px;
  }
}

.counselor-search-section__wordmark {
  color: #469db8;
  opacity: 0.81;
  font-family: var(--counselor-font-en);
  font-weight: 700;
  font-size: clamp(3rem, 4.68vw, 5.625rem);
  /* 最小: 48px → 最大: 90px */
  /* font-size 90px のとき 34px 相当（34 / 90 ≒ 0.378em） */
  letter-spacing: 0.378em;
  /* 字間ぶんの余白で中央がずれるのを補正 */
  text-indent: 0.378em;
  margin-block-end: clamp(1rem, 1.8vw, 2.25rem);

  @media (width < 768px) {
    font-size: 20px;
    letter-spacing: 0.4em;
    text-indent: 0.4em;
    margin-block-end: 20px;
  }
}

.counselor-search-section__lead {
  text-align: center;
  font-family: var(--counselor-font-ja);
  font-size: 28px;
  font-weight: 700;
  color: #3e3e3e;
  line-height: 2.14;
  letter-spacing: 0.08em;
  text-wrap: balance;
  margin-block-start: 82px;

  @media (width < 768px) {
    font-size: 13px;
    line-height: 2.3;
    margin-block-start: 24px;
    padding-inline: 20px;
  }
}

/* --- 絞り込みパネル（共通） --- */
.counselor-panel {
  background-color: var(--counselor-bg);
  border: 4px solid var(--counselor-mint);
  border-radius: 0;
  padding-block-start: 90px;
  padding-inline: clamp(50px, 4.167vw, 80px);
  /* 50px → 80px（1920px 幅で最大） */
  padding-block-end: 108px;
  text-align: center;
  margin-block-start: 70px;

  @media (width < 768px) {
    border-width: 2.5px;
    padding-block: 38px;
    padding-inline: 20px;
    margin-block-start: 38px;
  }
}

.counselor-panel__header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-block-end: 50px;

  @media (width < 768px) {
    gap: 6px;
    margin-block-end: 20px;
  }
}

.counselor-panel__icon {
  width: 42px;
  height: auto;
  flex-shrink: 0;

  @media (width < 768px) {
    width: 16px;
  }
}

.counselor-panel__title {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #3e3e3e;
  line-height: 1.3;

  /* 「条件で、」「＃タグで」の頭だけミント、「、」はブルー（Figma準拠） */
  & .counselor-panel__title-accent {
    color: var(--counselor-mint);
  }

  & .counselor-panel__title-comma {
    color: var(--counselor-blue);
  }

  @media (width < 768px) {
    font-size: 14px;
  }
}

/* --- 条件検索 CTA（グリーン矩形 + ミントのずらし影） --- */
.counselor-btn--search {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  width: min(100%, 650px);
  min-height: 106px;
  padding-inline: clamp(0.75rem, 1.56vw, 1.875rem);
  background-color: var(--counselor-green);
  color: #ffffff;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.04em;
  border-radius: 3px;
  box-shadow: 5px 8px 0 0 var(--counselor-mint);
  transition:
    translate var(--counselor-dur) var(--counselor-ease),
    box-shadow var(--counselor-dur) var(--counselor-ease),
    background-color var(--counselor-dur) var(--counselor-ease);

  & .counselor-btn__icon {
    width: 26px;
    height: auto;
    flex-shrink: 0;

    @media (width < 768px) {
      width: 14px;
    }
  }

  &:hover {
    background-color: var(--counselor-green-dark);
    translate: 5px 8px;
    box-shadow: 0px 0px 0 0 var(--counselor-mint);
  }

  &:active {
    translate: 5px 8px;
    box-shadow: 0 0 0 0 var(--counselor-mint);
  }

  @media (width < 768px) {
    min-height: 40px;
    padding-inline: 12px;
    font-size: 13px;
    letter-spacing: 0.03em;
    box-shadow: 3px 4px 0 0 var(--counselor-mint);
    gap: 8px;
  }
}

/* --- タググリッド --- */
/* Figma: SP は3列、PC は4列 */
.counselor-tag-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(0.6rem, 1.25vw, 1.5rem);

  @media (width >= 768px) {
    grid-template-columns: repeat(4, 1fr);
  }

  @media (width < 768px) {
    column-gap: 6px;
    row-gap: 8px;
  }
}

.counselor-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: clamp(1.8rem, 2.1vw, 2.5rem);
  padding-inline: clamp(0.4rem, 0.83vw, 1rem);
  background-color: var(--counselor-mint);
  color: #ffffff;
  font-size: 17px;
  /* SP: 12px → PC: 18px */
  font-weight: 500;
  letter-spacing: 0.04em;
  border-radius: var(--counselor-radius-pill);
  min-width: 0;
  padding-block: 0.35em;
  text-align: center;
  text-wrap: balance;
  transition:
    opacity var(--counselor-dur) var(--counselor-ease);

  @media (width >= 768px) {
    white-space: nowrap;
  }

  &:hover {
    opacity: .7;
  }

  &.is-active {
    background-color: var(--counselor-blue);
    box-shadow: 0 0 0 3px rgb(70 157 184 / 0.25);
  }

  @media (width < 768px) {
    font-size: 10px;
    line-height: 1.2;
    min-height: 19px;
    padding-block: 2px;
    padding-inline: 4px;
  }

  /* 文字数が多いタグだけ 1px 小さくする */
  &.counselor-tag--small {
    font-size: 16px;

    @media (width < 768px) {
      font-size: 9px;
    }
  }
}

/* ==========================================================================
   カウンセラーカード一覧（Container Queries）
   ========================================================================== */
.counselor-grid-wrapper {
  container-type: inline-size;
  container-name: counselor-grid;
  margin-block-start: 168px;

  @media (width < 768px) {
    margin-block-start: 60px;
  }
}

.counselor-grid {
  display: grid;
  grid-template-columns: 1fr;
  column-gap: clamp(1rem, 3.23vw, 3.875rem);
  /* SP: 16px → PC: 62px */
  row-gap: clamp(1.75rem, 3.96vw, 4.75rem);
  /* SP: 28px → PC: 76px */

  @media (width < 768px) {
    row-gap: 34px;
  }
}

/* display を持つ要素にも hidden 属性を効かせる */
.counselor-grid[hidden],
.counselor-concept__cards[hidden],
.counselor-card[hidden] {
  display: none;
}

@container counselor-grid (min-width: 680px) {
  .counselor-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.counselor-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  background-color: var(--counselor-surface);
  border-radius: 5px;
  overflow: hidden;
  transition: opacity 0.3s var(--counselor-ease);

  &,
  &:hover,
  &:focus,
  &:visited {
    text-decoration: none;
    color: inherit;
  }

  & * {
    text-decoration: none;
  }

  &:hover {
    opacity: 0.9;
  }

  &:hover .counselor-card__img {
    transform: scale(1.1);
  }

  &:hover .counselor-btn--consult {
    background-color: var(--counselor-blue-dark);
  }

  &:focus-visible {
    outline: 2px solid var(--counselor-blue);
    outline-offset: 4px;
  }
}

/* --- 画像＋オーバーレイ（タイトル・氏名は画像の上） --- */
.counselor-card__visual {
  position: relative;
  aspect-ratio: 625 / 376;
  width: 100%;
  overflow: hidden;
  border-top-left-radius: 5px;
  border-top-right-radius: 5px;

  @media (width < 768px) {
    aspect-ratio: 335 / 202;
  }
}

.counselor-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* 写真は頭上の余白がそろっているため、上端を合わせて下をカットする */
  object-position: center top;
  display: block;
  transform: scale(1);
  transition: transform 0.4s var(--counselor-ease);
  will-change: transform;
}

.counselor-card__overlay {
  position: absolute;
  inset-inline: 0;
  inset-block-end: 0;
  padding-block-start: clamp(1.5rem, 2.5vw, 2.5rem);
  padding-inline: clamp(1rem, 1.56vw, 1.75rem);
  padding-block-end: clamp(1rem, 1.4vw, 1.75rem);
  background: linear-gradient(180deg, transparent 0%, transparent 35%, rgba(0, 0, 0, 0.15) 60%, rgba(0, 0, 0, 0.58) 100%);
  color: #ffffff;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;

  @media (width < 768px) {
    padding-block-start: 20px;
    padding-inline: 16px;
    padding-block-end: 12px;
  }
}

.counselor-card__title {
  font-family: var(--counselor-font-ja);
  font-size: clamp(22px, 1.46vw, 28px);
  font-weight: 700;
  line-height: clamp(1.25, 1.43, 1.43);
  letter-spacing: 0.07em;
  color: #ffffff;
  text-shadow: 0 3px 6px rgb(0 0 0 / 0.15);
  margin-block-end: clamp(0.1875rem, 0.25vw, 0.25rem);

  @media (width < 768px) {
    font-size: 16px;
    letter-spacing: 0.07em;
    line-height: 1.25;
    margin-block-end: 2px;
  }
}

.counselor-card__name-row {
  display: flex;
  align-items: center;
  gap: clamp(0.6rem, 1vw, 1.25rem);

  @media (width < 768px) {
    gap: 8px;
  }
}

.counselor-card__name {
  font-size: 19px;
  font-weight: 400;
  letter-spacing: 0.05em;
  white-space: nowrap;
  color: #ffffff;

  @media (width < 768px) {
    font-size: 14px;
    letter-spacing: 0.05em;
    line-height: 1.8;
  }
}

.counselor-card__name-line {
  flex: 1;
  height: 1px;
  background-color: rgb(255 255 255 / 0.85);
}

/* --- 本文（タグ・実績） --- */
.counselor-card__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding-block-start: clamp(0.875rem, 1.5vw, 1.75rem);
  padding-inline: clamp(1rem, 1.56vw, 1.75rem);
  padding-block-end: clamp(1.25rem, 2.76vw, 3.375rem);
  background-color: var(--counselor-surface);

  @media (width < 768px) {
    padding-block-start: 14px;
    padding-inline: 16px;
    padding-block-end: 22px;
  }
}

.counselor-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(0.5rem, 0.83vw, 1rem);
  list-style: none;

  @media (width < 768px) {
    gap: 6px 8px;
  }
}

.counselor-card__tag-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding-inline: 20px;
  background-color: var(--counselor-mint);
  color: #ffffff;
  font-size: 18px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.04em;
  border-radius: var(--counselor-radius-pill);
  white-space: nowrap;

  @media (width < 768px) {
    font-size: 11px;
    letter-spacing: 0.04em;
    line-height: 1.2;
    min-height: 22px;
    padding-inline: 10px;
  }
}

.counselor-card__meta {
  margin-block-start: clamp(0.625rem, 1vw, 1.25rem);
  font-size: 20px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: #3e3e3e;

  @media (width < 768px) {
    font-size: 13px;
    letter-spacing: 0.04em;
    line-height: 1.4;
    margin-block-start: 8px;
  }
}

/* --- 相談ボタン（ブルーの全幅バー） --- */
.counselor-btn--consult {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  width: 100%;
  min-height: 59px;
  padding-inline: 1rem;
  background-color: var(--counselor-blue);
  color: #ffffff;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.07em;
  border-radius: 0 0 5px 5px;
  transition: background-color var(--counselor-dur) var(--counselor-ease);

  &:hover {
    background-color: var(--counselor-blue-dark);
  }

  & .counselor-btn__arrows {
    width: 38px;
    height: auto;
    display: block;
    flex-shrink: 0;

    @media (width < 768px) {
      width: 19px;
    }
  }

  @media (width < 768px) {
    min-height: 31px;
    font-size: 11px;
    letter-spacing: 0.07em;
    line-height: 1;
    gap: 8px;
  }
}

/* --- 0件時（下に全カウンセラーを表示するため、カード一覧の上に置く） --- */
.counselor-empty-state {
  margin-block-end: 220px;
  text-align: center;

  & .counselor-empty-state__icon {
    display: block;
    width: 145px;
    height: auto;
    margin-inline: auto;
    margin-block-end: 41px;
  }

  & .counselor-empty-state__text {
    margin-block-end: 59px;
    color: #3e3e3e;
    font-size: 28px;
    font-weight: 700;
    line-height: 60px;
    letter-spacing: 0.08em;
    text-align: center;
  }

  @media (width < 768px) {
    margin-block-end: 88px;

    & .counselor-empty-state__icon {
      width: 44px;
      margin-block-end: 24px;
    }

    & .counselor-empty-state__text {
      margin-block-end: 18px;
      font-size: 10px;
      line-height: 23px;
    }
  }
}

/* ==========================================================================
   ページネーション（矢印＋数字、現在ページは下線）
   ========================================================================== */
.counselor-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-block-start: 88px;
  /* サイト共通の header.css が nav に白背景を指定しているため打ち消す */
  background: none;

  @media (width < 768px) {
    margin-block-start: 30px;
  }
}

/* 数字・矢印とも同じ幅のボタンにして、間隔とクリック範囲をそろえる */
.counselor-pagination__btn,
.counselor-pagination__next,
.counselor-pagination__prev {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 76px;
  height: 42px;
  transition: opacity var(--counselor-dur) var(--counselor-ease);

  /* 現在ページはクリックしても移動しないため、ホバー演出を付けない */
  &:hover:not(.is-invisible):not(:disabled):not(.is-active) {
    opacity: 0.6;
  }

  @media (width < 768px) {
    width: 40px;
  }
}

.counselor-pagination__btn {
  font-family: var(--counselor-font-en);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #3e3e3e;

  /* 現在ページはクリックしても移動しないため、通常のカーソルにする */
  &.is-active {
    cursor: default;
  }

  /* 現在ページの下線（Figma: 線 112） */
  &.is-active::after {
    content: "";
    position: absolute;
    top: calc(50% + 0.9em);
    left: 50%;
    width: 17px;
    height: 2px;
    background-color: #00a0bb;
    translate: -50% 0;
  }

  @media (width < 768px) {
    font-size: 15px;

    &.is-active::after {
      width: 13px;
      height: 1px;
    }
  }
}

/* 非表示条件のときはレイアウト幅を維持したまま透明・操作不能にする */
.counselor-pagination__next.is-invisible,
.counselor-pagination__prev.is-invisible {
  visibility: hidden;
  pointer-events: none;
  cursor: default;
}

/* CSS描画のアローアイコン（border 2辺 + rotate） */
.counselor-pagination__chevron {
  display: block;
  width: 11px;
  height: 11px;
  border-top: 3px solid #00a0bb;
  border-right: 3px solid #00a0bb;

  @media (width < 768px) {
    width: 6px;
    height: 6px;
    border-top-width: 2px;
    border-right-width: 2px;
  }
}

.counselor-pagination__next .counselor-pagination__chevron {
  transform: rotate(45deg);
}

.counselor-pagination__prev .counselor-pagination__chevron {
  transform: rotate(-135deg);
}

/* ==========================================================================
   4. 絞り込みダイアログ（<dialog closedby="any"> + top layer transition）
   ========================================================================== */
.counselor-dialog {
  width: min(90svw, 1362px);
  max-height: 90svh;
  margin: auto;
  padding: clamp(2rem, 3.5vw, 3.25rem) clamp(1.5rem, 8vw, 11.875rem) clamp(2rem, 3.5vw, 3.25rem);
  border: none;
  border-radius: 26px;
  background-color: #ffffff;
  color: #333333;
  box-shadow: 0 24px 64px rgb(0 0 0 / 0.25);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #bcbcbc transparent;

  opacity: 0;
  translate: 0 16px;
  scale: 0.98;
  transition:
    opacity var(--counselor-dur) var(--counselor-ease),
    translate var(--counselor-dur) var(--counselor-ease),
    scale var(--counselor-dur) var(--counselor-ease),
    display var(--counselor-dur) allow-discrete,
    overlay var(--counselor-dur) allow-discrete;

  &[open] {
    opacity: 1;
    translate: 0 0;
    scale: 1;

    @starting-style {
      opacity: 0;
      translate: 0 16px;
      scale: 0.98;
    }
  }

  &::backdrop {
    background-color: rgb(20 60 70 / 0);
    backdrop-filter: blur(2px);
    transition:
      background-color var(--counselor-dur) ease,
      backdrop-filter var(--counselor-dur) ease,
      display var(--counselor-dur) allow-discrete,
      overlay var(--counselor-dur) allow-discrete;
  }

  &[open]::backdrop {
    background-color: rgb(20 60 70 / 0.6);

    @starting-style {
      background-color: rgb(20 60 70 / 0);
    }
  }

  @media (width < 768px) {
    width: calc(100% - 32px);
    max-width: 355px;
    max-height: calc(100svh - 32px);
    padding: 24px 16px 20px;
    border-radius: 16px;
  }
}

.counselor-dialog__container {
  position: relative;
  display: block;
  background-color: #ffffff;
}

/* ヘッダー: Figmaでは白背景・中央揃え・40pxタイトル */
.counselor-dialog__header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 0 clamp(1.5rem, 2.5vw, 2.5rem) 0;
  background-color: #ffffff;
  color: #333333;

  @media (width < 768px) {
    padding-block-end: 16px;
  }
}

.counselor-dialog__title {
  font-family: var(--counselor-font-ja);
  font-size: clamp(1.6rem, 2.8vw, 2.5rem);
  font-weight: 700;
  letter-spacing: 0.046em;
  color: #333333;
  text-align: center;
  margin: 0;

  @media (width < 768px) {
    font-size: 18px;
    line-height: 1.4;
  }
}

.counselor-filter-form {
  display: flex;
  flex-direction: column;
  gap: clamp(1.5rem, 2.2vw, 2.25rem);

  @media (width < 768px) {
    gap: 18px;
  }
}

/* ダイアログボディ */
.counselor-dialog__body {
  display: flex;
  flex-direction: column;
  gap: clamp(1.5rem, 2.2vw, 2.25rem);
  padding: 0;
  overflow: visible;

  @media (width < 768px) {
    gap: 18px;
  }
}

/* グループ見出し（● ＋ テキスト）: Figma 楕円形41 準拠 */
.counselor-form-group {
  border: none;
  padding: 0;

  & .counselor-form-group__legend {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-block-end: clamp(0.75rem, 1.2vw, 1.25rem);
    font-family: var(--counselor-font-ja);
    font-size: clamp(1.125rem, 1.8vw, 1.875rem);
    font-weight: 700;
    letter-spacing: 0.046em;
    color: #333333;

    @media (width < 768px) {
      font-size: 14px;
      line-height: 1.3;
      margin-block-end: 10px;
      gap: 8px;
    }
  }

  & .counselor-form-group__bullet {
    width: clamp(18px, 1.5vw, 24px);
    height: clamp(18px, 1.5vw, 24px);
    border-radius: 50%;
    background-color: #469db8;
    flex-shrink: 0;

    @media (width < 768px) {
      width: 14px;
      height: 14px;
    }
  }
}

/* 選択肢チップの並び（Flexboxで自然に折り返し） */
.counselor-chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(8px, 1vw, 14px) clamp(10px, 1.2vw, 18px);

  @media (width < 768px) {
    gap: 8px 8px;
  }
}

/* 各チップ（選択肢カード）: Figma 長方形541 準拠 */
.counselor-chip {
  display: inline-flex;
  align-items: center;
  gap: clamp(8px, 0.8vw, 14px);
  min-height: clamp(44px, 4vw, 64px);
  padding-inline: clamp(14px, 1.4vw, 22px);
  border: 2px solid #bcbcbc;
  border-radius: 7px;
  background-color: #ffffff;
  cursor: pointer;
  user-select: none;
  transition:
    border-color var(--counselor-dur) var(--counselor-ease),
    background-color var(--counselor-dur) var(--counselor-ease),
    box-shadow var(--counselor-dur) var(--counselor-ease);

  &:hover {
    border-color: #469db8;
  }

  /* チェックボックス（四角枠 ☐）: Figma 長方形576 準拠 */
  & .counselor-chip__input {
    appearance: none;
    -webkit-appearance: none;
    width: clamp(20px, 1.6vw, 26px);
    height: clamp(20px, 1.6vw, 26px);
    border: 1.5px solid #707070;
    border-radius: 2px;
    background-color: #ffffff;
    display: grid;
    place-content: center;
    flex-shrink: 0;
    margin: 0;
    cursor: pointer;
    transition:
      border-color var(--counselor-dur) var(--counselor-ease),
      background-color var(--counselor-dur) var(--counselor-ease);

    &:checked {
      border-color: #469db8;
      background-color: #469db8;

      &::before {
        content: "";
        width: clamp(4px, 0.4vw, 6px);
        height: clamp(8px, 0.8vw, 12px);
        border: solid #ffffff;
        border-width: 0 2.5px 2.5px 0;
        transform: rotate(45deg) translate(-1px, -1px);
      }
    }

    @media (width < 768px) {
      width: 18px;
      height: 18px;
    }
  }

  & .counselor-chip__text {
    font-family: var(--counselor-font-ja);
    font-size: clamp(14px, 1.3vw, 22px);
    font-weight: 700;
    letter-spacing: 0.046em;
    color: #333333;
    white-space: nowrap;
    line-height: 1;

    @media (width < 768px) {
      font-size: 12px;
      letter-spacing: 0.04em;
      line-height: 1.2;
    }
  }

  /* 選択中のチップスタイル */
  &:has(.counselor-chip__input:checked) {
    border-color: #469db8;
    background-color: rgb(70 157 184 / 0.06);
  }

  @media (width < 768px) {
    min-height: 38px;
    padding-inline: 10px;
    gap: 8px;
  }
}

/* フッター: Figma 長方形540 準拠（中央に「この条件で絞りこむ」ボタン） */
.counselor-dialog__footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(1rem, 1.8vw, 2rem) 0 0 0;
  background-color: #ffffff;

  @media (width < 768px) {
    padding-block-start: 12px;
  }
}

/* 「この条件で絞りこむ」ボタン */
.counselor-btn--submit {
  width: min(100%, 573px);
  min-height: clamp(52px, 5.27vw, 81px);
  padding-inline: 1.5rem;
  border: 1px solid #707070;
  border-radius: 2px;
  background-color: #ffffff;
  color: #3e3e3e;
  font-family: var(--counselor-font-ja);
  font-size: clamp(1rem, 1.5vw, 1.4375rem);
  font-weight: 700;
  letter-spacing: 0.046em;
  cursor: pointer;
  transition:
    background-color var(--counselor-dur) var(--counselor-ease),
    color var(--counselor-dur) var(--counselor-ease),
    border-color var(--counselor-dur) var(--counselor-ease),
    box-shadow var(--counselor-dur) var(--counselor-ease);

  &:hover {
    background-color: #3e3e3e;
    color: #ffffff;
    border-color: #3e3e3e;
    box-shadow: 0 4px 12px rgb(0 0 0 / 0.15);
  }

  &:active {
    scale: 0.99;
  }

  @media (width < 768px) {
    min-height: 48px;
    font-size: 14px;
  }
}



/* ==========================================================================
   一覧の切り替え（絞り込み・ページ送り）
   ========================================================================== */
.counselor-grid-wrapper {
  transition: opacity 1.5s ease;

  /* 切り替え時は transition なしで即座に非表示にし、クラスを外すとフェードインする */
  &.is-switching {
    opacity: 0;
    transition: none;
  }
}

/* ==========================================================================
   モーション低減
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .counselor-dialog,
  .counselor-dialog[open] {
    translate: none !important;
    scale: none !important;
  }
}

/* ==========================================================================
   共通フッターの調整（このページのみ）
   ========================================================================== */
/* header.css が nav に白背景を指定しているため打ち消し、親の .p-footer-nav（#f2f2f2）の背景を見せる */
.p-footer-nav__wrap {
  background: none;
}

/* SPで base.css の img{width:100%} と、このCSSの img{height:auto} が重なりPマークが巨大化するため、
   HTMLのwidth属性と同じ62pxを指定する（width:auto だと画像本来の500pxに戻ってしまう） */
.p-footer__pmark img {
  width: 62px;
}

/* ==========================================================================
   背景アニメーション（Three.js / index.php 用）
   - 背景だけを差し替え、index.php のレイアウト・重なり順には影響させない
   - 背景は main の範囲で切り抜く。切り抜かないと position: fixed の背景が
     main の外（ヘッダー・CTA・フッター）の上にまで描画されてしまう
   - .counselor-main--anim-bg は WebGL が使えたときだけ JS が付ける。付かない間は
     背景が main の背景より下に隠れ、index.php と同じ静止画（img/bg.png）が見える
   ========================================================================== */
.counselor-main--anim-bg {
  /* 背景の z-index: -1 を main の内側に閉じ込める（main の背景色より上・本文より下に描画） */
  isolation: isolate;
  background-image: none;
}

/* main と同じ範囲を占め、はみ出した背景を切り抜く */
.counselor-anim-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  clip-path: inset(0);
  pointer-events: none;
}

/* 画面に固定して表示する領域（スクロールしても背景は動かない） */
.counselor-anim-bg__viewport {
  position: fixed;
  inset: 0;
  overflow: hidden;
}

.counselor-anim-bg__canvas {
  display: block;
  width: 100%;
  height: 100%;
}
