/**
 * FAQ Accordion Stylesheet
 *
 * Boarding-pass tab motif accordion FAQ styles based on design-inputs/16-faq.html.
 * Scoped under .faq-section and .uwe-widget--faq-accordion.
 *
 * @package Universal_Elementor_Engine\Widgets\Faq_Accordion
 */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,500;0,9..144,600;1,9..144,500&family=Manrope:wght@400;500;600;700;800&family=Space+Mono:wght@400;700&display=swap');

/* Elementor container breakout helpers */
.elementor-widget-uwe-faq-accordion,
.elementor-widget-uwe-faq-accordion .elementor-widget-container {
  overflow: visible !important;
}

/* ============================================================
   GLOBAL FAQ SECTION
   ============================================================ */

.faq-section {
  --faq-ink: #0a2540;
  --faq-ink-soft: #5b6b7d;
  --faq-paper: #ffffff;
  --faq-bg: #f5f8fc;
  --faq-line: #e4ebf3;

  /* Brand palette */
  --faq-blue: #0064c1;
  --faq-blue-deep: #00478a;
  --faq-blue-tint: #e8f2fc;
  --faq-orange: #f8753a;
  --faq-orange-deep: #d95f28;

  --faq-font-display: 'Fraunces', 'Georgia', serif;
  --faq-font-body: 'Manrope', -apple-system, sans-serif;
  --faq-font-mono: 'Space Mono', monospace;

  position: relative;
  background: var(--faq-bg);
  color: var(--faq-ink);
  font-family: var(--faq-font-body);
  padding: clamp(56px, 8vw, 100px) 0;
  box-sizing: border-box;
}

.faq-section *,
.faq-section *::before,
.faq-section *::after {
  box-sizing: border-box;
}

/* ============================================================
   WIDTH & HEIGHT VARIATIONS (Full-Screen Edge-to-Edge Breakout)
   ============================================================ */

/* Full Screen Edge-to-Edge 100vw Breakout (Default, Full & Viewport) */
.uwe-widget--faq-accordion,
.faq-section,
.faq-section.faq-width-full,
.faq-section.faq-width-viewport {
  width: 100vw !important;
  position: relative !important;
  left: 50% !important;
  right: 50% !important;
  margin-left: -50vw !important;
  margin-right: -50vw !important;
  max-width: 100vw !important;
  box-sizing: border-box !important;
  overflow-x: clip;
}

/* Explicit Boxed Container Mode (when chosen in Elementor) */
.faq-section.faq-width-boxed,
.faq-section.faq-width-container {
  width: 100% !important;
  max-width: 100% !important;
  margin-left: auto !important;
  margin-right: auto !important;
  left: auto !important;
  right: auto !important;
}

/* Height Variations */
.faq-section.faq-height-viewport {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.faq-section.faq-height-custom,
.faq-section.faq-height-min {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* ============================================================
   WRAPPER & HEADER
   ============================================================ */

.faq-wrap {
  max-width: var(--faq-container-max-width, 820px);
  margin: 0 auto;
  padding: 0 clamp(16px, 3vw, 32px);
  width: 100%;
  box-sizing: border-box;
}

.faq-head {
  text-align: center;
  max-width: 560px;
  margin: 0 auto 46px;
}

.faq-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--faq-font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--faq-blue);
}

.faq-eyebrow::before,
.faq-eyebrow::after {
  content: "";
  width: 16px;
  height: 1px;
  background: currentColor;
  opacity: 0.5;
}

.faq-title {
  font-family: var(--faq-font-display);
  font-weight: 500;
  font-size: clamp(28px, 3.8vw, 40px);
  margin-top: 14px;
  margin-bottom: 0;
  letter-spacing: -0.01em;
  color: var(--faq-ink);
}

.faq-title em,
.faq-title span {
  font-style: italic;
  color: var(--faq-orange-deep);
  font-weight: 500;
}

.faq-sub {
  margin-top: 12px;
  margin-bottom: 0;
  font-size: 15px;
  line-height: 1.6;
  color: var(--faq-ink-soft);
}

