/**
 * Homepage FAQ – clean, accessible, conflict-free accordion
 * Uses unique namespace `iptv-faq` to avoid main.css `.tp-custom-accordion` overrides.
 */

.iptv-faq {
  /* padding via .section on homepage */
  background: #fff;
}

.iptv-faq__list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.iptv-faq__item {
  border: 1px solid #e6eaf2;
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.iptv-faq__item:hover {
  border-color: rgba(11, 43, 111, 0.18);
  box-shadow: 0 6px 18px rgba(11, 43, 111, 0.05);
}

.iptv-faq__item.is-open {
  border-color: rgba(11, 43, 111, 0.25);
  box-shadow: 0 10px 28px rgba(11, 43, 111, 0.09);
}

.iptv-faq__heading {
  margin: 0;
  font-size: inherit;
  line-height: inherit;
  font-weight: inherit;
}

.iptv-faq__btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  padding: 18px 22px;
  border: 0;
  background: transparent;
  text-align: left;
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  color: #1a1a2e;
  cursor: pointer;
  min-height: 60px;
  transition: color 0.2s ease, background 0.2s ease;
}

.iptv-faq__btn:hover {
  color: #0b2b6f;
}

.iptv-faq__btn:focus-visible {
  outline: 2px solid #ffb302;
  outline-offset: -2px;
}

.iptv-faq__q {
  flex: 1;
  line-height: 1.4;
}

.iptv-faq__icon {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(11, 43, 111, 0.06);
  color: #0b2b6f;
  transition: background 0.25s ease, color 0.25s ease, transform 0.32s ease;
}

.iptv-faq__icon svg {
  width: 16px;
  height: 16px;
  display: block;
  overflow: visible;
}

.iptv-faq__icon-v {
  transform-origin: 8px 8px;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

/* Open state */
.iptv-faq__item.is-open .iptv-faq__btn {
  background: linear-gradient(135deg, #0b2b6f 0%, #071a42 100%);
  color: #fff;
}

.iptv-faq__item.is-open .iptv-faq__icon {
  background: #ffb302;
  color: #071a42;
  transform: rotate(180deg);
}

.iptv-faq__item.is-open .iptv-faq__icon-v {
  opacity: 0;
  transform: rotate(90deg);
}

.iptv-faq__panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.32s ease;
}

.iptv-faq__item.is-open .iptv-faq__panel {
  grid-template-rows: 1fr;
}

.iptv-faq__panel[aria-hidden="true"] {
  grid-template-rows: 0fr;
}

.iptv-faq__answer {
  overflow: hidden;
  min-height: 0;
  padding: 4px 22px 20px;
  border-top: 1px solid #eef1f7;
  background: #fafbfd;
}

.iptv-faq__answer p {
  margin: 14px 0 0;
  font-size: 14.5px;
  line-height: 1.75;
  color: #4b5163;
}

.iptv-faq__answer p:first-child {
  margin-top: 14px;
}

.iptv-faq__answer a {
  color: #0b2b6f;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.iptv-faq__answer a:hover {
  color: #ffb302;
}

.iptv-faq__link {
  margin-top: 28px;
  font-size: 14px;
  color: #5c6370;
}

.iptv-faq__link a {
  color: #0b2b6f;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.iptv-faq__link a:hover {
  color: #ffb302;
}

@media (max-width: 767.98px) {
  .iptv-faq__btn {
    padding: 16px 18px;
    font-size: 15px;
    min-height: 56px;
    gap: 10px;
  }

  .iptv-faq__icon {
    width: 28px;
    height: 28px;
  }

  .iptv-faq__icon svg {
    width: 14px;
    height: 14px;
  }

  .iptv-faq__answer {
    padding: 4px 18px 18px;
  }

  .iptv-faq__answer p {
    font-size: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .iptv-faq__icon,
  .iptv-faq__icon-v,
  .iptv-faq__item,
  .iptv-faq__btn,
  .iptv-faq__panel {
    transition: none;
  }

  .iptv-faq__item.is-open .iptv-faq__icon {
    transform: none;
  }
}
