/* ==========================================================================
   Features Page Styles - سمسار
   صفحة مميزات الأنظمة الشاملة بتصميم متوافق 100% مع مركز الدعم (/support)
   ========================================================================== */

/* ─── Hero Actions & Meta ─── */
.features-hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 26px;
  margin-bottom: 24px;
}

.features-stats-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 34px;
}

.features-stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(181, 166, 255, 0.16);
  color: #f4f2ff;
  font-size: 13.5px;
  font-weight: 600;
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}

.features-stat-pill b {
  color: #c084fc;
  font-weight: 800;
}

html[data-theme="light"] .features-stat-pill {
  background: rgba(255, 255, 255, 0.9) !important;
  border-color: rgba(135, 105, 225, 0.22) !important;
  color: #2e2640 !important;
  box-shadow: 0 4px 14px rgba(70, 45, 120, 0.06) !important;
}

html[data-theme="light"] .features-stat-pill b {
  color: #7c3aed !important;
}

/* ─── Toolbar: Tabs & Search ─── */
.features-toolbar {
  position: relative;
  z-index: 5;
  margin-bottom: 40px;
  padding: 14px 18px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(20, 18, 42, 0.88), rgba(12, 14, 28, 0.92));
  border: 1px solid rgba(181, 166, 255, 0.18);
  backdrop-filter: blur(20px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

html[data-theme="light"] .features-toolbar {
  background: rgba(255, 255, 255, 0.95) !important;
  border-color: rgba(135, 105, 225, 0.25) !important;
  box-shadow: 0 12px 34px rgba(70, 45, 120, 0.08) !important;
}

.features-toolbar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.features-tabs-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.features-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 12px;
  border: 1px solid rgba(181, 166, 255, 0.15);
  background: rgba(255, 255, 255, 0.03);
  color: #d1c5fc;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.features-tab-btn:hover {
  background: rgba(139, 92, 246, 0.14);
  border-color: rgba(163, 126, 243, 0.35);
  color: #fff;
  transform: translateY(-1px);
}

.features-tab-btn.is-active {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.35), rgba(88, 101, 242, 0.28));
  border-color: rgba(168, 120, 255, 0.6);
  color: #fff;
  box-shadow: 0 4px 18px rgba(139, 92, 246, 0.25);
}

.features-tab-btn .tab-count {
  display: inline-grid;
  place-items: center;
  padding: 2px 8px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.1);
  color: #e5defe;
}

.features-tab-btn.is-active .tab-count {
  background: #a855f7;
  color: #fff;
}

html[data-theme="light"] .features-tab-btn {
  background: #f7f4fe !important;
  border-color: #ddd4f7 !important;
  color: #5539a8 !important;
}

html[data-theme="light"] .features-tab-btn:hover {
  background: #ede6fd !important;
  border-color: #b59bf7 !important;
  color: #3b1d91 !important;
}

html[data-theme="light"] .features-tab-btn.is-active {
  background: linear-gradient(135deg, #7c3aed, #6366f1) !important;
  border-color: transparent !important;
  color: #ffffff !important;
  box-shadow: 0 4px 16px rgba(124, 58, 237, 0.28) !important;
}

html[data-theme="light"] .features-tab-btn .tab-count {
  background: rgba(124, 58, 237, 0.1) !important;
  color: #6d28d9 !important;
  border: 1px solid rgba(124, 58, 237, 0.18) !important;
}

html[data-theme="light"] .features-tab-btn:hover .tab-count {
  background: rgba(124, 58, 237, 0.16) !important;
  color: #5b21b6 !important;
}

html[data-theme="light"] .features-tab-btn.is-active .tab-count {
  background: rgba(255, 255, 255, 0.25) !important;
  color: #ffffff !important;
  border: none !important;
}

/* ─── Search Box ─── */
.features-search-box {
  position: relative;
  min-width: 280px;
  flex: 1;
  max-width: 380px;
}

.features-search-box svg {
  position: absolute;
  top: 50%;
  right: 14px;
  transform: translateY(-50%);
  width: 17px;
  height: 17px;
  color: #a78bfa;
  pointer-events: none;
}

.features-search-input {
  width: 100%;
  padding: 10px 42px 10px 16px;
  border-radius: 12px;
  border: 1px solid rgba(181, 166, 255, 0.18);
  background: rgba(10, 12, 26, 0.65);
  color: #fff;
  font-family: inherit;
  font-size: 13.5px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.features-search-input:focus {
  background: rgba(14, 16, 34, 0.9);
  border-color: rgba(168, 120, 255, 0.6);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.18);
}

.features-search-input::placeholder {
  color: #8b80a8;
}

html[data-theme="light"] .features-search-input {
  background: #fbf9ff !important;
  border-color: #ddd4f7 !important;
  color: #231b34 !important;
}

html[data-theme="light"] .features-search-input:focus {
  background: #fff !important;
  border-color: #7c3aed !important;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.12) !important;
}

html[data-theme="light"] .features-search-box svg {
  color: #6d28d9 !important;
}

.features-status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 12px;
  color: var(--muted);
}

