/*
Theme Name: Charles Levick
Author: Silomedia
Author URI: https://silomedia.co.uk/
Description: Bespoke theme for Charles Levick. 
*/
/* Import Inter, Lexend, and Montserrat variable fonts from Google CDN */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@100..900&family=Lexend:wght@100..900&family=Montserrat:wght@100..900&display=swap');

/***********************************************************************
 * Reset
 ***********************************************************************/

/* Box sizing reset */
*, *::before, *::after { box-sizing: border-box; }

/* Remove default margin */
* { margin: 0; }

/* Allow percentage-based heights in the application */
html, body { height: 100%; }

/* Typographic tweaks */
body { line-height: 1.5; -webkit-font-smoothing: antialiased; }

/* Improve media defaults */
img, picture, video, canvas, svg { display: block; max-width: 100%; }

/* Remove built-in form typography styles */
input, button, textarea, select { font: inherit; }

/* Avoid text overflows */
p, h1, h2, h3, h4, h5, h6 { overflow-wrap: break-word; }

/* Selection/highlight color */
::selection {
	background: var(--primary);
	color: #fff;
}

::-moz-selection {
	background: var(--primary);
	color: #fff;
}

/***********************************************************************
 * Globals
 ***********************************************************************/

:root {
	--primary: #e29b44;
	--primary-gradient: linear-gradient(33deg, rgb(85, 218, 204), rgb(49, 179, 166));
	--secondary: #223244;
	--secondary-dark: #151e30;
	--alt-bg: #f8fbff;
	--text: #334155;
	--white: #ffffff;
	--font-inter: 'Inter', sans-serif;
	--font-montserrat: 'Montserrat', sans-serif;
	--border-colour: #d1dadf;

	font-size: 18px;
	font-weight: 400;

	@media(max-width: 1200px) {
		font-size: 17px;
	}

	@media(max-width: 768px) {
		font-size: 16px;
	}
} 

body {
	font-family: var(--font-inter);
	color: var(--text);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
	color: var(--secondary-dark);
	font-family: var(--font-montserrat);
	line-height: 1.1;
	font-weight: 800;
}

strong {
	color: var(--secondary-dark);
}

.container {
	max-width: 80rem;
	margin: 0 auto;
	padding: 0 2rem;

	@media(max-width: 600px) {
		padding: 0 1.4rem;
	}
}

h1 {
	font-size: clamp(2.5rem, 6vw, 4rem);
	margin: 0 auto 1rem;
	max-width: 58rem;
}

h2 {
	font-size: clamp(1.8rem, 5vw, 2.2rem);
	margin-bottom: 1rem;
}

h3 {
	font-size: 1.5rem;
	margin-bottom: 1rem;
}

h4 {
	font-size: 1.25rem;
	margin-bottom: 1rem;
}

h5 {
	font-size: 1.1rem;
	margin-bottom: 1rem;
}

h6 {
	font-size: 1rem;
	margin-bottom: 1rem;
}

p {
	font-size: 1rem;
	line-height: 1.7;
	margin-bottom: 1.1rem;
}

a {
	transition: 200ms;
	color: var(--primary);
	font-weight: 500;

	&.icon-link {
		display: flex;
		align-items: center;
		gap: 0.75rem;
		text-decoration: none;
		color: var(--text);
		margin-bottom: 0.75rem;

		span {
			display: block;
			line-height: 1;
			margin: 0;
			padding: 0;
			color: var(--primary);
		}

		&:hover {
			color: var(--primary);
		}
	}
}

ul, ol {
	margin-bottom: 1.5rem;

	&.checkmarks {
		margin: 1.5rem 0 1.5rem;
		padding: 0;
		list-style: none;

		li {
			display: block;
			position: relative;
			padding-left: 2rem;
			margin-bottom: 0.75rem;

			&:before {
				content: '';
				position: absolute;
				left: 0;
				top: 0.4rem;
				width: 1rem;
				height: 1rem;
				background: url('images/accept.svg') no-repeat;
				border-radius: 50%;
				background-size: contain;
			}
		}
	}

	&:last-child {
		margin-bottom: 0;
	}
}

img {
	max-width: 100%;
	height: auto;
}

.rough-annotation {
	z-index: -1;
}

table {
	width: 100%;
	border-collapse: collapse;
	margin-bottom: 1.5rem;

	th, td {
		padding: 0.5rem;
		border: 1px solid var(--border-colour);
	}

	th {
		text-align: left;
	}

	tr:nth-child(even) {
		background: var(--alt-bg);
	}

	tbody tr:hover {
		background: var(--alt-bg);
	}

	tfoot {
		font-weight: 500;
	}

	tfoot td {
	}
}

iframe {
	width: 100%;
	display: block;
}

