/*
 * FAQ page styles for theboondockranch.com/faq/ (BRWEB-33 Cornerstone migration).
 *
 * Everything is scoped under the single .aos-faq namespace so this cannot
 * leak into the rest of the X-theme site. Values below were pulled from
 * computed styles / CSS rules on the LIVE Cornerstone-built page (not
 * eyeballed from a screenshot) -- see faq-migration-report.md for the
 * extraction notes. Intentionally matches the existing X-theme look
 * (accent red #ad1f1f, Open Sans body copy, Helvetica Neue display type --
 * one hex digit off from the mu-plugin's existing #ad1f1e, measured from
 * this page's actual computed style rather than assumed)
 * rather than introducing a new visual language.
 *
 * Delivery: this file must be enqueued by a small mu-plugin (see
 * wordpress/mu-plugins/aos-faq-page-assets.php in this repo) -- the
 * REST-writable service account cannot save <style>/<script>/<link> tags
 * of any kind into post_content (WordPress strips them via wp_kses_post
 * for any account without the unfiltered_html capability; confirmed
 * empirically, see the report). Until that mu-plugin is uploaded, the
 * staging page's body renders as plain unstyled semantic HTML.
 */

.aos-faq {
  --aos-faq-accent: #ad1f1f;
  --aos-faq-heading: #363636;
  --aos-faq-muted: #999999;
  --aos-faq-text: #000000;
  --aos-faq-divider: #e1e1e1;
  --aos-faq-dot-inactive: #515151;
  --aos-faq-ease: cubic-bezier(0.4, 0, 0.2, 1);

  max-width: 1200px;
  width: 88%;
  margin: 0 auto;
  /* Top padding is 82px, not 100px, to land the headline on the same
     baseline as the Cornerstone original. Measured 2026-07-31 against
     live /faq/: with 100px our headline sat at y=292 vs live's y=274.
     Bottom stays 100px -- measurement showed the remaining height
     difference came entirely from the pagination dots, not from here. */
  padding: 82px 0 100px;
  font-family: "Open Sans", sans-serif;
  font-size: 14px;
  color: var(--aos-faq-text);
  box-sizing: border-box;
}

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

.aos-faq__row--top {
  margin: 0 0 25px;
}

.aos-faq__heading {
  max-width: 486px;
  margin: 0;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 54px;
  font-weight: 700;
  line-height: 1.05; /* 56.7px at 54px */
  color: var(--aos-faq-heading);
}

.aos-faq__intro {
  max-width: 1200px;
  margin: 18px 0 36px;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 18px;
  font-weight: 400;
  line-height: 1.5; /* 27px */
  color: var(--aos-faq-muted);
}

/* ---------------------------------------------------------------------
 * Accordion (<details>/<summary> -- native disclosure, works with JS off)
 * ------------------------------------------------------------------- */

.aos-faq__accordion {
  margin: 0;
  padding: 0;
  list-style: none;
}

.aos-faq__item {
  background: #fff;
  border-radius: 0.35em;
  box-shadow: 0 0.15em 0.65em 0 rgba(0, 0, 0, 0.25);
  overflow: hidden;
}

.aos-faq__item + .aos-faq__item {
  margin-top: 25px;
}

/* Remove native disclosure markers -- replaced with our own chevron */
.aos-faq__summary {
  list-style: none;
}
.aos-faq__summary::-webkit-details-marker {
  display: none;
}
.aos-faq__summary::marker {
  content: "";
}

.aos-faq__summary {
  display: flex;
  align-items: center;
  gap: 0.5em;
  margin: 0;
  padding: 15px 20px;
  border: 0;
  background-color: #fff;
  font-family: inherit;
  font-size: 1.2em; /* 16.8px */
  line-height: 1.5;
  color: var(--aos-faq-text);
  cursor: pointer;
  transition: color 0.3s var(--aos-faq-ease);
}

.aos-faq__summary:hover,
.aos-faq__summary:focus-visible,
.aos-faq__item[open] .aos-faq__summary {
  color: rgba(0, 0, 0, 0.5);
}

.aos-faq__summary:focus-visible {
  outline: 2px solid var(--aos-faq-accent);
  outline-offset: -2px;
}

.aos-faq__question {
  flex: 1 0 0%;
  font-weight: 700;
}

/* Caret is drawn with a pure-CSS border triangle, not an svg/icon font.
   WordPress's save sanitizer for this REST account strips svg/path tags
   out of post_content (same class of restriction as style/script -- see
   faq-page.html's top comment), so any glyph markup placed in the HTML
   body is silently deleted on save. Drawing it here in the CSS file
   sidesteps that entirely, since this file is a static asset served by
   the mu-plugin and never passes through post_content sanitization. */
