/* Post Menu adjust */
.experience-posts-section .post-menu {
	padding: var(--main-padding);
	padding-bottom: 0;
}
/* Post Menu adjust END */

.experience-posts .content-block {
	padding: 0;
}

.experience-page__content {
	padding-left: var(--main-padding);
	padding-right: var(--main-padding);
	margin-bottom: 2rem;
}

.experience-page__content p {
	line-height: 1.25;
	margin-bottom: 1rem;
}

/* posts */
.experience-post {
	position: relative;
	display: grid;
	grid-template-columns: 3fr 4fr;
	margin-bottom: 1rem;
	align-items: center;
	overflow: hidden;
	outline: 1px solid transparent;
	transition: outline 0.15s ease-in-out;
}

.experience-post:nth-of-type(3n-2) {
	grid-template-columns: 1fr;
}

.experience-post:last-of-type {
	grid-column: 1 / -1
}

.experience-post .img-wrapper {
	border-radius: 0 1em 1em 0;
	overflow: hidden;
	height: 100%;
}
.experience-post .img-wrapper img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.experience-post:nth-of-type(3n-2) .img-wrapper {
	transform: translateX(-1rem);
	order: 1;
}

.experience-post__text {
	padding: 1rem;
	height: 100%;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	align-items: baseline;
}

.experience-post__text h3 {
	font-size: 1.5rem;
	font-family: var(--headline-font);
	font-weight: 500;
	line-height: 1.1;
	color: var(--main-color);
	margin: 0;
}

.experience-post__text h3 a {
	color: inherit;
	font-weight: inherit;
}

.experience-post__text p {
	margin-top: 0.5rem;
	margin-bottom: 0;
	line-height: 1.25;
}

.experience-post__text p.cta.label {
	display: inline-block;
	padding: 1em 4em 1em 2em;
	background-color: var(--main-color);
	background-image: url(../images/button-white-circled-arrow.svg);
	background-repeat: no-repeat;
	background-position: calc(100% - 0.5em);
	background-size: 2.25em;
	font-size: 0.875rem;
	color: #fafafa;
	border-radius: 1.5em;
	text-transform: uppercase;
	opacity: 0;
	transform: translateY(100%);
	transition: transform 0.3s ease-in-out, opacity 0.5s ease-in-out;
}

.experience-post a {
	position: absolute;
	top: 0;
	left: 0;
	display: block;
	width: 100%;
	height: 100%;
	z-index: 10;
}

/* Accesibility */
.experience-post:has(*:focus) {
	outline: 1px solid var(--main-color);
	box-shadow: 1px 1px 5px var(--main-color);
}

/* mobile only */
@media (width < 750px) {
	.experience-post {
		background-color: #fafafa;
		padding: 0.5rem 0.5rem 0.5rem 0;
		border-radius: 0 1.5em 1.5em 0;

	}
	.experience-post:nth-of-type(3n) {
		padding: 0.5rem 0 0.5rem 0.5rem;
		border-radius: 1.5em 0 0 1.5em;
	}

	.experience-post:nth-of-type(3n-2) {
		padding: 0.5rem;
		border-radius: 1.5em 1.5em 0 0;
	}

	.experience-post__text {
		justify-content: center;
	}

	.experience-post__text p.cta.label {
		display: none;
	}

	.experience-post:nth-of-type(3n-2) {
		margin-bottom: 2rem;
	}

	.experience-post:nth-of-type(3n-2) .img-wrapper {
		max-height: 10rem;
	}
	.experience-post:nth-of-type(3n-2) .img-wrapper img {
		height: 100%;
	}

	.experience-post:nth-of-type(3n-2) .experience-post__text {
		padding: 1rem 1.5rem;
	}

	.experience-post .img-wrapper::before {
		content: '';
		display: block;
		width: 100%;
		height: 100%;
		position: absolute;
		background: linear-gradient(45deg, rgba(8, 8, 8, 0.5), transparent);
	}

	.experience-post .img-wrapper img {
		max-height: 16rem;
	}

	.experience-post .img-wrapper {
		position: relative;
	}

	.experience-post .img-wrapper::after {
		content: "Learn More >";
		position: absolute;
		bottom: 1rem;
		left: 1rem;
		display: block;
		color: #fafafa;
		font-weight: 500;
		transition: all 0.3s ease-in-out;
	}

	.experience-post:nth-of-type(3n-2) .img-wrapper::after {
		left: 2rem;
	}
	
	.experience-post:hover .img-wrapper::after {
		left: 2rem;
	}

	.experience-post:nth-of-type(3n-2):hover .img-wrapper::after {
		left: 3rem;
	}

	.experience-post:nth-last-of-type(2n-1):not(:first-of-type) {
		grid-template-columns: 4fr 3fr;
	}

	.experience-post:nth-last-of-type(2n-1):not(:first-of-type) .img-wrapper {
		order: 2;
		border-radius: 1em 0 0 1em;
	}
	
	.experience-post:has(*:focus) {
	outline: 1px solid rgba(25, 25, 25, 0.15);
	box-shadow: 0 3px 14px rgba(25, 25, 25, 0.15);
}

}

