/* =========================================================
   A&A Recovery Services — Shared Header Topbar, Running Hazard
   Line, Green Online Animations & Attached Call/WhatsApp Bar
   ========================================================= */

/* --- 1. Running Diagonal Hazard Stripe (Topbar & Sections) --- */
.topbar-hazard,
.chevron-strip {
    height: 8px;
    width: 100%;
    background-color: #0e0e10;
    background-image: linear-gradient(
        -45deg,
        #0e0e10 25%,
        #ff6a1a 25%,
        #ff6a1a 50%,
        #0e0e10 50%,
        #0e0e10 75%,
        #ff6a1a 75%,
        #ff6a1a
    );
    background-size: 28px 28px;
    animation: aaHazardMove 1.05s linear infinite;
    will-change: background-position;
}

@keyframes aaHazardMove {
    0% {
        background-position: 0 0;
    }
    100% {
        background-position: 28px 0;
    }
}

/* --- 2. Black Topbar with Online Status & Google Reviews --- */
.topbar {
    background: #0e0e10;
    color: #ffffff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.topbar-inner {
    max-width: 1240px;
    width: 100%;
    margin: 0 auto;
    padding: 6px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.topbar-online {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 4px 12px 4px 8px;
    border-radius: 999px;
    background: rgba(37, 211, 102, 0.12);
    border: 1px solid rgba(37, 211, 102, 0.42);
    color: #ffffff;
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: 0.01em;
    text-decoration: none;
    white-space: nowrap;
    animation: aaOnlinePillGlow 2.4s ease-in-out infinite;
    transition: transform 0.25s ease, background 0.25s ease;
}

.topbar-online:hover {
    background: rgba(37, 211, 102, 0.22);
    transform: translateY(-1px);
}

.topbar-online .online-text strong {
    color: #34e877;
    font-weight: 800;
}

/* Concentric pulsing green online dot */
.online-dot-wrap {
    position: relative;
    width: 14px;
    height: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.online-dot-core {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #25d366;
    box-shadow: 0 0 8px rgba(37, 211, 102, 0.9);
    position: relative;
    z-index: 2;
    animation: aaOnlineDotBeat 1.8s ease-in-out infinite;
}

.online-dot-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: rgba(37, 211, 102, 0.45);
    animation: aaOnlinePing 2s cubic-bezier(0, 0, 0.2, 1) infinite;
    pointer-events: none;
}

.online-dot-ring--2 {
    animation-delay: 0.9s;
}

.online-dot-wrap--lg {
    width: 22px;
    height: 22px;
}

.online-dot-wrap--lg .online-dot-core {
    width: 11px;
    height: 11px;
}

@keyframes aaOnlinePing {
    0% {
        transform: scale(0.75);
        opacity: 0.85;
    }
    75%, 100% {
        transform: scale(2.25);
        opacity: 0;
    }
}

@keyframes aaOnlineDotBeat {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.16);
    }
}

@keyframes aaOnlinePillGlow {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.25), 0 0 12px rgba(37, 211, 102, 0.12);
    }
    50% {
        box-shadow: 0 0 0 4px rgba(37, 211, 102, 0.08), 0 0 18px rgba(37, 211, 102, 0.28);
    }
}

/* Google Reviews Pill in Topbar */
.topbar-reviews {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 999px;
    background: #ffffff;
    color: #0e0e10;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.22);
    transition: transform 0.25s ease;
}

.topbar-reviews:hover {
    transform: translateY(-1px);
}

.topbar-reviews .g-icon {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.topbar-reviews .rev-score {
    color: #ff6a1a;
    font-weight: 900;
}

.topbar-reviews .rev-label {
    color: #0e0e10;
    font-weight: 700;
}

/* --- 3. Hero Green Animated Online Pill (index.html) --- */
.hero-badge.hero-online-pill {
    background: rgba(37, 211, 102, 0.14);
    border: 1.5px solid rgba(37, 211, 102, 0.50);
    color: #ffffff;
    padding: 9px 18px 9px 12px;
    gap: 11px;
    margin-top: 0 !important;
    animation: aaOnlinePillGlow 2.4s ease-in-out infinite;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.18);
}

.hero-badge.hero-online-pill .online-green {
    color: #34e877;
    font-weight: 900;
}

/* Compact Hero Service & Trust Pills */
.hero-pills {
    gap: 8px !important;
    margin-bottom: 18px !important;
}

.hero-pill {
    padding: 7px 12px !important;
    gap: 6px !important;
    font-size: 11.5px !important;
    line-height: 1.25;
}

