.video-error {
    display: none;
    visibility: hidden;
    position: absolute;
    color: white;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    font-weight: bold;
    font-size: 1.25rem;
    z-index: 9999;
}

#back-btn-container {
    display: flex;
    width: 90vw;
    max-width: 1280px;
    margin: 0 auto;
}
.back-btn {
    padding: 1rem 0;
    color: currentColor;
    text-decoration: none;
    font-size: 1.25rem;
}
.back-btn:hover {
    text-decoration: underline;
}

#widget-container {
    width: 90vw;
    max-width: 1280px;
    margin: 2rem auto;
}
#series-card-container {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    width: 100%;
    gap: .5rem;
}
.series-image-container {
    aspect-ratio: 16 / 9;
    overflow: hidden;
    display: grid;
    place-items: center;
    position: relative;
    padding: 0 !important;
}
.series .series-banner {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(0, 0, 0, 0.75);
    display: flex;
    justify-content: space-between;
    z-index: 9999;
    color: white;
}
.series .series-banner * {
    background-color: transparent;
}
.series .series-banner p {
    margin: .5rem;
}
.series .series-banner button {
    border: none;
    cursor: pointer;
    color: currentColor;
    padding: 0 .5rem;
}
.series .series-banner button:hover {
    text-decoration: underline;
}

.series {
    display: flex;
    flex-direction: column;
    width: 100%;
    text-decoration: none;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}
.series img {
    transition: transform 250ms ease;
}
.series:hover img {
    transform: scale(1.05);
}
.series img {
    min-height: 100%;
    width: 100%;
    display: block;
}
.series a:last-of-type {
    background-color: #7B2D26;
    border-top: 1px solid black;
    color: white;
    text-align: center;
    font-size: 1rem;
    font-weight: bold;
    padding: .5rem;
    margin: 0;
    text-transform: uppercase;
    text-decoration: none;
}
#series-btn-container {
    display: flex;
    width: 100%;
    justify-content: space-between;
}
#series-btn-container button {
    margin: 1rem 0;
    padding: .75rem 1rem;
    border: none;
    background-color: #7B2D26;
    color: white;
    font-weight: bold;
    text-transform: uppercase;
    border-radius: 4px;
    cursor: pointer;
}
#series-btn-container button:hover {
    filter: brightness(1.25);
}

@media screen and (max-width: 768px) {
    #series-card-container {
        grid-template-columns: 1fr 1fr;
    }
}
@media screen and (max-width: 425px) {
    #series-card-container {
        grid-template-columns: 1fr;
    }
}

/* series page styling */

#widget-card-container {
    width: 90vw;
    max-width: 1280px;
    margin: 2rem auto;
    margin-top: 0;
    box-shadow: rgba(99, 99, 99, 0.2) 0px 2px 8px 0px;
    background-color: #ecf0f1;
}
#widget-card-container #series-row {
    display: flex;
    padding: 1rem;
    gap: 1rem;
}
#widget-card-container #series-head-row {
    display: flex;
    padding: 0 1rem;
}
#widget-card-container #series-head-row a {
    color: black;
    text-decoration: none;
    padding: 1rem 0;
    text-transform: uppercase;
    white-space: nowrap;
}
@media screen and (max-width: 768px) {
    #widget-card-container #series-head-row {
        flex-wrap: wrap;
        justify-content: space-between;
    }
    #widget-card-container #series-head-row #series-title {
        order: 999;
        width: 100%;
    }
}
#widget-card-container #series-title {
    color: black;
    text-align: center;
    text-transform: uppercase;
    margin: 0 auto;
    padding: .5rem 0;
}
#widget-card-container #sermon-image-container {
    box-sizing: border-box;
    width: 50%;
    padding-right: 0;
}
#widget-card-container #sermon-image-container #series-info-row {
    width: 100%;
    display: flex;
    align-items: center;
}
#series-info-row p {
    margin: 0;
    margin-right: 2rem;
    padding: 0;
}
#series-info-row button {
    margin: .5rem 0;
    margin-left: auto;
    padding: .75rem 1rem;
    border: none;
    background-color: #7B2D26;
    color: white;
    height: max-content;
    font-weight: bold;
    text-transform: uppercase;
    border-radius: 4px;
    cursor: pointer;
    white-space: nowrap;
}
#widget-card-container img {
    width: 100%;
    display: block;
    box-shadow: rgba(99, 99, 99, 0.2) 0px 2px 8px 0px;
}

