/* ==========================================================================
   IPTV RESELLER PANEL - Portal & Research Library Extensions
   Research library, widgets, reviews and keyword-cloud components
   ========================================================================== */

:root {
  --kf-bg: #080b11;
  --kf-bg-2: #0d121d;
  --kf-panel: rgba(18, 24, 38, 0.7);
  --kf-panel-solid: #121826;
  --kf-line: rgba(255, 255, 255, 0.08);
  --kf-text: #eef2f7;
  --kf-muted: #aab3c2;
  --kf-cyan: #00e599;
  --kf-blue: #00b4d8;
  --kf-gold: #fbbf24;
  --kf-green: #00e599;
  --kf-gradient: linear-gradient(135deg, #8b5cf6 0%, #00b4d8 48%, #00e599 100%);
  --kf-radius: 20px;
}

/* Horizontal Knowledge Navigation */
.knowledge-nav {
  background: rgba(13, 18, 29, 0.92);
  border-bottom: 1px solid var(--kf-line);
  position: sticky;
  top: var(--header-h, 72px);
  z-index: 150;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none;
}
.knowledge-nav::-webkit-scrollbar { display: none; }

.knowledge-nav__inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0.6rem var(--container-padding);
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.knowledge-nav__inner a {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--kf-muted);
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
  transition: all var(--transition-fast);
}

.knowledge-nav__inner a:hover,
.knowledge-nav__inner a.active {
  color: var(--kf-cyan);
  background: rgba(94, 234, 212, 0.1);
}

.knowledge-nav__inner a i {
  font-size: 0.8rem;
}

/* Research Library Section */
.kf-section {
  padding: 5rem 0;
}

.kf-section--tint {
  background: linear-gradient(180deg, var(--kf-bg-2) 0%, var(--bg-primary) 100%);
  border-top: 1px solid var(--kf-line);
  border-bottom: 1px solid var(--kf-line);
}

.kf-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 1rem;
  background: rgba(94, 234, 212, 0.12);
  color: var(--kf-cyan);
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 1rem;
  border: 1px solid rgba(94, 234, 212, 0.25);
}

.kf-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr));
  gap: 1.5rem;
  margin-top: 2.5rem;
}

.kf-card {
  background: var(--kf-panel);
  border: 1px solid var(--kf-line);
  border-radius: var(--kf-radius);
  padding: 1.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: all var(--transition-base);
}

.kf-card:hover {
  border-color: var(--kf-cyan);
  transform: translateY(-4px);
  box-shadow: 0 14px 40px rgba(0, 12, 16, 0.6);
}

.kf-card__icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(94, 234, 212, 0.12);
  color: var(--kf-cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.1rem;
}

.kf-card h3 {
  font-size: 1.2rem;
  color: #fff;
}

.kf-card p {
  font-size: 0.85rem;
  color: var(--kf-muted);
  line-height: 1.6;
}

.kf-card__link {
  margin-top: auto;
  font-size: 0.85rem;
  color: var(--kf-cyan);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

/* Directory Brand Mark Cards */
.kf-directory-card {
  position: relative;
}

.kf-brand-mark {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 1.1rem;
  color: #fff;
  background: var(--brand-gradient, linear-gradient(135deg, #8b5cf6, #00e599));
}

.kf-directory-card__domain {
  font-size: 0.8rem;
  color: var(--kf-cyan);
  font-family: monospace;
}

.kf-directory-card__actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}

.kf-btn {
  padding: 0.5rem 1rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid var(--kf-line);
  color: var(--kf-text);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.kf-btn--primary {
  background: var(--kf-cyan);
  color: #04101f;
  border: none;
}

/* Floating WhatsApp Quick-Connect Desk */
.floating-quick-connect {
  position: fixed;
  bottom: max(24px, env(safe-area-inset-bottom));
  right: max(24px, env(safe-area-inset-right));
  z-index: 1500;
  animation: floatBounce 3s ease-in-out infinite;
}

.quick-connect-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #25D366;
  color: #fff !important;
  padding: 12px 20px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.9rem;
  box-shadow: 0 10px 25px rgba(37, 211, 102, 0.4), 0 0 20px rgba(37, 211, 102, 0.2);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
}

.quick-connect-btn i {
  font-size: 1.4rem;
}

.quick-connect-btn:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 14px 30px rgba(37, 211, 102, 0.5), 0 0 30px rgba(37, 211, 102, 0.3);
  color: #fff !important;
}

.quick-connect-text strong {
  display: inline-block;
  background: rgba(255, 255, 255, 0.25);
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 0.75rem;
  margin-left: 4px;
  letter-spacing: 0.5px;
}

@keyframes floatBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

@media (max-width: 640px) {
  .floating-quick-connect {
    bottom: 16px;
    right: 16px;
  }
  .quick-connect-text {
    display: none;
  }
  .quick-connect-btn {
    padding: 14px;
    border-radius: 50%;
  }
}

/* ==========================================================================
   INTERACTIVE ENGAGEMENT WIDGETS (HIGH-DWELL RETENTION ENGINE)
   ========================================================================== */
.interactive-widget-box {
  background: rgba(18, 24, 38, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: clamp(1.25rem, 3vw, 2.25rem);
  margin: 2.5rem 0;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 8px 32px 0 rgba(0, 229, 153, 0.08);
  position: relative;
  overflow: hidden;
}

.interactive-widget-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #00e599, #00b4d8, #8b5cf6);
}

.widget-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.widget-title {
  font-size: 1.4rem;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0;
}

.widget-badge {
  background: rgba(0, 229, 153, 0.15);
  color: var(--kf-cyan, #00e599);
  border: 1px solid rgba(0, 229, 153, 0.3);
  padding: 4px 12px;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}

/* 1. Bandwidth & 4K Buffer Tester */
.bandwidth-slider-container {
  margin: 1.5rem 0;
}

.bandwidth-slider {
  width: 100%;
  height: 8px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.1);
  outline: none;
  accent-color: #00e599;
  cursor: pointer;
}

.bandwidth-presets {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.preset-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #a0aec0;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s;
}

.preset-btn:hover, .preset-btn.active {
  background: rgba(0, 229, 153, 0.2);
  border-color: #00e599;
  color: #fff;
}

.bandwidth-results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.result-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 1.25rem;
  text-align: center;
}

