/* ==========================================
   BOTÓN FLOTANTE DE WHATSAPP
========================================== */

.whatsapp-float {
    position: fixed;
    right: 24px;
    bottom: 24px;

    width: 58px;
    height: 58px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #25D366;
    color: #fff;

    border-radius: 50%;
    text-decoration: none;

    font-size: 29px;

    /* Profundidad */
    box-shadow:
        0 8px 20px rgba(37, 211, 102, 0.28),
        0 3px 8px rgba(0, 0, 0, 0.12);

    z-index: 9999;

    /* Animación */
    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease,
        background-color 0.3s ease;
}


/* ==========================================
   ICONO
========================================== */

.whatsapp-float i {
    transition: transform 0.3s ease;
}


/* ==========================================
   HOVER
========================================== */

.whatsapp-float:hover {
    background: #20bd5a;
    color: #fff;

    transform: translateY(-4px) scale(1.06);

    box-shadow:
        0 14px 30px rgba(37, 211, 102, 0.38),
        0 5px 12px rgba(0, 0, 0, 0.14);
}

.whatsapp-float:hover i {
    transform: scale(1.08);
}


/* ==========================================
   TEXTO FLOTANTE
========================================== */

.whatsapp-float::before {
    content: "¿Hablamos por WhatsApp?";

    position: absolute;

    right: 72px;
    top: 50%;

    transform: translateY(-50%) translateX(8px);

    background: #ffffff;
    color: #333;

    padding: 9px 14px;

    border-radius: 10px;

    font-size: 13px;
    font-weight: 500;

    white-space: nowrap;

    box-shadow:
        0 6px 20px rgba(0, 0, 0, 0.12);

    opacity: 0;
    visibility: hidden;

    transition:
        opacity 0.25s ease,
        transform 0.25s ease,
        visibility 0.25s ease;
}


/* Pequeña flecha del mensaje */

.whatsapp-float::after {
    content: "";

    position: absolute;

    right: 65px;
    top: 50%;

    width: 8px;
    height: 8px;

    background: #ffffff;

    transform:
        translateY(-50%)
        rotate(45deg);

    opacity: 0;
    visibility: hidden;

    transition:
        opacity 0.25s ease,
        visibility 0.25s ease;
}


/* Mostrar mensaje */

.whatsapp-float:hover::before,
.whatsapp-float:hover::after {
    opacity: 1;
    visibility: visible;
}

.whatsapp-float:hover::before {
    transform:
        translateY(-50%)
        translateX(0);
}


/* ==========================================
   EFECTO DE BRILLO
========================================== */

.whatsapp-float {
    overflow: visible;
}

.whatsapp-float::marker {
    display: none;
}


/* ==========================================
   ANIMACIÓN SUTIL
========================================== */

@keyframes whatsappPulse {

    0% {
        box-shadow:
            0 8px 20px rgba(37, 211, 102, 0.28),
            0 3px 8px rgba(0, 0, 0, 0.12);
    }

    50% {
        box-shadow:
            0 8px 25px rgba(37, 211, 102, 0.40),
            0 3px 10px rgba(0, 0, 0, 0.14);
    }

    100% {
        box-shadow:
            0 8px 20px rgba(37, 211, 102, 0.28),
            0 3px 8px rgba(0, 0, 0, 0.12);
    }
}

.whatsapp-float {
    animation: whatsappPulse 3s ease-in-out infinite;
}


/* ==========================================
   RESPONSIVE
========================================== */

@media (max-width: 576px) {

    .whatsapp-float {
        right: 18px;
        bottom: 18px;

        width: 54px;
        height: 54px;

        font-size: 27px;
    }

    .whatsapp-float::before {
        right: 65px;

        font-size: 12px;
        padding: 8px 12px;
    }

    .whatsapp-float::after {
        right: 58px;
    }
}