body,
html {
    width: 100%;
    height: 100%;
}

body {
    font-family: 'Merriweather', 'Helvetica Neue', Arial, sans-serif;
}

hr {
    max-width: 50px;
    border-width: 3px;
    border-color: #557A95;
}

hr.light {
    border-color: #fff;
}

a {
    color: #557A95;
    -webkit-transition: all 0.2s;
    -moz-transition: all 0.2s;
    transition: all 0.2s;
}

a:hover {
    color: #557A95;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Open Sans', 'Helvetica Neue', Arial, sans-serif;
}

.bg-primary {
    background-color: #557A95 !important;
}


.text-faded {
    color: rgba(255, 255, 255, 0.7);
}

section {
    padding: 8rem 0;
}

.section-heading {
    margin-top: 0;
}

::-moz-selection {
    color: #fff;
    background: #5D5c61;
    text-shadow: none;
}

::selection {
    color: #fff;
    background: #5D5c61;
    text-shadow: none;
}

img::selection {
    color: #fff;
    background: transparent;
}

img::-moz-selection {
    color: #fff;
    background: transparent;
}

#mainNav {
    border-bottom: 1px solid rgba(33, 37, 41, 0.1);
    background-color: #fff;
    font-family: 'Open Sans', 'Helvetica Neue', Arial, sans-serif;
    -webkit-transition: all 0.2s;
    -moz-transition: all 0.2s;
    transition: all 0.2s;
}

#mainNav .navbar-brand {
    font-weight: 700;
    text-transform: uppercase;
    color: #557A95;
    font-family: 'Open Sans', 'Helvetica Neue', Arial, sans-serif;
}

#mainNav .navbar-brand:focus, #mainNav .navbar-brand:hover {
    color: #557A95;
}

#mainNav .navbar-nav > li.nav-item > a.nav-link,
#mainNav .navbar-nav > li.nav-item > a.nav-link:focus {
    font-size: .9rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #212529;
}

#mainNav .navbar-nav > li.nav-item > a.nav-link:hover,
#mainNav .navbar-nav > li.nav-item > a.nav-link:focus:hover {
    color: #557A95;
}

#mainNav .navbar-nav > li.nav-item > a.nav-link.active,
#mainNav .navbar-nav > li.nav-item > a.nav-link:focus.active {
    color: #557A95 !important;
    background-color: transparent;
}

#mainNav .navbar-nav > li.nav-item > a.nav-link.active:hover,
#mainNav .navbar-nav > li.nav-item > a.nav-link:focus.active:hover {
    background-color: transparent;
}

@media (min-width: 992px) {
    #mainNav {
        border-color: transparent;
        background-color: transparent;
    }
    #mainNav .navbar-brand {
        color: rgba(255, 255, 255, 0.7);
    }
    #mainNav .navbar-brand:focus, #mainNav .navbar-brand:hover {
        color: #fff;
    }
    #mainNav .navbar-nav > li.nav-item > a.nav-link {
        padding: 0.5rem 1rem;
    }
    #mainNav .navbar-nav > li.nav-item > a.nav-link,
    #mainNav .navbar-nav > li.nav-item > a.nav-link:focus {
        color: rgba(255, 255, 255, 0.7);
    }
    #mainNav .navbar-nav > li.nav-item > a.nav-link:hover,
    #mainNav .navbar-nav > li.nav-item > a.nav-link:focus:hover {
        color: #fff;
    }
    #mainNav.navbar-shrink {
        border-bottom: 1px solid rgba(33, 37, 41, 0.1);
        background-color: #fff;
    }
    #mainNav.navbar-shrink .navbar-brand {
        color: #557A95;
    }
    #mainNav.navbar-shrink .navbar-brand:focus, #mainNav.navbar-shrink .navbar-brand:hover {
        color: #557A95;
    }
    #mainNav.navbar-shrink .navbar-nav > li.nav-item > a.nav-link,
    #mainNav.navbar-shrink .navbar-nav > li.nav-item > a.nav-link:focus {
        color: #212529;
    }
    #mainNav.navbar-shrink .navbar-nav > li.nav-item > a.nav-link:hover,
    #mainNav.navbar-shrink .navbar-nav > li.nav-item > a.nav-link:focus:hover {
        color: #557A95;
    }
}

header.masthead {
    background-image: url("https://res.cloudinary.com/hclk4bopp/image/upload/v1531837571/laptop-768694_1920.jpg");
    background-position: center center;
    -webkit-background-size: cover;
    -moz-background-size: cover;
    -o-background-size: cover;
    background-size: cover;
    min-height: 100vh;
}

header.masthead hr {
    margin-top: 30px;
    margin-bottom: 30px;
}

header.masthead h1 {
    font-size: 2rem;
}

header.masthead p {
    font-weight: 300;
}

.popup-gallery > div {
    overflow: hidden;
    height: 45vh;
}

.popup-gallery > div > img {
    height:auto;
    width:100%;/*maintain aspect ratio*/
    max-height:1000%;
}

.popup-gallery {
    padding-left:8px;
}



