/* ==========================================================================
   AYO Brothers Farm — floating contact buttons (bottom-right, every page)

   Only the WhatsApp button shows. It opens a menu above it with
   Call, Order, Email and Instagram:
     - Computer: when the mouse is over WhatsApp (hover).
     - Phone / tablet: on the first tap of WhatsApp (assets/js/float-menu.js
       adds the class "is-open"). A second tap opens the WhatsApp chat;
       tapping anywhere else closes the menu.
   ========================================================================== */

/* Instagram in the menu: same dark circle as Call/Order/Email,
   turning into Instagram's colours when pointed at or tapped */
.floating-action .action-btn--ig:hover,
.floating-action .action-btn--ig:focus-visible,
.floating-action .action-btn--ig:active {
    color: #fff;
    border-color: transparent;
    background: radial-gradient(circle at 30% 107%,
            #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285aeb 90%);
}

/* Menu open: by tap (phones), or by keyboard focus */
.floating-action.is-open .action-menu,
.floating-action:focus-within .action-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.floating-action a:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 3px;
}

/* --------------------------------------------------------------------------
   Sustainability, Outgrowers and Contact did not have this floating block
   before, so its full look is defined here (same as Home/Operations/Products).
   -------------------------------------------------------------------------- */
.ayo-float {
    position: fixed;
    right: 30px;
    bottom: 30px;
    z-index: 999;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 15px;
}

.ayo-float .action-menu {
    display: flex;
    flex-direction: column;
    gap: 10px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.ayo-float:hover .action-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.ayo-float .action-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #121a16;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.ayo-float .action-btn:hover {
    background: #1e4a38;
    transform: scale(1.1);
    color: #fff;
}

.ayo-float .main-action-btn {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    background: #25D366;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    text-decoration: none;
    box-shadow: 0 10px 25px rgba(37, 211, 102, 0.4);
    animation: ayoWaPulse 2s infinite;
}

.ayo-float .main-action-btn:hover {
    color: #fff;
}

@keyframes ayoWaPulse {
    0%   { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7); }
    70%  { box-shadow: 0 0 0 20px rgba(37, 211, 102, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

/* Phones: a little smaller and closer to the edge */
@media (max-width: 575px) {
    .floating-action {
        right: 16px;
        bottom: 16px;
    }

    .floating-action .main-action-btn {
        width: 56px;
        height: 56px;
        font-size: 28px;
    }

    .floating-action .action-btn {
        width: 46px;
        height: 46px;
        font-size: 18px;
    }
}

/* Visitors who turn off animations in their device settings */
@media (prefers-reduced-motion: reduce) {
    .floating-action .main-action-btn {
        animation: none;
    }
}

/* ==========================================================================
   Footer: "Download Company Profile" link (brand column, every page)
   ========================================================================== */
.ayo-profile-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 18px;
    padding: 10px 16px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.25s ease, border-color 0.25s ease;
}

.ayo-profile-link i {
    font-size: 18px;
    color: #ff6b5b;
}

.ayo-profile-link small {
    font-weight: 400;
    font-size: 12px;
    opacity: 0.6;
}

.ayo-profile-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(199, 255, 0, 0.35);
}

/* ==========================================================================
   Scroll-to-top button (Joe, 13 Oct 2026)
   Bottom-LEFT, so it never collides with the WhatsApp button and its menu
   on the right. Hidden at the top of the page; appears after scrolling.
   Created by assets/js/scroll-top.js.
   ========================================================================== */
.ayo-top {
    position: fixed;
    left: 30px;
    bottom: 40px;                 /* centred on the WhatsApp button's level */
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: #043222;          /* menu green */
    color: #fff;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 998;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: opacity .3s ease, transform .3s ease, visibility .3s ease, background .2s ease;
}

.ayo-top.is-visible {
    opacity: 1;
    visibility: visible;
    transform: none;
}

.ayo-top:hover { background: #0F533E; }
.ayo-top:focus-visible { outline: 2px solid #c7ff00; outline-offset: 3px; }

@media (max-width: 575px) {
    .ayo-top {
        left: 16px;
        bottom: 23px;             /* level with the smaller phone WhatsApp button */
        width: 42px;
        height: 42px;
        font-size: 16px;
    }
}
