body {
  /* page-faq.cssと衝突するので、強制的に上書きする */
  background-color: var(--color-white) !important;
}

.mv-container {
  min-height: 666px;
  margin-bottom: unset;
}

.mv-main {
  margin-bottom: 8.8%;
}

.section-subtitle {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1;
  color: var(--color-accent);
}

.section-container {
  padding: 7.5rem 0;

  @media (width <= 767px) {
    padding: 3.75rem 0;
  }
}

.impact-section {
  text-align: center;

  .section-subtitle {
    margin-bottom: 1.5rem;
  }

  .section-title {
    margin-bottom: 1.5rem;

    @media (width <= 767px) {
      margin-bottom: 0.5rem;
    }
  }
}

.impact-section-main-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.impact-section-image-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin-top: 5rem;

  @media (width <= 767px) {
    margin-top: 1.5rem;
  }
}

.why-section {
  padding-top: 0;
}

.why-section-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5%;
  align-items: start;

  @media (width <= 767px) {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
}

.why-section-content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-top: 2rem;
  margin-bottom: 2rem;

  @media (width <=767px) {
    margin-top: unset;
    margin-bottom: unset;
  }
}

.why-item {
  display: flex;
  flex-direction: column;
  gap: 1rem;

  .section-title {
    margin-bottom: 0;
  }

  @media (width <= 767px) {
    gap: 0.5rem;
  }
}

.why-section-image-container {
  position: relative;
  height: 100%;
  overflow: hidden;
}

.why-section-image {
  position: absolute;
  top: 0;
  left: 70%;
  width: auto;
  max-width: none;
  height: 100%;
  transform: translateX(-50%);

  @media (width <= 767px) {
    position: static;
    width: 100%;
    height: auto;
    transform: none;
  }
}

/* function section */
.function-section {
  padding-top: 0;

  @media (width <= 767px) {
    padding-top: 7.5rem;
  }
}

.function-section-grid {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 3rem;

  @media (width <= 767px) {
    gap: 2.5rem;
    margin-top: 1.5rem;
  }
}

.function-item {
  display: grid;
  grid-template-columns: 40% 60%;
  gap: 5%;

  @media (width <= 767px) {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
  }

  .section-title {
    line-height: 1.2;
  }
}

.function-list {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding-left: 0;
  margin-top: 1.5rem;
  list-style: none;

  li {
    position: relative;
    padding-left: 1em;
    font-size: 1rem;
    line-height: 1.5;
    color: var(--color-black);

    &::before {
      position: absolute;
      left: 0;
      content: '-';
    }
  }

  @media (width <= 767px) {
    margin-top: 1rem;

    li {
      font-size: 0.875rem;
    }
  }
}

.function-content {
  @media (width <= 767px) {
    order: 2;
  }
}

.function-image-container {
  @media (width <= 767px) {
    order: 1;
  }
}

.function-image {
  width: 100%;
  height: auto;
}

.fact-section {
  background-color: var(--color-gray-bg);
}

.fact-section-container {
  display: flex;
  flex-direction: column;
  gap: 3rem;

  @media (width <= 767px) {
    gap: 1.5rem;
  }
}

.fact-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 0.5rem;

  @media (width <= 767px) {
    grid-template-columns: 1fr;
  }
}

.fact-image {
  width: 100%;
  border-radius: 12px;

  /* First 4 items span 3 columns (12 / 3 = 4 items) */
  &:nth-child(-n + 4) {
    grid-column: span 3;
  }

  /* Next 3 items span 4 columns (12 / 4 = 3 items) */
  &:nth-child(n + 5) {
    grid-column: span 4;
  }

  @media (width <= 767px) {
    /* Reset spans on mobile */
    &:nth-child(n) {
      grid-column: auto;
    }
  }
}

.who-section {
  padding-top: 0;
  background-color: var(--color-gray-bg);
}

.who-section-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;

  .section-title {
    margin-bottom: unset;
  }
}

.who-tabs {
  display: flex;
  gap: 0.5rem;
  width: 100%;
  max-width: 800px;
  margin-top: 3rem;
  margin-bottom: 3rem;

  @media (width <= 767px) {
    gap: 0.25rem;
  }
}

