* {
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
}


/* DESKTOP HERO FIX */

#Hero {
    align-items: center;
    gap: 30px;
    overflow: hidden;
}

#Hero > div {
    min-width: 0;
}

#Hero > div:first-child {
    flex: 1 1 58%;
}

#Hero > div:last-child {
    flex: 1 1 42%;
    display: flex;
    align-items: center;
    justify-content: center;
}

#Hero > div:last-child img {
    display: block;
    width: 100%;
    max-width: 620px;
    height: auto;
}


/* TABLET */

@media (max-width: 991.98px) {

    /* HERO */

    #Hero {
        flex-direction: column !important;
        padding: 48px 32px !important;
        gap: 25px;
    }

    #Hero > div {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
    }

    #Hero > div:first-child {
        padding: 0 !important;
    }

    #Hero > div:last-child {
        padding: 25px 0 0 !important;
    }

    #Hero h1 {
        font-size: clamp(54px, 9vw, 74px) !important;
        line-height: 1.04 !important;
    }

    #Hero p {
        max-width: 680px;
    }

    #Hero > div:last-child img {
        width: 100%;
        max-width: 560px;
    }


    /* ABOUT */

    #About {
        flex-direction: column !important;
        padding: 40px 32px !important;
        gap: 25px;
    }

    #About > div {
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 !important;
    }

    #About > div:nth-child(2) {
        width: 100% !important;
        padding: 32px !important;
    }


    /* SERVICES */

    #Services {
        padding: 40px 32px !important;
    }

    #Services > div:first-child {
        padding: 0 0 25px !important;
    }

    #Services > .d-flex.flex-row {
        padding: 0 !important;
        flex-wrap: wrap !important;
    }

    #Services .card {
        width: auto !important;
        min-width: 260px;
        max-width: none;
        flex: 1 1 calc(50% - 15px);
    }


    /* PORTFOLIO */

    #Portfolio {
        padding: 40px 32px !important;
    }

    #Portfolio > div:first-child {
        padding: 0 0 25px !important;
    }

    #Portfolio .details {
        flex-direction: column !important;
        padding: 0 !important;
        gap: 30px;
    }

    #Portfolio .details > div {
        width: 100%;
        max-width: 100%;
    }

    #Portfolio .carousel img {
        width: 100%;
        height: auto;
    }

    #Portfolio .details .d-flex.flex-row {
        flex-wrap: wrap;
    }


    /* FOOTER */

    footer > div:first-child {
        flex-wrap: wrap;
    }

    footer > div:first-child > div {
        flex: 1 1 45% !important;
    }
}


/* MOBILE PHONES */

@media (max-width: 575.98px) {

    /* HERO */

    #Hero {
        padding: 35px 20px !important;
    }

    #Hero h1 {
        font-size: clamp(42px, 12vw, 50px) !important;
        line-height: 1.05 !important;
        margin-bottom: 20px;
        overflow-wrap: normal;
        word-break: normal;
    }

    #Hero h1 span {
        display: inline-block;
    }

    #Hero p {
        font-size: 15px !important;
        line-height: 1.6;
        margin-bottom: 18px;
    }

    #Hero > div:first-child > div {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }

    #Hero .btn {
        margin: 0;
        padding: 10px 12px;
        font-size: 14px;
    }

    #Hero > div:last-child {
        padding-top: 25px !important;
    }

    #Hero > div:last-child img {
        width: 100% !important;
        max-width: 330px !important;
        margin: 0 auto;
    }


    /* ABOUT */

    #About {
        padding: 35px 20px !important;
    }

    #About h1 br {
        display: none;
    }

    #About > div:nth-child(2) {
        padding: 25px 20px !important;
        border-radius: 28px !important;
    }

    #About > div:nth-child(2) > .d-flex.flex-row {
        gap: 12px;
    }

    #About hr {
        margin: 20px 0 !important;
    }

    #About img {
        flex-shrink: 0;
    }


    /* SERVICES */

    #Services {
        padding: 35px 20px !important;
    }

    #Services > .d-flex.flex-row {
        flex-direction: column !important;
        padding: 0 !important;
        gap: 15px !important;
    }

    #Services .card {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        flex: none;
    }

    #Services .card-title,
    #Services .card p {
        word-break: normal;
        overflow-wrap: break-word;
    }


    /* ESTIMATE */

    #Estimate {
        padding-left: 20px !important;
        padding-right: 20px !important;
    }


    /* PORTFOLIO */

    #Portfolio {
        padding: 35px 20px !important;
    }

    #Portfolio .details {
        width: 100%;
        overflow: hidden;
    }

    #Portfolio .details h1,
    #Portfolio .details h5,
    #Portfolio .details h6,
    #Portfolio .details p {
        max-width: 100%;
        overflow-wrap: break-word;
    }

    #Portfolio .details .d-flex.flex-row {
        display: flex;
        flex-wrap: wrap !important;
        gap: 8px;
    }

    #Portfolio .details .vr {
        display: none !important;
    }

    #Portfolio .details h6 {
        padding: 6px 8px;
        background: #eef5ff;
        border-radius: 7px;
    }


    /* FOOTER */

    footer {
        padding: 30px 20px !important;
    }

    footer > div:first-child {
        display: grid !important;
        grid-template-columns: 1fr 1fr;
        gap: 25px 18px;
    }

    footer > div:first-child > div {
        padding: 0 !important;
        min-width: 0;
    }

    footer > div:first-child > div:first-child {
        grid-column: 1 / -1;
    }

    footer > div:last-child {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 12px;
    }

    footer p br {
        display: none;
    }

    footer .fa-brands {
        font-size: 30px !important;
    }
}


/* VERY SMALL PHONES */

@media (max-width: 360px) {

    #Hero h1 {
        font-size: 40px !important;
    }

    footer > div:first-child {
        grid-template-columns: 1fr;
    }

    footer > div:first-child > div:first-child {
        grid-column: auto;
    }
}