/* ===== ボタン ホバーアニメーション =====
   通常時 : 矢印が左、背景 #1343E4 のみ（濃い色なし）
   ホバー時: 左矢印フェードアウト → 右矢印フェードイン
             濃紺#042443の円が左から水平に拡大しながら右へ
   ===================================== */

.-link_btn.js-btn-anim {
  position: relative;
  overflow: hidden;
}

/* PC幅を広げて矢印とテキストの余裕を確保 */
@media print, screen and (min-width: 1000px) {
  .-link_btn.js-btn-anim {
    width: 240px;
    height: 70px;
    line-height: 70px;
  }
}

/* ホバーで既存の背景色変化を無効化（円演出に統一） */
@media print, screen and (min-width: 1000px) {
  .-link_btn.js-btn-anim:hover {
    background-color: #1343E4;
  }
}

/* ボタンと同形の角丸矩形が左からスライドイン（右端の丸さがボタンに一致） */
.-link_btn.js-btn-anim::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 35px;
  background: #042443;
  transform: translateX(-102%);
  transition: transform 0.25s ease-in-out;
  z-index: 1;
  pointer-events: none;
}

@media print, screen and (min-width: 1000px) {
  .-link_btn.js-btn-anim:hover::before {
    transform: translateX(0);
  }
}

/* テキストを円より前面に */
.-link_btn.js-btn-anim a {
  position: relative;
  z-index: 2;
  padding-left: 0;
  text-align: center;
}

/* 既存の矢印（a::before=線, a::after=矢じり）をPC幅のみ非表示にして span で置き換え */
@media print, screen and (min-width: 1000px) {
  .-link_btn.js-btn-anim a::before,
  .-link_btn.js-btn-anim a::after {
    display: none !important;
  }
}

/* モバイルでは独自矢印(span::before/after)を非表示・元のスタイルを維持 */
@media print, screen and (max-width: 999px) {
  .-link_btn.js-btn-anim a {
    padding-left: 30px;
    text-align: left;
  }
  .-link_btn.js-btn-anim a span::before,
  .-link_btn.js-btn-anim a span::after {
    display: none;
  }
}

/* span を矢印の位置基準にする（外部CSSのfont-sizeを継承でリセット） */
.-link_btn.js-btn-anim a span {
  position: static;
  font-size: inherit;
}

/* 矢印SVGを1つの擬似要素で描画（左・右共通形状） */
/* 左矢印 : 通常時 visible → ホバーで fade out */
.-link_btn.js-btn-anim a span::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 22px;
  transform: translateY(-50%);
  width: 26px;
  height: 14px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 26 14'%3E%3Cline x1='0' y1='7' x2='22' y2='7' stroke='white' stroke-width='2.5' stroke-linecap='round'/%3E%3Cpolyline points='13%2C1 22%2C7 13%2C13' fill='none' stroke='white' stroke-width='2.5' stroke-linejoin='round' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat center / contain;
  opacity: 1;
  transition: opacity 0.3s ease;
}

/* 右矢印 : 通常時 invisible → ホバーで fade in */
.-link_btn.js-btn-anim a span::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 22px;
  transform: translateY(-50%);
  width: 26px;
  height: 14px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 26 14'%3E%3Cline x1='0' y1='7' x2='22' y2='7' stroke='white' stroke-width='2.5' stroke-linecap='round'/%3E%3Cpolyline points='13%2C1 22%2C7 13%2C13' fill='none' stroke='white' stroke-width='2.5' stroke-linejoin='round' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat center / contain;
  opacity: 0;
  transition: opacity 0.3s ease 0.05s;
}

@media print, screen and (min-width: 1000px) {
  .-link_btn.js-btn-anim:hover a span::before {
    opacity: 0;
  }
  .-link_btn.js-btn-anim:hover a span::after {
    opacity: 1;
  }
}

/* ===== 小ボタン（index.html main_content-service 詳しく見る） ===== */
.-link_btn-small.js-btn-anim {
  position: relative;
  overflow: hidden;
}

/* -link_btn.js-btn-anim の 240px を打ち消して小ボタンサイズを維持 */
@media print, screen and (min-width: 1000px) {
  .-link_btn-small.js-btn-anim {
    width: 150px;
    height: 50px;
    line-height: 50px;
  }
}

.-link_btn-small.js-btn-anim::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 35px;
  background: #042443;
  transform: translateX(-102%);
  transition: transform 0.25s ease-in-out;
  z-index: 1;
  pointer-events: none;
}

@media print, screen and (min-width: 1000px) {
  .-link_btn-small.js-btn-anim:hover,
  .-service_top-area-list:hover .-link_btn-small.js-btn-anim {
    background-color: #1343E4;
  }
  .-link_btn-small.js-btn-anim:hover::before,
  .-service_top-area-list:hover .-link_btn-small.js-btn-anim::before {
    transform: translateX(0);
  }
}

