/*--------------------------------------------------------------
# Help Center Page (Premium Design)
--------------------------------------------------------------*/

.help-center {
  padding: 80px 0;
  background: linear-gradient(180deg, #f8fbfe 0%, #ffffff 100%);
}


/* ===============================
   SECTION HEADER
================================*/

.help-section-header {
  text-align: center;
  margin-bottom: 50px;
}

.help-section-header p {
  font-size: 16px;
  color: #6c7a89;
  max-width: 520px;
  margin: 12px auto 0;
  line-height: 1.7;
}


/* ===============================
   SEARCH
================================*/

.help-search-wrapper {
  max-width: 560px;
  margin: 0 auto 30px auto;
  position: relative;
  z-index: 100;
}

.help-search-box {
  position: relative;
  box-shadow: 0 4px 15px rgba(56, 189, 248, 0.05);
  border-radius: 50px;
}

.help-search-box:focus-within {
  box-shadow: 0 8px 25px rgba(56, 189, 248, 0.12);
  transform: translateY(-1px);
}

.help-search-box input {
  width: 100%;
  padding: 16px 90px 16px 30px;
  border-radius: 50px;
  border: 1px solid #e0f2fe;
  font-size: 15px;
  background: #fff;
  color: var(--heading-color);
  outline: none;
  transition: all 0.3s ease;
}

.help-search-box input::placeholder {
  color: #94a3b8;
  opacity: 0.8;
}

.help-search-box input:focus {
  border-color: #38bdf8;
}

.help-search-box i.search-icon {
  position: absolute;
  right: 55px;
  top: 50%;
  transform: translateY(-50%);
  color: #38bdf8;
  font-size: 20px;
  pointer-events: none;
  transition: all 0.3s ease;
}

.help-search-box:focus-within i.search-icon {
  color: #0ea5e9;
  transform: translateY(-50%) scale(1.05);
}

/* Header Toggles - Now centered below search */
.header-toggles {
  display: flex;
  gap: 15px;
  margin-top: 25px;
  justify-content: center;
}

.toggle-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 30px;
  color: #64748b;
  text-decoration: none;
  transition: all 0.2s ease;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

.toggle-btn i {
  font-size: 18px;
}

.toggle-btn:hover,
.toggle-btn.active {
  background: color-mix(in srgb, var(--accent-color), transparent 94%);
  border-color: var(--accent-color);
  color: var(--accent-color);
  transform: translateY(-2px);
  box-shadow: 0 6px 15px color-mix(in srgb, var(--accent-color), transparent 90%);
}


@media (max-width: 768px) {
  .header-toggles {
    gap: 10px;
  }

  .toggle-btn {
    padding: 8px 16px;
    font-size: 13px;
    flex: 1;
    justify-content: center;
  }
}

/* Clear (×) button */
.search-clear-btn {
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  color: #aab4c0;
  font-size: 16px;
  padding: 6px;
  border-radius: 50%;
  transition: all 0.2s ease;
  z-index: 10;
}

.search-clear-btn:hover {
  color: #e74c3c;
  background: #fdecea;
}


/* ===============================
   SEARCH SUGGESTIONS
================================*/

#searchSuggestions {
  position: absolute;
  top: calc(100% + 5px);
  width: 100%;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  display: none;
  z-index: 999;
  max-height: 300px;
  overflow-y: auto;
  border: 1px solid #e2e8f0;
}

.suggestion-item {
  padding: 14px 24px;
  cursor: pointer;
  font-size: 14.5px;
  color: #475569;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  border-bottom: 1px solid #f1f5f9;
}

.suggestion-item:last-child {
  border-bottom: none;
}

.suggestion-item::after {
  content: '\f52a';
  font-family: 'bootstrap-icons';
  color: #38bdf8;
  font-size: 16px;
  opacity: 0.7;
  transition: all 0.3s ease;
}

.suggestion-item:hover {
  background: #f0f9ff;
  color: #0369a1;
}

.suggestion-item.active {
  background: #e0f2fe;
  color: #0369a1;
  font-weight: 500;
}

.suggestion-item.active::after {
  opacity: 1;
  transform: scale(1.1);
}


.suggestion-item mark {
  background: transparent;
  color: inherit;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-color: #38bdf8;
}

/* Suggestion text truncation */
.suggestion-text {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}


/* ===============================
   NO RESULTS & EMPTY STATES
================================*/

.help-no-results {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 15px;
  padding: 60px 20px;
  text-align: center;
  color: #64748b;
  width: 100%;
}

.help-no-results h3 {
  font-size: 1.5rem;
  font-weight: 800;
  color: #1e293b;
  margin: 0;
}