#widget-card-container #sermon-content {
    display: flex;
    flex-direction: column;
    gap: .25rem;
    box-sizing: border-box;
    width: 50%;
    height: calc(22.833vw + 55px);
    max-height: 406px;
    padding: .25rem;
    overflow-y: scroll;
    overflow-x: hidden;
    background-color: rgba(50, 50, 50, 0.25);
}
#widget-card-container #sermon-content h1 {
    text-align: center;
    padding: 1rem 0;
}

/* messages card */

.messages {
    display: flex;
    width: 100%;
    background-color: white;
    cursor: pointer;
    text-decoration: none;
    color: currentColor;
}
.messages:hover {
    background-color: rgba(255,255,255,.75);
}
.messages:hover img {
    transform: translateX(2.5px);
}
.messages img {
    display: block;
    max-width: 33%;
    align-self: center;
    box-shadow: rgba(50, 50, 50, 0.25) 2px 0px 6px 0px;
    transition: transform 100ms linear;
}
.messages .sermon-info {
    padding: 0 1rem;
    width: 100%;
}
.messages .sermon-info p {
    margin: .5rem 0;
}
.messages .sermon-info .sermon-title {
    font-weight: bold;
    color: steelblue;
}
@media screen and (max-width: 1024px) {
    #series-row {
        flex-direction: column;
    }
    #widget-card-container #sermon-content {
        width: 100%;
        overflow: visible;
        max-height: none;
        height: auto;
    }
    #widget-card-container #sermon-image-container {
        margin: 0 auto;
        width: 75%;
    }
}
@media screen and (max-width: 768px) {
    #widget-card-container #sermon-image-container {
        width: 100%;
    }
}

/* sermon page */

#video-container {
    width: 100%;
    display: grid;
    place-items: center;
    background-color: black;
    position: relative;
}
#video-container video {
    max-width: 850px;
    max-height: 478.125px;
    width: 100%;
    height: 56vw;
}
#video-card-container {
    width: 90vw;
    max-width: 1280px;
    margin: 2rem auto;
    margin-top: 0;
    box-shadow: rgba(99, 99, 99, 0.2) 0px 2px 8px 0px;
    background-color: #ecf0f1;
    padding: 1rem;
}
#video-card-container .row {
    display: flex;
    width: 100%;
    justify-content: space-between;
}
#video-card-container .row .col {
    display: flex;
    flex-direction: column;
    gap: .5rem;
    /* width: 100%; */
}
#video-card-container h1 {
    margin: 0;
    color: currentColor;
    padding: 0;
}
#video-card-container p {
    margin: 0;
    padding: 0;
}
#video-card-container h3 {
    margin: 0;
    margin-top: 1rem;
    color: currentColor;
}
#video-card-container .btn {
    /* margin: 1rem 0; */
    padding: .75rem 1rem;
    border: none;
    background-color: #7B2D26;
    color: white;
    font-weight: bold;
    font-size: 1rem;
    text-decoration: none;
    text-transform: uppercase;
    border-radius: 4px;
    cursor: pointer;
    text-align: center;
    white-space: nowrap;
}
#video-card-container .btn:hover {
    filter: brightness(1.25);
}
#other-sermons {
    width: 100%;
    display: flex;
    gap: .25rem;
    padding: .25rem;
    overflow-x: auto;
    background-color: rgba(50, 50, 50, 0.25);
}
#other-sermons a {
    max-width: calc((100% / 3) - .175rem);
    flex-shrink: 0;
    position: relative;
}
#other-sermons a img {
    display: block;
    width: 100%;
}
#other-sermons a .sermon-image-overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.75);
    color: white;
    padding: 1rem;
    opacity: 0;
    transition: opacity 150ms linear;
}
#other-sermons a .sermon-image-overlay:hover {
    opacity: 1;
}
#other-sermons a .sermon-image-overlay h1 {
    margin: 0;
    font-size: 1.25rem;
}
@media screen and (max-width: 1024px) {
    #other-sermons a {
        max-width: calc((100% / 2) - .175rem);
    }
}
@media screen and (max-width: 768px) {
    #other-sermons a {
        max-width: 80%;
    }
    #video-card-container .row {
        flex-direction: column;
        gap: 1rem;
    }
}