/* Global Button Styles */
.button, input[type="submit"] {
	display: inline-block;
	padding: 1rem 1.6rem;
	border-radius: 0.4rem;
	text-decoration: none;
	transition: background 0.3s;
	font-weight: 700;
	line-height: 1;
	letter-spacing: 0.075em;
	font-size: 0.85rem !important;
	text-transform: uppercase;
	background: var(--primary);
	color: var(--white);
	border: none;

	&.button-primary {
		background: var(--primary);
		color: var(--white);

		&:hover {
			background: var(--secondary);
		}
	}

	&.button-secondary {
		background: transparent;
		color: var(--white);
		border: 1px solid var(--white);

		&:hover {
			background: var(--white);
			color: var(--secondary-dark);
		}
	}

	&.button-secondary-dark {
		background: transparent;
		color: var(--secondary-dark);
		border: 1px solid var(--secondary-dark);

		&:hover {
			background: var(--secondary-dark);
			color: var(--white);
		}
	}
}

input[type="checkbox"] {
	accent-color: #253449;
}

input[type="text"] {
	padding: 8px 12px;
}

section {
	position: relative;
	z-index: 1;
}

.colour-primary {
	background: linear-gradient(33deg, rgb(98, 228, 215), rgb(38, 156, 145));
	background-size: 200% 200%;
	-webkit-background-clip: text;
	color: transparent;
	animation: gradient-animation 5s infinite;
}

@keyframes gradient-animation {
	0% {
		background-position: 0% 50%;
	}
	50% {
		background-position: 100% 50%;
	}
	100% {
		background-position: 0% 50%;
	}
}

.colour-secondary {
	color: var(--secondary);
}

/***********************************************************************
 * Header
 ***********************************************************************/

#masthead {
	padding: 2.4rem 0;
	position: absolute;
	top: 0;
	z-index: 10;
	width: 100%;

	.container {
		display: flex;
		justify-content: space-between;
		align-items: center;
	}

	.logo {
		width: 8rem;
		height: auto;
	}

	@media(max-width: 1000px) {
		.logo {
			width: 6rem;
		}
	}

	a {
		font-family: var(--font-montserrat) !important;
	}
}

.mega-toggle-block .button {
	height: 35px;
	display: grid;
	place-items: center;
	padding: 0 1rem;
	margin-right: 1rem;
	font-size: 14px;
	margin-top: 7px;

	@media(max-width: 530px) {
		display: none;
	}
}

.mega-indicator {
	color: var(--primary) !important;
}

/***********************************************************************
 * Footer
 ***********************************************************************/

#footer {
	background: linear-gradient(300deg, #223244, #2a3650);
	color: var(--white);
	padding: 4rem 0rem 0rem;
	border-top: solid 1px #212a3f;
	position: relative;
	overflow: visible;

	.footer-columns {
		display: grid;
		grid-template-columns: minmax(0, 4fr) minmax(0, 2fr) minmax(0, 2fr) minmax(0, 2fr) minmax(0, 2fr);
		gap: 3rem;
		border-bottom: solid 1px rgba(0, 0, 0, 0.2);
		padding-bottom: 4rem;

		.brand {
			.footer-logo {
				max-width: 80%;
				width: 9rem;
				margin-bottom: 1.6rem;
				margin-top: 0.5rem;
			}
		}

		.footer-column {
			h3 {
				font-size: 1rem;
				margin-bottom: 0.8rem;
				margin-top: 0.8rem;
				color: var(--white);
			}

			ul {
				list-style: none;
				margin: 0;
				padding: 0;

				a {
					color: #fff;
					text-decoration: none;
					margin-bottom: 0.6rem;
					display: block;
					font-weight: 300;

					&:hover {
						color: var(--primary);
					}
				}
			}
		}

		@media(max-width: 1200px) {
			display: grid;
			grid-template-columns: 1fr 1fr 1fr 1fr;
			gap: 2rem;
			
			.brand {
				grid-column: 1 / -1;
				margin-bottom: 1rem;
				width: 100%;
				max-width: 100%;
			}
		}

		@media(max-width: 700px) {
			grid-template-columns: 1fr 1fr;
		}
	}

	.copyright {
		border-top: solid 1px rgba(223, 238, 255, 0.1);
		padding: 1.5rem 0 2rem;
		opacity: 0.8;
		font-size: 0.85rem;
		display: flex;
		justify-content: space-between;
		align-items: center;
		gap: 2rem;
		flex-wrap: wrap;

		a {
			color: #fff;
		}

		.social {
			display: flex;
			gap: 1rem;

			a {
				transition: 500ms;
				font-size: 1.1rem;

				svg {
					width: 1.1rem;
					transition: 500ms;
					height: 1.1rem;
				}
			}

			a:hover {
				svg {
					fill: var(--primary);
				}
			}
		}
	}
}

