/* ==========================================================================
   COMPONENT: FAQs (accordion with a sticky side card)
   Answers start open for search engines and no-JS visitors; js/faqs.js
   collapses all but the first and adds click-to-open.
   ========================================================================== */

.faqs {
  padding-block: var(--section-space);

  .faqs-grid {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    align-items: start;
    gap: clamp(40px, 6vw, 80px);
  }

  .faqs-aside {
    position: sticky;
    top: 150px;

    h2 {
      font-size: clamp(1.9rem, 3.4vw, 2.6rem);
    }

    > p {
      color: var(--text-muted);
    }
  }

  .faqs-card {
    margin-top: 28px;
    padding: 24px;
    color: var(--text-on-dark-muted);
    background: var(--secondary-color);
    border-radius: var(--radius-lg);

    .faqs-card-title {
      margin-bottom: 4px;
      font-family: var(--font-heading);
      font-size: 1.15rem;
      font-weight: 700;
      color: var(--text-on-dark);
    }

    .faqs-phone {
      display: flex;
      align-items: center;
      gap: 10px;
      margin-bottom: 18px;
      font-family: var(--font-heading);
      font-size: 1.5rem;
      font-weight: 700;
      text-decoration: none;
      color: var(--text-on-dark);

      i {
        font-size: 1.1rem;
        color: var(--primary-color);
      }
    }
  }
}

.faq-item {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;

  + .faq-item {
    margin-top: 12px;
  }

  h3 {
    position: relative;
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 0;
    padding: 22px 24px;
    font-size: 1.08rem;
    letter-spacing: -0.01em;
    cursor: pointer;

    &::before {
      content: "\2212";
      display: grid;
      place-items: center;
      flex: 0 0 32px;
      height: 32px;
      font-size: 1.3rem;
      font-weight: 500;
      color: var(--secondary-color);
      background: var(--primary-color);
      border-radius: 50%;
    }
  }

  .faq-answer {
    padding: 0 24px 22px 72px;
    color: var(--text-muted);

    p {
      margin: 0;
    }
  }

  &.is-open {
    border-color: var(--primary-color);
    box-shadow: var(--shadow);
  }

  &.is-closed {
    h3::before {
      content: "+";
      background: var(--primary-soft);
    }

    .faq-answer {
      display: none;
    }
  }
}

@media (max-width: 900px) {
  .faqs {
    .faqs-grid {
      grid-template-columns: 1fr;
    }

    .faqs-aside {
      position: static;
    }
  }
}

@media (max-width: 640px) {
  .faq-item .faq-answer {
    padding-left: 24px;
  }
}
