/* ===========================================================
   FLOATING ACTION STACK (bottom-right, stacked top to bottom):
     1. .call-float      — brand gold, "call us" CTA
     2. .whatsapp-float  — brand WhatsApp green
     3. .scroll-top-btn  — neutral utility, back-to-top w/ ring
   =========================================================== */

/* ===========================================================
   WHATSAPP FLOAT BUTTON
   Fixed bottom-right, stacked between the call button above it
   and the scroll-to-top button (.scroll-top-btn) below it. Uses
   brand WhatsApp green with a soft pulse ring to draw attention
   without being obnoxious.
   =========================================================== */

.whatsapp-float {
    position: fixed;
    right: 2rem;
    bottom: 6.25rem;
    /* sits above #scroll-progress-btn (bottom: 2rem, 52px tall) */
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: #25d366;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.35), 0 4px 20px rgba(0, 0, 0, 0.1);
    z-index: 9998;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: transform var(--dur-fast, 0.25s) var(--ease-out, ease),
        box-shadow var(--dur-fast, 0.25s) var(--ease-out, ease);
}

.whatsapp-float:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 28px rgba(37, 211, 102, 0.45), 0 6px 24px rgba(0, 0, 0, 0.12);
}

.whatsapp-float:active {
    transform: translateY(-1px) scale(0.98);
}

.whatsapp-float svg {
    width: 26px;
    height: 26px;
    fill: #fff;
    position: relative;
    z-index: 1;
}

/* Pulse ring */
.whatsapp-float::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: #25d366;
    opacity: 0.55;
    animation: whatsapp-pulse 2.4s ease-out infinite;
    z-index: 0;
}

@keyframes whatsapp-pulse {
    0% {
        transform: scale(1);
        opacity: 0.55;
    }

    75% {
        transform: scale(1.7);
        opacity: 0;
    }

    100% {
        transform: scale(1.7);
        opacity: 0;
    }
}

/* Tooltip label on hover (desktop only) */
.whatsapp-float__tip {
    position: absolute;
    right: calc(100% + 12px);
    top: 50%;
    transform: translateY(-50%) translateX(6px);
    background: var(--ink-900, #0a1726);
    color: #fff;
    font-family: var(--font-body, "Inter", sans-serif);
    font-size: 0.8125rem;
    font-weight: 600;
    white-space: nowrap;
    padding: 0.4rem 0.75rem;
    border-radius: var(--radius-sm, 6px);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--dur-fast, 0.25s) ease, transform var(--dur-fast, 0.25s) ease;
}

.whatsapp-float:hover .whatsapp-float__tip {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
}

@media (hover: none) {
    .whatsapp-float__tip {
        display: none;
    }
}

@media (max-width: 720px) {
    .whatsapp-float {
        right: 1.25rem;
        bottom: 5.5rem;
        width: 48px;
        height: 48px;
    }

    .whatsapp-float svg {
        width: 24px;
        height: 24px;
    }
}

/* When the notice bar is present, nudge both floats down slightly
   isn't needed since they're viewport-fixed — kept here as a hook
   in case future layout requires --notice-offset awareness. */
/* ===========================================================
   WHATSAPP QUERY NOTIFICATION
   A small red "chat with us" callout that sits beside the
   WhatsApp float button on every page. Auto-appears a moment
   after load, can be dismissed (stays dismissed across the
   whole site via localStorage), and re-invites gently with a
   pulsing badge dot even after the bubble is closed.
   =========================================================== */

:root {
    --wa-notify-red: #ff3b30;
    --wa-notify-red-dark: #e0281f;
}

/* Small red badge dot on the WhatsApp icon corner */
.wa-notify-badge {
    position: fixed;
    right: 2rem;
    bottom: 6.25rem;
    width: 52px;
    height: 52px;
    pointer-events: none;
    z-index: 10000;
}

.wa-notify-badge::after {
    content: "1";
    position: absolute;
    top: -3px;
    right: -3px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border-radius: 999px;
    background: var(--wa-notify-red);
    color: #fff;
    font-family: var(--font-body, "Inter", sans-serif);
    font-size: 0.6875rem;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
    box-shadow: 0 0 0 2px #fff;
    animation: wa-badge-pop 0.4s ease-out 1.1s both, wa-badge-pulse 2s ease-in-out 1.6s infinite;
}