.result-card strong {
  display: block;
  font-size: 1.5rem;
  color: #00e599;
  margin-bottom: 0.25rem;
}

.result-card span {
  font-size: 0.8rem;
  color: #a0aec0;
}

/* 2. Reseller Margin Simulator */
.reseller-sim-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

.sim-metric-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 1.25rem;
  text-align: center;
}

.sim-metric-card.highlight {
  border-color: #8b5cf6;
  background: rgba(139, 92, 246, 0.1);
}

.sim-metric-val {
  font-size: 1.6rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 0.25rem;
}

.sim-metric-val.green {
  color: #00e599;
}

.sim-metric-label {
  font-size: 0.8rem;
  color: #a0aec0;
}

/* 3. Universal Channel Lookup */
.channel-search-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.channel-search-input {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 0.85rem 1.25rem;
  color: #fff;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s;
}

.channel-search-input:focus {
  border-color: #00e599;
}

.channel-tags-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.channel-tag-chip {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #cbd5e0;
  font-size: 0.8rem;
  padding: 4px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.channel-tag-chip:hover {
  background: rgba(0, 229, 153, 0.15);
  border-color: #00e599;
  color: #fff;
}

.channel-match-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  margin-top: 0.75rem;
}

/* ==========================================================================
   CONTEXTUAL TOPICAL SILO MESH (SPIDER WEB INTERNAL LINKING)
   ========================================================================== */
