/* معرض المواقع الجاهزة — عرض فاخر · سينمائي · وجه كبير */
.hub-product-gallery {
  --gallery-red: #c8102e;
  --gallery-red-deep: #8a0a1c;
  --gallery-ink: #0a0d12;
  --gallery-muted: #6b7280;
  --gallery-line: rgba(10, 13, 18, 0.07);
  --gallery-card: #ffffff;
  --gallery-stage: #0c0f14;
  --gallery-glow: rgba(200, 16, 46, 0.22);
  --gallery-champagne: #b89b6a;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background:
    radial-gradient(ellipse 90% 70% at 100% -10%, var(--gallery-glow), transparent 52%),
    radial-gradient(ellipse 60% 50% at -5% 100%, rgba(10, 13, 18, 0.06), transparent 48%),
    linear-gradient(180deg, #f4f5f7 0%, #ebecef 42%, #f6f7f9 100%);
  border-block: 1px solid var(--gallery-line);
  padding: 72px 0 80px;
  margin: 0;
}

.hub-product-gallery::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.35;
  background-image:
    linear-gradient(rgba(10, 13, 18, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(10, 13, 18, 0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.55), transparent 88%);
}

.hub-product-gallery::after {
  content: "";
  position: absolute;
  width: 420px;
  height: 420px;
  top: -120px;
  inset-inline-start: -80px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--gallery-glow), transparent 68%);
  filter: blur(8px);
  pointer-events: none;
  z-index: 0;
  animation: hubGalleryAura 16s ease-in-out infinite alternate;
}

@keyframes hubGalleryAura {
  from { transform: translate3d(0, 0, 0) scale(1); opacity: 0.7; }
  to { transform: translate3d(40px, 30px, 0) scale(1.15); opacity: 1; }
}

.hub-product-gallery > .container,
.hub-product-gallery > .hub-gallery-track-wrap {
  position: relative;
  z-index: 1;
}

.hub-product-gallery-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 36px;
}

.hub-gallery-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: var(--gallery-red-deep);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hub-gallery-kicker::before {
  content: "";
  width: 28px;
  height: 1px;
  background: linear-gradient(90deg, var(--gallery-champagne), var(--gallery-red));
}

.hub-gallery-kicker i {
  color: var(--gallery-champagne);
  font-size: 10px;
  animation: hubGalleryPulse 2.2s ease-in-out infinite;
}

@keyframes hubGalleryPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

.hub-product-gallery-head h2 {
  margin: 0 0 12px;
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 900;
  color: var(--gallery-ink);
  letter-spacing: -0.04em;
  line-height: 1.08;
}

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

.hub-gallery-controls {
  display: flex;
  gap: 12px;
}

.hub-gallery-controls button {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1px solid var(--gallery-line);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  color: var(--gallery-ink);
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 14px;
  box-shadow: 0 12px 30px rgba(10, 13, 18, 0.06);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), background 0.3s ease, color 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.hub-gallery-controls button:hover {
  background: var(--gallery-ink);
  color: #fff;
  border-color: transparent;
  transform: translateY(-3px);
  box-shadow: 0 16px 32px rgba(10, 13, 18, 0.2);
}

.hub-gallery-controls button:disabled {
  opacity: 0.28;
  cursor: default;
  transform: none;
  box-shadow: none;
  pointer-events: none;
}

.hub-gallery-controls button:not(:disabled) {
  pointer-events: auto;
  cursor: pointer;
}

.hub-gallery-track-wrap {
  overflow: hidden;
  margin-inline: max(0px, calc((100% - min(100%, 1280px)) / 2 * -1));
  padding-inline: max(18px, calc((100% - min(100%, 1280px)) / 2 + 18px));
}

.hub-gallery-track {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: 18px 6px 36px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.hub-gallery-track::-webkit-scrollbar {
  display: none;
}

/* بطاقة فاخرة — مسرح للوجه */
.hub-gallery-shot {
  --shot-accent: var(--gallery-red);
  flex: 0 0 min(340px, 84vw);
  scroll-snap-align: start;
  background: var(--gallery-card);
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.65);
  box-shadow:
    0 4px 6px rgba(10, 13, 18, 0.02),
    0 24px 48px rgba(10, 13, 18, 0.09);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 580px;
  text-decoration: none;
  color: inherit;
  position: relative;
  transition:
    transform 0.5s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.5s ease;
  animation: hubGalleryIn 0.85s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.hub-gallery-shot::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.95),
    rgba(184, 155, 106, 0.35) 42%,
    rgba(200, 16, 46, 0.25) 100%
  );
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  z-index: 4;
  opacity: 0.55;
  transition: opacity 0.4s ease;
}