.wa-notify-badge.is-hidden::after {
    display: none;
}

@keyframes wa-badge-pop {
    0% {
        transform: scale(0);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes wa-badge-pulse {

    0%,
    100% {
        box-shadow: 0 0 0 2px #fff, 0 0 0 0 rgba(255, 59, 48, 0.55);
    }

    50% {
        box-shadow: 0 0 0 2px #fff, 0 0 0 6px rgba(255, 59, 48, 0);
    }
}

/* The chat callout bubble */
.wa-notify {
    position: fixed;
    right: calc(2rem + 52px + 14px);
    bottom: calc(6.25rem - 6px);
    max-width: 230px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: #fff;
    border: 1.5px solid var(--wa-notify-red);
    border-radius: 14px;
    padding: 0.6rem 0.85rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.14), 0 2px 8px rgba(255, 59, 48, 0.12);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transform: translateX(12px) scale(0.92);
    transform-origin: right center;
    transition: opacity 0.35s ease, transform 0.35s ease, visibility 0.35s;
}

.wa-notify::after {
    /* tail pointing right, toward the WhatsApp icon */
    content: "";
    position: absolute;
    right: -7px;
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
    width: 12px;
    height: 12px;
    background: #fff;
    border-right: 1.5px solid var(--wa-notify-red);
    border-bottom: 1.5px solid var(--wa-notify-red);
}

.wa-notify.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateX(0) scale(1);
}

.wa-notify__dot {
    flex-shrink: 0;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--wa-notify-red);
    box-shadow: 0 0 0 rgba(255, 59, 48, 0.5);
    animation: wa-dot-pulse 1.8s ease-in-out infinite;
}

@keyframes wa-dot-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 59, 48, 0.55);
    }

    70% {
        box-shadow: 0 0 0 6px rgba(255, 59, 48, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(255, 59, 48, 0);
    }
}

.wa-notify__text {
    margin: 0;
    font-family: var(--font-body, "Inter", sans-serif);
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1.35;
    color: var(--ink-900, #1a1a1a);
}

.wa-notify__text b {
    color: var(--wa-notify-red-dark);
}

.wa-notify__close {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    border: none;
    background: transparent;
    color: #9aa0a6;
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s ease, color 0.2s ease;
}

.wa-notify__close:hover {
    background: #f2f2f2;
    color: var(--wa-notify-red);
}

/* Mobile: show the bubble above the button instead of beside it,
   so it never runs off the edge of a narrow screen. */
@media (max-width: 640px) {
    .wa-notify-badge {
        right: 1.25rem;
        bottom: 5.5rem;
        width: 48px;
        height: 48px;
    }

    .wa-notify {
        right: 1.25rem;
        bottom: calc(5.5rem + 48px + 14px);
        left: auto;
        max-width: 200px;
        transform-origin: bottom right;
        transform: translateY(10px) scale(0.92);
    }

    .wa-notify::after {
        right: 14px;
        top: auto;
        bottom: -7px;
        transform: rotate(45deg);
        border-right: none;
        border-bottom: none;
        border-left: 1.5px solid var(--wa-notify-red);
        border-top: 1.5px solid var(--wa-notify-red);
    }

    .wa-notify.is-visible {
        transform: translateY(0) scale(1);
    }
}

@media (prefers-reduced-motion: reduce) {

    .wa-notify-badge::after,
    .wa-notify__dot {
        animation: none;
    }
}

/* ===========================================================
   CALL FLOAT BUTTON
   Fixed bottom-right, stacked directly above .whatsapp-float.
   Uses the brand gold gradient — the site's primary CTA
   treatment — so the "call now" action reads as the most
   prominent of the three floating actions.
   =========================================================== */

.call-float {
    position: fixed;
    right: 2rem;
    bottom: 10.5rem;
    /* whatsapp-float bottom (6.25rem) + its height (52px) + gap */
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--gradient-gold);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ink-navy);
    box-shadow: var(--shadow-gold);
    z-index: 9998;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: transform var(--dur-fast) var(--ease-out),
        box-shadow var(--dur-fast) var(--ease-out);
}

