/* MyMinistries.app Help Center — Friendbook-inspired Design */

:root {
  --help-primary: #007AFF;
  --help-primary-dark: #0056CC;
  --help-primary-light: #e0f0ff;
  --help-bg: #F8F9FA;
  --help-white: #ffffff;
  --help-text: #475569;
  --help-text-light: rgba(71, 85, 105, 0.8);
  --help-heading: #0f172a;
  --help-border: #e2e8f0;
  --help-shadow: 0 4px 24px rgba(30,58,138,0.06);
  --help-shadow-hover: 0 12px 40px rgba(30,58,138,0.12);
  --help-radius: 12px;
  --help-radius-sm: 8px;
  --help-font-heading: 'Inter', system-ui, sans-serif;
  --help-font-body: 'Inter', system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--help-font-body);
  color: var(--help-text);
  background: var(--help-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--help-primary); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--help-primary-dark); }

/* Container */
.help-container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header — now rendered via Tailwind in header-help.ejs, legacy classes kept for compatibility */

/* Hero */
.help-hero {
  background: linear-gradient(135deg, #001F3F 0%, #003366 100%);
  padding: 80px 20px 60px;
  text-align: center;
  color: #fff;
}

.help-hero-inner {
  max-width: 700px;
  margin: 0 auto;
}

.help-hero h1 {
  font-family: var(--help-font-heading);
  font-size: 40px;
  font-weight: 800;
  margin-bottom: 12px;
}

.help-hero p {
  font-size: 18px;
  opacity: 0.9;
  margin-bottom: 32px;
}

/* Search */
.help-search-form { width: 100%; }

.help-search-box {
  display: flex;
  align-items: center;
  background: #fff;
  border-radius: 50px;
  padding: 6px 6px 6px 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  max-width: 600px;
  margin: 0 auto;
}

.help-search-box i {
  color: var(--help-text-light);
  font-size: 18px;
  margin-right: 12px;
}

.help-search-box input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 16px;
  font-family: var(--help-font-body);
  color: var(--help-text);
  background: transparent;
}

.help-search-box input::placeholder { color: #aab4c2; }

.help-search-box button {
  background: var(--help-primary);
  color: #fff;
  border: none;
  padding: 12px 28px;
  border-radius: 50px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  font-family: var(--help-font-body);
}

.help-search-box button:hover { background: var(--help-primary-dark); }

.help-search-form-inline {
  margin-bottom: 30px;
}

/* Categories Section */
.help-categories-section {
  padding: 60px 0 80px;
}

.help-section-title {
  font-family: var(--help-font-heading);
  font-size: 28px;
  font-weight: 700;
  color: var(--help-heading);
  text-align: center;
  margin-bottom: 40px;
}

.help-categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.help-category-card {
  background: var(--help-white);
  border-radius: var(--help-radius);
  padding: 32px 24px;
  text-align: center;
  box-shadow: var(--help-shadow);
  transition: transform 0.3s, box-shadow 0.3s;
  display: block;
  color: var(--help-text);
}

.help-category-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--help-shadow-hover);
  color: var(--help-text);
}

.help-category-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--help-primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}

.help-category-icon i {
  font-size: 28px;
  color: var(--help-primary);
}

.help-category-card h3 {
  font-family: var(--help-font-heading);
  font-size: 18px;
  font-weight: 700;
  color: var(--help-heading);
  margin-bottom: 8px;
}

.help-category-card p {
  font-size: 14px;
  color: var(--help-text-light);
  margin-bottom: 12px;
  line-height: 1.5;
}

.help-category-count {
  font-size: 13px;
  color: var(--help-primary);
  font-weight: 500;
}

/* Breadcrumb */
.help-breadcrumb {
  background: var(--help-white);
  border-bottom: 1px solid var(--help-border);
  padding: 14px 0;
}

.help-breadcrumb .help-container {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  flex-wrap: wrap;
}

.help-breadcrumb a { color: var(--help-primary); font-weight: 500; }
.help-breadcrumb span { color: var(--help-text-light); }
.help-breadcrumb i { font-size: 10px; color: var(--help-text-light); }

/* Category Header */
.help-category-header {
  background: var(--help-white);
  padding: 40px 0;
  text-align: center;
  border-bottom: 1px solid var(--help-border);
}

.help-category-icon-large {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--help-primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}

.help-category-icon-large i {
  font-size: 36px;
  color: var(--help-primary);
}

