/* Rusydee animated hub nav — primary tools highlight */
:root {
  --rd-hub-h: 76px;
  --rd-hub-bg: rgba(255, 255, 255, 0.78);
  --rd-hub-border: rgba(15, 23, 42, 0.08);
  --rd-hub-text: #0f172a;
  --rd-hub-muted: #64748b;
  --rd-hub-shadow: 0 10px 40px rgba(15, 23, 42, 0.08), 0 1px 0 rgba(255, 255, 255, 0.6) inset;
  --rd-hub-radius: 18px;
}

.rd-hub {
  position: sticky;
  top: 0;
  z-index: 100000;
  width: 100%;
  isolation: isolate;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  animation: rd-hub-drop 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes rd-hub-drop {
  from {
    opacity: 0;
    transform: translateY(-18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.rd-hub__glow {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(60% 120% at 10% 0%, rgba(124, 58, 237, 0.12), transparent 55%),
    radial-gradient(50% 100% at 50% 0%, rgba(14, 165, 233, 0.1), transparent 50%),
    radial-gradient(55% 110% at 90% 0%, rgba(16, 185, 129, 0.12), transparent 55%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(248, 250, 252, 0.88));
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border-bottom: 1px solid var(--rd-hub-border);
  box-shadow: var(--rd-hub-shadow);
}

.rd-hub__glow::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: linear-gradient(
    90deg,
    transparent,
    #8b5cf6 15%,
    #0ea5e9 35%,
    #f59e0b 55%,
    #10b981 75%,
    #f43f5e 90%,
    transparent
  );
  background-size: 200% 100%;
  animation: rd-hub-rainbow 8s linear infinite;
  opacity: 0.9;
}

@keyframes rd-hub-rainbow {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

.rd-hub__inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0.65rem 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: var(--rd-hub-h);
}

.rd-hub__brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  color: var(--rd-hub-text);
  flex-shrink: 0;
  padding: 0.2rem 0.15rem;
  transition: transform 0.25s ease;
}

.rd-hub__brand:hover {
  transform: scale(1.03);
}

.rd-hub__brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 1.05rem;
  color: #fff;
  background: linear-gradient(135deg, #0f766e 0%, #0891b2 45%, #7c3aed 100%);
  box-shadow: 0 8px 20px rgba(8, 145, 178, 0.35);
  animation: rd-hub-pulse 3.2s ease-in-out infinite;
}

@keyframes rd-hub-pulse {
  0%, 100% { box-shadow: 0 8px 20px rgba(8, 145, 178, 0.35); transform: scale(1); }
  50% { box-shadow: 0 10px 28px rgba(124, 58, 237, 0.4); transform: scale(1.04); }
}

.rd-hub__brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.rd-hub__brand-text strong {
  font-size: 0.95rem;
  letter-spacing: -0.02em;
}

.rd-hub__brand-text small {
  font-size: 0.68rem;
  color: var(--rd-hub-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.rd-hub__track {
  display: flex;
  align-items: stretch;
  gap: 0.45rem;
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 0.15rem 0.1rem 0.25rem;
  mask-image: linear-gradient(90deg, transparent 0, #000 12px, #000 calc(100% - 12px), transparent 100%);
}

.rd-hub__track::-webkit-scrollbar {
  display: none;
}

.rd-hub__item {
  --rd-c1: #6366f1;
  --rd-c2: #8b5cf6;
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1 1 0;
  min-width: 132px;
  max-width: 200px;
  padding: 0.55rem 0.7rem;
  border-radius: var(--rd-hub-radius);
  text-decoration: none;
  color: var(--rd-hub-text);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(15, 23, 42, 0.07);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
  scroll-snap-align: start;
  overflow: hidden;
  transition:
    transform 0.28s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.28s ease,
    border-color 0.28s ease,
    background 0.28s ease;
  animation: rd-hub-item-in 0.65s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: calc(0.08s * var(--rd-i, 0) + 0.15s);
}

@keyframes rd-hub-item-in {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.94);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.rd-hub__item--violet { --rd-c1: #7c3aed; --rd-c2: #a78bfa; }
.rd-hub__item--sky    { --rd-c1: #0284c7; --rd-c2: #38bdf8; }
.rd-hub__item--amber  { --rd-c1: #d97706; --rd-c2: #fbbf24; }
.rd-hub__item--emerald{ --rd-c1: #059669; --rd-c2: #34d399; }
.rd-hub__item--rose   { --rd-c1: #e11d48; --rd-c2: #fb7185; }

.rd-hub__shine {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    115deg,
    transparent 30%,
    rgba(255, 255, 255, 0.55) 48%,
    transparent 62%
  );
  transform: translateX(-120%);
  pointer-events: none;
}

.rd-hub__item:hover .rd-hub__shine,
.rd-hub__item:focus-visible .rd-hub__shine {
  animation: rd-hub-shine 0.9s ease;
}

@keyframes rd-hub-shine {
  to { transform: translateX(120%); }
}

.rd-hub__item:hover,
.rd-hub__item:focus-visible {
  transform: translateY(-3px) scale(1.02);
  border-color: color-mix(in srgb, var(--rd-c1) 35%, transparent);
  box-shadow:
    0 12px 28px color-mix(in srgb, var(--rd-c1) 22%, transparent),
    0 0 0 1px color-mix(in srgb, var(--rd-c1) 15%, transparent);
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.95),
    color-mix(in srgb, var(--rd-c2) 12%, #fff)
  );
  outline: none;
}

.rd-hub__item.is-active {
  border-color: color-mix(in srgb, var(--rd-c1) 45%, transparent);
  background: linear-gradient(
    145deg,
    color-mix(in srgb, var(--rd-c1) 10%, #fff),
    color-mix(in srgb, var(--rd-c2) 16%, #fff)
  );
  box-shadow: 0 8px 22px color-mix(in srgb, var(--rd-c1) 18%, transparent);
}

.rd-hub__item.is-active::before {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 0;
  height: 3px;
  border-radius: 999px 999px 0 0;
  background: linear-gradient(90deg, var(--rd-c1), var(--rd-c2));
}

.rd-hub__icon {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-size: 1rem;
  line-height: 1;
  color: #fff;
  background: linear-gradient(135deg, var(--rd-c1), var(--rd-c2));
  box-shadow: 0 6px 14px color-mix(in srgb, var(--rd-c1) 35%, transparent);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  /* emoji sit better on soft white glass */
  background: linear-gradient(
    145deg,
    color-mix(in srgb, var(--rd-c2) 22%, #fff),
    color-mix(in srgb, var(--rd-c1) 18%, #fff)
  );
  box-shadow:
    0 6px 14px color-mix(in srgb, var(--rd-c1) 22%, transparent),
    inset 0 0 0 1px color-mix(in srgb, var(--rd-c1) 18%, transparent);
}

.rd-hub__item:hover .rd-hub__icon {
  transform: rotate(-8deg) scale(1.08);
}

.rd-hub__meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.15;
}

.rd-hub__label {
  font-size: 0.86rem;
  font-weight: 750;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.rd-hub__sub {
  font-size: 0.66rem;
  color: var(--rd-hub-muted);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 110px;
}

.rd-hub__arrow {
  margin-left: auto;
  font-size: 0.85rem;
  color: var(--rd-c1);
  opacity: 0;
  transform: translateX(-6px);
  transition: 0.25s ease;
  font-weight: 700;
}

.rd-hub__item:hover .rd-hub__arrow,
.rd-hub__item:focus-visible .rd-hub__arrow {
  opacity: 1;
  transform: translateX(0);
}

/* Compact / mobile */
@media (max-width: 860px) {
  :root { --rd-hub-h: 70px; }

  .rd-hub__brand-text small { display: none; }

  .rd-hub__item {
    flex: 0 0 auto;
    min-width: 148px;
    max-width: none;
  }

  .rd-hub__sub { max-width: 90px; }

  .rd-hub__arrow { display: none; }
}

@media (max-width: 480px) {
  .rd-hub__brand-text strong { font-size: 0.85rem; }
  .rd-hub__brand-mark { width: 34px; height: 34px; font-size: 0.95rem; }
  .rd-hub__item {
    min-width: 128px;
    padding: 0.48rem 0.55rem;
  }
  .rd-hub__label { font-size: 0.8rem; }
  .rd-hub__icon { width: 30px; height: 30px; border-radius: 9px; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .rd-hub,
  .rd-hub__item,
  .rd-hub__brand-mark,
  .rd-hub__glow::after {
    animation: none !important;
  }
  .rd-hub__item,
  .rd-hub__icon,
  .rd-hub__arrow {
    transition: none !important;
  }
}

/* Offset sticky WP admin bar if present */
body.admin-bar .rd-hub {
  top: 32px;
}
@media screen and (max-width: 782px) {
  body.admin-bar .rd-hub {
    top: 46px;
  }
}
