/* =====================================================================
   Mobile App Experience & Bottom Tab Navigation Bar
   Matches the native mobile app tab bar design on phones/tablets (<=991px)
   ===================================================================== */

/* Hide mobile app navigation & sheet on desktop */
.mapp-bottom-nav,
.mapp-sheet,
.mapp-sheet-backdrop,
.mapp-hdr-actions {
    display: none;
}

@media (max-width: 991px) {
    /* ---- Native App Body Padding ---- */
    body {
        padding-bottom: calc(74px + env(safe-area-inset-bottom, 0px)) !important;
    }

    body.mapp-lock-scroll {
        overflow: hidden !important;
    }

    .popup-mobile-menu:not(.active) {
        pointer-events: none !important;
    }

    /* Hide desktop topbar strip on mobile so header feels like a native App Bar */
    .cmp-topbar {
        display: none !important;
    }

    /* Sleek sticky App Top Bar */
    .rbt-header.cmp-header .rbt-header-wrapper {
        background: rgba(255, 255, 255, 0.98) !important;
        backdrop-filter: saturate(180%) blur(16px);
        -webkit-backdrop-filter: saturate(180%) blur(16px);
        border-bottom: 1px solid #e6e9ef !important;
        box-shadow: 0 2px 12px rgba(15, 23, 42, 0.04) !important;
        min-height: 60px;
    }

    .rbt-header.cmp-header .mainbar-row {
        min-height: 60px;
        padding-top: 6px;
        padding-bottom: 6px;
    }

    .rbt-header.cmp-header .logo a img {
        height: 40px !important;
        width: auto;
    }

    /* Quick Call icon next to mobile menu button in app header */
    .mapp-hdr-actions {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        margin-right: 6px;
    }

    .mapp-hdr-btn {
        width: 38px;
        height: 38px;
        border-radius: 50%;
        background: #f1f5f9;
        color: #1d5b8d;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border: 1px solid #e2e8f0;
        transition: transform 0.15s ease, background 0.15s ease;
    }

    .mapp-hdr-btn:active {
        transform: scale(0.92);
        background: #e2e8f0;
    }

    /* Keep floating WhatsApp / Call buttons above the bottom tab bar */
    .rbt-floating-contact {
        bottom: calc(80px + env(safe-area-inset-bottom, 0px)) !important;
        right: 14px !important;
        z-index: 9980 !important;
    }

    /* Prevent iOS Safari auto-zoom when tapping form inputs */
    body:not(.admin) input[type="text"],
    body:not(.admin) input[type="email"],
    body:not(.admin) input[type="tel"],
    body:not(.admin) input[type="number"],
    body:not(.admin) input[type="search"],
    body:not(.admin) textarea,
    body:not(.admin) select {
        font-size: 16px !important;
        border-radius: 12px !important;
    }

    /* ---- Fixed Bottom App Navigation Bar (Exact Match to Screenshot) ---- */
    .mapp-bottom-nav {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 9990;
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        align-items: center;
        background: #ffffff;
        border-top: 1px solid #e5e7eb;
        box-shadow: 0 -4px 20px rgba(15, 23, 42, 0.06);
        padding: 7px 6px calc(7px + env(safe-area-inset-bottom, 0px));
        user-select: none;
        -webkit-user-select: none;
    }

    .mapp-tab {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-decoration: none !important;
        padding: 2px 0;
        color: #4b5563;
        position: relative;
        transition: color 0.18s ease;
    }

    /* Pill container around the icon */
    .mapp-pill {
        width: 58px;
        height: 32px;
        border-radius: 999px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: transparent;
        transition: background-color 0.2s ease, transform 0.15s ease;
    }

    .mapp-icon {
        width: 22px;
        height: 22px;
        flex-shrink: 0;
    }

    /* Show outline icon when inactive, solid icon when active */
    .mapp-tab .mapp-icon-solid {
        display: none;
    }

    .mapp-tab .mapp-icon-outline {
        display: block;
        color: #4b5563;
    }

    .mapp-tab.is-active .mapp-pill {
        background: #eaeced;
    }

    .mapp-tab.is-active .mapp-icon-solid {
        display: block;
        color: #111827;
    }

    .mapp-tab.is-active .mapp-icon-outline {
        display: none;
    }

    .mapp-label {
        font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
        font-size: 11.5px;
        font-weight: 600;
        line-height: 1.2;
        margin-top: 4px;
        color: #4b5563;
        letter-spacing: -0.01em;
        white-space: nowrap;
    }

    .mapp-tab.is-active .mapp-label {
        color: #111827;
        font-weight: 700;
    }

    .mapp-tab:active .mapp-pill {
        transform: scale(0.91);
        background: #f1f3f5;
    }

    /* ---- Native Slide-Up Bottom Sheet for Services ---- */
    .mapp-sheet-backdrop {
        display: none;
        position: fixed;
        inset: 0;
        z-index: 9985;
        background: rgba(15, 23, 42, 0.45);
        backdrop-filter: blur(3px);
        -webkit-backdrop-filter: blur(3px);
    }

    .mapp-sheet-backdrop.is-open {
        display: block;
    }

    .mapp-sheet {
        display: none;
        flex-direction: column;
        position: fixed;
        left: 0;
        right: 0;
        bottom: calc(64px + env(safe-area-inset-bottom, 0px));
        z-index: 9988;
        max-height: 76vh;
        background: #ffffff;
        border-radius: 22px 22px 0 0;
        box-shadow: 0 -14px 40px rgba(15, 23, 42, 0.18);
        overflow: hidden;
    }

    .mapp-sheet.is-open {
        display: flex;
    }

    .mapp-sheet-handle-wrap {
        display: flex;
        justify-content: center;
        padding: 10px 0 4px;
    }

    .mapp-sheet-handle {
        width: 40px;
        height: 4px;
        border-radius: 999px;
        background: #cbd5e1;
    }

    .mapp-sheet-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 6px 18px 12px;
        border-bottom: 1px solid #eef2f6;
    }

    .mapp-sheet-eyebrow {
        display: block;
        font-family: 'Manrope', sans-serif;
        font-size: 11px;
        font-weight: 800;
        text-transform: uppercase;
        letter-spacing: 1.2px;
        color: #1d5b8d;
    }

    .mapp-sheet-title {
        margin: 2px 0 0;
        font-family: 'Manrope', sans-serif;
        font-size: 18px;
        font-weight: 800;
        color: #0f2236;
    }

    .mapp-sheet-close {
        width: 34px;
        height: 34px;
        border-radius: 50%;
        border: 0;
        background: #f1f5f9;
        color: #334155;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
    }

    .mapp-sheet-search {
        display: flex;
        align-items: center;
        gap: 10px;
        margin: 12px 18px 8px;
        padding: 0 14px;
        background: #f4f7fb;
        border: 1.5px solid #e2e8f0;
        border-radius: 12px;
        color: #64748b;
    }

    .mapp-sheet-search input {
        border: 0 !important;
        background: transparent !important;
        padding: 10px 0 !important;
        width: 100%;
        font-size: 14.5px !important;
        color: #0f2236 !important;
        outline: none !important;
        box-shadow: none !important;
    }

    .mapp-sheet-body {
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding: 8px 18px 24px;
    }

    .mapp-svc-group {
        margin-bottom: 16px;
    }

    .mapp-svc-group-title {
        display: flex;
        align-items: center;
        gap: 8px;
        font-family: 'Manrope', sans-serif;
        font-size: 12.5px;
        font-weight: 800;
        text-transform: uppercase;
        letter-spacing: 0.8px;
        color: #475569;
        margin-bottom: 8px;
    }

    .mapp-svc-group-ic {
        width: 24px;
        height: 24px;
        border-radius: 7px;
        background: #eef4fa;
        color: #1d5b8d;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .mapp-svc-group-ic svg.i {
        width: 14px;
        height: 14px;
        fill: none;
        stroke: currentColor;
        stroke-width: 2;
    }

    .mapp-svc-items {
        display: grid;
        gap: 6px;
    }

    .mapp-svc-item {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        padding: 12px 14px;
        background: #f8fafc;
        border: 1px solid #e8eef5;
        border-radius: 12px;
        text-decoration: none !important;
        color: #0f2236 !important;
        font-family: 'Inter', sans-serif;
        font-size: 14px;
        font-weight: 600;
        transition: background 0.15s ease, transform 0.12s ease;
    }

    .mapp-svc-item:active {
        transform: scale(0.98);
        background: #eef4fa;
    }

    .mapp-svc-item.is-active {
        background: #eef4fa;
        border-color: #1d5b8d;
        color: #1d5b8d !important;
    }

    .mapp-svc-item svg {
        color: #94a3b8;
        flex-shrink: 0;
    }

    .mapp-sheet-quick-links {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        margin-top: 8px;
        padding-top: 14px;
        border-top: 1px solid #eef2f6;
    }

    .mapp-quick-card {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
        padding: 12px 14px;
        border-radius: 12px;
        background: linear-gradient(135deg, #0e3354, #1d5b8d);
        color: #ffffff !important;
        text-decoration: none !important;
    }

    .mapp-quick-card-alt {
        background: linear-gradient(135deg, #1e293b, #334155);
    }

    .mapp-quick-card strong {
        display: block;
        font-family: 'Manrope', sans-serif;
        font-size: 13px;
        font-weight: 800;
        color: #ffffff;
        line-height: 1.25;
    }

    .mapp-quick-card span {
        display: block;
        font-size: 11px;
        color: rgba(255, 255, 255, 0.8);
        margin-top: 2px;
        line-height: 1.3;
    }
}

@media (max-width: 600px) {
    /* Make cards, hero, and sections feel like a sleek mobile app */
    .hv2 .hero {
        padding: 86px 0 36px !important;
    }

    .hv2 .hero h1,
    .hv2 .hero .h1-like {
        font-size: 27px !important;
        line-height: 1.2 !important;
    }

    .hv2 .hero .lead {
        font-size: 14.5px !important;
        line-height: 1.55 !important;
    }

    .hv2 .hero-actions {
        display: grid !important;
        grid-template-columns: 1fr 1fr;
        gap: 10px !important;
    }

    .hv2 .hero-actions .btn {
        width: 100%;
        justify-content: center;
        padding: 12px 14px !important;
        font-size: 13.5px !important;
        border-radius: 12px !important;
    }

    .hv2 .section {
        padding: 42px 0 !important;
    }

    .hv2 .wi-form,
    .hv2 .form-card,
    .ct-form-card,
    .sc-form-card {
        border-radius: 18px !important;
        box-shadow: 0 8px 26px rgba(14, 51, 84, 0.08) !important;
    }

    .mapp-sheet-quick-links {
        grid-template-columns: 1fr;
    }
}

