/* Navigation persistence */
.nav-buttons.auth-loading {
  opacity: 0;
  pointer-events: none;
}

.auth-cached-logged-in .nav-buttons>a[href*="login"] {
  display: none !important;
}

.auth-cached-logged-out .nav-buttons.auth-loading {
  opacity: 1;
  pointer-events: auto;
}

/* Full Page Background */
body {
  background: linear-gradient(180deg,
      var(--bg) 0%,
      var(--bg-warm) 15%,
      var(--bg-warm) 40%,
      var(--bg) 60%,
      var(--bg-warm) 85%,
      var(--bg-alt) 100%);
  background-attachment: fixed;
}

.faq-hero {
  padding: 140px 0 80px;
  text-align: center;
  background: transparent;
  position: relative;
  overflow: hidden;
}

.faq-hero::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -20%;
  width: 80%;
  height: 200%;
  background: radial-gradient(ellipse at center, rgba(217, 119, 6, 0.06) 0%, transparent 60%);
  animation: heroGlow 8s ease-in-out infinite alternate;
  pointer-events: none;
}

.faq-hero::after {
  content: "";
  position: absolute;
  top: 20%;
  right: -10%;
  width: 50%;
  height: 80%;
  background: radial-gradient(ellipse at center, rgba(217, 119, 6, 0.04) 0%, transparent 50%);
  animation: heroGlow 10s ease-in-out infinite alternate-reverse;
  pointer-events: none;
}

@keyframes heroGlow {
  0% {
    opacity: 0.5;
    transform: scale(1);
  }

  100% {
    opacity: 1;
    transform: scale(1.1);
  }
}

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

.faq-hero h1 {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
  line-height: 1.1;
  background: linear-gradient(135deg, var(--text) 0%, var(--text-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.faq-hero p {
  font-size: 1.25rem;
  color: var(--text-secondary);
  max-width: 540px;
  margin: 0 auto;
  line-height: 1.7;
}

.faq-hero .hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px 8px 12px;
  background: linear-gradient(135deg, rgba(255, 251, 235, 0.9), rgba(254, 243, 199, 0.8));
  border: 1px solid rgba(217, 119, 6, 0.2);
  border-radius: 100px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 24px;
  backdrop-filter: blur(8px);
  box-shadow: 0 2px 12px rgba(217, 119, 6, 0.08);
  animation: badgeFadeIn 0.6s ease-out both;
  transition: all 0.3s ease;
}

.faq-hero .hero-badge:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(217, 119, 6, 0.15);
}

@keyframes badgeFadeIn {
  0% {
    opacity: 0;
    transform: translateY(10px) scale(0.95);
  }

  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.faq-hero .badge-dot {
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulseDot 2s ease-in-out infinite;
}

@keyframes pulseDot {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.6;
    transform: scale(1.2);
  }
}

.faq-main {
  padding: 0 0 100px;
  max-width: 800px;
  margin: 0 auto;
  background: transparent;
}

.faq-nav {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 60px;
  padding: 0 24px;
}

.faq-nav-item {
  padding: 10px 20px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 100px;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.faq-nav-item:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-soft);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(217, 119, 6, 0.1);
}