.help-no-results p {
  font-size: 14.5px;
  max-width: 400px;
  margin: 0;
}



/* ===============================
   CARD SEARCH HIGHLIGHT
================================*/

@keyframes searchPulse {

  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(71, 178, 228, 0);
  }

  40% {
    box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent-color), transparent 65%);
  }
}


.help-card.search-highlight {
  animation: searchPulse 1.8s ease;
}


/* ===============================
   SECTION TITLE
================================*/

/* ===============================
   CATEGORY PILLS
================================*/
.category-pills-wrapper {
  width: 100%;
  overflow-x: auto;
  white-space: nowrap;
  padding: 10px 0 30px 0;
  -webkit-overflow-scrolling: touch;
  display: flex;
  gap: 12px;
}

.category-pills-wrapper::-webkit-scrollbar {
  display: none;
}

.category-pill {
  padding: 10px 24px;
  background: #fff;
  color: #000;
  border-radius: 25px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 1.5px solid #f1f5f9;
  box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}

.category-pill:hover {
  background: #e2e8f0;
}

.category-pill.active {
  background: #000;
  color: #fff;
}

/* Section Headers Isolation */
.help-section-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--heading-color);
  margin-bottom: 30px;
  display: flex;
  align-items: center;
  gap: 12px;
}


.help-section-title .title-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.help-section-title span.count-badge {
  font-size: 12px;
  padding: 2px 10px;
  border-radius: 20px;
  font-weight: 700;
}

.help-section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  margin-left: 10px;
}

/* 🔵 Shorts Header Theme */
.shorts-header .title-icon {
  background: color-mix(in srgb, var(--accent-color), transparent 94%);
  color: var(--accent-color);
}


.shorts-header span.count-badge {
  background: #e2e8f0;
  color: #64748b;
}

.shorts-header::after {
  background: #e2e8f0;
}

/* 🔴 Video Header Theme */
.video-header .title-icon {
  background: #fff0f0;
  color: #ef4444;
}

.video-header span.count-badge {
  background: #fee2e2;
  color: #ef4444;
}

.video-header::after {
  background: #fecaca;
}


/* ===============================
   VIDEO GRID
================================*/

.help-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
  margin-top: 20px;
  overflow: visible;
  max-height: none;
}

/* Shorts Grid - Vertical Layout */
.shorts-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 20px;
  overflow: visible;
  max-height: none;
}


/* ===============================
   CARD
================================*/

.help-card {
  background: #fff;
  border-radius: 24px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  border: 1px solid #f1f5f9;
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
}

.help-card:hover {
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.08);
  border-color: color-mix(in srgb, var(--accent-color), transparent 85%);
}

/* Card Badges */
.card-cat-badge {
  position: absolute;
  top: 20px;
  right: 20px;
  background: #000;
  color: #fff;
  padding: 5px 14px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  border: 1px solid #fff;
  z-index: 10;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Hide badge/overlay when video is playing */
.help-card.playing-video .card-cat-badge,
.help-card.playing-video .card-title-overlay,
.help-card.playing-video .card-content {
  display: none;
}

.help-card.playing-video {
    padding: 0 !important;
}

.help-card.playing-video .video-thumb {
    margin: 0 !important;
    border-radius: 0 !important;
}


/* Common Play Button Style */
.play-overlay {
  width: 60px;
  height: 60px;
  background: #fff;
  color: var(--heading-color);

  border-radius: 50%;
  font-size: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 5;
  transition: all 0.3s ease;
}

.help-card:hover .play-overlay {
  background: #ef4444;
  color: #fff;
}

/* 🎥 Video (Tutorial) Card Styles */
.video-card {
  padding: 0;
}

.video-card .video-thumb {
  border-radius: 24px;
  margin: 12px;
  position: relative;
  padding-bottom: 56.25%;
  /* 16:9 aspect ratio */
}

.video-card .card-content {
  padding: 0 20px 20px;
}

.video-card h4 {
  font-size: 16px;
  font-weight: 700;
  color: var(--heading-color);
  margin-bottom: 12px;
  line-height: 1.4;
}


.video-card .tag-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 15px;
}

.video-card .tag-pill {
  background: color-mix(in srgb, var(--accent-color), transparent 94%);
  color: var(--accent-color);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  border: 1px solid color-mix(in srgb, var(--accent-color), transparent 85%);
}


.video-card .card-footer-text {
  font-size: 13px;
  color: #64748b;
  line-height: 1.5;
  border-top: 1px solid #f1f5f9;
  padding-top: 12px;
}

/* 📱 Shorts Card Styles */
.shorts-card {
  border-radius: 20px;
  padding: 10px;
}