.help-category-header h1 {
  font-family: var(--help-font-heading);
  font-size: 32px;
  font-weight: 700;
  color: var(--help-heading);
  margin-bottom: 8px;
}

.help-category-header p {
  color: var(--help-text-light);
  font-size: 16px;
}

/* Articles List */
.help-articles-section {
  padding: 40px 0 80px;
}

.help-articles-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.help-article-card {
  background: var(--help-white);
  border-radius: var(--help-radius-sm);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--help-shadow);
  transition: transform 0.2s, box-shadow 0.2s;
  color: var(--help-text);
}

.help-article-card:hover {
  transform: translateX(4px);
  box-shadow: var(--help-shadow-hover);
  color: var(--help-text);
}

.help-article-info { flex: 1; }

.help-article-info h3 {
  font-family: var(--help-font-heading);
  font-size: 17px;
  font-weight: 600;
  color: var(--help-heading);
  margin-bottom: 4px;
}

.help-article-info p {
  font-size: 14px;
  color: var(--help-text-light);
  margin: 0;
}

.help-article-tag {
  display: inline-block;
  background: var(--help-primary-light);
  color: var(--help-primary);
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 12px;
  margin-top: 8px;
}

.help-article-card > i {
  color: var(--help-primary);
  font-size: 14px;
  margin-left: 16px;
}

/* Article Content */
.help-article-section {
  padding: 40px 0 80px;
}

.help-article-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 40px;
}

.help-article-content {
  background: var(--help-white);
  border-radius: var(--help-radius);
  padding: 40px;
  box-shadow: var(--help-shadow);
}

.help-article-content h1 {
  font-family: var(--help-font-heading);
  font-size: 30px;
  font-weight: 700;
  color: var(--help-heading);
  margin-bottom: 16px;
}

.help-article-meta {
  display: flex;
  gap: 20px;
  font-size: 13px;
  color: var(--help-text-light);
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--help-border);
}

.help-article-meta i { margin-right: 4px; }

.help-article-video {
  position: relative;
  padding-bottom: 56.25%;
  margin-bottom: 24px;
  border-radius: var(--help-radius-sm);
  overflow: hidden;
}

.help-article-video iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
}

.help-article-cover {
  margin-bottom: 24px;
  border-radius: var(--help-radius-sm);
  overflow: hidden;
}

.help-article-cover img {
  width: 100%;
  height: auto;
  display: block;
}

.help-article-body {
  font-size: 16px;
  line-height: 1.8;
  color: var(--help-text);
}

.help-article-body h2 {
  font-family: var(--help-font-heading);
  font-size: 24px;
  font-weight: 700;
  color: var(--help-heading);
  margin: 32px 0 16px;
}

.help-article-body h3 {
  font-family: var(--help-font-heading);
  font-size: 20px;
  font-weight: 600;
  color: var(--help-heading);
  margin: 24px 0 12px;
}

.help-article-body p { margin-bottom: 16px; }

.help-article-body ul,
.help-article-body ol {
  margin: 0 0 16px 24px;
}

.help-article-body li { margin-bottom: 8px; }

.help-article-body img {
  max-width: 100%;
  height: auto;
  border-radius: var(--help-radius-sm);
  margin: 16px 0;
  box-shadow: var(--help-shadow);
}

.help-article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 14px;
}

.help-article-body table th,
.help-article-body table td {
  border: 1px solid var(--help-border);
  padding: 10px 14px;
  text-align: left;
}

.help-article-body table th {
  background: var(--help-primary-light);
  font-weight: 600;
  color: var(--help-heading);
}

.help-article-body code {
  background: #f1f5f9;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 14px;
}

.help-article-body pre {
  background: #1e293b;
  color: #e2e8f0;
  padding: 16px 20px;
  border-radius: var(--help-radius-sm);
  overflow-x: auto;
  margin: 16px 0;
}

.help-article-body pre code {
  background: transparent;
  padding: 0;
  color: inherit;
}

.help-article-body blockquote {
  border-left: 4px solid var(--help-primary);
  padding: 12px 20px;
  margin: 16px 0;
  background: var(--help-primary-light);
  border-radius: 0 var(--help-radius-sm) var(--help-radius-sm) 0;
}

/* Feedback */
.help-feedback-box {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--help-border);
  text-align: center;
}

.help-feedback-box > p {
  font-family: var(--help-font-heading);
  font-weight: 600;
  font-size: 16px;
  color: var(--help-heading);
  margin-bottom: 16px;
}