@media (width > 750px) {
	.experience-posts {
		display: grid;
		grid-template-columns: 1fr 1fr;
		gap: 1rem;
	}

	.experience-page__content,
	.experience-posts .experience-post:nth-of-type(3n-2) {
		grid-column: span 2;
	}

	.experience-post {
		grid-template-columns: 1fr;
	}
	.experience-post__text {
		position: absolute;
		left: 0;
		top: 0;
		padding: 2rem;
		max-width: 60ch;
		z-index: 5;
	}

	.experience-post__text h3,
	.experience-post__text p {
		color: #fafafa;
	}

	.experience-post:nth-of-type(3n-2) .img-wrapper {
		height: 100%;
		transform: translateX(0);
	}

	.experience-post img {
		aspect-ratio: auto;
		position: relative;
	}

	.experience-post::after {
		content: "";
		display: block;
		width: 100%;
		height: 100%;
		position: absolute;
		top: 0;
		left: 0;
		background: linear-gradient(-15deg, transparent, rgb(8, 8, 8));
		opacity: 0.85;
		z-index: 1;
		transition: all 0.3s ease;
	}

	.experience-post,
	.experience-post .img-wrapper,
	.experience-post::after {
		border-radius: 1em;
	}

	.experience-post img {
		transition: all 0.5s ease-in-out;
	}

	.experience-post:hover .experience-post__text p.cta.label,
	.experience-post:has(a:focus) .experience-post__text p.cta.label{
		display: inline-block;
		opacity: 1;
		transform: translateY(0);
	}

	.experience-post:hover img,
	.experience-post:nth-of-type(3n-2):hover img,
	.experience-post:has(a:focus) img,
	.experience-post:nth-of-type(3n-2):has(a:focus) img {
		transform: scale(1.08);
	}

	.experience-post:hover::after,
	.experience-post:has(a:focus)::after{
		opacity: 1;
	}
}
@media (width > 750px) and (width <= 1200px) {
	.experience-post:nth-of-type(3n-2) .img-wrapper {
		aspect-ratio: 16 / 5;
	}
}
	
@media (width > 750px) and (width < 1600px) {
	.experience-posts {
		padding: 1rem;
	}
	
}

@media (width > 1200px) {
	.experience-posts {
		grid-template-columns: repeat(3, 1fr);
		margin-top: 2rem;
	}
	
	.experience-post:not(:nth-of-type(3n-2)) .img-wrapper {
		aspect-ratio: 16 / 5;
	}

	.experience-post:nth-of-type(3n-2) img {
		aspect-ratio: auto;
		width: 100%;
		height: 100%;
	}

	.experience-posts .experience-post:first-of-type {
		grid-column: span 1;
		grid-row: span 2;
	}
	.experience-posts .experience-post:nth-of-type(2) {
		grid-column: span 2;
	}
	.experience-posts .experience-post:nth-of-type(3) {
		grid-column: span 3;
	}
}
