@charset "UTF-8";
/*
  /rakurakucloud/mailmarketing/asset/css/page/p-faq-fv.css
  FAQページFV用CSS＋次セクション用CSS
*/

.p-faq {
  .m-fv-lower {
    padding: 70px 20px 30px;
  }
}

/* FAQカテゴリタブ */
.p-faq-category {
  background: var(--gray-bg-02);
  border-bottom: 1px solid var(--gray-bg-01);
  padding: 0 20px;
  @media (max-width: 840px) {
    padding: 20px 20px 0;
    background: var(--white);
    border-bottom: none;
  }
}
.p-faq-category__inner {
  height: 55px;
  margin: 0 auto;
  max-width: 1000px;
  @media (max-width: 840px) {
    height: auto;
  }
}
.p-faq-category-list {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(4, 1fr);
  height: 100%;
  @media (max-width: 840px) {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    position: relative;
  }
}
.p-faq-category-item {
  background-color: var(--gray-bg-02);
  border: 1px solid var(--gray-bg-02);
  border-top: 5px solid var(--gray-bg-02);
  border-radius: 5px 5px 0 0;
  transition:
    background-color 0.3s ease,
    border-color 0.3s ease;

  @media (max-width: 840px) {
    border-radius: 5px;
    border-top-width: 1px;
    width: calc(50% - 5px);
  }
}
.p-faq-category-input {
  display: none;
}

/* ========================
   1. アクティブ（選択中）タブの見た目切り替え
   ======================== */
#tab-support:checked ~ .p-faq-category .p-faq-category-item:nth-child(1),
#tab-price:checked ~ .p-faq-category .p-faq-category-item:nth-child(2),
#tab-contract:checked ~ .p-faq-category .p-faq-category-item:nth-child(3),
#tab-function:checked ~ .p-faq-category .p-faq-category-item:nth-child(4) {
  background-color: var(--white);
  border-color: var(--rmailmarketing-dark);
  position: relative;

  @media (max-width: 840px) {
    border-color: var(--gray-bg-01);
    border-top: 4px solid var(--rmailmarketing-dark);
  }

  .p-faq-category__link {
    color: var(--rmailmarketing-dark);
  }
  &::after {
    background-color: var(--white);
    bottom: -2px;
    content: "";
    height: 3px;
    left: 0;
    position: absolute;
    width: 100%;

    @media (max-width: 840px) {
      display: none;
    }
  }
}

/* ========================
   2. コンテンツ部分の表示切り替え
   ======================== */