/* ============================================================
   ACCORDION LIST & ITEMS
   ============================================================ */

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  background: var(--faq-paper);
  border: 1.5px solid var(--faq-line);
  border-radius: 14px;
  overflow: hidden;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.faq-item.is-open {
  border-color: var(--faq-blue);
  box-shadow: 0 14px 32px -18px rgba(0, 100, 193, 0.35);
}

.faq-q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  appearance: none;
  -webkit-appearance: none;
  border: none;
  background: none;
  text-align: left;
  padding: 18px 20px;
  cursor: pointer;
  font-family: var(--faq-font-body);
}

.faq-q:focus-visible {
  outline: 2px solid var(--faq-blue);
  outline-offset: -2px;
}

.faq-q-text {
  font-weight: 700;
  font-size: 15px;
  color: var(--faq-ink);
  line-height: 1.45;
  transition: color 0.2s ease;
}

.faq-item.is-open .faq-q-text {
  color: var(--faq-blue-deep);
}

.faq-q-icon {
  position: relative;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1.5px solid var(--faq-line);
  flex-shrink: 0;
  transition: background 0.25s ease, border-color 0.25s ease, transform 0.35s ease;
}

.faq-q-icon::before,
.faq-q-icon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  background: var(--faq-ink-soft);
  transition: background 0.25s ease, transform 0.35s ease;
}

.faq-q-icon::before {
  width: 10px;
  height: 1.6px;
  transform: translate(-50%, -50%);
}

.faq-q-icon::after {
  width: 1.6px;
  height: 10px;
  transform: translate(-50%, -50%);
}

.faq-item.is-open .faq-q-icon {
  background: var(--faq-orange);
  border-color: var(--faq-orange);
}

.faq-item.is-open .faq-q-icon::before,
.faq-item.is-open .faq-q-icon::after {
  background: #fff;
}

.faq-item.is-open .faq-q-icon::after {
  transform: translate(-50%, -50%) rotate(90deg) scaleY(0);
}

/* ============================================================
   ANSWER PANEL (grid-rows trick = smooth height: auto)
   ============================================================ */

.faq-a {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.38s cubic-bezier(0.22, 0.68, 0.16, 1);
}

.faq-item.is-open .faq-a {
  grid-template-rows: 1fr;
}

.faq-a-inner {
  overflow: hidden;
}

.faq-a-inner p {
  margin: 0;
  padding: 0 20px 20px;
  font-size: 14px;
  line-height: 1.65;
  color: var(--faq-ink-soft);
  max-width: 60ch;
}

/* ============================================================
   FOOTER & DIRECT CONTACT CTA
   ============================================================ */

.faq-footer {
  margin-top: 40px;
  text-align: center;
}

.faq-footer p {
  margin: 0 0 14px;
  font-size: 14px;
  color: var(--faq-ink-soft);
}

.faq-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--faq-blue);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  padding: 13px 24px;
  border-radius: 999px;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
  box-shadow: 0 16px 32px -16px rgba(0, 100, 193, 0.5);
}

.faq-cta:hover {
  background: var(--faq-blue-deep);
  transform: translateY(-2px);
  color: #fff;
}

.faq-cta svg {
  transition: transform 0.25s ease;
  flex-shrink: 0;
}

.faq-cta:hover svg {
  transform: translateX(3px);
}

/* ============================================================
   RESPONSIVE & ACCESSIBILITY
   ============================================================ */

@media (max-width: 560px) {
  .faq-section {
    padding: clamp(40px, 6vw, 64px) 0;
  }

  .faq-q {
    padding: 16px;
  }

  .faq-q-text {
    font-size: 14px;
  }

  .faq-a-inner p {
    padding: 0 16px 16px;
    font-size: 13.5px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .faq-a {
    transition: none !important;
  }

  .faq-item,
  .faq-q-icon,
  .faq-q-icon::before,
  .faq-q-icon::after,
  .faq-cta,
  .faq-cta svg {
    transition: none !important;
    animation: none !important;
  }
}
