/* smaller than the site was initially built for  */
@media (max-width: 960px) {
    #container {
        width: 100%;
        margin-left: auto;
        margin-right: auto;
        margin-top: 10px;
        margin-bottom: 10px;
        padding: 0;
        background-image: url(../images/container_bg.jpg);
        background-repeat: repeat-y;
    }

    #header {
        width: 100%;
        height: 147px;
        margin: 15px auto;
        background-image: none;
        background-color: #004160;
        background: linear-gradient(to bottom, #004160, #015277, #018fd1);
        /* Gradient colors */
        border-radius: 15px;
        flex-wrap: wrap;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    #purchase_container {
        top: 33px;
        overflow: hidden;
        display: none;
    }


    #title {
        position: relative;
        left: auto;
        top: auto;
        margin-left: auto;
        margin-right: auto;
        flex-grow: 1;
        text-align: center;
    }

    #logo {
        position: relative;
        top: auto;
        left: auto;
        margin: 10px 0 25px 15px;
        cursor: pointer;
    }

    #title_text {
        float: none;
    }

    #nav_container {
        display: flex;
        justify-content: space-between;
        /* Evenly distribute space between items */
        width: 100%;
        align-items: center;
        /* Vertically center the items */
        margin: auto 15px;
    }

    #nav_container a {
        position: relative;
        top: auto;
        left: auto;
        right: auto;
    }

    #purchase_button_sml {
        top: auto;
        left: auto;
        position: relative;
        width: 170px;
        height: 40px;
        display: block !important;
        background-image: url(../images/BuyNow-Button-sml.png);
        background-position: 0 0;
        margin-left: auto;
        margin-right: auto;
        margin-top: 10px;
    }

    #purchase_button_sml:hover {
        background-position: 0 40px;
    }

    #purchase_button_sml span {
        display: none;
    }

    #index-title-text {
        height: auto;
        width: auto;
        margin: auto;
    }

    #index-title-text img {
        width: 50px;
    }

    .index-left {
        margin-left: 15px;
        margin-right: 15px;
    }

    .index-right {
        margin-left: 15px;
        margin-right: 15px;
    }

    #content {
        width: 100%;
        padding-top: 15px;
    }

    .index-content-box {
        top: auto;
        width: calc(100% - 40px);
    }

    #mid1-content-box {
        height: auto;
    }

    #index-visclips-text,
    #index-prozip-text {
        margin-right: auto;
    }

    .index-bullet {
        width: auto;
    }

    #index-prozip {
        margin: 15px 10px;
    }

    #index-prozip-text {
        text-align: left;
    }
}

/* No-man's land where things start to break, but devices don't usually land here */
@media (max-width: 799.98px) {
    .index-content-box {
        height: auto;
    }


    #index-title-text img {
        width: 50px;
        position: static;
    }

    #index-sheeting-container {
        position: static;
        float: right;
        margin-right: 10px;
        margin-top: 10px;

    }

    #purchaseCompleteElementHolder {
        flex-direction: column;
    }

    #purchase-left-bar {
        width: calc(100% - 10px);
        margin-right: 15px;
    }

    #purchase-right-bar {
        width: calc(100% - 10px);
        margin: 10px 15px 0 0;
    }

}

/* Thee's a break on the purchase page, specificaly for the UPS rating */
@media (max-width: 699.98px) {
    .flex-item {
        flex: 1 1 50%;
    }

    .flex-row {
        border-bottom: 1px solid #ddd;
    }

    .flex-row .flex-item:last-child {
        flex: 1 1 100%;
        padding-bottom: 10px;
    }

    #shipping-summary {
        margin-top: 15px;
    }

    #vc-left-bar {
        display: none;
    }
}

/* Small devices (landscape phones, 576px and up) */
@media (max-width: 767.98px) {
    #index-sheeting-container {
        position: static;
        margin-left: auto;
        margin-right: auto;
        float: none;
    }

    #mid2-content-box {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}

.form-group {
    flex: 1 1 100%;
    margin-right: 0;
}

/* Extra small devices (phones, less than 576px) */
@media (max-width: 575.98px) {
    #index-sheeting-container {
        margin-right: auto;
    }

}

@media (max-width: 424.98px) {
    #title {
        display: none;
    }

    #nav_container {
        margin-left: auto;
        margin-right: auto;
    }

    #logo {
        width: 90px;
        height: 58px;
        position: static;
        margin: 0 auto;
        background-size: contain;
        /* Keeps the image scaling behavior consistent */
    }

}


/* Replace navigation graphics with text on very narrow screens */
@media (max-width: 320px) {
    .navigation {
        font-size: 1em;
        color: white;
        text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000; /* Creates black outline for text */
        background: none; /* Remove background images */
        width: auto; /* Adjust width to fit content */
        height: auto; /* Adjust height to fit content */
        padding: 5px;
        text-align: center;
        display: inline-block;
        position: static; /* Make positioning inline */
        text-decoration: none; /* Remove underline from links */

    }
    .navigation span {
        display: inline;
    }
    #home, #about, #contact, #pricing {
        background: none; /* Remove background images */
        width: auto; /* Adjust width to fit text */
        height: auto; /* Adjust height to fit text */
    }
}

/* For the login button on the purchase page */
#mobile-login-container {
    display: none;
    background-image: url(../images/text_background.png);
    margin: 15px;
    padding: 15px;
    text-align: center;
}

#mobile-login-container .welcome-message,
#mobile-login-container .login-prompt {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

#mobile-login-container .body-text {
    margin: 0;
}

.mobile-button {
    background: #004160;
    color: #fff;
    text-decoration: none;
    padding: 8px 20px;
    border-radius: 5px;
    font-family: "Calisto MT", "Times New Roman", Times, serif;
    font-size: 1.1em;
    transition: background-color 0.2s;
}

.mobile-button:hover {
    background: #015277;
}

@media (max-width: 960px) {
    #mobile-login-container {
        display: block;
    }
    
    #purchase_container {
        display: none;
    }
}

@media (min-width: 961px) {
    #mobile-login-container {
        display: none;
    }
    
    #purchase_container {
        display: block;
    }
}