/* ============================================
   Help Center — Shared Styles
   ============================================ */

/* --- Layout --- */
.help-layout {
  display: flex;
  gap: 3rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  position: relative;
  z-index: 1;
}

.help-content {
  flex: 1;
  min-width: 0;
  max-width: 680px;
  padding-bottom: 4rem;
}

/* --- Breadcrumbs --- */
.help-breadcrumbs {
  padding: 1.25rem 2rem 0;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.help-breadcrumbs ol {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--navy-50);
  padding: 0;
  margin: 0;
}

.help-breadcrumbs a {
  color: var(--navy-50);
  text-decoration: none;
  transition: color 0.2s ease;
}

.help-breadcrumbs a:hover {
  color: var(--navy);
}

.help-breadcrumbs .breadcrumb-sep {
  font-size: 0.7rem;
  color: var(--navy-40);
}

.help-breadcrumbs .breadcrumb-current {
  color: var(--navy-70);
  font-weight: 500;
}

/* --- Sidebar --- */
.help-sidebar {
  width: 260px;
  flex-shrink: 0;
  position: sticky;
  top: 5.5rem;
  align-self: flex-start;
  max-height: calc(100vh - 6rem);
  overflow-y: auto;
  padding-bottom: 2rem;
}

.help-sidebar-heading {
  font-family: 'Fraunces', serif;
  font-size: 1.1rem;
  color: var(--navy);
  margin-bottom: 1.5rem;
}

.help-sidebar-heading a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

.help-sidebar-heading a:hover {
  color: var(--pink);
}

.help-sidebar-category {
  margin-bottom: 1.5rem;
}

.help-sidebar-category-label {
  font-family: 'Figtree', sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--navy-40);
  margin-bottom: 0.5rem;
}

.help-sidebar-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.help-sidebar-links li {
  margin-bottom: 0.15rem;
}

.help-sidebar-links a {
  display: block;
  padding: 0.4rem 0.75rem;
  font-size: 0.88rem;
  color: var(--navy-60);
  text-decoration: none;
  border-left: 2px solid transparent;
  border-radius: 0 4px 4px 0;
  transition: all 0.15s ease;
}

.help-sidebar-links a:hover {
  color: var(--navy);
  background: var(--navy-04);
}

.help-sidebar-links a.active {
  color: var(--pink);
  border-left-color: var(--pink);
  background: var(--pink-08);
  font-weight: 500;
}

/* Mobile sidebar toggle */
.help-sidebar-toggle {
  display: none;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  font-family: 'Onest', sans-serif;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--navy-70);
  background: #fff;
  border: 1px solid var(--navy-08);
  border-radius: 8px;
  cursor: pointer;
  margin: 1rem 2rem 0;
  max-width: 1200px;
  transition: all 0.2s ease;
}

.help-sidebar-toggle:hover {
  border-color: var(--navy-15);
  color: var(--navy);
}

.help-sidebar-toggle svg {
  width: 16px;
  height: 16px;
  transition: transform 0.2s ease;
}

.help-sidebar-toggle.open svg {
  transform: rotate(180deg);
}

/* --- Help Page Header --- */
.help-header {
  padding-top: 8rem;
  padding-bottom: 2rem;
}

.help-header .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  position: relative;
  z-index: 1;
}

.help-header-inner {
  max-width: 600px;
}

.help-headline {
  font-size: clamp(2rem, 4vw, 2.75rem);
  color: var(--navy);
  margin-bottom: 0.75rem;
  line-height: 1.15;
}

.help-subtitle {
  font-size: 1.1rem;
  color: var(--navy-60);
  line-height: 1.7;
}

/* --- Search Placeholder --- */
.help-search {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem 2rem;
  position: relative;
  z-index: 10;
}

