@import url('https://fonts.googleapis.com/css?family=Bebas+Neue&display=swap');

/* CARD */
.card {
    position: relative;
    float: left;
    /* original 3 column width is 29 */
    /* width: 29%; */
    width: 46%;
    height: 0;
    margin: 2%;
    padding-bottom: 20%;
}

.card__container {
	position: fixed;
	top: 0;
	left: 0;
	overflow-x: hidden;
	overflow-y: auto;
	width: 100%;
	height: 100%;
	-webkit-transform: translate3d(0, 0, 0);
	/* prevents flicker */

	-webkit-overflow-scrolling: touch;
}

.card__container--closed {
	position: absolute;
	overflow: hidden;
}
    .card__container--closed .card__caption h2,
    .card__container--closed .card__caption p {
        padding: 10px;
        margin: 0;
        background-color: rgba(0,0,0,.5);

        transition: all .2s;
    }
    .card__container--closed:hover .card__caption h2,
    .card__container--closed:hover .card__caption p {
        background-color: rgba(255,255,255,1);
        color: black;
    }

.card__image {
    position: relative;
    left: 50%;
    display: block;
    height: 100%;
    max-height: 500px;
    -webkit-transform: translateX(-50%);
    -ms-transform: translateX(-50%);
    transform: translateX(-50%);
}

.card__container--closed .card__image {
	cursor: pointer;
}

.card__content {
	position: relative;
	width: 100%;
	height: auto;
	margin: 0 auto;
	padding: 30px 40px 22px;
	color: #888;
	background: #fff;
}

.card__container--closed .card__content {
	margin-top: 0;
	padding: 5px 16px;
	pointer-events: none;
	background: transparent;
}

.card__caption {
	font-size: 2em;
	max-width: 900px;
	margin: 0 auto;
	padding: 35px 30px 0px;
}

.card__container--closed .card__caption {
	font-size: 1em;
	max-width: none;
	padding: 30px 10px;
	-webkit-transform: translateY(-100%);
	-ms-transform: translateY(-100%);
	transform: translateY(-100%);
}

.card__title {
	font-size: 1.5em;
	line-height: 1;
	margin: 5px 0 0 0;
	color: #3b393d;
}

.card__container--closed .card__title {
	color: #fff;
}

.card__subtitle {
	font-size: .95em;
	line-height: 1;
	margin: 5px 0 0;
	color: #777778;
}

.card__container--closed .card__subtitle {
	color: #f5f5f5;
}

.card__copy {
	font-size: 1.25em;
	max-width: 900px;
	margin: 0 auto;
	padding: 25px 30px 100px;
	color: #3b393d;
}

.card__copy p:first-of-type {
	font-size: 1.5em;
	padding: 0 0 1em 0;
}

.card__btn-close {
	font-size: 50px;
	position: absolute;
	top: 0;
	right: 0;
	padding: 25px;
	cursor: pointer;
}

.card__container--closed .card__btn-close {
	display: none;
}

.meta {
	font-size: .85em;
	display: -webkit-flex;
	display: flex;
	padding: 0 0 35px 0;

	-webkit-align-items: center;
	align-items: center;
}

.card__container--closed .meta {
	visibility: hidden;
}

.meta__avatar {
	border-radius: 50%;
}

.meta__author {
	font-weight: bold;
	padding: 0 15px;
}

.meta__date {
	margin: 0 0 0 auto;
}

@media only screen and (max-width: 980px) {
	.card {
		width: 46%;
		padding-bottom: 32.2%;
	}
	.card__image {
		max-height: 360px;
	}
	.card__content {
		margin-bottom: 0;
		padding-right: 20px;
		padding-left: 20px;
	}
}

@media only screen and (max-width: 580px) {
	.card {
		width: 96%;
		padding-bottom: 67.2%;
	}
}

@media only screen and (max-width: 400px) {
	.card__caption {
		font-size: 1.25em;
		padding: 35px 0px 0px;
	}
	.meta {
		padding: 0 0 25px 0;
	}
	.card__copy {
		font-size: 90%;
		padding: 25px 0px 100px;
	}
}


