.btn-hover-title {
  position: relative;
  display: inline-block;
}

/* Hover title hidden by default */
.hover-title {
  position: absolute;
  bottom: 100%; /* above the button */
  left: 50%;
  transform: translateX(-50%) translateY(-5px);
  background-color: #7b4157; /* custom background */
  color: #fff;               /* text color */
  font-size: 0.75rem;
  font-weight: 500;
  padding: 4px 8px;
  border-radius: 4px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 1000;
}

/* Arrow under tooltip */
.hover-title::after {
  content: "";
  position: absolute;
  top: 100%; /* at the bottom of tooltip */
  left: 50%;
  transform: translateX(-50%);
  border-width: 5px;
  border-style: solid;
  border-color: #7b4157 transparent transparent transparent; /* arrow pointing down */
}

/* Show tooltip on hover */
.btn-hover-title:hover .hover-title {
  opacity: 1;
  transform: translateX(-50%) translateY(-10px);
}


/* mobile menu */

.navbar-toggler {
  border: none !important;
  box-shadow: none !important;
  outline: none !important;
  background: transparent !important;
  padding: 0;
}

/* Custom animated bars */
.custom-toggler {
  display: flex;
  flex-direction: column;
  justify-content: space-evenly; /* balanced spacing */
  width: 28px;
  height: 22px;
  cursor: pointer;
  padding: 0;
}

/* Bars styling */
.toggler-bar {
  height: 3px;
  width: 100%;
  background: linear-gradient(135deg, #b8749d, #7b4157);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Proper X when toggled */
.custom-toggler[aria-expanded="true"] .toggler-bar:nth-child(1),
.custom-toggler[aria-expanded="true"] .toggler-bar:nth-child(3) {
  transform-origin: center center; /* rotate around the middle */
}

.custom-toggler[aria-expanded="true"] .toggler-bar:nth-child(1) {
  transform: rotate(45deg);
  margin-top:11px;
}

.custom-toggler[aria-expanded="true"] .toggler-bar:nth-child(2) {
  opacity: 0;
}

.custom-toggler[aria-expanded="true"] .toggler-bar:nth-child(3) {
  transform: rotate(135deg);
  margin-bottom:11px;
}


/* Keep toggler always in same place above menu */
.navbar-toggler.custom-toggler {
  position: fixed;    /* stays on top */
  top: 8%;          /* vertical alignment; adjust if needed */
  right: 2rem;        /* distance from right edge */
  transform: translateY(-50%);
  z-index: 1050;      /* above menu */
}

/* Mobile tweaks for toggler size and logo */
@media (max-width: 576px) {
  .custom-toggler {
    width: 32px;
    height: 24px;
  }

  #pf-logo {
    position: fixed;
    left: 50%;
    top: 8%;
    transform: translate(-50%, -50%);
  }
}

/* Move toggler to right on mobile (Bootstrap flex order) */
@media (max-width: 992px) {
  .navbar .navbar-toggler {
    order: 3;
    margin-left: auto;
  }

  /* Stack buttons neatly on mobile */
  .buttons-container {
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
  }

  .buttons-container .btn {
    width: auto;       /* do not stretch full width */
    min-width: 140px;  /* keep uniform size */
  }
}
