/* كتالوج مواقع نايوش الجاهزة — شبكة احترافية */
.hub-product-gallery {
  --gallery-red: #c8102e;
  --gallery-red-deep: #8a0a1c;
  --gallery-ink: #0a0d12;
  --gallery-muted: #6b7280;
  --gallery-line: rgba(10, 13, 18, 0.08);
  --gallery-card: #ffffff;
  --gallery-stage: #0c0f14;
  --gallery-champagne: #b89b6a;
  --gallery-gap: clamp(14px, 2vw, 28px);
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background:
    radial-gradient(ellipse 80% 55% at 100% 0%, rgba(200, 16, 46, 0.08), transparent 55%),
    linear-gradient(180deg, #f7f8fa 0%, #eef0f3 100%);
  border-block: 1px solid var(--gallery-line);
  padding: 40px 0 48px;
  margin: 0;
}

.hub-gallery-shell.container,
.hub-product-gallery .hub-gallery-shell {
  width: min(94%, 1500px) !important;
  max-width: 1500px !important;
  margin-inline: auto !important;
  padding-inline: clamp(14px, 2.2vw, 28px) !important;
  box-sizing: border-box !important;
}

.hub-product-gallery-head {
  display: grid;
  gap: 6px;
  margin-bottom: 18px;
  text-align: right;
}

.hub-gallery-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 6px;
  color: var(--gallery-red-deep);
  font-size: 12px;
  font-weight: 800;
}

.hub-gallery-kicker i {
  color: var(--gallery-champagne);
  font-size: 11px;
}

.hub-product-gallery-head h2 {
  margin: 0 0 6px;
  font-size: clamp(24px, 3.2vw, 36px);
  font-weight: 900;
  color: var(--gallery-ink);
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.hub-product-gallery-head p {
  margin: 0;
  max-width: 640px;
  color: var(--gallery-muted);
  font-weight: 600;
  line-height: 1.7;
  font-size: 14px;
}

.hub-gallery-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 18px;
}

.hub-gallery-filters[hidden] {
  display: none !important;
}

.hub-gallery-filter {
  appearance: none;
  border: 1px solid var(--gallery-line);
  background: #fff;
  color: var(--gallery-ink);
  border-radius: 999px;
  padding: 7px 14px;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.hub-gallery-filter:hover,
.hub-gallery-filter.is-active {
  background: var(--gallery-ink);
  color: #fff;
  border-color: transparent;
}

/* الشبكة */
.hub-gallery-track {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--gallery-gap);
  margin: 0;
  padding: 0;
  overflow: visible;
  width: 100%;
}

.hub-gallery-empty {
  grid-column: 1 / -1;
  margin: 0;
  padding: 28px;
  text-align: center;
  color: var(--gallery-muted);
  font-weight: 700;
  background: #fff;
  border: 1px dashed var(--gallery-line);
  border-radius: 16px;
}

/* البطاقة */
.hub-gallery-shot {
  --shot-accent: var(--gallery-red);
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  height: 100%;
  background: var(--gallery-card);
  border-radius: 18px;
  border: 1px solid var(--gallery-line);
  box-shadow: 0 8px 24px rgba(10, 13, 18, 0.05);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.hub-gallery-shot:nth-child(4n + 1) { --shot-accent: #c8102e; }
.hub-gallery-shot:nth-child(4n + 2) { --shot-accent: #0f766e; }
.hub-gallery-shot:nth-child(4n + 3) { --shot-accent: #1d4ed8; }
.hub-gallery-shot:nth-child(4n + 4) { --shot-accent: #b45309; }

.hub-gallery-shot:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 32px rgba(10, 13, 18, 0.1);
}

.hub-gallery-shot:focus-visible {
  outline: 3px solid var(--gallery-red);
  outline-offset: 3px;
}

.hub-gallery-visual {
  position: relative;
  flex: 0 0 auto;
  aspect-ratio: 16 / 10;
  width: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--gallery-stage);
  display: grid;
  place-items: center;
}

.hub-gallery-visual.has-face {
  place-items: stretch;
}

.hub-gallery-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.08) 0%, transparent 40%, rgba(0, 0, 0, 0.45) 100%);
  pointer-events: none;
}

.hub-site-face {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
  transition: transform 0.35s ease;
}

.hub-gallery-shot:hover .hub-site-face {
  transform: scale(1.03);
}

