/* ========================================
   Floating Widgets - WhatsApp, Back-to-Top, Sticky CTA
   ======================================== */

/* --- WhatsApp Floating Button --- */
.wa-float {
    position: fixed;
    bottom: 90px;
    right: 20px;
    z-index: 9990;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #25d366;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    box-shadow: 0 4px 14px rgba(37, 211, 102, 0.45);
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.wa-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.55);
    color: #fff;
    text-decoration: none;
}

.wa-float__pulse {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: rgba(37, 211, 102, 0.3);
    animation: wa-pulse 2s ease-out infinite;
    pointer-events: none;
}

@keyframes wa-pulse {
    0% { transform: scale(1); opacity: 0.6; }
    100% { transform: scale(1.6); opacity: 0; }
}

/* --- Back to Top Button --- */
.back-to-top {
    position: fixed;
    bottom: 24px;
    right: 20px;
    z-index: 9989;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--brand-primary, #177245);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.18);
    transition: transform 0.25s ease, opacity 0.3s ease, visibility 0.3s ease;
    opacity: 0;
    visibility: hidden;
}

.back-to-top.is-visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-3px);
    background: var(--brand-primary-deep, #0f5a36);
}

/* --- Sticky Mobile CTA Bar --- */
.sticky-cta {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9980;
    background: #fff;
    border-top: 1px solid #e5e7eb;
    box-shadow: 0 -4px 16px rgba(15, 23, 42, 0.1);
    display: none !important;
    padding: 8px 12px;
    gap: 8px;
}

.sticky-cta__btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    transition: background 0.2s ease;
    border: none;
    cursor: pointer;
}

.sticky-cta__btn--wa {
    background: #25d366;
    color: #fff;
}

.sticky-cta__btn--wa:hover {
    background: #1ebe5a;
    color: #fff;
    text-decoration: none;
}

.sticky-cta__btn--call {
    background: var(--brand-primary, #177245);
    color: #fff;
}

.sticky-cta__btn--call:hover {
    background: var(--brand-primary-deep, #0f5a36);
    color: #fff;
    text-decoration: none;
}

.sticky-cta__btn i {
    font-size: 16px;
}

/* Show mobile CTA bar only on small screens */
@media (max-width: 768px) {
    .sticky-cta {
        display: flex !important;
    }

    /* Push WhatsApp button up to avoid overlap with sticky bar */
    .wa-float {
        bottom: 80px;
    }

    .back-to-top {
        bottom: 80px;
        right: 20px;
    }
}

/* Desktop: hide sticky bar completely */
@media (min-width: 769px) {
    .sticky-cta {
        display: none !important;
        height: 0 !important;
        padding: 0 !important;
        margin: 0 !important;
        border: none !important;
        overflow: hidden !important;
        visibility: hidden !important;
    }
}
