/* =============== */
/* Header Client   */
/* =============== */

.client-header {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--head-h);
  padding-top: var(--safe-t);
  z-index: 1100;
  display: flex;
  align-items: center;
  background: transparent;
  color: #ffffff;
  isolation: isolate;
}

/* Enhanced gradient with subtle animation */
.client-header::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg,
      #003DF6 0%,
      #2A5CFF 40%,
      #4B7AFF 80%,
      #6F97FF 100%);
  background-size: 200% 200%;
  box-shadow: 0 4px 20px rgba(0, 61, 246, 0.3);
  opacity: 1 !important;
  pointer-events: none;
  z-index: 0;
  transition: background-position 0.3s ease;
}

/* Subtle gradient animation on hover */
.client-header:hover::before {
  background-position: 100% 0;
}

/* Add subtle shine effect */
.client-header::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg,
      transparent,
      rgba(255, 255, 255, 0.1),
      transparent);
  transition: left 0.8s ease;
  pointer-events: none;
  z-index: 0;
}

.client-header:hover::after {
  left: 100%;
}

/* fallback jika browser tidak support blur */
@supports not (backdrop-filter: blur(6px)) {
  .client-header::before {
    background: #003DF6;
  }
}

.client-header>* {
  position: relative;
  z-index: 1;
}

/* ========================================================================== */
/* Brand dengan efek subtle                                                  */
/* ========================================================================== */

.client-header .brand-link {
  color: inherit;
  position: relative;
}

