/* Shared FAQ section (frontend/partials/faq.blade.php) — used on Home,
   About and Services. Uses the site's CSS variables so it follows
   Admin > Site Settings > Colors. */

.faq-showcase {
  position: relative;
  overflow: clip;
}

.faq-showcase-glow {
  position: absolute;
  z-index: 0;
  bottom: -120px;
  left: -120px;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent-color), transparent 86%);
  filter: blur(100px);
  pointer-events: none;
  animation: faq-glow-drift 16s ease-in-out infinite alternate;
}

.faq-showcase .container {
  position: relative;
  z-index: 1;
}

@keyframes faq-glow-drift {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(90px, -60px) scale(1.15); }
}

/* ---------- Intro column ---------- */
@media (min-width: 992px) {
  .faq-intro {
    position: sticky;
    top: 110px;
  }
}

.faq-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 18px 6px 6px;
  border: 1px dashed color-mix(in srgb, var(--accent-color), transparent 45%);
  border-radius: 30px;
  color: var(--heading-color);
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 18px;
}

.faq-badge-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--heading-color);
  color: #fff;
  font-size: 13px;
}

.faq-title {
  font-size: calc(2.3rem * var(--type-display-scale, 1));
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
}

.faq-title .accent-highlight {
  color: var(--accent-color);
}

.faq-lead {
  color: color-mix(in srgb, var(--default-color), transparent 25%);
  line-height: 1.7;
  margin-bottom: 28px;
}

.faq-help-card {
  position: relative;
  overflow: hidden;
  padding: 28px 26px;
  background: linear-gradient(145deg, var(--heading-color), color-mix(in srgb, var(--heading-color), var(--accent-color) 30%));
  color: #fff;
  /* Same cut-corner shape used across the site. */
  border-radius: 42px 10px 42px 10px;
}

/* Decorative rings in the corner of the help card. */
.faq-help-card::before,
.faq-help-card::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgb(255 255 255 / 0.14);
  pointer-events: none;
}

.faq-help-card::before {
  top: -60px;
  right: -60px;
  width: 180px;
  height: 180px;
}

.faq-help-card::after {
  top: -20px;
  right: -20px;
  width: 100px;
  height: 100px;
  animation: faq-ring-pulse 3.6s ease-in-out infinite;
}

@keyframes faq-ring-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.25); opacity: 0.4; }
}

.faq-help-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  margin-bottom: 16px;
  border-radius: 14px;
  background: var(--accent-color);
  font-size: 22px;
  animation: faq-icon-bob 3s ease-in-out infinite;
}

@keyframes faq-icon-bob {
  0%, 100% { transform: translateY(0) rotate(0); }
  50% { transform: translateY(-5px) rotate(-6deg); }
}

.faq-help-card h3 {
  color: #fff;
  font-size: 1.2rem;
  font-weight: 800;
  margin-bottom: 4px;
}

.faq-help-card p {
  color: rgb(255 255 255 / 0.75);
  font-size: 0.9rem;
  margin-bottom: 18px;
}

.faq-help-actions {
  display: flex;
  gap: 10px;
}

.faq-help-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 22px;
  border-radius: 30px;
  background: #fff;
  color: var(--heading-color);
  font-weight: 700;
  font-size: 0.9rem;
  transition: transform 0.3s ease, background-color 0.3s ease, color 0.3s ease;
}

.faq-help-btn:hover {
  transform: translateY(-2px);
  background: var(--accent-color);
  color: #fff;
}

.faq-help-btn i {
  transition: transform 0.3s ease;
}

.faq-help-btn:hover i {
  transform: translateX(3px);
}

.faq-help-btn-whatsapp {
  width: 44px;
  padding: 0;
  background: #25d366;
  color: #fff;
  font-size: 18px;
}

.faq-help-btn-whatsapp:hover {
  background: #1ebe5b;
}

/* ---------- Accordion ---------- */
.faq-list {
  display: grid;
  gap: 14px;
}

.faq-panel {
  position: relative;
  border-radius: 18px;
  background: var(--surface-color);
  border: 1px solid color-mix(in srgb, var(--default-color), transparent 90%);
  transition: border-color 0.35s ease, box-shadow 0.35s ease, transform 0.35s ease;
}

