/* ==========================================================================
   INNOVATIVE IT SOLUTIONS — 100% MOBILE RESPONSIVE & NATIVE APP EXPERIENCE
   Version: 3.0 (Mobile App-Shell Engine)
   ========================================================================== */

/* ─── 1. GLOBAL MOBILE SAFETY & TOUCH RESET ──────────────────────────────── */
html {
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden;
    overflow-y: visible;
    width: 100%;
    position: relative;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
}

/* Native Tap Target & Tactile Press Feedback */
button, 
a.btn, 
.btn-primary-pill, 
.nav-link-v3, 
.app-dock-item,
.bento-tile {
    touch-action: manipulation;
}

button:active, 
a.btn:active, 
.btn-primary-pill:active, 
.app-dock-item:active {
    transform: scale(0.96) !important;
    transition: transform 0.12s ease !important;
}

/* Mobile Safe Body Padding for Fixed Bottom App Dock */
@media (max-width: 991px) {
    body {
        padding-bottom: calc(72px + env(safe-area-inset-bottom, 12px)) !important;
    }
}

/* ─── 2. NATIVE MOBILE APP BOTTOM NAVIGATION DOCK ────────────────────────── */
.app-bottom-dock {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1045;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.06);
    padding: 6px 12px calc(6px + env(safe-area-inset-bottom, 6px));
}

@media (max-width: 991px) {
    .app-bottom-dock {
        display: flex;
        align-items: center;
        justify-content: space-around;
    }
}

.app-dock-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #64748B;
    padding: 6px 10px;
    border-radius: 14px;
    position: relative;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 60px;
    border: none;
    background: transparent;
    cursor: pointer;
}

.app-dock-item i {
    font-size: 1.25rem;
    margin-bottom: 3px;
    transition: all 0.2s ease;
}

.app-dock-label {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.2px;
}

.app-dock-item.active {
    color: #F05223 !important;
}

.app-dock-item.active i {
    transform: translateY(-2px);
    color: #F05223;
}

.app-dock-item.active::after {
    content: '';
    position: absolute;
    bottom: 2px;
    width: 14px;
    height: 3px;
    border-radius: 9999px;
    background: #F05223;
    box-shadow: 0 0 8px rgba(240, 82, 35, 0.6);
}

.app-dock-badge {
    position: absolute;
    top: 2px;
    right: 12px;
    background: #F05223;
    color: #FFFFFF;
    font-size: 0.62rem;
    font-weight: 800;
    padding: 2px 5px;
    border-radius: 9999px;
    line-height: 1;
    border: 2px solid #FFFFFF;
}

/* Center Menu Action Dock Item */
.app-dock-item.app-dock-center-action {
    color: #F05223;
}
.app-dock-item.app-dock-center-action i {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, #F05223 0%, #FF7B54 100%);
    color: #ffffff !important;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(240, 82, 35, 0.35);
    font-size: 1.1rem;
    margin-bottom: 3px;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.app-dock-item.app-dock-center-action:active i {
    transform: scale(0.92);
}
.app-dock-item.app-dock-center-action .app-dock-label {
    color: #F05223;
    font-weight: 800;
}

/* ─── 3. SLIDE-UP BOTTOM SHEET (NATIVE APP DRAWER) ───────────────────────── */
.app-bottom-sheet-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1060;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.app-bottom-sheet-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.app-bottom-sheet {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1065;
    background: #FFFFFF;
    border-radius: 28px 28px 0 0;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.18);
    transform: translateY(100%);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    padding-bottom: calc(20px + env(safe-area-inset-bottom, 15px));
}

.app-bottom-sheet-overlay.active .app-bottom-sheet {
    transform: translateY(0);
}

.sheet-drag-handle {
    width: 44px;
    height: 5px;
    background: #CBD5E1;
    border-radius: 9999px;
    margin: 12px auto 8px;
    flex-shrink: 0;
}

.sheet-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 24px 16px;
    border-bottom: 1px solid #F1F5F9;
}

.sheet-body-scroll {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 20px 24px;
}

/* Mobile App Launchpad Grid */
.app-grid-launchpad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-bottom: 24px;
}

.launchpad-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
    border-radius: 20px;
    padding: 16px 10px;
    text-decoration: none;
    color: #0F172A;
    transition: all 0.2s ease;
}