.aos-faq__icon {
  position: relative;
  flex: 0 0 auto;
  width: 0.48em;
  height: 1em;
  color: var(--aos-faq-text);
  transition: transform 0.3s var(--aos-faq-ease);
}

.aos-faq__icon::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 0.5em 0 0.5em 0.48em;
  border-color: transparent transparent transparent currentColor;
  transform: translateY(-50%);
}

.aos-faq__item[open] .aos-faq__icon {
  transform: rotate(90deg);
}

.aos-faq__answer-wrap {
  overflow: hidden;
}

.aos-faq__answer {
  padding: 20px;
  border-top: 2px solid var(--aos-faq-divider);
  font-size: 1.2em; /* 16.8px */
  line-height: 1.6;
  color: var(--aos-faq-text);
}

.aos-faq__answer p {
  margin: 0;
}

.aos-faq__answer p + p {
  margin-top: 1em;
}

/* JS-enhanced smooth expand/collapse (see faq.js). Falls back to native
   instant <details> toggling with zero animation if JS is off. */
.aos-faq.is-enhanced .aos-faq__item .aos-faq__answer-wrap {
  height: 0;
  transition: height 0.3s var(--aos-faq-ease);
}
.aos-faq.is-enhanced .aos-faq__item[open] .aos-faq__answer-wrap {
  height: auto;
}

/* ---------------------------------------------------------------------
 * Slider (fade cross-fade, pagination dots, keyboard nav, no JS library)
 * ------------------------------------------------------------------- */

.aos-faq__row--media {
  margin: 0;
}

.aos-faq__slider {
  position: relative;
  width: 100%;
}

.aos-faq__slides {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3; /* matches the source images' native ratio -- reserves
                           space up front so there is no layout shift */
  border-radius: 0;
  overflow: hidden;
  background: #f2f2f2;
}

.aos-faq__slide {
  margin: 0;
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 500ms var(--aos-faq-ease);
}

/* No-JS / no-CSS-var fallback: only the first slide is marked is-active in
   the markup itself, so it is the only one visible even if this stylesheet
   never loads. */
.aos-faq__slide.is-active {
  opacity: 1;
  z-index: 1;
}

.aos-faq__slide img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.aos-faq__nav {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;
  display: flex;
  flex-flow: row nowrap;
  width: 54px;
  height: 36px;
  background-color: #000;
  border-radius: 14px;
  overflow: hidden;
}

.aos-faq__arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 27px;
  width: 27px;
  height: 36px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--aos-faq-accent);
  cursor: pointer;
}

/* Chevrons are drawn with a pure-CSS bordered corner rotated 45deg, not
   an svg/icon font -- see the .aos-faq__icon comment above for why:
   WordPress's post_content sanitizer strips svg/path tags on save for
   this REST account, so the glyph has to live here in the CSS, not in
   the HTML markup. */
.aos-faq__arrow::before {
  content: "";
  display: block;
  width: 10px;
  height: 10px;
  border-style: solid;
  border-color: currentColor;
  border-width: 0 2px 2px 0;
}

.aos-faq__arrow--prev::before {
  transform: rotate(135deg);
  margin-left: 3px;
}

.aos-faq__arrow--next::before {
  transform: rotate(-45deg);
  margin-right: 3px;
}

.aos-faq__arrow:focus-visible {
  outline: 2px solid var(--aos-faq-accent);
  outline-offset: -2px;
}

.aos-faq__dots {
  display: flex;
  flex-flow: row nowrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

/* The <li> wrappers inherit the page line-height (23.8px), which makes each
   one a 24px-tall box around an 8px dot and pushes the whole page 16px
   taller than the Cornerstone original (measured: our dots row 24px vs
   live 8px). Collapsing the line-height lets each li shrink to its dot. */
.aos-faq__dots li {
  display: flex;
  line-height: 0;
}

.aos-faq__dots button {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 100px;
  background-color: var(--aos-faq-dot-inactive);
  cursor: pointer;
  transition: background-color 0.3s var(--aos-faq-ease);
}

.aos-faq__dots button.is-active {
  background-color: var(--aos-faq-accent);
}

.aos-faq__dots button:focus-visible {
  outline: 2px solid var(--aos-faq-accent);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .aos-faq__slide,
  .aos-faq__icon,
  .aos-faq__summary,
  .aos-faq.is-enhanced .aos-faq__item .aos-faq__answer-wrap,
  .aos-faq__dots button {
    transition-duration: 0.001ms !important;
  }
}