.help-search-input {
  width: 100%;
  max-width: 480px;
  padding: 0.85rem 1.25rem 0.85rem 3rem;
  font-family: 'Onest', sans-serif;
  font-size: 0.95rem;
  color: var(--navy);
  background: #fff;
  border: 1px solid var(--navy-08);
  border-radius: 10px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.help-search-input::placeholder {
  color: var(--navy-40);
}

.help-search-input:focus {
  border-color: var(--pink);
  box-shadow: 0 0 0 3px var(--pink-08);
}

.help-search-wrapper {
  position: relative;
  max-width: 480px;
}

.help-search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--navy-40);
  pointer-events: none;
}

/* --- Search Results --- */
.help-search-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  max-width: 480px;
  margin-top: 0.5rem;
  background: #fff;
  border: 1px solid var(--navy-08);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(27, 20, 100, 0.1);
  max-height: 420px;
  overflow-y: auto;
  z-index: 10;
}

.help-search-results[hidden] {
  display: none;
}

.help-search-result {
  display: block;
  padding: 1rem 1.25rem;
  text-decoration: none;
  border-bottom: 1px solid var(--navy-04);
  transition: background 0.1s ease;
  cursor: pointer;
}

.help-search-result:last-child {
  border-bottom: none;
}

.help-search-result:hover,
.help-search-result:focus {
  background: var(--navy-04);
  outline: none;
}

.help-search-result-title,
.help-search-result-category,
.help-search-result-snippet {
  pointer-events: none;
}

.help-search-result-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--navy);
  line-height: 1.3;
  margin-bottom: 0.2rem;
}

.help-search-result-category {
  font-family: 'Figtree', sans-serif;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--navy-40);
  margin-bottom: 0.25rem;
}

.help-search-result-snippet {
  font-size: 0.82rem;
  color: var(--navy-50);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.help-search-result-snippet mark {
  background: var(--pink-08);
  color: var(--navy);
  border-radius: 2px;
  padding: 0 1px;
}

.help-search-no-results {
  padding: 1.25rem;
  text-align: center;
  font-size: 0.9rem;
  color: var(--navy-50);
}

.help-search-no-results a {
  color: var(--pink);
  text-decoration: none;
  font-weight: 500;
}

/* --- Category Cards (Landing Page) --- */
.help-categories {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem 4rem;
  position: relative;
  z-index: 1;
}

.help-categories-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.help-category-card {
  background: #fff;
  border: 1px solid var(--navy-08);
  border-radius: 12px;
  padding: 1.75rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.help-category-card:hover {
  border-color: var(--navy-15);
  box-shadow: 0 4px 16px rgba(27, 20, 100, 0.06);
}

.help-category-card--full {
  grid-column: 1 / -1;
}

.help-category-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  margin-bottom: 1rem;
  color: #fff;
}

.help-category-icon--pink { background: var(--gradient-pink); }
.help-category-icon--blue { background: var(--gradient-blue); }
.help-category-icon--navy { background: var(--navy); }

.help-category-icon svg {
  width: 20px;
  height: 20px;
}

.help-category-title {
  font-family: 'Fraunces', serif;
  font-size: 1.2rem;
  color: var(--navy);
  margin-bottom: 0.5rem;
  line-height: 1.2;
}

.help-category-desc {
  font-size: 0.88rem;
  color: var(--navy-50);
  margin-bottom: 1rem;
  line-height: 1.5;
}

.help-category-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.help-category-links li {
  margin-bottom: 0.25rem;
}

.help-category-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
  color: var(--navy-70);
  text-decoration: none;
  padding: 0.3rem 0;
  transition: color 0.15s ease;
}

.help-category-links a:hover {
  color: var(--pink);
}

.help-category-links .link-arrow {
  width: 14px;
  height: 14px;
  color: var(--navy-40);
  transition: transform 0.15s ease, color 0.15s ease;
}

.help-category-links a:hover .link-arrow {
  transform: translateX(2px);
  color: var(--pink);
}

/* --- Article Styles --- */
.article-label {
  display: inline-block;
  font-family: 'Figtree', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--pink);
  margin-bottom: 0.75rem;
}

.article-title {
  font-size: clamp(1.75rem, 3.5vw, 2.25rem);
  color: var(--navy);
  margin-bottom: 1rem;
  line-height: 1.15;
}

