/* UNIFIED OVERLAY DESIGN - VERSION 2.0 */

/* Global Resets */
* {
    box-sizing: border-box !important;
}

body {
    overflow-x: hidden !important;
}

/* Service Card Container */
.service-card {
    position: relative !important;
    height: 500px !important;
    /* Premium Height */
    overflow: hidden !important;
    border-radius: 12px !important;
    border: none !important;
    background: #000 !important;
    /* Fallback for loading */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15) !important;
    margin-bottom: 30px !important;
    padding: 0 !important;
    display: flex !important;
    flex-direction: column !important;
}

/* Image Layer (Background) */
.service-icon-wrapper {
    position: absolute !important;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    z-index: 1;
}

.service-icon-wrapper img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
    border: none !important;
}

/* Hover Zoom Disabled as per request */
.service-card:hover .service-icon-wrapper img {
    transform: none !important;
}

/* Text Overlay Layer (Foreground) */
.service-card-content {
    position: absolute !important;
    bottom: 0;
    left: 0;
    width: 100% !important;
    z-index: 2;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.7) 35%, rgba(0, 0, 0, 0.95) 100%) !important;
    padding: 100px 25px 30px 25px !important;
    /* More gradient space */
    color: white !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-end !important;
    align-items: flex-start !important;
    text-align: left !important;
    pointer-events: auto !important;
    user-select: text !important;
}

/* Typography Inside Card */
.service-card h3 {
    color: white !important;
    font-size: 1.5rem !important;
    font-weight: 700 !important;
    margin: 0 0 10px 0 !important;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8) !important;
}

.service-card p {
    color: rgba(255, 255, 255, 0.95) !important;
    font-size: 1rem !important;
    margin-bottom: 20px !important;
    line-height: 1.4 !important;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8) !important;
}

/* Glassmorphic Buttons */
.service-card .btn {
    position: relative !important;
    z-index: 10 !important;
    background: rgba(255, 255, 255, 0.2) !important;
    border: 1px solid rgba(255, 255, 255, 0.4) !important;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    color: white !important;
    padding: 10px 20px !important;
    border-radius: 6px !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    pointer-events: auto !important;
    transition: all 0.3s ease !important;
}

.service-card .btn:hover {
    background: white !important;
    color: black !important;
    transform: translateY(-2px);
}

/* MOBILE RESPONSIVE FIXES */

/* Trust Bar Readability */
@media (max-width: 991px) {
    .trust-bar {
        background: #051a2e !important;
        margin-top: 0 !important;
        padding: 20px 0 !important;
        margin-bottom: 20px !important;
    }

    .trust-item {
        width: 100% !important;
        justify-content: center !important;
        padding: 10px 0 !important;
    }

    .trust-item span {
        color: white !important;
        font-size: 1.1rem !important;
    }
}

/* Grid on Mobile */
@media (max-width: 768px) {
    .service-grid {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
        padding: 0 15px !important;
    }

    .service-card {
        height: 400px !important;
        /* Slightly shorter on mobile for better scrolling */
    }
}

/* MOBILE BURGER MENU ICON FIX */
@media (max-width: 992px) {
    .menu-toggle {
        display: flex !important;
        flex-direction: column !important;
        justify-content: space-between !important;
        width: 30px !important;
        height: 22px !important;
        cursor: pointer !important;
        z-index: 9999 !important;
        position: relative !important;
        margin-left: auto !important;
        margin-right: 15px !important;
        /* Shifting left a bit */
    }

    .menu-toggle span {
        display: block !important;
        height: 4px !important;
        width: 100% !important;
        background-color: #051a2e !important;
        /* Navy Blue */
        border-radius: 2px !important;
        margin: 0 !important;
    }

    .logo {
        max-width: 80% !important;
    }
}



/* QUALITY GUARANTEE SECTION IMPROVEMENTS */
.quality-guarantee-card {
    background: var(--white) !important;
    padding: 60px 40px !important;
    border-radius: 20px !important;
    border-left: 6px solid var(--secondary-color) !important;
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.08) !important;
    position: relative !important;
    overflow: hidden !important;
    margin-bottom: 40px !important;
}

.quality-title {
    color: var(--primary-color) !important;
    font-size: 2.2rem !important;
    font-weight: 800 !important;
    margin-bottom: 45px !important;
    text-align: left !important;
}

.quality-features {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 40px !important;
}

.quality-feature-item {
    display: flex !important;
    align-items: flex-start !important;
    gap: 20px !important;
    padding: 25px !important;
    border-radius: 16px !important;
    background: #fdfdfd !important;
    border: 1px solid #f0f0f0 !important;
    transition: all 0.3s ease !important;
}

.quality-feature-item:hover {
    background: #f8f9fa !important;
    border-color: var(--secondary-color) !important;
    transform: translateY(-5px) !important;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05) !important;
}

.quality-feature-icon {
    width: 64px !important;
    height: 64px !important;
    background: rgba(197, 160, 89, 0.12) !important;
    border-radius: 14px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
    color: var(--secondary-color) !important;
}

