/* =============================================================
   サイト共通コンポーネント

   このファイルはVPSフォルダ以下のページに限らず、複数ページで共通使用される
   コンポーネントを定義します（vps-shared.css から分離）。
   使用ページ: index.html, reason.html, voice.html, vps/index.html ほか
   依存: base/* を先に読み込むこと
   ============================================================= */

/* =============================================================
   ご利用までの流れ（vps-flow）
   - 使用ページ: index.html, voice.html, vps/index.html, vps/vps-case.html,
     vps/vps-features.html
   ============================================================= */

.vps-flow {
  padding: 100px 0;
  background: #ffffff;
}

.vps-flow__title {
  margin-bottom: 24px;
}

.vps-flow__subtitle {
  text-align: center;
  margin: 0 0 62px;
}

.vps-flow__steps {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
  gap: clamp(16px, 2vw, 32px);
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
}

/* vps-flow 内に配置された「詳しくはこちら」ボタン
   ※ .btn-more-link__wrap / .btn-more-link を使用（components/buttons.css）*/
.vps-flow .btn-more-link__wrap {
  margin-top: 60px;
}

.vps-flow__steps::before {
  content: "";
  position: absolute;
  top: 22px;
  left: 10%;
  right: 10%;
  height: 2px;
  background: #00a590;
  z-index: 0;
}

.vps-flow__step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.vps-flow__badge {
  background: #00a590;
  font-family: "Barlow", sans-serif;
  color: #ffffff;
  font-size: 22px;
  padding: 2px 14px 6px;
  border-radius: 5px;
  z-index: 2;
  width: 60%;
  display: flex;
  justify-content: center;
}

.vps-flow__step-title {
  font-size: 22px;
  font-weight: 700;
  text-align: center;
  margin: 0;
}

.vps-flow__icon {
  width: 151px;
  height: 151px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.vps-flow__icon img {
  width: 100%;
  height: 100%;
}

.vps-flow__step-text {
  margin: 0;
  text-align: left;
}

.vps-flow__arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: start;
  margin-top: 150px;
}

/* =============================================================
   top-support__secondary（index.html / reason.html 共用）
   - 5 カード（PC: 上段 3・下段 2、下段中央寄せ）
   - 白背景 + 角丸 5px + 左アイコン + 右下緑矢印（icon-tp-green.svg）
   - reason.html では子要素 .top-support__sec-desc も使用
   ============================================================= */
.top-support__secondary {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  max-width: 1080px;
  margin-inline: auto;
  list-style: none;
  padding: 0;
}

.top-support__sec-card {
  position: relative;
  display: grid;
  grid-template-columns: 57px 1fr;
  align-items: center;
  gap: 16px;
  padding: 14px;
  padding-right: 40px;
  background: #ffffff;
  color: #111111;
  border: 1px solid #dbe5f3;
  border-radius: 5px;
  text-decoration: none;
  transition:
    border-color 200ms ease,
    transform 200ms ease;
}

.top-support__sec-card::after {
  content: "";
  position: absolute;
  right: 11px;
  top: 50%;
  transform: translateY(-50%);
  width: 23px;
  aspect-ratio: 1;
  background: url("../../img/common/icon-tp-green.svg") center / contain no-repeat;
}

.top-support__sec-card:hover,
.top-support__sec-card:focus-visible {
  border-color: #00a590;
  transform: translateY(-2px);
  opacity: 1;
}

.top-support__sec-icon {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 1;
}

.top-support__sec-icon img {
  width: 100%;
  height: auto;
}

.top-support__sec-body {
  display: grid;
  gap: 6px;
}

.top-support__sec-name {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: 0.03em;
}

/* 補足説明文（reason.html で使用）*/
.top-support__sec-desc {
  font-size: 15px;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0.65px;
  margin: 0;
}

/* =============================================================
   MV内 無料トライアル CTA（.vps-mv__trial-*）
   - vps/index.html の MV + index.html (top) / reason.html / voice.html で共通使用
   ============================================================= */
.vps-mv__trial {
  position: relative;
  text-align: center;
}

.vps-mv__trial-heading {
  display: inline-block;
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 10px;
  padding-bottom: 5px;
  border-bottom: 2px solid #ffd724;
}

.vps-mv__trial-heading strong {
  font-weight: 700;
}

.vps-mv__trial-footnote-inline {
  font-size: 10px;
  vertical-align: super;
  position: relative;
  top: -4px;
}

.vps-mv__trial-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
  position: relative;
}

.vps-mv__trial-note::before,
.vps-mv__trial-note::after {
  content: "";
  width: 8px;
  height: 15px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  flex-shrink: 0;
}

.vps-mv__trial-note::before {
  background-image: url("../../img/vps/mv-slash-right-black.svg");
}

.vps-mv__trial-note::after {
  background-image: url("../../img/vps/mv-slash-left-black.svg");
}

