/* ===== FV Demo CSS (scoped to .fv-demo-section) ===== */

/* --- img reset within fv-demo --- */
.fv-demo-section img {
  display: block;
  width: 100%;
  height: 100%;
}

/* --- figure margin reset --- */
.fv-demo-section figure {
  margin: 0;
}

/* ===== Our Job Box ===== */
.fv-demo-section .our-job__box {
  position: relative;
  width: 90.4vw;
  height: 39.5vw;
  min-height: 540px;
  max-height: 600px;
  margin: 0 auto;
  background: #333;
  overflow: hidden;
}

/* ----- Card Layer ----- */
.fv-demo-section .our-job__box__card {
  display: flex;
  width: 100%;
  height: 100%;
  position: relative;
  z-index: 2;
}

.fv-demo-section .job {
  flex: 0 0 calc(100% / 6);
  width: calc(100% / 6);
  height: 100%;
  position: relative;
  transition: opacity 0.5s cubic-bezier(0.215, 0.61, 0.355, 1);
}

.fv-demo-section .job a {
  display: block;
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
}

/* Label (vertical text) */
.fv-demo-section .job .label {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  writing-mode: vertical-lr;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  white-space: nowrap;
  color: #fff;
  transition: opacity 0.5s cubic-bezier(0.215, 0.61, 0.355, 1),
    transform 0.5s cubic-bezier(0.215, 0.61, 0.355, 1);
}

/* Card image area */
.fv-demo-section .job .card {
  display: block;
  width: 100%;
  height: 100%;
  position: relative;
}

.fv-demo-section .job .card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  z-index: 2;
  transition: opacity 0.5s cubic-bezier(0.215, 0.61, 0.355, 1);
}

.fv-demo-section .job figure.img {
  width: 100%;
  height: 100%;
  overflow: hidden;
  position: relative;
}

.fv-demo-section .job figure.img .dummy-img {
  transform: scale(1.5);
  transition: opacity 0.5s cubic-bezier(0.215, 0.61, 0.355, 1);
}

/* White cover overlay */
.fv-demo-section .job .cover {
  position: absolute;
  inset: 0;
  background: #fff;
  z-index: 4;
  transform: scaleX(1);
  transform-origin: right center;
}

/* Border between cards */
.fv-demo-section .job+.job {
  border-left: 1px solid rgba(255, 255, 255, 0.15);
}

/* ----- is-active (card side: fade out) ----- */
.fv-demo-section .job.is-active .label {
  transform: translate(-50%, -50%) translateY(5%);
  opacity: 0;
}

.fv-demo-section .job.is-active .card::before {
  opacity: 0;
}

.fv-demo-section .job.is-active figure.img .dummy-img {
  opacity: 0;
}

.fv-demo-section .job.is-active+.job.is-active {
  border-left-color: transparent;
}

.fv-demo-section .our-job__box.is-overlay-active .our-job__box__card {
  pointer-events: none;
}

.fv-demo-section .our-job__box.is-overlay-active .job__box-bg__link {
  pointer-events: none;
}

/* ----- Background Layer ----- */
.fv-demo-section .our-job__box__bg {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.fv-demo-section .job__box-bg {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.5s cubic-bezier(0.215, 0.61, 0.355, 1);
  pointer-events: none;
}

.fv-demo-section .job__box-bg.is-active {
  opacity: 1;
  pointer-events: auto;
}

.fv-demo-section .job__box-bg__link {
  position: absolute;
  inset: 0;
  z-index: 3;
}

/* Full background image */
.fv-demo-section .job__box-bg figure.bg-img {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.fv-demo-section .job__box-bg figure.bg-img .dummy-img {
  width: 100%;
  height: 100%;
}

.fv-demo-section .job__box-bg figure.bg-img::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.62);
  z-index: 1;
}

/* ===== Product Card (hover content) ===== */
.fv-demo-section .product-card {
  position: absolute;
  z-index: 5;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) translateY(6px);
  display: flex;
  width: 90%;
  max-width: 1080px;
  max-height: 400px;
  background: rgba(255, 255, 255, 0.93);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.4s cubic-bezier(0.215, 0.61, 0.355, 1) 0.08s,
    transform 0.4s cubic-bezier(0.215, 0.61, 0.355, 1) 0.08s;
}

.fv-demo-section .job__box-bg.is-active .product-card {
  opacity: 1;
  transform: translate(-50%, -50%);
}

/* -- Visual (left column) -- */
.fv-demo-section .product-card__visual {
  flex: 0 1 320px;
  max-width: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 25px 40px 40px;
  position: relative;
  overflow: hidden;
}

.fv-demo-section .product-card__visual img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 320px;
  object-fit: contain;
  border-radius: 4px;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.12));
}

.fv-demo-section .product-card__image-placeholder {
  width: 100%;
  height: 80%;
  background: #eee;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #aaa;
  font-size: 0.85rem;
}

/* -- Info (right column) -- */
.fv-demo-section .product-card__info {
  flex: 1;
  padding: 40px 40px 40px 25px;
  color: #333;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  overflow-y: auto;
}

