/* -------------------------------- 
Homepage FAQ Section Styles
Based on Accordion v2 design
-------------------------------- */

/* Section wrapper */
.homepage-faq-section {
  top: 33px;
  padding-top: 19px;
  padding: 62px 15px;
  padding-bottom: 120px;
  max-width: 1920px;
  margin: 0px auto;
  text-align: center;
  position: relative;
  z-index: 0;
}

/* Background image that extends full width */
.homepage-faq-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  bottom: 0;
  width: 100vw;
  transform: translateX(-50%);
  background: url(/he/images/homepage-faq-background.png) center center/cover
    no-repeat;
  z-index: -1;
}

/* Container to match footer alignment */
.homepage-faq-container {
  width: 100%;

  margin-left: auto;
  max-width: 1380px;
}

/* Title Wrapper - aligned with FAQ list */
.faq-title-wrapper {
  max-width: 1225px;
  margin: 0 auto 40px;
  text-align: right;
}

/* FAQ List Wrapper */
.faq-list-wrapper {
  max-width: 1250px;
  margin: 0 auto;
}

.homepage-faq-h2 {
  text-align: right;
  font-size: 32px;
  font-weight: 400;
  margin-bottom: 20px;
  color: #3b3f44;
  line-height: 1.2;
}

.homepage-faq-description {
  font-size: 18px;
  color: #525252;
  margin-bottom: 0;
  line-height: 1.6;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 15px;
  text-align: right;
}

/* Purple CTA Link */
.homepage-faq-cta-link {
  direction: ltr;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #8d56db 0%, #7540bf 100%);
  color: white;
  padding: 5px 25px;
  border-radius: 6px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 300;
  transition: transform 0.3s ease;
  box-shadow:
    inset 0 1px 0 hsla(0, 0%, 100%, 0.15),
    0 1px 3px hsla(250, 84%, 38%, 0.25),
    0 2px 6px hsl(250deg 62.86% 2.64% / 48%),
    0 6px 10px -2px hsl(0deg 0% 0% / 17%);
  white-space: nowrap;
  transform: translateY(0);
}

.homepage-faq-cta-link:hover {
  box-shadow:
    inset 0 1px 0 hsla(0, 0%, 100%, 0.15),
    0 1px 2px hsla(250, 84%, 38%, 0.25),
    0 1px 4px hsla(250, 84%, 38%, 0.1),
    0 3px 6px -2px hsla(250, 84%, 38%, 0.25);

  color: white;
  text-decoration: none;
}

.homepage-faq-cta-link svg {
  width: 10px;
  height: 10px;
  flex-shrink: 0;
}

/* Variables */
:root {
  --homepage-faq-icon-size: 16px;
  --homepage-faq-icon-stroke-width: 2px;
}

/* FAQ List Container */
.homepage-faq {
  list-style: none;
  padding: 0;
  margin: 0;
  width: 100%;
}

/* Accordion item */
.homepage-faq__item {
  background-color: hsl(0, 0%, 100%);
  box-shadow:
    inset 0 1px 0.5px hsla(0, 0%, 100%, 0.075),
    0 0.3px 0.4px rgba(0, 0, 0, 0.025),
    0 0.9px 1.5px rgba(0, 0, 0, 0.05),
    0 3.5px 6px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  transition: 0.3s;
  position: relative;
  overflow: hidden;
}

/* Purple accent bar on the right side */
.homepage-faq__item::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 12px;
  height: 100%;
  background: #d2b2ff;

  transition: all 0.3s ease;
}

.homepage-faq__item:hover {
  box-shadow:
    inset 0 1px 0.5px hsla(0, 0%, 100%, 0.075),
    0 0.9px 1.5px rgba(0, 0, 0, 0.03),
    0 3.1px 5.5px rgba(0, 0, 0, 0.08),
    0 14px 25px rgba(0, 0, 0, 0.12);
}

