/**
 * Handyware Nigeria - Mobile-First & UI Enhancement Stylesheet
 * Compatible with Elementor, The7, and Elementor Pro
 */

/* ==========================================================================
   1. Global Mobile Fluid Typography & Layout Safety
   ========================================================================== */
html, body {
    overflow-x: clip !important;
    max-width: 100vw;
}

body:not(.elementor-editor-active) {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Fluid responsive headings */
@media (max-width: 768px) {
    h1, .elementor-widget-heading h1, .elementor-widget-the7-heading h1 {
        font-size: clamp(1.85rem, 6vw, 2.6rem) !important;
        line-height: 1.25 !important;
        letter-spacing: -0.02em !important;
    }
    h2, .elementor-widget-heading h2, .elementor-widget-the7-heading h2 {
        font-size: clamp(1.5rem, 5vw, 2.1rem) !important;
        line-height: 1.3 !important;
    }
    h3, .elementor-widget-heading h3, .elementor-widget-the7-heading h3 {
        font-size: clamp(1.25rem, 4vw, 1.6rem) !important;
        line-height: 1.35 !important;
    }
    p, .elementor-widget-text-editor p {
        font-size: clamp(0.95rem, 3.2vw, 1.05rem) !important;
        line-height: 1.65 !important;
    }
}

/* ==========================================================================
   2. Glassmorphism Mobile Header
   ========================================================================== */
.elementor-element-c003873 {
    position: sticky !important;
    top: 0 !important;
    z-index: 9999 !important;
    background: rgba(255, 255, 255, 0.90) !important;
    backdrop-filter: blur(16px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(16px) saturate(180%) !important;
    border-bottom: 1px solid rgba(2, 18, 40, 0.08) !important;
    box-shadow: 0 4px 20px -2px rgba(2, 18, 40, 0.05) !important;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.elementor-element-c003873.hw-header-scrolled {
    background: rgba(255, 255, 255, 0.96) !important;
    box-shadow: 0 10px 30px -4px rgba(2, 18, 40, 0.12) !important;
    padding-top: 4px !important;
    padding-bottom: 4px !important;
}

/* Enhanced Hamburger Button */
.elementor-element-08559f3 {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
}

.elementor-element-193e63a .elementor-icon,
.elementor-element-193e63a a {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 46px !important;
    height: 46px !important;
    border-radius: 12px !important;
    background: rgba(1, 194, 206, 0.08) !important;
    border: 1px solid rgba(1, 194, 206, 0.2) !important;
    transition: all 0.25s ease !important;
    cursor: pointer !important;
}

.elementor-element-193e63a .elementor-icon svg,
.elementor-element-193e63a a svg {
    width: 24px !important;
    height: 24px !important;
    fill: #01C2CE !important;
    transition: transform 0.25s ease !important;
}

.elementor-element-193e63a .elementor-icon:hover,
.elementor-element-193e63a a:hover,
.elementor-element-193e63a .elementor-icon:active,
.elementor-element-193e63a a:active {
    background: #01C2CE !important;
    transform: scale(0.95);
}

.elementor-element-193e63a .elementor-icon:hover svg,
.elementor-element-193e63a a:hover svg {
    fill: #FFFFFF !important;
}

/* ==========================================================================
   3. Mobile Navigation Drawer Popup (ID 4761)
   ========================================================================== */
.elementor-popup-modal .elementor-4761,
#elementor-popup-modal-4761 .dialog-message {
    background: #FFFFFF !important;
    box-shadow: 10px 0 40px rgba(2, 18, 40, 0.15) !important;
}

/* Drawer Close Button */
.elementor-popup-modal .dialog-close-button {
    top: 20px !important;
    right: 20px !important;
    width: 40px !important;
    height: 40px !important;
    border-radius: 50% !important;
    background: #F1F5F9 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.2s ease !important;
}

.elementor-popup-modal .dialog-close-button:hover {
    background: #E2E8F0 !important;
    transform: rotate(90deg);
}

/* Drawer Menu Items */
.elementor-4761 .the7_nav-menu .menu-item {
    border-bottom: 1px solid rgba(226, 232, 240, 0.6) !important;
}

.elementor-4761 .the7_nav-menu .menu-item > a {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 14px 4px !important;
    font-size: 1.12rem !important;
    font-weight: 500 !important;
    color: #0F172A !important;
    text-decoration: none !important;
    transition: color 0.2s ease, padding-left 0.2s ease !important;
}

.elementor-4761 .the7_nav-menu .menu-item > a:hover,
.elementor-4761 .the7_nav-menu .menu-item.current-menu-item > a {
    color: #01C2CE !important;
    padding-left: 8px !important;
}

/* Submenu dropdown inside Drawer */
.elementor-4761 .the7_nav-menu .sub-menu {
    padding-left: 14px !important;
    background: #F8FAFC !important;
    border-radius: 8px !important;
    margin: 4px 0 10px 0 !important;
}

.elementor-4761 .the7_nav-menu .sub-menu .menu-item > a {
    font-size: 0.98rem !important;
    font-weight: 400 !important;
    color: #475569 !important;
    padding: 10px 12px !important;
}

.elementor-4761 .the7_nav-menu .sub-menu .menu-item > a:hover {
    color: #01C2CE !important;
}

/* Bottom CTA in Drawer */
.elementor-4761 .the7_button_widget a {
    width: 100% !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    background: #01C2CE !important;
    color: #FFFFFF !important;
    font-weight: 600 !important;
    padding: 16px 24px !important;
    border-radius: 10px !important;
    box-shadow: 0 4px 14px rgba(1, 194, 206, 0.35) !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease !important;
}

.elementor-4761 .the7_button_widget a:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(1, 194, 206, 0.45) !important;
}

/* ==========================================================================
   4. Floating Mobile Quick-Action Button
   ========================================================================== */
.hw-floating-contact {
    display: none;
}

@media (max-width: 768px) {
    .hw-floating-contact {
        display: flex;
        position: fixed;
        bottom: 22px;
        right: 20px;
        z-index: 9990;
        align-items: center;
        gap: 8px;
        background: #01C2CE;
        color: #FFFFFF !important;
        text-decoration: none !important;
        padding: 12px 18px;
        border-radius: 50px;
        font-weight: 600;
        font-size: 14px;
        letter-spacing: 0.02em;
        box-shadow: 0 8px 24px rgba(1, 194, 206, 0.45), 0 2px 6px rgba(0, 0, 0, 0.1);
        transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease;
        animation: hw-pulse 3s infinite;
    }

    .hw-floating-contact:active {
        transform: scale(0.94);
    }

    .hw-floating-contact svg {
        width: 18px;
        height: 18px;
        fill: #FFFFFF;
    }

    @keyframes hw-pulse {
        0% { box-shadow: 0 0 0 0 rgba(1, 194, 206, 0.6), 0 8px 24px rgba(1, 194, 206, 0.45); }
        70% { box-shadow: 0 0 0 12px rgba(1, 194, 206, 0), 0 8px 24px rgba(1, 194, 206, 0.45); }
        100% { box-shadow: 0 0 0 0 rgba(1, 194, 206, 0), 0 8px 24px rgba(1, 194, 206, 0.45); }
    }
}

/* ==========================================================================
   5. Mobile-First Card & Container UI Refinements
   ========================================================================== */
@media (max-width: 768px) {
    /* Full width buttons */
    .elementor-widget-the7_button_widget a,
    .elementor-widget-button a {
        width: 100% !important;
        text-align: center !important;
        justify-content: center !important;
        min-height: 48px !important;
    }

    /* Container padding relief */
    .e-con {
        --padding-top: max(var(--padding-top, 30px), 24px);
        --padding-bottom: max(var(--padding-bottom, 30px), 24px);
    }

    /* Clean spacing for form inputs */
    .elementor-form input[type="text"],
    .elementor-form input[type="email"],
    .elementor-form input[type="tel"],
    .elementor-form textarea {
        min-height: 48px !important;
        font-size: 16px !important; /* Prevents auto-zoom on iOS */
        border-radius: 8px !important;
    }
}
/* ==========================================================================
   6. Homepage Hero Section Mobile Enhancements
   ========================================================================== */
@media (max-width: 768px) {
    .elementor-element-e6410f1 {
        min-height: auto !important;
        padding-top: 40px !important;
        padding-bottom: 50px !important;
    }

    .elementor-element-af35236 {
        width: 100% !important;
        max-width: 100% !important;
        margin-top: 20px !important;
        margin-bottom: 20px !important;
        padding: 0 16px !important;
        text-align: center !important;
    }

    .elementor-element-e614ed5 .the7-heading-title,
    .elementor-element-e614ed5 h1 {
        font-size: clamp(1.85rem, 6vw, 2.4rem) !important;
        line-height: 1.25 !important;
        text-align: center !important;
    }

    .elementor-element-8f331d8 h4,
    .elementor-element-8f331d8 .elementor-heading-title {
        font-size: 1.05rem !important;
        line-height: 1.6 !important;
        color: rgba(255, 255, 255, 0.9) !important;
        text-align: center !important;
        margin-top: 14px !important;
        margin-bottom: 24px !important;
    }

    .elementor-element-2bad868 {
        width: 100% !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 12px !important;
    }

    .elementor-element-2bad868 .elementor-widget-the7_button_widget,
    .elementor-element-2bad868 .the7_button_widget a {
        width: 100% !important;
        min-height: 50px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        font-size: 16px !important;
        font-weight: 500 !important;
        border-radius: 8px !important;
    }
}

/* ==========================================================================
   7. Homepage Client / Partner Section Mobile Enhancements
   ========================================================================== */
.elementor-element-4a363d3 {
    padding-top: 40px !important;
    padding-bottom: 40px !important;
    background: #FAFBFD !important;
}

.elementor-element-207a400 .the7-heading-title {
    text-align: center !important;
    font-size: clamp(1.35rem, 4vw, 1.85rem) !important;
    color: #0F172A !important;
    margin-bottom: 24px !important;
}

@media (max-width: 768px) {
    /* Enable grid on mobile/tablet */
    .elementor-element-bb59ee9 {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 12px !important;
        padding: 0 16px !important;
        width: 100% !important;
    }

    @media (max-width: 420px) {
        .elementor-element-bb59ee9 {
            grid-template-columns: repeat(2, 1fr) !important;
            gap: 10px !important;
        }
    }

    .elementor-element-bb59ee9 .elementor-widget-image {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        background: #FFFFFF !important;
        border-radius: 10px !important;
        padding: 12px 10px !important;
        min-height: 64px !important;
        border: 1px solid rgba(226, 232, 240, 0.8) !important;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02) !important;
        transition: transform 0.2s ease, box-shadow 0.2s ease !important;
    }

    .elementor-element-bb59ee9 .elementor-widget-image:active {
        transform: scale(0.96);
    }

    .elementor-element-bb59ee9 .elementor-widget-image img {
        max-height: 38px !important;
        width: auto !important;
        max-width: 100% !important;
        object-fit: contain !important;
        filter: grayscale(15%) !important;
        transition: filter 0.25s ease !important;
    }

    .elementor-element-bb59ee9 .elementor-widget-image:hover img,
    .elementor-element-bb59ee9 .elementor-widget-image:active img {
        filter: grayscale(0%) !important;
    }
}