.article-intro {
  font-size: 1.1rem;
  color: var(--navy-60);
  line-height: 1.7;
  margin-bottom: 2rem;
}

.article-body h2 {
  font-size: clamp(1.2rem, 2vw, 1.4rem);
  color: var(--navy);
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
  scroll-margin-top: 5rem;
}

.article-body h3 {
  font-size: 1.1rem;
  color: var(--navy);
  margin-top: 1.75rem;
  margin-bottom: 0.5rem;
}

.article-body p {
  font-size: 1rem;
  color: var(--navy-90);
  line-height: 1.7;
  margin-bottom: 1rem;
}

.article-body ul,
.article-body ol {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

.article-body li {
  font-size: 1rem;
  color: var(--navy-90);
  line-height: 1.7;
  margin-bottom: 0.5rem;
}

.article-body a {
  color: var(--pink);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.article-body a:hover {
  color: #d63e87;
}

/* Callout boxes */
.callout {
  margin: 1.5rem 0;
  padding: 1rem 1.25rem;
  border-radius: 0 8px 8px 0;
  font-size: 0.95rem;
  line-height: 1.6;
}

.callout--tip {
  background: var(--blue-08);
  border-left: 3px solid var(--blue);
  color: var(--navy-70);
}

.callout--note {
  background: var(--pink-08);
  border-left: 3px solid var(--pink);
  color: var(--navy-70);
}

.callout-label {
  font-family: 'Figtree', sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--navy-50);
  margin-bottom: 0.35rem;
}

/* Numbered steps */
.steps {
  counter-reset: step-counter;
  list-style: none;
  padding-left: 0;
  margin-bottom: 1.5rem;
}

.steps li {
  counter-increment: step-counter;
  position: relative;
  padding-left: 2.75rem;
  margin-bottom: 1.25rem;
}

.steps li::before {
  content: counter(step-counter);
  position: absolute;
  left: 0;
  top: 0.1em;
  width: 1.75rem;
  height: 1.75rem;
  background: var(--pink-08);
  color: var(--pink);
  font-family: 'Figtree', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* --- Table of Contents --- */
.article-toc {
  margin-bottom: 2.5rem;
  padding: 1.25rem 1.5rem;
  background: var(--navy-04);
  border-radius: 10px;
}

.article-toc-heading {
  font-family: 'Figtree', sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--navy-40);
  margin-bottom: 0.75rem;
}

.article-toc ol {
  list-style: none;
  padding: 0;
  margin: 0;
}

.article-toc li {
  margin-bottom: 0.35rem;
}

.article-toc a {
  font-size: 0.9rem;
  color: var(--navy-60);
  text-decoration: none;
  transition: color 0.15s ease;
}

.article-toc a:hover {
  color: var(--pink);
}

/* --- Related Articles --- */
.related-articles {
  margin-top: 3.5rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--navy-08);
}

.related-articles-heading {
  font-family: 'Fraunces', serif;
  font-size: 1.2rem;
  color: var(--navy);
  margin-bottom: 1.25rem;
}

.related-articles-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.related-article-card {
  display: block;
  padding: 1.25rem;
  background: #fff;
  border: 1px solid var(--navy-08);
  border-radius: 10px;
  text-decoration: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.related-article-card:hover {
  border-color: var(--navy-15);
  box-shadow: 0 2px 8px rgba(27, 20, 100, 0.06);
  transform: translateY(-1px);
}

.related-article-label {
  font-family: 'Figtree', sans-serif;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--navy-40);
  margin-bottom: 0.35rem;
}

.related-article-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--navy);
  line-height: 1.3;
}

/* --- Still Need Help --- */
.help-cta {
  margin-top: 2.5rem;
  padding: 1.75rem;
  background: var(--navy-04);
  border-radius: 12px;
  text-align: center;
}

.help-cta-heading {
  font-family: 'Fraunces', serif;
  font-size: 1.15rem;
  color: var(--navy);
  margin-bottom: 0.5rem;
}

.help-cta-text {
  font-size: 0.9rem;
  color: var(--navy-60);
  margin-bottom: 1rem;
}