.help-feedback-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.help-btn-feedback {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  border-radius: 24px;
  border: 2px solid var(--help-border);
  background: var(--help-white);
  cursor: pointer;
  font-size: 15px;
  font-family: var(--help-font-body);
  font-weight: 500;
  transition: all 0.2s;
  color: var(--help-text);
}

.help-btn-feedback:hover {
  border-color: var(--help-primary);
  color: var(--help-primary);
}

.help-btn-feedback:disabled {
  opacity: 0.6;
  cursor: default;
}

.help-feedback-thanks {
  color: #22c55e;
  font-weight: 600;
}

.help-feedback-thanks i { margin-right: 4px; }

/* Sidebar */
.help-article-sidebar {
  background: var(--help-white);
  border-radius: var(--help-radius);
  padding: 24px;
  box-shadow: var(--help-shadow);
  height: fit-content;
  position: sticky;
  top: 80px;
}

.help-article-sidebar h3 {
  font-family: var(--help-font-heading);
  font-size: 16px;
  font-weight: 700;
  color: var(--help-heading);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--help-border);
}

.help-article-sidebar ul {
  list-style: none;
  padding: 0;
}

.help-article-sidebar li {
  margin-bottom: 10px;
}

.help-article-sidebar li a {
  font-size: 14px;
  color: var(--help-text);
  display: block;
  padding: 6px 0;
  border-bottom: 1px solid #f1f5f9;
  transition: color 0.2s;
}

.help-article-sidebar li a:hover { color: var(--help-primary); }
.help-article-sidebar li:last-child a { border-bottom: none; }

/* Back Link */
.help-back-link {
  margin-top: 40px;
  text-align: center;
}

.help-back-link a {
  font-weight: 600;
  font-size: 14px;
}

.help-back-link a i { margin-right: 4px; }

/* Search Section */
.help-search-section {
  padding: 40px 0 80px;
}

.help-search-section h2 {
  font-family: var(--help-font-heading);
  font-size: 22px;
  font-weight: 600;
  color: var(--help-heading);
  margin-bottom: 24px;
}

/* Empty States */
.help-empty {
  text-align: center;
  color: var(--help-text-light);
  font-size: 16px;
  padding: 40px 0;
}

.help-empty-state {
  text-align: center;
  padding: 60px 0;
}

.help-empty-state i {
  font-size: 48px;
  color: var(--help-border);
  margin-bottom: 16px;
}

.help-empty-state p {
  color: var(--help-text-light);
  font-size: 16px;
}

/* 404 */
.help-404 {
  padding: 100px 0;
  text-align: center;
}

.help-404-content i {
  font-size: 64px;
  color: var(--help-primary-light);
  margin-bottom: 16px;
}

.help-404-content h1 {
  font-family: var(--help-font-heading);
  font-size: 72px;
  font-weight: 800;
  color: var(--help-primary);
  margin-bottom: 8px;
}

.help-404-content h2 {
  font-family: var(--help-font-heading);
  font-size: 24px;
  color: var(--help-heading);
  margin-bottom: 12px;
}

.help-404-content p {
  color: var(--help-text-light);
  margin-bottom: 32px;
}

.help-btn-primary {
  display: inline-block;
  background: var(--help-primary);
  color: #fff !important;
  padding: 12px 32px;
  border-radius: 50px;
  font-weight: 600;
  transition: background 0.2s, transform 0.2s;
}

.help-btn-primary:hover {
  background: var(--help-primary-dark);
  transform: translateY(-2px);
}

/* Footer — now rendered via Tailwind in footer-help.ejs, legacy classes kept for compatibility */

/* Responsive */
@media (max-width: 768px) {
  .help-hero { padding: 50px 16px 40px; }
  .help-hero h1 { font-size: 28px; }
  .help-hero p { font-size: 15px; margin-bottom: 24px; }

  .help-categories-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .help-article-layout {
    grid-template-columns: 1fr;
  }

  .help-article-content { padding: 24px 16px; }
  .help-article-content h1 { font-size: 22px; }

  .help-search-box button {
    padding: 10px 18px;
    font-size: 14px;
  }

  .help-category-header h1 { font-size: 24px; }
}

@media (max-width: 480px) {
  .help-hero h1 { font-size: 24px; }
  .help-search-box { padding: 4px 4px 4px 12px; }
  .help-search-box input { font-size: 14px; }
  .help-search-box button { padding: 8px 16px; font-size: 13px; }
}
