/* هيدر مضغوط: كل الأزرار ظاهرة بدون فجوة فاضية */

.hub-header-bar {
  display: none !important;
}

body.homepage .top-nav .container.inner,
body.homepage .top-nav .inner {
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 8px !important;
  max-width: none !important;
  width: 100% !important;
  min-height: 56px !important;
  padding: 6px clamp(12px, 1.6vw, 28px) !important;
  box-sizing: border-box !important;
}

body.homepage .nav-main {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  flex: 0 1 auto !important;
  min-width: 0 !important;
  max-width: calc(100% - 300px) !important;
}

body.homepage .nav-main > .brand {
  flex: 0 0 auto !important;
}

body.homepage .nav-main > .nav-links {
  display: flex !important;
  align-items: center !important;
  flex-wrap: nowrap !important;
  flex: 0 1 auto !important;
  min-width: 0 !important;
  justify-content: flex-start !important;
  gap: 2px !important;
  overflow-x: auto !important;
  scrollbar-width: none !important;
}

body.homepage .nav-main > .nav-links::-webkit-scrollbar {
  display: none !important;
}

body.homepage .nav-links a {
  flex: 0 0 auto !important;
  padding: 5px 8px !important;
  font-size: 12.5px !important;
  font-weight: 800 !important;
  white-space: nowrap !important;
}

/* الاختصارات جوه صف الروابط — صف واحد */
.hub-header-actions {
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  flex: 0 0 auto !important;
  flex-wrap: nowrap !important;
  overflow: visible !important;
  max-width: none !important;
  margin: 0 0 0 4px !important;
  padding: 0 0 0 6px !important;
  border-inline-start: 1px solid rgba(15, 23, 42, 0.12);
}

.hub-header-actions .hub-hbtn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 4px !important;
  flex: 0 0 auto !important;
  min-height: 28px !important;
  padding: 4px 8px !important;
  border-radius: 999px !important;
  font-family: 'Cairo', 'Tajawal', sans-serif !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  text-decoration: none !important;
  white-space: nowrap !important;
  border: 1px solid transparent !important;
}

.hub-header-actions .hub-hbtn i {
  font-size: 10px !important;
}

