html {
    height: 100%;
}

body {
    position: relative;
    min-height: 100%;
    height: 100%;
    line-height: 1.3;
    color: #000;
}

a {
    color: #2d5686;
    text-decoration: none !important;
}

#content a {
    font-weight: bold;
}

#content a:hover {
    text-decoration: underline !important;;
}

h2 {
    font-size:1.25em;
}

.navbar-toggler {
    padding-top: 0;
}

.nav-pills .nav-link.active {
    background-color: #2D5686;
}

.btn-primary {
    background-color: #2D5686;
    border-color: #2D5686;
}

#page {
    min-height: 100vh;
    position: relative;
    display: flex;
    flex-direction: column;
}

#page.sm-header #content {
    padding-top: 20px;
}

#header {
    position: relative;
    height: 220px;
}

#header-bg {
    position: fixed;
    height: 220px;
    background-image: url(../images/headerbg.jpg);
    background-size: cover;
    background-position: center;
    z-index: -1;
    width: 100%;
    max-width: 1140px;
}

#header-txt nav.navbar {
    background-color: transparent !important;
    border: 0;
}

#header-txt .navbar-brand {
    float: none;
    height: auto;
    margin: 0 auto;
}

#header-txt .navbar-toggle {
    background-color: #fff;
}

#header-txt {
    text-align: center;
    margin-top: 54px;
}

#header-txt > img {
    display: inline-block;
}

#canvas {
    background-color: #fff;
    flex-grow: 1;
    padding-bottom: 15px;
}

#canvas .no-padding,
#canvas .navbar-collapse {
    padding: 0;
}

#nav {
    margin-top: 0;
    margin-bottom: 25px;
    padding-top: 3px;
    padding-bottom: 0;
    background-color: #fff;
}

#nav a {
    font-weight: bold;
}

#nav > li {
    border-top-right-radius: 4px;
    border-bottom-right-radius: 4px;
    background-color: #D4DFF0;
    margin-top: 5px;
}

#nav > li:last-child {
    margin-bottom: 5px;
}

#nav > li > a {
    padding-left: 10px;
}

#nav > li > ul {
    background-color: #fff;
    list-style: none;
    padding-left: 15px;
}

#nav > li > ul > li {
    padding: 10px 15px 10px 0;
}

#content {
    padding-top: 8px;
    padding-bottom: 20px;
    background-color: #fff;
    min-height: 100%;
    padding-left: 25px;
    padding-right: 0;
}

#footer {
    position: absolute;
    bottom: 0;
    font-size: 0.8em;
    color: #555;
    padding-bottom: 5px;
}

#footer a {
	color: #555;
}

ul.fp-panel {
    list-style: none;
    padding: 0;
    margin: 0;
}

.feat-link-box div.card-header,
div.fp-col div.card-header {
    background-color: #d4dff0;
    color: #2d5686;
    padding: 5px 10px;
    border-bottom-color: #d4dff0;
}

div.fp-col div.card-header,
div.fp-col div.card-header a {
    font-weight: bold;
    text-decoration: none !important;
}

ul.fp-panel > li:nth-child(even) {
   background-color: #EEF6FB;
}

ul.fp-panel > li {
    padding: 5px 10px;
}

ul.fp-panel > li > img {
    float: left;
    margin-right: 10px;
}

ul.fp-panel > li.more {
     background-color: transparent;
     text-align: right;
     padding: 2px 5px;
}

ul.fp-panel > li.nolink > a {
    color: #000;
}

ul.fp-panel > li.nolink > a:hover {
    text-decoration: none;
}

.feat-link-box .card-body {
    padding: 8px;
}

.feat-link-box ul {
    margin-bottom: 0;
}

.feat-link-box li a.nav-link {
    padding: 5px;
}

#fp-gallery {
    background-color: #D4DFF0;
    border-radius: .25rem;
}

.carousel-control-prev,
.carousel-control-next {
    width: 8%;
}

.carousel-control-prev-icon {
    width: 30px;
    height: 30px;
    background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%232d5686' viewBox='0 0 8 8'%3E%3Cpath d='M5.25 0l-4 4 4 4 1.5-1.5-2.5-2.5 2.5-2.5-1.5-1.5z'/%3E%3C/svg%3E") !important;
}

.carousel-control-next-icon {
    width: 30px;
    height: 30px;
    background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%232d5686' viewBox='0 0 8 8'%3E%3Cpath d='M2.75 0l-1.5 1.5 2.5 2.5-2.5 2.5 1.5 1.5 4-4-4-4z'/%3E%3C/svg%3E") !important;
}

#fp-gallery ul {
    list-style: none;
    margin: 0;
    padding: 0 25px;
}

