.portal_intro{
	position: fixed;
	z-index: 10;
	overflow: hidden;
	width: 100%;
	height: 100%;
	background: #272c38;
	-webkit-transition: -webkit-transform 0.6s;
	transition: transform 0.6s;
	-webkit-transition-timing-function: cubic-bezier(0.7, 0, 0.3, 1);
	transition-timing-function: cubic-bezier(0.7, 0, 0.3, 1);
}

.portal_container {
    overflow-x: hidden;
    width: 100%;
}

.portal_container--open .portal_intro {
    /* Adjusted the second translate3d to ensure the 'reveal' is higher */
    -webkit-transform: translate3d(0, -100%, 0) translate3d(0, 280px, 0) !important;
    transform: translate3d(0, -100%, 0) translate3d(0, 280px, 0) !important;
}

/* Fullscreen image */
.portal_intro__image {
	position: absolute;
	bottom: 0;
	min-width: 100%;
	max-height: 100%;
	width: auto;
	height: auto;
	opacity: 1;   
	-webkit-transform: translate3d(0, 0, 0);
	transform: translate3d(0, 0, 0);
	-webkit-transition: -webkit-transform 0.6s, opacity 0.6s;
	transition: transform 0.6s, opacity 0.6s;
	-webkit-transition-timing-function: cubic-bezier(0.7, 0, 0.3, 1);
	transition-timing-function: cubic-bezier(0.7, 0, 0.3, 1);
}

.portal_intro__image_render {
	position: absolute;
	bottom: 0;
	min-width: 100%;
	max-height: 100%;
	width: auto;
	height: auto;
	opacity: 0;
    animation: fadeIn 4.5s ease-in forwards;
    animation-delay:8s;
    
	-webkit-transform: translate3d(0, 0, 0);
	transform: translate3d(0, 0, 0);
	-webkit-transition: -webkit-transform 0.6s, opacity 0.6s;
	transition: transform 0.6s, opacity 0.6s;
	-webkit-transition-timing-function: cubic-bezier(0.7, 0, 0.3, 1);
	transition-timing-function: cubic-bezier(0.7, 0, 0.3, 1);
}


.portal_container--open .portal_intro__image {
	opacity: 0;
	-webkit-transform: translate3d(0, 20%, 0);
	transform: translate3d(0, 20%, 0);
}

/* Intro content */
.portal_intro__content {
	position: absolute;
	bottom: 7em;
	padding: 5em 5em 0em 5em;
	width: 40%;
	font-size: 0.7em;
	
}

.portal_intro__title {
	margin: auto;
	font-weight: 500;
	font-size: 4em;
	font-family: "Playfair Display", Georgia, serif;
	line-height: 1;
	/*background-color:#b7a77e;
	opacity:0.88;*/
}

.portal_intro__subtitle {
	display: -webkit-flex;
	display: flex;
	-webkit-align-portal_items: center;
	align-portal_items: center;
}


.portal_intro__description {
	margin: 1em 0em;
	line-height: 1.3;
	font-size: 1.5em;
}

/* portal_trigger button with SVG */
.portal_trigger {
	position: relative;
	-webkit-flex: none;
	flex: none;
	overflow: hidden;
	margin: 0.4em 1em;
	padding: 0 ;
	width: 60px;
	height: 60px;
	outline: none;
	border: none;
	background: none;
}

/* Hide the text */
.portal_trigger span {
	position: absolute;
	top: 100%;
}

.portal_icon rect,
.portal_icon line {
	stroke: #FFD364;
	fill: none;
	stroke-width: 2.5px;

}

.portal_icon {
	-webkit-transform-origin: 50% 50%;
	transform-origin: 50% 50%;
	-webkit-transition: opacity 0.3s, -webkit-transform 0.3s;
	transition: opacity 0.3s, transform 0.3s;
}

/* Hide grid and show cross when opening */
.portal_icon--cross,
.portal_trigger--active .portal_icon--grid {
	opacity: 0;
	-webkit-transform: scale3d(0.5, 0.5, 1);
	transform: scale3d(0.5, 0.5, 1);
}

.portal_trigger--active .portal_icon--cross {
	opacity: 1;
	-webkit-transform: scale3d(1, 1, 1);
}