/* ===============================
 * New styles 
 * ============================= */

 /* Page layout */
.row {
    display: flex;
}
.card__copy .row p {
    font-size: 1em;
    margin-top: 0;
    padding-top: 0;
}
.col-1, .col-2 {
    width: 100%;
}
.col-1 {
    margin-right: 30px;
}
.col-2 {
    margin-left: 30px;
}
@media (max-width: 767px) {
    .row {
        flex-direction: column;
    }
    .col-2 {
        margin-left: 0;
        margin-top: 100px;
    }
}

.img-responsive {
    max-width: 100%;
    height: auto;
    display: block;
}
.cb-img-1 {
    margin-bottom: 30px;
}
.cb-img-2 {
    width: 67%;
}

.shadow {
    -webkit-box-shadow: 10px 10px 25px 0px rgba(0,0,0,0.2);
    -moz-box-shadow: 10px 10px 25px 0px rgba(0,0,0,0.2);
    box-shadow: 10px 10px 25px 0px rgba(0,0,0,0.2);
}

/* Fancy button / link */
*,
*:after,
*::before {
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
}

.boxy-btn a {
    position: relative;
    display: inline-block;
    margin: 15px 25px;
    outline: none;
    color: #fff;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 400;
    text-shadow: 0 0 1px rgba(255,255,255,0.3);
    font-size: 15px;
}
.boxy-btn a {
    line-height: 44px;
    -webkit-perspective: 1000px;
    -moz-perspective: 1000px;
    perspective: 1000px;
    text-align: center;
    color: white;
    margin: 0;
}

    .boxy-btn a span {
        position: relative;
        display: inline-block;
        padding: 0 14px;
        background: #2195de;
        -webkit-transition: -webkit-transform 0.3s;
        -moz-transition: -moz-transform 0.3s;
        transition: transform 0.3s;
        -webkit-transform-origin: 50% 0;
        -moz-transform-origin: 50% 0;
        transform-origin: 50% 0;
        -webkit-transform-style: preserve-3d;
        -moz-transform-style: preserve-3d;
        transform-style: preserve-3d;
    }

.csstransforms3d .boxy-btn a span::before {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    height: 100%;
    background: #0965a0;
    content: attr(data-hover);
    -webkit-transition: background 0.3s;
    -moz-transition: background 0.3s;
    transition: background 0.3s;
    -webkit-transform: rotateX(-90deg);
    -moz-transform: rotateX(-90deg);
    transform: rotateX(-90deg);
    -webkit-transform-origin: 50% 0;
    -moz-transform-origin: 50% 0;
    transform-origin: 50% 0;
}

.boxy-btn a:hover span,
.boxy-btn a:focus span {
    -webkit-transform: rotateX(90deg) translateY(-22px);
    -moz-transform: rotateX(90deg) translateY(-22px);
    transform: rotateX(90deg) translateY(-22px);
}

.csstransforms3d .boxy-btn a:hover span::before,
.csstransforms3d .boxy-btn a:focus span::before {
    background: #28a2ee;
}

/* Close button */
.fa-times-thin {
    transition: all .2s;
}
.fa-times-thin:before {
    content: '\00d7';
}
.fa-times-thin:hover::before {
    transform: rotate(90deg);
}

/* Fonts */
h1, h2, h3 {
    font-family: 'Bebas Neue', sans-serif;
}
.card__container--closed .card__caption h2 {
    font-size: 40px;
    padding-bottom: 0;
}
.card__caption h2 {
    font-size: 80px;
}
.card__container .card__caption .card__subtitle {
    font-size: 18px;
}

/* Header */
header.codrops-header {
    padding-bottom: 1.75em;
}
header.codrops-header h1 {
    font-size: 80px;
    transition: all .2s;
}
header.codrops-header h1 span {
    color: #888;
}
header.codrops-header h1 span + span {
    color: #555;
}
@media (max-width: 767px) {
    header.codrops-header h1 {
        font-size: 40px;
    }
}

/* Logo at bottom */
.content--related {
    margin-top: -40px;
    pointer-events: none;
}
.content--related svg,
.content--related img {
    width: 100px;
}