.who-tab {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px 8px;
  color: var(--color-white);
  cursor: pointer;
  background-color: var(--color-accent);
  border: none;
  border-radius: 12px;
  opacity: 0.7;
  transition: opacity 0.3s ease;

  &.active {
    opacity: 1;
  }
}

.chapter-label {
  font-size: 12px;
  line-height: 1;
}

.chapter-title {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.5;

  @media (width <= 767px) {
    font-size: 12px;
  }
}

.who-slider-container {
  display: flex;
  gap: 3%;
  align-items: start;
  width: 100%;

  @media (width <= 767px) {
    flex-direction: column;
    gap: 2rem;
    align-items: center;
  }
}

.who-person-info {
  display: flex;
  flex-shrink: 0;
  flex-direction: column;
  align-items: center;
  width: 160px;
}

.who-person-image-container {
  width: 160px;
  height: 160px;
  margin-bottom: 1rem;
  overflow: hidden;
  border-radius: 50%;
}

.who-person-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.who-person-name,
.who-person-title {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.5;
}

.who-content-box {
  position: relative;
  flex-grow: 1;
  padding: 2rem;
  text-align: left;
  background-color: var(--color-white);
  border-radius: 10px;

  /* Speech bubble arrow */
  &::before {
    position: absolute;
    top: 40px;
    left: -10px;
    width: 20px;
    height: 20px;
    content: '';
    background-color: var(--color-white);
    transform: rotate(45deg);

    @media (width <= 767px) {
      top: -10px;
      left: 50%;
      transform: translateX(-50%) rotate(45deg);
    }
  }
}

.who-content-text {
  font-size: 1rem;
  line-height: 1.8;

  p {
    margin-bottom: 1rem;

    &:last-child {
      margin-bottom: 0;
    }
  }
}

.who-navigation {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-top: 3rem;

  @media (width <= 767px) {
    margin-top: 1.5rem;
  }
}

.who-nav-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  font-size: 1rem;
  cursor: pointer;
  background-color: var(--color-white);
  border: none;
  border-radius: 10px;
  transition: background-color 0.3s ease;

  &:hover {
    color: var(--color-white);
    background-color: var(--color-accent);
  }
}

.who-dots {
  display: flex;
  gap: 0.5rem;
}

.who-dot {
  width: 10px;
  height: 10px;
  cursor: pointer;
  background-color: var(--color-gray);
  border-radius: 50%;
  transition: background-color 0.3s ease;

  &.active {
    background-color: var(--color-accent);
  }
}

.qa-section {
  padding-top: 0;
  background-color: var(--color-gray-bg);

  .section-subtitle {
    margin-bottom: 1.5rem;
  }
}

.link {
  display: inline-flex;
  color: var(--color-link);
  text-decoration: underline;

  &:hover {
    text-decoration: none;
  }
}

.recruit-banner-wrapper {
  display: flex;
  justify-content: center;
  width: 100%;
  margin-bottom: 7.5rem;

  @media (width <= 767px) {
    margin-bottom: 3.75rem;
  }

  & .recruit-banner-link {
    display: flex;
    gap: 1.25rem;
    align-items: center;
    justify-content: center;
    width: 36.75rem;
    max-width: 100%;
    height: 7.25rem;
    padding-top: 2.5rem;
    padding-bottom: 2.5rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-white);
    background-color: var(--color-accent);
    border-radius: 0.625rem;
    transition:
      opacity 0.3s ease,
      transform 0.3s ease;

    &:hover {
      color: var(--color-white);
      opacity: 0.9;
      transform: translateY(-2px);
    }

    @media (width <= 767px) {
      gap: 0.75rem;
      width: fit-content;
      max-width: 90%;
      height: auto;
      min-height: 3.5rem;
      padding: 1rem 1.5rem;
      margin-right: auto;
      margin-left: auto;
      font-size: 1rem;
      white-space: nowrap;
      border-radius: 6px;
    }

    & .recruit-banner-icon {
      flex-shrink: 0;
      width: 1.2em;
      height: 1.2em;
    }
  }
}

/* --- Utility Classes (MUST be at the bottom) --- */
/* 上書きしたいため最後においてください　*/

@media (width <= 767px) {
  /* On Mobile: Hide PC elements */
  .pc-only {
    display: none;
  }
}

@media (width > 767px) {
  /* On PC: Hide Mobile elements */
  .sp-only {
    display: none;
  }
}
