/* =========================================================
   CONTACT US — RESPONSIVE OVERRIDES
   Load AFTER contactus.css
   Desktop design and animations are left untouched.
   ========================================================= */

html,
body {
    max-width: 100%;
    overflow-x: hidden;
}


/* =========================================================
   LARGE LAPTOP
   ========================================================= */

@media (max-width: 1200px) {

    .site-header {
        width: calc(100% - 40px);
        min-width: 0;
        padding: 0 18px;
        box-sizing: border-box;
    }

    .main-nav {
        display: flex !important;
        align-items: center;
        justify-content: center;
        gap: 22px;
        flex-wrap: nowrap;
        min-width: 0;
    }

    .main-nav a {
        display: inline-flex !important;
        align-items: center;
        white-space: nowrap;
        font-size: 14px;
    }

    .quote-button {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        width: 150px;
        min-width: 150px;
        height: 48px;
        box-sizing: border-box;
    }

    .contact-page-title {
        width: calc(100% - 60px);
    }

    .contact-panel {
        width: calc(100% - 60px);
        padding-left: 45px;
        padding-right: 45px;
        column-gap: 35px;
        box-sizing: border-box;
    }

    .site-footer {
        width: calc(100% - 30px);
        box-sizing: border-box;
    }
}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 900px) {

    .site-header {
        width: calc(100% - 24px);
        min-width: 0;
        height: auto;
        min-height: 78px;
        padding: 12px 14px;
        box-sizing: border-box;
        flex-wrap: wrap;
        justify-content: center;
        row-gap: 10px;
    }

    /*
       KEEP THE MAIN NAVIGATION VISIBLE:
       HOME / ABOUT / SERVICE / CONTACT
    */
    .main-nav {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;

        width: 100%;
        order: 2;

        align-items: center;
        justify-content: center;

        gap: 18px;
        flex-wrap: wrap;

        min-width: 0;
    }

    .main-nav a {
        display: inline-flex !important;
        visibility: visible !important;
        opacity: 1 !important;

        white-space: nowrap;
        font-size: 14px;
    }

    /*
       GET A QUOTE
    */
    .quote-button {
        display: inline-flex !important;
        visibility: visible !important;
        opacity: 1 !important;

        order: 3;

        width: 145px;
        min-width: 145px;
        max-width: 145px;

        height: 46px;

        flex-shrink: 0;

        box-sizing: border-box;

        align-items: center;
        justify-content: center;

        margin-left: auto;
        margin-right: auto;
    }

    .contact-page-title {
        width: calc(100% - 32px);
        min-height: 160px;
        height: auto;

        box-sizing: border-box;

        padding: 38px 25px;
    }

    .contact-panel {
        width: calc(100% - 32px);

        min-height: 0;

        padding: 45px 30px;

        grid-template-columns:
            minmax(0, 1fr)
            minmax(0, 1fr);

        gap: 30px;

        box-sizing: border-box;

        overflow: hidden;
    }

    .contact-panel > *,
    .contact-panel form,
    .contact-panel input,
    .contact-panel textarea,
    .contact-panel button {
        min-width: 0;
        max-width: 100%;
        box-sizing: border-box;
    }

    .site-footer {
        width: calc(100% - 20px);

        padding-left: 25px;
        padding-right: 25px;

        grid-template-columns:
            repeat(2, minmax(0, 1fr));

        box-sizing: border-box;
    }
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 600px) {

    .site-header {
        width: calc(100% - 14px);

        min-width: 0;

        height: auto;

        padding: 14px 10px;

        box-sizing: border-box;

        display: flex;

        flex-wrap: wrap;

        justify-content: center;

        align-items: center;

        gap: 10px;
    }


    /* =====================================================
       MOBILE NAVIGATION
       ===================================================== */

    .main-nav {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;

        width: 100%;

        order: 2;

        align-items: center;
        justify-content: center;

        gap: 12px 18px;

        flex-wrap: wrap;

        min-width: 0;
    }

    .main-nav a {
        display: inline-flex !important;

        visibility: visible !important;
        opacity: 1 !important;

        align-items: center;
        justify-content: center;

        white-space: nowrap;

        font-size: 13px;
    }


    /* =====================================================
       SERVICE DROPDOWN
       ===================================================== */

    .main-nav .service-dropdown,
    .main-nav .agx-service-dropdown,
    .service-dropdown {
        display: inline-flex !important;

        visibility: visible !important;
        opacity: 1 !important;

        max-width: 100%;
    }


    /* =====================================================
       GET A QUOTE BUTTON
       ===================================================== */

    .quote-button {
        display: inline-flex !important;

        visibility: visible !important;
        opacity: 1 !important;

        order: 3;

        width: 175px;
        min-width: 175px;
        max-width: 175px;

        height: 46px;

        flex-shrink: 0;

        box-sizing: border-box;

        align-items: center;
        justify-content: center;

        margin-left: auto;
        margin-right: auto;
    }


    /* =====================================================
       PAGE TITLE
       ===================================================== */

    .contact-page-title {
        width: calc(100% - 16px);

        min-height: 140px;

        height: auto;

        margin-left: auto;
        margin-right: auto;

        padding: 30px 18px;

        box-sizing: border-box;
    }


    /* =====================================================
       CONTACT PANEL
       ===================================================== */

    .contact-panel {
        width: calc(100% - 16px);

        min-height: 0;

        margin-left: auto;
        margin-right: auto;

        padding: 34px 16px;

        display: grid;

        grid-template-columns:
            minmax(0, 1fr);

        gap: 32px;

        box-sizing: border-box;

        overflow: hidden;
    }


    /* =====================================================
       CONTACT PANEL CONTENT
       ===================================================== */

    .contact-panel > *,
    .contact-panel .contact-info,
    .contact-panel .contact-form,
    .contact-panel form,
    .contact-panel label,
    .contact-panel input,
    .contact-panel textarea,
    .contact-panel select,
    .contact-panel button {
        width: 100%;

        max-width: 100%;

        min-width: 0;

        box-sizing: border-box;
    }


    /* =====================================================
       FORM — KEEP EVERYTHING INSIDE THE PANEL
       ===================================================== */

    .contact-panel .contact-form {
        width: 100%;

        max-width: 100%;

        min-width: 0;

        overflow: hidden;

        box-sizing: border-box;
    }

    .contact-panel form {
        width: 100%;

        max-width: 100%;

        min-width: 0;

        display: flex;

        flex-direction: column;

        gap: 14px;

        overflow: hidden;

        box-sizing: border-box;
    }

    .contact-panel input,
    .contact-panel textarea,
    .contact-panel select {
        width: 100%;

        max-width: 100%;

        min-width: 0;

        box-sizing: border-box;
    }

    .contact-panel textarea {
        resize: vertical;

        max-width: 100%;
    }


    /* =====================================================
       FORM ROWS — STACK ON PHONE
       ===================================================== */

    .contact-panel .form-row,
    .contact-panel .input-row,
    .contact-panel .name-row,
    .contact-panel .contact-form-row {
        width: 100%;

        max-width: 100%;

        min-width: 0;

        display: grid;

        grid-template-columns:
            minmax(0, 1fr);

        gap: 14px;

        box-sizing: border-box;
    }


    /* =====================================================
       FOOTER
       ===================================================== */

    .site-footer {
        width: calc(100% - 12px);

        min-height: 0;

        padding: 40px 18px;

        grid-template-columns:
            minmax(0, 1fr);

        gap: 32px;

        box-sizing: border-box;
    }

    .site-footer > * {
        min-width: 0;

        max-width: 100%;
    }


    /* =====================================================
       FOOTER CONTACT DETAILS
       ===================================================== */

    .footer-contact-item,
    .footer-contact-item > span,
    .footer-contact-item > a {
        min-width: 0;

        max-width: 100%;

        overflow-wrap: anywhere;
    }


    /* =====================================================
       SUBSCRIBE
       ===================================================== */

    .subscribe-row,
    .subscribe-row input {
        min-width: 0;

        max-width: 100%;

        box-sizing: border-box;
    }
}


/* =========================================================
   VERY SMALL PHONES
   ========================================================= */

@media (max-width: 390px) {

    .site-header {
        width: calc(100% - 10px);

        padding-left: 8px;
        padding-right: 8px;
    }


    .main-nav {
        gap: 10px 14px;
    }


    .main-nav a {
        font-size: 12px;
    }


    .quote-button {
        width: 165px;

        min-width: 165px;

        max-width: 165px;
    }


    .contact-page-title {
        width: calc(100% - 10px);

        padding-left: 14px;
        padding-right: 14px;
    }


    .contact-panel {
        width: calc(100% - 10px);

        padding-left: 12px;
        padding-right: 12px;
    }


    .site-footer {
        width: calc(100% - 8px);

        padding-left: 14px;
        padding-right: 14px;
    }
}