.vps-mv__trial-btn {
  display: inline-grid;
  grid-template-columns: auto 21px;
  align-items: center;
  justify-content: center;
  gap: 21px;
  width: 100%;
  max-width: 442px;
  height: 74px;
  background: #ff8802;
  color: #ffffff;
  font-size: 26px;
  font-weight: 700;
  text-decoration: none;
  border-radius: 10px;
  position: relative;
  overflow: hidden;
  transition: filter 0.2s ease;
  isolation: isolate;
}

.vps-mv__trial-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 100% 100px at 50% -20%, rgba(255, 169, 89, 0.9) 0%, rgba(255, 169, 89, 0.9) 50%, rgba(255, 169, 89, 0.3) 55%, transparent 60%);
  pointer-events: none;
  z-index: -1;
}

.vps-mv__trial-btn::after {
  content: "";
  position: relative;
  z-index: 1;
  width: 21px;
  height: 21px;
  background: url("../../img/common/icon-arrow-b-white.svg") center / contain no-repeat;
}

.vps-mv__trial-btn:hover {
  filter: brightness(0.9);
}

.vps-mv__trial-footnote {
  font-size: 12px;
  font-weight: 500;
  text-align: right;
  margin-top: 8px;
}

/* =============================================================
   WinserverのVPSが安心して使える理由（vps-trust）
   - 使用ページ：index.html（総合TOP）, reason.html, vps/index.html
   ============================================================= */

.vps-trust {
  padding: 100px 0;
  background: #ffffff;
}

.vps-trust__title {
  margin-bottom: 30px !important;
}

.vps-trust__subtitle {
  text-align: center;
  margin: 0 0 32px;
}

.vps-trust__description {
  max-width: 1028px;
  margin: 40px auto 55px;
  text-align: center;
}

.vps-trust__description-title {
  font-size: 22px;
  font-weight: 500;
  margin: 0 0 16px;
}

.vps-trust__description-text {
  font-size: 16px;
  margin: 0;
}

.vps-trust__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  column-gap: 20px;
  row-gap: 20px;
  max-width: 960px;
  margin: 0 auto;
}

.vps-trust__card {
  background: #ffffff;
  border: 1px solid #dbe5f3;
  border-radius: 5px;
  padding: 40px;
  text-align: center;
}

.vps-trust__icon {
  margin-bottom: 22px;
  text-align: center;
}

.vps-trust__icon img {
  width: 80px;
  height: 80px;
  display: block;
  margin: 0 auto;
}

.vps-trust__card-title {
  font-size: 22px;
  font-weight: 500;
  margin: 0 0 22px;
}

.vps-trust__card-text {
  margin: 0;
}

/* =============================================================
   .top-cta / .top-support__primary
   - index.html (top-page) / reason.html / voice.html で共用
   ============================================================= */

/* セクションの上下 padding */
.top-cta {
  padding-block: clamp(60px, 8vw, 100px);
}

.top-support__primary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-block: 70px 32px;
  max-width: 1200px;
  width: 100%;
  margin-inline: auto;
}

.top-support__primary-card {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 16px;
  padding: 60px 20px 20px;
  background: #ffffff;
  color: #111111;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 0 30px rgba(169, 185, 207, 0.16);
  min-height: 233px;
}

/* 浮きアイコン：カード上端を跨いで上に飛び出す */
.top-support__primary-icon {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  width: 84px;
  aspect-ratio: 1;
  background: none;
  border-radius: 0;
}

.top-support__primary-icon img {
  width: 100%;
  height: auto;
}

.top-support__primary-name {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.7;
  letter-spacing: 0.03em;
  color: #111111;
}

.top-support__primary-action {
  display: grid;
  justify-items: center;
  gap: 2px;
  width: 100%;
}

.top-support__primary-btn {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  max-width: 318px;
  padding: 15px 20px;
  background: #0068b7;
  color: #ffffff;
  font-size: 20px;
  font-weight: 700;
  border-radius: 10px;
  text-align: center;
  transition:
    background 200ms ease,
    transform 200ms ease;
}

.top-support__primary-btn-label {
  display: inline-grid;
  grid-template-columns: auto auto;
  align-items: center;
  gap: 19px;
}

.top-support__primary-btn-label::after {
  content: "";
  display: block;
  width: 11px;
  height: 11px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  transform: rotate(45deg);
}

.top-support__primary-btn:hover,
.top-support__primary-btn:focus-visible {
  background: #00538f;
  transform: translateY(-1px);
  opacity: 1;
}

/* バッジ（吹き出し風 / 上向きの三角タブ） */
.top-support__primary-badge {
  position: relative;
  display: inline-grid;
  place-items: center;
  padding: 2px 30px;
  background: #00a590;
  color: #ffffff;
  font-size: 16px;
  font-weight: bold;
  border-radius: 50em;
  letter-spacing: 0.03em;
  margin-top: 8px;
}