.-link_btn-small.js-btn-anim a {
  position: relative;
  z-index: 2;
  padding-left: 0;
  text-align: center;
}

.-link_btn-small.js-btn-anim a::before,
.-link_btn-small.js-btn-anim a::after {
  display: none !important;
}

.-link_btn-small.js-btn-anim a span {
  position: static;
}

.-link_btn-small.js-btn-anim a span::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 18px;
  transform: translateY(-50%);
  width: 20px;
  height: 11px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 26 14'%3E%3Cline x1='0' y1='7' x2='22' y2='7' stroke='white' stroke-width='2.5' stroke-linecap='round'/%3E%3Cpolyline points='13%2C1 22%2C7 13%2C13' fill='none' stroke='white' stroke-width='2.5' stroke-linejoin='round' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat center / contain;
  opacity: 1;
  transition: opacity 0.3s ease;
}

.-link_btn-small.js-btn-anim a span::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  width: 20px;
  height: 11px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 26 14'%3E%3Cline x1='0' y1='7' x2='22' y2='7' stroke='white' stroke-width='2.5' stroke-linecap='round'/%3E%3Cpolyline points='13%2C1 22%2C7 13%2C13' fill='none' stroke='white' stroke-width='2.5' stroke-linejoin='round' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat center / contain;
  opacity: 0;
  transition: opacity 0.3s ease 0.05s;
}

@media print, screen and (min-width: 1000px) {
  .-link_btn-small.js-btn-anim:hover a span::before,
  .-service_top-area-list:hover .-link_btn-small.js-btn-anim a span::before {
    opacity: 0;
  }
  .-link_btn-small.js-btn-anim:hover a span::after,
  .-service_top-area-list:hover .-link_btn-small.js-btn-anim a span::after {
    opacity: 1;
  }
}

/* ===== パルス波紋エフェクト（ヘッダーナビ） ===== */

/* ヘッダーテキストリンク：ホバー時に細い波紋リング */
@media print, screen and (min-width: 1000px) {
  .head_menu-flex li p:not(.-head_menu-contact) a {
    display: inline-block;
    border-radius: 4px;
    position: relative;
  }
  .head_menu-flex li p:not(.-head_menu-contact) a::after {
    content: '';
    position: absolute;
    inset: -6px;
    border: 1px solid rgba(19, 67, 228, 0);
    border-radius: 50px;
    pointer-events: none;
  }
  .head_menu-flex li:hover p:not(.-head_menu-contact) a::after {
    animation: navPulse 1.5s ease-out infinite;
  }
}

/* ヘッダーお問い合わせボタン（pill形状）：細い波紋リング */
@media print, screen and (min-width: 1000px) {
  .-head_menu-contact {
    position: relative;
  }
  .-head_menu-contact::after {
    content: '';
    position: absolute;
    inset: -8px;
    border: 1px solid rgba(19, 67, 228, 0);
    border-radius: 50px;
    pointer-events: none;
  }
  .head_menu-flex li:hover .-head_menu-contact::after {
    animation: btnPulse 1.5s ease-out infinite;
  }
}

@keyframes btnPulse {
  0%   { border-color: rgba(19, 67, 228, 0.65); transform: scale(1);    }
  100% { border-color: rgba(19, 67, 228, 0);    transform: scale(1.25); }
}

@keyframes navPulse {
  0%   { border-color: rgba(19, 67, 228, 0.6);  transform: scale(1);    }
  100% { border-color: rgba(19, 67, 228, 0);    transform: scale(1.3);  }
}

/* ===== 白ボタン（recruit.html 募集要項・エントリ） ===== */
.-link_btn.js-btn-anim.js-btn-anim-white {
  background: #ffffff;
  border: 1px solid #042443;
}

@media print, screen and (min-width: 1000px) {
  .recruit_link-box .-link_btn.js-btn-anim.js-btn-anim-white {
    width: 320px;
  }
}

@media print, screen and (min-width: 1000px) {
  .-link_btn.js-btn-anim.js-btn-anim-white:hover {
    background-color: #ffffff;
  }
}

.-link_btn.js-btn-anim.js-btn-anim-white a {
  color: #042443;
  transition: color 0.15s ease 0.08s;
}

@media print, screen and (min-width: 1000px) {
  .-link_btn.js-btn-anim.js-btn-anim-white:hover a {
    color: #ffffff;
  }
}

.-link_btn.js-btn-anim.js-btn-anim-white a span::before {
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 26 14'%3E%3Cline x1='0' y1='7' x2='22' y2='7' stroke='%23042443' stroke-width='2.5' stroke-linecap='round'/%3E%3Cpolyline points='13%2C1 22%2C7 13%2C13' fill='none' stroke='%23042443' stroke-width='2.5' stroke-linejoin='round' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat center / contain;
}