.silo-mesh-container {
  margin-top: 3.5rem;
  padding-top: 2.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.silo-mesh-title {
  font-size: 1.3rem;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.silo-mesh-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  gap: 1.5rem;
}

.silo-mesh-column {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  padding: 1.5rem;
}

.silo-mesh-column .h4, .silo-mesh-column h4 {
  font-size: 1rem;
  color: #00e599;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.silo-links-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.silo-links-list a {
  color: #a0aec0;
  text-decoration: none;
  font-size: 0.85rem;
  transition: color 0.2s, transform 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.silo-links-list a:hover {
  color: #fff;
  transform: translateX(3px);
}

.silo-links-list a i {
  font-size: 0.75rem;
  color: #8b5cf6;
}

/* ==========================================================================
   OFFICIAL STANDARDS & AUTHORITATIVE CITATIONS (ZERO COMPETITORS)
   ========================================================================== */
.official-references-box {
  background: rgba(4, 20, 26, 0.85);
  border: 1px solid rgba(94, 234, 212, 0.25);
  border-radius: 18px;
  padding: 2rem;
  margin: 2.5rem 0;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.official-references-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.official-references-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.official-badge-verified {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(94, 234, 212, 0.15);
  border: 1px solid rgba(94, 234, 212, 0.4);
  color: #5eead4;
  padding: 0.35rem 0.85rem;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.official-references-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  gap: 1.25rem;
}

.official-citation-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  padding: 1.25rem;
  transition: all 0.25s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.official-citation-card:hover {
  background: rgba(94, 234, 212, 0.05);
  border-color: rgba(94, 234, 212, 0.4);
  transform: translateY(-2px);
}

.citation-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.citation-cat {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #f7c96b;
  letter-spacing: 0.5px;
}

.citation-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.4rem;
}

.citation-desc {
  font-size: 0.82rem;
  color: #b2cbc9;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.citation-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: #5eead4;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transition: gap 0.2s;
}

.citation-link:hover {
  gap: 0.6rem;
  text-decoration: underline;
}

/* Technical Specification Table */
.tech-spec-table-container {
  overflow-x: auto;
  margin: 2rem 0;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(2, 9, 12, 0.6);
}

.tech-spec-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.9rem;
}

.tech-spec-table th {
  background: rgba(6, 21, 26, 0.95);
  color: #5eead4;
  font-weight: 700;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  text-transform: uppercase;
  font-size: 0.78rem;
  letter-spacing: 0.5px;
}

.tech-spec-table td {
  padding: 0.9rem 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: #e2e8f0;
}

.tech-spec-table tr:hover td {
  background: rgba(94, 234, 212, 0.03);
}

.tech-spec-table code {
  background: rgba(0, 0, 0, 0.4);
  color: #f7c96b;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  font-size: 0.82rem;
  font-family: monospace;
}

/* Simulated Laboratory Packet Audit Box */
.lab-audit-log {
  background: #020609;
  border: 1px solid rgba(94, 234, 212, 0.2);
  border-radius: 12px;
  padding: 1.25rem;
  font-family: monospace;
  font-size: 0.85rem;
  color: #5eead4;
  overflow-x: auto;
  margin: 1.5rem 0;
  line-height: 1.6;
}

.lab-audit-log .log-dim {
  color: #64748b;
}

.lab-audit-log .log-success {
  color: #34d399;
}

.lab-audit-log .log-highlight {
  color: #f7c96b;
}




/* ==========================================================================
   Verified Reviews & Badges Grid
   ========================================================================== */
.verified-reviews-block {
  margin: 3.5rem 0;
}
.reviews-header {
  text-align: center;
  margin-bottom: 2.5rem;
}
.reviews-aggregate-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 1.4rem;
  border-radius: 999px;
  background: rgba(251, 191, 36, 0.08);
  border: 1px solid rgba(251, 191, 36, 0.3);
  color: var(--text-primary, #fff);
  font-size: 0.9rem;
  margin-top: 1rem;
}
.reviews-aggregate-pill .stars-row {
  color: #fbbf24;
  font-size: 0.95rem;
}
.reviews-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
  gap: 1.5rem;
}
.review-card {
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-radius: 16px;
  transition: transform 0.2s, box-shadow 0.2s;
}
.review-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.3);
}
.review-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.reviewer-profile {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.reviewer-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent, #00e599), var(--secondary, #38bdf8));
  color: #06090f;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
}
.reviewer-info h4 {
  font-size: 1rem;
  margin: 0;
  color: #fff;
}
.reviewer-info .reviewer-role {
  font-size: 0.8rem;
  color: var(--text-secondary, #94a3b8);
}
.badge-verified {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.35);
  color: #4ade80;
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
}
.badge-verified i {
  color: #22c55e;
}
.review-rating-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.85rem;
}
.review-stars {
  color: #fbbf24;
  font-size: 0.9rem;
  display: flex;
  gap: 0.2rem;
}
.review-date {
  font-size: 0.78rem;
  color: var(--text-secondary, #64748b);
}
.review-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.65rem;
  line-height: 1.4;
}
.review-comment {
  font-size: 0.92rem;
  color: var(--text-secondary, #cbd5e1);
  line-height: 1.65;
  margin-bottom: 1rem;
}
.review-location-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  color: var(--text-secondary, #94a3b8);
}

/* ==========================================================================
   Semantic Keywords Cloud Section
   ========================================================================== */
.semantic-keywords-cloud {
  margin: 3.5rem 0 1.5rem;
}
.keywords-cloud-inner {
  padding: 2rem;
  border-radius: 18px;
}
.keywords-cloud-header {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.4rem;
}
.keywords-cloud-header h3 {
  font-size: 1.15rem;
  color: #fff;
  margin: 0;
}
.keywords-cloud-sub {
  font-size: 0.88rem;
  margin-bottom: 1.25rem;
}
.keywords-tags-flex {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}
.keyword-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.85rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
  font-size: 0.82rem;
  font-weight: 500;
  transition: all 0.2s;
}
.keyword-tag:hover {
  background: rgba(0, 229, 153, 0.1);
  border-color: rgba(0, 229, 153, 0.3);
  color: #fff;
}
.keyword-tag i {
  color: var(--accent, #00e599);
  font-size: 0.75rem;
}
