/* ===== qa-sl ===== */

.qa-sl {
  margin-top: 100px;
  margin-bottom: 80px;
}

@media screen and (max-width: 1024px) {
  .qa-sl {
    margin-top: 20px;
    margin-bottom: 40px;
  }
}

/* ----- Container ----- */

.sl-container {
  width: 100%;
  max-width: 1200px;
  min-height: 696px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
  background-image: url('../images/bg_image.png');
  background-size: cover;
  background-position: bottom center;
  background-repeat: no-repeat;
  transition: height .25s ease-in-out;
}

@media screen and (max-width: 1024px) {
  .sl-container {
    min-height: unset;
    background-image: url('../images/bg_image__sp.png');
  }
}

.sl-container::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 2px solid #fff;
  pointer-events: none;
  z-index: 10;
}

@media screen and (max-width: 1024px) {
  .sl-container::before {
    inset: 5px;
  }
}

/* ----- Question ----- */

.sl-question {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 100%;
  z-index: 3;
}

@media screen and (max-width: 1024px) {
  .sl-question {
    height: auto;
    padding: 0 23px 70px;
  }
}

.sl-question.is-ready {
  left: 100%;
  transition: left .5s ease-in-out;
}

.sl-question.is-current {
  left: 0;
  transition: left .5s ease-in-out;
}

.sl-question.is-past {
  left: -100%;
  transition: left .5s ease-in-out;
}

/* ----- Header ----- */

.sl-header {
  text-align: center;
}

/* Title screen */
.sl-header.is-title {
  margin: 0 auto;
  position: relative;
  padding-top: 119px;
}

@media screen and (max-width: 1024px) {
  .sl-header.is-title {
    padding-top: 42px;
  }
}

.sl-header.is-title .sub {
  margin-bottom: 16px;
  font-size: 32px;
  font-weight: 700;
  color: #fff;
}

@media screen and (max-width: 1024px) {
  .sl-header.is-title .sub {
    margin-bottom: 10px;
    font-size: 16px;
  }
}

.sl-header.is-title .main {
  margin: 0 auto 50px;
  font-size: 44px;
  font-weight: 700;
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  justify-content: center;
}

@media screen and (max-width: 1024px) {
  .sl-header.is-title .main {
    margin: 0 auto 16px;
    font-size: 24px;
  }
}

.sl-header.is-title .main::after {
  content: "";
  display: block;
  width: 140px;
  height: 1px;
  margin: 16px auto 0;
  background: #fff;
}

@media screen and (max-width: 1024px) {
  .sl-header.is-title .main::after {
    width: 60px;
    margin-top: 10px;
  }
}

/* Q1–Q5 header */
.sl-header:not(.is-title) {
  margin-bottom: 45px;
  padding-top: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
}

@media screen and (max-width: 1024px) {
  .sl-header:not(.is-title) {
    margin-bottom: 40px;
    padding-top: 80px;
    flex-direction: column;
    align-items: center;
    gap: 0;
  }
}