@media (min-width: 768px) {
    header.masthead p {
        font-size: 1.15rem;
    }
}

@media (min-width: 992px) {
    header.masthead {
        height: 100vh;
        min-height: 650px;
        padding-top: 0;
        padding-bottom: 0;
    }

    header.masthead h1 {
        font-size: 3rem;
    }
}

@media (min-width: 1200px) {
    header.masthead h1 {
        font-size: 4rem;
    }
}

.service-box {
    max-width: 400px;
}

.portfolio-box {
    position: relative;
    display: block;
    max-width: 650px;
    margin: 0 auto;
    padding-top: 4px;
}

.portfolio-box .portfolio-box-caption {
    position: absolute;
    bottom: 0;
    left:0;
    display: block;
    width: 100%;
    height: calc(100% - 4px);
    text-align: center;
    opacity: 1;
    color: #fff;
    background: rgba(85, 122, 149, 0.9);
    -webkit-transition: all 0.2s;
    -moz-transition: all 0.2s;
    transition: all 0.2s;
}


@media (min-width: 768px) {

    .portfolio-box .portfolio-box-caption {
        bottom: 0;
        left:4px;
        width: calc(100% - 6px);
        height: calc(100% - 4px);
    }

    #portfolio .row :nth-child(2n) .portfolio-box .portfolio-box-caption {
        left:2px;
    }

    #portfolio .row :nth-child(2n+1) .portfolio-box {
        padding-left:4px;
        padding-right:2px;
    }

    #portfolio .row :nth-child(2n) .portfolio-box {
        padding-left:2px;
        padding-right:4px;
    }
}

@media (min-width: 992px) {

    .portfolio-box {
        padding-top: 9px;
        padding-left:9px;
        padding-right:3px;
    }

    #portfolio .row :nth-child(3n + 1) .portfolio-box {
        padding-left:9px;
        padding-right:3px;
    }

    #portfolio .row :nth-child(3n + 2) .portfolio-box {
        padding-left:6px;
        padding-right:6px;
    }


    #portfolio .row :nth-child(3n) .portfolio-box {
        padding-left:3px;
        padding-right:9px;
    }

    .portfolio-box .portfolio-box-caption {
        bottom: 0;
        width: calc(100% - 12px);
        height: calc(100% - 9px);
    }

    #portfolio .row :nth-child(3n + 1) .portfolio-box .portfolio-box-caption {
        left:9px;
    }

    #portfolio .row :nth-child(3n + 2) .portfolio-box .portfolio-box-caption {
       left:6px;
    }

    #portfolio .row :nth-child(3n) .portfolio-box .portfolio-box-caption {
        left:3px;
    }
}



.portfolio-box .portfolio-box-caption .portfolio-box-caption-content {
    position: absolute;
    top: 50%;
    width: 100%;
    transform: translateY(-50%);
    text-align: center;
}

.portfolio-box .portfolio-box-caption .portfolio-box-caption-content .project-category,
.portfolio-box .portfolio-box-caption .portfolio-box-caption-content .project-name {
    padding: 0 15px;
    font-family: 'Open Sans', 'Helvetica Neue', Arial, sans-serif;
}

.portfolio-box .portfolio-box-caption .portfolio-box-caption-content .project-category {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
}

.portfolio-box .portfolio-box-caption .portfolio-box-caption-content .project-name {
    font-size: 14px;
}

.portfolio-box:focus {
    outline: none;
}

@media (min-width: 768px) {
    .portfolio-box .portfolio-box-caption .portfolio-box-caption-content .project-category {
        font-size: 16px;
    }
    .portfolio-box .portfolio-box-caption .portfolio-box-caption-content .project-name {
        font-size: 16px;
    }
    .masthead {
        min-height: 80vh;
    }
}

.text-primary {
    color: #557A95 !important;
}

.btn {
    font-weight: 700;
    text-transform: uppercase;
    border: none;
    border-radius: 300px;
    font-family: 'Open Sans', 'Helvetica Neue', Arial, sans-serif;
}

.btn-xl {
    padding: 1rem 2rem;
}

.btn-primary {
    background-color: #557A95;
    border-color: #557A95;
}

.btn-primary:hover, .btn-primary:focus, .btn-primary:active {
    color: #fff;
    background-color: rgb(85, 122, 149) !important;
}

.btn-primary:active, .btn-primary:focus {
    box-shadow: 0 0 0 0.2rem rgba(85, 122, 149, 0.5) !important;
}

#footer {
     padding: 40px 0;
     background-color: #fff;
 }

#footer a {
    color: #333;
    margin-left: 10px;
    margin-right: 10px;
}

#footer .social:hover {
    -webkit-transform: scale(0.85);
    -moz-transform: scale(0.85);
    -o-transform: scale(0.85);
}

#footer .social {
    -webkit-transform: scale(0.8);
    -moz-transform: scale(0.8);
    -o-transform: scale(0.8);
    -webkit-transition-duration: 0.2s;
    -moz-transition-duration: 0.2s;
    -o-transition-duration: 0.2s;
}