html[data-theme="light"] .features-status-bar {
  border-top-color: rgba(135, 105, 225, 0.14) !important;
  color: #6b6380 !important;
}

.features-status-bar strong {
  color: #c084fc;
}

html[data-theme="light"] .features-status-bar strong {
  color: #7c3aed !important;
}

/* ─── Category Group & Banner ─── */
.category-group {
  margin-bottom: 50px;
  scroll-margin-top: 160px;
  transition: opacity 0.25s ease;
}

.category-group.is-hidden {
  display: none !important;
}

.category-header-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  padding: 22px 28px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(26, 22, 54, 0.85) 0%, rgba(14, 16, 34, 0.9) 100%);
  border: 1px solid rgba(181, 166, 255, 0.2);
  margin-bottom: 24px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.22);
}

html[data-theme="light"] .category-header-banner {
  background: linear-gradient(135deg, #fbf9ff, #f3effe) !important;
  border-color: rgba(135, 105, 225, 0.25) !important;
  box-shadow: 0 8px 24px rgba(70, 45, 120, 0.05) !important;
}

.category-header-info {
  display: flex;
  align-items: center;
  gap: 16px;
}

.category-header-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: rgba(139, 92, 246, 0.22);
  border: 1px solid rgba(163, 126, 243, 0.35);
  color: #c4b5fd;
  flex-shrink: 0;
}

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

html[data-theme="light"] .category-header-icon {
  background: #ede6fd !important;
  border-color: rgba(135, 105, 225, 0.3) !important;
  color: #6d28d9 !important;
}

.category-header-title h2 {
  font-size: 22px;
  font-weight: 800;
  margin: 0 0 4px;
  color: #f4f2ff;
  display: flex;
  align-items: center;
  gap: 10px;
}

html[data-theme="light"] .category-header-title h2 {
  color: #231b34 !important;
}

.category-header-title .category-count-badge {
  font-size: 11.5px;
  padding: 3px 9px;
  border-radius: 99px;
  background: rgba(139, 92, 246, 0.22);
  border: 1px solid rgba(163, 126, 243, 0.35);
  color: #ded9f7;
}

html[data-theme="light"] .category-header-title .category-count-badge {
  background: #ede6fd !important;
  border-color: #d1c5fc !important;
  color: #5b34bc !important;
}

.category-header-title p {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
}

html[data-theme="light"] .category-header-title p {
  color: #5d5570 !important;
}

.category-guide-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  color: #d8c6ff;
  background: rgba(139, 92, 246, 0.16);
  border: 1px solid rgba(163, 126, 243, 0.28);
  text-decoration: none;
  transition: all 0.2s;
}

.category-guide-link:hover {
  background: rgba(139, 92, 246, 0.28);
  color: #fff;
  transform: translateY(-1px);
}

html[data-theme="light"] .category-guide-link {
  background: #ede6fd !important;
  border-color: #d1c5fc !important;
  color: #5b34bc !important;
}

html[data-theme="light"] .category-guide-link:hover {
  background: #e2d6fc !important;
  color: #431f9e !important;
}

/* ─── Support Grid Adaptation for Features ─── */
.support-sub-card.feature-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

.support-sub-card.feature-card.is-hidden {
  display: none !important;
}

/* Exclusive Innovation Highlight Box */
.exclusive-callout {
  position: relative;
  margin: 14px 0 16px;
  padding: 12px 14px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.18) 0%, rgba(88, 101, 242, 0.14) 100%);
  border: 1px solid rgba(192, 132, 252, 0.38);
  box-shadow: 0 4px 16px rgba(168, 85, 247, 0.12);
}

html[data-theme="light"] .exclusive-callout {
  background: linear-gradient(135deg, #f6f0ff 0%, #eeeffe 100%) !important;
  border-color: rgba(135, 105, 225, 0.35) !important;
  box-shadow: 0 4px 14px rgba(124, 58, 237, 0.08) !important;
}

.exclusive-callout-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}

.exclusive-callout-spark {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 6px;
  background: #a855f7;
  color: #fff;
  font-size: 11px;
  font-weight: 900;
}

