/*
Theme Name: Catalyst Graphics
Theme URI: https://catalystgraphics.com.au
Description: Custom block theme for Catalyst Graphics, rebuilt from the 2015 site. Uses core WordPress blocks only.
Version: 1.0.4
Requires at least: 6.6
Requires PHP: 8.1
Author: Support Desk
Text Domain: catalyst
*/

/* Page background: the blue wave artwork from the old site, fixed behind the content. */
body {
	background: #000 url(assets/images/background.jpg?v=2) center top / cover no-repeat fixed;
}

/* Header, content and footer sit flush against each other. */
.wp-site-blocks > * {
	margin-block-start: 0;
}

a {
	text-decoration: none;
}

a:hover {
	text-decoration: underline;
}

/* Header: logo left, menu right with blue dividers. */
.cg-header {
	background: var(--wp--preset--color--black);
	padding: 12px 2.5%;
	position: relative;
	z-index: 20;
}

.cg-header .wp-block-site-logo img {
	height: auto;
	max-width: 220px;
}

.cg-header .wp-block-navigation__container > .wp-block-navigation-item {
	border-right: 2px solid var(--wp--preset--color--blue);
	line-height: 1;
	padding: 0 24px;
}

.cg-header .wp-block-navigation__container > .wp-block-navigation-item:last-child {
	border-right: 0;
}

.cg-header .wp-block-navigation-item__content:hover,
.cg-header .wp-block-navigation-item a[aria-current="page"] {
	color: var(--wp--preset--color--sky);
	text-decoration: none;
}

.cg-header .wp-block-navigation__submenu-container {
	background: var(--wp--preset--color--submenu) !important;
	border: 0 !important;
	color: var(--wp--preset--color--white) !important;
	min-width: 240px !important;
	padding: 8px 0;
}

.cg-header .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
	font-size: 0.9375rem;
	padding: 8px 20px;
}

/* Content panel: dark, slightly see-through, over the background. */
.cg-main {
	background: rgba(0, 0, 0, 0.85);
	margin: 0 auto;
	max-width: 960px;
	min-height: 70vh;
	padding: 24px 25px 50px;
}

.cg-main .wp-block-post-title {
	margin-bottom: 16px;
}

/* Full-screen home slideshow (rendered by [cg_slideshow]). */
.cg-slideshow {
	background: #000;
	height: calc(100vh - 150px);
	min-height: 360px;
	overflow: hidden;
	position: relative;
}

.cg-slideshow img {
	height: 100%;
	inset: 0;
	object-fit: cover;
	opacity: 0;
	position: absolute;
	transition: opacity 1s ease;
	width: 100%;
}

.cg-slideshow img.is-active {
	opacity: 1;
}

/* Round previous/next arrows on each side, as on the old slider. */
.cg-slide-arrow {
	background: rgba(0, 0, 0, 0.55);
	border: 1px solid rgba(255, 255, 255, 0.35);
	border-radius: 50%;
	color: var(--wp--preset--color--white);
	cursor: pointer;
	font-size: 1.75rem;
	height: 42px;
	line-height: 1;
	padding: 0 0 4px;
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 42px;
	z-index: 2;
}

.cg-slide-arrow:hover,
.cg-slide-arrow:focus-visible {
	background: rgba(0, 0, 0, 0.8);
	border-color: var(--wp--preset--color--sky);
}

.cg-slide-prev {
	left: 14px;
}

.cg-slide-next {
	right: 14px;
}


.cg-slideshow-caption {
	background: rgba(0, 0, 0, 0.6);
	bottom: 30px;
	color: var(--wp--preset--color--white);
	font-family: var(--wp--preset--font-family--lato);
	font-size: 1.375rem;
	font-style: italic;
	left: 2.5%;
	padding: 10px 18px;
	position: absolute;
}

@media (prefers-reduced-motion: reduce) {
	.cg-slideshow img {
		transition: none;
	}
}

/* Home and Applications: tiles linking to each application. */
.cg-tiles {
	display: grid;
	gap: 18px;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	margin-top: 10px;
}

.cg-tile {
	background: #0b0b0b;
	border: 1px solid #1d1d1d;
	display: block;
	transition: border-color 0.2s;
}

.cg-tile:hover {
	border-color: var(--wp--preset--color--blue);
	text-decoration: none;
}

.cg-tile img {
	aspect-ratio: 4 / 3;
	display: block;
	height: auto;
	object-fit: cover;
	width: 100%;
}

.cg-tile span {
	color: var(--wp--preset--color--white);
	display: block;
	font-weight: 500;
	padding: 10px 12px;
}

.cg-home-intro {
	background: rgba(0, 0, 0, 0.88);
	padding: 40px 20px 50px;
}

/* Application galleries. */
.wp-block-gallery.cg-gallery img {
	border-radius: 2px;
}

/* Testimonials. */
.wp-block-quote cite {
	color: var(--wp--preset--color--white);
	font-style: normal;
	font-weight: 700;
}

.wp-block-quote p {
	font-style: italic;
}

/* Contact form (Fluent Forms) on the dark background. */
.fluentform .ff-el-input--label label {
	color: var(--wp--preset--color--text);
}

.fluentform .ff-el-form-control {
	background: #1a1a1a;
	border: 1px solid #333;
	border-radius: 3px;
	color: var(--wp--preset--color--white);
	font-family: inherit;
}

.fluentform .ff-el-form-control:focus {
	border-color: var(--wp--preset--color--blue);
}

.fluentform .ff-btn-submit {
	background: var(--wp--preset--color--blue) !important;
	border-radius: 3px;
}

/* Downloads list. */
.cg-downloads li {
	margin-bottom: 6px;
}

/* Footer bar. */
.cg-footer {
	background: var(--wp--preset--color--black);
	font-size: 0.875rem;
	padding: 12px 2.5%;
}

.cg-footer a {
	color: var(--wp--preset--color--white);
}

.cg-footer-links a + a::before,
.cg-footer-links .cg-call + a::before {
	color: var(--wp--preset--color--muted);
	content: "|";
	margin: 0 10px;
}

.cg-social {
	display: flex;
	gap: 8px;
}

.cg-social img {
	display: block;
	height: 26px;
	width: 26px;
}

.cg-social a:hover {
	opacity: 0.8;
}

/* Phones. */
@media (max-width: 781px) {
	body {
		background-attachment: scroll;
	}

	.cg-header .wp-block-navigation__container > .wp-block-navigation-item {
		border-right: 0;
		padding: 0;
	}

	.cg-main {
		padding: 20px 16px 40px;
	}

	.cg-slideshow {
		height: 60vh;
	}

	.cg-footer > .wp-block-group {
		justify-content: center !important;
		text-align: center;
	}
}
