/* ============================================
   RESPONSIVE FIXES - petrofit website
   Fixes: spacing, alignment, responsiveness
   ============================================ */

/* ---- 1. FIX BOOTSTRAP ROW OVERRIDE ---- */
/* The bootstrap.min.css has a broken .row with margin-left: -140px — override it */
.row {
    margin-right: calc(var(--bs-gutter-x, 1.5rem) * -0.5) !important;
    margin-left: calc(var(--bs-gutter-x, 1.5rem) * -0.5) !important;
}

/* ---- 2. FIX AUTO-CONTAINER ---- */
.auto-container {
    max-width: 1320px;
    margin: 0 auto !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
    width: 100% !important;
}

/* ---- 3. ABOUT SECTION - Remove excessive padding/margin ---- */
.about-section {
    padding: 80px 0 !important;
    overflow: hidden;
}

/* Fix: remove inline margin-left on about-thumb */
.about-thumb-wrapper .about-thumb,
.about-thumb {
    margin-left: 0 !important;
    overflow: hidden;
}

.about-thumb img {
    width: 100% !important;
    height: auto !important;
    max-width: 100%;
    border-radius: 14px;
    display: block;
    transition: transform 0.5s ease, box-shadow 0.5s ease;
}

.about-thumb:hover img {
    transform: translateY(-6px) scale(1.03);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

/* ---- 4. ABOUT RIGHT WRAPPER ---- */
.about-right-wrapper {
    margin-left: 0 !important;
    padding-left: 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
}

/* ---- 5. SEC-TITLE ---- */
.sec-title {
    margin-bottom: 30px !important;
}

.sec-title .section-title .title {
    font-size: 36px !important;
    line-height: 1.3 !important;
}

.sec-title .section-desc p {
    font-size: 16px !important;
    line-height: 1.7 !important;
    width: 100% !important;
    margin-top: 12px !important;
}

/* ---- 6. SOLVETA BUTTON ---- */
.solveta-button {
    margin-top: 24px;
}

.solveta-button a {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 13px 36px !important;
    font-size: 16px !important;
    border-radius: 45px !important;
}

.solveta-button a i {
    position: relative !important;
    right: auto !important;
    top: auto !important;
    height: auto !important;
    width: auto !important;
    line-height: normal !important;
    background: transparent !important;
}

/* ---- 7. SERVICE SECTION (Values) ---- */
.service-section {
    padding: 80px 0 !important;
}

.service-section .auto-container {
    margin-left: auto !important;
}

.service-single-box {
    border-radius: 16px;
    padding: 30px 24px !important;
    margin-bottom: 24px !important;
    height: calc(100% - 24px);
}

.service-single-box .service-title h3 {
    font-size: 22px !important;
    line-height: 1.3 !important;
    margin: 18px 0 14px !important;
}

.service-single-box p {
    font-size: 15px !important;
    line-height: 1.6 !important;
}

.service-icon img {
    width: 56px !important;
    height: 56px !important;
    object-fit: contain;
}

/* ---- 8. ABOUT-ITEM-BOX ---- */
.about-item-box {
    grid-template-columns: 1fr !important;
    margin-bottom: 30px !important;
}

.about-item-box .about-list li {
    font-size: 17px !important;
    line-height: 1.6 !important;
    margin-bottom: 10px !important;
    display: flex !important;
    align-items: flex-start;
    gap: 10px;
}

.about-item-box .about-list li img {
    margin-top: 3px;
    flex-shrink: 0;
}

.about-item-box .about-list:last-child {
    margin-left: 0 !important;
}

/* ---- 9. BREADCRUMB ---- */
.breadcumb-area {
    padding: 80px 0 !important;
}

.breadcumb-title h4 {
    font-size: 36px !important;
}

/* ---- 10. BLOG DETAILS AREA ---- */
.blog-details-area {
    margin-left: 0 !important;
    padding: 80px 0 !important;
}

/* ====================================================
   RESPONSIVE BREAKPOINTS
   ==================================================== */

/* ---- TABLET: max 1199px ---- */
@media (max-width: 1199px) {
    .about-right-wrapper {
        padding-left: 15px;
        margin-top: 30px;
    }

    .sec-title .section-title .title {
        font-size: 30px !important;
    }

    .service-single-box {
        padding: 24px 18px !important;
    }
}

/* ---- TABLET: max 991px (stacked layout) ---- */
@media (max-width: 991px) {
    .about-section {
        padding: 60px 0 !important;
    }

    .about-thumb-wrapper {
        margin-bottom: 30px !important;
        margin-left: 0 !important;
    }

    .about-thumb {
        margin-left: 0 !important;
        max-width: 100%;
    }

    .about-thumb img {
        width: 100% !important;
        max-width: 560px;
        margin: 0 auto;
        display: block;
    }

    .about-right-wrapper {
        padding-left: 0 !important;
        margin-left: 0 !important;
    }

    .sec-title .section-title .title {
        font-size: 26px !important;
        line-height: 1.35 !important;
    }

    /* Stack "what we do" columns properly */
    .col-xl-6.col-lg-12.col-md-12 {
        margin-bottom: 30px;
    }

    /* Values grid: 2 columns on tablet */
    .service-section .row .col-lg-3 {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

/* ---- MOBILE: max 767px ---- */
@media (max-width: 767px) {
    .about-section {
        padding: 50px 0 !important;
    }

    .service-section {
        padding: 50px 0 !important;
    }

    .sec-title .section-title .title {
        font-size: 22px !important;
        line-height: 1.4 !important;
    }

    .sec-title .section-sub-title .sub-title {
        font-size: 14px !important;
    }

    .sec-title .section-desc p {
        font-size: 14px !important;
    }

    /* Values: 1 column on mobile */
    .service-section .row .col-lg-3 {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .service-single-box {
        margin-bottom: 20px !important;
        height: auto !important;
    }

    .about-right-wrapper {
        padding: 0 !important;
    }

    .solveta-button a {
        padding: 12px 28px !important;
        font-size: 15px !important;
    }

    .breadcumb-area {
        padding: 50px 0 !important;
    }

    .breadcumb-title h4 {
        font-size: 26px !important;
    }

    .breadcumb-content ul li {
        font-size: 13px !important;
    }

    /* Fix inline margin hacks on mobile */
    [style*="margin-left: 250px"],
    [style*="margin-left: 190px"] {
        margin-left: 0 !important;
    }

    .about-item-box::before {
        display: none;
    }
}

/* ---- SMALL MOBILE: max 480px ---- */
@media (max-width: 480px) {
    .auto-container {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }

    .sec-title .section-title .title {
        font-size: 20px !important;
    }

    .about-thumb img {
        border-radius: 10px !important;
    }

    .service-single-box {
        padding: 20px 16px !important;
    }

    .service-single-box .service-title h3 {
        font-size: 18px !important;
    }
}

/* ====================================================
   GENERAL LAYOUT CLEANUP
   ==================================================== */

/* Prevent horizontal scroll */
body,
html {
    overflow-x: hidden;
}

/* Fix all inline margin overrides (common pattern in this codebase) */
@media (max-width: 991px) {

    [style*="margin-left:"],
    [style*="margin-left: "] {
        margin-left: 0 !important;
    }
}

/* Fix col-xl-3 custom override in bootstrap file */
@media (min-width: 1200px) {
    .col-xl-3 {
        flex: 0 0 auto;
        width: 25% !important;
    }
}

/* Ensure images are always responsive */
img {
    max-width: 100%;
    height: auto;
}

/* Fix about-thumb-wrapper alignment */
.about-thumb-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* Remove excessive bottom space in about sections */
.about-section .row {
    align-items: center !important;
}