#tab-support:checked ~ .p-faq-content #content-support,
#tab-price:checked ~ .p-faq-content #content-price,
#tab-contract:checked ~ .p-faq-content #content-contract,
#tab-function:checked ~ .p-faq-content #content-function {
  display: grid;
  animation: fadeIn 0.4s ease forwards;
}
@keyframes fadeIn {
  0% {
    opacity: 0;
    transform: translateY(10px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.p-faq-category__link {
  align-items: center;
  color: var(--black);
  display: flex;
  font-size: clamp(16px, 1.5vw, 18px);
  font-weight: 700;
  height: 100%;
  justify-content: center;
  line-height: 1.7;
  padding: 8px 11px 11px;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.3s ease;

  @media (max-width: 840px) {
    padding: 12px 10px;
    font-size: 14px;
  }
}
/* FV下FAQコンテンツ */
.p-faq-content {
  padding: 0 20px;
}

.p-faq-content__inner {
  display: grid;
  gap: 30px;
  grid-template-columns: minmax(0, 900px) minmax(0, 250px);
  justify-content: space-between;
  margin: 0 auto;
  max-width: 1200px;
  @media (max-width: 840px) {
    display: block;
  }
}

.p-faq-content__main {
  padding: 62px 0 0;
  @media (max-width: 840px) {
    padding: 40px 0 0;
  }
}

.p-faq-content-list {
  display: none;
  gap: 10px;
}

.p-faq-content-item {
  background-color: var(--gray-bg-02);
  border-radius: 10px;
  padding: 25px 30px;
  @media (max-width: 840px) {
    padding: 20px;
  }
}

/* CTAボタン */
.p-faq-content-item {
  .c-cta {
    &.c-cta--simple,
    &.c-cta--simple-border {
      margin: 0 auto;
    }
    .c-cta__link {
      padding: 18px 28px;
      width: 320px;
      font-size: 18px;
      @media (max-width: 840px) {
        width: 240px;
      }
    }
  }
}

.p-faq-content-item__question {
  align-items: flex-start;
  display: grid;
  gap: 16px;
  grid-template-columns: 22px 1fr;
  padding: 0 0 20px;
  @media (max-width: 840px) {
    gap: 10px;
    grid-template-columns: 18px 1fr;
  }
}

.p-faq-content-item__question-label,
.p-faq-content-item__answer-label {
  color: var(--rmailmarketing-dark);
  display: block;
  font-size: 22px;
  line-height: 1;
  margin: 1px 0 0;
  @media (max-width: 840px) {
    font-size: 18px;
  }
}

.p-faq-content-item__question-text {
  color: var(--black);
  font-size: 18px;
  line-height: 1.2;
  @media (max-width: 840px) {
    font-size: 16px;
    line-height: 1.6;
  }
}

.p-faq-content-item__answer {
  background-color: var(--white);
  border-radius: 10px;
  display: grid;
  gap: 20px;
  grid-template-columns: 15px 1fr;
  padding: 20px;
  @media (max-width: 840px) {
    gap: 12px;
    grid-template-columns: 12px 1fr;
    padding: 16px;
  }
}

.p-faq-content-item__answer-body {
  display: grid;
  gap: 20px;
}

.p-faq-content-item__answer-text {
  color: var(--black);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.7;
}

.p-faq-content-item__answer-link {
  color: var(--link);
  font-weight: bold;
  line-height: 1.4;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.p-faq-sidebar__wrap {
  max-width: 250px;
  padding: 62px 0 0;
  position: sticky;
  top: 30px;
  @media (max-width: 840px) {
    padding: 30px 0 0;
    position: static;
    width: 100%;
    margin: 0 auto;
    max-width: none;
  }
  @media (max-width: 600px) {
    max-width: auto;
  }
}

.p-faq-sidebar__head {
  background-color: var(--rmailmarketing-dark);
  color: var(--white);
  font-size: 20px;
  line-height: 1.6;
  padding: 12px 20px 10px;
  text-align: center;
}

.p-faq-sidebar-item {
  background-color: var(--white);
  border-bottom: 1px solid var(--gray-bg-01);
}

.p-faq-sidebar-item--active {
  background-color: var(--rmailmarketing-bg-sub-03);
}

.p-faq-sidebar__link {
  color: var(--black);
  cursor: pointer;
  display: block;
  font-size: 16px;
  font-weight: bold;
  line-height: 1.7;
  padding: 13px 32px 13px 20px;
  position: relative;
  text-decoration: none;
  &::after {
    position: absolute;
    border-right: 2px solid var(--rmailmarketing-dark);
    border-top: 2px solid var(--rmailmarketing-dark);
    content: "";
    height: 7px;
    right: 15px;
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
    width: 7px;
  }
}

/* ========================
   サイドバーのアクティブ状態連動
   ======================== */
#tab-support:checked ~ .p-faq-content .p-faq-sidebar-item:nth-child(1),
#tab-price:checked ~ .p-faq-content .p-faq-sidebar-item:nth-child(2),
#tab-contract:checked ~ .p-faq-content .p-faq-sidebar-item:nth-child(3),
#tab-function:checked ~ .p-faq-content .p-faq-sidebar-item:nth-child(4) {
  background-color: var(--rmailmarketing-bg-sub-03);
}

.p-faq-sidebar__cta {
  align-items: center;
  background-color: var(--rmailmarketing-cta);
  border: 3px solid var(--white);
  border-radius: 50px;
  box-shadow: 0 0 7.5px rgb(0 0 0 / 20%);
  color: var(--white);
  display: inline-flex;
  font-size: 18px;
  font-weight: bold;
  height: 52px;
  justify-content: center;
  line-height: 16px;
  padding: 18px 40px 18px 28px;
  position: relative;
  text-decoration: none;
  width: 100%;
  &:after {
    content: "";
    position: absolute;
    border-right: 3px solid var(--white);
    border-top: 3px solid var(--white);
    display: block;
    height: 8px;
    right: 16px;
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
    width: 8px;
  }
  &:hover {
    background-color: var(--white);
    border: 3px solid var(--rmailmarketing-cta);
    color: var(--rmailmarketing-cta);
    &:after {
      border-right: 2px solid var(--rmailmarketing-cta);
      border-top: 2px solid var(--rmailmarketing-cta);
    }
  }
}

.p-faq-sidebar__cta-wrap {
  margin: 20px 0 0;
}
