/* ========================================
   Sticky Floating Buttons
   ======================================== */
.g-sticky-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
    display: flex;
    flex-direction: column-reverse;
    align-items: center;
    gap: 15px;
}

.g-sticky-fab-main {
    width: 60px;
    height: 60px;
    background: #0ea5e9;
    /* Default, overridden by JS/PHP */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    position: relative;
    z-index: 2;
}

.g-sticky-fab-main:hover {
    transform: scale(1.1);
}

.g-sticky-fab-main i {
    transition: transform 0.3s ease;
}

.g-sticky-container.active .g-sticky-fab-main {
    background: #ef4444 !important;
    /* Close color red */
}

/* Pulse Animation */
.g-sticky-fab-main::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: inherit;
    border-radius: 50%;
    z-index: -1;
    animation: pulse 2s infinite;
    opacity: 0.5;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.5;
    }

    100% {
        transform: scale(1.6);
        opacity: 0;
    }
}

/* Sub Buttons */
.g-sticky-fab-items {
    display: flex;
    flex-direction: column-reverse;
    gap: 15px;
    margin-bottom: 15px;
    /* Ensures spacing between main and sub items */
}

.g-sticky-fab-item {
    width: 45px;
    height: 45px;
    background: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
    font-size: 20px;
    text-decoration: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    transform: scale(0) translateY(20px);
    opacity: 0;
    transition: all 0.3s ease;
    position: relative;
}

.g-sticky-container.active .g-sticky-fab-item {
    transform: scale(1) translateY(0);
    opacity: 1;
}

/* Staggered Delay */
.g-sticky-container.active .g-sticky-fab-item:nth-child(1) {
    transition-delay: 0.05s;
}

.g-sticky-container.active .g-sticky-fab-item:nth-child(2) {
    transition-delay: 0.1s;
}

.g-sticky-container.active .g-sticky-fab-item:nth-child(3) {
    transition-delay: 0.15s;
}

.g-sticky-container.active .g-sticky-fab-item:nth-child(4) {
    transition-delay: 0.2s;
}

.g-sticky-container.active .g-sticky-fab-item:nth-child(5) {
    transition-delay: 0.25s;
}

/* Tooltips */
.g-sticky-fab-item::after {
    content: attr(data-tooltip);
    position: absolute;
    right: 60px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(15, 23, 42, 0.9);
    color: #fff;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s;
    pointer-events: none;
}

.g-sticky-fab-item:hover::after {
    opacity: 1;
    visibility: visible;
}

.g-sticky-fab-item:hover {
    transform: scale(1.1) !important;
}

/* Brand Colors */
.g-sticky-fab-item.whatsapp {
    background: #25D366;
    color: #fff;
}

.g-sticky-fab-item.phone {
    background: var(--accent);
    color: #fff;
}

.g-sticky-fab-item.instagram {
    background: #E1306C;
    color: #fff;
}

.g-sticky-fab-item.facebook {
    background: #1877F2;
    color: #fff;
}

.g-sticky-fab-item.linkedin {
    background: #0077b5;
    color: #fff;
}

/* ========================================
   Mobile Responsiveness
   ======================================== */
@media (max-width: 768px) {
    .g-sticky-container {
        bottom: 20px;
        right: 20px;
    }
    
    .g-sticky-fab-main {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
    
    .g-sticky-fab-item {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
    
    /* Adjust tooltip position for smaller screens */
    .g-sticky-fab-item::after {
        right: 50px;
        font-size: 11px;
        padding: 4px 8px;
    }
}

@media (max-width: 480px) {
    .g-sticky-container {
        bottom: 15px;
        right: 15px;
    }
    
    .g-sticky-fab-main {
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
    
    .g-sticky-fab-item {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }
    
    /* Hide tooltips on very small screens to prevent overflow */
    .g-sticky-fab-item::after {
        display: none;
    }
}