.help-cta .btn {
  display: inline-flex;
}

/* --- FAQ Styles --- */
.faq-section {
  margin-bottom: 2.5rem;
}

.faq-section-heading {
  font-size: clamp(1.2rem, 2vw, 1.4rem);
  color: var(--navy);
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--navy-08);
  scroll-margin-top: 5rem;
}

.faq-item {
  border-bottom: 1px solid var(--navy-08);
  scroll-margin-top: 5rem;
}

.faq-item details {
  margin: 0;
}

.faq-item summary {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1.1rem 0;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

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

.faq-item summary::marker {
  display: none;
  content: '';
}

.faq-question {
  flex: 1;
  font-size: 1rem;
  font-weight: 600;
  color: var(--navy);
  line-height: 1.4;
}

.faq-permalink {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  color: var(--navy-15);
  border-radius: 6px;
  transition: all 0.15s ease;
  opacity: 0;
}

.faq-item:hover .faq-permalink,
.faq-permalink:focus {
  opacity: 1;
}

.faq-permalink:hover {
  color: var(--pink);
  background: var(--pink-08);
}

.faq-permalink svg {
  width: 16px;
  height: 16px;
}

.faq-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  color: var(--navy-40);
  transition: transform 0.2s ease, color 0.2s ease;
}

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

.faq-item details[open] .faq-icon {
  transform: rotate(45deg);
  color: var(--pink);
}

.faq-answer {
  padding: 0 0 1.25rem;
  font-size: 0.95rem;
  color: var(--navy-70);
  line-height: 1.7;
}

.faq-answer p {
  margin-bottom: 0.75rem;
}

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

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

.faq-answer a:hover {
  color: #d63e87;
}

/* FAQ item highlight when navigated via permalink */
.faq-item.highlighted {
  background: var(--pink-08);
  margin: 0 -1rem;
  padding: 0 1rem;
  border-radius: 8px;
  border-bottom-color: transparent;
}

/* --- Last Updated --- */
.help-last-updated {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem 1.5rem;
  position: relative;
  z-index: 1;
  text-align: right;
  font-size: 0.75rem;
  color: var(--navy-40);
  font-family: 'Figtree', sans-serif;
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  .help-sidebar {
    width: 220px;
  }
}

@media (max-width: 768px) {
  .help-sidebar {
    display: none;
    width: 100%;
    position: static;
    max-height: none;
    overflow: visible;
    padding: 1rem 2rem;
    border-bottom: 1px solid var(--navy-08);
    background: var(--navy-04);
    border-radius: 0 0 12px 12px;
  }

  .help-sidebar.open {
    display: block;
  }

  .help-sidebar-toggle {
    display: flex;
  }

  .help-layout {
    flex-direction: column;
    padding: 0 2rem;
    gap: 0;
  }

  .help-content {
    max-width: 100%;
  }

  .help-header {
    padding-top: 7rem;
  }

  .help-categories-grid {
    grid-template-columns: 1fr;
  }

  .related-articles-grid {
    grid-template-columns: 1fr;
  }

  .help-breadcrumbs {
    padding: 1rem 2rem 0;
  }

  /* On mobile, TOC becomes collapsible */
  .article-toc-mobile {
    display: block;
  }

  .article-toc-desktop {
    display: none;
  }

  .faq-permalink {
    opacity: 1;
  }
}

@media (min-width: 769px) {
  .article-toc-mobile {
    display: none;
  }

  .article-toc-desktop {
    display: block;
  }
}

@media (max-width: 480px) {
  .help-header {
    padding-top: 6.5rem;
  }

  .help-layout {
    padding: 0 1.25rem;
  }

  .help-breadcrumbs {
    padding: 1rem 1.25rem 0;
  }

  .help-search {
    padding: 0 1.25rem 1.5rem;
  }

  .help-categories {
    padding: 0 1.25rem 3rem;
  }

  .help-category-card {
    padding: 1.25rem;
  }

  .help-sidebar-toggle {
    margin: 0.75rem 1.25rem 0;
  }

  .faq-question {
    font-size: 0.95rem;
  }
}
