/* ===============================
   FLOATING NAV BASE
================================ */

.float-nav{
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}

/* ===============================
   TOGGLE BUTTON (IMAGE)
================================ */

.float-toggle{
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: none;
  background: #ffffff;
    box-shadow:
    0 6px 18px rgba(0,0,0,.18),
    0 2px 6px rgba(0,0,0,.08);
  cursor: pointer;
  padding: 6px;

  display: grid;
  place-items: center;

  transition: transform .3s ease, box-shadow .3s ease;
}

.float-toggle img{
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.float-toggle:hover{
  transform: translateY(-2px);
  box-shadow: 0 16px 36px rgba(0,0,0,.35);
}

/* ===============================
   MENU
================================ */

.float-menu{
  display: flex;
  flex-direction: column;
  gap: 10px;

  background: rgba(255,255,255,.92);
  backdrop-filter: blur(10px);
  border-radius: 16px;
  padding: 14px;

  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;

  transition: .35s ease;
}

.float-menu a{
  font-size: 13px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #0b2a55;
  text-decoration: none;
  white-space: nowrap;

  transition: color .25s ease, transform .25s ease;
}

.float-menu a:hover{
  color: #163f7a;
  transform: translateX(-2px);
}

/* OPEN STATE */
.float-nav.open .float-menu{
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* ===============================
   MOBILE
================================ */

@media (max-width:768px){
  .float-nav{
    right: 16px;
    bottom: 16px;
  }

  .float-toggle{
    width: 44px;
    height: 44px;
  }

  .float-menu{
    padding: 12px;
  }

  .float-menu a{
    font-size: 12px;
    letter-spacing: .05em;
  }
}

/* อัพลูกเล่น */
/*Auto-hide เมื่อ scroll ลง*/
.float-nav.hide{
  transform: translateY(80px);
  opacity: 0;
  pointer-events: none;
  transition: .4s ease;
}

/*Parallax motion ตาม hero (subtle มาก)*/
.float-nav{
  transition:
    transform .6s cubic-bezier(.2,.8,.2,1),
    opacity .4s ease;
}

/*Highlight active section*/
.float-menu a.active{
  color:#ffffff;
  background:#0b2a55;
  border-radius: 999px;
  padding: 6px 14px;
}

/*Glass / Dark Mode Version (auto + manual)*/
.float-nav.glass-dark .float-menu{
  background: rgba(20,20,20,.65);
  color:#fff;
  backdrop-filter: blur(16px);
}

.float-nav.glass-dark .float-menu a{
  color: rgba(255,255,255,.85);
}

.float-nav.glass-dark .float-menu a:hover{
  color:#fff;
}

/*Toggle ปิดแล้วซ่อน*/
.float-nav.open .float-toggle{
  transform: rotate(8deg);
}



