/* ============================================================
   Shared UI extras for all 3 ship samples:
     - Floating WhatsApp action button (FAB)
     - Mobile hamburger overlay menu
     - Cross-sample mobile responsiveness refinements
   ============================================================ */

/* ---------- WHATSAPP FLOATING BUTTON ---------- */
.wa-fab {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 9998;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #25d366;
    color: #fff;
    display: grid;
    place-items: center;
    box-shadow:
        0 12px 28px rgba(37, 211, 102, .45),
        0 4px 10px rgba(0, 0, 0, .15);
    text-decoration: none;
    transition: transform .2s, box-shadow .2s;
    animation: wa-pulse 2.4s infinite ease-out;
}
.wa-fab:hover {
    transform: translateY(-3px) scale(1.06);
    box-shadow:
        0 18px 36px rgba(37, 211, 102, .55),
        0 4px 10px rgba(0, 0, 0, .2);
    color: #fff;
}
.wa-fab svg { width: 32px; height: 32px; }

.wa-fab::before {
    content: '';
    position: absolute; inset: 0;
    border-radius: 50%;
    border: 2px solid #25d366;
    opacity: 0;
    animation: wa-ring 2.4s infinite ease-out;
}
@keyframes wa-pulse {
    0%, 100% { box-shadow: 0 12px 28px rgba(37,211,102,.45), 0 4px 10px rgba(0,0,0,.15); }
    50%      { box-shadow: 0 12px 28px rgba(37,211,102,.65), 0 4px 10px rgba(0,0,0,.15), 0 0 0 8px rgba(37,211,102,.18); }
}
@keyframes wa-ring {
    0%   { transform: scale(1);   opacity: .6; }
    100% { transform: scale(1.6); opacity: 0; }
}

.wa-tip {
    position: fixed;
    right: 96px;
    bottom: 34px;
    z-index: 9997;
    background: #fff;
    color: #111;
    border-radius: 12px;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 10px 30px rgba(0,0,0,.18);
    opacity: 0;
    transform: translateX(10px);
    transition: opacity .25s, transform .25s;
    pointer-events: none;
    white-space: nowrap;
}
.wa-tip::after {
    content: '';
    position: absolute;
    right: -6px; top: 50%;
    transform: translateY(-50%) rotate(45deg);
    width: 12px; height: 12px;
    background: #fff;
    box-shadow: 2px -2px 4px rgba(0,0,0,.04);
}
.wa-tip.show {
    opacity: 1;
    transform: translateX(0);
}

@media (max-width: 600px) {
    .wa-fab  { right: 16px; bottom: 16px; width: 56px; height: 56px; }
    .wa-fab svg { width: 28px; height: 28px; }
    .wa-tip { display: none; }
}

/* ---------- MOBILE HAMBURGER ---------- */
.mobile-toggle {
    display: none;
    width: 44px; height: 44px;
    border-radius: 10px;
    border: none;
    background: rgba(255,255,255,.1);
    color: #fff;
    cursor: pointer;
    align-items: center; justify-content: center;
    z-index: 70;
    -webkit-tap-highlight-color: transparent;
}
.mobile-toggle:focus { outline: 2px solid currentColor; outline-offset: 2px; }
.mobile-toggle svg { width: 24px; height: 24px; }

/* Force the toggle to be visible only on mobile.
   The nav <ul> hides on the same breakpoint. */
@media (max-width: 900px) {
    .mobile-toggle { display: inline-flex !important; }
    nav.nav ul,
    .nav .nav-inner ul,
    .nav ul { display: none !important; }
}

/* ---------- MOBILE OVERLAY MENU ---------- */
.mobile-menu {
    position: fixed;
    inset: 0;
    z-index: 9990;
    background: rgba(15, 23, 42, .96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    flex-direction: column;
    padding: 80px 28px 40px;
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s ease;
}
.mobile-menu.open {
    opacity: 1;
    pointer-events: auto;
}
.mobile-menu-close {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 44px; height: 44px;
    background: rgba(255,255,255,.1);
    border: none; border-radius: 10px;
    color: #fff;
    cursor: pointer;
    display: grid; place-items: center;
}
.mobile-menu-close svg { width: 26px; height: 26px; }
.mobile-menu ul {
    list-style: none;
    margin: 0; padding: 0;
    display: flex; flex-direction: column;
    gap: 4px;
}
.mobile-menu ul a {
    display: block;
    color: #fff;
    text-decoration: none;
    padding: 18px 8px;
    font-size: 20px;
    font-weight: 600;
    letter-spacing: .3px;
    border-bottom: 1px solid rgba(255,255,255,.08);
}
.mobile-menu ul a:hover,
.mobile-menu ul a.active {
    color: #38bdf8;
}
.mobile-menu .mm-cta {
    margin-top: 28px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.mobile-menu .mm-cta a {
    text-align: center;
    padding: 14px;
    border-radius: 12px;
    font-weight: 700;
    text-decoration: none;
    font-size: 15px;
}
.mobile-menu .mm-cta .mm-call {
    background: #25d366;
    color: #fff;
}
.mobile-menu .mm-cta .mm-quote {
    background: linear-gradient(135deg, #3b82f6, #06b6d4);
    color: #fff;
}
.mobile-menu .mm-foot {
    margin-top: auto;
    padding-top: 30px;
    color: #94a3b8;
    font-size: 12px;
    text-align: center;
    letter-spacing: 1px;
    text-transform: uppercase;
}

body.menu-open { overflow: hidden; }

/* ---------- GLOBAL MOBILE REFINEMENTS ---------- */

/* Tap target & font-size baseline */
@media (max-width: 900px) {

    /* All buttons & .btn-style links: bigger tap targets */
    .btn, button.btn, a.btn { min-height: 44px; }

    /* Stop the topbar/nav wrapping awkwardly */
    nav.nav .nav-inner {
        flex-wrap: nowrap;
        gap: 12px;
    }
    nav.nav .nav-inner > a.nav-cta,
    nav.nav .nav-inner > .btn-grad,
    nav.nav .nav-inner > .nav-right { display: none !important; }

    /* Slider stays a comfortable height */
    .slider { height: 70vh; min-height: 420px; }
    .slider-content h1 { font-size: clamp(28px, 7vw, 40px) !important; }
    .slider-content p  { font-size: 14px !important; }
    .slide-caption { left: 14px; bottom: 60px; font-size: 10px; }
}

/* Tiny phones */
@media (max-width: 480px) {
    .slider { height: 62vh; min-height: 380px; }
    .slider-content { padding: 50px 16px; }
    .slider-content h1 { font-size: clamp(24px, 8vw, 34px) !important; }
    .slider-eyebrow { font-size: 10px; letter-spacing: 2.5px; padding: 5px 12px; }
    .slider-arrow { width: 36px; height: 36px; }
    .slider-arrow.prev { left: 8px; }
    .slider-arrow.next { right: 8px; }
}

/* Prevent horizontal overflow anywhere on mobile */
@media (max-width: 900px) {
    html, body { overflow-x: hidden; }
    .container, .nav-inner, .footer-inner, .stat-grid, .features, .services, .sectors {
        max-width: 100% !important;
    }
}
