/* =========================================
   総合サイトへの固定リンク
   ========================================= */
.fixed-link {
  position: fixed;
  top: 70%;
  right: 0;
  transform: translateY(-50%);
  z-index: 100;
  --tab-width: 48px;
  --expand-width: 300px;
  width: var(--tab-width);
  background: #fff;
  border-radius: 12px 0 0 12px;
  box-shadow: -4px 4px 16px rgba(20, 30, 60, 0.18);
  overflow: hidden;
  transition: width 0.4s cubic-bezier(0.22, 0.61, 0.36, 1),
              box-shadow 0.3s ease;
  will-change: width;
}

/* PC: hoverで展開 */
@media (hover: hover) and (pointer: fine) {
  .fixed-link:hover,
  .fixed-link:focus-within {
    width: var(--expand-width);
    box-shadow: -8px 8px 28px rgba(20, 30, 60, 0.28);
  }
  .fixed-link:hover .fixed-link__tab,
  .fixed-link:focus-within .fixed-link__tab {
    opacity: 0;
    pointer-events: none;
  }
  .fixed-link:hover .fixed-link__expand,
  .fixed-link:focus-within .fixed-link__expand {
    opacity: 1;
    pointer-events: auto;
  }
}

/* SP: タップで展開 */
.fixed-link.is-open {
  width: var(--expand-width);
  box-shadow: -8px 8px 28px rgba(20, 30, 60, 0.28);
}
.fixed-link.is-open .fixed-link__tab {
  opacity: 0;
  pointer-events: none;
}
.fixed-link.is-open .fixed-link__expand {
  opacity: 1;
  pointer-events: auto;
}

/* 通常時: 縦書きタブ(PC) */
.fixed-link__tab {
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--tab-width);
  min-height: 220px;
  padding: 20px 0;
  flex-shrink: 0;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: opacity 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}
.fixed-link__tab:focus-visible {
  outline: 2px solid #c9a96e;
  outline-offset: -4px;
}
.fixed-link__tab-text {
  writing-mode: vertical-rl;
  -webkit-writing-mode: vertical-rl;
  text-orientation: mixed;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.15em;
  line-height: 1.4;
  color: #1a2238;
  white-space: nowrap;
  pointer-events: none;
}

/* 円形ロゴ(SP用、PCでは非表示) */
.fixed-link__toggle {
  display: none;
}

/* 展開表示(リンク) */
.fixed-link__expand {
  position: absolute;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  gap: 14px;
  width: var(--expand-width);
  padding: 12px 18px 12px 12px;
  text-decoration: none;
  color: #1a2238;
  opacity: 0;
  pointer-events: none;
  /* 閉じる時: 即座にフェードアウト */
  transition: opacity 0.15s ease 0s;
  -webkit-tap-highlight-color: transparent;
}
/* 開く時: 幅アニメ完了後にフェードイン */
@media (hover: hover) and (pointer: fine) {
  .fixed-link:hover .fixed-link__expand,
  .fixed-link:focus-within .fixed-link__expand {
    transition: opacity 0.25s ease 0.3s;
  }
}
.fixed-link.is-open .fixed-link__expand {
  transition: opacity 0.25s ease 0.3s;
}
.fixed-link__expand:focus-visible {
  outline: 2px solid #c9a96e;
  outline-offset: -2px;
}

.fixed-link__logo {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border-radius: 8px;
}
.fixed-link__logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.fixed-link__expand-text {
  flex: 1;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.4;
  white-space: nowrap;
  color: #1a2238;
}

/* 1024px以下 */
@media (max-width: 1024px) {
  .fixed-link {
    --tab-width: 42px;
    --expand-width: 270px;
  }
  .fixed-link__tab { min-height: 200px; }
  .fixed-link__tab-text {
    font-size: 13px;
    letter-spacing: 0.12em;
  }
  .fixed-link__logo {
    width: 48px;
    height: 48px;
  }
  .fixed-link__expand-text { font-size: 13px; }
  .fixed-link__expand {
    gap: 12px;
    padding: 10px 16px 10px 10px;
  }
}

/* 599px以下 */
@media (max-width: 599px) {
  .fixed-link {
    top: auto;
    bottom: 80px;
    --tab-width: 56px;
    --expand-width: 240px;
    width: var(--tab-width);
    height: 56px;
    border-radius: 28px 0 0 28px;
    transform: translate(0, 0);
  }
  /* PC用縦書きタブを非表示 */
  .fixed-link__tab {
    display: none;
  }
  /* SP用円形ロゴを表示(展開後も最前面に残して閉じるボタンに) */
  .fixed-link__toggle {
    position: absolute;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    padding: 0;
    background: transparent;
    border: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }
  .fixed-link__toggle-logo {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border-radius: 50%;
    overflow: hidden;
  }
  .fixed-link__toggle-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
  }
  /* 展開時のサイズ */
  .fixed-link.is-open {
    width: var(--expand-width);
    height: 56px;
  }
  /* 展開コンテンツのSP調整(右側にtoggle分の余白を確保) */
  .fixed-link__expand {
    padding: 0 64px 0 12px;
    gap: 10px;
    height: 56px;
    width: var(--expand-width);
  }
  .fixed-link__logo {
    display: none;
  }
  .fixed-link__expand-text {
    font-size: 12px;
    text-align: left;
  }
}

/* --- Section --- */
.section-group-link {
  margin-bottom: 0px;
  margin-top: 50px;
  padding: 50px;
  background-color: #fff;
}
 
.section-group-link__inner {
  max-width: 600px;
  margin: 0 auto;
  padding: 0 20px;
}
 
/* --- Card --- */
.group-card {
  display: flex;
  align-items: center;
  gap: 24px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
  padding: 20px 28px;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.3s ease;
}
 
.group-card:hover {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}
 
/* --- Logo Area --- */
.group-card__logo {
  flex-shrink: 0;
  width: 120px;
  height: auto;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}
 
.group-card__logo-img {
  max-width: 80%;
  max-height: 70%;
  width: auto;
  height: auto;
  object-fit: contain;
}
 
/* --- Body --- */
.group-card__body {
  flex: 1;
  min-width: 0;
}
 
.group-card__name {
  font-size: 18px;
  font-weight: 500;
  color: #333;
}
 
.group-card__sub {
  font-size: 12px;
  color: #999;
  margin-top: 2px;
}
 
/* --- Arrow --- */
.group-card__arrow {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #00002e;
  position: relative;
}
 
.group-card__arrow::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 7px;
  height: 7px;
  border-top: 2px solid #fff;
  border-right: 2px solid #fff;
  transform: translate(-60%, -50%) rotate(45deg);
}
 
/* --- 1024px以下 --- */
@media screen and (max-width: 1024px) {
  .section-group-link {
    padding: 40px 0;
  }
 
  .group-card {
    gap: 20px;
    padding: 18px 24px;
  }
}
 
/* --- 599px以下 --- */
/* --- 599px以下 --- */
@media screen and (max-width: 599px) {
  .section-group-link {
    padding: 32px 0;
  }

  .section-group-link__inner {
    padding: 0 16px;
  }

  .group-card {
    gap: 12px;
    padding: 14px 16px;
    /* flex-direction: column; ← これを削除 */
  }

  .group-card__logo {
    width: 70px;
  }

  .group-card__logo-img {
    max-width: 100%;
  }

  .group-card__name {
    font-size: 14px;
  }

  .group-card__sub {
    font-size: 11px;
  }

  .group-card__arrow {
    width: 28px;
    height: 28px;
  }
}