.launchpad-card:hover, .launchpad-card:active {
    background: #FFF7ED;
    border-color: #FED7AA;
    color: #F05223;
    transform: translateY(-2px);
}

.launchpad-icon {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    margin-bottom: 8px;
}

.icon-home { background: #FFF7ED; color: #F05223; }
.icon-services { background: #EFF6FF; color: #2563EB; }
.icon-shop { background: #ECFDF5; color: #059669; }
.icon-portfolio { background: #FAF5FF; color: #9333EA; }
.icon-team { background: #EFF6FF; color: #0284C7; }
.icon-intern { background: #ECFDF5; color: #10B981; }
.icon-blog { background: #FFFBEB; color: #D97706; }
.icon-contact { background: #FEF2F2; color: #DC2626; }
.icon-verify { background: #F0FDF4; color: #16A34A; }

.launchpad-title {
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.2;
}

/* Quick Action Row in Sheet */
.sheet-quick-actions {
    display: flex;
    gap: 10px;
}

.btn-sheet-call {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #10B981;
    color: #FFFFFF;
    font-weight: 700;
    font-size: 0.9rem;
    padding: 14px;
    border-radius: 16px;
    text-decoration: none;
}

.btn-sheet-wa {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #25D366;
    color: #FFFFFF;
    font-weight: 700;
    font-size: 0.9rem;
    padding: 14px;
    border-radius: 16px;
    text-decoration: none;
}

/* ─── 4. SMART STICKY HEADER REFINEMENT ON MOBILE ────────────────────────── */
@media (max-width: 991px) {
    .header-v3 {
        top: 8px !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        padding: 0 12px !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        box-sizing: border-box !important;
    }

    .navbar-v3-main {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 auto !important;
        padding: 8px 14px !important;
        border-radius: 20px !important;
        background: rgba(255, 255, 255, 0.96) !important;
        box-shadow: 0 4px 18px rgba(0, 0, 0, 0.08) !important;
        box-sizing: border-box !important;
    }

    .navbar-v3-main .container-fluid {
        padding-left: 0 !important;
        padding-right: 0 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
    }

    .brand-logo-wrap img {
        height: 34px !important;
        width: auto !important;
        display: block !important;
    }

    .navbar-collapse {
        display: none !important; /* Hide old bulky bootstrap dropdown, replaced by native bottom sheet */
    }

    /* Modern sleek mobile menu trigger in top navbar */
    .navbar-toggler-v3 {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        width: 36px !important;
        height: 36px !important;
        background: #ffffff !important;
        border: 1px solid rgba(0, 0, 0, 0.08) !important;
        border-radius: 10px !important;
        padding: 0 !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
        cursor: pointer !important;
        margin-left: 4px;
    }
    .navbar-toggler-v3:active {
        transform: scale(0.92) !important;
    }
    .navbar-toggler-v3 .nav-toggle-icon {
        width: 16px !important;
        height: 12px !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: space-between !important;
    }
    .navbar-toggler-v3 .nav-toggle-icon span {
        display: block !important;
        width: 100% !important;
        height: 2px !important;
        background: #0f172a !important;
        border-radius: 2px !important;
        margin: 0 !important;
    }

    .mobile-header-quick-actions {
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .btn-mobile-call-pill {
        background: #F05223;
        color: #FFFFFF !important;
        padding: 7px 14px;
        border-radius: 9999px;
        font-size: 0.78rem;
        font-weight: 700;
        text-decoration: none;
        display: inline-flex;
        align-items: center;
        gap: 6px;
        box-shadow: 0 3px 10px rgba(240, 82, 35, 0.3);
    }
}

/* ─── 5. TYPOGRAPHY & SPACING FLUID SCALING ──────────────────────────────── */
@media (max-width: 768px) {
    section {
        padding: 50px 0 !important;
    }

    .ptb-120 {
        padding-top: 60px !important;
        padding-bottom: 60px !important;
    }

    .container {
        padding-left: 18px !important;
        padding-right: 18px !important;
    }

    h1, .hero-content h1, .hero-title-cinematic {
        font-size: clamp(1.8rem, 6vw, 2.4rem) !important;
        line-height: 1.2 !important;
        letter-spacing: -0.02em !important;
    }

    h2, .section-title h2 {
        font-size: clamp(1.5rem, 5vw, 1.9rem) !important;
        line-height: 1.25 !important;
    }

    h3 {
        font-size: 1.3rem !important;
    }

    p, .lead, .hero-content p, .hero-subtitle-cinematic {
        font-size: 0.95rem !important;
        line-height: 1.55 !important;
    }

    .hero-section {
        padding: 95px 0 40px !important;
        text-align: center !important;
    }
}

/* ─── 6. MOBILE 2-COLUMN E-COMMERCE GRID & CARD TWEAKS ───────────────────── */
@media (max-width: 768px) {
    /* Shop 2-Column Product Grid on Mobile */
    .shop-product-grid {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
    }

    .product-card {
        border-radius: 18px !important;
        padding: 10px !important;
    }

    .product-thumbnail {
        height: 140px !important;
        border-radius: 14px !important;
    }

    .product-title {
        font-size: 0.85rem !important;
        margin-top: 6px !important;
    }

    .product-price {
        font-size: 0.9rem !important;
    }

    /* Floating Socials adjustment on mobile so it doesn't block content */
    .floating-socials-wrap {
        display: none !important; /* Replaced by bottom nav & sheet */
    }

    .theme-switch-wrap {
        display: none !important; /* Integrated cleanly */
    }
}

/* ─── 7. HORIZONTAL SNAP-SWIPE UTILITIES ─────────────────────────────────── */
.app-snap-container {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    gap: 14px;
    padding: 10px 4px 16px;
    scrollbar-width: none; /* Firefox */
}

.app-snap-container::-webkit-scrollbar {
    display: none; /* Chrome, Safari */
}

.app-snap-card {
    flex: 0 0 82%;
    scroll-snap-align: center;
    border-radius: 20px;
}

@media (min-width: 576px) {
    .app-snap-card {
        flex: 0 0 60%;
    }
}

@media (min-width: 768px) {
    .app-snap-card {
        flex: 0 0 45%;
    }
}

/* ─── 8. TABLES & CODE OVERFLOW SAFETY ───────────────────────────────────── */
.table-responsive {
    border-radius: 16px;
    -webkit-overflow-scrolling: touch;
}

img, svg, video {
    max-width: 100%;
    height: auto;
}

/* ─── 9. GLOBAL MOBILE FORM & TOUCH OPTIMIZATIONS (PHASE 1) ───────────────── */
@media (max-width: 768px) {
    /* Prevent iOS Safari auto-zoom on input focus */
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="number"],
    input[type="tel"],
    input[type="url"],
    input[type="search"],
    select,
    textarea {
        font-size: 16px !important;
    }

    /* Container safety */
    .container, .container-fluid {
        padding-left: 16px !important;
        padding-right: 16px !important;
    }

    /* Footer safe area clearance above bottom app dock */
    footer, .footer-v2 {
        padding-bottom: calc(85px + env(safe-area-inset-bottom, 15px)) !important;
    }
}

/* Ultra-narrow Mobile Screens (iPhone SE, Galaxy Fold, 320px - 380px) */
@media (max-width: 380px) {
    .navbar-v3-main {
        padding: 6px 10px !important;
        border-radius: 16px !important;
    }

    .brand-logo-wrap img {
        height: 28px !important;
        max-width: 110px !important;
    }

    .btn-mobile-call-pill {
        padding: 5px 10px !important;
        font-size: 0.72rem !important;
        gap: 4px !important;
    }

    .navbar-toggler-v3 {
        width: 32px !important;
        height: 32px !important;
        border-radius: 8px !important;
    }

    .navbar-toggler-v3 .nav-toggle-icon {
        width: 14px !important;
        height: 10px !important;
    }
}

/* ─── 10. HORIZONTAL SCROLL UTILITY FOR TABS & PILLS (APP STYLE) ─────────── */
.app-h-scroll {
    display: flex !important;
    overflow-x: auto !important;
    white-space: nowrap !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important; /* Firefox */
    -ms-overflow-style: none !important;  /* IE/Edge */
    padding-bottom: 4px !important;
    padding-top: 2px !important;
    gap: 8px !important;
}

.app-h-scroll::-webkit-scrollbar {
    display: none !important; /* Chrome, Safari */
}