.hero-pill svg {
    width: 13px !important;
    height: 13px !important;
}

/* Adjust hero/page-hero top spacing for taller fixed header (hazard + topbar + nav) */
.hero {
    padding-top: 192px;
}

.page-hero {
    padding-top: 214px;
}

/* Header Call Button Halo Animation */
.nav-phone {
    position: relative;
    animation: aaNavCallHalo 2.2s ease-in-out infinite;
}

@keyframes aaNavCallHalo {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(255, 106, 26, 0.48);
    }
    50% {
        box-shadow: 0 0 0 7px rgba(255, 106, 26, 0.08);
    }
}

/* --- 4. Attached Bottom Call & WhatsApp Bar --- */
body {
    padding-bottom: 58px;
}

.bottom-cta-bar {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: min(460px, 100%);
    z-index: 1080;
    display: grid;
    grid-template-columns: 1fr 1fr;
    border-radius: 14px 14px 0 0;
    overflow: hidden;
    box-shadow: 0 -6px 26px rgba(0, 0, 0, 0.26);
    padding-bottom: env(safe-area-inset-bottom, 0px);
    background: #0e0e10;
}

.bottom-cta-btn {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    height: 54px;
    padding: 0 14px;
    color: #ffffff !important;
    font-family: 'Inter', sans-serif;
    font-weight: 800;
    font-size: 15px;
    letter-spacing: 0.02em;
    text-decoration: none;
    transition: filter 0.25s ease, transform 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.bottom-cta-btn:active {
    transform: scale(0.98);
}

.bottom-cta-call {
    background: linear-gradient(135deg, #ff7e38, #ff5d0d);
    animation: aaBottomCallPulse 2.4s ease-in-out infinite;
}

.bottom-cta-wa {
    background: linear-gradient(135deg, #2be06e, #1cc459);
    animation: aaBottomWaPulse 2.4s ease-in-out infinite 1.2s;
}

.bottom-cta-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: -75%;
    width: 50%;
    height: 100%;
    background: linear-gradient(
        110deg,
        transparent 0%,
        rgba(255, 255, 255, 0.34) 50%,
        transparent 100%
    );
    transform: skewX(-20deg);
    animation: aaCtaShine 3.2s ease-in-out infinite;
    pointer-events: none;
}

.bottom-cta-wa::after {
    animation-delay: 1.6s;
}

.bottom-cta-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.bottom-cta-icon svg {
    width: 20px;
    height: 20px;
    display: block;
}

.bottom-cta-icon--call svg {
    animation: aaPhoneRing 2.6s ease-in-out infinite;
    transform-origin: center;
}

.bottom-cta-icon--wa svg {
    animation: aaWaBounce 2.6s ease-in-out infinite 1.3s;
    transform-origin: center;
}

@keyframes aaCtaShine {
    0% {
        left: -75%;
    }
    42%, 100% {
        left: 135%;
    }
}

@keyframes aaPhoneRing {
    0%, 58%, 100% {
        transform: rotate(0deg) scale(1);
    }
    64% {
        transform: rotate(-16deg) scale(1.12);
    }
    70% {
        transform: rotate(16deg) scale(1.12);
    }
    76% {
        transform: rotate(-12deg) scale(1.1);
    }
    82% {
        transform: rotate(10deg) scale(1.06);
    }
    88% {
        transform: rotate(0deg) scale(1);
    }
}

@keyframes aaWaBounce {
    0%, 58%, 100% {
        transform: scale(1) translateY(0);
    }
    66% {
        transform: scale(1.18) translateY(-2px);
    }
    74% {
        transform: scale(0.96) translateY(0);
    }
    82% {
        transform: scale(1.12) translateY(-1px);
    }
}

@keyframes aaBottomCallPulse {
    0%, 100% {
        filter: brightness(1);
    }
    50% {
        filter: brightness(1.09);
    }
}

@keyframes aaBottomWaPulse {
    0%, 100% {
        filter: brightness(1);
    }
    50% {
        filter: brightness(1.09);
    }
}

/* --- 5. Animate Page & Floating Call / WhatsApp Buttons --- */
.floater.call,
.floater.wa {
    position: relative;
    overflow: visible;
}

.floater.call::before,
.floater.wa::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 50%;
    z-index: -1;
    animation: aaFloaterRing 2.2s ease-out infinite;
    pointer-events: none;
}

.floater.call::before {
    border: 2px solid rgba(255, 106, 26, 0.75);
}

.floater.wa::before {
    border: 2px solid rgba(37, 211, 102, 0.75);
    animation-delay: 1.1s;
}

.floater.call svg {
    animation: aaPhoneRing 2.8s ease-in-out infinite;
}

.floater.wa svg {
    animation: aaWaBounce 2.8s ease-in-out infinite 1.4s;
}

@keyframes aaFloaterRing {
    0% {
        transform: scale(1);
        opacity: 0.85;
    }
    100% {
        transform: scale(1.48);
        opacity: 0;
    }
}

/* Hero / Mid-CTA / Form Call & WhatsApp buttons continuous sheen */
a[href^="tel:"].btn,
a[href*="wa.me"].btn {
    position: relative;
    overflow: hidden;
}

a[href^="tel:"].btn::after,
a[href*="wa.me"].btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: -80%;
    width: 45%;
    height: 100%;
    background: linear-gradient(
        110deg,
        transparent 0%,
        rgba(255, 255, 255, 0.28) 50%,
        transparent 100%
    );
    transform: skewX(-20deg);
    animation: aaCtaShine 3.6s ease-in-out infinite;
    pointer-events: none;
}

