/* ==========================================================================
   FAQ Page – Sidebar + Panel layout
   Brand colours from brand-variables.css (--color-brand, --color-brand-dark)
   ========================================================================== */

/* ── Page wrapper ─────────────────────────────────────────────────────────── */
.faq-page {
  background-color: var(--color-gray-50, #f9fafb);
  min-height: 60vh;
  padding: 48px 20px 64px;
  font-family: var(--font-primary, 'Inter', sans-serif);
}

/* ── Two-column layout ────────────────────────────────────────────────────── */
.faq-layout {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  max-width: 1140px;
  margin: 0 auto;
}

/* ── Sidebar ──────────────────────────────────────────────────────────────── */
.faq-sidebar {
  flex: 0 0 325px;
  background: #ffffff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.07);
  position: sticky;
  top: 24px;
}

.faq-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px 20px;
  border: none;
  background: transparent;
  cursor: pointer;
  text-align: left;
  color: var(--color-gray-700, #374151);
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  line-height: 1.4;
  border-left: 3px solid transparent;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.faq-nav-item:not(:last-child) {
  border-bottom: 1px solid var(--color-gray-100, #f3f4f6);
}

.faq-nav-item:hover:not(.faq-nav-item--active) {
  background: var(--color-gray-50, #f9fafb);
  color: var(--color-brand, #7d9a4c);
}

.faq-nav-item--active {
  background: var(--color-brand-dark, #598017);
  color: #ffffff;
  border-left-color: var(--color-brand-dark, #598017);
  font-weight: 600;
}

.faq-nav-item--active .faq-nav-icon svg {
  stroke: #ffffff;
}

.faq-nav-item--active .faq-nav-icon svg path[fill] {
  fill: #ffffff;
}

.faq-nav-icon svg circle[fill],
.faq-panel-header-icon svg circle[fill] {
  fill: var(--color-brand, #7d9a4c);
}

.faq-nav-item--active .faq-nav-icon svg circle[fill] {
  fill: #ffffff;
}

.faq-nav-icon svg .wheel-fill,
.faq-panel-header-icon svg .wheel-fill {
  fill: var(--color-brand, #7d9a4c);
}

.faq-nav-item--active .faq-nav-icon svg .wheel-fill {
  fill: #ffffff;
}

.faq-nav-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
}

.faq-nav-icon svg {
  width: 20px;
  height: 20px;
  stroke: var(--color-brand, #7d9a4c);
  transition: stroke 0.15s;
}

.faq-nav-item:hover:not(.faq-nav-item--active) .faq-nav-icon svg {
  stroke: var(--color-brand, #7d9a4c);
}

.faq-nav-label {
  line-height: 1.35;
  white-space: nowrap;
}

/* ── Main panel area ──────────────────────────────────────────────────────── */
.faq-main {
  flex: 1;
  min-width: 0;
}

/* Hide all panels; only .faq-panel--active is shown */
.faq-panel {
  display: none;
}

.faq-panel--active {
  display: block;
}

/* ── Panel header ─────────────────────────────────────────────────────────── */
.faq-panel-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  padding: 0 4px;
}

.faq-panel-header-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  color: var(--color-brand, #7d9a4c);
}

.faq-panel-header-icon svg {
  width: 24px;
  height: 24px;
  stroke: var(--color-brand, #7d9a4c);
}

.faq-panel-header-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--color-brand, #7d9a4c);
  margin: 0;
  letter-spacing: 0.01em;
}

/* ── FAQ accordion items ──────────────────────────────────────────────────── */
.faq-item {
  background: #ffffff;
  border-radius: 8px;
  margin-bottom: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  overflow: hidden;
  border: 1px solid var(--color-gray-200, #e5e7eb);
  transition: box-shadow 0.15s;
}

.faq-item:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Question button */
.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  padding: 18px 20px;
  border: none;
  background: transparent;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
}

.faq-question-text {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--color-gray-800, #1f2937);
  flex: 1;
}

/* Chevron icon */
.faq-chevron {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  stroke: var(--color-gray-400, #9ca3af);
  transition: transform 0.2s ease, stroke 0.15s;
}

.faq-item--open .faq-chevron {
  transform: rotate(180deg);
  stroke: var(--color-brand, #7d9a4c);
}

/* Answer panel */
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
}

.faq-item--open .faq-answer {
  max-height: 600px;
}

.faq-answer-text {
  padding: 0 20px 20px;
  margin: 0;
  font-size: 14px;
  line-height: 1.7;
  color: var(--color-gray-600, #4b5563);
  border-top: 1px solid var(--color-gray-100, #f3f4f6);
  padding-top: 14px;
}

/* ── Customer Support Section ─────────────────────────────────────────────── */
.customer-support-section {
  background-color: var(--color-brand, #7d9a4c);
  color: #ffffff;
  padding: 72px 100px;
  text-align: center;
  font-family: var(--font-primary, 'Inter', sans-serif);
}

.section-title {
  font-size: 30px;
  font-weight: 700;
  margin-bottom: 36px;
  line-height: 1.3;
  letter-spacing: 0.5px;
}

.support-cards-wrapper {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.support-card-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.support-card {
  background-color: #ffffff;
  color: var(--color-brand, #7d9a4c);
  border-radius: 8px;
  padding: 14px 32px;
  width: 240px;
  cursor: pointer;
  transition: box-shadow 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: row;
  gap: 10px;
  height: 70px;
  text-decoration: none;
}

.support-card:hover {
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
}

.support-card .card-svg-icon,
.support-card svg {
  width: 22px;
  height: 22px;
  color: var(--color-brand, #7d9a4c);
  flex-shrink: 0;
}

.support-card span {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-brand, #7d9a4c);
  white-space: nowrap;
}

.response-detail {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.82);
}

/* ── Back button (mobile only) ────────────────────────────────────────────── */
.faq-back-btn {
  display: none; /* hidden on desktop */
}

/* ── Mobile: two-screen pattern ──────────────────────────────────────────── */
@media (max-width: 767px) {
  .faq-page {
    padding: 16px 12px 48px;
    background-color: var(--color-gray-50, #f9fafb);
  }

  .faq-layout {
    flex-direction: column;
    gap: 0;
  }

  /* ── Screen 1: category list ── */
  .faq-sidebar {
    flex: none;
    width: 100%;
    position: static;
    display: flex;
    flex-direction: column;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.07);
  }

  /* Nav items as full-width rows */
  .faq-nav-item {
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    padding: 15px 16px;
    min-width: unset;
    border-left: none;
    border-right: none;
    border-bottom: 1px solid var(--color-gray-100, #f3f4f6);
    border-top: none;
    white-space: nowrap;
  }

  .faq-nav-item:last-child {
    border-bottom: none;
  }

  .faq-nav-item--active {
    border-left: none;
  }

  .faq-nav-label {
    font-size: 14px;
    font-weight: 500;
    text-align: left;
    white-space: nowrap;
    max-width: none;
    line-height: 1.4;
  }

  .faq-nav-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
  }

  .faq-nav-icon svg {
    width: 20px;
    height: 20px;
  }

  /* Main (questions) hidden by default on mobile */
  .faq-main {
    display: none;
  }

  /* ── Screen 2: questions view (panel open) ── */
  .faq-layout--panel-open .faq-sidebar {
    display: none;
  }

  .faq-layout--panel-open .faq-main {
    display: block;
  }

  /* Back button visible in panel view */
  .faq-layout--panel-open .faq-back-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    color: var(--color-brand, #7d9a4c);
  }

  .faq-layout--panel-open .faq-back-btn svg {
    width: 22px;
    height: 22px;
  }

  /* Panel header – plain row, no box */
  .faq-panel-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 0;
    margin-bottom: 14px;
    background: none;
    border: none;
    box-shadow: none;
  }

  .faq-panel-header-title {
    font-size: 15px;
    font-weight: 600;
  }

  .faq-panel-header-icon {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
  }

  .faq-panel-header-icon svg {
    width: 20px;
    height: 20px;
  }

  /* FAQ items on mobile */
  .faq-item {
    margin-bottom: 10px;
  }

  .faq-question {
    padding: 16px 14px;
  }

  .faq-question-text {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;
  }

  .faq-answer-text {
    padding: 0 14px 16px;
    padding-top: 12px;
  }

  /* Support section */
  .customer-support-section {
    padding: 40px 16px;
  }

  .section-title {
    font-size: 22px;
    margin-bottom: 24px;
  }

  .support-cards-wrapper {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
  }

  .support-card-wrapper {
    width: calc(50% - 8px);
    align-items: center;
  }

  .support-card {
    width: 100%;
    height: 56px;
    padding: 10px 12px;
  }

  .response-detail {
    white-space: nowrap;
  }
}

@media (max-width: 399px) {
  .support-cards-wrapper {
    flex-direction: column;
    align-items: center;
  }

  .support-card-wrapper {
    width: 100%;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .faq-sidebar {
    flex: 0 0 210px;
  }
}