.homepage-faq__item:hover::before {
  width: 12px;
  opacity: 1;
}

.homepage-faq__item--is-open::before {
  background: #d2b2ff;
  width: 12px;
  opacity: 1;
}

/* Accordion header/button */
.homepage-faq__header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-align: right;
  cursor: pointer;
  background: none;
  border: none;
  font-family: inherit;
  color: hsl(230, 7%, 23%);
  transition: all 0.2s ease;
}

.homepage-faq__header:focus {
  outline: none;
}

.homepage-faq__header:focus-visible {
  outline: 2px solid #6f7079;
  outline-offset: 2px;
  border-radius: 4px;
}

.homepage-faq__header svg {
  color: #6f7079;
  --ap9-size: var(--homepage-faq-icon-size);
  flex-shrink: 0;
}

.homepage-faq__header svg .icon__group {
  stroke-width: var(--homepage-faq-icon-stroke-width);
}

/* Icon animation */
.homepage-faq__icon-arrow .icon__group {
  will-change: transform;
  transform-origin: 50% 50%;
}

.homepage-faq__icon-arrow .icon__group > * {
  transform-origin: 50% 50%;
  stroke-dasharray: 20;
  transform: translateY(4px);
}

.homepage-faq__icon-arrow .icon__group > *:first-child {
  stroke-dashoffset: 10.15;
}

.homepage-faq__icon-arrow .icon__group > *:last-child {
  stroke-dashoffset: 10.15;
}

/* Open state icon */
.homepage-faq__item--is-open
  > .homepage-faq__header
  > .homepage-faq__icon-arrow
  .icon__group {
  transform: rotate(-90deg);
}

.homepage-faq__item--is-open
  > .homepage-faq__header
  > .homepage-faq__icon-arrow
  .icon__group
  > *:first-child,
.homepage-faq__item--is-open
  > .homepage-faq__header
  > .homepage-faq__icon-arrow
  .icon__group
  *:last-child {
  stroke-dashoffset: 0;
  transform: translateY(0px);
}

/* Panel */
.homepage-faq__panel {
  display: none;
  will-change: height;
  transform: translateZ(0px);
  text-align: right;
}

.homepage-faq__item--is-open > .homepage-faq__panel {
  display: block;
}

/* Animation */
.homepage-faq[data-animation="on"]
  .homepage-faq__item--is-open
  .homepage-faq__panel
  > * {
  animation: homepage-faq-entry-animation 0.4s
    cubic-bezier(0.215, 0.61, 0.355, 1);
}

.homepage-faq[data-animation="on"] .homepage-faq__icon-arrow .icon__group {
  transition: transform 0.3s cubic-bezier(0.215, 0.61, 0.355, 1);
}

.homepage-faq[data-animation="on"] .homepage-faq__icon-arrow .icon__group > * {
  transition:
    transform 0.3s,
    stroke-dashoffset 0.3s;
  transition-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);
}

@keyframes homepage-faq-entry-animation {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0px);
  }
}

/* Utility classes (fk1 prefix) */
.fk1-flex {
  display: flex;
}

.fk1-flex-column {
  flex-direction: column;
}

.fk1-gap-3xs {
  gap: 0.25rem;
}

/* .fk1-padding-y-sm {
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
} */