.top-support__primary-badge::before {
  content: "";
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 7px solid transparent;
  border-bottom-color: #00a590;
}

/* 電話番号 */
.top-support__primary-tel {
  display: inline-grid;
  grid-template-columns: 26px auto;
  align-items: center;
  gap: 10px;
  color: #1977f2;
  font-family: "Barlow", "DIN 2014", "Arial Narrow", sans-serif;
  font-size: 37px;
  font-weight: 700;
  line-height: 1;
  margin: -10px 0;
  cursor: default;
}

.top-support__primary-tel img {
  width: 30px;
  height: auto;
}

.top-support__primary-hours {
  font-size: 18px;
  font-weight: 500;
  line-height: 1.7;
  letter-spacing: 0.03em;
  color: #111111;
}

/* CTA セクションの背景・レイアウト */
.top-cta {
  position: relative;
  overflow: hidden;
  background: url("../../img/common/top-un-cta-bg.jpg") center center / cover no-repeat;
}

.top-cta__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: none;
  pointer-events: none;
}

.top-cta__inner {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 56px;
}

.top-cta__trial {
  display: grid;
  justify-items: center;
  max-width: 830px;
  width: 100%;
  margin-inline: auto;
  padding: 36px 60px;
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  text-align: center;
}

.top-cta__trial .vps-mv__trial {
  width: 100%;
  max-width: 522px;
}

.top-cta__trial .vps-mv__trial-cta {
  max-width: none;
}

.top-cta__trial .vps-mv__trial-heading {
  color: #ff8802;
  border-color: #ffd724;
  font-size: 27px;
}

.top-cta__trial .vps-mv__trial-note {
  font-size: 21px;
}

.top-cta__trial .vps-mv__trial-btn {
  max-width: 100%;
}

/* =============================================================
   レスポンシブ（@media 集約）
   ※ 順序: min-width 769 → max-width 1024 → 900 → 768 → 480
   ============================================================= */

@media (min-width: 769px) {
  .top-support__secondary {
    grid-template-columns: repeat(6, 1fr);
    gap: 27px;
  }
  .top-support__secondary > li {
    grid-column: span 2;
  }
  .top-support__secondary > li:nth-child(4) {
    grid-column: 2 / span 2;
  }
  .top-support__secondary > li:nth-child(5) {
    grid-column: 4 / span 2;
  }
}

@media (max-width: 1024px) {
  .vps-flow__step-title {
    font-size: 18px;
  }

  .vps-flow__step-text {
    font-size: 16px;
  }

  .vps-flow__badge {
    font-size: 20px;
  }
}

@media (max-width: 900px) {
  /* top-support__primary：上 2 カラム（チャット + メール）/ 下 1 カラム全幅（電話） */
  ul.top-support__primary {
    grid-template-columns: repeat(2, 1fr);
    gap: 54px 12px;
    margin-block: 50px 32px;
  }
  ul.top-support__primary .top-support__primary-card:nth-child(3) {
    grid-column: 1 / -1;
  }
  ul.top-support__primary li.top-support__primary-card {
    display: block;
    padding: 20px 16px 20px;
    min-height: 0;
    border-radius: 5px;
  }
  ul.top-support__primary .top-support__primary-action,
  ul.top-support__primary .top-support__primary-hours {
    margin-top: 12px;
  }
  ul.top-support__primary .top-support__primary-tel {
    margin-top: 0;
  }
  /* 浮きアイコン：40px、左寄せ */
  ul.top-support__primary .top-support__primary-icon {
    width: 40px;
    left: 10px;
    transform: translateY(-50%);
  }
  /* 電話カード（3枚目）のアイコンだけ 60px */
  ul.top-support__primary .top-support__primary-card:nth-child(3) .top-support__primary-icon {
    width: 60px;
  }

  /* top-cta SP 調整 */
  .top-cta .top-cta__inner {
    gap: 0;
  }
  .top-cta .top-cta__trial {
    padding: 20px 12px;
  }
  .top-cta .top-cta__trial .vps-mv__trial-heading {
    font-size: 18px;
  }
  .top-cta .top-cta__trial .vps-mv__trial-note {
    font-size: 15px;
  }
  .top-cta ul.top-support__primary {
    margin-block: 0;
    margin: 50px auto 0;
  }
  ul.top-support__primary .top-support__primary-name {
    font-size: 18px;
  }
  ul.top-support__primary .top-support__primary-btn {
    font-size: 16px;
  }
  ul.top-support__primary .top-support__primary-badge {
    font-size: 15px;
  }
}

