/* Page: Benefits */

.benefits-page .page-header {
  padding-bottom: 12px;
}

/* PC時は2行表示（最初のbrを非表示） */
.benefits-page #benefits .section-heading__en br:first-of-type {
  display: none;
}

.benefits-nav {
  padding: 24px 0;
  /* border-bottom: 1px solid #eee; */
  position: sticky;
  top: 0;
  /* background: #fff; */
  /* z-index: 100; */
}

.benefits-nav__inner {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
}

.benefits-nav__item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0px 20px;
  border-radius: 999px;
  font-size: clamp(11px, 1.3vw, 15px);
  font-weight: 400;
  text-decoration: none;
  transition: all 0.25s ease;
  background: #fff;
  color: var(--color-primary, #e60012);
  border: 1px solid var(--color-primary, #e60012);
  flex: 1 1 0;
  min-width: 0;
  height: 44px;
  white-space: nowrap;
}

.benefits-nav__item .btn__spacer {
  display: none;
}

.benefits-nav__item .btn__circle-arrow {
  background: var(--color-primary, #e60012);
  color: #fff;
  border-color: var(--color-primary, #e60012);
  width: 16px;
  height: 16px;
}

.benefits-nav__item .btn__circle-arrow::before {
  border-top: 6px solid currentColor;
  border-bottom: none;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  transform: translateY(1px);
}

.benefits-nav__item:hover {
  background: var(--color-primary, #e60012);
  color: #fff;
  transform: translateY(-2px);
  opacity: 1;
}

.benefits-nav__item:hover .btn__circle-arrow {
  background: #fff;
  color: var(--color-primary, #e60012);
  border-color: #fff;
}

.benefits-section {
  padding: 60px 0;
  scroll-margin-top: 80px;
}

.benefits-section--gray {
  background: url("../../images/background-gray.jpg") no-repeat center;
  background-size: cover;
}

.benefits-section__heading {
  /* font-family: var(--font-en, "Inter"), sans-serif; */
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.benefits-section__sub {
  font-size: 16px;
  color: var(--color-primary, #e60012);
  font-weight: 700;
  margin-bottom: 32px;
  font-size: 24px;
}

.benefits-section__sub-icon {
  font-size: 14px;
  vertical-align: middle;
}

.benefits-section__sub--center {
  text-align: center;
  font-weight: 500;
}

.benefits-section__sub--m {
  margin-top: 35px;
  margin-bottom: 0px;
}

.benefits-work-info {
  background: #fff;
  border-radius: 5px;
  padding: 22px 22px;
  margin-bottom: 40px;
}

@media (min-width: 769px) {
  .benefits-work-info {
    width: 82%;
    margin: 0 auto;
    margin-bottom: 40px;
  }
}

.benefits-work-info__title {
  font-size: clamp(18px, 2vw, 24px);
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 20px;
}

.benefits-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.benefits-tag {
  display: inline-block;
  padding: 12px 27px;
  background: #fff;
  border: 0.75px solid #666;
  border-radius: 3px;
  font-size: 14px;
  font-weight: 500;
  color: var(--color-primary, #e60012);
}

.benefits-gallery {
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  max-width: 800px;
  margin: 0 auto;
}

.benefits-gallery__slider {
  position: relative;
  cursor: grab;
}

.benefits-gallery__slider--dragging {
  cursor: grabbing;
}

.benefits-gallery__slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.6s ease;
  pointer-events: none;
}

.benefits-gallery__slide:first-child {
  position: relative;
}

.benefits-gallery__slide--active {
  opacity: 1;
  pointer-events: auto;
  z-index: 1;
}

.benefits-gallery__img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}

.benefits-gallery__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.8);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
  cursor: pointer;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.benefits-gallery__arrow--prev {
  left: 12px;
}

.benefits-gallery__arrow--next {
  right: 12px;
}

.benefits-gallery__arrow::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  display: block;
  width: 11px;
  height: 11px;
  border-top: 2px solid var(--color-primary, #e60012);
  border-right: 2px solid var(--color-primary, #e60012);
}

.benefits-gallery__arrow--prev::before {
  transform: translate(-33%, -50%) rotate(-135deg);
}

.benefits-gallery__arrow--next::before {
  transform: translate(-72%, -50%) rotate(45deg);
}

.benefits-gallery__arrow:hover {
  opacity: 1;
  background: #ffffff;
}

.benefits-gallery__dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 16px;
}

.benefits-gallery__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: none;
  padding: 0;
  background: #d6d6d6;
  cursor: pointer;
  transition: background 0.25s ease;
}

.benefits-gallery__dot--active {
  background: var(--color-primary, #e60012);
}

.benefits-category {
  margin-bottom: 48px;
}

.benefits-category__inner {
  display: grid;
  grid-template-columns: 400px 1fr;
  gap: 40px;
  align-items: start;
}

.benefits-category__image {
  border-radius: 12px;
  overflow: hidden;
  /* width: 400px; */
}

.benefits-category__image img {
  width: 100%;
  height: auto;
  display: block;
}

.benefits-category__title {
  font-weight: 500;
  color: var(--color-primary, #e60012);
  margin-bottom: 20px;
  font-size: 20px;
  /* padding-left: 16px;
  border-left: 3px solid var(--color-primary, #e60012); */
}

.benefits-category__desc {
  font-size: 14px;
  line-height: 2;
}

/* Text-only benefit items */
.benefits-text-item {
  padding: 20px 0;
  border-bottom: 1px solid #ccc;
}

.benefits-text-item:last-of-type {
  border-bottom: 1px solid #ccc;
}

.benefits-text-item__title {
  font-size: 20px;
  font-weight: 500;
  color: var(--color-primary, #e60012);
  margin-bottom: 8px;
}

.benefits-text-item__desc {
  font-size: 14px;
  line-height: 1.8;
}

/* Anchor link scroll offset */
#qualification,
#birthday-gift,
#family-allowance {
  scroll-margin-top: 80px;
}

@media (max-width: 768px) {
  /* モバイル時は3行表示（最初のbrを表示） */
  .benefits-page #benefits .section-heading__en br:first-of-type {
    display: inline;
  }

  /* #benefitsセクションの装飾画像の高さ調整 */
  .benefits-page #benefits .section-heading__deco img {
    height: clamp(114px, 18vw, 267px);
  }

  /* #benefitsセクションの見出し下マージン削除 */
  .benefits-page #benefits .section-heading__en {
    margin-bottom: 0;
  }

  .benefits-nav {
    padding: 15.6px 0;
  }
  .benefits-nav__inner {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6.5px;
  }
  .benefits-nav__item {
    width: 100%;
    height: 28.6px;
    font-size: 9.75px;
    padding: 0 10.4px;
  }
  .benefits-nav__item .btn__circle-arrow {
    width: 10.4px;
    height: 10.4px;
  }
  .benefits-nav__item .btn__circle-arrow::before {
    border-top: 5.2px solid currentColor;
    border-left: 2.6px solid transparent;
    border-right: 2.6px solid transparent;
  }
  .benefits-section {
    padding: 20px 0;
    padding-bottom: 0px;
    scroll-margin-top: 56px;
  }
  .benefits-section .container {
    padding-bottom: 15px;
  }
  .benefits-section__heading {
    font-size: 20px;
  }
  .section-heading__dot {
    width: 7px;
    height: 7px;
  }
  .benefits-section__sub {
    font-size: 18px;
    margin-bottom: 15px;
  }
  .benefits-section__sub-icon {
    font-size: 10px;
  }
  .benefits-tags {
    gap: 8px;
  }
  .benefits-tag {
    padding: 8px 14px;
    font-size: 13.5px;
  }
  .benefits-category {
    margin-bottom: 20px;
  }
  .benefits-work-info {
    margin-bottom: 25px;
    padding: 22px 11px;
    font-size: 7px;
  }
  .benefits-category__inner {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .benefits-category__title {
    /* font-size: 18px; */
    margin-bottom: 12px;
  }
  .benefits-category__desc {
    font-size: 13px;
  }
  .benefits-gallery {
    padding-bottom: 35px;
  }
  .benefits-gallery__arrow {
    width: 30px;
    height: 30px;
  }
  .benefits-gallery__arrow--prev {
    left: 8px;
  }
  .benefits-gallery__arrow--next {
    right: 8px;
  }
  /* Anchor link scroll offset */
  #qualification,
  #birthday-gift,
  #family-allowance {
    scroll-margin-top: 80px;
  }
}