/* Main content */
.portal_items-wrap0 {
	position: relative;
	display: -webkit-flex;
	display: flex;
	-webkit-flex-wrap: wrap;
	flex-wrap: wrap;
	padding: 300px 50px 0;
}

.portal_items-wrap2 {
	position: relative;
	display: -webkit-flex;
	display: flex;
	-webkit-flex-wrap: wrap;
	flex-wrap: wrap;
	padding: 0px 50px 20px; /*top distance of cards*/
}

.portal_items-wrap::after {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: #2a2e39;
	content: '';
	opacity: 1;
	-webkit-transition: opacity 0.6s;
	transition: opacity 0.6s;
	-webkit-transition-timing-function: cubic-bezier(0.7, 0, 0.3, 1);
	transition-timing-function: cubic-bezier(0.7, 0, 0.3, 1);
	pointer-events: none;
}

.portal_container--open .portal_items-wrap::after {
	opacity: 0;
}

.portal_items {
	position: relative;
	-webkit-flex: 1 0 25%;
	flex: 1 0 25%;
	overflow: hidden;
	height: 22vw;
	outline: none;
	border: 5px solid #2a2e39;
	border-width: 0 5px 10px;
	background: #1047a8;
}

.portal_items__image {
	position: absolute;
	top: 50%;
	min-height: 100%;
	width: 100%;
	opacity: 1;
	-webkit-transform: translate3d(0, -50%, 0) scale3d(1, 1, 1);
	transform: translate3d(0, -50%, 0) scale3d(1, 1, 1);
	-webkit-transition: -webkit-transform 0.5s, opacity 0.5s;
	transition: transform 0.5s, opacity 0.5s;
}

.portal_items:hover .portal_items__image {
	opacity: 1;
	-webkit-transform: translate3d(0, -50%, 0) scale3d(1.25, 1.25, 1);
	transform: translate3d(0, -50%, 0) scale3d(1.25, 1.25, 1);
}

.portal_items__title {
	position: absolute;
	bottom: 0.2em;
	margin-left:17.5px;
	padding: 1em;
	color: #b7a77e;
	font-size: 1.7em;
	font-family: "Playfair Display", Georgia, serif;
	line-height: 1;
	-webkit-transition: -webkit-transform 0.3s, opacity 0.3s;
	transition: transform 0.3s, opacity 0.3s;
	transform: translateY(-40px);
}

.portal_items__titlepad span {
    background-color: #b7a77e; 
    color: #05227A;
	opacity: 0.85;
/*	text-shadow: 1px 2px 6px rgba(0, 0, 0, 0.4);
*/	font-weight: semi-bold;
    /* 3. The Backpad (Padding) */
    /* First number is Top/Bottom, Second is Left/Right */
    padding: 0.05em 0.3em; 
    
    /* 4. Ensures padding looks good if text breaks onto two lines */
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
}

.portal_items:hover .portal_items__title span{
	opacity: 0.95;
	color:#FFF1DA;
	background-color: #0030B4; 
	-webkit-transform: translate3d(0, 0px, 0);
	transform: translate3d(0, -45px, 0);
}


/* Media Queries */

@media screen and (max-width: 1440px) {
	.portal_items {
		-webkit-flex: 1 0 33.333%;
		flex: 1 0 33.333%;
		height: 30vw;
	}
}

@media screen and (max-width: 1000px) {
	.portal_items {
		-webkit-flex: 1 0 50%;
		flex: 1 0 50%;
		height: 25vw;
	}
	.portal_items,
	.portal_intro__content {
        bottom: 10em !important; /* Lifted up from 7em to give room below */
		font-size: 0.55em;
		width: 100%;
		
	}
	.portal_items__title span{
	font-size: 1.2em;
	width: auto;
}
	
}
@media screen and (max-width: 800px) {
    /* This creates the extra breathing room you want between the intro and the cards */
    .portal_items-wrap0:first-of-type {
        padding-top: 420px !important; 
    }
    
    /* Adjust card height slightly for better scrolling flow */
    .portal_items {
        height: 70vw !important; 
    }
    
}@media screen and (max-width: 590px) {
	.portal_items {
		-webkit-flex: 1 0 100%;
		flex: 1 0 100%;
		height: 70vw;
		font-size: 0.8em;
	}
	.portal_intro__title {
		font-size: 5.5em;

	}
}