.hub-header-actions .hub-hbtn--red,
.hub-header-actions .hub-hbtn--packages,
.hub-header-actions .hub-hbtn--quality,
.hub-header-actions .hub-hbtn--trial {
  background: linear-gradient(135deg, #b10011, #7a000c) !important;
  color: #fff !important;
  box-shadow: 0 6px 14px rgba(120, 0, 14, 0.22) !important;
}

.hub-header-actions .hub-hbtn--rent {
  background: linear-gradient(135deg, #0ea5e9, #2563eb 55%, #4f46e5) !important;
  color: #fff !important;
  font-weight: 900 !important;
  border: 1px solid rgba(255, 255, 255, 0.35) !important;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.35) !important;
}

.hub-header-actions .hub-hbtn--rent:hover,
.hub-header-actions .hub-hbtn--rent:focus-visible {
  filter: brightness(1.08);
}

.hub-header-actions .hub-hbtn--mine {
  background: linear-gradient(135deg, #0f766e, #115e59) !important;
  color: #fff !important;
  font-weight: 900 !important;
  box-shadow: 0 8px 18px rgba(15, 118, 110, 0.28) !important;
}

.hub-header-actions .hub-hbtn.is-active {
  outline: 2px solid rgba(15, 23, 42, 0.16);
  outline-offset: 1px;
}

body.homepage .auth-actions {
  display: inline-flex !important;
  align-items: center !important;
  flex: 0 0 auto !important;
  flex-wrap: nowrap !important;
  gap: 6px !important;
  overflow: visible !important;
  margin: 0 !important;
  padding: 0 !important;
  padding-inline-start: 6px !important;
  border-inline-start: 1px solid rgba(15, 23, 42, 0.1);
  margin-inline-start: auto !important;
}

body.homepage .auth-btn {
  padding: 6px 12px !important;
  min-height: 32px !important;
  font-size: 12.5px !important;
  margin: 0 !important;
  white-space: nowrap !important;
}

body.homepage .hero-sidebar-item.hub-sidebar-chat,
body.homepage .hero-sidebar-item.hub-sidebar-chat .hero-sidebar-label {
  color: #fbbf24 !important;
  font-weight: 800 !important;
}

body.homepage .hero-sidebar-item.hub-sidebar-chat {
  border-color: rgba(251, 191, 36, 0.45) !important;
  background: rgba(20, 10, 0, 0.55) !important;
}

body.homepage .hero-sidebar-item.hub-sidebar-chat:hover,
body.homepage .hero-sidebar-item.hub-sidebar-chat:focus-visible {
  background: linear-gradient(135deg, #f59e0b, #d97706) !important;
  color: #111 !important;
  border-color: transparent !important;
}

/* ===== صفحات داخلية — لغة تشغيل هوب (وضوح · إيقاع · هوية) ===== */
.hub-feature-page {
  padding: 20px 0 64px;
}

.hub-feature-hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(120% 80% at 100% 0%, rgba(215, 0, 0, 0.38), transparent 55%),
    radial-gradient(90% 70% at 0% 100%, rgba(80, 0, 20, 0.55), transparent 50%),
    linear-gradient(128deg, #0c0003 0%, #230009 42%, #500014 100%);
  color: #fff;
  border-radius: 26px;
  padding: clamp(28px, 4vw, 44px) clamp(20px, 3vw, 36px);
  margin-bottom: 22px;
  box-shadow: 0 28px 70px rgba(60, 0, 14, 0.38);
}

.hub-feature-hero::after {
  content: '';
  position: absolute;
  inset: auto -10% -40% 40%;
  height: 70%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.08), transparent 65%);
  pointer-events: none;
}

/* خلفية غامقة → كتابة فاتحة (يتغلب على body.homepage h1/p الغامقة) */
body.homepage .hub-feature-hero,
body.homepage .hub-feature-hero h1,
body.homepage .hub-feature-hero h2,
body.homepage .hub-feature-hero h3,
body.homepage .hub-feature-hero h4,
body.homepage .hub-feature-closing,
body.homepage .hub-feature-closing h1,
body.homepage .hub-feature-closing h2,
body.homepage .hub-feature-closing h3,
body.homepage .hub-learn-closing,
body.homepage .hub-learn-closing h1,
body.homepage .hub-learn-closing h2,
body.homepage .hub-learn-closing h3,
body.homepage .sc-hero,
body.homepage .sc-hero h1,
body.homepage .sc-hero h2,
body.homepage .sc-hero h3 {
  color: #ffffff !important;
}

body.homepage .hub-feature-hero p,
body.homepage .hub-feature-hero li,
body.homepage .hub-feature-hero small,
body.homepage .hub-feature-closing p,
body.homepage .hub-feature-closing li,
body.homepage .hub-learn-closing p,
body.homepage .hub-learn-closing li,
body.homepage .sc-hero p,
body.homepage .sc-hero .sc-lead,
body.homepage .sc-hero .sc-kicker {
  color: rgba(255, 245, 247, 0.96) !important;
}

body.homepage .hub-feature-hero .hub-feature-kicker,
body.homepage .hub-feature-hero .hub-learn-kicker,
body.homepage .hub-feature-closing .hub-feature-kicker,
body.homepage .hub-learn-closing .hub-learn-kicker {
  color: #ffe8ec !important;
}

body.homepage .hub-feature-hero .hub-feature-purpose,
body.homepage .hub-feature-hero .hub-feature-purpose strong,
body.homepage .hub-feature-hero .hub-feature-purpose p {
  color: #ffffff !important;
}

body.homepage .hub-feature-hero .hub-feature-purpose p {
  color: rgba(255, 230, 234, 0.92) !important;
}

.hub-feature-kicker,
.hub-learn-kicker {
  position: relative;
  z-index: 1;
  margin: 0 0 12px !important;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  font-size: 12px !important;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: rgba(255, 214, 220, 0.95) !important;
  max-width: max-content;
}

.hub-feature-hero h1 {
  position: relative;
  z-index: 1;
  margin: 0 0 12px;
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 900;
  color: #fff !important;
  line-height: 1.2;
  max-width: 18ch;
}

.hub-feature-hero > p {
  position: relative;
  z-index: 1;
  margin: 0;
  max-width: 58ch;
  font-size: 16px;
  line-height: 1.85;
  color: rgba(255, 245, 247, 0.96) !important;
  font-weight: 600;
}

.hub-feature-actions {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hub-feature-hero .hub-feature-actions,
.hub-learn-hero-actions {
  margin-top: 20px;
}

.hub-feature-hero .btn-secondary,
.hub-learn-hero-actions .btn-secondary,
.hub-feature-closing .btn-secondary,
.hub-learn-closing .btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #fff;
}

.hub-feature-hero .btn-secondary:hover,
.hub-learn-hero-actions .btn-secondary:hover,
.hub-feature-closing .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.18);
}

