/* General Classes
--------------------------------------------- */

.bg-primary {
    background: #ED1C24;
}

.bg-black {
    background: black;
}

.bg-white {
    background: white;
}

.bg-light-grey {
    background: #E8E9E9;
}

.bg-grey {
    background: #9D9FA2;
}

.color-primary {
    color: #ED1C24;
}

.color-black {
    color: black;
}

.color-white {
    color: white;
}

.flex100 {
    flex: 0 0 100%;
}

.flex75 {
    flex: 0 0 75%;
}

.flex66 {
    flex: 0 0 66%;
}

.flex50 {
    flex: 0 0 50%;
}

.flex35 {
    flex: 0 0 35%;
}

.flex25 {
    flex: 0 0 25%;
}

.flex20 {
    flex: 0 0 20%;
}

.flex12-5 {
    flex: 0 0 12.5%;
}



/* Custom Block - Stats */

/*if repater <div stats // flex, align items stretch, justify items center; margin -0.5
* while repeater
* <div stat class="flex<?php sub field stat width; ?>"> // padding 0.5em;
<div stat-inner bg- sub field stat color sub field stat + padding -- <?php if custom color isn't null echo 'style="' . getsubfield custom color . '"'
* <p stat number
* <p stat text
*  */

.stats {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    justify-items: center;
    margin: 0 -0.4em;
    position: relative;
}

.stat {
    display: flex;
    padding: 0.4em;
    position: relative;
    align-items: stretch;
}

.stat-inner {
    justify-content: center;
    display: flex;
    width: 100%;
    padding: 2em;
    flex-wrap: wrap;

    .stat-text {
        display: block;
        justify-content: center;
        line-height: 1;
        text-align: center;
        margin-top: 1.5em;

        p {
            margin-top: 0;
            font-size: 1.4em;
            font-weight: 700;
            color: #ED1C24;
            margin-bottom: 1em;
        }

        h3 {
            font-weight: 400;
            font-size: 1.5em;
        }
    }
}

.stat-inner h2 {
    font-size: 2.5em;
    margin: 0;
    font-weight: 500;
    /* Force wrap and preserve break spaces for stat numbers and their append text */
    white-space: pre-line;
    word-break: break-all;
    overflow-wrap: break-word;
}

.stat-inner .stat-text-special h2 {
    display: inline-block;
}

.stat-inner h3 {
    font-size: 2em;
    font-weight: 500;
    margin: 0;
    align-items: center;
    display: flex;
}



.stat-heading {
    color: #ED1C24;
    font-size: 4em;
    text-align: center;
    margin-bottom: 0;
    margin-top: 0.1em;
}

.stat-subheading {
    text-align: center;
    margin-top: 0;
}

.single-case_study p.stat-subheading {
    margin-bottom: 1em;
    margin-top: 1em;
    font-size: 1.25em;
}

.editor-styles-wrapper {
    .stats {
        margin: 0;
        gap: 0.4em;

        .stat {
            padding: 0;
            max-width: 24%;
        }
    }
}

/* Custom Block - Video Viewer */

.cb-videos {
    display: flex;
    align-items: stretch;
    margin: 0 -0.2em;
    position: relative;
    flex-wrap: wrap;
    overflow: hidden;

    h2 {
        text-align: center;
        text-decoration: underline 0.095em rgb(237, 28, 36);
        text-underline-offset: 0.3em;
        font-size: 1.75em;
    }
}

.cb-video {
    padding: 0.2em;
    position: relative;
}

.cb-video .video-container {
    overflow: hidden;
    display: block;
    position: relative;
    aspect-ratio: 16/9;
}

.cb-video .video-container iframe {
    width: 100%;
    height: 100%;
}

.cb-video.embed .video-container {
    overflow: inherit;
    height: 100%;
    display: flex;
    position: inherit;
    padding-bottom: 0;
}

.cb-video.embed .video-container iframe {
    width: 100%;
}

.cb-video .video-container .video-js.vjs-fluid {
    height: 100%;
}

.cb-video .video-container .playback-icon img {
    position: static;
    max-width: 100%;
    height: auto;
    margin: auto;
    position: absolute;
    bottom: 0;

}

.cb-video .video-container .playback-icon {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    margin: auto;
    width: 100px;
}

.cb-video .video-container img {
    position: absolute;
    top: 0px;
    left: 0px;
    z-index: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}


/* Video Popup */

.cb-video-popup {
    height: 100vh;
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: -2;
    display: none;
    align-items: center;
    justify-content: center;
}

.cb-video-popup-active {
    display: flex;
    z-index: 1;
    height: 100vh;
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    background: rgba(0, 0, 0, 0.7);
    align-items: center;
    justify-content: center;
    padding: 4%;
}

.cb-popup-container {
    padding: 2em 4em;
}

.cb-popup-container .cb-popup-inner {
    position: relative;
    opacity: 1;
    border-radius: 4px;
    position: relative;
}

.cb-popup-container-close {
    display: none;
}

.cb-video .video-js.vjs-fluid,
.cb-video .video-js.vjs-16-9,
.cb-video .video-js.vjs-4-3 {
    padding: 0;
}

.video-container:hover {
    cursor: pointer;
}