/* Badge */
.fv-demo-section .product-card__badge {
  background: linear-gradient(135deg, #f5a623 0%, #f7c948 100%);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  font-size: 0.7rem;
  line-height: 1.5;
  margin-bottom: 1rem;
  display: inline-block;
  align-self: flex-start;
}

.fv-demo-section .product-card__badge strong {
  font-size: 0.85rem;
  display: block;
}

.fv-demo-section .product-card__badge em {
  font-style: normal;
  font-size: 1.4rem;
  font-weight: 700;
}

.fv-demo-section .product-card__badge .badge-date {
  font-size: 0.6rem;
  opacity: 0.85;
}

.fv-demo-section .product-card__trial {
  display: inline-block;
  align-self: flex-end;
  background: #e67e22;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.35rem 1rem;
  border-radius: 3px;
  margin-bottom: 0.75rem;
  letter-spacing: 0.05em;
}

/* Product Logo */
.fv-demo-section .product-card__logo {
  margin-bottom: 1rem;
}

.fv-demo-section .product-card__logo img {
  width: auto;
  object-fit: contain;
}

.fv-demo-section .product-card__logo-text {
  font-size: 1.8rem;
  font-weight: 700;
  color: #333;
}

.fv-demo-section .product-card__logo-sub {
  font-size: 0.6rem;
  color: #999;
  display: block;
  margin-top: 2px;
}

/* Description */
.fv-demo-section .product-card__desc {
  font-size: 0.82rem;
  line-height: 2.0;
  color: #555;
  margin-bottom: 1.5rem;
  text-align: left;
  align-self: stretch;
}

/* CTA */
.fv-demo-section .product-card__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: #333;
}

