/* ==========================================================================
   NFCHub Help Center — Stylesheet
   Colors: Deep Teal #005D82, Lime Pop #D3EB42, Sky Cyan #31C4E9
   Fonts:  Anton (headlines), Poppins (body)
   ========================================================================== */

/* ---------- 1. RESET & BASE ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: #1a1a1a;
  background: #ffffff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, svg { max-width: 100%; display: block; }
a { color: #005D82; text-decoration: none; transition: color .2s; }
a:hover { color: #31C4E9; }
button { font-family: inherit; cursor: pointer; }

/* ---------- 2. TYPOGRAPHY ---------- */
h1, h2, h3, h4 {
  font-family: 'Anton', 'Poppins', sans-serif;
  font-weight: 400;
  letter-spacing: 0.5px;
  color: #1a1a1a;
  line-height: 1.15;
  margin: 0 0 16px;
}
h1 { font-size: clamp(36px, 5vw, 56px); }
h2 { font-size: clamp(28px, 4vw, 40px); }
h3 { font-size: clamp(20px, 2.5vw, 26px); }
h4 { font-size: 18px; }
p { margin: 0 0 16px; color: #1a1a1a; }
.muted { color: #6b7280; }
.small { font-size: 14px; }

/* ---------- 3. LAYOUT ---------- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}
.narrow { max-width: 1080px; }

/* ---------- 4. HEADER ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.96);
  backdrop-filter: saturate(180%) blur(8px);
  -webkit-backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid #e5e7eb;
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 14px 24px;
  max-width: 1200px;
  margin: 0 auto;
}
.logo {
  font-family: 'Anton', sans-serif;
  font-size: 26px;
  letter-spacing: 1px;
  color: #005D82;
  flex-shrink: 0;
}
.logo .hub { color: #31C4E9; }
.header-search {
  flex: 1;
  position: relative;
  max-width: 520px;
}
.header-search input {
  width: 100%;
  padding: 10px 14px 10px 42px;
  font: 14px/1.4 'Poppins', sans-serif;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #f9fafb;
  outline: none;
  transition: border-color .2s, background .2s;
}
.header-search input:focus { border-color: #31C4E9; background: #fff; }
.header-search .search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  stroke: #6b7280;
}
.back-link {
  font-size: 14px;
  font-weight: 500;
  color: #6b7280;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.back-link:hover { color: #005D82; }
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  padding: 8px;
}
.mobile-menu-toggle svg { width: 24px; height: 24px; stroke: #1a1a1a; }

/* ---------- 5. SEARCH RESULTS DROPDOWN ---------- */
.search-results {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  box-shadow: 0 12px 28px rgba(0,0,0,.08);
  max-height: 420px;
  overflow-y: auto;
  display: none;
  z-index: 110;
}
.search-results.open { display: block; }
.search-result-item {
  display: block;
  padding: 12px 16px;
  border-bottom: 1px solid #f3f4f6;
  color: #1a1a1a;
}
.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover { background: #f9fafb; }
.search-result-item .title { font-weight: 600; font-size: 14px; color: #1a1a1a; }
.search-result-item .cat { font-size: 12px; color: #6b7280; margin-top: 2px; }
.search-result-empty { padding: 18px; text-align: center; color: #6b7280; font-size: 14px; }

/* ---------- 6. HERO ---------- */
.hero {
  padding: 72px 0 56px;
  background: linear-gradient(135deg, #005D82 0%, #31C4E9 100%);
  color: #fff;
  text-align: center;
}
.hero h1 { color: #fff; margin-bottom: 12px; }
.hero p { color: rgba(255,255,255,0.92); font-size: 18px; margin-bottom: 32px; }
.hero-search {
  max-width: 600px;
  margin: 0 auto;
  position: relative;
}
.hero-search input {
  width: 100%;
  padding: 18px 22px 18px 56px;
  font: 16px/1.4 'Poppins', sans-serif;
  border: none;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
  outline: none;
}
.hero-search .search-icon {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  stroke: #6b7280;
}

/* ---------- 7. SECTION ---------- */
.section { padding: 64px 0; }
.section-head {
  text-align: center;
  margin-bottom: 40px;
}
.section-head h2 { margin-bottom: 8px; }
.section-head p { color: #6b7280; font-size: 16px; margin: 0; }

/* ---------- 8. CATEGORY CARDS ---------- */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}
.category-card {
  display: block;
  padding: 28px 24px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  transition: transform .2s, box-shadow .2s, border-color .2s;
  color: #1a1a1a;
}
.category-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(0,93,130,.10);
  border-color: #31C4E9;
  color: #1a1a1a;
}
.category-card .cat-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: #E6F4FA;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}
.category-card .cat-icon svg { width: 26px; height: 26px; stroke: #005D82; }
.category-card h3 {
  font-family: 'Poppins', sans-serif;
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 6px;
}
.category-card .cat-desc { color: #6b7280; font-size: 14px; margin: 0 0 14px; }
.category-card .cat-count {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  color: #005D82;
  background: #E6F4FA;
  padding: 4px 10px;
  border-radius: 999px;
}

/* ---------- 9. POPULAR ARTICLES ---------- */
.article-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}
.article-card {
  display: block;
  padding: 20px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  color: #1a1a1a;
  transition: border-color .2s, transform .2s;
}
.article-card:hover { border-color: #31C4E9; transform: translateY(-2px); color: #1a1a1a; }
.article-card .meta {
  font-size: 12px;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
  font-weight: 600;
}
.article-card h4 { font-family: 'Poppins', sans-serif; font-size: 16px; font-weight: 600; margin: 0 0 8px; }
.article-card p { font-size: 14px; color: #6b7280; margin: 0; }

/* ---------- 10. HELP FOOTER BLOCK ---------- */
.help-footer {
  margin-top: 64px;
  padding: 56px 24px;
  background: linear-gradient(135deg, #005D82 0%, #003B54 100%);
  border-radius: 16px;
  text-align: center;
  color: #fff;
}
.help-footer h2 { color: #fff; margin-bottom: 12px; }
.help-footer p { color: rgba(255,255,255,0.88); margin-bottom: 24px; }
.contact-btns {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 22px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  border: none;
  transition: transform .15s, box-shadow .2s, background .2s;
  cursor: pointer;
}
.btn svg { width: 18px; height: 18px; }
.btn:hover { transform: translateY(-2px); }
.btn-whatsapp {
  background: #D3EB42;
  color: #1a1a1a;
}
.btn-whatsapp:hover { background: #c4dc33; color: #1a1a1a; box-shadow: 0 8px 18px rgba(211,235,66,.35); }
.btn-email {
  background: rgba(255,255,255,0.12);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.25);
}
.btn-email:hover { background: rgba(255,255,255,0.2); color: #fff; }

/* ---------- 11. SITE FOOTER ---------- */
.site-footer {
  border-top: 1px solid #e5e7eb;
  padding: 28px 24px;
  text-align: center;
  color: #6b7280;
  font-size: 14px;
}
.site-footer a { color: #6b7280; }
.site-footer a:hover { color: #005D82; }

/* ==========================================================================
   CATEGORY PAGES
   ========================================================================== */
.breadcrumb {
  font-size: 14px;
  color: #6b7280;
  margin-bottom: 16px;
}
.breadcrumb a { color: #6b7280; }
.breadcrumb a:hover { color: #005D82; }
.breadcrumb .sep { margin: 0 8px; color: #d1d5db; }

.page-head {
  padding: 48px 0 24px;
}
.page-head h1 { margin-bottom: 8px; }
.page-head p { color: #6b7280; font-size: 17px; max-width: 700px; margin: 0; }

.subtopic-block {
  margin-bottom: 40px;
}
.subtopic-block h3 {
  font-family: 'Poppins', sans-serif;
  font-size: 16px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #6b7280;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e5e7eb;
}
.article-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  margin-bottom: 8px;
  color: #1a1a1a;
  transition: border-color .2s, transform .15s;
}
.article-list-item:hover { border-color: #31C4E9; transform: translateX(4px); color: #1a1a1a; }
.article-list-item .title { font-weight: 500; font-size: 15px; }
.article-list-item .chevron { width: 18px; height: 18px; stroke: #6b7280; }

/* ==========================================================================
   ARTICLE PAGE
   ========================================================================== */
.article-header {
  padding: 40px 0 24px;
  border-bottom: 1px solid #e5e7eb;
  margin-bottom: 24px;
}
.article-header h1 { margin-bottom: 10px; }
.article-subtitle { font-size: 17px; color: #6b7280; margin-bottom: 18px; }
.article-meta {
  display: flex;
  gap: 16px;
  font-size: 13px;
  color: #6b7280;
  flex-wrap: wrap;
}
.article-meta .meta-item { display: inline-flex; align-items: center; gap: 6px; }
.article-meta svg { width: 14px; height: 14px; stroke: #6b7280; }

/* ---------- VIEWER MODE TOGGLE ---------- */
.mode-toggle-wrap {
  position: sticky;
  top: 64px;
  z-index: 50;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid #e5e7eb;
  padding: 12px 0;
  margin: 0 -24px 24px;
}
.mode-toggle {
  display: inline-flex;
  background: #f3f4f6;
  padding: 4px;
  border-radius: 10px;
  gap: 2px;
}
.mode-toggle button {
  padding: 8px 16px;
  background: transparent;
  border: none;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 600;
  color: #6b7280;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background .2s, color .2s;
}
.mode-toggle button svg { width: 14px; height: 14px; stroke: currentColor; fill: none; }
.mode-toggle button:hover { color: #005D82; }
.mode-toggle button.active {
  background: #fff;
  color: #005D82;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
}

/* ---------- INTRO ---------- */
.article-intro {
  font-size: 17px;
  color: #1a1a1a;
  background: #f9fafb;
  border-left: 4px solid #31C4E9;
  padding: 16px 20px;
  border-radius: 8px;
  margin-bottom: 32px;
}
.article-intro p:last-child { margin-bottom: 0; }

/* ---------- STEPS (SCROLL MODE) ---------- */
.steps-container { display: block; }
.step {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 56px;
  padding: 48px 0;
  margin-bottom: 48px;
  align-items: start;
  position: relative;
}
.step + .step {
  border-top: 1px solid #f3f4f6;
}
.step:last-child { margin-bottom: 24px; }
.step:nth-child(even) .step-visual { order: 2; }
.step-visual {
  position: sticky;
  top: 140px;
}
.step-text { padding-top: 8px; }
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: #005D82;
  color: #fff;
  font-family: 'Anton', sans-serif;
  font-size: 18px;
  border-radius: 50%;
  margin-bottom: 12px;
}
.step h3 {
  font-family: 'Poppins', sans-serif;
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 10px;
}
.step p { color: #1a1a1a; line-height: 1.65; }

/* ---------- CALLOUTS ---------- */
.callout {
  padding: 14px 18px;
  border-radius: 8px;
  margin: 14px 0;
  font-size: 14px;
  line-height: 1.55;
}
.callout-tip  { background: #FEF9E1; border-left: 4px solid #F1C40F; }
.callout-warn { background: #FDECEA; border-left: 4px solid #E74C3C; }
.callout-info { background: #E6F4FA; border-left: 4px solid #31C4E9; }
.callout strong { display: block; margin-bottom: 6px; font-weight: 700; }
.callout span   { display: block; }

/* ---------- VISUAL CONTAINERS ---------- */
.visual {
  position: relative;
  background: #f3f4f6;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #e5e7eb;
}
.visual svg.mockup { display: block; width: 100%; height: auto; }
.visual .callout-overlay {
  position: absolute;
  pointer-events: none;
}
/* dashed screenshot placeholder */
.screenshot-placeholder {
  background: #f9fafb;
  border: 2px dashed #d1d5db;
  border-radius: 12px;
  padding: 40px 24px;
  text-align: center;
  color: #6b7280;
  font-size: 14px;
}
.screenshot-placeholder .ss-icon { font-size: 28px; margin-bottom: 8px; }
.screenshot-placeholder .ss-dims { font-size: 12px; color: #9ca3af; margin-top: 6px; font-family: monospace; }

/* ---------- SLIDES MODE ---------- */
.slides-stage {
  display: none;
  position: relative;
  min-height: 540px;
}
.slides-stage.active { display: block; }
.slide {
  display: none;
  padding: 20px 0 80px;
}
.slide.active { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: center; }
.slide .step-visual { position: static; }
.slides-controls {
  position: sticky;
  bottom: 24px;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,.06);
  margin-top: 24px;
}
.slides-controls .step-counter { font-size: 13px; font-weight: 600; color: #6b7280; }
.slides-controls button {
  padding: 10px 18px;
  background: #005D82;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.slides-controls button:disabled { background: #d1d5db; cursor: not-allowed; }
.slides-controls button:hover:not(:disabled) { background: #004a66; }

/* ---------- MOVIE MODE ---------- */
.movie-stage {
  display: none;
}
.movie-stage.active { display: block; }
.movie-progress {
  height: 4px;
  background: #e5e7eb;
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 16px;
}
.movie-progress-bar {
  height: 100%;
  background: linear-gradient(to right, #005D82, #31C4E9);
  width: 0%;
  transition: width .15s linear;
}
.movie-controls {
  display: flex;
  align-items: center;
  gap: 16px;
  background: #f9fafb;
  padding: 12px 16px;
  border-radius: 10px;
  margin-bottom: 24px;
}
.movie-controls button {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #005D82;
  color: #fff;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.movie-controls button svg { width: 16px; height: 16px; fill: #fff; }
.movie-counter { font-size: 13px; color: #6b7280; font-weight: 600; }
.movie-speed { margin-left: auto; font-size: 13px; }
.movie-speed select {
  padding: 6px 10px;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  background: #fff;
  font: inherit;
  font-size: 13px;
}
.timeline-strip {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 8px 0;
  margin-top: 24px;
  border-top: 1px solid #e5e7eb;
  padding-top: 16px;
}
.timeline-tick {
  flex-shrink: 0;
  min-width: 64px;
  padding: 10px 12px;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  color: #6b7280;
  text-align: center;
}
.timeline-tick.active { background: #E6F4FA; border-color: #31C4E9; color: #005D82; }
.timeline-tick:hover { background: #f9fafb; }

/* ---------- FEEDBACK ---------- */
.feedback-block {
  text-align: center;
  padding: 32px 24px;
  background: #f9fafb;
  border-radius: 12px;
  margin: 48px 0 32px;
}
.feedback-block h4 { font-family: 'Poppins', sans-serif; font-weight: 600; font-size: 18px; margin-bottom: 14px; }
.feedback-btns { display: inline-flex; gap: 10px; }
.feedback-btn {
  padding: 10px 22px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  font-size: 22px;
  transition: transform .15s, border-color .2s, background .2s;
}
.feedback-btn:hover { transform: scale(1.1); border-color: #31C4E9; }
.feedback-btn.selected { background: #E6F4FA; border-color: #31C4E9; }
.feedback-thanks { margin-top: 14px; color: #005D82; font-weight: 500; font-size: 14px; display: none; }
.feedback-thanks.show { display: block; }

/* ---------- RELATED ARTICLES ---------- */
.related-block { margin: 48px 0; }
.related-block h3 {
  font-family: 'Poppins', sans-serif;
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 16px;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 768px) {
  .header-search { display: none; }
  .mobile-menu-toggle { display: inline-flex; }
  .back-link span { display: none; }
  .hero { padding: 48px 0 40px; }
  .hero-search input { padding: 14px 18px 14px 50px; font-size: 15px; }
  .section { padding: 40px 0; }
  .step {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 32px 0;
    margin-bottom: 24px;
  }
  .step:nth-child(even) .step-visual { order: 0; }
  .step-visual { position: static; }
  .slide.active { grid-template-columns: 1fr; gap: 16px; }
  .mode-toggle-wrap { top: 56px; }
  .mode-toggle button { padding: 8px 12px; font-size: 12px; }
  .mode-toggle button span.label { display: none; }
  .help-footer { margin: 48px -24px 0; border-radius: 0; padding: 48px 24px; }
  .movie-controls { flex-wrap: wrap; }
}

@media (max-width: 480px) {
  h1 { font-size: 32px; }
  h2 { font-size: 26px; }
  .hero h1 { font-size: 32px; }
  .hero p { font-size: 15px; }
  .article-meta { gap: 10px; font-size: 12px; }
  .contact-btns { flex-direction: column; }
  .contact-btns .btn { width: 100%; justify-content: center; }
}