.quality-feature-icon svg {
    width: 32px !important;
    height: 32px !important;
}

.quality-feature-text h3 {
    font-size: 1.3rem !important;
    font-weight: 750 !important;
    margin-bottom: 10px !important;
    color: var(--primary-color) !important;
    letter-spacing: -0.01em !important;
}

.quality-feature-text p {
    font-size: 0.98rem !important;
    color: #555 !important;
    line-height: 1.6 !important;
    margin: 0 !important;
}

@media (max-width: 992px) {
    .quality-features {
        grid-template-columns: 1fr !important;
        gap: 25px !important;
    }

    .quality-guarantee-card {
        padding: 40px 20px !important;
    }

    .quality-title {
        font-size: 1.8rem !important;
        margin-bottom: 30px !important;
    }
}


/* ============================================================ */
/* UNIVERSAL MOBILE OPTIMIZATION & RECOVERY                     */
/* ============================================================ */

@media (max-width: 768px) {

    /* 1. Prevent Horizontal Scroll */
    html,
    body {
        overflow-x: hidden !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .container {
        padding-left: 15px !important;
        padding-right: 15px !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 auto !important;
    }

    /* 2. Scale Typography */
    h1 {
        font-size: 2rem !important;
        line-height: 1.2 !important;
    }

    h2 {
        font-size: 1.6rem !important;
        line-height: 1.3 !important;
    }

    h3 {
        font-size: 1.3rem !important;
    }

    p {
        font-size: 1rem !important;
        line-height: 1.5 !important;
    }

    /* 2b. Hero Readability Fix */
    .hero h1,
    .hero-text-custom h1,
    h1 {
        color: #051a2e !important;
        /* Force Dark Navy */
        text-shadow: none !important;
        font-weight: 800 !important;
        font-size: 2.2rem !important;
        margin-bottom: 15px !important;
        -webkit-text-fill-color: #051a2e !important;
        filter: none !important;
    }

    /* Force "A&M" to be visible regardless of inline styles */
    .hero h1 span,
    .hero-text-custom h1 span,
    .text-brand-blue,
    h1 span {
        color: #051a2e !important;
        /* Force Dark Navy */
        text-shadow: none !important;
        -webkit-text-fill-color: #051a2e !important;
        filter: none !important;
    }

    .hero p {
        color: #333333 !important;
        /* Force Dark Gray */
        text-shadow: none !important;
        font-size: 1.1rem !important;
    }

    /* 3. Fix Hero Section - Make it Dark for Consistency */
    .hero {
        padding: 0 !important;
        /* Remove huge padding */
        min-height: auto !important;
        background: #051a2e !important;
        /* Dark Blue Background */
        margin-top: -1px !important;
        /* Remove gap */
    }

    .hero-content {
        display: flex !important;
        flex-direction: column !important;
        gap: 0 !important;
    }

    .hero-text-custom {
        padding: 40px 20px !important;
        text-align: center !important;
        align-items: center !important;
        order: 1 !important;
        background: #051a2e !important;
        /* Dark Blue */
        width: 100% !important;
    }

    .hero-visual-custom {
        margin-top: 0 !important;
        order: 2 !important;
    }

    /* Force White Text on Homepage Hero */
    .hero h1,
    .hero h1 span,
    .hero p {
        color: #ffffff !important;
        text-shadow: none !important;
        -webkit-text-fill-color: #ffffff !important;
    }

    /* Keep nd-hero content dark if needed, or check if it needs to be white too */
    .nd-hero-content {
        background: #ffffff !important;
        color: #051a2e !important;
    }

    .nd-hero-content h1,
    .nd-hero-content h1 span {
        color: #051a2e !important;
    }

    /* 4. Fix Badges Section */
    .badge-container,
    [style*="display: flex; justify-content: center; gap: 20px"] {
        gap: 10px !important;
        flex-direction: column !important;
        align-items: center !important;
    }

    .badge {
        width: 100% !important;
        max-width: 300px !important;
        text-align: left !important;
        justify-content: flex-start !important;
        margin: 5px 0 !important;
    }

    /* 5. Fix Quality Guarantee Cards */
    .quality-feature-item {
        flex-direction: column !important;
        text-align: center !important;
        align-items: center !important;
        padding: 20px !important;
    }

    .quality-feature-icon {
        margin-bottom: 15px !important;
    }

    /* 6. Alignment Fix for Logo and Burger */
    .nav-container {
        padding: 10px 15px !important;
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
    }

    .logo img {
        height: 45px !important;
        /* Smaller logo on mobile */
    }

    .logo-text span {
        font-size: 0.9rem !important;
    }

    /* 7. Fix Subpage Hero Gap */
    .hero-subpage {
        padding-top: 100px !important;
        padding-bottom: 50px !important;
        margin-top: 0 !important;
        background-color: #051a2e !important;
        /* Ensure dark bg */
        min-height: auto !important;
    }

    main {
        margin-top: 0 !important;
        padding-top: 0 !important;
    }

    body {
        padding-top: 70px !important;
        /* Adjust to match actual mobile header height */
    }
}