.exclusive-callout-header strong {
  font-size: 12px;
  font-weight: 800;
  color: #e9d5ff;
  letter-spacing: 0.2px;
}

html[data-theme="light"] .exclusive-callout-header strong {
  color: #6b21a8 !important;
}

.exclusive-callout-text {
  font-size: 12.8px;
  line-height: 1.7;
  color: #f3e8ff;
  margin: 0;
  font-weight: 500;
}

html[data-theme="light"] .exclusive-callout-text {
  color: #3b2756 !important;
}

/* Card Action Buttons in Footer */
.support-sub-card {
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
  height: 100% !important;
}

.sub-card-actions {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 8px !important;
  margin-top: auto !important;
  padding-top: 16px !important;
  border-top: 1px solid rgba(255, 255, 255, 0.07) !important;
}

html[data-theme="light"] .sub-card-actions {
  border-top-color: rgba(135, 105, 225, 0.15) !important;
}

.sub-card-actions a.sub-card-btn-guide,
.sub-card-actions button.sub-card-btn-dash,
.sub-card-btn-guide,
.sub-card-btn-dash {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  height: 36px !important;
  min-height: 36px !important;
  max-height: 36px !important;
  padding: 0 14px !important;
  margin: 0 !important;
  border-radius: 9px !important;
  font-family: inherit !important;
  font-size: 12.5px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  box-sizing: border-box !important;
  vertical-align: middle !important;
  text-decoration: none !important;
  cursor: pointer !important;
  outline: none !important;
  transition: all 0.2s ease !important;
}

.sub-card-actions a.sub-card-btn-guide span,
.sub-card-actions button.sub-card-btn-dash span,
.sub-card-btn-guide span,
.sub-card-btn-dash span {
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1 !important;
  display: inline-flex !important;
  align-items: center !important;
}

.sub-card-btn-guide {
  background: rgba(139, 92, 246, 0.14) !important;
  border: 1px solid rgba(163, 126, 243, 0.25) !important;
  color: #ded9f7 !important;
}

.sub-card-btn-guide:hover {
  background: rgba(139, 92, 246, 0.28) !important;
  border-color: #a78bfa !important;
  color: #fff !important;
  transform: translateY(-1px);
}

html[data-theme="light"] .sub-card-btn-guide {
  background: #ede6fd !important;
  border-color: #d1c5fc !important;
  color: #5b34bc !important;
}

html[data-theme="light"] .sub-card-btn-guide:hover {
  background: #e2d6fc !important;
  color: #431f9e !important;
}

.sub-card-btn-dash {
  background: transparent !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  color: var(--muted) !important;
}

.sub-card-btn-dash:hover {
  background: rgba(255, 255, 255, 0.06) !important;
  border-color: rgba(181, 166, 255, 0.3) !important;
  color: #fff !important;
  transform: translateY(-1px);
}

html[data-theme="light"] .sub-card-btn-dash {
  border-color: #d8cde7 !important;
  color: #554d68 !important;
}

html[data-theme="light"] .sub-card-btn-dash:hover {
  background: #f5f1fb !important;
  border-color: #b59bf7 !important;
  color: #231b34 !important;
}

/* Feature Innovation Badges */
.badge-exclusive {
  background: rgba(236, 72, 153, 0.16) !important;
  border: 1px solid rgba(244, 114, 182, 0.35) !important;
  color: #fbcfe8 !important;
}

html[data-theme="light"] .badge-exclusive {
  background: #fdf2f8 !important;
  border-color: #fbcfe8 !important;
  color: #be185d !important;
}

.badge-admin {
  background: rgba(139, 92, 246, 0.16) !important;
  border: 1px solid rgba(163, 126, 243, 0.3) !important;
  color: #e0d4fc !important;
}

html[data-theme="light"] .badge-admin {
  background: #ede6fd !important;
  border-color: #ddd4f7 !important;
  color: #6d28d9 !important;
}

.badge-security {
  background: rgba(16, 185, 129, 0.14) !important;
  border: 1px solid rgba(16, 185, 129, 0.3) !important;
  color: #a7f3d0 !important;
}

html[data-theme="light"] .badge-security {
  background: #ecfdf5 !important;
  border-color: #a7f3d0 !important;
  color: #047857 !important;
}

.badge-public {
  background: rgba(59, 130, 246, 0.14) !important;
  border: 1px solid rgba(96, 165, 250, 0.3) !important;
  color: #bfdbfe !important;
}

html[data-theme="light"] .badge-public {
  background: #eff6ff !important;
  border-color: #bfdbfe !important;
  color: #1d4ed8 !important;
}

