.page-faq {
  --faq-card-bg: rgba(27, 58, 107, 0.55);
  --faq-glow: rgba(255, 107, 53, 0.18);
  background: var(--bg-primary);
  color: var(--text-primary);
}

.page-faq__hero {
  position: relative;
  padding: 132px 0 56px;
  overflow: hidden;
}

.page-faq__hero::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 68%;
  height: 340px;
  background: linear-gradient(135deg, transparent 0%, var(--accent-soft) 55%, rgba(255, 107, 53, 0.28) 100%);
  clip-path: polygon(35% 0, 100% 0, 100% 100%, 0 100%);
  z-index: 0;
  pointer-events: none;
}

.page-faq__hero .container {
  position: relative;
  z-index: 1;
}

.faq-hero__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 36px;
}

.page-faq__title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 6vw, 4rem);
  line-height: 1.05;
  margin: 20px 0 18px;
  border-left: 6px solid var(--accent);
  padding-left: 22px;
  letter-spacing: 0.01em;
}

.page-faq__lead {
  color: var(--text-secondary);
  font-size: 1.08rem;
  line-height: 1.8;
  max-width: 46em;
  margin: 0 0 28px;
}

.faq-search {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 6px 6px 18px;
  max-width: 560px;
  box-shadow: var(--shadow-md);
}

.faq-search:focus-within {
  box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.25);
}

.faq-search__icon {
  flex: none;
  width: 20px;
  height: 20px;
  color: var(--text-secondary);
  display: inline-flex;
}

.faq-search input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: 0;
  outline: none;
  color: var(--text-primary);
  font: inherit;
}

.faq-search input::placeholder {
  color: var(--text-secondary);
}

.faq-search__btn {
  flex: none;
  background: var(--accent);
  border: 0;
  color: #fff;
  font-weight: 700;
  font: inherit;
  padding: 12px 22px;
  border-radius: 999px;
  cursor: pointer;
  transition: background var(--ease);
}

.faq-search__btn:hover {
  background: var(--accent-hover);
}

.faq-search__hint {
  margin-top: 12px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.faq-search__hint kbd {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 6px;
  font-family: var(--font-body);
}

.faq-hero__panel {
  position: relative;
  background: linear-gradient(145deg, var(--bg-surface), var(--bg-secondary));
  border: 2px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  padding: 28px;
  box-shadow: var(--shadow-lg);
  transform: rotate(0.6deg);
  overflow: hidden;
}

.faq-hero__panel::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 18px;
  background: radial-gradient(circle at 85% 15%, rgba(255, 107, 53, 0.2), transparent 55%);
  pointer-events: none;
}

.faq-panel__tag {
  display: inline-block;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 6px 12px;
  border-radius: 999px;
  text-transform: uppercase;
}

.faq-panel__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 14px;
  margin-top: 24px;
}

.faq-panel__item {
  border-top: 1px solid var(--border);
  padding-top: 14px;
}

.faq-panel__value {
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--accent);
  line-height: 1;
}

.faq-panel__unit {
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-left: 2px;
}

.faq-panel__label {
  display: block;
  margin-top: 8px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.page-faq__cats {
  padding: 24px 0 8px;
}

.faq-cats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.faq-cat {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 16px 16px;
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  transition: transform var(--ease), border-color var(--ease), box-shadow var(--ease);
}

.faq-cat:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
}

.faq-cat__index {
  position: absolute;
  right: 10px;
  top: 4px;
  font-family: var(--font-display);
  font-size: 2rem;
  color: rgba(255, 255, 255, 0.07);
  line-height: 1;
}

.faq-cat svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: var(--accent);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.faq-cat__name {
  font-weight: 700;
  font-size: 0.95rem;
}

.faq-cat__count {
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.faq-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  padding: 48px 0 72px;
}

.faq-aside__title {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}

.faq-aside ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.faq-aside li {
  margin: 0;
}

.faq-aside a {
  display: block;
  padding: 8px 14px;
  border-radius: 8px;
  background: var(--bg-secondary);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color var(--ease), background var(--ease);
}

.faq-aside a:hover {
  color: var(--accent);
  background: var(--accent-soft);
}

