/**
 * CSS styles for the home page
 *
 * @author Chad Drennan
 * @author Taras Gorbachevskiy
 * @author Marcos Rivera
 * @author Rajpreet Dhaliwal
 * 2020-5-7
 * @version 1.0
 */

:root {
    --transition-duration: .27s;
}

.alert p {
    margin-bottom: 0;
}

.card {
    max-width: 800px;
}

.card .btn {
    background-color: #2c882b;
    color: white;
    border-color: black;
}

.card .btn:hover{
    background-color: #1c7430;
    color: white;
    border-color: black;
}

.card-header:hover {
    background-color: rgb(53, 57, 61);
}

.card-header {
    background-color: rgb(33, 37, 41);
    color: white;
}

/* Down arrow when card is showing */
.card-header h3::before {
    display: inline-block;
    width: 0;
    height: 0;
    margin-right: .3em;
    vertical-align: .21em;
    content: "";
    border-top: .35em solid;
    border-right: .23em solid transparent;
    border-bottom: 0;
    border-left: .23em solid transparent;
}

/* Right arrow when card is collapsed */
.collapsed .card-header h3::before {
    display: inline-block;
    width: 0;
    height: 0;
    margin-left: .3em;
    vertical-align: .18em;
    content: "";
    border-left: .35em solid;
    border-bottom: .23em solid transparent;
    border-right: 0;
    border-top: .23em solid transparent;
}

.col-lg {
    padding: 0;
}

#intro {
    margin-top: 30px;
    margin-bottom: 30px;
}

#latest-blogs .card-text {
    text-align: justify;
}

#latest-blogs .card-text p {
    margin-bottom: 10px;
}

#latest-blogs li {
    padding: 0;
}

#most-recent {
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 50px;
}

/* Turn off hyperlink decoration for all text */
#most-recent .no-decoration {
    color: rgb(33,37,41);
    text-decoration-color: initial;
    text-decoration-line: none;
    text-decoration: none;
}

/* To undo changes from .accordion ie keep bottom border and corners rounded */
#most-recent .card {
    border-bottom: 1px solid rgba(0,0,0,.125);
    border-radius: .25rem;
}

#most-recent img {
    width: 100%;
    object-fit: cover;
    object-position: 50% 10%;

/*    -webkit-filter:brightness(70%);
    -moz-filter:brightness(70%);
    filter:brightness(70%);

    transition: filter var(--transition-duration);
    transition-timing-function: linear;*/
}

/*#most-recent li:hover img {
    -webkit-filter:brightness(100%);
    -moz-filter:brightness(100%);
    filter:brightness(100%);
}*/

#most-recent li:hover .photo-header {
    text-shadow: 0 0 8px black;
}

#most-recent li:hover .blog-article-title {
    color: greenyellow;
}

/* To make accordion styling compatible with grid */
#most-recent .col-lg:first-of-type .card {
    border-bottom: 0;
    border-bottom-right-radius: 0;
    border-bottom-left-radius: 0;
}

/*  To make accordion styling compatible with grid  */
#most-recent .col-lg:last-of-type .card {
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}

/*  To make accordion styling compatible with grid  */
#most-recent .col-lg:not(:first-of-type):not(:last-of-type)>.card {
    border-bottom: 0;
    border-radius: 0;
}

#page-title {
    margin-top: 30px;
}

.photo-header {
    position: relative;
    color: white;
    transition: text-shadow var(--transition-duration);
    transition-timing-function: linear;
}

.photo-header .card-title {
    position: absolute;
    bottom: 8px;
    left: 16px;
    padding-right: 16px;
}

/* Bootstrap Large devices (desktops, 992px and up) */
@media (min-width: 992px) {

    .card-header:hover {
        background-color: rgb(33, 37, 41);
    }

    /* Remove down and down arrows when not in accordion */
    .card-header h3::before, .collapsed .card-header h3::before {
        content: none;
    }

    .col-lg {
        padding: 0 15px 0 15px;
    }

    /* Remove space between cards and container */
    .col-lg:first-of-type {
        padding-left: 0;
    }

    /* Remove space between cards and container */
    .col-lg:last-of-type {
        padding-right: 0;
    }

    #most-recent {
        max-width: initial;
    }

    /* Make card title un-clickable when not in accordion */
    .expand-toggle {
        pointer-events: none;
        cursor: default;
    }

    /* To undo changes from .accordion ie keep bottom border and corners rounded */
    .container .accordion #most-recent .col-lg>.card {
        border-bottom: 1px solid rgba(0,0,0,.125);
        border-radius: .25rem;
    }

    #most-recent .collapse {
        display: initial;
    }
}

/* Extra wide screens */
@media (min-width: 1500px) {
    .container {
        max-width: 1550px;
        padding-left: 50px;
        padding-right: 50px;
    }
}

.alert {
    padding: 10px;
    background-color: #007bff;
    color: white;
    opacity: 1;
    transition: opacity 0.6s;
    margin-bottom: 0px;
    border-radius: 0px;
    text-align: center;
}

.alert a {
    color: yellow;
}

.alert.success {
    background-color: #007bff;
}


.closebtn {
    margin-left: 15px;
    color: white;
    font-weight: bold;
    float: right;
    font-size: 22px;
    line-height: 20px;
    cursor: pointer;
    transition: 0.3s;
}

.closebtn:hover {
    color: black;
}


.blog-article-title {
    margin-bottom: 0;
    width: 100%;
    padding: 24px 16px;
    background: linear-gradient(rgba(0,0,0,0%), rgba(0,0,0,60%));
    bottom: 0 !important;
    left: 0 !important;

    transition: color var(--transition-duration);
}

.blog-preview {
    position: relative;
    overflow: hidden;
}

.blog-preview:before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(transparent, white);
}

.blog-readmore {
    position: absolute;
    right: 0;
    bottom: 0;
}

.blog-readmore:hover {
    color: yellowgreen;
    text-decoration: underline;
}