#fp-gallery ul > li {
    display: inline-block;
    width: 32%;
    height: 155px;
    text-align: center;
    overflow: hidden;
}

#fp-gallery ul > li > div.catthumbnail {
    height: 100px;
    width: 90%;
    margin: 0 auto;
    overflow: hidden;
}

#fp-gallery ul > li > div.catthumbnail > a {
    position: relative;
    display: block;
    height: 100%;
}

#fp-gallery ul > li > div.catthumbnail > a > img {
    margin: auto;
    max-height: 100px;
    max-width: none;
    width: auto;
    height: auto;
}

#fp-gallery ul > li > div.catinfo {
    overflow: hidden;
    padding-top: 5px;
    font-size: 12px;
}

#fp-gallery .carousel-control {
    background: none !important;
    width: 25px;
    color: #2D5686;
}

#fp-gallery a.readmore {
    display: block;
    font-weight: normal;
    text-decoration: underline;
    text-align: right;
}

#back-to-top {
    cursor: pointer;
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: none;
    opacity: 0.3;
    z-index: 99;
    background-color: #D4DFF0;
}

#content ul.fp-messageboard a {
    font-weight: normal;
    text-decoration: none;
}

#content li.more > a {
    font-weight: normal;
    text-decoration: underline;
}

div.fp-banner-container {
    width: 100%;
    vertical-align: bottom;
}

div.fp-banner-container {
    position: absolute;
    bottom: 0;
    z-index: 3;
}

div.fp-banner {
    width: 100%;
    text-align: center;
    font-size: 1.2em;
    color: #fff;
    font-weight: bold;
    text-shadow: 2px 2px #000;
}

div.fp-banner p {
    margin-bottom: 0.6rem;
    padding: 0 25px;
}

#content .fp-row {
    margin-left: 4px;
    margin-right: -4px;
}

#content .fp-col {
    padding-left: 4px;
    padding-right: 4px;
}

#content .fp-col .card {
    margin-bottom: 10px;
}

#content .fp-col .card-body {
    padding-left: 2px;
    padding-right: 2px;
    padding-top: 5px;
    padding-bottom: 2px;
}


.gallery-cat {
    min-height: 188px;
    text-align: center;
    margin-bottom: 30px;
}

.gallery-cat > div {
    height: 100px;
    width: 90%;
    margin: 0 auto;
    overflow: hidden;
}

.gallery-cat > div > a > img {
    min-height: 100%;
}

.gallery-item {
    min-height: 80px;
    text-align: center;
}

.gbook > div,
.gbook > div > div.reply {
    padding-top: 10px;
    padding-bottom: 10px;
    margin-bottom: 5px;
}

.gbook > div > div.reply > div {
    padding-left: 40px;
}

.gbook > div:nth-child(even) {
    background-color: #EEF6FB;
}

#news > div.news {
    padding: 5px 15px;
}

#news > div.news:nth-child(even) {
    background-color: #EEF6FB;
}

#viewer .modal-body {
    min-height: 1px; /* IE11 fix for modal window height */
    user-select: none;
}

#viewer .modal-body > img {
    position: relative;
}

#viewer .modal-body .modal-loading span {
    font-size: 10em;
    opacity: 0.5;
}

#viewer .modal-body .modal-arrow {
    position: absolute;
    top: 0;
    bottom: 0;
    height: 100%;
    width: 30%;
}

#viewer .modal-body .modal-arrow.right-arrow {
    right: 0;
}

#viewer .modal-body.loading > img {
    display: none;
}

#viewer .modal-body.loading svg {
    -webkit-animation: spinner-spin 2s linear infinite;
    animation: spinner-spin 2s linear infinite;
    max-height: 500px;
}

@-webkit-keyframes spinner-spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes spinner-spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

#viewer .modal-body:not(.loading) > .modal-loading {
    display: none;
}

#viewer .nav_buttons {
    user-select: none;
}

#viewer .nav_buttons a {
    display: inline;
    margin: 0;
}

#viewer .nav_buttons svg {
    width: 20px;
    height: 20px;
}

h1, h2 {
    clear: both;
    margin: 10px 0;
}

.clear {
    clear: both;
}

.bodyimgright {
    float: right;
    margin-left: 6px;
    margin-bottom: 3px;
}

.bodyimgleft {
    float: left;
    margin-right: 6px;
    margin-bottom: 3px;
}

@media (min-width: 1200px) {
    #page.sm-header h1 {
        left: 200px !important;
    }
}