.sl-header .qnum {
  font-size: 36px;
  letter-spacing: 0.1em;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

@media screen and (max-width: 1024px) {
  .sl-header .qnum {
    font-size: 22px;
  }
  .sl-header .qnum::after {
    content: "";
    display: block;
    width: 40px;
    height: 1px;
    background: #fff;
    margin: 8px auto 16px;
  }
}

.sl-header:not(.is-title) .main {
  font-size: 24px;
  font-weight: 700;
  color: #fff;
  text-align: left;
  line-height: 1.5;
  border-left: 1px solid #fff;
  padding-left: 20px;
}

@media screen and (max-width: 1024px) {
  .sl-header:not(.is-title) .main {
    font-size: 16px;
    text-align: center;
    border-left: none;
    padding-left: 0;
  }
}

/* ----- Read text ----- */

.sl-read {
  margin-bottom: 55px;
  font-size: 22px;
  color: #fff;
  line-height: 2;
  text-align: center;
}

@media screen and (max-width: 1024px) {
  .sl-read {
    margin: 0 auto 35px;
    font-size: 14px;
    line-height: 1.6;
  }
}

.sl-question:nth-child(1) .sl-read {
  margin-bottom: 60px;
}

@media screen and (max-width: 1024px) {
  .sl-question:nth-child(1) .sl-read {
    margin-bottom: 40px;
  }
}

/* ----- Answer area (first question) ----- */

@media screen and (max-width: 1024px) {
  .sl-question:nth-child(1) .sl-answer {
    display: flex;
    flex-wrap: wrap;
  }
  .sl-question:nth-child(1) .sl-answer .sl-btns {
    width: 100%;
    order: 2;
  }
}

/* ----- Start / Result button fade ----- */

.sl-question:nth-child(1) .btn-wrapper {
  opacity: 0;
  transition: opacity .5s ease-in-out;
}

.sl-question:nth-child(1).is-current .btn-wrapper {
  opacity: 1;
  transition: opacity .5s .5s ease-in-out;
}

/* ----- Choices ----- */

.sl-choices {
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
}

.sl-question:last-child .sl-choices {
  max-width: 630px;
  margin-bottom: 25px;
}

.sl-question:last-child .sl-choices .sl-choice {
  margin-bottom: 8px;
}

.sl-question:last-child .sl-choices .sl-choice:last-of-type {
  margin-bottom: 0;
}

.sl-choice {
  font-family: 'Noto Sans JP', sans-serif;
  min-height: 80px;
  margin-bottom: 16px;
  padding: 19px 16px;
  font-size: 20px;
  font-weight: 500;
  color: #173D60;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  opacity: 0;
  transition: opacity .5s 0 ease-in-out;
  cursor: pointer;
  pointer-events: none;
}

@media screen and (max-width: 1024px) {
  .sl-choice {
    min-height: auto;
    font-size: 16px;
    line-height: 1.5;
    padding: 12px 10px;
  }
}

.sl-choice:hover,
.sl-choice.is-selected {
  background: #173D60;
  color: #fff;
}

/* Choice state transitions */
.sl-question.is-ready .sl-choice {
  opacity: 0;
  transition: opacity .25s 0s ease-in-out;
}

.sl-question.is-current .sl-choice {
  opacity: 1;
  pointer-events: all;
  transition: opacity .25s .5s ease-in-out;
}

.sl-question.is-past .sl-choice {
  opacity: .99;
  pointer-events: none;
  transition: opacity .1s ease-in-out;
}

/* ----- Nav buttons ----- */

.sl-btns {
  opacity: 0;
  transition: opacity .5s ease-in-out;
}

.sl-question.is-current .sl-btns {
  opacity: 1;
  pointer-events: all;
  transition: opacity .5s .5s ease-in-out;
}

.sl-question.is-past .sl-btns {
  opacity: 1;
}

/* Prev */
.sl-btn-prev {
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  bottom: 40px;
  left: 40px;
}

@media screen and (max-width: 1024px) {
  .sl-btn-prev {
    font-size: 14px;
    bottom: 25px;
    left: 23px;
  }
}

.sl-btn-prev::before {
  content: "";
  width: 13px;
  height: 24px;
  margin-right: 15px;
  display: block;
  background: url("data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2214%22%20height%3D%2224%22%20viewBox%3D%220%200%2014%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M12.5%201L1.5%2012L12.5%2023%22%20stroke%3D%22white%22%20stroke-width%3D%222%22%2F%3E%3C%2Fsvg%3E") left top no-repeat;
  position: relative;
  left: 0;
  transition: left .25s;
}

@media screen and (max-width: 1024px) {
  .sl-btn-prev::before {
    width: 6px;
    height: 9px;
    margin-right: 13px;
    background-size: 6px 9px;
  }
}

.sl-btn-prev:hover::before {
  left: -5px;
}

/* Next */
.sl-btn-next {
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  position: absolute;
  right: 40px;
  bottom: 40px;
}

@media screen and (max-width: 1024px) {
  .sl-btn-next {
    font-size: 14px;
    right: 23px;
    bottom: 25px;
  }
}

.sl-btn-next::after {
  content: "";
  width: 13px;
  height: 24px;
  margin-left: 15px;
  display: block;
  background: url("data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2214%22%20height%3D%2224%22%20viewBox%3D%220%200%2014%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M1.5%2023L12.5%2012L1.5%200.999999%22%20stroke%3D%22white%22%20stroke-width%3D%222%22%2F%3E%3C%2Fsvg%3E") left top no-repeat;
  position: relative;
  right: 0;
  transition: right .25s;
}

@media screen and (max-width: 1024px) {
  .sl-btn-next::after {
    width: 6px;
    height: 9px;
    margin-left: 13px;
    background-size: 6px 9px;
  }
}

.sl-btn-next:hover::after {
  right: -5px;
}

.sl-question.is-btn-next .sl-btn-next {
  opacity: 1;
  pointer-events: all;
}

/* Result */
.sl-btn-result {
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease-in-out;
}

.sl-btn-result.is-active {
  opacity: 1;
  pointer-events: all;
  cursor: pointer;
}


/* ----- Progress indicator ----- */

.sl-nums {
  width: 100%;
  position: absolute;
  top: 70px;
  left: 0;
  z-index: 2;
}

@media screen and (max-width: 1024px) {
  .sl-nums {
    top: 43px;
  }
}

.sl-num-list {
  display: flex;
  align-items: center;
  gap: 60px;
  width: fit-content;
  margin: 0 auto;
  position: relative;
  opacity: 0;
  transition: opacity .5s .5s;
}

/* Connecting line from center of first dot to center of last dot */
.sl-num-list::before {
  content: "";
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  left: 8px;
  width: calc(100% - 16px);
  height: 2px;
  background: #E6CED0;
  z-index: 0;
}

@media screen and (max-width: 1024px) {
  .sl-num-list {
    gap: 40px;
  }
  .sl-num-list::before {
    left: 5px;
    width: calc(100% - 10px);
  }
}

.sl-num {
  width: 16px;
  height: 16px;
  display: block;
  background: #E6CED0;
  border-radius: 50%;
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  transition: background .3s, transform .3s;
}

@media screen and (max-width: 1024px) {
  .sl-num {
    width: 10px;
    height: 10px;
  }
}

.sl-num .number {
  display: none;
}

/* Hidden on start screen */
.sl-nums[data-index-current="0"] .sl-num-list {
  opacity: 0;
}

/* Visible from Q1 onward */
.sl-nums[data-index-current="1"] .sl-num-list,
.sl-nums[data-index-current="2"] .sl-num-list,
.sl-nums[data-index-current="3"] .sl-num-list,
.sl-nums[data-index-current="4"] .sl-num-list,
.sl-nums[data-index-current="5"] .sl-num-list {
  opacity: 1;
}

/* Active dot per question */
.sl-nums[data-index-current="1"] .sl-num:nth-child(1),
.sl-nums[data-index-current="2"] .sl-num:nth-child(2),
.sl-nums[data-index-current="3"] .sl-num:nth-child(3),
.sl-nums[data-index-current="4"] .sl-num:nth-child(4),
.sl-nums[data-index-current="5"] .sl-num:nth-child(5) {
  background: #C3535B;
  transform: scale(1.5);
}
