/* ============================================================
   additional_styles.css — New page & FAQ section styles
   Matches AFI Protocol color palette & design system
   ============================================================ */

/* ── Shared page layout ──────────────────────────────────── */

.page-wrapper {
  background-color: #F5FCFF;
  min-height: 100vh;
  overflow-x: hidden;
}

.page-container {
  width: clamp(300px, 90%, 1100px);
  margin-inline: auto;
  padding: 2.5rem 1rem;
}

/* ── Shared nav bar clone (for sub-pages) ────────────────── */

.page-nav {
  background: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  position: sticky;
  top: 0;
  z-index: 50;
  width: 100%;
  border-bottom: 1px solid #EFF9FD;
}

.page-nav-inner {
  width: clamp(300px, 90%, 1100px);
  margin-inline: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
}

.page-nav-logo img {
  height: 24px;
  width: auto;
}

.page-nav-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.page-nav-links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: #6b7280;
  text-decoration: none;
  padding: 1rem 0;
  transition: color 0.2s;
}

.page-nav-links a:hover {
  color: #365862;
  border-bottom: 2px solid #365862;
}

/* ── Shared page footer ──────────────────────────────────── */

.page-footer {
  background: rgba(224, 242, 248, 0.25);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  width: 100%;
  margin-top: auto;
}

.page-footer-inner {
  width: clamp(300px, 90%, 1100px);
  margin-inline: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 0;
  font-size: 0.875rem;
  color: #6b7280;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.page-footer-links {
  display: flex;
  gap: 0.5rem;
}

.page-footer-links a {
  padding: 0.5rem;
  background-color: #EFF9FD;
  border-radius: 0.5rem;
  color: #365862;
  text-decoration: none;
  font-size: 0.875rem;
  transition: opacity 0.2s;
}

.page-footer-links a:hover {
  opacity: 0.75;
}

/* ── Background blobs (shared decorative elements) ───────── */

.blob-tl {
  position: fixed;
  top: -8rem;
  left: 7.5rem;
  width: 440px;
  height: 440px;
  background: #cde4ee;
  border-radius: 9999px;
  filter: blur(178.6px);
  pointer-events: none;
  z-index: -10;
}

.blob-tr {
  position: fixed;
  top: -5rem;
  right: -8rem;
  width: 447px;
  height: 325px;
  background: #8ab6ca;
  border-radius: 9999px;
  filter: blur(184.95px);
  pointer-events: none;
  z-index: -10;
  transform: rotate(85.91deg);
}

.blob-mid {
  position: fixed;
  top: 442px;
  left: 285px;
  width: 295px;
  height: 295px;
  background: #cde4ee;
  border-radius: 9999px;
  filter: blur(184.95px);
  pointer-events: none;
  z-index: -10;
}

/* ── FAQ Section (on index.html) ─────────────────────────── */

.faq-section {
  margin-top: 5rem;
  margin-bottom: 2rem;
  width: clamp(300px, 90%, 1100px);
  margin-inline: auto;
  max-width: 100%;
  overflow-x: hidden;
}

.faq-h1 {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 500;
  color: #1a2e33;
  line-height: 1.25;
  margin-bottom: 0.5rem;
  text-align: center;
}

.faq-h1 span {
  color: #365862;
}

.faq-subtitle {
  text-align: center;
  color: #6b7280;
  font-size: 0.9375rem;
  margin-bottom: 2.5rem;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.faq-item {
  background: rgba(255, 255, 255, 0.6);
  border-radius: 1rem;
  border: 1px solid #EFF9FD;
  overflow: hidden;
  transition: box-shadow 0.2s ease;
}

.faq-item:hover {
  box-shadow: 0 4px 16px rgba(54, 88, 98, 0.08);
}

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  background: none;
  border: none;
  padding: 1.25rem 1.5rem;
  text-align: left;
  cursor: pointer;
  gap: 1rem;
  font-size: 1rem;
  font-weight: 500;
  color: #1a2e33;
  line-height: 1.5;
  transition: color 0.2s;
}

.faq-question:hover {
  color: #365862;
}

.faq-question h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 500;
  color: inherit;
  line-height: 1.5;
}

.faq-icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 9999px;
  background: #EFF9FD;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #365862;
  transition: transform 0.3s ease, background-color 0.2s ease;
}

.faq-icon svg {
  width: 14px;
  height: 14px;
  stroke: #365862;
  stroke-width: 2.5;
  transition: transform 0.3s ease;
}

.faq-item.open .faq-icon {
  background: #365862;
  transform: rotate(180deg);
}

