/* =========================================================
   FAQ PAGE — EDS Casting & Forging
   File: /assets/css/pages-css/faq.css

   Works together with main-pages.css through $useMainPagesCss = true

   Goals:
   - align with the new process-page visual standard
   - improve SEO readability with clear FAQ categories
   - use accessible <details>/<summary> accordions
   - maintain strong B2B conversion flow
   ========================================================= */

.faq-page {
  --faq-green: #37b437;
  --faq-green-strong: #00bf63;
  --faq-dark: #333333;
  --faq-text: #333333;
  --faq-muted: #5d665f;
  --faq-border: rgba(51, 51, 51, 0.12);
  --faq-soft: #f7faf7;
  --faq-soft-green: #f0fff0;
}

.faq-page .process-hero {
  margin-top: -3px;
}

.faq-page .process-hero .process-eyebrow {
  display: none;
}

.faq-page .process-section h2,
.faq-page .process-section__header h2,
.faq-page .process-intro__text h2 {
  text-align: left;
}

.faq-page .process-intro__cards article span {
  display: none;
}

/* =========================================================
   FAQ SECTION
   ========================================================= */

.faq-section {
  border-top: 5px solid var(--faq-green);
}

.faq-section .process-section__header {
  margin-bottom: 24px;
}

.faq-list {
  display: grid;
  gap: 14px;
}

.faq-item {
  border-radius: 18px;
  background: #ffffff;
  border: 1px solid var(--faq-border);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.035);
  overflow: hidden;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.faq-item:hover {
  border-color: rgba(55, 180, 55, 0.32);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.06);
}

.faq-item[open] {
  border-color: rgba(55, 180, 55, 0.36);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.065);
}

.faq-item summary {
  position: relative;
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 68px;
  padding: 20px 64px 20px 24px;
  color: var(--faq-dark);
  font-size: 1rem;
  font-weight: 850;
  line-height: 1.45;
  cursor: pointer;
  list-style: none;
  transition: background-color 0.25s ease, color 0.25s ease;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: '+';
  position: absolute;
  top: 50%;
  right: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: var(--faq-soft-green);
  border: 1px solid rgba(55, 180, 55, 0.22);
  color: var(--faq-green);
  font-size: 1.2rem;
  font-weight: 900;
  line-height: 1;
  transform: translateY(-50%);
  transition: transform 0.25s ease, background-color 0.25s ease, color 0.25s ease;
}

.faq-item[open] summary {
  background: var(--faq-dark);
  color: #ffffff;
}

.faq-item[open] summary::after {
  content: '–';
  background: #ffffff;
  color: var(--faq-green);
  transform: translateY(-50%) rotate(180deg);
}

.faq-answer {
  padding: 0 24px 24px;
  background: #ffffff;
}

.faq-answer p {
  margin: 0;
  padding-top: 20px;
  border-top: 1px solid rgba(51, 51, 51, 0.08);
  color: var(--faq-text);
  font-size: 0.98rem;
  line-height: 1.78;
  text-align: justify;
}

/* =========================================================
   INTRO CARDS ADJUSTMENT
   ========================================================= */

.faq-page .process-intro__cards article {
  min-height: 190px;
}

.faq-page .process-intro__cards h3 {
  min-height: 2.5em;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* =========================================================
   RELATED / CTA
   ========================================================= */

.faq-page .process-related-card h3 {
  text-align: center;
}

.faq-page .process-final-cta h2 {
  text-align: left;
}

/* =========================================================
   LEGACY CLASS SAFETY
   If older FAQ markup remains during transition, these rules keep it usable.
   ========================================================= */

.mainpage .mainpage-section {
  width: min(1200px, calc(100% - 40px));
  margin: 28px auto;
  padding: 34px 38px;
  border-radius: 22px;
  background: #ffffff;
  border: 1px solid var(--faq-border);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.055);
}

.mainpage .mainpage-section h2 {
  margin: 0 0 16px;
  color: var(--faq-dark);
  font-size: clamp(1.25rem, 2vw, 1.65rem);
  line-height: 1.25;
  text-align: left;
}

.mainpage .mainpage-section p {
  margin: 0;
  color: var(--faq-text);
  font-size: 1rem;
  line-height: 1.78;
  text-align: justify;
}

.mainpage .mainpage-section a {
  color: var(--faq-green);
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 768px) {
  .faq-item summary {
    min-height: 62px;
    padding: 18px 56px 18px 18px;
    font-size: 0.96rem;
  }

  .faq-item summary::after {
    right: 18px;
    width: 28px;
    height: 28px;
  }

  .faq-answer {
    padding: 0 18px 20px;
  }

  .faq-answer p {
    font-size: 0.95rem;
    text-align: left;
  }

  .faq-page .process-intro__cards article,
  .faq-page .process-intro__cards h3 {
    min-height: auto;
  }

  .mainpage .mainpage-section {
    width: min(100% - 24px, 1200px);
    padding: 26px 20px;
    border-radius: 18px;
  }
}

@media (max-width: 480px) {
  .faq-item summary {
    padding: 17px 52px 17px 16px;
  }

  .faq-answer {
    padding: 0 16px 18px;
  }

  .faq-answer p,
  .mainpage .mainpage-section p {
    font-size: 0.94rem;
  }
}