.hub-gallery-shot:nth-child(1) { --shot-accent: #c8102e; animation-delay: 0.04s; }
.hub-gallery-shot:nth-child(2) { --shot-accent: #c2410c; animation-delay: 0.1s; }
.hub-gallery-shot:nth-child(3) { --shot-accent: #0f766e; animation-delay: 0.16s; }
.hub-gallery-shot:nth-child(4) { --shot-accent: #b45309; animation-delay: 0.22s; }
.hub-gallery-shot:nth-child(5) { --shot-accent: #1e3a5f; animation-delay: 0.28s; }
.hub-gallery-shot:nth-child(6) { --shot-accent: #9f1239; animation-delay: 0.34s; }
.hub-gallery-shot:nth-child(7) { --shot-accent: #1d4ed8; animation-delay: 0.4s; }
.hub-gallery-shot:nth-child(8) { --shot-accent: #7c3aed; animation-delay: 0.46s; }

.hub-gallery-shot:hover {
  transform: translateY(-14px);
  box-shadow:
    0 8px 16px rgba(10, 13, 18, 0.04),
    0 36px 72px rgba(10, 13, 18, 0.16);
}

.hub-gallery-shot:hover::before {
  opacity: 1;
}

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

@keyframes hubGalleryIn {
  from {
    opacity: 0;
    transform: translateY(36px) scale(0.94);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.hub-gallery-visual {
  position: relative;
  flex: 1 1 auto;
  min-height: 360px;
  margin: 0;
  border-radius: 0;
  overflow: hidden;
  display: grid;
  place-items: end center;
  background: var(--gallery-stage);
  order: -1;
}

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

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

.hub-gallery-visual.has-face::before {
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.08) 0%, transparent 35%, rgba(0, 0, 0, 0.78) 100%);
}

.hub-gallery-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(
    115deg,
    transparent 0%,
    transparent 42%,
    rgba(255, 255, 255, 0.08) 50%,
    transparent 58%,
    transparent 100%
  );
  transform: translateX(-120%);
  transition: transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}

.hub-gallery-shot:hover .hub-gallery-visual::after {
  transform: translateX(120%);
}

.hub-site-face {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
  transform: scale(1.04);
  transition: transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
  filter: saturate(1.05) contrast(1.04);
}

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

.hub-site-logo {
  position: absolute;
  top: 18px;
  inset-inline-start: 18px;
  z-index: 3;
  width: 58px;
  height: 58px;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.94);
  border-radius: 16px;
  padding: 8px;
  box-shadow:
    0 10px 28px rgba(0, 0, 0, 0.3),
    0 0 0 1px rgba(255, 255, 255, 0.5);
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.hub-gallery-shot:hover .hub-site-logo {
  transform: translateY(-3px) scale(1.05);
}

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

.hub-gallery-live i {
  color: #4ade80;
  font-size: 7px;
  animation: hubGalleryPulse 1.6s ease-in-out infinite;
}

.hub-gallery-index {
  position: absolute;
  bottom: 18px;
  inset-inline-end: 18px;
  z-index: 3;
  min-width: 40px;
  height: 40px;
  padding: 0 8px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.hub-gallery-copy {
  padding: 22px 22px 20px;
  flex: 0 0 auto;
  display: grid;
  gap: 10px;
  background: linear-gradient(180deg, #fff 0%, #fafbfc 100%);
}

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

.hub-gallery-copy h3 {
  margin: 0;
  font-size: 22px;
  font-weight: 900;
  line-height: 1.25;
  color: var(--gallery-ink);
  letter-spacing: -0.03em;
}

.hub-gallery-domain {
  margin: -2px 0 0;
  font-size: 12px;
  font-weight: 700;
  color: var(--gallery-champagne);
  letter-spacing: 0.02em;
  direction: ltr;
  text-align: end;
}

.hub-gallery-copy p {
  margin: 0;
  font-size: 13px;
  line-height: 1.7;
  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: 10px;
  margin-top: 8px;
  padding: 13px 16px;
  border-radius: 999px;
  background: var(--gallery-ink);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  position: relative;
  overflow: hidden;
  box-shadow: 0 12px 28px rgba(10, 13, 18, 0.18);
  transition: transform 0.35s ease, background 0.35s ease, box-shadow 0.35s ease;
}

.hub-gallery-enter i {
  font-size: 11px;
  color: var(--gallery-champagne);
  transition: transform 0.35s ease;
}

.hub-gallery-enter::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 28%, rgba(255, 255, 255, 0.18) 48%, transparent 68%);
  transform: translateX(-130%);
  transition: transform 0.7s ease;
}

.hub-gallery-shot:hover .hub-gallery-enter {
  background: linear-gradient(135deg, var(--gallery-red), var(--gallery-red-deep));
  transform: translateY(-2px);
  box-shadow: 0 16px 32px rgba(200, 16, 46, 0.32);
}

.hub-gallery-shot:hover .hub-gallery-enter i {
  color: #fff;
  transform: translateX(-3px);
}

.hub-gallery-shot:hover .hub-gallery-enter::before {
  transform: translateX(130%);
}

/* هاتف وهمي للأنظمة بدون وجه */
.hub-phone {
  position: relative;
  z-index: 1;
  width: 168px;
  height: 292px;
  background: #0f1218;
  border-radius: 28px;
  border: 3px solid #2a303a;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
  overflow: hidden;
  transform: translateY(18px);
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.hub-gallery-shot:hover .hub-phone {
  transform: translateY(4px) scale(1.03);
}

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

.hub-phone-screen {
  position: absolute;
  inset: 14px 8px 10px;
  border-radius: 18px;
  background: #fff;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  font-size: 9px;
}

.hub-phone-bar {
  background: linear-gradient(135deg, #d70000, #9a0000);
  color: #fff;
  padding: 10px 8px 8px;
  font-weight: 800;
}

.hub-phone-bar small {
  display: block;
  opacity: 0.85;
  font-weight: 600;
  margin-top: 2px;
}

.hub-phone-body {
  padding: 8px;
  display: grid;
  gap: 6px;
  flex: 1;
  background: #f6f7fa;
}

.hub-phone-row {
  height: 28px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid #e8ebf1;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 7px;
  font-weight: 700;
  color: #303848;
}

.hub-phone-dot {
  width: 14px;
  height: 14px;
  border-radius: 5px;
  background: rgba(215, 0, 0, 0.15);
  color: var(--gallery-red);
  display: grid;
  place-items: center;
  font-size: 7px;
  flex: 0 0 auto;
}

.hub-phone-kpi {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.hub-phone-kpi span {
  background: #fff;
  border: 1px solid #e8ebf1;
  border-radius: 8px;
  padding: 7px 6px;
  font-weight: 800;
  color: #1d222b;
}

.hub-phone-kpi span b {
  display: block;
  color: var(--gallery-red);
  font-size: 11px;
}

.hub-gallery-visual.tone-erp { background: linear-gradient(160deg, #3f0a0a, #1a1f2a); }
.hub-gallery-visual.tone-nais { background: linear-gradient(160deg, #3b1608, #152033); }
.hub-gallery-visual.tone-fit { background: linear-gradient(160deg, #062820, #152033); }
.hub-gallery-visual.tone-academy { background: linear-gradient(160deg, #3a1b05, #1a1f33); }
.hub-gallery-visual.tone-law { background: linear-gradient(160deg, #0f1a2c, #1b1014); }
.hub-gallery-visual.tone-smartx { background: linear-gradient(160deg, #0b1f3a, #152033); }
.hub-gallery-visual.tone-edusmartx { background: linear-gradient(160deg, #2a1050, #151922); }
.hub-gallery-visual.tone-edunaiosh { background: linear-gradient(160deg, #3a0810, #0f1a2c); }
.hub-gallery-visual.tone-hub { background: linear-gradient(160deg, #3a0810, #151922); }

.hub-gallery-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
  margin-bottom: 14px;
}

.hub-gallery-dots button {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  border: 0;
  padding: 0;
  background: rgba(10, 13, 18, 0.16);
  cursor: pointer;
  transition: width 0.35s ease, background 0.35s ease, transform 0.35s ease;
}

.hub-gallery-dots button.is-active {
  width: 28px;
  background: linear-gradient(90deg, var(--gallery-champagne), var(--gallery-red));
  transform: scaleY(1.05);
}

.hub-gallery-foot {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  padding-top: 8px;
  border-top: 1px solid var(--gallery-line);
}

.hub-gallery-foot span {
  color: var(--gallery-muted);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.01em;
}

.hub-gallery-foot a.btn-link {
  color: var(--gallery-ink);
  font-weight: 800;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  transition: gap 0.3s ease, color 0.3s ease;
}

.hub-gallery-foot a.btn-link:hover {
  gap: 12px;
  color: var(--gallery-red);
}

@media (max-width: 720px) {
  .hub-product-gallery {
    padding: 40px 0 48px;
  }

  .hub-product-gallery-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 22px;
  }

  .hub-product-gallery-head h2 {
    font-size: clamp(26px, 7.5vw, 36px);
  }

  .hub-gallery-controls {
    align-self: flex-end;
  }

  .hub-gallery-controls button {
    width: 46px;
    height: 46px;
  }

  .hub-gallery-track-wrap {
    margin-inline: 0;
    padding-inline: 14px;
  }

  .hub-gallery-shot {
    flex-basis: min(300px, 88vw);
    min-height: 540px;
  }

  .hub-gallery-visual {
    min-height: 300px;
  }

  .hub-phone {
    width: 150px;
    height: 262px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hub-product-gallery::after,
  .hub-gallery-shot,
  .hub-site-face,
  .hub-site-logo,
  .hub-gallery-live i,
  .hub-gallery-kicker i,
  .hub-gallery-visual::after {
    animation: none !important;
    transition: none !important;
  }
}