@media (min-width: 768px) {
    #page.sm-header #header {
        background-image: none;
        background-color: #D4DFF0;
        height: 60px;
    }

    #page.sm-header #header-bg {
        position: relative;
        z-index: 0;
        height: 60px;
        width: 380px;
        max-width: 380px;
        border-bottom-right-radius: 60px;
    }

    #page.sm-header #header-txt {
        position: absolute;
        margin-top: 0;
        left: 0;
    }

    #page.sm-header #header-txt .navbar-brand {
        height: 40px;
        margin: 0;
        margin-top: -2px;
        margin-left: 0;
    }

    #page.sm-header h1 {
        position: absolute;
        color: #2d5686;
        top: -55px;
        left: 230px;
        font-size: 1.5em;
    }
}

@media (max-width: 991px) {
    #fp-gallery ul > li > div.catthumbnail {
        height: 100px;
    }

    #page.sm-header #header-bg {
        width: 310px;
        max-width: 310px;
    }

    #page.sm-header #header-txt .navbar-brand {
        height: 35px;
    }

    #page.sm-header h1 {
        left: 140px;
    }
}

@media (max-width: 1199px) {
    #header-bg {
        max-width: 960px;
    }
}

@media (max-width: 991px) {
    #header-bg {
        max-width: 720px;
    }
}

@media (max-width: 767px) {
    #header {
        background-image: none;
        background-color: #2D5686;
        height: 50px;
    }

    #header:not(.banner) {
        background: linear-gradient(180deg, rgba(45,86,134,1) 0%, rgba(45,86,134,1) 50px, rgba(255,255,255,1) 50px, rgba(255,255,255,1) 100%);
        height: auto;
    }

    #header {
        background: linear-gradient(180deg, rgba(45,86,134,1) 0%, rgba(45,86,134,1) 50px, rgba(255,255,255,0) 50px, rgba(255,255,255,0) 100%);
        height: auto;
    }

    #header.banner {
        height: 220px;
        margin-bottom: 10px;
    }

    #header-txt {
        margin-top: 0 !important;
    }

    #header-txt .navbar-brand {
        margin-top: -5px !important;
        margin-left: 0 !important;
        height: 30px !important;
        z-index: 5;
    }

    #header.banner #header-txt .navbar-brand {
        z-index: 3;
    }

    #header button.navbar-toggler {
        z-index: 5;
        color: #fff;
        border-color: #fff;
    }

    #header button.navbar-toggler .navbar-toggler-icon {
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30' viewBox='0 0 30 30'%3e%3cpath stroke='rgb%28255, 255, 255%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
    }

    #header:not(.banner) div.fp-banner-container {
        position: relative;
        padding-bottom: 15px;
        margin-top: -10px;
        width: 100%;
        z-index: 3;
    }

    #header:not(.banner) #header-bg {
        background-image: none;
    }

    #header:not(.banner) div.fp-banner {
        position: relative;
        color: #000;
        text-shadow: none;
        font-weight: normal;
        top: 15px;
        padding: 0 15px;
    }

    #header.banner #header-bg {
        position: absolute;
        z-index: -2;
        max-width: 540px;
    }

    div.fp-banner > p {
        margin: 5px 0;
    }

    #canvas {
        background-color: #FFF;
    }

    #canvas .no-padding,
    #canvas .navbar-collapse {
        padding: 0 1px;
    }

    #nav {
        margin-top: 0;
        margin-bottom: 0;
        padding-top: 0;
        padding-bottom: 0;
        background-color: #D4DFF0;
    }

    #nav > li {
        border-top-right-radius: 0;
        border-bottom-right-radius: 0;
        background-color: #D4DFF0;
    }

    #canvas .navbar-collapse {
        padding-top: 50px;
    }

    #header-txt .navbar-toggle {
        background-color: transparent;
    }

    #header-txt .navbar-toggle .icon-bar {
        background-color: #fff;
    }

    #header-txt .navbar-toggle:focus, #header-txt .navbar-toggle:hover {
        background-color: #19314D;
    }

    #canvas div.lhs-navbar  {
        position: absolute;
        top: 0;
        z-index: 4;
    }

    #content {
        padding-top: 5px !important;
        padding-left: 15px;
        padding-right: 15px;
        min-height: auto;
    }

    #page.sm-header h1 {
        left: 0;
    }

    #diarytbl colgroup {
        display: none;
    }

    #diarytbl thead tr td:nth-child(3) {
        display: none;
    }

    #diarytbl tr td:nth-child(1) {
        display: inline-block;
        width: 20% !important;
    }

    #diarytbl tr td:nth-child(2) {
        display: inline-block;
        width: 80% !important;
    }

    #diarytbl tbody tr td:nth-child(3) {
        clear: both;
        display: block;
        border-top: 0;
        width: 100% !important;
        padding-top: 0;
    }

    #diarytbl tbody tr td:nth-child(3):empty {
        padding: 0;
    }

    #fp-gallery ul > li {
        width: 100%;
        height: auto;
        text-align: left;
    }

    #fp-gallery ul > li {
      display: flex;
      align-items: center;
      justify-content: center;
    }

    #fp-gallery ul > li > div.catthumbnail {
        width: 48%;
        max-width: 120px;
        display: inline-block;
        text-align: center;
        align-self: flex-start;
        margin: 0;
        margin-top: 15px;
    }

    #fp-gallery ul > li > div.catinfo {
        width: 48%;
        padding: 15px;
        padding-top: 0;
        margin-top: 15px;
        font-size: unset;
    }
}