/* Card list styling inside sub-cards */
.feature-perks-list {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.feature-perks-list li {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 13.2px;
  line-height: 1.65;
  color: #ded9f7;
}

html[data-theme="light"] .feature-perks-list li {
  color: #3b334e !important;
}

.feature-perks-list .perk-check {
  margin-top: 1px;
}

/* ─── Responsive Adjustments ─── */
@media (max-width: 900px) {
  .features-toolbar-row {
    flex-direction: column;
    align-items: stretch;
  }
  .features-search-box {
    max-width: 100%;
    min-width: 100%;
  }
}

@media (max-width: 650px) {
  .category-header-banner {
    padding: 18px 16px;
  }
  .category-header-info {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .sub-card-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .sub-card-btn-guide,
  .sub-card-btn-dash {
    justify-content: center;
    width: 100%;
  }
}

/* ─── Desktop Width & Responsive Layout Overrides ─── */
main.support-page.container {
  width: min(1280px, calc(100% - 48px));
  max-width: 1280px;
  margin-inline: auto;
}

/* Ensure 3-column horizontal desktop display for cards */
.support-grid {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 22px !important;
}

/* Tablet & medium screens: 2 columns instead of collapsing prematurely to 1 */
@media (max-width: 1100px) and (min-width: 681px) {
  .support-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 18px !important;
  }
}

/* Mobile only: single column */
@media (max-width: 680px) {
  .support-grid {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }
  main.support-page.container {
    width: calc(100% - 32px);
  }
}

/* Footer layout safety */
.footer-main {
  display: grid !important;
  grid-template-columns: 2fr repeat(3, 1fr) !important;
  gap: 50px !important;
  padding-bottom: 58px !important;
}

@media (max-width: 780px) {
  .footer-main {
    grid-template-columns: 1fr 1fr !important;
    gap: 35px 25px !important;
  }
  .footer-brand {
    grid-column: 1 / -1 !important;
  }
}

@media (max-width: 480px) {
  .footer-main {
    grid-template-columns: 1fr !important;
    gap: 28px !important;
  }
}

/* ─── Bottom CTA Card Styling (Dark & Light) ─── */
.features-cta-card {
  margin-top: 40px !important;
  text-align: center !important;
  padding: 46px 32px !important;
}

.features-cta-inner {
  max-width: 680px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.features-cta-badge {
  margin-bottom: 16px;
  display: inline-flex;
}

.features-cta-title {
  font-size: clamp(24px, 3.2vw, 34px);
  margin: 12px 0 16px;
  color: #f4f2ff;
  font-weight: 900;
  line-height: 1.35;
}

.features-cta-title strong {
  background: linear-gradient(135deg, #c084fc, #a855f7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

html[data-theme="light"] .features-cta-title {
  color: #17132e !important;
}

html[data-theme="light"] .features-cta-title strong {
  background: linear-gradient(135deg, #7c3aed, #6d28d9) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
}

.features-cta-desc {
  color: #b3b0cd;
  font-size: 16px;
  line-height: 1.8;
  margin: 0 auto 30px;
  max-width: 600px;
}

html[data-theme="light"] .features-cta-desc {
  color: #4b4669 !important;
}

.features-cta-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

.features-cta-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 13px 28px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 800;
  font-family: inherit;
  text-decoration: none;
  background: linear-gradient(135deg, #792df5 0%, #9d4bf6 100%);
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 10px 28px rgba(121, 45, 245, 0.4);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.features-cta-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(121, 45, 245, 0.55);
  filter: brightness(1.08);
}

.features-cta-btn-primary:active {
  transform: scale(0.98);
}

.features-cta-btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 13px 26px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  background: rgba(139, 92, 246, 0.12);
  border: 1px solid rgba(163, 126, 243, 0.3);
  color: #e5defe;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.features-cta-btn-secondary:hover {
  background: rgba(139, 92, 246, 0.22);
  border-color: #a78bfa;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(139, 92, 246, 0.18);
}

.features-cta-btn-secondary:active {
  transform: scale(0.98);
}

html[data-theme="light"] .features-cta-btn-secondary {
  background: #ffffff !important;
  color: #482f8f !important;
  border-color: #d0c2e8 !important;
  box-shadow: 0 4px 14px rgba(70, 45, 120, 0.08) !important;
}

html[data-theme="light"] .features-cta-btn-secondary:hover {
  background: #f7f4fe !important;
  border-color: #9f75ec !important;
  box-shadow: 0 6px 18px rgba(70, 45, 120, 0.14) !important;
}

html[data-theme="light"] .features-cta-card .support-card-glow {
  opacity: 0.22;
}

