/* ============================================================
   ebfq4 — FAQ Section
   Namespace  : ebfq4
============================================================ */

@import url("https://fonts.googleapis.com/css2?family=El+Messiri:wght@400;500;600;700&display=swap");

/* 1. Variables & Colors */
/* 1. Variables & Colors */
.ebfq4 {
  /* Main Theme */
  --ebfq4-primary: var(--primaryColor);
  --ebfq4-secondary: var(--middleColor);

  /* Background */
  --ebfq4-bg: #ffffff;
  --ebfq4-surface: #ffffff;
  --ebfq4-surface-hover: #fafafa;

  /* Typography */
  --ebfq4-title: var(--ebfq4-primary);
  --ebfq4-text: #555;
  --ebfq4-question-text: var(--ebfq4-primary);
  --ebfq4-question-hover: var(--ebfq4-primary);
  --ebfq4-answer-text: #666;

  /* Label */
  --ebfq4-label-color: var(--ebfq4-primary);
  --ebfq4-label-text: var(--ebfq4-primary);

  /* Card */
  --ebfq4-item-bg: var(--ebfq4-surface);
  --ebfq4-item-radius: 1rem;
  --ebfq4-item-border: #ececec;
  --ebfq4-item-shadow: 0 0.2rem 0.8rem rgba(57, 62, 70, 0.08);
  --ebfq4-item-shadow-hover: 0 0.6rem 1.5rem rgba(57, 62, 70, 0.15);

  /* Icons */
  --ebfq4-icon-color: var(--ebfq4-primary);

  /* Active */
  --ebfq4-active-bg-start: var(--primaryColor);
  --ebfq4-active-bg-end: var(--primaryColor);
  --ebfq4-active-text: #ffffff;

  /* Divider */
  --ebfq4-divider: rgba(255, 255, 255, 0.25);

  /* Section */
  --ebfq4-padding-top: 2rem;
  --ebfq4-padding-bottom: 2rem;
}

/* 2. Reset */
*,
.ebfq4 *,
.ebfq4 *::before,
.ebfq4 *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* 3. Base Styles — Mobile */
.ebfq4 {
  font-family: "El Messiri", sans-serif;
  background-color: var(--ebfq4-bg);
  padding-top: var(--ebfq4-padding-top);
  padding-bottom: var(--ebfq4-padding-bottom);
  direction: rtl;
}

.ebfq4__container {
  width: 92%;
  max-width: 55rem;
  margin: 0 auto;
}

/* Header */
.ebfq4__header {
  text-align: center;
  margin-bottom: 2rem;
}

.ebfq4__label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
}

.ebfq4__label-icon {
  color: var(--ebfq4-label-color);
  font-size: clamp(0.85rem, 3vw, 1rem);
}

.ebfq4__label-text {
  font-size: clamp(0.7rem, 2.5vw, 0.85rem);
  font-weight: 600;
  letter-spacing: 0.15em;
  color: var(--ebfq4-label-text);
  text-transform: uppercase;
}

.ebfq4__title {
  font-size: clamp(1.5rem, 5vw, 2.4rem);
  font-weight: 700;
  color: var(--ebfq4-title);
  line-height: 1.2;
}

/* FAQ List */
.ebfq4__list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* FAQ card */
.ebfq4__item {
  border: 1px solid var(--ebfq4-item-border);
  box-shadow: var(--ebfq4-item-shadow);
}

.ebfq4__item:hover {
  box-shadow: var(--ebfq4-item-shadow-hover);
}

/* Active card */
.ebfq4__item--active {
  background: linear-gradient(
    to left,
    var(--ebfq4-active-bg-end) 0%,
    var(--ebfq4-active-bg-start) 100%
  );
  box-shadow: var(--ebfq4-item-shadow-hover);
}

/* Active colors */
.ebfq4__item--active .ebfq4__question-text,
.ebfq4__item--active .ebfq4__icon,
.ebfq4__item--active .ebfq4__answer-text {
  color: var(--ebfq4-active-text);
}

/* Divider */
.ebfq4__divider {
  background: var(--ebfq4-divider);
}
/* Question Button */
.ebfq4__question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-direction: row-reverse;
  gap: 0.5rem;
  padding: 1rem 0.2rem;
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: right;
  font-family: "El Messiri", sans-serif;
}

.ebfq4__question-text {
  font-size: clamp(0.85rem, 3vw, 1rem);
  font-weight: 600;
  color: var(--ebfq4-question-text);
  line-height: 1.5;
  flex: 1;
  transition: color 0.3s ease;
}

/* .ebfq4__item--active .ebfq4__question-text {
  color: #ffffff;
} */

.ebfq4__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 1.75rem;
  height: 1.75rem;
  color: var(--ebfq4-icon-color);
  font-size: clamp(0.75rem, 2.5vw, 0.9rem);
  transition:
    transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
    color 0.3s ease;
  transform: rotate(0deg);
}

.ebfq4__item--active .ebfq4__icon {
  /* color: #ffffff; */
  transform: rotate(180deg);
}

.ebfq4__divider {
  height: 0.0625rem;
  background: rgba(255, 255, 255, 0.3);
  margin: 0;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.ebfq4__item--active .ebfq4__divider {
  opacity: 1;
}

/* Answer — smooth accordion */
.ebfq4__answer {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.ebfq4__answer--open {
  grid-template-rows: 1fr;
}

.ebfq4__answer-inner {
  overflow: hidden;
}

.ebfq4__answer-text {
  padding: 0.8rem;
  font-size: clamp(0.8rem, 2.8vw, 0.95rem);
  font-weight: 400;
  color: var(--ebfq4-answer-text);
  line-height: 1.7;
}

/* 4. Breakpoints */
@media (min-width: 481px) {
  .ebfq4__question {
    padding: 1.3rem 1.75rem;
  }
  .ebfq4__answer-text {
    padding: 0.5rem 1.75rem 1.5rem;
  }
}

@media (min-width: 601px) {
  .ebfq4 {
    --ebfq4-padding-top: 5rem;
    --ebfq4-padding-bottom: 5rem;
  }
  .ebfq4__header {
    margin-bottom: 2.5rem;
  }
}

@media (min-width: 769px) {
  .ebfq4__question {
    padding: 1.4rem 2rem;
  }
  .ebfq4__answer-text {
    padding: 1rem 2rem 1.6rem;
  }
  .ebfq4__list {
    gap: 1.1rem;
  }
}

@media (min-width: 1025px) {
  .ebfq4 {
    --ebfq4-padding-top: 6rem;
    --ebfq4-padding-bottom: 6rem;
  }
  .ebfq4__header {
    margin-bottom: 1.5rem;
  }
}

@media (min-width: 1281px) {
  .ebfq4__container {
    max-width: 58rem;
  }
}

@media (min-width: 1441px) {
  .ebfq4 {
    --ebfq4-padding-top: 7rem;
    --ebfq4-padding-bottom: 7rem;
  }
}

@media (min-width: 1921px) {
  .ebfq4__container {
    max-width: 65rem;
  }
}