.faq-item.open .faq-icon svg {
  stroke: #ffffff;
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.38s cubic-bezier(0.4, 0, 0.2, 1),
              padding 0.28s ease,
              opacity 0.28s ease;
  opacity: 0;
  padding: 0 1.5rem;
}

.faq-item.open .faq-answer {
  max-height: 600px;
  opacity: 1;
  padding: 0 1.5rem 1.25rem;
}

.faq-answer h3 {
  font-size: 0.9375rem;
  font-weight: 400;
  color: #4b6570;
  line-height: 1.65;
  margin: 0;
}

.faq-divider {
  height: 1px;
  background: #EFF9FD;
  margin: 0 1.5rem;
}

.faq-item.open .faq-divider {
  display: block;
}

/* ── FAQ section bottom links ────────────────────────────── */

.faq-bottom-links {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.faq-bottom-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.625rem 1.375rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition: opacity 0.2s, transform 0.15s;
}

.faq-bottom-links a:hover {
  opacity: 0.82;
  transform: translateY(-1px);
}

.faq-link-primary {
  background: #365862;
  color: #ffffff;
}

.faq-link-secondary {
  background: #EFF9FD;
  color: #365862;
  border: 1px solid rgba(54, 88, 98, 0.15);
}

/* ── About Page ──────────────────────────────────────────── */

.about-hero {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
  padding: 3rem 0 2rem;
  border-bottom: 1px solid #EFF9FD;
  margin-bottom: 3rem;
}

.about-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 0.375rem;
  padding: 0.25rem 0.625rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #365862;
  border: 1px solid rgba(54, 88, 98, 0.15);
}

.about-h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 500;
  color: #1a2e33;
  line-height: 1.25;
  margin: 0;
}

.about-h1 span {
  color: #365862;
}

.about-lead {
  font-size: 1.0625rem;
  color: #4b6570;
  line-height: 1.7;
  max-width: 680px;
  margin: 0;
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1.25rem;
  margin-bottom: 3rem;
}

.about-stat-card {
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid #EFF9FD;
  border-radius: 1.5rem;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.about-stat-value {
  font-size: 1.75rem;
  font-weight: 500;
  color: #365862;
  line-height: 1.2;
}

.about-stat-label {
  font-size: 0.8125rem;
  color: #6b7280;
}

.about-section {
  margin-bottom: 2.5rem;
}

.about-section-title {
  font-size: 1.375rem;
  font-weight: 500;
  color: #1a2e33;
  margin: 0 0 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.about-section-title::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 1.25em;
  background: #365862;
  border-radius: 2px;
  flex-shrink: 0;
}

.about-section p {
  font-size: 0.9375rem;
  color: #4b6570;
  line-height: 1.7;
  margin: 0 0 0.75rem;
}

.about-section p:last-child {
  margin-bottom: 0;
}

.about-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.about-feature-card {
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid #EFF9FD;
  border-radius: 1rem;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: box-shadow 0.2s;
}

.about-feature-card:hover {
  box-shadow: 0 4px 16px rgba(54, 88, 98, 0.08);
}

.about-feature-icon {
  width: 36px;
  height: 36px;
  border-radius: 0.625rem;
  background: #EFF9FD;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #365862;
  font-size: 1.125rem;
}

.about-feature-title {
  font-size: 0.9375rem;
  font-weight: 500;
  color: #1a2e33;
  margin: 0;
}

.about-feature-desc {
  font-size: 0.875rem;
  color: #6b7280;
  line-height: 1.6;
  margin: 0;
}

.about-cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid #EFF9FD;
}

.about-cta a {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.625rem 1.5rem;
  border-radius: 0.5rem;
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  transition: opacity 0.2s, transform 0.15s;
}

.about-cta a:hover {
  opacity: 0.82;
  transform: translateY(-1px);
}

.about-cta-primary {
  background: #365862;
  color: #ffffff;
}

.about-cta-secondary {
  background: #EFF9FD;
  color: #365862;
  border: 1px solid rgba(54, 88, 98, 0.15);
}

/* ── FAQ dedicated page ──────────────────────────────────── */

.faqpage-hero {
  padding: 3rem 0 2rem;
  border-bottom: 1px solid #EFF9FD;
  margin-bottom: 2.5rem;
}

.faqpage-hero h1 {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 500;
  color: #1a2e33;
  line-height: 1.25;
  margin: 0.5rem 0 0.75rem;
}

.faqpage-hero h1 span {
  color: #365862;
}

.faqpage-hero p {
  font-size: 0.9375rem;
  color: #6b7280;
  margin: 0;
  max-width: 600px;
  line-height: 1.65;
}

