/* Desktop Styles (Min Width 1025px) */
@media (min-width: 1025px) {
    .d-custom-block {
        display: block !important;
    }
    .d-custom-flex {
        display: none !important;
    }

    /* Grid Layout */
    .homepage-4-header-row .col-custom-left {
        flex: 0 0 41.666667%;
        max-width: 41.666667%;
    }

    .homepage-4-header-row .col-custom-right {
        flex: 0 0 50%;
        max-width: 50%;
        margin-left: 8.333333%;
    }

    .homepage-4-desc {
        margin: 113px 0 0 -139px !important;
    }

    .col-custom-pillar {
        flex: 0 0 25%;
        max-width: 25%;
    }
}

@media (max-width: 1024px) {
    .homepage-navbar {
        display: none;
    }

    .menu-header {
        display: flex;
        justify-content: space-between;
    }

    .mobile-logo-image {
        display: block !important;
        text-align: left;
        width: 81px;
    }

    .menu-close-icon {
        width: 72px;
    }

    .content .homepage-first-container {
        min-height: auto;
        padding: 100px 0 50px;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .homepage-title {
        font-size: 3rem;
        text-align: left;
        margin-bottom: 20px;
        width: 100%;
    }

    .homepage-text-group {
        text-align: left;
        width: 400px;
        margin-top: 306px;
        margin-left: -476px;
    }

    .homepage-description {
        font-size: 1.2rem;
    }

    .homepage-btn-link {
        display: block;
    }

    .homepage-btn-link img {
        margin: 0 auto;
    }

    .menu-container {
        width: 100%;
        min-width: 100%;
        padding: 20px;
    }

    .d-custom-block {
        display: none !important;
    }
    .d-custom-flex {
        display: flex !important;
    }

    .homepage-4-container {
        background-image: url("/assets/images/mobile/homepage/Homepage-we-are-better.png");
        background-repeat: no-repeat;
        background-size: cover;
        background-position: center;
        width: 100%;
        padding-top: 80px;
        padding-bottom: 0;
    }

    /* Grid Layout */
    .homepage-4-header-row .col-custom-left,
    .homepage-4-header-row .col-custom-right,
    .col-custom-pillar {
        flex: 0 0 100%;
        max-width: 100%;
        margin-left: 0;
    }

    .homepage-4-desc {
        margin: 20px 0 0 0 !important;
        text-align: left;
    }

    .homepage-4-header-row h2 {
        text-align: left;
    }

    /* Mobile Pillar Card */
    .mobile-pillar-card {
        background-color: #11b9c9;
        border-radius: 20px;
        padding: 20px;
        align-items: center;
        text-align: left;
        min-height: 140px;
    }

    .mobile-pillar-icon-wrapper {
        width: 80px;
        height: 100%;
        min-width: 80px;
        margin-right: 20px;
        /* Simple trick to use existing image as icon: center it */
        display: flex;
        justify-content: center;
        align-items: flex-start; /* Show top part of image */
        overflow: hidden;
        border-radius: 50%; /* Optional: make icon circular */
        background-color: transparent;
    }

    .mobile-pillar-icon {
        width: 100%;
        height: auto;
        /* If image has text below, scaling it up might push text out of view?
           Actually, if the image is vertical, and we set width 100%, height auto,
           it will show the top part.
        */
        object-fit: cover;
        object-position: top;
        height: 100%;
    }

    .mobile-pillar-content {
        color: #fff;
    }

    .mobile-pillar-title {
        font-family: "Avenir Next Variable", sans-serif;
        font-weight: bold;
        font-size: 1.2rem;
        margin-bottom: 5px;
        color: #fff;
    }

    .mobile-pillar-text {
        font-family: "Avenir Next Variable", sans-serif;
        font-size: 0.9rem;
        line-height: 1.4;
        margin-bottom: 0;
        color: #fff;
    }

    .lets-talk-section {
        padding-top: 642px !important;
        margin-top: -616px;
    }

    .mobile-homepage-10-image {
        display: block !important;
        width: 331px;
        margin-top: 12px;
    }

    .contact-us-back-to-home {
        display: block !important;
        margin-top: 30px;
        margin-left: 10px;
        width: 127px !important;
        height: auto !important;
    }

    /* Contact Us Mobile Fixes */
    .contact-us-hero-left,
    .contact-us-hero-right {
        flex: 0 0 100%;
        max-width: 100%;
        margin-left: 0 !important;
    }

    .contact-us-hero-right {
        margin-top: 30px;
    }

    .contact-us-text-group {
        margin-top: 0 !important;
        margin-left: 0 !important;
    }

    .contact-us-title-2::after {
        content: "";
        display: block;
        width: 100%;
        height: 1px;
        background-color: #fff;
        margin-top: 20px;
    }

    .contact-form-card {
        margin-top: -208px;
    }

    .contact-us-text-group-2 {
        margin-left: -555px;
    }

    .contact-us-3-container {
        background-image: url("/assets/images/mobile/ContactUs/Contact-Us-Our-contact-details.png");
        background-repeat: no-repeat;
        background-size: cover;
        background-position: center;
        width: 100%;
        min-height: 550px; /* Fixed height for consistent look */
        display: flex;
        flex-direction: column;
        justify-content: center; /* Vertically center content */
        padding-bottom: 180px; /* Extra padding to ensure text isn't covered by card */
        position: relative;
        z-index: 1;
    }

    .contact-us-5-container {
        background-image: url("/assets/images/mobile/ContactUs/Contact-Us-Our-industrial-footprint.png");
        background-repeat: no-repeat;
        background-size: cover;
        background-position: center;
        width: 100%;
        min-height: 100vh;
        display: flex;
        flex-direction: column;
    }

    .contact-us-text-group-5 {
        margin-top: 0;
        margin-left: 0;
    }

    .contact-us-hero-row-5 {
        margin: 195px 0 0 0;
    }
}

@media (max-width: 991.5px) {
    .homepage-text-group {
        margin-left: -358px;
    }

    .category-card {
        max-height: 300px;
    }

    .partner-card {
        margin-top: 30px; /* Reset overlap on mobile */
    }

    .map-container {
        height: 300px !important;
        width: 94%;
    }

    .contact-details-card {
        margin-top: -182px;
    }

    .contact-us-text-group-2 {
        margin-left: -418px;
        margin-top: 160px;
    }
}

@media (max-width: 767.5px) {
    .homepage-text-group {
        margin-left: 0;
        margin-top: 0;
    }

    .mobile-homepage-group-1 {
        margin-top: 215px;
    }

    .category-card {
        max-height: 100%;
    }

    .contact-form-card {
        margin-top: -186px;
    }

    .contact-us-text-group-2 {
        margin-left: 0;
        margin-top: 0;
    }

    .contact-details-card {
        margin-top: -240px;
    }

    .map-container {
        width: 91%;
    }
}

@media (max-width: 518px) {
    .contact-form-card {
        margin-top: -133px;
    }
}

@media (max-width: 478px) {
    .category-card {
        max-height: 388px;
    }
}

@media (max-width: 474px) {
    .lets-talk-section {
        margin-top: -646px;
    }
}

@media (max-width: 417.5px) {
    .category-card {
        max-height: 340px;
    }
}

@media (max-width: 398px) {
    .lets-talk-section {
        margin-top: -676px;
    }

    .group-mobile-lets-talk-section {
        padding-top: 36px;
    }
}

@media (max-width: 385px) {
    .lets-talk-section {
        margin-top: -703px;
    }
}

@media (max-width: 384px) {
    .group-mobile-lets-talk-section {
        padding-top: 64px;
    }
}

@media (max-width: 378px) {
    .lets-talk-section {
        margin-top: -750px;
    }

    .group-mobile-lets-talk-section {
        padding-top: 104px;
    }
}

@media (max-width: 373.5px) {
    .mobile-homepage-10-image {
        width: 276px;
    }
}

@media (max-width: 371.5px) {
    .category-card {
        max-height: 299px;
    }
}

@media (max-width: 350px) {
    .lets-talk-section {
        margin-top: -790px;
    }

    .group-mobile-lets-talk-section {
        padding-top: 146px;
    }
}

@media (max-width: 332px) {
    .category-card {
        max-height: 259px;
    }

    .contact-details-card {
        margin-top: -194px;
    }
}

@media (max-width: 326px) {
    .lets-talk-section {
        margin-top: -830px;
    }

    .group-mobile-lets-talk-section {
        padding-top: 189px;
    }
}

@media (max-width: 323.5px) {
    .lets-talk-section {
        margin-top: -869px;
    }

    .group-mobile-lets-talk-section {
        padding-top: 228px;
    }
}

@media (max-width: 320px) {
    .homepage-text-group {
        width: 274px;
    }
}

@media (max-width: 314px) {
    .mobile-homepage-10-image {
        width: 236px;
    }
}
