/**
 * LinguaLink360 - FAQs Page Styles
 * Loaded only by the FAQs page. Page classes are prefixed with ll-faqs-.
 * The accordion (.ll-faq__*) rules below are the same as the Home FAQ section in
 * home.css, copied here so this page does not have to load the 2,500-line home.css.
 * The collapsed state applies only under .ll-js AND .ll-faq__list--ready (set by
 * faqs.js), so every answer stays visible without JavaScript.
 */

/* ==========================================================================
   1. PAGE HEADER + SEARCH
   ========================================================================== */
.ll-faqs-hero {
  padding-block: clamp(40px, 5vw, 72px);
  background:
    radial-gradient(ellipse 55% 70% at 0% 0%, rgba(33, 127, 247, 0.1), transparent 70%),
    radial-gradient(ellipse 50% 60% at 100% 100%, rgba(33, 127, 247, 0.08), transparent 70%),
    var(--ll-color-brand-primary-subtle);
  border-bottom: 1px solid var(--ll-color-border-subtle);
}

.ll-faqs-hero__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--ll-space-sm);
  max-width: 720px;
  margin-inline: auto;
  text-align: center;
  min-width: 0;
}

.ll-faqs-chip-icon {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ll-faqs-hero__title {
  margin: 0;
  font-size: var(--ll-font-size-display);
  font-weight: var(--ll-font-weight-extrabold);
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: var(--ll-color-text-main);
  text-wrap: balance;
}

.ll-faqs-hero__lead {
  margin: 0;
  font-size: var(--ll-font-size-md);
  line-height: var(--ll-line-height-normal);
  color: var(--ll-color-text-muted);
}

.ll-faqs-search {
  position: relative;
  width: 100%;
  max-width: 560px;
  margin-top: var(--ll-space-xs);
}

.ll-faqs-search[hidden] {
  display: none;
}

.ll-faqs-search__icon {
  position: absolute;
  top: 50%;
  left: 18px;
  width: 20px;
  height: 20px;
  transform: translateY(-50%);
  fill: none;
  stroke: var(--ll-color-text-subtle);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

.ll-faqs-search__input {
  width: 100%;
  height: 54px;
  padding: 0 52px 0 50px;
  box-sizing: border-box;
  font-family: var(--ll-font-family-base);
  font-size: var(--ll-font-size-base);
  color: var(--ll-color-text-main);
  background-color: #ffffff;
  border: 1px solid var(--ll-color-border);
  border-radius: var(--ll-radius-pill);
  box-shadow: var(--ll-shadow-md);
  transition: border-color var(--ll-transition-base), box-shadow var(--ll-transition-base);
  -webkit-appearance: none;
  appearance: none;
}

.ll-faqs-search__input::placeholder {
  color: var(--ll-color-text-subtle);
}

.ll-faqs-search__input::-webkit-search-cancel-button {
  display: none;
}

.ll-faqs-search__input:hover {
  border-color: #cbd5e1;
}

.ll-faqs-search__input:focus-visible {
  outline: none;
  border-color: var(--ll-color-brand-primary);
  box-shadow: var(--ll-shadow-focus), var(--ll-shadow-md);
}

.ll-faqs-search__clear {
  position: absolute;
  top: 50%;
  right: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  transform: translateY(-50%);
  color: var(--ll-color-text-subtle);
  background: transparent;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
}

.ll-faqs-search__clear[hidden] {
  display: none;
}

.ll-faqs-search__clear:hover {
  color: var(--ll-color-text-main);
  background-color: var(--ll-color-surface-muted);
}

.ll-faqs-search__clear:focus-visible {
  outline: 2px solid var(--ll-color-brand-primary-dark);
  outline-offset: 1px;
}

.ll-faqs-search__clear svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Live region: results count, announced to screen readers and shown as a small caption */
.ll-faqs-status {
  min-height: 1.25em;
  margin: 0;
  font-size: var(--ll-font-size-sm);
  color: var(--ll-color-text-subtle);
}

/* ==========================================================================
   2. QUESTIONS LIST + EMPTY STATE
   ========================================================================== */
.ll-faqs-body {
  padding-block: clamp(32px, 4vw, 64px);
  background-color: #ffffff;
}

.ll-faqs-body__inner {
  max-width: 860px;
  margin-inline: auto;
  min-width: 0;
}

.ll-faqs-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: clamp(28px, 4vw, 48px) clamp(16px, 3vw, 32px);
  text-align: center;
  background-color: var(--ll-color-surface-subtle);
  border: 1px dashed #cbd5e1;
  border-radius: var(--ll-radius-lg);
}

.ll-faqs-empty[hidden] {
  display: none;
}

.ll-faqs-empty__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  margin-bottom: 4px;
  color: var(--ll-color-brand-primary-dark);
  background-color: var(--ll-color-brand-primary-light);
  border-radius: 50%;
}

.ll-faqs-empty__icon svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ll-faqs-empty__title {
  margin: 0;
  font-size: var(--ll-font-size-lg);
  font-weight: var(--ll-font-weight-bold);
  color: var(--ll-color-text-main);
}

.ll-faqs-empty__text {
  margin: 0 0 8px;
  max-width: 46ch;
  font-size: var(--ll-font-size-sm);
  line-height: var(--ll-line-height-normal);
  color: var(--ll-color-text-muted);
}