.faq-nav-item.active {
  background: linear-gradient(135deg, var(--accent) 0%, #ea580c 100%);
  color: white;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(217, 119, 6, 0.3);
}

.faq-section {
  margin-bottom: 64px;
  padding: 0 24px;
  scroll-margin-top: 100px;
}

.faq-section:last-of-type {
  margin-bottom: 0;
}

.faq-section-title {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.faq-item {
  border: 1px solid var(--border-light);
  border-radius: 16px;
  margin-bottom: 16px;
  background: var(--surface);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.faq-item:hover {
  border-color: rgba(217, 119, 6, 0.2);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
  transform: translateY(-2px);
}

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

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 20px 24px;
  background: transparent;
  border: none;
  text-align: left;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text);
  transition: color 150ms ease;
}

.faq-question:hover,
.faq-question:hover .faq-question-text {
  color: var(--accent);
}

.faq-question-text {
  flex: 1;
  line-height: 1.5;
}

.faq-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.faq-icon::before,
.faq-icon::after {
  content: "";
  position: absolute;
  background: var(--text-muted);
  border-radius: 2px;
  transition: all 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-icon::before {
  width: 12px;
  height: 2px;
}

.faq-icon::after {
  width: 2px;
  height: 12px;
}

.faq-question:hover .faq-icon::before,
.faq-question:hover .faq-icon::after {
  background: var(--accent);
}

.faq-question[aria-expanded="true"] .faq-icon::after {
  transform: rotate(90deg);
  opacity: 0;
}

.faq-question[aria-expanded="true"] .faq-icon::before {
  background: var(--accent);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition:
    max-height 350ms cubic-bezier(0.4, 0, 0.2, 1),
    opacity 200ms ease;
}

.faq-answer.open {
  max-height: 600px;
  opacity: 1;
}

.faq-answer-content {
  padding: 0 24px 24px 24px;
  border-top: 1px solid var(--border-light);
  margin-top: -4px;
  padding-top: 20px;
}

.faq-answer-content p {
  font-size: 0.9375rem;
  line-height: 1.75;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

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

.faq-answer-content ul,
.faq-answer-content ol {
  margin: 16px 0;
  padding-left: 24px;
}

.faq-answer-content li {
  font-size: 0.9375rem;
  line-height: 1.75;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.faq-answer-content li:last-child {
  margin-bottom: 0;
}

.faq-answer-content strong {
  color: var(--text);
  font-weight: 500;
}

.faq-answer-content a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

.faq-answer-content a:hover {
  text-decoration: underline;
}

.faq-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}

.faq-tag {
  display: inline-block;
  padding: 4px 10px;
  background: var(--bg-alt);
  border-radius: 6px;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  transition: all 0.2s ease;
}

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

.faq-contact {
  text-align: center;
  padding: 56px 48px;
  margin-top: 64px;
  background: var(--surface);
  border: 2px solid transparent;
  background:
    linear-gradient(var(--surface), var(--surface)) padding-box,
    linear-gradient(135deg, var(--accent), #f59e0b, #ea580c, var(--accent)) border-box;
  background-size: 100% 100%, 300% 300%;
  animation: gradientBorder 6s ease infinite;
  border-radius: 24px;
  margin-left: 24px;
  margin-right: 24px;
  box-shadow: 0 8px 32px rgba(217, 119, 6, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.faq-contact:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(217, 119, 6, 0.12);
}

@keyframes gradientBorder {

  0%,
  100% {
    background-position: 0% 50%, 0% 50%;
  }

  50% {
    background-position: 0% 50%, 100% 50%;
  }
}

.faq-contact-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 20px;
  padding: 14px;
  background: linear-gradient(135deg, rgba(217, 119, 6, 0.1) 0%, rgba(234, 88, 12, 0.1) 100%);
  border-radius: 16px;
  color: var(--accent);
}

.faq-contact h2 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text);
  letter-spacing: -0.02em;
}

.faq-contact p {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 28px;
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

.faq-contact-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  background: linear-gradient(135deg, #d97706 0%, #ea580c 100%);
  color: white;
  border-radius: 14px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 10px 25px -5px rgba(234, 88, 12, 0.3);
  position: relative;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}

.faq-contact-link::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg,
      transparent 0%,
      rgba(255, 255, 255, 0.2) 50%,
      transparent 100%);
  animation: btn-shimmer 3s ease-in-out infinite;
  pointer-events: none;
}

.faq-contact-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 35px -5px rgba(234, 88, 12, 0.4);
  background: linear-gradient(135deg, #ea580c 0%, #c2410c 100%);
  color: white;
}

@keyframes btn-shimmer {
  0% {
    left: -100%;
  }

  50%,
  100% {
    left: 100%;
  }
}

.faq-contact-link svg {
  width: 18px;
  height: 18px;
}

@media (max-width: 768px) {
  .faq-hero {
    padding: 120px 20px 60px;
  }

  .faq-hero h1 {
    font-size: 2rem;
  }

  .faq-hero p {
    font-size: 1.0625rem;
  }

  .faq-nav {
    gap: 6px;
    margin-bottom: 40px;
    padding: 0 16px;
  }

  .faq-nav-item {
    padding: 8px 14px;
    font-size: 0.8125rem;
  }

  .faq-section {
    padding: 0 16px;
  }

  .faq-item {
    margin-bottom: 12px;
  }

  .faq-question {
    padding: 16px 16px;
    font-size: 0.9375rem;
    gap: 16px;
  }

  .faq-answer-content {
    padding: 0 16px 20px 16px;
    padding-top: 16px;
  }

  .faq-answer-content p,
  .faq-answer-content li {
    font-size: 0.875rem;
  }

  .faq-contact {
    padding: 40px 24px;
    margin-left: 16px;
    margin-right: 16px;
    border-radius: 20px;
  }

  .faq-contact h2 {
    font-size: 1.5rem;
  }

  .faq-contact p {
    font-size: 0.9375rem;
  }

  .faq-contact-link {
    padding: 12px 24px;
    font-size: 0.9375rem;
  }
}

@media (max-width: 480px) {
  .faq-hero {
    padding: 100px 16px 48px;
  }

  .faq-hero::before,
  .faq-hero::after {
    opacity: 0.5;
  }

  .faq-hero h1 {
    font-size: 1.75rem;
  }

  .faq-nav {
    gap: 4px;
    margin-bottom: 32px;
    padding: 0 12px;
  }

  .faq-nav-item {
    padding: 6px 10px;
    font-size: 0.75rem;
  }

  .faq-section {
    padding: 0 12px;
    margin-bottom: 48px;
  }

  .faq-section-title {
    font-size: 0.6875rem;
  }

  .faq-item {
    border-radius: 10px;
  }

  .faq-question {
    padding: 14px 14px;
    font-size: 0.875rem;
    gap: 12px;
  }

  .faq-icon {
    width: 20px;
    height: 20px;
  }

  .faq-answer-content {
    padding: 0 14px 16px 14px;
    padding-top: 14px;
  }

  .faq-answer-content p,
  .faq-answer-content li {
    font-size: 0.8125rem;
    line-height: 1.65;
  }

  .faq-answer-content ul,
  .faq-answer-content ol {
    padding-left: 18px;
  }

  .faq-tags {
    gap: 6px;
  }

  .faq-tag {
    padding: 3px 8px;
    font-size: 0.75rem;
  }

  .faq-contact {
    padding: 32px 20px;
    margin-left: 12px;
    margin-right: 12px;
    border-radius: 16px;
  }

  .faq-contact h2 {
    font-size: 1.375rem;
  }

  .faq-contact p {
    font-size: 0.875rem;
    margin-bottom: 16px;
  }

  .faq-contact-link {
    padding: 10px 16px;
    font-size: 0.875rem;
  }
}

.footer {
  background: transparent;
  position: relative;
}

.footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(217, 119, 6, 0.3), transparent);
}

.footer-brand .logo {
  transition: all 0.3s ease;
}

.footer-brand .logo:hover {
  transform: translateY(-2px);
}