/***********************************************************************
 * Blog
 ***********************************************************************/

 .single-post {
	& article {
		max-width: 60rem;
		margin: auto;
		padding: 4rem 0;

		h2 {
			margin-bottom: 1rem;
			margin-top: 2rem;
			font-size: 1.8rem;
		}

		h3 {
			margin-bottom: 1rem;
			font-size: 1.4rem;
			margin-top: 2rem;
		}
	}

	.latest-posts {
		background: var(--alt-bg);
	}
 }

/***********************************************************************
 * WPJM
 ***********************************************************************/

.job_listings {
	margin: 2rem 0 2rem;
	text-align: left;

	.tagline {
		display: none;
	}

	.company strong {
		color: var(--primary);
	}

	.application-deadline   {
		display: none !important;
	}

	.no_job_listings_found {
		text-align: center;
	}
}

 .single-job_listing {
	& article {
		max-width: 60rem;
		margin: auto;
		padding: 4rem 0;

		h2 {
			margin-bottom: 1rem;
			margin-top: 2rem;
			font-size: 1.8rem;
		}

		h3 {
			margin-bottom: 1rem;
			font-size: 1.4rem;
			margin-top: 2rem;
		}
	}

	.latest-posts {
		background: var(--alt-bg);
	}

	.job-listing-meta {
		::before {
			color: var(--primary) !important;
			margin-right: 8px !important;
		} 

		li {
			color: inherit;
			font-weight: bold;
		}
	}
 }

 /***********************************************************************
 * WPCF7
 ***********************************************************************/

.wpcf7 {
	.wpcf7-form {
		max-width: 1000px;
		margin: 0 auto;
	}

	.wpcf7-form p {
		margin-bottom: 1rem;
	}

	.wpcf7-form input[type="text"],
	.wpcf7-form input[type="email"],
	.wpcf7-form input[type="tel"],
	.wpcf7-form textarea {
		width: 100%;
		padding: 0.75rem;
		border: 1px solid #c6cfd3;
		border-radius: 0.25rem;
		font-size: 1rem;
		margin-top: 0.5rem;
		font-family: var(--font-inter);
		caret-color: var(--primary);

		&:focus {
			outline: 1px solid var(--primary);
			border-color: var(--primary);
		}
	}

	.wpcf7-form textarea {
		height: 150px;
		min-height: 150px;
		max-width: 100%;
	}

	.wpcf7-form input[type="submit"] {
		border: none;
		appearance: none;
		cursor: pointer;
	}

	label {
		font-family: var(--font-lexend);
		color: var(--secondary-dark);
		display: block;
	}
}

/***********************************************************************
 * Flexible Content Blocks
 ***********************************************************************/

/* Flexible Content: Home Hero *****************************************/