@media (max-width: 500px) {
    .bodyimgright,
    .bodyimgleft {
        float: none;
        margin: 0 auto;
        margin-bottom: 10px;
    }
}

@media (max-width: 360px) {
    #header-txt div.navbar {
        margin-left: 0;
        margin-right: -15px;
    }

    #header-txt .navbar-brand {
        height: 48px;
    }
}

@media (max-width: 330px) {
    #header-txt .navbar-brand {
        display: none;
    }

    #header-txt .navbar-header::before  {
        content: url(../images/logo_small.png);
        position: absolute;
        left: 10px;
        top: 10px;
    }
}

/* special bg hacks */
#canvas {
    background: -moz-linear-gradient(left, #d4dff0 0%, #d4dff0 16.66%, #ffffff 16.66%, #ffffff 100%);
    background: -webkit-linear-gradient(left, #d4dff0 0%,#d4dff0 16.66%,#ffffff 16.66%,#ffffff 100%);
    background: linear-gradient(to right, #d4dff0 0%,#d4dff0 16.66%,#ffffff 16.66%,#ffffff 100%);
}

@media (max-width: 991px) {
    #canvas {
        background: -moz-linear-gradient(left, #d4dff0 0%, #d4dff0 25%, #ffffff 25%, #ffffff 100%);
        background: -webkit-linear-gradient(left, #d4dff0 0%,#d4dff0 25%,#ffffff 25%,#ffffff 100%);
        background: linear-gradient(to right, #d4dff0 0%,#d4dff0 25%,#ffffff 25%,#ffffff 100%);
    }
}

@media (max-width: 767px) {
    #canvas {
        background: #fff;
    }
}

/* featured link box */
.feat-link-box {
    margin: 0 4px 7px 15px;
    padding: 0;
}

.feat-link-box.flat {
    margin-bottom: 15px;
}

@media (min-width: 992px) {
    .feat-link-box.flat div.card-body ul {
        display: flex;
        flex-direction: row;
    }

    .feat-link-box.flat .card-primary {
        border: 0;
        background-color: #eee;
    }

    .feat-link-box.flat .card-header {
        display: none;
    }

    .feat-link-box.flat .card-body {
        padding: 10px 0;
    }

    .feat-link-box.flat li {
        display: inline;
        flex-grow: 1;
        text-align: center;
    }

    .feat-link-box.flat .btn-nav {
        text-decoration: none !important;
    }
}

@media (max-width: 991px) {
    .feat-link-box {
        margin: 0;
    }
}

@media (max-width: 767px) {
    .feat-link-box {
        margin-top: 7px;
    }
}

/* social media icons on mobile */
@media (max-width: 767px) {
    .socialmedia a > img {
        height: 25px;
    }
}

/* google custom search */
div.gsc-control-searchbox-only { padding: 0 5px; }
input.gsc-input, .gsc-input-box, .gsc-input-box-hover, .gsc-input-box-focus, .gsc-search-button { box-sizing: content-box; line-height: normal; }

/* church friends carousel */
.churchfriends div.carousel-item {
    height: 310px;
}

@media (min-width: 576px) {
    .churchfriends div.carousel-item {
        height: 350px;
    }
}

@media (min-width: 768px) {
    .churchfriends div.carousel-item {
        height: 382px;
    }
}

@media (min-width: 992px) {
    .churchfriends div.carousel-item {
        height: 386px;
    }
}

@media (min-width: 1200px) {
    .churchfriends div.carousel-item {
        height: 693px;
    }
}

.churchfriends div.carousel-item > div.carousel-body {
    height: 100%;
    background-color: #fff;
    background-size: contain;
    background-position: center center;
    background-repeat: no-repeat;
}

.churchfriends div.carousel-caption {
    background-color: rgba(0, 0, 0, 0.45);
    bottom: 0;
    left: 0;
    right: 0;
    padding: 15px;
    text-align: left;
}

.churchfriends div.carousel-caption p {
    margin: 0;
    padding: 0;
}