.afg-popup,
.afg-popup * {
    box-sizing: border-box;
}

.afg-flex-wrap {
    display: flex;
    flex-wrap: wrap;
}

figure {
    margin: 0;
}

.afg-absolute {
    position: absolute;
}

/**
* Modals
*/
.afg-modal {
    position: fixed;
    max-width: 420px;
    top:50%;
    left:50%;
    background-color: #fff;
    padding:40px;
    transform: translate(-50%,-50%);
    z-index: 1000001;
    border:1px solid #D3D3D3;
    opacity: 0;
    pointer-events: none;
    transition: all .3s;
}

.afg-modal.has-header {
    padding:0;
}

.afg-modal.afg-active {
    opacity: 1;
    pointer-events: all;
}

.afg-close-modal {
    height:25px;
    width: 25px;
    position: absolute;
    top:20px;
    right: 20px;
    cursor: pointer;
    background-image: url('../img/close-blk.svg');
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}

.afg-modal-header {
    min-height: 60px;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--color-2);
    padding: 0 15px;
    padding-left: 50px;
    color: var(--color-6);
    font-weight: 600;
    position: relative;
    font-size: 18px;
    line-height: 18px;
}

.afg-modal-content {
    padding: 20px;
    height: calc(100vh - 280px);
    overflow-y: scroll;
}

.afg-modal-header img {
    height: 100%;
    width: auto;
}

.afg-modal > img {
    height: 60px;
    margin-bottom: 20px;
} 
/**
* Modals Overlay
*/
.afg-modal-overlay {
    position: fixed;
    height: 100vh;
    width:100vw;
    top:0;
    left:0;
    z-index: 1000000;
    pointer-events: none;
    background-color: #000000;
    opacity: 0;
    transition: all .3s;
}

.afg-modal-overlay.afg-active {
    opacity: .50;
    pointer-events: all;
    cursor: pointer;
}

.afg-modal-inner .h2 {
    line-height: 30px;
    color: #2e4059;
}

/**
 * Popup
 */
.afg-popup {
 	max-width: 1000px;
 	min-height: 80vh;
 	width: 100%;
 	padding: 0;
 	border: unset;
}

.afg-popup figure {
 	display: flex;
 	flex-wrap: wrap;
 	min-height: 80vh;
}

.afg-popup figure figcaption {
 	flex-basis: 50%;
 	max-width: 50%;
}

.afg-popup figure > .a,
.afg-popup figure > p.afg-absolute {
    left: 50%;
    transform: translateX(-50%);
}
.afg-popup figure > p.afg-absolute,
.afg-popup figure > .a a {
    top: 20px;
    background-color: #fff;
    color: #000;
    text-transform: uppercase;
    font-size: 14px;
    line-height: 18px;
    letter-spacing: 1px;
    padding: 10px 25px;
    font-weight: 600;
    min-width: 214px;
    text-align: center;
}

.afg-popup figure > .a {
    top: auto;
    bottom: 20px;
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    justify-content: center;
    align-items: center;
    padding: 0;
}

.afg-popup figure > .a a {
    background-color: #ffc107;
    text-decoration: none;
    color: #343a40;
    border-bottom: unset;
    transition: all .3s;
    margin: 0 15px;
}

.afg-popup figure > .a a#afg-dismiss {
    background-color: #2e4059;
    color: #fff;
}

.afg-popup figure > .a a:hover {
    text-decoration: none;
    transform: translateX(10px);
}

.afg-popup img {
 	width: 100%;
 	height: 100%;
 	object-fit: cover;
}

.afg-popup figure > div:first-child {
    flex-basis: 50%;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    padding: 50px;
    font-family: serif;
}

.afg-popup figure > div:first-child p {
    font-size: 20px;
    line-height: 34px;
} 

/**
* Figcaption
*/
.afg-popup figure figcaption {
    flex-basis: 50%;
    background-color: #778da9;
    color: #fff;
    display: flex;
    align-items: center;
    padding: 60px 0;
}

.afg-popup figure figcaption .inner-figcaption {
    max-height: 400px;
    width: 100%;
}

.afg-popup figure figcaption h2 {
    display: block;
    max-width: 100%;
    flex-basis: 100%;
    font-size: 18px;
    line-height: 22px;
    padding: 10px 20px;
    color: #fff;
    background-color: #ffc107;
    margin-bottom: 60px;
}

.afg-popup figure figcaption div {
    justify-content: center;
}

.afg-popup figure figcaption img {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 100%;
    border: 2px solid #ffc107;
    margin: 0 15px;
}

.afg-popup figure figcaption img:nth-child(2) {
    object-fit: contain;
    border: unset;
}

.afg-popup figure figcaption img:not(:first-child) {
    object-fit: contain;
    border: unset;
}

.afg-popup .afg-close-modal {
    background-image: url('../img/close-wht.svg');
}

@media screen and (max-width: 910px) {
    
    .afg-popup figure {
        flex-direction: column-reverse;
        min-height: 80vh;
        justify-content: flex-end;
    }

    .afg-popup figure figcaption,
    .afg-popup figure > div {
        flex-basis: 100%;
        max-width: 100%;
    }

    .afg-popup figure figcaption {
        padding: 80px 0 30px;
    }

    .afg-popup figure > div:first-child {
        padding: 20px;
        flex-basis: 100%;
    }

    .afg-popup figure > .a a:first-child {
        margin-bottom: 20px;
    }

    .afg-popup figure > div:first-child p {
        font-size: 12px;
        line-height: 16px;
    }

    .afg-popup figure figcaption h2 {
        margin-bottom: 30px;
        text-align: center;
    }

    .afg-popup figure figcaption img {
        width: 100px;
        height: 100px;
        object-fit: cover;
        border-radius: 100%;
        border: 2px solid #ffc107;
        margin: 0 15px;
    }
} 