.client-header .brand-link img {
  height: calc(var(--head-h) * 0.56);
  width: auto;
  transition: transform 0.3s cubic-bezier(0.2, 0, 0, 1), filter 0.3s ease;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

@media (min-width: 992px) {
  .client-header .brand-link img {
    height: calc(var(--head-h) * 0.625);
  }
}

.client-header .brand-link:hover img {
  transform: scale(1.05) translateY(-1px);
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

.brand-name {
  letter-spacing: 0.02em;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: text-shadow 0.3s ease;
}

.brand-link:hover .brand-name {
  text-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* ========================================================================== */
/* Desktop Navigation dengan efek lebih halus                                */
/* ========================================================================== */

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-desktop-item {
  color: rgba(255, 255, 255, 0.9);
  padding: 0.45rem 0.95rem;
  border-radius: 999px;
  font-weight: 500;
  font-size: 0.9rem;
  border: 1px solid transparent;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  transition: all 0.2s cubic-bezier(0.2, 0, 0, 1);
  position: relative;
  overflow: hidden;
}

/* Subtle ripple effect on hover */
.nav-desktop-item::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.4s ease, height 0.4s ease;
  z-index: -1;
}

.nav-desktop-item:hover::before {
  width: 200px;
  height: 200px;
}

.nav-desktop-item:hover {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.nav-desktop-item.active {
  color: #003DF6;
  background: #ffffff;
  border-color: #ffffff;
  box-shadow: 0 4px 15px rgba(0, 61, 246, 0.4);
  transform: translateY(-1px);
}

.nav-desktop-item i.bi {
  font-size: 1rem;
  transition: transform 0.2s ease;
}

.nav-desktop-item:hover i.bi {
  transform: scale(1.1);
}

/* ========================================================================== */
/* Header Buttons dengan efek lebih elegan                                   */
/* ========================================================================== */

.client-header .btn-outline-light,
.client-header .btn-danger {
  border-radius: 999px;
  font-weight: 500;
  position: relative;
  overflow: hidden;
  transition: all 0.2s cubic-bezier(0.2, 0, 0, 1);
}

.client-header .btn-outline-light {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.6);
  background: transparent;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Shine effect for buttons */
.client-header .btn-outline-light::after,
.client-header .btn-danger::after {
  content: "";
  position: absolute;
  top: -50%;
  left: -60%;
  width: 20%;
  height: 200%;
  background: linear-gradient(90deg,
      transparent,
      rgba(255, 255, 255, 0.3),
      transparent);
  transform: rotate(25deg);
  transition: left 0.5s ease;
  pointer-events: none;
}

.client-header .btn-outline-light:hover::after,
.client-header .btn-danger:hover::after {
  left: 120%;
}

.client-header .btn-outline-light:hover {
  color: #003DF6;
  background: #ffffff;
  border-color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.client-header .btn-icon-only {
  width: 36px;
  height: 36px;
  padding: 0;
}

.client-header .btn-signup-highlight {
  padding-inline: 1.1rem;
  font-weight: 600;
  background: linear-gradient(135deg, #dc3545, #ff4d5e);
  border: none;
  box-shadow: 0 4px 15px rgba(220, 53, 69, 0.5);
  transition: transform 0.2s cubic-bezier(0.2, 0, 0, 1),
    box-shadow 0.2s ease,
    filter 0.2s ease;
}

.client-header .btn-signup-highlight:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 25px rgba(220, 53, 69, 0.7);
  filter: brightness(1.1);
}

.client-header .btn-signup-highlight:active {
  transform: translateY(0) scale(0.98);
}

/* ========================================================================== */
/* NOTIFICATION dengan efek lebih menarik                                    */
/* ========================================================================== */

.notif-btn {
  line-height: 1;
  padding-inline: 0.65rem;
  white-space: nowrap;
  position: relative;
  transition: transform 0.2s ease;
}

.notif-btn:hover {
  transform: scale(1.05);
}

.notif-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 18px;
  height: 18px;
  padding: 0 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  line-height: 1;
  background: #dc3545;
  color: white;
  border-radius: 999px;
  box-shadow: 0 2px 5px rgba(220, 53, 69, 0.4);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.4);
  }

  70% {
    box-shadow: 0 0 0 6px rgba(220, 53, 69, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(220, 53, 69, 0);
  }
}

.notif-dropdown {
  width: min(360px, 92vw);
  max-height: 60vh;
  overflow: auto;
  border: none;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  animation: slideDown 0.2s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* supaya dropdown tetap kebaca di background biru */
.notif-dropdown .dropdown-item {
  white-space: normal;
  transition: all 0.2s ease;
}

.notif-dropdown .dropdown-item:hover {
  background: rgba(0, 61, 246, 0.05);
  transform: translateX(5px);
}

.notif-dropdown .dropdown-item .bi {
  margin-top: 2px;
  transition: transform 0.2s ease;
}

.notif-dropdown .dropdown-item:hover .bi {
  transform: scale(1.1);
}

/* ========================================================================== */
/* MOBILE BOTTOM NAV dengan efek lebih halus                                */
/* ========================================================================== */

.mobile-bottom-nav {
  background: rgba(255, 255, 255, 0.95) !important;
  backdrop-filter: blur(10px) !important;
  -webkit-backdrop-filter: blur(10px) !important;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.05);
}

.mobile-bottom-nav .bottom-nav-item {
  color: #222222 !important;
  transition: all 0.2s cubic-bezier(0.2, 0, 0, 1);
  border-radius: 0.5rem;
  margin: 0;
  padding: 0.3rem 0.15rem;
  position: relative;
  overflow: hidden;
}

/* Subtle ripple for mobile */
.mobile-bottom-nav .bottom-nav-item::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(0, 61, 246, 0.1);
  transform: translate(-50%, -50%);
  transition: width 0.3s ease, height 0.3s ease;
  z-index: -1;
}

.mobile-bottom-nav .bottom-nav-item:active::before {
  width: 100px;
  height: 100px;
}

/* Hover effect for mobile (still visible on tap) */
.mobile-bottom-nav .bottom-nav-item:hover {
  background: rgba(0, 0, 0, 0.02);
}

.mobile-bottom-nav .bottom-nav-item:active {
  transform: scale(0.95);
}

/* ACTIVE icon with enhanced effect */
.mobile-bottom-nav .bottom-nav-item.active {
  color: #003DF6 !important;
  background: rgba(0, 61, 246, 0.08) !important;
  transform: translateY(-2px);
  box-shadow: 0 2px 8px rgba(0, 61, 246, 0.15);
}

.mobile-bottom-nav .bottom-nav-item.active .bi {
  transform: scale(1.1);
}

/* Icon transitions */
.mobile-bottom-nav .bottom-nav-item .bi {
  transition: transform 0.2s ease, color 0.2s ease;
}

.mobile-bottom-nav .bottom-nav-item:hover .bi {
  transform: scale(1.1);
}

/* Icon size adjustments (small screens) */
@media (max-width: 575.98px) {
  .mobile-bottom-nav .bottom-nav-item .bi {
    font-size: 1.15rem;
    margin-bottom: 0.1rem;
  }
}

/* ============================= */
/* NATIVE MOBILE MORE MENU FINAL */
/* ============================= */

.mobile-more-menu .dropdown-menu {
  position: absolute !important;
  inset: auto 8px calc(100% + 8px) auto !important;
  transform: none !important;
  border: none;
  background: transparent;
  padding: 0;
}

/* isi menu */
.more-dropdown-inner {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 14px 35px rgba(0, 0, 0, .18);
  overflow: hidden;

  transform-origin: bottom right;
  transform: scale(.35);
  opacity: 0;

  transition:
    transform .28s cubic-bezier(.18, 1.25, .4, 1),
    opacity .18s ease;
}

/* saat terbuka */
.mobile-more-menu .dropdown-menu.show .more-dropdown-inner {
  transform: scale(1);
  opacity: 1;
}

/* item feel */
.more-dropdown-inner .dropdown-item {
  padding: 12px 18px;
  transition: background .15s ease, transform .15s ease;
}

.more-dropdown-inner .dropdown-item:active {
  transform: scale(.97);
  background: rgba(0, 0, 0, .05);
}

/* tombol titik animasi */
.more-btn {
  transition: transform .18s ease;
}

.mobile-more-menu.show .more-btn {
  transform: rotate(90deg);
}

/* ========================================================================== */
/* Responsive dengan peningkatan visual                                      */
/* ========================================================================== */

@media (max-width: 575.98px) {
  .brand-name {
    font-size: 0.9rem;
  }

  .client-header {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .mobile-bottom-nav .container {
    padding-left: 0.35rem;
    padding-right: 0.35rem;
  }

  .mobile-bottom-nav .row {
    margin-left: -0.15rem;
    margin-right: -0.15rem;
  }

  .mobile-bottom-nav .col {
    padding-left: 0.15rem;
    padding-right: 0.15rem;
  }

  .mobile-bottom-nav .bottom-nav-item .bi {
    font-size: 1.15rem;
    margin-bottom: 0.1rem;
  }
}

@media (max-width: 1199.98px) {
  .desktop-nav {
    gap: 0.5rem;
  }

  .nav-desktop-item {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
  }
}

@media (max-width: 1399.98px) {
  .nav-desktop-item span {
    display: none;
  }

  .nav-desktop-item {
    padding: 0.5rem;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0;
  }

  .nav-desktop-item .bi {
    margin: 0 !important;
    font-size: 1.05rem;
  }
}

@media (max-width: 360px) {
  .mobile-bottom-nav .bottom-nav-item {
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
  }

  /* HP mini: dropdown notif jangan kepotong */
  .notif-dropdown {
    width: 92vw;
  }
}
