/* ======================  TopBar  ======================*/
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1050;
  height: 44px;
  background: hsl(var(--black));
  border-bottom: 1px solid hsl(var(--white) / 0.06);
  /* overflow must be visible so the GTranslate dropdown can extend below */
  overflow: visible;
}

.topbar__accent {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    hsl(var(--base) / 0.3) 15%,
    hsl(var(--base)) 40%,
    hsl(var(--base-two)) 60%,
    hsl(var(--base) / 0.3) 85%,
    transparent 100%
  );
}

.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 44px;
}

/* ---- Left: contact ---- */
.topbar__left {
  display: flex;
  align-items: center;
  height: 100%;
}

.topbar__item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: hsl(var(--white) / 0.55);
  font-size: 0.775rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  text-decoration: none;
  padding: 0 20px;
  height: 100%;
  border-right: 1px solid hsl(var(--white) / 0.07);
  transition: color 0.2s, background 0.2s;
  white-space: nowrap;
}


.topbar__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: hsl(var(--base) / 0.12);
  border: 1px solid hsl(var(--base) / 0.25);
  flex-shrink: 0;
}

.topbar__icon i {
  color: hsl(var(--base));
  font-size: 0.6rem;
  line-height: 1;
}

.topbar__text {
  color: hsl(var(--white) / 0.55);
  transition: color 0.2s;
}

.topbar__item:hover {
  background: hsl(var(--white) / 0.03);
}

.topbar__item:hover .topbar__text {
  color: hsl(var(--white));
}

.topbar__item:hover .topbar__icon {
  background: hsl(var(--base) / 0.2);
  border-color: hsl(var(--base) / 0.5);
}

/* ---- Center: badge ---- */
.topbar__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 20px;
  background: hsl(var(--base) / 0.08);
  border: 1px solid hsl(var(--base) / 0.2);
  color: hsl(var(--base));
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.topbar__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: hsl(var(--base));
  box-shadow: 0 0 6px hsl(var(--base));
  animation: topbarPulse 1.8s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes topbarPulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 6px hsl(var(--base)); }
  50%       { opacity: 0.5; box-shadow: 0 0 12px hsl(var(--base)); }
}

/* ---- Right: social ---- */
.topbar__right {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 100%;
  padding-left: 20px;
}

.topbar__follow {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: hsl(var(--white) / 0.3);
  white-space: nowrap;
}

.topbar__social {
  display: flex;
  align-items: center;
  gap: 5px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.topbar__social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid hsl(var(--white) / 0.12);
  background: transparent;
  color: hsl(var(--white) / 0.4);
  font-size: 0.65rem;
  text-decoration: none;
  transition: all 0.25s;
}

.topbar__social a:hover {
  background: hsl(var(--base));
  border-color: hsl(var(--base));
  color: hsl(var(--black));
  box-shadow: 0 0 12px hsl(var(--base) / 0.6);
  transform: translateY(-1px);
}

/* Desktop: TopBar sits at top:0, MainHeader sits below it */

/* Mobile: TopBar sits at top: 0 — ABOVE the sidenav-topbar (logo/burger) */
@media (max-width: 991.98px) {
  .topbar {
    top: 0;
    z-index: 1046; /* above sidenav-topbar (1045) */
  }
}

/* TopBar additions for mobile: download button + GTranslate */
.topbar__dl-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: transparent;
  color: #fff;
  cursor: pointer;
  transition: all 0.18s;
  flex-shrink: 0;
}
.topbar__dl-btn:hover {
  background: hsl(var(--base));
  border-color: hsl(var(--base));
  color: #000;
}
.topbar__gt {
  position: relative;
  height: 44px;
  display: flex;
  align-items: center;
}
.topbar__gt .gt-btn {
  height: 44px;
  padding: 0 10px;
  font-size: 11.5px;
  color: #fff;
}
.topbar__gt .gt-menu {
  top: calc(100% + 2px);
  right: 0;
  z-index: 2000;
}

/* ---- Auth buttons ---- */
.topbar__auth {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-left: 12px;
  border-left: 1px solid hsl(var(--white) / 0.1);
  margin-left: 4px;
}

.topbar__auth-login {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: hsl(var(--white) / 0.6);
  text-decoration: none;
  padding: 4px 10px;
  border-radius: 20px;
  transition: color 0.18s;
  white-space: nowrap;
}

.topbar__auth-login:hover {
  color: hsl(var(--base));
}

.topbar__auth-open {
  display: inline-flex;
  align-items: center;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #000 !important;
  background: hsl(var(--base));
  border-radius: 20px;
  padding: 5px 14px;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.18s, box-shadow 0.18s;
}

.topbar__auth-open:hover {
  background: hsl(var(--base) / 0.85);
  box-shadow: 0 0 10px hsl(var(--base) / 0.45);
  color: #000 !important;
}

/* Light mode */
html[data-theme="light"] .topbar__auth-login {
  color: rgba(0, 0, 0, 0.55);
}
html[data-theme="light"] .topbar__auth-login:hover {
  color: hsl(var(--base));
}
html[data-theme="light"] .topbar__auth {
  border-left-color: rgba(0, 0, 0, 0.1);
}

/* ---- Responsive ---- */
@media screen and (max-width: 991px) {
  .topbar__badge { display: none; }
}

@media screen and (max-width: 767px) {
  .topbar__text { display: none; }
  .topbar__item { padding: 0 14px; }
  .topbar__follow { display: none; }
  .topbar__auth-open { display: none; }
}

@media screen and (max-width: 575px) {
  .topbar__auth { display: none; }
}

@media screen and (max-width: 480px) {
  .topbar__item:first-child { border-left: none; }
  .topbar__right { padding-left: 12px; }
}

/* ── Light theme: fix hardcoded rgba(255,255,255,...) ─────── */
html[data-theme="light"] .topbar__item {
  border-right-color: hsl(var(--white) / 0.1);
}
html[data-theme="light"] .topbar__social a {
  border-color: hsl(var(--white) / 0.2);
  color: hsl(var(--white) / 0.5);
}