.shorts-card .video-thumb {
  border-radius: 12px;
  position: relative;
  padding-bottom: 177.77%;
  /* 9:16 portrait ratio */
}

.shorts-card .card-title-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 60px 15px 15px;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.4) 60%, transparent 100%);
  color: #fff;
  z-index: 4;
}

.shorts-card .card-title-overlay h4 {
  font-size: 14px;
  font-weight: 600;
  color: #ffffff;
  margin: 0;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.shorts-card .play-overlay {
  width: 48px;
  height: 48px;
  font-size: 22px;
}


/* ===============================
   VIDEO BOX
================================*/

.video-thumb {
  position: relative;
  padding-bottom: 56.25%;
  overflow: hidden;
  border-radius: 12px;
  cursor: pointer;
  background: #000;
  transition: transform 0.4s ease;
}

.video-thumb img,
.video-thumb iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: none;
  transition: transform 0.5s ease;
}

.help-card:hover .video-thumb img {
  transform: scale(1);
}


/* ===============================
   LOADER
================================*/

.video-loader {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.2);
  border-top: 3px solid #ffffff;
  animation: videoSpin 0.8s linear infinite;
  z-index: 10;
}


/* Video Type Badges */
.type-badge {
  position: absolute;
  top: 15px;
  right: 15px;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  z-index: 5;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  gap: 5px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.type-badge.short-type {
  background: rgba(239, 68, 68, 0.85);
}

/* Shorts Card Specifics */
.shorts-card {
  padding: 15px;
  border-radius: 20px;
}

.shorts-card .video-title {
  font-size: 14px;
  margin-bottom: 12px;
}

.shorts-card .video-thumb {
  padding-bottom: 177.77%;
  /* 9:16 Aspect Ratio */
  border-radius: 12px;
}

.shorts-card .play-overlay {
  width: 48px;
  height: 48px;
  font-size: 22px;
}

@keyframes videoSpin {
  0% {
    transform: translate(-50%, -50%) rotate(0deg);
  }

  100% {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}


/* ===============================
   PROGRESS BAR
================================*/

.preview-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  width: 0;
  background: #ff0000;
  transition: width linear;
  z-index: 10;
}


/* ===============================
   PLAY BUTTON
================================*/

.play-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(220, 30, 30, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 30px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 20px rgba(220, 30, 30, 0.4);
}

.video-thumb:hover .play-overlay {
  transform: translate(-50%, -50%) scale(1.12);
  box-shadow: 0 8px 30px rgba(220, 30, 30, 0.5);
}


/* ===============================
   DESCRIPTION
================================*/

.video-desc {
  font-size: 13.5px;
  color: #6c7a89;
  margin-top: 14px;
  line-height: 1.6;
}


/* ===============================
   MOBILE
================================*/

@media (max-width: 768px) {
  .help-center {
    padding: 60px 0;
  }

  .help-grid, .shorts-grid {
    grid-template-columns: 1fr !important;
    gap: 25px;
    padding: 0 15px; /* Base mobile padding */
  }

  .video-card .video-thumb {
    margin: 8px;
    border-radius: 12px;
  }

  .shorts-card {
    padding: 8px;
  }

  .help-search-wrapper {
    margin: 0 auto 40px auto;
  }

  #searchSuggestions {
    left: 0;
    right: 0;
    width: 100%;
    max-height: 220px;
  }

  .help-section-title {
    font-size: 16px;
    margin-bottom: 20px;
  }
}

@media (max-width: 500px) {
  /* Only Shorts get the 'smaller' centered look */
  .shorts-grid {
    padding: 0 12% !important;
    gap: 20px;
  }

  /* Regular Tutorial Videos stay Full Width */
  .help-grid {
    padding: 0 10px !important;
    gap: 20px;
  }

  /* 🔴 Smaller Play Button for Videos on Mobile */
  .video-card .play-overlay {
    width: 50px !important;
    height: 50px !important;
    font-size: 22px !important;
  }

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

  .video-card .video-thumb {
    margin: 6px;
  }

  .card-content {
    padding: 0 15px 15px !important;
  }

  .help-card.playing-video .video-thumb {
    border-radius: 12px !important;
  }
}



/* HOME HELP SLIDER */

.help-slider {
  padding: 10px 0 10px 0;
}

.help-slider .swiper-slide {
  height: auto;
}
/* =========================
   REAL LAZY REVEAL SYSTEM
========================= */
.reveal-card {
  opacity: 0;
  transform: translateY(30px) scale(0.98);
  transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1), 
              transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform, opacity;
}

.reveal-card.active {
  opacity: 1;
  transform: translateY(0) scale(1);
}