@media (max-width: 768px) {
  .vps-flow {
    padding: 60px 0;
  }

  .vps-flow__steps {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 10px;
    position: relative;
  }

  .vps-flow__arrow {
    margin-top: 0;
    display: none;
  }

  /* 縦線でバッジを繋ぐ */
  .vps-flow__steps::before {
    content: "";
    position: absolute;
    left: 21px;
    top: 60px;
    bottom: 60px;
    width: 2px;
    height: calc(100% - 60px - 60px);
    z-index: 0;
  }

  .vps-flow__step {
    width: 100%;
    max-width: 100%;
    display: grid;
    grid-template-columns: 48px 10px 110px 1fr;
    grid-template-rows: auto auto;
    gap: 0;
    position: relative;
    flex: 0 0 auto;
  }

  /* Badge on the left, spanning both rows */
  .vps-flow__badge {
    grid-column: 1;
    grid-row: 1 / 3;
    align-self: center;
    justify-self: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0;
    padding: 4px 24px 8px;
    position: relative;
    z-index: 1;
  }

  /* Font size for "step" text */
  .vps-flow__badge span:first-child {
    font-size: 12px;
  }

  /* Font size for number */
  .vps-flow__badge span:last-child {
    font-size: 18px;
    line-height: 1;
  }

  /* Icon in column 3, spanning both rows */
  .vps-flow__icon {
    grid-column: 3;
    grid-row: 1 / 3;
    align-self: center;
    padding: 0 20px;
    width: 110px;
    height: 110px;
  }

  /* Step title in column 4, row 1 */
  .vps-flow__step-title {
    grid-column: 4;
    grid-row: 1;
    align-self: end;
    text-align: left;
    padding: 20px 20px 0 0;
    font-size: 16px;
  }

  /* Step text in column 4, row 2 */
  .vps-flow__step-text {
    grid-column: 4;
    grid-row: 2;
    align-self: start;
    text-align: left;
    padding: 0 20px 20px 0;
    font-size: 13px;
  }

  /* Border around columns 3-4, rows 1-2 */
  .vps-flow__step::after {
    content: "";
    grid-column: 3 / 5;
    grid-row: 1 / 3;
    align-self: stretch;
    border: 1px solid #dbe5f3;
    border-radius: 5px;
    pointer-events: none;
  }

  .vps-flow__arrow img {
    transform: rotate(0deg);
  }

  .vps-flow__subtitle {
    margin-bottom: 30px;
  }

  .vps-flow .btn-more-link__wrap {
    margin-top: 40px;
  }

  .vps-mv__trial {
    max-width: 442px;
    margin: 0 auto;
  }

  .vps-mv__trial-btn {
    margin-inline: 0;
    font-size: 22px;
    height: 60px;
  }

  .vps-mv__trial-footnote-inline {
    top: -1px;
  }

  .vps-mv__trial-footnote {
    text-align: right;
    margin-top: 6px;
  }

  .vps-mv__trial-heading {
    margin-bottom: 12px;
    padding-bottom: 12px;
    font-size: 20px;
  }

  .vps-mv__trial-note {
    gap: 8px;
    font-size: 15px;
  }

  .vps-trust {
    padding: 60px 0 0;
  }

  .vps-trust__title {
    margin-bottom: 20px !important;
  }

  .vps-trust__description {
    font-size: 14px;
    padding: 0;
    margin: 0 auto 30px;
  }

  .vps-trust__description-title {
    font-size: 18px;
  }

  /* グリッドを1カラムに、各カードを「アイコン左 60px + 見出し/テキスト右」の横レイアウト */
  .vps-trust__grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .vps-trust__card {
    display: grid;
    grid-template-columns: 60px 1fr;
    grid-template-areas:
      "icon title"
      "icon text";
    align-items: flex-start;
    column-gap: 16px;
    padding: 20px;
    text-align: left;
  }

  .vps-trust__icon {
    grid-area: icon;
    width: 60px;
    margin-bottom: 0;
  }

  .vps-trust__icon img {
    width: 60px;
    height: 60px;
  }

  .vps-trust__card-title {
    grid-area: title;
    font-size: 16px;
    margin: 0 0 10px;
  }

  .vps-trust__card-text {
    grid-area: text;
    font-size: 14px;
  }
}

@media (max-width: 480px) {
  ul.top-support__primary li.top-support__primary-card {
    padding: 20px 10px 20px;
  }
  ul.top-support__primary .top-support__primary-name {
    font-size: 16px;
  }
  ul.top-support__primary .top-support__primary-btn {
    font-size: 14px;
    padding: 16px 10px;
  }
  ul.top-support__primary .top-support__primary-btn-label {
    gap: 8px;
  }
  ul.top-support__primary .top-support__primary-badge {
    font-size: 14px;
    padding: 2px 25px;
  }
  .top-support__primary-btn {
    padding: 10px;
  }

  .section-title.vps-flow__title {
    margin-bottom: 20px;
  }
}