/* ==========================================================================
   3. CLOSING CTA CARD
   ========================================================================== */
.ll-faqs-cta {
  padding-block: 0 clamp(40px, 5vw, 88px);
  background-color: #ffffff;
}

.ll-faqs-cta__card {
  display: grid;
  grid-template-columns: 1fr;
  justify-items: center;
  gap: var(--ll-space-sm);
  max-width: 960px;
  margin-inline: auto;
  padding: clamp(24px, 4vw, 48px);
  box-sizing: border-box;
  text-align: center;
  background:
    radial-gradient(ellipse 70% 90% at 100% 0%, rgba(33, 127, 247, 0.16), transparent 70%),
    var(--ll-color-brand-primary-subtle);
  border: 1px solid rgba(33, 127, 247, 0.22);
  border-radius: var(--ll-radius-xl);
  box-shadow: var(--ll-shadow-md);
}

.ll-faqs-cta__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  color: #ffffff;
  background-color: var(--ll-color-brand-primary-dark);
  border-radius: var(--ll-radius-lg);
}

.ll-faqs-cta__icon svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ll-faqs-cta__title {
  margin: 0;
  font-size: var(--ll-font-size-2xl);
  font-weight: var(--ll-font-weight-extrabold);
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--ll-color-text-main);
}

.ll-faqs-cta__desc {
  margin: 6px 0 0;
  font-size: var(--ll-font-size-base);
  color: var(--ll-color-text-muted);
}

.ll-faqs-cta__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 4px;
}

/* ==========================================================================
   4. ACCORDION (same rules as the Home FAQ section in home.css)
   ========================================================================== */
.ll-faq__list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.ll-faq__list[hidden] {
  display: none;
}

.ll-faq__item {
  background-color: #ffffff;
  border: 1px solid var(--ll-color-border);
  border-radius: var(--ll-radius-lg);
  box-shadow: var(--ll-shadow-sm);
  transition: border-color var(--ll-transition-base), box-shadow var(--ll-transition-base);
}

.ll-faq__item[hidden] {
  display: none;
}

.ll-faq__item:hover {
  border-color: rgba(33, 127, 247, 0.3);
}

.ll-faq__item--open {
  border-color: rgba(33, 127, 247, 0.4);
  box-shadow: var(--ll-shadow-md);
}

.ll-faq__heading {
  margin: 0;
}

.ll-faq__trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 52px;
  padding: 12px clamp(14px, 1.8vw, 20px);
  box-sizing: border-box;
  font-family: var(--ll-font-family-base);
  text-align: left;
  color: var(--ll-color-text-main);
  background: none;
  border: 0;
  border-radius: var(--ll-radius-lg);
  cursor: pointer;
}

.ll-faq__trigger:focus-visible {
  outline: 2px solid var(--ll-color-brand-primary-dark);
  outline-offset: 2px;
}

.ll-faq__question {
  font-size: var(--ll-font-size-base);
  font-weight: var(--ll-font-weight-bold);
  line-height: var(--ll-line-height-snug);
  overflow-wrap: anywhere;
}

.ll-faq__item--open .ll-faq__question {
  color: var(--ll-color-brand-primary-dark);
}

.ll-faq__icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: var(--ll-color-brand-primary-dark);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform var(--ll-transition-base);
}

.ll-faq__item--open .ll-faq__icon {
  transform: rotate(180deg);
}

/* Panel: grid-template-rows 0fr -> 1fr animates height without measuring */
.ll-faq__panel {
  display: grid;
  grid-template-rows: 1fr;
}

.ll-faq__panel-inner {
  min-height: 0;
  overflow: hidden;
}

.ll-faq__answer {
  margin: 0;
  padding: 0 clamp(14px, 1.8vw, 20px) 16px;
  font-size: var(--ll-font-size-sm);
  line-height: var(--ll-line-height-normal);
  color: var(--ll-color-text-muted);
  overflow-wrap: anywhere;
}

.ll-faq__link {
  font-weight: var(--ll-font-weight-semibold);
  color: var(--ll-color-brand-primary-dark);
  text-decoration: underline;
  text-underline-offset: 3px;
  white-space: nowrap;
}

.ll-faq__link:hover {
  color: var(--ll-color-brand-primary-hover);
}

.ll-js .ll-faq__list--ready .ll-faq__panel {
  grid-template-rows: 0fr;
  transition: grid-template-rows 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

.ll-js .ll-faq__list--ready .ll-faq__item--open .ll-faq__panel {
  grid-template-rows: 1fr;
}

/* Closed content is hidden from tab order and assistive tech after the collapse finishes */
.ll-js .ll-faq__list--ready .ll-faq__panel-inner {
  visibility: hidden;
  transition: visibility 0s linear 300ms;
}

.ll-js .ll-faq__list--ready .ll-faq__item--open .ll-faq__panel-inner {
  visibility: visible;
  transition-delay: 0s;
}

@media (prefers-reduced-motion: reduce) {
  .ll-js .ll-faq__list--ready .ll-faq__panel,
  .ll-js .ll-faq__list--ready .ll-faq__panel-inner,
  .ll-faq__icon,
  .ll-faq__item,
  .ll-faqs-search__input {
    transition: none;
  }
}
