/*
Theme Name: The Cormac Group
Author: The Cormac Group
Author URI: https://thecormacgroup.com/
Description: Custom theme for The Cormac Group.
Version: 0.5
Update URI: false
Requires at least: 6.8
Tested up to: 6.8.2
Requires PHP: 7.4
Text Domain: tcg
*/


/* Defaults
---------------------------------------- */

html {
	scroll-behavior: smooth;
}

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

a,
button,
.wp-element-button {
	transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out;
}

input,
textarea {
	transition: filter 0.2s ease-in-out;
}

b,
strong,
th {
	font-weight: 500;
}

mark {
	font-size: var(--wp--preset--font-size--small);
	padding: 4px 8px;
}

/* -- Forms -- */

input,
select,
textarea {
	background-color: var(--wp--preset--color--base);
	border: 1px solid currentColor;
	border-radius: 0;
	box-sizing: border-box;
	color: inherit;
	font-family: inherit;
	font-size: inherit;
	font-weight: inherit;
	line-height: var(--wp--custom--line-height--medium);
	padding: 10px 15px;
	width: 100%;
}

input:not([type="submit"]):focus,
textarea:focus {
	border-color: var(--wp--preset--color--primary);
	outline: 1px solid var(--wp--preset--color--primary);
}

input[type="checkbox"],
input[type="image"],
input[type="radio"] {
	width: auto;
}

input[type="button"],
input[type="email"],
input[type="search"],
input[type="submit"],
input[type="text"],
textarea {
	-webkit-appearance: none;
}

::placeholder {
	color: var(--wp--preset--color--contrast);
	font-size: var(--wp--preset--font-size--small);
	opacity: 0.5;
}

/*
:root :where(.is-layout-flow) > h1 + h2,
:root :where(.is-layout-flow) > h2 + h3,
:root :where(.is-layout-flow) > h3 + h4,
:root :where(.is-layout-flow) > h4 + h5,
:root :where(.is-layout-flow) > h5 + h6 {
	margin-block-start: var(--wp--preset--spacing--20);
}
*/


/* Core Blocks
---------------------------------------- */

/* -- Navigation -- */

.wp-block-navigation__responsive-container.is-menu-open {
	padding: var(--wp--preset--spacing--30);
}

/* -- Navigation Submenu -- */

.wp-block-navigation__submenu-container {
	min-width: 150px !important;
	padding: 10px !important;
}

.wp-block-navigation .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
	padding: 2px 10px !important;
}

.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container {
	padding: 5px 10px 0 !important;
}

/* Utility
---------------------------------------- */

/* -- Link -- */

a.external::after {
	background-color: currentColor;
	content: "";
	display: inline-block;
	height: 0.75em;
	margin-left: 0.1em;
	mask-image: url("assets/icons/icon-external.svg");
	mask-repeat: no-repeat;
	mask-size: contain;
	vertical-align: middle;
	width: 0.75em;
}

/* -- Position -- */

.is-style-position-fixed {
	position: fixed;
}

.is-style-position-relative {
	position: relative;
}

/* -- Z-Index -- */

.is-style-negative-zindex {
	z-index: -99;
}

.is-style-positive-zindex {
	z-index: 99;
}

/* Media Queries
---------------------------------------- */

@media only screen and (min-width: 600px) {

	/* -- Header -- */

	.site-header {
		background-color: var(--wp--preset--color--base);
		position: sticky;
		top: 0;
		transition: transform 0.5s ease;
		z-index: 1000;
	}
	
	body.scroll-down .site-header {
		transform: translateY(-100%);
	}
	
	body.scroll-up .site-header {
		transform: translateY(0);
	}

}

@media only screen and (max-width: 600px) {

	/* -- Utility -- */

	.is-style-hidden-mobile {
		display: none !important;
	}

}

@media only screen and (max-width: 782px) {

	/* -- Columns -- */

	.wp-block-columns.is-style-column-reverse {
		flex-direction: column-reverse;
	}

}