.faq-sections {
  min-width: 0;
}

.faq-section {
  margin-bottom: 72px;
  scroll-margin-top: 100px;
}

.faq-section__title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  letter-spacing: 0.02em;
  margin: 0 0 18px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.faq-section__index {
  color: var(--accent);
  font-size: 0.9rem;
  background: var(--accent-soft);
  border-radius: 6px;
  padding: 4px 10px;
}

.faq-item {
  background: var(--faq-card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 14px;
  overflow: hidden;
  transition: border-color var(--ease);
}

.faq-item[open] {
  border-color: rgba(255, 107, 53, 0.45);
}

.faq-item__summary {
  display: flex;
  align-items: center;
  gap: 14px;
  list-style: none;
  cursor: pointer;
  padding: 18px 20px;
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.5;
}

.faq-item__summary::-webkit-details-marker {
  display: none;
}

.faq-item__summary::after {
  content: "+";
  margin-left: auto;
  color: var(--accent);
  font-size: 1.6rem;
  font-weight: 400;
  line-height: 1;
  transition: transform var(--ease);
}

.faq-item[open] .faq-item__summary::after {
  content: "\2212";
}

.faq-item__q {
  flex: none;
  font-family: var(--font-display);
  font-size: 0.72rem;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 3px 8px;
  border-radius: 4px;
}

.faq-item__content {
  padding: 0 20px 20px;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.85;
}

.faq-item__content p {
  margin: 0 0 12px;
}

.faq-item__content p:last-child {
  margin-bottom: 0;
}

.faq-item__content a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.faq-media {
  margin-top: 28px;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  background: var(--bg-deep);
}

.faq-media img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
}

.faq-media__caption {
  display: block;
  padding: 12px 16px;
  font-size: 0.82rem;
  color: var(--text-secondary);
  background: rgba(6, 15, 40, 0.65);
}

.page-faq__support {
  padding: 0 0 88px;
}

.faq-support__card {
  display: grid;
  grid-template-columns: 1fr;
  background: linear-gradient(150deg, var(--bg-surface), var(--bg-secondary));
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.faq-support__media {
  position: relative;
  min-height: 240px;
}

.faq-support__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.faq-support__info {
  padding: 40px 28px;
}

.faq-support__tag {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 5px 14px;
  border-radius: 999px;
  margin-bottom: 18px;
}

.faq-support__info h2 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  margin: 0 0 14px;
}

.faq-support__info p {
  color: var(--text-secondary);
  line-height: 1.8;
  margin: 0 0 26px;
}

.faq-support__contact {
  list-style: none;
  margin: 0 0 30px;
  padding: 0;
}

.faq-support__contact li {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--border);
  font-size: 0.95rem;
}

.faq-support__contact li span {
  color: var(--text-secondary);
}

.faq-support__contact a {
  color: var(--text-primary);
  text-decoration: none;
  transition: color var(--ease);
}

.faq-support__contact a:hover {
  color: var(--accent);
}

.faq-support__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

@media (min-width: 760px) {
  .faq-cats {
    grid-template-columns: repeat(3, 1fr);
  }

  .faq-support__info {
    padding: 48px 44px;
  }
}

@media (min-width: 900px) {
  .faq-hero__grid {
    grid-template-columns: 1.4fr 0.9fr;
    align-items: center;
  }

  .faq-support__card {
    grid-template-columns: 0.9fr 1.1fr;
  }

  .faq-support__media {
    min-height: 420px;
  }
}

@media (min-width: 992px) {
  .faq-layout {
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 56px;
    align-items: start;
  }

  .faq-aside {
    position: sticky;
    top: 96px;
  }

  .faq-aside ul {
    display: block;
  }

  .faq-aside a {
    background: transparent;
    padding: 8px 12px;
    border-left: 2px solid var(--border);
    border-radius: 0;
  }

  .faq-aside a:hover {
    background: var(--accent-soft);
    border-left-color: var(--accent);
  }
}

@media (min-width: 1080px) {
  .faq-cats {
    grid-template-columns: repeat(7, 1fr);
  }
}