.fk1-padding-x-md {
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

.fk1-padding-top-3xs {
  padding-top: 0.25rem;
}

.fk1-padding-bottom-md {
  padding-bottom: 0.5rem;
}

.fk1-text-md {
  font-size: 18px;
}

.fk1-text-md .question-mark {
  color: #8e56dc;
}

.fk1-text-component {
  line-height: 1.6;
}

.fk1-text-component p {
  margin-bottom: 1rem;
  color: #525252;
  font-size: 16px;
}

.fk1-text-component .faq-inline-link {
  color: #8d56db;
  text-decoration: none;
  /* display: inline-flex; */
  align-items: center;
  gap: 4px;
  transition: color 0.2s ease;
}

.fk1-text-component .faq-inline-link:hover {
  color: #7540bf;
  text-decoration: underline;
}

.fk1-text-component .faq-inline-link svg {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
  transform: scaleX(-1);
}

.fk1-line-height-lg {
  line-height: 1.58;
}

.fk1-icon {
  height: var(--ap9-size, 1em);
  width: var(--ap9-size, 1em);
  display: inline-block;
  color: inherit;
  fill: currentColor;
  line-height: 1;
  flex-shrink: 0;
  max-width: initial;
}

/* Responsive adjustments */
@media (min-width: 576px) {
}

@media (min-width: 768px) {
  .homepage-faq-container {
    max-width: 720px;
  }
}

@media (min-width: 992px) {
  .homepage-faq-container {
    max-width: 960px;
  }
}

@media (min-width: 1200px) {
  .homepage-faq-container {
    max-width: 1780px;
  }
}

@media (min-width: 64rem) {
  .homepage-faq-section {
    padding: 62px 15px;
    padding-bottom: 120px;
  }

  .faq-title-wrapper {
    max-width: 1225px;
    margin-bottom: 40px;
  }

  .faq-list-wrapper {
    max-width: 1250px;
  }

  .homepage-faq-h2 {
    font-size: 36px;
  }

  .homepage-faq-description {
    font-size: 18px;
  }

  .fk1-text-md {
    font-size: 18px;
  }

  .fk1-gap-3xs {
    gap: 0.375rem;
  }

  .fk1-padding-y-sm {
    padding-top: 5px;
    padding-bottom: 5px;
  }

  .fk1-padding-x-md {
    padding-left: 2rem;
    padding-right: 2rem;
  }

  .fk1-padding-top-3xs {
    padding-top: 0.375rem;
  }

  .fk1-padding-bottom-md {
    padding-bottom: 0.5rem;
  }
}

@media (max-width: 768px) {
  .homepage-faq-section {
    padding: 62px 15px;
    padding-bottom: 120px;
  }

  .homepage-faq-container {
    padding-right: 12px;
    padding-left: 12px;
  }

  .faq-title-wrapper {
    padding: 0 10px;
  }

  .faq-list-wrapper {
    padding: 0 10px;
  }

  .homepage-faq-h2 {
    font-size: 32px;
  }

  .homepage-faq-description {
    font-size: 18px;
    margin-bottom: 0;
    flex-direction: column;
    align-items: flex-start;
    text-align: right;
  }

  .homepage-faq-cta-link {
    margin-top: 10px;
  }

  .fk1-text-md {
    font-size: 18px;
  }

  .homepage-faq__item::before {
    width: 12px;
  }

  .homepage-faq__item:hover::before,
  .homepage-faq__item--is-open::before {
    width: 12px;
  }
}

@media (max-width: 480px) {
  .homepage-faq__item {
    padding: 8px;
  }

  .homepage-faq-section {
    padding: 62px 15px;
    padding-bottom: 120px;
  }

  .homepage-faq-container {
    padding-right: 0px;
    padding-left: 0px;
  }

  .faq-title-wrapper {
    padding: 0 5px;
  }

  .faq-list-wrapper {
    padding: 0 5px;
  }

  .homepage-faq-h2 {
    font-size: 28px;
  }

  .homepage-faq-description {
    font-size: 16px;
  }

  .homepage-faq-cta-link {
    font-size: 0.85rem;
    padding: 8px 16px;
  }

  .homepage-faq-cta-link svg {
    width: 10px;
    height: 10px;
  }

  .fk1-text-md {
    font-size: 18px;
  }

  /* .fk1-padding-y-sm {
    padding-top: 0.65rem;
    padding-bottom: 0.65rem;
  } */

  .fk1-padding-x-md {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  .fk1-text-component p {
    font-size: 15px;
  }
}
