/* ============================================
   Floating Liên Hệ Button
   ============================================ */

.lhb-wrap {
    position: fixed;
    bottom: 15%;
    right: 30px;
    z-index: 99999;
    width: 56px;
    height: 56px;
}

/* Nút chính */
.lhb-main {
    position: absolute;
    top: 7%;
    right: 26%;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4A80F0, #3563D4);
    color: #fff;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(74, 128, 240, 0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 2;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    line-height: 1.2;
    margin: 0;
    padding: 0;
    text-transform: none;
}

.lhb-main:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 20px rgba(74, 128, 240, 0.6);
}

/* ============================================
   Particles — Firework Burst
   Icon bắn parabol có trọng lực, định kỳ burst đồng loạt.
   ============================================ */
.lhb-particles {
    position: absolute;
    top: 7%;
    right: 26%;
    width: 56px;
    height: 56px;
    pointer-events: none;
    overflow: visible;
    z-index: 1;          /* < .lhb-main (z-index: 2) → luôn render phía sau nút */
}

.lhb-particle {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 22px;
    height: 22px;
    margin: -11px 0 0 -11px;
    pointer-events: none;
    will-change: transform, opacity;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.lhb-particle img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    border-radius: 50%;
    background: #fff;
    padding: 2px;
    box-shadow:
        0 2px 6px rgba(0, 0, 0, 0.14),
        0 0 0 1px rgba(74, 128, 240, 0.15);
    animation: lhb-pulse 1.2s ease-in-out infinite;
}

/* Pulse glow nhẹ trên icon */
@keyframes lhb-pulse {
    0%, 100% { box-shadow: 0 2px 6px rgba(0, 0, 0, 0.14), 0 0 0 1px rgba(74, 128, 240, 0.15); }
    50%      { box-shadow: 0 2px 10px rgba(74, 128, 240, 0.45), 0 0 0 2px rgba(74, 128, 240, 0.25); }
}

/* ---------- Firework (bắn thẳng ra khoảng cách cố định rồi biến mất) ---------- */
.lhb-particle--fire {
    animation: lhb-fire var(--lhb-dur, 1.6s) cubic-bezier(.25, .6, .35, 1) forwards;
}

@keyframes lhb-fire {
    0% {
        transform: translate(0, 0) scale(0.25) rotate(0deg);
        opacity: 0;
    }
    15% {
        opacity: 1;
        transform: translate(calc(var(--lhb-tx) * 0.2), calc(var(--lhb-ty) * 0.2)) scale(1) rotate(calc(var(--lhb-rot) * 0.2));
    }
    75% {
        opacity: 1;
        transform: translate(var(--lhb-tx), var(--lhb-ty)) scale(1) rotate(var(--lhb-rot));
    }
    100% {
        transform: translate(var(--lhb-tx), var(--lhb-ty)) scale(0.9) rotate(var(--lhb-rot));
        opacity: 0;
    }
}

/* ---------- Burst flash (vòng sáng lan khi bắn đồng loạt) ---------- */
.lhb-burst-flash {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 56px;
    height: 56px;
    margin: -28px 0 0 -28px;
    border-radius: 50%;
    border: 2px solid rgba(74, 128, 240, 0.6);
    pointer-events: none;
    animation: lhb-burst 0.8s ease-out forwards;
}

@keyframes lhb-burst {
    0%   { transform: scale(0.6); opacity: 0.9; border-width: 3px; }
    100% { transform: scale(3.2); opacity: 0;   border-width: 1px; }
}

/* Ẩn particles khi menu mở */
.lhb-wrap.open .lhb-particles {
    opacity: 0;
    visibility: hidden;
}

.lhb-main-text {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.3px;
    white-space: nowrap;
    transition: opacity 0.2s ease;
}

.lhb-main-close {
    font-size: 18px;
    font-weight: 700;
    position: absolute;
    opacity: 0;
    transition: opacity 0.2s ease;
}

/* Khi mở: hiện X, ẩn text */
.lhb-wrap.open .lhb-main-text  { opacity: 0; }
.lhb-wrap.open .lhb-main-close { opacity: 1; }
.lhb-wrap.open .lhb-main {
    background: linear-gradient(135deg, #e63946, #c1121f);
    box-shadow: 0 4px 16px rgba(230, 57, 70, 0.5);
}

/* Icon chung */
.lhb-icon {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 3px 12px rgba(0,0,0,0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: translate(0, 0) scale(0.4);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
    text-decoration: none;
}

.lhb-icon img {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

/* Tooltip */
.lhb-tooltip {
    position: absolute;
    right: 58px;
    bottom: 12px;
    background: rgba(0,0,0,0.7);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 4px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}
 
.lhb-icon:hover .lhb-tooltip {
    opacity: 1;
}

/* Hiện tooltip khi button đang mở */
.lhb-wrap.open .lhb-icon .lhb-tooltip {
    opacity: 1;
}

/*
  Vị trí 4 icon khi mở — cung tròn bên trái
  Radius: 90px — Góc đều nhau 40°: 120° → 160° → 200° → 240°
  120°: x=-45,  y=-78
  160°: x=-85,  y=-31
  200°: x=-85,  y= 31
  240°: x=-45,  y= 78
*/
.lhb-wrap.open .lhb-icon[data-index="0"] {
    opacity: 1;
    transform: translate(-45px, -78px) scale(1);
    pointer-events: auto;
    transition-delay: 0.00s;
}
.lhb-wrap.open .lhb-icon[data-index="1"] {
    opacity: 1;
    transform: translate(-85px, -31px) scale(1);
    pointer-events: auto;
    transition-delay: 0.06s;
}
.lhb-wrap.open .lhb-icon[data-index="2"] {
    opacity: 1;
    transform: translate(-85px, 31px) scale(1);
    pointer-events: auto;
    transition-delay: 0.12s;
}
.lhb-wrap.open .lhb-icon[data-index="3"] {
    opacity: 1;
    transform: translate(-45px, 78px) scale(1);
    pointer-events: auto;
    transition-delay: 0.18s;
}

/* Mobile */
@media (max-width: 480px) {
    .lhb-wrap {
        right: 4%;
    }

    /*
      Mobile: quarter circle từ trên xuống trái — radius 105px
      Góc đều 30°: 90° → 120° → 150° → 180°
       90°: x=  0,  y=-105
      120°: x=-53,  y=-91
      150°: x=-91,  y=-53
      180°: x=-105, y=  0
    */
    .lhb-wrap.open .lhb-icon[data-index="0"] {
        transform: translate(0px, -105px) scale(1);
        transition-delay: 0.00s;    }

    .lhb-wrap.open .lhb-icon[data-index="1"] {
        transform: translate(-53px, -91px) scale(1);
        transition-delay: 0.06s;    }

    .lhb-wrap.open .lhb-icon[data-index="2"] {
        transform: translate(-91px, -53px) scale(1);
        transition-delay: 0.12s;    }

    .lhb-wrap.open .lhb-icon[data-index="3"] {
        transform: translate(-105px, 0px) scale(1);
        transition-delay: 0.18s;    }

    /* Tooltip icon Gọi Ngay */

    .lhb-icon[data-index="0"] .lhb-tooltip {
        right: 42px;
        bottom: 50px; }

    }