a[href*="wa.me"].btn::after {
    animation-delay: 1.8s;
}

a[href^="tel:"].btn svg {
    animation: aaPhoneRing 3s ease-in-out infinite;
}

a[href*="wa.me"].btn i,
a[href*="wa.me"].btn svg {
    animation: aaWaBounce 3s ease-in-out infinite 1.5s;
}

/* --- 6. Responsive Adjustments (Mobile & Tablet) --- */
@media (max-width: 860px) {
    .topbar-inner {
        padding: 6px 14px;
    }

    .topbar-online {
        font-size: 11.5px;
        padding: 4px 10px 4px 7px;
    }

    .topbar-reviews {
        font-size: 11.5px;
        padding: 4px 10px;
    }

    header .brand img {
        height: 62px !important;
        width: auto;
    }

    .nav-phone {
        width: 44px;
        height: 44px;
        padding: 0;
        border-radius: 50%;
        justify-content: center;
    }

    .nav-phone svg {
        width: 18px;
        height: 18px;
        stroke: #ffffff;
    }

    /* Full-width edge-to-edge split bar on mobile/tablet */
    .bottom-cta-bar {
        left: 0;
        right: 0;
        width: 100%;
        max-width: none;
        transform: none;
        border-radius: 0;
    }

    /* Hide duplicate Call & WhatsApp floaters on mobile (handled by bottom bar) */
    .floater.wa,
    .floater.call {
        display: none !important;
    }

    .floaters {
        bottom: 72px !important;
        right: 14px !important;
    }

    .scroll-to-bottom {
        bottom: 74px !important;
    }

    .back-to-top {
        bottom: 130px !important;
    }

    .hero {
        padding-top: 170px !important;
    }

    .page-hero {
        padding-top: 182px !important;
    }
}

@media (max-width: 640px) {
    .hero-pills {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 7px !important;
        margin-bottom: 14px !important;
        width: 100%;
    }

    .hero-pill {
        width: 100%;
        min-width: 0;
        padding: 6px 9px !important;
        gap: 5px !important;
        font-size: 10.5px !important;
        justify-content: flex-start;
        white-space: normal;
        line-height: 1.2;
    }

    .hero-pill svg {
        width: 12px !important;
        height: 12px !important;
    }
}

@media (max-width: 480px) {
    .hero-pill {
        padding: 6px 8px !important;
        font-size: 10px !important;
    }
    .topbar-inner {
        padding: 5px 12px;
        gap: 8px;
    }

    .topbar-online {
        font-size: 11px;
        gap: 6px;
        padding: 3px 9px 3px 6px;
    }

    .topbar-reviews {
        font-size: 11px;
        padding: 3px 9px;
        gap: 5px;
    }

    .hero-badge.hero-online-pill {
        font-size: 11px;
        padding: 7px 14px 7px 10px;
    }

    .bottom-cta-btn {
        height: 52px;
        font-size: 14.5px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .topbar-hazard,
    .chevron-strip,
    .topbar-online,
    .hero-badge.hero-online-pill,
    .online-dot-core,
    .online-dot-ring,
    .nav-phone,
    .bottom-cta-btn,
    .bottom-cta-btn::after,
    .bottom-cta-icon svg,
    .floater.call::before,
    .floater.wa::before,
    .floater.call svg,
    .floater.wa svg,
    a[href^="tel:"].btn::after,
    a[href*="wa.me"].btn::after,
    a[href^="tel:"].btn svg,
    a[href*="wa.me"].btn i,
    a[href*="wa.me"].btn svg {
        animation: none !important;
    }
}
