/* ============================================
   NEXBOND CRM — Features Page Stylesheet
   ============================================ */

/* ── Hero Section ── */
.features-hero {
  padding-top: calc(var(--nav-height, 76px) + var(--space-16));
  padding-bottom: var(--space-16);
  background: var(--gradient-hero);
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.features-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 1000px;
  height: 400px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.08) 0%, rgba(6, 182, 212, 0.04) 50%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.features-hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 920px;
  margin: 0 auto;
}

.features-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(37, 99, 235, 0.08);
  border: 1px solid rgba(37, 99, 235, 0.2);
  border-radius: var(--radius-full);
  padding: 6px 16px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--blue);
  letter-spacing: 0.02em;
  margin-bottom: var(--space-6);
}

.feat-badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
  display: inline-block;
}

.features-hero h1 {
  font-family: var(--disp);
  font-size: clamp(2.3rem, 4.5vw, 3.6rem);
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--tx);
  margin-bottom: var(--space-5);
}

.features-hero .subtitle {
  font-size: clamp(1rem, 1.3vw, 1.2rem);
  line-height: 1.6;
  color: var(--tx-mute);
  max-width: 720px;
  margin: 0 auto var(--space-8);
}

/* Instant Search Input Box */
.features-search-box {
  max-width: 620px;
  margin: 0 auto var(--space-6);
}

.search-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  background: #ffffff;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-full);
  padding: 6px 16px 6px 20px;
  box-shadow: 0 8px 24px -4px rgba(0, 0, 0, 0.06);
  transition: all var(--transition-base);
}

.search-input-wrap:focus-within {
  border-color: var(--blue);
  box-shadow: 0 10px 28px -4px rgba(37, 99, 235, 0.2), 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.search-icon {
  color: var(--tx-dim);
  margin-right: 12px;
  flex-shrink: 0;
}

.search-input-wrap input {
  width: 100%;
  border: none;
  outline: none;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--tx);
  background: transparent;
}

.search-input-wrap input::placeholder {
  color: var(--tx-dim);
  font-weight: 400;
}

.clear-search-btn {
  background: var(--paper-2);
  border: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--tx-mute);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin-left: 8px;
  transition: all var(--transition-base);
}

.clear-search-btn:hover {
  background: var(--line);
  color: var(--tx);
}

/* Quick Hero Chips */
.hero-quick-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.quick-chip {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--tx-mute);
  background: var(--paper-2);
  border: 1px solid var(--line);
  padding: 4px 12px;
  border-radius: var(--radius-full);
}

/* ── Sticky Category Navigation Bar ── */
.features-tabs-wrapper {
  position: sticky;
  top: 68px;
  z-index: var(--z-sticky, 40);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
  padding: var(--space-4) 0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
}

.features-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

.features-tabs::-webkit-scrollbar {
  display: none;
}

.feature-tab {
  padding: 8px 18px;
  border-radius: var(--radius-full);
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--tx-mute);
  background: var(--paper-2);
  border: 1px solid var(--line);
  white-space: nowrap;
  transition: all var(--transition-base);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.feature-tab:hover {
  color: var(--blue);
  border-color: rgba(37, 99, 235, 0.3);
  background: #ffffff;
}

.feature-tab.active {
  background: var(--blue);
  color: #ffffff;
  border-color: var(--blue);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

/* ── Feature Category Section ── */
.feature-category {
  padding: var(--space-16) 0;
  border-bottom: 1px solid var(--line);
}

.feature-category:last-of-type {
  border-bottom: none;
}

.feature-category-header {
  margin-bottom: var(--space-10);
}

.cat-pill {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--blue);
  background: #eff6ff;
  border: 1px solid rgba(37, 99, 235, 0.2);
  padding: 3px 10px;
  border-radius: var(--radius-full);
  margin-bottom: var(--space-3);
}

.feature-category-header h2 {
  font-family: var(--disp);
  font-size: clamp(1.6rem, 2.4vw, 2.1rem);
  font-weight: 800;
  color: var(--tx);
  letter-spacing: -0.02em;
  margin-bottom: var(--space-2);
}

.feature-category-header p {
  font-size: 0.95rem;
  color: var(--tx-mute);
  max-width: 650px;
}