.call-float:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 22px 42px rgba(150, 112, 43, 0.4);
}

.call-float:active {
    transform: translateY(-1px) scale(0.98);
}

.call-float svg {
    width: 22px;
    height: 22px;
    position: relative;
    z-index: 1;
}

.call-float__tip {
    position: absolute;
    right: calc(100% + 12px);
    top: 50%;
    transform: translateY(-50%) translateX(6px);
    background: var(--ink-navy);
    color: #fff;
    font-family: var(--font-body);
    font-size: 0.8125rem;
    font-weight: 600;
    white-space: nowrap;
    padding: 0.4rem 0.75rem;
    border-radius: var(--radius-sm);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--dur-fast) ease, transform var(--dur-fast) ease;
}

.call-float:hover .call-float__tip {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
}

@media (hover: none) {
    .call-float__tip {
        display: none;
    }
}

@media (max-width: 720px) {
    .call-float {
        right: 1.25rem;
        bottom: 9.25rem;
        width: 48px;
        height: 48px;
    }

    .call-float svg {
        width: 20px;
        height: 20px;
    }
}

/* ===========================================================
   SCROLL-TO-TOP BUTTON WITH SCROLL-PROGRESS RING
   Fixed bottom-right, stacked directly below .whatsapp-float.
   A thin ring traces how far down the page you are and sweeps
   closed as you scroll back up; the button itself only appears
   once you've scrolled past the fold.
   =========================================================== */

.scroll-top-btn {
    position: fixed;
    right: 2rem;
    bottom: 2rem;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--brand-navy);
    box-shadow: var(--shadow-md);
    z-index: 9998;
    border: none;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px) scale(0.9);
    pointer-events: none;
    transition: opacity var(--dur-base) var(--ease-out),
        transform var(--dur-base) var(--ease-out),
        visibility var(--dur-base),
        color var(--dur-fast) ease,
        box-shadow var(--dur-fast) var(--ease-out);
}

.scroll-top-btn.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.scroll-top-btn:hover {
    color: var(--ink-navy);
    box-shadow: var(--shadow-lg);
    transform: translateY(-3px) scale(1.05);
}

.scroll-top-btn.is-visible:hover {
    transform: translateY(-3px) scale(1.05);
}

.scroll-top-btn:active {
    transform: translateY(-1px) scale(0.98);
}

/* Ring sits absolutely behind the arrow, rotated so progress
   starts from 12 o'clock rather than 3 o'clock. */
.scroll-top-btn__ring {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.scroll-top-btn__ring-track {
    fill: none;
    stroke: var(--border-strong);
    stroke-width: 2.5;
}

.scroll-top-btn__ring-progress {
    fill: none;
    stroke: var(--gold);
    stroke-width: 2.5;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.1s linear;
}

.scroll-top-btn__arrow {
    width: 20px;
    height: 20px;
    position: relative;
    z-index: 1;
}

.scroll-top-btn__tip {
    position: absolute;
    right: calc(100% + 12px);
    top: 50%;
    transform: translateY(-50%) translateX(6px);
    background: var(--ink-navy);
    color: #fff;
    font-family: var(--font-body);
    font-size: 0.8125rem;
    font-weight: 600;
    white-space: nowrap;
    padding: 0.4rem 0.75rem;
    border-radius: var(--radius-sm);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--dur-fast) ease, transform var(--dur-fast) ease;
}

.scroll-top-btn:hover .scroll-top-btn__tip {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
}

@media (hover: none) {
    .scroll-top-btn__tip {
        display: none;
    }
}

@media (max-width: 720px) {
    .scroll-top-btn {
        right: 1.25rem;
        bottom: 1.25rem;
        width: 48px;
        height: 48px;
    }

    .scroll-top-btn__arrow {
        width: 18px;
        height: 18px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .scroll-top-btn {
        transition: opacity var(--dur-fast) ease, visibility var(--dur-fast);
    }
}