.hub-site-logo {
  position: absolute;
  top: 10px;
  inset-inline-start: 10px;
  z-index: 3;
  width: 40px;
  height: 40px;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 12px;
  padding: 5px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.hub-gallery-live {
  position: absolute;
  top: 10px;
  inset-inline-end: 10px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(12, 16, 23, 0.62);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.hub-gallery-live i {
  color: #4ade80;
  font-size: 7px;
}

.hub-gallery-index {
  position: absolute;
  bottom: 10px;
  inset-inline-end: 10px;
  z-index: 3;
  min-width: 30px;
  height: 30px;
  padding: 0 6px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.hub-gallery-copy {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1 1 auto;
  padding: 14px 14px 14px;
  background: #fff;
  min-height: 0;
}

.hub-gallery-copy .tag {
  display: inline-flex;
  width: fit-content;
  font-size: 10px;
  font-weight: 800;
  color: var(--shot-accent);
  background: color-mix(in srgb, var(--shot-accent) 10%, #fff);
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--shot-accent) 16%, transparent);
}

.hub-gallery-copy h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 900;
  line-height: 1.3;
  color: var(--gallery-ink);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hub-gallery-domain {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  color: var(--gallery-champagne);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  direction: ltr;
  text-align: end;
}

.hub-gallery-copy p {
  margin: 0;
  font-size: 12px;
  line-height: 1.55;
  font-weight: 600;
  color: var(--gallery-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hub-gallery-enter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: auto;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--gallery-ink);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  transition: background 0.2s ease, transform 0.2s ease;
}

.hub-gallery-enter i {
  font-size: 11px;
  color: var(--gallery-champagne);
}

.hub-gallery-shot:hover .hub-gallery-enter {
  background: linear-gradient(135deg, var(--gallery-red), var(--gallery-red-deep));
}

.hub-gallery-shot:hover .hub-gallery-enter i {
  color: #fff;
}

/* هاتف وهمي للأنظمة بدون وجه */
.hub-phone {
  position: relative;
  z-index: 1;
  width: min(42%, 120px);
  aspect-ratio: 9 / 16;
  background: #0f1218;
  border-radius: 18px;
  border: 2px solid #2a303a;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
  overflow: hidden;
}

.hub-phone-notch {
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 36px;
  height: 6px;
  border-radius: 999px;
  background: #1a1f28;
  z-index: 2;
}

.hub-phone-screen {
  height: 100%;
  padding: 18px 8px 8px;
  background: linear-gradient(180deg, #151a22, #0f1218);
  color: #fff;
  font-size: 9px;
}

.hub-phone-bar {
  font-weight: 800;
  margin-bottom: 8px;
  line-height: 1.2;
}

.hub-phone-bar small {
  display: block;
  opacity: 0.65;
  font-weight: 600;
  font-size: 8px;
}

.hub-phone-kpi {
  display: flex;
  gap: 4px;
  margin-bottom: 6px;
}

.hub-phone-kpi span {
  flex: 1;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 6px;
  padding: 4px;
  text-align: center;
}

.hub-phone-kpi b {
  display: block;
  font-size: 10px;
}

.hub-phone-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
  opacity: 0.9;
}

.hub-phone-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(200, 16, 46, 0.35);
  font-size: 7px;
}

.hub-gallery-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--gallery-line);
  color: #5c6470;
  font-weight: 700;
  font-size: 13px;
}

.hub-gallery-foot .btn-link {
  color: var(--gallery-red-deep);
  font-weight: 800;
  text-decoration: none;
}

.hub-gallery-foot .btn-link:hover {
  text-decoration: underline;
}

/* إزالة عناصر السلايدر القديمة إن وُجدت */
.hub-gallery-controls,
.hub-gallery-dots,
.hub-gallery-track-wrap {
  display: none !important;
}

@media (max-width: 1280px) {
  .hub-gallery-track {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .hub-product-gallery {
    padding: 28px 0 36px;
  }

  .hub-gallery-track {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
  }
}

@media (max-width: 560px) {
  .hub-gallery-shell {
    width: 100%;
    padding-inline: 14px;
  }

  .hub-gallery-track {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .hub-gallery-copy h3 {
    font-size: 15px;
  }

  .hub-gallery-foot {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hub-gallery-shot,
  .hub-site-face,
  .hub-gallery-enter {
    transition: none !important;
  }

  .hub-gallery-shot:hover {
    transform: none;
  }

  .hub-gallery-shot:hover .hub-site-face {
    transform: none;
  }
}
