
/* ==================================================
   FAQ Page
   Japanese / English
================================================== */

.faq-section {
  --faq-primary: #315b7c;
  --faq-accent: #467ba6;
  --faq-light: #edf4f9;
  --faq-border: #d6e3ed;
  --faq-text: #333333;
  --faq-white: #ffffff;

  margin: 40px 0 60px;
}


/* ==================================================
   Category
================================================== */

.faq-section .faq-category {
  margin: 0 0 48px;
  padding: 0;
}

.faq-section .faq-category:last-child {
  margin-bottom: 0;
}

.faq-section .faq-category-title {
  margin: 0 0 20px;
  padding: 4px 0 4px 14px;

  border: none;
  border-left: 5px solid var(--faq-accent);
  background: transparent;

  color: var(--faq-primary);
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.6;
}


/* ==================================================
   FAQ Item
================================================== */

.faq-section .faq-item {
  margin: 0 0 12px;

  border: 1px solid var(--faq-border);
  border-radius: 10px;
  background: var(--faq-white);

  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.faq-section .faq-item[open] {
  border-color: var(--faq-accent);
  box-shadow: 0 3px 12px rgba(49, 91, 124, 0.07);
}


/* ==================================================
   Question
================================================== */

.faq-section .faq-question {
  display: flex;
  align-items: center;
  gap: 16px;

  position: relative;
  box-sizing: border-box;

  min-height: 64px;
  padding: 18px 20px;
  margin: 0;

  border-radius: 9px;
  background: var(--faq-white);

  color: var(--faq-primary);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.7;

  cursor: pointer;
  list-style: none;

  transition: background-color 0.2s ease;
}

/* Remove default disclosure marker */

.faq-section .faq-question::-webkit-details-marker {
  display: none;
}

.faq-section .faq-question::marker {
  content: "";
}

/* Hover */

@media (hover: hover) {
  .faq-section .faq-question:hover {
    background: var(--faq-light);
  }
}

/* Keyboard focus */

.faq-section .faq-question:focus-visible {
  outline: 3px solid var(--faq-accent);
  outline-offset: 3px;
}

/* Open state */

.faq-section .faq-item[open] > .faq-question {
  background: var(--faq-light);
  border-radius: 9px 9px 0 0;
}


/* ==================================================
   Question Number
================================================== */

.faq-section .faq-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;

  box-sizing: border-box;
  min-width: 44px;
  padding: 5px 8px;

  border-radius: 6px;
  background: var(--faq-accent);

  color: var(--faq-white);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.5;
  white-space: nowrap;
}


/* ==================================================
   Question Text
================================================== */

.faq-section .faq-question-text {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}


/* ==================================================
   Expand / Collapse Icon
================================================== */

.faq-section .faq-question::after {
  content: "";

  display: block;
  flex-shrink: 0;

  width: 18px;
  height: 18px;
  margin-left: auto;

  background:
    linear-gradient(
      var(--faq-accent),
      var(--faq-accent)
    ) center / 16px 2px no-repeat,
    linear-gradient(
      var(--faq-accent),
      var(--faq-accent)
    ) center / 2px 16px no-repeat;
}

/* Plus changes to minus */

.faq-section .faq-item[open] > .faq-question::after {
  background:
    linear-gradient(
      var(--faq-accent),
      var(--faq-accent)
    ) center / 16px 2px no-repeat;
}


/* ==================================================
   Answer
================================================== */

.faq-section .faq-answer {
  display: flex;
  align-items: flex-start;
  gap: 16px;

  padding: 24px 20px 28px;

  border-top: 1px solid var(--faq-border);
  border-radius: 0 0 9px 9px;
  background: var(--faq-white);
}


/* ==================================================
   Answer Label
================================================== */

.faq-section .faq-answer-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;

  box-sizing: border-box;
  width: 44px;
  min-height: 34px;

  border-radius: 6px;
  background: var(--faq-light);

  color: var(--faq-accent);
  font-size: 1.1rem;
  font-weight: 700;
}


/* ==================================================
   Answer Content
================================================== */

.faq-section .faq-answer-content {
  flex: 1;
  min-width: 0;

  color: var(--faq-text);
  font-size: 1rem;
  line-height: 1.9;
  overflow-wrap: anywhere;
}

.faq-section .faq-answer-content p {
  margin: 0 0 1em;
  padding: 0;
}

.faq-section .faq-answer-content strong {
  color: var(--faq-primary);
  font-weight: 700;
}

.faq-section .faq-answer-content > :last-child {
  margin-bottom: 0;
}


/* ==================================================
   Lists
================================================== */

.faq-section .faq-answer-content ul,
.faq-section .faq-answer-content ol {
  margin: 0 0 1.2em;
  padding-left: 1.5em;
}

.faq-section .faq-answer-content ul {
  list-style: disc outside;
}

.faq-section .faq-answer-content ol {
  list-style: decimal outside;
}

.faq-section .faq-answer-content li {
  margin-bottom: 0.4em;
  padding: 0;
}

.faq-section .faq-answer-content li:last-child {
  margin-bottom: 0;
}


/* ==================================================
   Links
================================================== */

.faq-section .faq-answer-content a {
  color: var(--faq-primary);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.faq-section .faq-answer-content a:hover {
  color: var(--faq-accent);
}

.faq-section .faq-answer-content a:focus-visible {
  outline: 2px solid var(--faq-accent);
  outline-offset: 3px;
}


/* ==================================================
   Responsive Design
================================================== */

@media screen and (max-width: 767px) {

  .faq-section {
    margin: 30px 0 40px;
  }

  .faq-section .faq-category {
    margin-bottom: 36px;
  }

  .faq-section .faq-category-title {
    margin-bottom: 16px;
    padding-left: 12px;
    font-size: 1.1rem;
  }

  .faq-section .faq-question {
    gap: 10px;
    padding: 14px 12px;
    font-size: 0.95rem;
  }

  .faq-section .faq-number {
    min-width: 36px;
    padding: 4px 6px;
    font-size: 0.8rem;
  }

  .faq-section .faq-question::after {
    width: 16px;
    height: 16px;
  }

  .faq-section .faq-answer {
    flex-direction: column;
    gap: 10px;
    padding: 18px 16px 22px;
  }

  .faq-section .faq-answer-label {
    width: 36px;
    min-height: 30px;
    font-size: 1rem;
  }

  .faq-section .faq-answer-content {
    width: 100%;
    font-size: 0.95rem;
    line-height: 1.9;
  }
}


/* ==================================================
   Reduced Motion
================================================== */

@media (prefers-reduced-motion: reduce) {

  .faq-section .faq-item,
  .faq-section .faq-question {
    transition: none;
  }
}
