/* Kelideto UI enhancements */
.back-to-top {
  position: fixed;
  left: 22px;
  bottom: 22px;
  z-index: 80;
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(145deg, #fc5a2d, #e95a39);
  box-shadow: 0 14px 34px rgba(233, 90, 57, .28);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px) scale(.88);
  pointer-events: none;
  transition: opacity .22s ease, transform .22s ease, visibility .22s ease, box-shadow .22s ease;
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.back-to-top:hover {
  transform: translateY(-3px) scale(1.04);
  box-shadow: 0 18px 40px rgba(233, 90, 57, .34);
}

.back-to-top:active {
  transform: translateY(-1px) scale(.98);
}

.footer-credit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 15px 0 18px;
  border-top: 1px solid rgba(219, 227, 234, .75);
  color: #8a949e;
  font-size: 11px;
  line-height: 1.8;
}

.footer-credit a {
  color: var(--blue);
  font-weight: 800;
  letter-spacing: .1px;
  transition: color .18s ease, transform .18s ease;
}

.footer-credit a:hover,
.footer-credit a:focus-visible {
  color: var(--blue-deep);
  transform: translateY(-1px);
}

@media (max-width: 1100px) {
  .header-inner {
    width: 100%;
    justify-content: space-between;
  }

  .brand {
    order: 1;
  }

  .header-actions {
    order: 2;
    margin-right: auto !important;
    margin-left: 0 !important;
  }

  .menu-button {
    display: grid;
    place-items: center;
    align-self: center;
  }
}

@media (max-width: 700px) {
  .back-to-top {
    left: 14px;
    bottom: calc(14px + env(safe-area-inset-bottom));
    width: 46px;
    height: 46px;
  }

  .header-inner {
    direction: rtl;
  }

  .header-actions {
    min-width: 44px;
  }

  .footer-credit {
    padding: 13px 0 16px;
    font-size: 10.5px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .back-to-top {
    transition: opacity .01ms linear, visibility .01ms linear;
  }

  .back-to-top:hover,
  .back-to-top:active,
  .footer-credit a:hover,
  .footer-credit a:focus-visible {
    transform: none;
  }
}
