/* ============================================================
   faqs.css
   Styles for resources/views/faqs.blade.php
   ============================================================ */

:root {
  --faq-gap: 16px;
  --card-radius: 10px;
  --card-border: #dde3ee;
  --bg: #f9fbff;
  --accent: #083a9a;
  --muted: #394867;
  --question-color: #1d2a4d;
}

.hm-faq-wrapper {
  padding: 48px 16px;
  background: var(--bg);
  border-top: 1px solid #e4e7ec;
  box-sizing: border-box;
}

.hm-faq-container {
  max-width: 1100px;
  margin: 0 auto;
  box-sizing: border-box;
}

.hm-faq-heading {
  text-align: start;
  margin-bottom: 24px;
  color: var(--accent);
  font-size: 2rem;
  font-weight: 700;
}

/* ========== TWO COLUMN LAYOUT: FAQ LEFT, FORM RIGHT ========== */
.hm-faq-layout {
  display: flex;
  gap: 32px;
  align-items: flex-start;
}

/* left column: faq */
.hm-faq-left {
  flex: 2;
}

/* right column: sticky enquiry */
.hm-enquiry {
  flex: 1.5;
  position: sticky;
  top: 100px;
  align-self: flex-start;
}

.hm-enquiry-box {
  background: #ffffff;
  border-radius: 14px;
  box-shadow: 0 8px 25px rgba(15, 23, 42, 0.12);
  padding: 20px 20px 22px;
  border: 1px solid #e2e8f0;
}

.hm-enquiry-box h3 {
  margin: 0 0 6px;
  font-size: 1.2rem;
  font-weight: 700;
  color: #0f172a;
}

.hm-enquiry-box p {
  margin: 0 0 14px;
  font-size: 0.9rem;
  color: #4b5563;
}

.hm-enquiry-form .field {
  margin-bottom: 12px;
}

.hm-enquiry-form label {
  display: block;
  font-size: 0.85rem;
  margin-bottom: 4px;
  color: #111827;
  font-weight: 500;
}

.hm-enquiry-form input,
.hm-enquiry-form select,
.hm-enquiry-form textarea {
  width: 100%;
  padding: 9px 11px;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  font-size: 0.9rem;
  outline: none;
  box-sizing: border-box;
}

.hm-enquiry-form input:focus,
.hm-enquiry-form select:focus,
.hm-enquiry-form textarea:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.35);
}

.hm-enquiry-form textarea {
  min-height: 70px;
  resize: vertical;
}

.hm-enquiry-form .hm-submit-btn {
  width: 100%;
  border: none;
  border-radius: 999px;
  padding: 10px 18px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  background: #f97316;
  color: #fff;
  margin-top: 4px;
  transition: background 0.2s ease, transform 0.15s ease;
}

.hm-enquiry-form .hm-submit-btn:hover {
  background: #ea580c;
  transform: translateY(-1px);
}

/* helper text */
.hm-enquiry-meta {
  margin-top: 8px;
  font-size: 0.75rem;
  color: #6b7280;
}

/* ========== FAQ LIST LAYOUT ========== */
.hm-faq-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  gap: 16px;
  align-items: stretch;
}

.hm-faq-card {
  box-sizing: border-box;
  max-width: 100%;
}

/* Mobile: single column for FAQ + stack form */
@media (max-width: 900px) {
  .hm-faq-layout {
    flex-direction: column;
  }

  .hm-enquiry {
    position: static;
    width: 100%;
  }

  .hm-faq-card {
    flex: 0 0 100%;
    max-width: 100%;
  }
}

/* ========== Question Row ========== */
.hm-faq-question {
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  font-weight: 600;
  color: var(--question-color);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  user-select: none;
  outline: none;
  background: #f1f4fa;
  border-radius: 50px;
}

@media (max-width: 640px) {
  .hm-faq-question {
    white-space: normal;
  }
}

.hm-faq-question:hover {
  background: #f1f4fa;
}

.hm-faq-question:focus {
  background: #eef3ff;
  box-shadow: inset 0 0 0 3px rgba(8, 58, 154, 0.06);
}

/* chevron icon */
.hm-faq-icon {
  transition: transform 0.28s ease;
  flex: 0 0 auto;
  margin-left: 8px;
  font-size: 0.95rem;
}

/* subtle card hover */
.hm-faq-card:hover {
  transform: translateY(-2px);
}

/* ========== Answer (collapsed/open) ========== */
.hm-faq-answer {
  max-height: 0;
  overflow: hidden;
  padding: 0 20px;
  transition: max-height 0.36s ease, padding 0.28s ease, opacity 0.28s ease;
  opacity: 0;
  box-sizing: border-box;
  border-radius: 10px;
  background-color: #eef3ff;
  margin-top: 5px;
}

.hm-faq-answer p {
  margin: 12px 0 16px;
  color: black;
  font-size: 0.95rem;
  line-height: 1.5;
}

.hm-faq-card.open .hm-faq-answer {
  padding: 12px 20px 18px;
  opacity: 1;
}

.hm-faq-card.open .hm-faq-icon {
  transform: rotate(180deg);
}

/* Accessibility */
.hm-faq-question[role="button"] {
  cursor: pointer;
}

.hm-faq-question:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(8, 58, 154, 0.12);
  border-radius: 6px;
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  .hm-faq-answer,
  .hm-faq-icon,
  .hm-faq-card {
    transition: none;
    transform: none;
  }
}
