@charset "UTF-8";

/* ============================================
   FAQ Page Specific Styles
   ============================================ */

/* Layout
   ----------------------------------------------------------------- */
.l-faq-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  padding-bottom: 5rem;
}

@media (min-width: 900px) {
  .l-faq-grid {
    grid-template-columns: 240px 1fr;
    gap: 4rem;
    align-items: start;
  }
}

/* Sidebar (PC Only)
   ----------------------------------------------------------------- */
.p-faq-sidebar {
  display: none;
}

@media (min-width: 900px) {
  .p-faq-sidebar {
    display: block;
    position: sticky;
    top: 120px; /* Header height + buffer */
    padding: 1.5rem;
    background-color: var(--c-white);
    border-radius: 12px;
    box-shadow: var(--sh-1);
    border: 1px solid var(--c-border);
  }

  .p-faq-nav__title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--c-gold);
    color: var(--c-text-main);
  }

  .p-faq-nav__list {
    list-style: none;
    padding: 0;
    margin: 0;
  }

  .p-faq-nav__item {
    margin-bottom: 0.5rem;
  }

  .p-faq-nav__link {
    display: block;
    padding: 0.6rem 0.8rem;
    color: var(--c-text);
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s ease;
    font-size: 0.95rem;
  }

  .p-faq-nav__link:hover {
    background-color: var(--c-surface-2);
    color: var(--c-link);
  }

  .p-faq-nav__link.is-active {
    background-color: rgba(197, 160, 89, 0.1);
    color: var(--c-gold);
    font-weight: 700;
  }
}

/* Search Box
   ----------------------------------------------------------------- */
.p-faq-search {
  max-width: 600px;
  margin: 0 auto 3rem;
  position: relative;
}

.p-faq-search__input {
  width: 100%;
  padding: 1rem 1rem 1rem 3rem;
  border: 2px solid var(--c-border);
  border-radius: 50px;
  font-size: 1rem;
  transition: border-color 0.3s ease;
  background-color: var(--c-white);
  box-shadow: var(--sh-1);
}

.p-faq-search__input:focus {
  outline: none;
  border-color: var(--c-gold);
  box-shadow: 0 4px 15px rgba(197, 160, 89, 0.2);
}

.p-faq-search__icon {
  position: absolute;
  top: 50%;
  left: 1.2rem;
  transform: translateY(-50%);
  color: var(--c-muted);
  pointer-events: none;
}

/* Main Content Styling
   ----------------------------------------------------------------- */
.p-faq-category {
  margin-bottom: 4rem;
  scroll-margin-top: 120px; /* For smooth scroll offset */
}

/* Header with Icon */
.p-faq-category__header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--c-border);
}

.p-faq-category__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background-color: var(--c-surface-2);
  border-radius: 50%;
  color: var(--c-gold);
  font-size: 1.2rem;
}

.p-faq-category__title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--c-text-main);
  font-family: var(--f-font-mincho);
}

/* Accordion Item
   ----------------------------------------------------------------- */
.c-faq-item {
  margin-bottom: 1rem;
  border: 1px solid var(--c-border);
  border-radius: 8px;
  background-color: var(--c-white);
  transition: all 0.3s ease;
  overflow: hidden; /* For background fill animation */
}

.c-faq-item:hover {
  box-shadow: var(--sh-1);
  border-color: var(--c-gold);
}

.c-faq-item[open] {
  border-color: var(--c-accent);
  box-shadow: var(--sh-2);
  background-color: #fffcfb; /* Very subtle warm tint */
}

.c-faq-item__summary {
  padding: 1.5rem;
  cursor: pointer;
  position: relative;
  list-style: none;
  display: flex;
  align-items: flex-start;
  gap: 1.2rem;
  transition: background-color 0.2s ease;
}

.c-faq-item__summary::-webkit-details-marker {
  display: none;
}

.c-faq-item__summary:hover {
  background-color: rgba(197, 160, 89, 0.05); /* Gold tint on hover */
}

/* Custom Marker (Q icon) */
.c-faq-item__q-mark {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background-color: var(--c-accent); /* Red Accent */
  color: #fff;
  border-radius: 50%;
  font-weight: 700;
  font-size: 1rem;
  font-family: var(--font-english);
  box-shadow: 0 2px 5px rgba(179, 58, 43, 0.3);
}

.c-faq-item__question {
  font-weight: 700;
  line-height: 1.6;
  flex-grow: 1;
  color: var(--c-text-main);
  padding-top: 0.2rem;
  font-size: 1.05rem;
}

.c-faq-item[open] .c-faq-item__question {
  color: var(--c-accent); /* Highlight question when open */
}

/* Toggle Icon (+/-) */
.c-faq-item__toggle {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border: 1px solid var(--c-border);
  border-radius: 50%;
  background-color: #fff;
  position: relative;
  margin-top: 2px;
  color: var(--c-gold);
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.c-faq-item__toggle::before,
.c-faq-item__toggle::after {
  content: "";
  position: absolute;
  background-color: currentColor;
  border-radius: 2px;
}

.c-faq-item__toggle::before {
  width: 12px;
  height: 2px;
}

.c-faq-item__toggle::after {
  width: 2px;
  height: 12px;
  transition: transform 0.3s ease;
}

/* Open State for Toggle */
.c-faq-item[open] .c-faq-item__toggle {
  background-color: var(--c-gold);
  border-color: var(--c-gold);
  color: #fff;
  transform: rotate(180deg);
}

.c-faq-item[open] .c-faq-item__toggle::after {
  transform: rotate(90deg); /* Turn + into - nicely */
}

/* Answer Area */
.c-faq-item__answer {
  padding: 0 1.5rem 1.5rem 4.2rem; /* Align with text start details */
  color: var(--c-text);
  line-height: 1.8;
  font-size: 0.95rem;
  border-top: 1px solid transparent; /* Placeholder for layout stability */
  animation: slideDown 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.c-faq-item[open] .c-faq-item__answer {
  padding-top: 0.5rem;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 768px) {
  .c-faq-item__summary {
    padding: 1.2rem;
    gap: 1rem;
  }

  .c-faq-item__question {
    font-size: 1rem;
  }

  .c-faq-item__answer {
    padding: 0 1.2rem 1.2rem 1.2rem;
    background-color: #fbf9f6; /* Slight separation on mobile */
    margin: 0 1.2rem 1.2rem;
    border-radius: 6px;
  }
}

/* State Classes for JS */
.is-hidden {
  display: none !important;
}

.p-faq-category.is-empty {
  display: none;
}

/* Empty State Message */
.p-faq-no-results {
  display: none;
  text-align: center;
  padding: 3rem;
  color: var(--c-text-gray);
  font-size: 1.1rem;
}

.p-faq-no-results.is-visible {
  display: block;
}