.hub-feature-page .hub-feature-card .btn-secondary,
.hub-feature-page .hub-feature-actions .btn-secondary {
  background: #fff;
  border: 1px solid rgba(215, 0, 0, 0.28);
  color: #9f1239;
}

.hub-feature-page .hub-feature-card .btn-secondary:hover {
  background: #fff1f2;
  border-color: var(--brand-red, #d70000);
}

.hub-feature-purpose {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px 16px;
  align-items: start;
  margin: 0 0 26px;
  padding: 16px 18px;
  border-radius: 18px;
  background: linear-gradient(100deg, #140004 0%, #2a000c 55%, #4a0014 100%);
  color: #fff;
  border: 1px solid rgba(215, 0, 0, 0.35);
}

.hub-feature-purpose-mark {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #ff1f2f, #8a000c);
  color: #fff;
  font-size: 18px;
}

.hub-feature-purpose strong {
  display: block;
  margin-bottom: 4px;
  font-size: 15px;
  font-weight: 900;
}

.hub-feature-purpose p {
  margin: 0;
  color: rgba(255, 220, 228, 0.88);
  font-size: 14px;
  line-height: 1.7;
  font-weight: 600;
}

.hub-feature-section,
.hub-learn-section {
  margin-bottom: 30px;
}

.hub-feature-section-title,
.hub-learn-section-title {
  margin: 0 0 8px;
  font-size: clamp(21px, 2.6vw, 30px);
  font-weight: 900;
  color: #111827;
  letter-spacing: -0.01em;
}

.hub-feature-section-lead,
.hub-learn-section-lead {
  margin: 0 0 18px;
  color: #4b5563;
  line-height: 1.75;
  max-width: 70ch;
  font-weight: 600;
}

.hub-feature-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin: 0 0 26px;
  counter-reset: hub-step;
}

.hub-feature-steps article {
  position: relative;
  background: #fff;
  border: 1px solid #ececf1;
  border-radius: 16px;
  padding: 16px 14px 14px;
  border-top: 3px solid var(--brand-red, #d70000);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
  counter-increment: hub-step;
}

.hub-feature-steps article::before {
  content: counter(hub-step);
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin-bottom: 8px;
  border-radius: 999px;
  background: #fff1f2;
  color: #b91c1c;
  font-weight: 900;
  font-size: 12px;
}

.hub-feature-steps strong {
  display: block;
  margin-bottom: 4px;
  font-size: 14px;
  font-weight: 900;
  color: #111827;
}

.hub-feature-steps small {
  color: #6b7280;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.6;
}

.hub-feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
  margin-bottom: 22px;
}

.hub-feature-card {
  position: relative;
  background: #fff;
  border: 1px solid #ececf1;
  border-radius: 18px;
  padding: 20px 18px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
  border-top: 3px solid var(--brand-red, #d70000);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hub-feature-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 36px rgba(120, 0, 20, 0.12);
}

.hub-feature-card--featured {
  background: linear-gradient(180deg, #fff7f7 0%, #fff 55%);
  border-color: rgba(215, 0, 0, 0.22);
  box-shadow: 0 16px 40px rgba(185, 28, 28, 0.12);
}

.hub-feature-card--featured::after {
  content: 'موصى بها';
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #b91c1c;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
}

.hub-feature-card-top {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 8px;
}

.hub-feature-card-top h3,
.hub-feature-card h3 {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 900;
  color: #111827;
}

.hub-feature-card-top h3 {
  margin: 0;
}

.hub-feature-icon,
.hub-learn-icon {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: linear-gradient(145deg, #fff1f2, #ffe4e6);
  color: #dc2626;
  font-size: 18px;
}

.hub-feature-card p {
  margin: 0 0 14px;
  color: #4b5563;
  line-height: 1.75;
  font-size: 14px;
  font-weight: 600;
}

.hub-feature-card .price {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 900;
  color: #e50914;
  font-size: 18px;
  margin-bottom: 12px;
}

.hub-feature-list {
  margin: 0 0 14px;
  padding: 0 16px 0 0;
  color: #374151;
  font-size: 13px;
  line-height: 1.8;
  font-weight: 700;
}

.hub-feature-closing,
.hub-learn-closing {
  position: relative;
  overflow: hidden;
  margin-top: 8px;
}

.hub-feature-closing h2,
.hub-learn-closing h2 {
  position: relative;
  z-index: 1;
  margin: 0 0 10px;
  font-size: clamp(22px, 2.8vw, 32px);
  font-weight: 900;
  color: #fff !important;
}

.hub-feature-closing > p,
.hub-learn-closing > p {
  position: relative;
  z-index: 1;
  color: rgba(255, 245, 247, 0.96) !important;
}

.hub-learn-catalog {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.hub-learn-card-top {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 6px;
}

.hub-learn-card-top h3 {
  margin: 0;
}

.hub-learn-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
}

.hub-learn-meta span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border-radius: 999px;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  color: #374151;
  font-size: 12px;
  font-weight: 700;
}

.hub-learn-list {
  margin: 0 0 14px;
}

.hub-learn-list strong {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  color: #111827;
}

.hub-learn-list ul {
  margin: 0;
  padding: 0 18px 0 0;
  color: #4b5563;
  font-size: 13px;
  line-height: 1.7;
}

.hub-chat-layout {
  display: grid;
  grid-template-columns: minmax(220px, 260px) minmax(0, 1fr);
  gap: 14px;
  min-height: 560px;
  margin-bottom: 10px;
}

.hub-chat-rooms,
.hub-chat-panel {
  background: #fff;
  border: 1px solid #ececf1;
  border-radius: 18px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
  overflow: hidden;
}

.hub-chat-rooms {
  padding: 14px;
  background: linear-gradient(180deg, #140004 0%, #1a0008 100%);
  color: #fff;
  border-color: rgba(215, 0, 0, 0.35);
}

.hub-chat-rooms h2 {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 900;
  color: #fecdd3;
}

.hub-chat-rooms button,
.hub-chat-room {
  width: 100%;
  text-align: right;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 8px;
  font: inherit;
  cursor: pointer;
  display: grid;
  gap: 2px;
}

.hub-chat-room strong {
  font-size: 13px;
  font-weight: 900;
}

.hub-chat-room span {
  font-size: 11px;
  font-weight: 700;
  color: rgba(255, 220, 228, 0.75);
}

.hub-chat-rooms button.is-active,
.hub-chat-rooms button:hover,
.hub-chat-room.is-active,
.hub-chat-room:hover {
  background: linear-gradient(135deg, #ff1f2f, #8a000c);
  border-color: transparent;
}

.hub-chat-panel {
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 560px;
}

.hub-chat-panel-head {
  padding: 14px 16px;
  font-weight: 900;
  border-bottom: 1px solid #f1f5f9;
  background: #fffafb;
  color: #111827;
}

.hub-chat-messages {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: auto;
  background:
    radial-gradient(80% 60% at 100% 0%, rgba(215, 0, 0, 0.05), transparent 55%),
    #fafafa;
}

.hub-chat-bubble {
  max-width: min(85%, 420px);
  padding: 10px 12px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid #ececf1;
  color: #1f2937;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.65;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
}

.hub-chat-bubble.is-mine,
.hub-chat-bubble.me {
  align-self: flex-start;
  background: linear-gradient(135deg, #fff1f2, #ffe4e6);
  border-color: rgba(215, 0, 0, 0.18);
}

.hub-chat-bubble.is-other,
.hub-chat-bubble.them {
  align-self: flex-end;
}

.hub-chat-compose {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid #f1f5f9;
  background: #fff;
}

.hub-chat-compose input {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 11px 12px;
  font: inherit;
  font-weight: 700;
}

.hub-chat-compose button {
  border: 0;
  border-radius: 12px;
  padding: 0 18px;
  background: linear-gradient(135deg, #ff1f2f, #8a000c);
  color: #fff;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

@media (max-width: 800px) {
  .hub-chat-layout {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .hub-chat-panel {
    min-height: 420px;
  }

  .hub-feature-purpose {
    grid-template-columns: 1fr;
  }

  .hub-feature-hero h1 {
    max-width: none;
  }
}

@media (max-width: 1100px) {
  body.homepage .hub-header-actions {
    max-width: min(42vw, 360px) !important;
    overflow-x: auto !important;
  }

  .hub-header-actions .hub-hbtn {
    padding: 4px 7px !important;
    font-size: 10.5px !important;
  }
}