/* Accent bar on the left edge that grows in when the panel is open. */
.faq-panel::before {
  content: "";
  position: absolute;
  top: 18px;
  bottom: 18px;
  left: -1px;
  width: 4px;
  border-radius: 0 4px 4px 0;
  background: var(--accent-color);
  transform: scaleY(0);
  transition: transform 0.4s ease;
}

.faq-panel:hover {
  border-color: color-mix(in srgb, var(--accent-color), transparent 60%);
  transform: translateX(4px);
}

.faq-panel.is-open {
  border-color: color-mix(in srgb, var(--accent-color), transparent 55%);
  box-shadow: 0 18px 40px color-mix(in srgb, var(--accent-color), transparent 86%);
  transform: none;
}

.faq-panel.is-open::before {
  transform: scaleY(1);
}

.faq-question {
  display: flex;
  align-items: center;
  gap: 18px;
  width: 100%;
  padding: 22px 24px;
  border: 0;
  background: transparent;
  text-align: left;
  color: var(--heading-color);
  cursor: pointer;
}

.faq-question:focus-visible {
  outline: 2px solid var(--accent-color);
  outline-offset: -2px;
  border-radius: 18px;
}

.faq-number {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--accent-color), transparent 88%);
  color: var(--accent-color);
  font-family: var(--heading-font);
  font-weight: 800;
  font-size: 0.9rem;
  transition: background-color 0.35s ease, color 0.35s ease, transform 0.35s ease;
}

.faq-panel.is-open .faq-number {
  background: var(--accent-color);
  color: #fff;
  transform: rotate(-6deg);
}

.faq-question-text {
  flex: 1;
  font-family: var(--heading-font);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.4;
}

/* Plus that turns into a minus. */
.faq-toggle-icon {
  position: relative;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--default-color), transparent 82%);
  transition: background-color 0.35s ease, border-color 0.35s ease, transform 0.4s ease;
}

.faq-toggle-icon::before,
.faq-toggle-icon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 12px;
  height: 2px;
  border-radius: 2px;
  background: var(--heading-color);
  transform: translate(-50%, -50%);
  transition: transform 0.4s ease, background-color 0.35s ease;
}

.faq-toggle-icon::after {
  transform: translate(-50%, -50%) rotate(90deg);
}

.faq-panel.is-open .faq-toggle-icon {
  background: var(--heading-color);
  border-color: var(--heading-color);
  transform: rotate(180deg);
}

.faq-panel.is-open .faq-toggle-icon::before,
.faq-panel.is-open .faq-toggle-icon::after {
  background: #fff;
}

.faq-panel.is-open .faq-toggle-icon::after {
  transform: translate(-50%, -50%) rotate(0deg);
}

/* Height animation without measuring: a 0fr -> 1fr grid row. */
.faq-answer {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.faq-panel.is-open .faq-answer {
  grid-template-rows: 1fr;
}

.faq-answer-inner {
  overflow: hidden;
}

.faq-answer p {
  margin: 0;
  padding: 0 24px 24px 86px;
  color: color-mix(in srgb, var(--default-color), transparent 22%);
  line-height: 1.7;
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.faq-panel.is-open .faq-answer p {
  opacity: 1;
  transform: none;
  transition-delay: 0.1s;
}

/* ---------- Responsive ---------- */
@media (max-width: 991px) {
  .faq-title {
    font-size: 2rem;
  }
}

@media (max-width: 575px) {
  .faq-title {
    font-size: 1.7rem;
  }

  .faq-question {
    gap: 12px;
    padding: 18px 16px;
  }

  .faq-number {
    width: 36px;
    height: 36px;
    border-radius: 11px;
    font-size: 0.8rem;
  }

  .faq-question-text {
    font-size: 0.95rem;
  }

  .faq-toggle-icon {
    width: 30px;
    height: 30px;
  }

  .faq-answer p {
    padding: 0 16px 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .faq-showcase-glow,
  .faq-help-card::after,
  .faq-help-icon {
    animation: none;
  }

  .faq-answer,
  .faq-answer p,
  .faq-panel,
  .faq-toggle-icon,
  .faq-toggle-icon::before,
  .faq-toggle-icon::after {
    transition: none;
  }
}