section.home-hero {
	padding: 14rem 0 14rem;
	text-align: center;
	position: relative;
	overflow: hidden;
	width: 100%;

	@media(max-width: 800px) {
		padding: 10rem 0 10rem;
	}

	h1 {
		margin-bottom: 1.5rem;
		color: #fff;
		font-weight: 750;
	}

	p {
		color: var(--primary);
		margin-bottom: 0.5rem;
		font-weight: 800;
		text-transform: uppercase;
		font-size: 1rem;
		letter-spacing: 0.2em;
		font-family: var(--font-montserrat);
	}

	.container {
		position: relative;
		z-index: 2;
	}

	video {
		position: absolute;
		top: 0;
		left: 0;
		width: 100%;
		height: 100%;
		object-fit: cover;
		object-position: center center;
		z-index: -1;
	}

	&::after {
		content: '';
		display: block;
		width: 100%;
		height: 100%;
		position: absolute;
		top: 0;
		left: 0;
		background: linear-gradient(359deg, #171f29, #000000c7);
		opacity: 0.6;
		z-index: 0;
	}

	.custom-shape-divider {
		position: absolute;
		bottom: 0;
		left: 0;
		width: 100%;
		overflow: hidden;
		line-height: 0;
		z-index: 5;
	}

	.custom-shape-divider svg {
		position: relative;
		display: block;
		width: calc(100% + 1.3px);
		height: 3rem;
	}

	.custom-shape-divider .shape-fill {
		fill: #FFFFFF;
	}

	.hero-search {
		margin: 4rem auto 0;
		color: #fff;
		text-align: left;
		max-width: 60rem;

		@media(max-width: 800px) {
			text-align: center;
		}

		p {
			color: #fff;
			letter-spacing: 0;
			text-transform: none;
			font-family: var(--font-inter);
			font-weight: 600;
		}

		form {
			display: flex;
			margin-top: 0.5rem;
			gap: 1rem;


			label {
				visibility: hidden;
				font-size: 0;
				height: 0;
				overflow: hidden;
				width: 0;
				display: none;
			}

			input[type="text"] {
				flex: 1 0;
				padding: 0.5rem 1rem;
				caret-color: var(--primary);
				width:100%;


				&:focus {
					outline: 1px solid var(--primary);
				}
			}


			input[type="submit"] {
				appearance: none;
				border: none;
				cursor: pointer;
			}
			.search_keywords, .search_location{
				width:40%;
			}
			.select2-container--default .select2-selection--multiple .select2-selection__choice{
				color: #334155;
			}
			.select2-container--default .select2-selection--multiple{
				padding:0.2rem 1rem;
			}

			@media(max-width: 800px) {
				flex-direction: column;
				gap: 1rem;
				align-items: center;

				input[type="text"] {
					width: 100%;
				}
				.search_keywords, .search_location{
			    	width:100%;
			    }
			    input[type="submit"] {
			    	width: 100%;
			    }
			}
		}

		.hero-search-buttons {
			display: flex;
			justify-content: center;
			text-align: center;
			row-gap: 1rem;
			column-gap: 2rem;
			margin-top: 1.5rem;
			flex-wrap: wrap;

			a {
				display: flex;
				gap: 1rem;
				align-items: center;
				text-align: center;
				width: fit-content;
				line-height: 1.2;
				text-decoration: none;
				color: #fff;
				background: linear-gradient(300deg, #0000002a, #00000028);
				padding: 1rem 1.5rem;
				border-radius: 0.5rem;
				border: solid 1px #ffffff33;
				backdrop-filter: blur(10px);
				transition: 400ms;
				will-change: transform;

				svg {
					fill: var(--primary);
					width: 1.5rem;
					height: 1.5rem;
				}

				&:hover {
					background: linear-gradient(300deg, #0000005e, #00000062);
					border: solid 1px #ffffff60;
					transform: scale(1.05);
				}
			}
		}
	}
}

/* Flexible Content: Latest Jobs *************************************/
section.latest-jobs {
	text-align: center;
	padding: 5rem 0;
	
	.no_job_listings_found {
		color: var(--primary);
	}
}

/* Flexible Content: Service Boxes *************************************/

section.service-boxes {
	padding: 5rem 0;
	background: linear-gradient(300deg, #223244, #2a3650);
	

	h2 {
		margin-bottom: 1rem;
		color: var(--white);
		text-align: center;
	}

	&.no-subtitle h2 {
		margin-bottom: 3rem;
	}

	p {
		margin-bottom: 3rem;
		color: var(--white);
		opacity: 0.8;
		text-align: center;
	}

	.services {
		display: flex;
		flex-wrap: wrap;
		border-right: solid 1px rgba(255,255,255,0.3);
		border-bottom: solid 1px rgba(255,255,255,0.3);
		background: rgba(0, 0, 0, 0.4);
		backdrop-filter: blur(10px);

		.service-box {
			flex: 1 0 33.333%;
			border-left: solid 1px rgba(255,255,255,0.3);
			border-top: solid 1px rgba(255,255,255,0.3);
			padding: 1.6rem;
			text-align: left;

			@media(max-width: 900px) {
				flex: 1 0 50%;
			}

			@media(max-width: 500px) {
				flex: 1 0 100%;
				&:not(:has(p)) {
					display: none;
				}
			}

			* {
				will-change: transform;
			}

			h3 {
				margin-bottom: 0.8rem;
				color: var(--white);
				font-size: 1.3rem;
			}

			p {
				margin-bottom: 0;
				font-size: 0.9rem;
				color: var(--white);
				opacity: 0.8;
				line-height: 1.4;
				text-align: left;
			}

			svg {
				height: 2rem;
				fill: #fff;
				width: auto;
				margin-bottom: 1rem;
				opacity: 0.9;
			}

			.button {
				background: var(--primary);
				color: var(--white);

				&:hover {
					background: #3bb3a8;
				}
			}
		}
	}

	&.compact .services .service-box {
		h3 {
			font-size: 1rem;
			font-weight: 500;
		}

		p {
			font-size: 0.8rem;
			font-weight: 400;
		}

		svg {
			height: 3rem;
			margin-bottom: 1.25rem;
		}
	}

	&::after {
		content: '';
		display: block;
		width: 100%;
		height: 100%;
		position: absolute;
		top: 0;
		left: 0;
		background: linear-gradient(359deg, #171f29, #000000c7);
		opacity: 0.7;
		z-index: -1;
	}

	.container {
		position: relative;
		z-index: 2;
	}

	video, img.bg-image {
		position: absolute;
		top: 0;
		left: 0;
		width: 100%;
		height: 100%;
		object-fit: cover;
		object-position: center center;
		z-index: -1;
	}

	&.columns-4 .services .service-box {
		flex: 1 0 25%;

		@media(max-width: 1100px) {
			flex: 1 0 50%;
		}

		@media(max-width: 500px) {
			flex: 1 0 100%;
		}
	}
}

body.home {
	section.service-boxes {
		text-align: center;
	}
}

/* Flexible Content: Latest Posts *********************************************/

section.latest-posts {
	text-align: center;
	padding: 5rem 0;
	
	p {
		margin-bottom: 3rem;
	}

	.button {
		margin-top: 3rem;
	}

	.posts {
		display: grid;
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 2.5rem;

		.post {
			position: relative;
			border-radius: 1rem;
			overflow: hidden;
			text-align: left;
			padding: 1.5rem;
			text-decoration: none;
			display: flex;
			flex-direction: column;
			justify-content: space-between;
			min-height: 30rem;

			h3 {
				margin: 0;
				padding: 0;
				color: var(--white);
			}

			span {
				display: inline-block;
				width: fit-content;
				background: var(--primary);
				padding: 0.5rem 0.6rem 0.4rem;
				text-transform: uppercase;
				border-radius: 0.25rem;
				color: #fff;
				font-size: 0.7rem;
				line-height: 1;
				font-family: var(--font-montserrat);
				letter-spacing: 0.1em;
				font-weight: 700;
			}

			img {
				position: absolute;
				top: 0;
				left: 0;
				width: 100%;
				height: 100%;
				object-fit: cover;
				object-position: center center;
				z-index: -2;
			}

			&::after {
				content: '';
				display: block;
				width: 100%;
				height: 100%;
				position: absolute;
				top: 0;
				left: 0;
				background: linear-gradient(0deg, #171f29, #00000000);
				opacity: 0.6;
				z-index: -1;
			}

			&:hover {
				transform: translateY(-5px);
				box-shadow: 0 0 20px rgba(0,0,0,0.3);
			}
		}

		@media(max-width: 1100px) {
			grid-template-columns: repeat(1, minmax(0, 1fr));

			.post {
				min-height: 20rem;
			}
		}
	}
}


/* Flexible Content: Simple Title **************************************/

section.simple-title {
	padding: 14rem 0 10rem;
	text-align: center;
	background-size: cover;
	background-image: linear-gradient(300deg, #223244, #2a3650);
	background-position: center center;

	&::after {
		content: '';
		display: block;
		width: 100%;
		height: 100%;
		position: absolute;
		top: 0;
		left: 0;
		background: linear-gradient(359deg, #171f29, #000000c7);
		opacity: 0.6;
		z-index: -1;
	}

	h3 {
		color: var(--primary);
		margin-bottom: 0.5rem;
		font-weight: 800;
		text-transform: uppercase;
		font-size: 1rem;
		letter-spacing: 0.2em;
	}

	h1 {
		margin-bottom: 0.5rem;
		color: #fff;
		font-weight: 750;
	}

	p {
		margin-bottom: 0;
		max-width: 60rem;
		margin: 1.5rem auto 0;
		color: #fff;
		font-size: 1.2rem;
		opacity: 0.9;
	}

	.custom-shape-divider {
		position: absolute;
		bottom: 0;
		left: 0;
		width: 100%;
		overflow: hidden;
		line-height: 0;
	}

	.custom-shape-divider svg {
		position: relative;
		display: block;
		width: calc(100% + 1.3px);
		height: 50px;
	}

	.custom-shape-divider .shape-fill {
		fill: #FFFFFF;
	}
}

/* Flexible Content: Stats ************************************************/

section.stats {
	padding: 3rem 0;
	position: relative;
	overflow: hidden;
	background: var(--secondary);

	.stats-bg {
		position: absolute;
		top: 0;
		left: 0;
		width: 100%;
		height: 100%;
		background-image: url('images/homepage-banner.jpg');
		background-size: cover;
		background-position: center center;
		filter: grayscale(100%);
		opacity: 0.08;
		z-index: 0;
	}

	.container {
		display: grid;
		grid-template-columns: repeat(4, minmax(0, 1fr));
		gap: 2rem;
		position: relative;
		z-index: 2;

		@media(max-width: 900px) {
			grid-template-columns: repeat(2, minmax(0, 1fr));
		}
	}

	.stat {
		text-align: center;
		color: #fff;

		h3 {
			margin: 0;
			color: var(--primary);
			font-size: 2rem;
		}

		p {
			margin: 0;
			opacity: 0.9;
		}
	}
}

/* Flexible Content: Two-Column Text **************************************/

section.two-column-text {
	margin: 4rem 0;
	text-align: center;

	.container {
		display: grid;
		grid-template-columns: 1fr 1fr;
		gap: 3rem;
		position: relative;
		z-index: 2;

		.column {
			text-align: left;

			h3 {
				margin-bottom: 0.5rem;
			}

			p {
				margin-bottom: 1.5rem;
			}
		}
	}

	h2 {
		grid-column: 1 / -1;
		margin-bottom: 1rem;
	}

	&.boxed {
		.column {
			background: var(--alt-bg);
			padding: 2.5rem;
			border-radius: 0.5rem;
		}
	}

	@media(max-width: 900px) {
		.container {
			grid-template-columns: 1fr;
		}
	}

	&.has-background {
		background: var(--alt-bg);
		padding: 4rem 0;
		color: var(--white);
		background-size: cover;
		background-position: center center;
		margin: 0;

		&::after {
			content: '';
			width: 100%;
			height: 100%;
			position: absolute;
			top: 0;
			left: 0;
			background: linear-gradient(359deg, #171f29, #000000c7);
			opacity: 0.9;
		}

		h2, h3, h4, h5, ul, ol, p {
			color: var(--white);
		}
	}
}

section.two-column-text + section.text-and-image {
	margin-top: 0rem;
}


/* Flexible Content: Three-Column Text **************************************/

section.three-column-text {
	margin: 4rem 0;
	text-align: center;

	.container {
		display: grid;
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 3rem;

		.column {
			text-align: left;

			h3 {
				margin-bottom: 0.5rem;
			}

			p {
				margin-bottom: 1.5rem;
			}
		}
	}

	@media(max-width: 900px) {
		.container {
			grid-template-columns: 1fr;
		}
	}
}

/* Flexible Content: Text and Image *************************************/
section.text-and-image {
	margin: 4rem 0;

	&.light-bg {
		background: #f5f5f5;
		padding: 4rem 0;
		margin: 0;

		.text {
			color: var(--secondary);

			h2 {
				color: var(--secondary);
			}
		}
	}

	.container {
		display: grid;
		grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
		gap: 4rem;
		align-items: stretch;
	}

	.text {
		text-align: left;
		display: flex;
		flex-direction: column;
		justify-content: center;

		h2 {
			margin-bottom: 1.4rem;

			small {
				color: var(--primary);
				margin-bottom: 0.5rem;
				text-transform: uppercase;
				font-size: 1rem;
				letter-spacing: 0.2em;
				display: block;
			}
		}

		.button {
			margin-top: 0.5rem;
		}
	}

	.image {
		display: flex;
		align-items: stretch;
	}

	img, video {
		width: 100%;
		height: 100%;
		object-fit: cover;
		object-position: center center;
		border-radius: 0.5rem;
		display: block;
	}

	&.image-left { 
		.container {
			grid-template-columns: 1fr 1fr;
		}

		.text {
			order: 2;
		}

		.image {
			order: 1;
		}
	}

	&.boxed-style {
		position: relative;
		padding: 5rem 0;
		margin: 0;

		.section-bg {
			position: absolute;
			top: 0;
			left: 0;
			width: 100%;
			height: 100%;
			object-fit: cover;
			object-position: center center;
			z-index: 0;
		}

		.section-overlay {
			position: absolute;
			top: 0;
			left: 0;
			width: 100%;
			height: 100%;
			background: linear-gradient(359deg, #171f29, #000000c7);
			opacity: 0.7;
			z-index: 1;
		}

		.container {
			position: relative;
			z-index: 2;
		}

		.content-box {
			display: grid;
			grid-template-columns: 1fr 1fr;
			gap: 3rem;
			align-items: stretch;
			background: rgba(0, 0, 0, 0.4);
			backdrop-filter: blur(10px);
			border: solid 1px rgba(255,255,255,0.2);
			padding: 2rem;
			border-radius: 0.5rem;

			@media(max-width: 900px) {
				grid-template-columns: 1fr;
			}
		}

		.text {
			color: #fff;
			display: flex;
			flex-direction: column;
			justify-content: center;

			h2 {
				color: #fff;
			}
		}

		.image {
			display: flex;

			img, video {
				border-radius: 0.25rem;
				width: 100%;
				height: 100%;
				object-fit: cover;
			}
		}

		&.image-left .content-box {
			.text {
				order: 2;
			}

			.image {
				order: 1;
			}

			@media(max-width: 900px) {
				.text {
					order: 2;
				}

				.image {
					order: 1;
				}
			}
		}
	}

	@media(max-width: 900px) {
		.container {
			display: flex;
			flex-direction: column;
			gap: 1rem;
			
			.image {
				order: 0 !important;

				img {
					aspect-ratio: 16 / 9;
				}
			}

			.text {
				order: 3 !important;
			}
		}
	}
}

section.text-and-image + section.text-and-image, section.text-and-image + section.text-and-quote, section.text-and-quote + section.text-and-image {
	margin-top: 1rem;
}

/* Flexible Content: Text *********************************************/

section.text {
	margin: 4rem 0;

	.container {
		max-width: 60rem;
	}

	h2 {
		font-size: 1.8rem;
		
	&:not(:first-child) {
			margin-top: 2rem;
		}
	}

	h3 {
		font-size: 1.5rem;

	&:not(:first-child) {
			margin-top: 2rem;
		}
	}

	h4 {
		font-size: 1.2rem;
	}
}

/* Flexible Content: Team Grid *********************************************/

section.team-grid {
	padding: 4rem 0;
	background: var(--secondary);
	overflow: visible;

	h2 {
		text-align: center;
		margin-bottom: 2rem;
		color: #fff;
	}

	.subtitle {
		text-align: center;
		max-width: 40rem;
		margin: 0 auto 3rem;
		opacity: 0.8;
	}

	.team-members {
		display: grid;
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 2rem;

		@media(max-width: 900px) {
			grid-template-columns: repeat(2, minmax(0, 1fr));
		}

		@media(max-width: 550px) {
			grid-template-columns: 1fr;
			max-width: 320px;
			margin: 0 auto;
		}
	}

	.team-member {
		cursor: pointer;
		transition: transform 0.3s ease;

		&:hover {
			transform: translateY(-0.5rem);

			.member-image img {
				transform: scale(1.05);
			}
		}

		.member-image {
			position: relative;
			overflow: hidden;
			border-radius: 0.5rem;
			margin-bottom: 1rem;
			aspect-ratio: 1 / 1;
			background: var(--secondary-dark);

			img {
				width: 100%;
				height: 100%;
				object-fit: cover;
				object-position: center top;
				transition: transform 0.4s ease;
			}

			.placeholder-image {
				width: 100%;
				height: 100%;
				background: var(--secondary-dark);
			}
		}

		.member-info {
			text-align: center;

			h3 {
				font-size: 1.1rem;
				margin-bottom: 0.25rem;
				color: #fff;
			}

			.member-title {
				font-size: 0.8rem;
				font-family: var(--font-montserrat);
				color: var(--primary);
				text-transform: uppercase;
				letter-spacing: 0.05em;
				font-weight: 600;
				margin: 0;
			}
		}
	}
}

/* Team Modal */
.team-modal {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 9999;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s ease, visibility 0.3s ease;

	&.active {
		opacity: 1;
		visibility: visible;

		.modal-content {
			transform: translateY(0);
		}
	}

	.modal-backdrop {
		position: absolute;
		top: 0;
		left: 0;
		width: 100%;
		height: 100%;
		background: rgba(0, 0, 0, 0.8);
		backdrop-filter: blur(4px);
	}

	.modal-content {
		position: relative;
		background: var(--secondary);
		border-radius: 1rem;
		max-width: 700px;
		width: 90%;
		max-height: 90vh;
		overflow: auto;
		transform: translateY(2rem);
		transition: transform 0.3s ease;
		box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
	}

	.modal-close {
		position: absolute;
		top: 1rem;
		right: 1rem;
		background: var(--secondary-dark);
		border: none;
		width: 2.5rem;
		height: 2.5rem;
		border-radius: 50%;
		cursor: pointer;
		display: flex;
		align-items: center;
		justify-content: center;
		z-index: 10;
		transition: background 0.2s ease;

		&:hover {
			background: var(--primary);
		}

		svg {
			width: 1.25rem;
			height: 1.25rem;
			color: #fff;
		}
	}

	.modal-body {
		display: flex;
		gap: 2rem;
		padding: 2rem;

		@media(max-width: 600px) {
			flex-direction: column;
			text-align: center;
		}
	}

	.modal-image {
		flex: 0 0 200px;

		img {
			width: 100%;
			border-radius: 0.5rem;
			aspect-ratio: 1 / 1;
			object-fit: cover;
			object-position: center top;
		}

		@media(max-width: 600px) {
			flex: none;
			max-width: 200px;
			margin: 0 auto;
		}
	}

	.modal-info {
		flex: 1;

		h3 {
			font-size: 1.5rem;
			margin-bottom: 0.25rem;
			color: #fff;
		}

		.member-title {
			font-size: 0.9rem;
			font-family: var(--font-montserrat);
			color: var(--primary);
			text-transform: uppercase;
			letter-spacing: 0.05em;
			font-weight: 600;
			margin-bottom: 1rem;
		}

		.member-bio {
			color: rgba(255, 255, 255, 0.8);
			line-height: 1.7;
			margin-bottom: 1.5rem;

			p {
				margin-bottom: 0.75rem;

				&:last-child {
					margin-bottom: 0;
				}
			}
		}

		.linkedin-link {
			display: inline-flex;
			align-items: center;
			gap: 0.5rem;
			background: #0077b5;
			color: #fff;
			padding: 0.6rem 1rem;
			border-radius: 0.5rem;
			text-decoration: none;
			font-size: 0.9rem;
			font-weight: 500;
			transition: background 0.2s ease;

			&:hover {
				background: #005885;
			}

			svg {
				width: 1.1rem;
				height: 1.1rem;
				fill: #fff;
			}
		}
	}
}

/* Flexible Content: Timeline *********************************************/

section.timeline {
	padding: 4rem 0;

	h2 {
		margin: 0;
	}

	.timeline-items {
		display: grid;
		grid-template-columns: repeat(4, minmax(0, 1fr));
		margin-top: 2rem;
		gap: 2rem;

		@media(max-width: 1200px) {
			grid-template-columns: repeat(3, minmax(0, 1fr));
		}

		@media(max-width: 900px) {
			grid-template-columns: repeat(2, minmax(0, 1fr));
		}

		@media(max-width: 600px) {
			grid-template-columns: 1fr;
		}

		.timeline-item {
			.timeline-date {
				font-size: 1.4rem;
				font-weight: 800;
				color: var(--primary);
				margin-bottom: 0.75rem;
				display: flex;
				align-items: center;
				line-height: 1;
				gap: 1rem;

				&:after {
					height: 1px;
					width: 100%;
					flex: 1 0;
					border-bottom: dotted 2px var(--primary);
					content: '';
				}
			}

			img {
				border-radius: 1rem;
				width: 100%;
				margin-bottom: 1rem;
			}

			p {
				font-size: 0.9rem;
				text-wrap: pretty;
			}
		}
	}
}

/* Flexible Content: Shortcode **************************************/

section.shortcode {
	padding: 4rem 0;
}

/* Flexible Content: Timezones **************************************/

@font-face {
	font-family: '7segment';
	src: url('/wp-content/themes/charleslevick/fonts/7segment.woff') format('woff'),
		 url('/wp-content/themes/charleslevick/fonts/7segment.ttf') format('truetype');
	font-weight: normal;
	font-style: normal;
	font-display: swap;
}

section.timezones {
	background: var(--secondary);
	padding: 2.5rem 0;
	overflow: hidden;
	pointer-events: none;
	user-select: none;
	position: relative;
	-webkit-transform: translateZ(0);
	transform: translateZ(0);
	-webkit-backface-visibility: hidden;
	backface-visibility: hidden;

	.timezones-bg {
		position: absolute;
		top: 0;
		left: 0;
		width: 100%;
		height: 100%;
		background-image: url('https://cl.staging.silomedia.co.uk/wp-content/uploads/2025/12/close-up-of-hand-using-backlit-tablet-with-digital-2025-10-15-06-56-59-utc-e1764621168562.jpg');
		background-size: cover;
		background-position: center center;
		filter: grayscale(100%);
		opacity: 0.04;
		z-index: 0;
	}

	.timezones-track {
		display: flex;
		width: max-content;
		animation: scroll-timezones 90s linear infinite;
		position: relative;
		z-index: 1;
		will-change: transform;
		-webkit-transform: translate3d(0, 0, 0);
		transform: translate3d(0, 0, 0);
		-webkit-backface-visibility: hidden;
		backface-visibility: hidden;
	}

	.timezone {
		flex: 0 0 auto;
		padding: 0 5rem;
		text-align: center;
		min-width: 280px;
		-webkit-transform: translateZ(0);
		transform: translateZ(0);
		-webkit-backface-visibility: hidden;
		backface-visibility: hidden;

		.city {
			color: #fff;
			font-size: 0.9rem;
			text-transform: uppercase;
			letter-spacing: 0.1em;
			margin-bottom: 0.25rem;
			font-family: var(--font-montserrat);
			font-weight: 600;
		}

		.time-wrapper {
			position: relative;
			display: inline-block;
		}

		.time-bg {
			color: rgba(255, 255, 255, 0.06);
			font-family: '7segment', monospace;
			font-size: 3.5rem;
			font-weight: normal;
			letter-spacing: 0.05em;
		}

		.time {
			position: absolute;
			top: 0;
			left: 0;
			color: var(--primary);
			font-family: '7segment', monospace;
			font-size: 3.5rem;
			font-weight: normal;
			letter-spacing: 0.05em;

			.colon {
				animation: blink-colon 1s step-end infinite;
			}
		}
	}
}

@keyframes scroll-timezones {
	0% {
		transform: translateX(0);
	}
	100% {
		transform: translateX(-50%);
	}
}

@keyframes blink-colon {
	0%, 100% {
		opacity: 1;
	}
	50% {
		opacity: 0.4;
	}
}