<!-- FAQ Tab -->
<div class="tab-pane fade" id="faq" role="tabpanel">
  <div class="row g-4">
    <!-- Basic Info -->
    <div class="col-md-12">
      <div class="card border shadow-sm">
        <div class="card-header bg-white">
          <h6 class="mb-0">
            <i class="fas fa-info-circle me-2"></i>Basic Information
          </h6>
        </div>
        <div class="card-body">
          <div class="row g-3">
            <div class="col-md-6">
              <label class="form-label fw-medium">Heading</label>
              <input
                type="text"
                class="form-control"
                id="faqHeading"
                value="<%= data.faq?.heading || '' %>"
                placeholder="e.g., Got Questions? We've Got Answers"
              />
            </div>
            <div class="col-md-6">
              <label class="form-label fw-medium">Subheading</label>
              <input
                type="text"
                class="form-control"
                id="faqSubheading"
                value="<%= data.faq?.subheading || '' %>"
                placeholder="e.g., Visa FAQs"
              />
            </div>
            <div class="col-md-12">
              <label class="form-label fw-medium">Description</label>
              <textarea
                class="form-control"
                id="faqDescription"
                rows="3"
                placeholder="Enter description"
              ><%= data.faq?.description || '' %></textarea>
            </div>
          </div>
        </div>
      </div>
    </div>

    <!-- FAQ Items -->
    <div class="col-md-12">
      <div class="card border shadow-sm">
        <div class="card-header bg-white">
          <h6 class="mb-0">
            <i class="fas fa-question-circle me-2"></i>FAQ Items
          </h6>
        </div>
        <div class="card-body">
          <% (data.faq?.items || []).forEach(function(item, index) { %>
          <div class="card mb-3 bg-light border">
            <div class="card-body">
              <h6 class="card-title fw-bold mb-3">FAQ <%= index + 1 %></h6>
              <div class="row g-3">
                <div class="col-md-12">
                  <label class="form-label fw-medium">Question</label>
                  <input
                    type="text"
                    class="form-control"
                    id="faqQuestion_<%= index %>"
                    value="<%= item.question || '' %>"
                    placeholder="Enter question"
                  />
                </div>
                <div class="col-md-12">
                  <label class="form-label fw-medium">Answer</label>
                  <textarea
                    class="form-control"
                    id="faqAnswer_<%= index %>"
                    rows="3"
                    placeholder="Enter answer"
                  ><%= item.answer || '' %></textarea>
                </div>
              </div>
            </div>
          </div>
          <% }); %>
        </div>
      </div>
    </div>

    <!-- CTA Button -->
    <div class="col-md-12">
      <div class="card border shadow-sm">
        <div class="card-header bg-white">
          <h6 class="mb-0">
            <i class="fas fa-mouse-pointer me-2"></i>CTA Button
          </h6>
        </div>
        <div class="card-body">
          <div class="row g-3">
            <div class="col-md-6">
              <label class="form-label fw-medium">Label</label>
              <input
                type="text"
                class="form-control"
                id="faqCtaLabel"
                value="<%= data.faq?.ctaButton?.label || '' %>"
                placeholder="e.g., contact us"
              />
            </div>
            <div class="col-md-6">
              <label class="form-label fw-medium">Link</label>
              <input
                type="text"
                class="form-control"
                id="faqCtaHref"
                value="<%= data.faq?.ctaButton?.href || '' %>"
                placeholder="/contact"
              />
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</div>