/* ── Features Grid & Cards ── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
}

.feature-item {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius-2xl);
  padding: var(--space-6);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.02);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  transition: all var(--transition-base);
  position: relative;
}

.feature-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 32px -8px rgba(37, 99, 235, 0.1);
  border-color: rgba(37, 99, 235, 0.35);
}

.feat-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.feature-item-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.feature-item-icon img {
  width: 20px;
  height: 20px;
  object-fit: contain;
  border-radius: 4px;
}

.icon-blue { background: rgba(37, 99, 235, 0.08); color: var(--blue); }
.icon-emerald { background: rgba(16, 185, 129, 0.08); color: #059669; }
.icon-amber { background: rgba(249, 115, 22, 0.08); color: #f97316; }
.icon-purple { background: rgba(124, 58, 237, 0.08); color: #7c3aed; }
.icon-white { background: #ffffff; border: 1px solid var(--line); }

.feat-chip {
  font-size: 0.68rem;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: var(--radius-full);
}

.chip-blue { background: #eff6ff; color: #1d4ed8; border: 1px solid rgba(37, 99, 235, 0.15); }
.chip-emerald { background: #ecfdf5; color: #059669; border: 1px solid rgba(16, 185, 129, 0.15); }
.chip-amber { background: #fff7ed; color: #c2410c; border: 1px solid rgba(249, 115, 22, 0.15); }
.chip-purple { background: #f5f3ff; color: #6d28d9; border: 1px solid rgba(124, 58, 237, 0.15); }

/* Integration Logos Strip in Feature Cards */
.feat-brand-badges {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 8px 10px;
  background: var(--paper-2);
  border: 1px solid var(--line-light);
  border-radius: var(--radius-md);
  margin-top: 2px;
}

.feat-brand-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ffffff;
  border: 1px solid var(--line);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--tx);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.feat-brand-pill img {
  width: 15px;
  height: 15px;
  object-fit: contain;
  border-radius: 2px;
}

/* Category 1 Hero Integration Strip */
.category-integration-strip {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: var(--space-8);
  padding: 12px 18px;
  background: #ffffff;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.02);
}

.category-strip-label {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--tx-mute);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-right: 6px;
}

.category-strip-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-full);
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--tx);
}

.category-strip-item img {
  width: 16px;
  height: 16px;
  object-fit: contain;
}

.feature-item h3 {
  font-family: var(--disp);
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--tx);
  line-height: 1.25;
}

.feature-item-bullets {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0;
  margin: 0;
}

.feature-item-bullets li {
  font-size: 0.84rem;
  color: var(--tx-mute);
  line-height: 1.5;
  position: relative;
  padding-left: 18px;
}

.feature-item-bullets li::before {
  content: '✓';
  position: absolute;
  left: 0;
  top: 0;
  color: var(--green-d);
  font-weight: 900;
  font-size: 0.78rem;
}

/* ── Empty State for Search ── */
.no-features-state {
  text-align: center;
  padding: var(--space-20) var(--space-4);
  background: var(--paper-2);
  border: 1.5px dashed var(--line);
  border-radius: var(--radius-2xl);
  margin: var(--space-12) 0;
}

.no-feat-icon {
  font-size: 2.5rem;
  margin-bottom: var(--space-4);
}

.no-features-state h3 {
  font-family: var(--disp);
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--tx);
  margin-bottom: var(--space-2);
}

.no-features-state p {
  font-size: 0.9rem;
  color: var(--tx-mute);
  max-width: 500px;
  margin: 0 auto var(--space-6);
}

/* ── Responsive Rules ── */
@media (max-width: 1024px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .features-hero {
    padding-top: 80px !important;
    padding-bottom: 20px !important;
  }
  .features-hero-badge {
    margin-bottom: 10px !important;
    padding: 4px 10px !important;
    font-size: 0.72rem !important;
  }
  .features-hero h1 {
    font-size: 1.85rem !important;
    line-height: 1.2 !important;
    margin-bottom: 10px !important;
  }
  .features-hero .subtitle {
    font-size: 0.88rem !important;
    line-height: 1.45 !important;
    margin-bottom: 16px !important;
  }
  .features-search-box {
    margin-bottom: 14px !important;
  }
  .search-input-wrap {
    padding: 4px 12px !important;
  }
  .search-input-wrap input {
    font-size: 0.84rem !important;
    padding: 6px 8px !important;
  }
  .features-tabs-wrapper {
    top: 60px !important;
    padding: 8px 0 !important;
    margin-bottom: 20px !important;
  }
  .features-tab-btn {
    padding: 5px 10px !important;
    font-size: 0.76rem !important;
    border-radius: 8px !important;
  }
  .category-section {
    margin-bottom: 28px !important;
  }
  .category-header {
    margin-bottom: 12px !important;
  }
  .category-title {
    font-size: 1.25rem !important;
  }
  .category-desc {
    font-size: 0.82rem !important;
  }
  .features-grid {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }
  .feature-item {
    padding: 14px 12px !important;
    border-radius: 12px !important;
    gap: 10px !important;
  }
  .feature-item h3 {
    font-size: 0.95rem !important;
  }
  .feature-item-bullets {
    gap: 5px !important;
  }
  .feature-item-bullets li {
    font-size: 0.8rem !important;
    line-height: 1.35 !important;
    padding-left: 16px !important;
  }
}
