/**
 * Help Center Page - Content Section Styles
 * faq.whatsapp.com layout: left topic sidebar + main column with
 * search, topic cards (icon band on top), and a flat article list.
 */

.help-content {
  padding: 56px var(--gutter) 88px;
  background: var(--color-white);
}

/* Two-column layout: sticky sidebar + main column */
.help-layout {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 48px;
  align-items: start;
}

/* --- Left sidebar navigation ------------------------------------- */
.help-sidebar {
  position: sticky;
  top: 96px;
  align-self: start;
}

.help-sidebar__nav {
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--color-border);
  padding-right: 20px;
}

.help-sidebar__link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  color: var(--color-text-heading);
  text-decoration: none;
  font-size: 14.5px;
  font-weight: 600;
  transition: background-color 160ms ease, color 160ms ease;
}

.help-sidebar__link:hover {
  background: #f0f4f3;
}

.help-sidebar__link:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: -2px;
}

.help-sidebar__icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  display: inline-flex;
  color: var(--color-text-body);
  font-size: 18px;
}

.help-sidebar__icon svg {
  width: 18px;
  height: 18px;
}

.help-sidebar__label {
  flex: 1;
  min-width: 0;
}

.help-sidebar__chevron {
  flex-shrink: 0;
  color: #b4bcc2;
  transition: transform 160ms ease, color 160ms ease;
}

.help-sidebar__link:hover .help-sidebar__chevron {
  color: var(--color-primary);
}

/* --- Main column ------------------------------------------------- */
.help-main {
  min-width: 0;
}

.help-main__title {
  font-size: clamp(26px, 3.5vw, 34px);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--color-text-heading);
  margin: 0 0 10px;
}

.help-main__subtitle {
  font-size: 15px;
  color: var(--color-text-body);
  margin: 0 0 28px;
  line-height: 1.55;
}

/* Search — WhatsApp-style light pill */
.help-main .search-box {
  margin-bottom: 44px;
}

.help-main .search-box__inner {
  position: relative;
  max-width: 560px;
}

.help-main .search-box input {
  width: 100%;
  display: block;
  padding: 15px 20px 15px 50px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 15px;
  font-family: var(--font-body);
  color: var(--color-text-heading);
  background: #f0f2f5;
  transition: background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.help-main .search-box input::placeholder {
  color: #86909a;
}

.help-main .search-box input:focus {
  outline: none;
  background: var(--color-white);
  border-color: var(--color-primary);
  box-shadow: 0 0 0 4px rgba(13, 73, 69, 0.12);
}

.help-main .search-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  color: #86909a;
  pointer-events: none;
}

/* Section heading above card grids */
.help-section-heading {
  font-size: clamp(20px, 3vw, 26px);
  margin: 0 0 20px;
  color: var(--color-text-heading);
  font-weight: 700;
  letter-spacing: -0.01em;
}

/* Categories Grid — 3 columns like WhatsApp's Popular Topics */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 56px;
}

/* Category Card — light icon band on top, text below */
.category-card {
  display: flex;
  flex-direction: column;
  color: inherit;
  text-decoration: none;
  background: var(--color-white);
  border-radius: 16px;
  border: 1px solid #e8ecf1;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.category-card:hover {
  border-color: rgba(13, 73, 69, 0.35);
  box-shadow: 0 6px 20px -8px rgba(13, 73, 69, 0.22);
}

.category-card:focus-visible {
  outline: 2px solid #0D4945;
  outline-offset: 3px;
}

/* Icon band — WhatsApp shows a light illustration panel */
.category-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 104px;
  font-size: 40px;
  color: #0D4945;
  background: #f0f4f3;
  transition: background-color 160ms ease, color 160ms ease;
}

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

.category-card:hover .category-icon {
  background: #0D4945;
  color: #fff;
}

.category-card:hover .category-icon svg {
  animation: help-icon-pop 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes help-icon-pop {
  0% { transform: scale(0.8); }
  60% { transform: scale(1.15); }
  100% { transform: scale(1); }
}

.category-card__body {
  padding: 16px 18px 20px;
}

.category-card h3 {
  font-size: 15.5px;
  margin: 0 0 6px;
  color: var(--color-text-heading);
  font-weight: 700;
  letter-spacing: -0.01em;
}

.category-card p {
  font-size: 13px;
  color: var(--color-text-body);
  margin: 0;
  line-height: 1.5;
}

/* Articles Section */
.articles-section {
  margin-top: 8px;
  margin-bottom: 8px;
}

.articles-section h2 {
  font-size: clamp(20px, 3vw, 26px);
  margin-bottom: 6px;
  color: var(--color-text-heading);
  font-weight: 700;
  letter-spacing: -0.01em;
}

.articles-section p {
  font-size: 14px;
  color: var(--color-text-body);
  margin-bottom: 20px;
}

/* Articles — flat hairline link list (WhatsApp help-center style) */
.articles-list {
  border-top: 1px solid var(--color-border);
}

.article-card {
  display: flex;
  align-items: center;
  gap: 16px;
  color: inherit;
  text-decoration: none;
  padding: 18px 8px;
  border-bottom: 1px solid var(--color-border);
  cursor: pointer;
  transition: background-color 160ms ease;
}

.article-card:hover {
  background: #f7faf9;
}

.article-card:focus-visible {
  outline: 2px solid #0D4945;
  outline-offset: -2px;
}

.article-card__body {
  flex: 1;
  min-width: 0;
}

.article-card h3 {
  font-size: 15px;
  margin: 0;
  color: var(--color-primary);
  font-weight: 600;
}

.article-card p {
  font-size: 13px;
  color: var(--color-text-body);
  margin: 4px 0 0;
  line-height: 1.5;
}

.article-card__chevron {
  flex-shrink: 0;
  display: flex;
  color: #b4bcc2;
  transition: transform 160ms ease, color 160ms ease;
}

.article-card:hover .article-card__chevron {
  color: var(--color-primary);
  transform: translateX(3px);
}

.help-no-results { margin: 24px 0 0; color: var(--color-text-body); }

/* Support channels strip */
.support-section {
  margin-top: 72px;
}

.help-content--support {
  padding-top: 0;
}

.help-content--support .help-container {
  max-width: 1180px;
  margin: 0 auto;
}

.support-grid {
  margin-bottom: 0;
  grid-template-columns: repeat(3, 1fr);
}

/* Responsive Design — sidebar becomes a horizontal strip */
@media (max-width: 1024px) {
  .categories-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 860px) {
  .help-layout {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .help-sidebar {
    position: static;
  }

  .help-sidebar__nav {
    flex-direction: row;
    overflow-x: auto;
    border-right: none;
    border-bottom: 1px solid var(--color-border);
    padding: 0 0 14px;
    gap: 6px;
    scrollbar-width: thin;
  }

  .help-sidebar__link {
    flex-shrink: 0;
    border: 1px solid var(--color-border);
    padding: 9px 14px;
  }

  .help-sidebar__chevron {
    display: none;
  }
}

@media (max-width: 768px) {
  .help-content {
    padding: 44px var(--gutter) 64px;
  }

  .categories-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

@media (max-width: 480px) {
  .article-card {
    padding: 16px 4px;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .category-card,
  .article-card,
  .category-icon,
  .article-card__chevron,
  .help-sidebar__link,
  .help-sidebar__chevron {
    transition-duration: 1ms !important;
  }

  .category-icon svg {
    animation: none !important;
  }
}