.faqpage-category-title {
  font-size: 1.125rem;
  font-weight: 500;
  color: #365862;
  margin: 2rem 0 0.75rem;
  padding-bottom: 0.375rem;
  border-bottom: 2px solid #EFF9FD;
}

.faqpage-list {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  margin-bottom: 1.5rem;
}

.faqpage-cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 3rem;
  padding: 2rem;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid #EFF9FD;
  border-radius: 1.5rem;
  justify-content: center;
}

.faqpage-cta p {
  width: 100%;
  text-align: center;
  color: #4b6570;
  font-size: 0.9375rem;
  margin: 0 0 0.5rem;
}

.faqpage-cta a {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.625rem 1.5rem;
  border-radius: 0.5rem;
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  transition: opacity 0.2s, transform 0.15s;
}

.faqpage-cta a:hover {
  opacity: 0.82;
  transform: translateY(-1px);
}

.faqpage-cta-primary {
  background: #365862;
  color: #ffffff;
}

.faqpage-cta-secondary {
  background: #EFF9FD;
  color: #365862;
  border: 1px solid rgba(54, 88, 98, 0.15);
}

/* ── Accordion (reusable, works on both pages) ───────────── */

.accordion-item {
  background: rgba(255, 255, 255, 0.55);
  border-radius: 1rem;
  border: 1px solid #EFF9FD;
  overflow: hidden;
  transition: box-shadow 0.2s ease;
}

.accordion-item:hover {
  box-shadow: 0 4px 16px rgba(54, 88, 98, 0.08);
}

.accordion-trigger {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  background: none;
  border: none;
  padding: 1.125rem 1.375rem;
  text-align: left;
  cursor: pointer;
  gap: 1rem;
  transition: color 0.2s;
}

.accordion-trigger h2,
.accordion-trigger .accordion-label {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 500;
  color: #1a2e33;
  line-height: 1.5;
}

.accordion-trigger:hover .accordion-label,
.accordion-trigger:hover h2 {
  color: #365862;
}

.accordion-chevron {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 9999px;
  background: #EFF9FD;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease, background-color 0.2s ease;
}

.accordion-chevron svg {
  width: 12px;
  height: 12px;
  stroke: #365862;
  stroke-width: 2.5;
  fill: none;
  transition: stroke 0.2s;
}

.accordion-item.open .accordion-chevron {
  background: #365862;
  transform: rotate(180deg);
}

.accordion-item.open .accordion-chevron svg {
  stroke: #ffffff;
}

.accordion-body {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  padding: 0 1.375rem;
  transition: max-height 0.38s cubic-bezier(0.4, 0, 0.2, 1),
              padding 0.28s ease,
              opacity 0.28s ease;
}

.accordion-item.open .accordion-body {
  max-height: 600px;
  opacity: 1;
  padding: 0 1.375rem 1.125rem;
}

.accordion-body p,
.accordion-body h3 {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 400;
  color: #4b6570;
  line-height: 1.7;
}

.accordion-separator {
  height: 1px;
  background: #EFF9FD;
  margin: 0 1.375rem;
}

/* ── Utility helpers ─────────────────────────────────────── */

.text-primary-afi {
  color: #365862;
}

.bg-primary-afi {
  background-color: #365862;
}

.bg-light-afi {
  background-color: #EFF9FD;
}

.rounded-card {
  border-radius: 1.5rem;
}

.section-divider {
  height: 1px;
  background: #EFF9FD;
  margin: 2rem 0;
}

/* ── Responsive adjustments ──────────────────────────────── */

@media (max-width: 640px) {
  .about-hero {
    padding: 1.75rem 0 1.5rem;
  }

  .about-h1 {
    font-size: 1.75rem;
  }

  .faqpage-hero h1 {
    font-size: 1.625rem;
  }

  .faq-h1 {
    font-size: 1.625rem;
  }

  .faq-question {
    padding: 1rem 1rem;
  }

  .faq-item.open .faq-answer {
    padding: 0 1rem 1rem;
  }

  .faq-answer h3 {
    font-size: 0.875rem;
  }

  .faq-bottom-links {
    flex-direction: column;
    align-items: stretch;
  }

  .faq-bottom-links a {
    justify-content: center;
  }

  .about-cta {
    flex-direction: column;
    align-items: stretch;
  }

  .about-cta a {
    justify-content: center;
  }

  .faqpage-cta a {
    width: 100%;
    justify-content: center;
  }

  .page-nav-links {
    gap: 1rem;
  }

  .page-footer-inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}