.fv-demo-section .product-card__cta .cta-text {
  font-size: 0.82rem;
  color: #4a90d9;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.fv-demo-section .product-card__cta .cta-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.fv-demo-section .product-card__cta .cta-arrow img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* ----- Job Navigation Bar (bottom labels during hover) ----- */
.fv-demo-section .job-nav {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  opacity: 0;
  transition: opacity 0.5s cubic-bezier(0.215, 0.61, 0.355, 1);
  pointer-events: none;
}

.fv-demo-section .job__box-bg.is-active~.job-nav {
  opacity: 1;
}

.fv-demo-section .our-job__box.is-overlay-active .job-nav {
  pointer-events: auto;
}

.fv-demo-section .job-nav__item {
  flex: 0 0 calc(100% / 6);
  height: 100%;
  text-align: center;
  padding: 1rem 0.5rem 0;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: #fff;
  line-height: 1.4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  position: relative;
  opacity: 0.6;
  transition: opacity 0.3s ease;
}

.fv-demo-section .job-nav__item.is-active {
  opacity: 1;
}

.fv-demo-section .job-nav__item::after {
  content: "";
  display: block;
  width: 28px;
  height: 2px;
  background: transparent;
  margin: 8px auto 0;
}

.fv-demo-section .job-nav__item.is-active::after {
  background: #fff;
}

/* ===== Dummy images (CSS backgrounds) ===== */
.fv-demo-section .dummy-img {
  width: 100%;
  height: 100%;
  display: block;
}

.fv-demo-section .dummy-img--job01 {
  background: url('../imgs/fv-demo/アルコールチェック.png') center/cover no-repeat;
}

.fv-demo-section .dummy-img--job02 {
  background: url('../imgs/fv-demo/エンゲージメント.png') center/cover no-repeat;
}

.fv-demo-section .dummy-img--job03 {
  background: url('../imgs/fv-demo/電子給与明細.png') center/cover no-repeat;
}

.fv-demo-section .dummy-img--job04 {
  background: url('../imgs/fv-demo/電子年調申請.png') center/cover no-repeat;
}

.fv-demo-section .dummy-img--job05 {
  background: url('../imgs/fv-demo/リザエン.png') center/cover no-repeat;
}

.fv-demo-section .dummy-img--job06 {
  background: url('../imgs/fv-demo/IQFORM.png') center/cover no-repeat;
}

/* ===== SP-only elements (hidden on desktop) ===== */
.fv-demo-section .sp-toggle,
.fv-demo-section .sp-detail {
  display: none;
}

/* ===== Card Arrow (hidden on desktop) ===== */
.fv-demo-section .job .card .arrow {
  display: none;
  position: absolute;
  width: 32px;
  height: 32px;
  top: 0;
  bottom: 0;
  right: 30px;
  margin: auto;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  z-index: 3;
}

.fv-demo-section .job .card .arrow svg {
  width: 16px;
  height: 16px;
  display: block;
  position: absolute;
  inset: 0;
  margin: auto;
  fill: none;
  stroke: #fff;
  stroke-width: 2;
}

/* ===== Tablet + SP (max-width: 1024px) ===== */
@media (max-width: 1024px) {
  .fv-demo-section .our-job__box {
    width: 100%;
    min-width: 320px;
    height: auto;
    min-height: auto;
    max-height: none;
  }

  .fv-demo-section .our-job__box__card {
    display: block;
  }

  .fv-demo-section .job {
    width: 100%;
    height: auto;
    min-height: auto;
    flex: none;
  }

  .fv-demo-section .job a {
    display: block;
    position: relative;
    height: 24vw;
    min-height: 90px;
  }

  .fv-demo-section .job.is-sp-open a {
    height: auto;
  }

  .fv-demo-section .job.is-sp-animated a {
    transition: height 0.3s ease;
  }

  .fv-demo-section .job .card {
    position: absolute;
    inset: 0;
  }

  .fv-demo-section .job .card::before {
    background: rgba(0, 0, 0, 0.45);
  }

  .fv-demo-section .job .label {
    position: relative;
    left: auto;
    top: auto;
    transform: none;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    writing-mode: horizontal-tb;
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    margin: 0;
    padding: 0 2rem;
    text-align: center;
    z-index: 3;
    transition: none;
  }

  .fv-demo-section .job.is-sp-open .label {
    display: none;
  }

  .fv-demo-section .job .card .arrow {
    display: none;
  }

  /* SP Toggle (+/-) */
  .fv-demo-section .sp-toggle {
    display: block;
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    width: 28px;
    height: 28px;
    cursor: pointer;
  }

  .fv-demo-section .sp-toggle::before,
  .fv-demo-section .sp-toggle::after {
    content: "";
    position: absolute;
    background: #fff;
    top: 50%;
    left: 50%;
  }

  /* Horizontal line (always visible = minus) */
  .fv-demo-section .sp-toggle::before {
    width: 20px;
    height: 2px;
    transform: translate(-50%, -50%);
    filter: drop-shadow(0 0 3px rgba(0, 0, 0, 0.6));
  }

  /* Vertical line (visible when closed = plus) */
  .fv-demo-section .sp-toggle::after {
    width: 2px;
    height: 20px;
    transform: translate(-50%, -50%);
    transition: opacity 0.25s ease;
    filter: drop-shadow(0 0 3px rgba(0, 0, 0, 0.6));
  }

  .fv-demo-section .job.is-sp-open .sp-toggle {
    top: 18px;
    transform: none;
  }

  .fv-demo-section .job.is-sp-open .sp-toggle::after {
    opacity: 0;
  }

  /* SP Detail (expanded content) */
  .fv-demo-section .job.is-sp-open .sp-detail {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 3;
    padding: 40px 2rem;
    text-align: center;
  }

  .fv-demo-section .sp-detail__logo {
    margin-bottom: 1.2rem;
  }

  .fv-demo-section .sp-detail__logo img {
    display: block;
    width: auto;
    max-width: 220px;
    object-fit: contain;
  }

  .fv-demo-section .sp-detail__trial {
    display: inline-block;
    background: #e67e22;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.3rem 1rem;
    border-radius: 3px;
    margin-bottom: 1rem;
    letter-spacing: 0.05em;
  }

  .fv-demo-section .sp-detail__desc {
    font-size: 14px;
    line-height: 1.9;
    color: #fff;
    text-align: center;
    margin-bottom: 1.5rem;
  }

  .fv-demo-section .sp-detail__cta {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.4);
  }

  .fv-demo-section .sp-detail__cta svg {
    width: 16px;
    height: 16px;
    display: block;
    fill: none;
    stroke: #fff;
    stroke-width: 2;
  }

  /* Neutralize PC hover states on SP */
  .fv-demo-section .job.is-active .label {
    opacity: 1;
    transform: none;
  }

  .fv-demo-section .job.is-active .card::before {
    opacity: 1;
  }

  .fv-demo-section .job.is-active figure.img .dummy-img {
    opacity: 1;
  }

  /* BG layer & nav hidden on SP */
  .fv-demo-section .job__box-bg {
    display: none;
  }

  .fv-demo-section .job-nav {
    display: none;
  }

  .fv-demo-section .job+.job {
    border-left: none;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
  }

  /* SP backgrounds */
  .fv-demo-section .dummy-img--job01 {
    background-image: url('../imgs/fv-demo/img/sp/bk/1.png');
  }

  .fv-demo-section .dummy-img--job02 {
    background-image: url('../imgs/fv-demo/img/sp/bk/2.png');
  }

  .fv-demo-section .dummy-img--job03 {
    background-image: url('../imgs/fv-demo/img/sp/bk/3.png');
  }

  .fv-demo-section .dummy-img--job04 {
    background-image: url('../imgs/fv-demo/img/sp/bk/4.png');
  }

  .fv-demo-section .dummy-img--job05 {
    background-image: url('../imgs/fv-demo/img/sp/bk/5.png');
  }

  .fv-demo-section .dummy-img--job06 {
    background-image: url('../imgs/fv-demo/img/sp/bk/6.png');
  }
}

/* ===== SP (max-width: 599px) ===== */
@media (max-width: 599px) {
  .fv-demo-section .job .label {
    font-size: 0.9rem;
  }
}
