/**
 * RYC Header ([ryc_header])
 * Hand-coded port of the Elementor global header (template 19840).
 * All rules are scoped to .ryc-header so nothing leaks into the theme.
 *
 * Breakpoints follow Elementor's: laptop 1366px, tablet 1024px, mobile 767px.
 * The hamburger appears at <=1024px by default (Elementor nav-menu default
 * "Breakpoint: Tablet"). Add breakpoint="mobile" to the shortcode to keep the
 * horizontal menu until 767px instead.
 */

.ryc-header {
	--ryc-hdr-bg: #E20B38;
	--ryc-hdr-width: 1200px;
	--ryc-hdr-h: 68.5px;
	--ryc-hdr-h-m: 63.5px;
	--ryc-hdr-gap: 20px;
	--ryc-hdr-link: #E7E7E7;
	--ryc-hdr-link-hover: #FFFFFF;
	--ryc-hdr-dd-bg: rgba(23, 23, 23, 0.92);
	--ryc-hdr-dd-link: #E3E3E3;
	--ryc-hdr-dd-hover-bg: #D04B5C;
	--ryc-hdr-toggle: #FFFFFF;
	--ryc-hdr-font: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

	position: relative;
	z-index: 11;
	width: 100%;
	font-family: var(--ryc-hdr-font);
	box-sizing: border-box;
}

/* The theme prints a global `header { background: linear-gradient(...), url(...) }`
   rule (inc/scripts.php), which would otherwise paint the page's featured image
   over this bar. The shorthand + element-and-class selector clears it. */
header.ryc-header,
.ryc-header {
	background: var(--ryc-hdr-bg) none no-repeat;
	background-size: auto;
}

.ryc-header *,
.ryc-header *::before,
.ryc-header *::after {
	box-sizing: border-box;
}

.ryc-header--sticky {
	position: sticky;
	top: 0;
}

.ryc-header__inner {
	display: flex;
	flex-direction: row;
	align-items: center;
	justify-content: space-between;
	gap: var(--ryc-hdr-gap);
	height: var(--ryc-hdr-h);
	max-width: var(--ryc-hdr-width);
	margin: 0 auto;
	padding: 0 5px;
}

/* ---------------------------------------------------------- Logo ------- */

.ryc-header__logo {
	display: flex;
	align-items: center;
	justify-content: flex-start;
	width: 30%;
	padding: 0;
}

.ryc-header__logo-link {
	display: inline-block;
	line-height: 0;
}

.ryc-header__logo img {
	display: block;
	width: var(--ryc-hdr-logo-w, 94px);
	max-width: 100%;
	height: auto;
}

/* ---------------------------------------------------------- Nav -------- */

.ryc-header__nav {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	width: 70%;
	padding: 0;
}

.ryc-header__panel {
	display: flex;
	justify-content: flex-end;
	width: 100%;
}

.ryc-header__menu {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: flex-end;
	margin: 0;
	padding: 0;
	list-style: none;
}

.ryc-header__menu li {
	position: relative;
	margin: 0;
	padding: 0;
	list-style: none;
}

/* A separate mobile menu (menu_mobile="…") only exists below the breakpoint. */
.ryc-header__menu--mobile {
	display: none;
}

.ryc-header__menu a {
	display: block;
	padding: 13px 20px;
	color: var(--ryc-hdr-link);
	font-family: var(--ryc-hdr-font);
	font-size: 16px;
	font-weight: 400;
	line-height: 1.4em;
	text-decoration: none;
	transition: color 0.2s ease;
}

.ryc-header__menu a:hover,
.ryc-header__menu a:focus,
.ryc-header__menu .current-menu-item > a,
.ryc-header__menu .current-menu-ancestor > a {
	color: var(--ryc-hdr-link-hover);
	text-decoration: none;
}

.ryc-header a:focus-visible,
.ryc-header button:focus-visible {
	outline: 2px solid #FFFFFF;
	outline-offset: -2px;
}

/* The Elementor pointer effect was disabled in the export
   (pointer width 0px, colour #61CE7000) — nothing to draw. */

/* Filled white triangle on desktop parent items. */
.ryc-header__menu > li.menu-item-has-children > a::after {
	content: "";
	display: inline-block;
	width: 0;
	height: 0;
	margin-left: 8px;
	vertical-align: 2px;
	border-top: 5px solid var(--ryc-hdr-link-hover);
	border-right: 5px solid transparent;
	border-left: 5px solid transparent;
}

/* --------------------------------------------------- Dropdown (desktop) */

.ryc-header__menu .sub-menu {
	position: absolute;
	top: 100%;
	left: 0;
	z-index: 20;
	min-width: 230px;
	margin: 0;
	padding: 6px 0;
	list-style: none;
	background-color: var(--ryc-hdr-dd-bg);
	border-radius: 6px;
	box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.3);
	opacity: 0;
	visibility: hidden;
	transform: translateY(6px);
	transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}

/* Keep the right-hand dropdowns inside the viewport. */
.ryc-header__menu > li:nth-last-child(-n+2) .sub-menu {
	left: auto;
	right: 0;
}

.ryc-header__menu li:hover > .sub-menu,
.ryc-header__menu li:focus-within > .sub-menu,
.ryc-header__menu li.is-open > .sub-menu {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.ryc-header__menu .sub-menu a {
	padding: 12px 20px;
	color: var(--ryc-hdr-dd-link);
	font-size: 16px;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.ryc-header__menu .sub-menu a:hover,
.ryc-header__menu .sub-menu a:focus {
	background-color: var(--ryc-hdr-dd-hover-bg);
	color: var(--ryc-hdr-link-hover);
}

/* Accordion caret button (injected by ryc-header.js, mobile only). */
.ryc-header__caret {
	display: none;
	background: none;
	border: 0;
	padding: 6px;
	cursor: pointer;
	color: inherit;
	line-height: 0;
}

.ryc-header__caret svg {
	width: 12px;
	height: 12px;
	fill: currentColor;
	transition: transform 0.2s ease;
}

/* ---------------------------------------------------------- Toggle ----- */

.ryc-header__toggle {
	display: none;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	margin-left: auto; /* toggle_align: right */
	padding: 0;
	background-color: transparent; /* #FFFFFF00 */
	border: 0;
	cursor: pointer;
	color: var(--ryc-hdr-toggle);
}

.ryc-header__toggle-bars,
.ryc-header__toggle-bars::before,
.ryc-header__toggle-bars::after {
	display: block;
	width: 19px;
	height: 2px;
	background-color: currentColor;
	border-radius: 2px;
	transition: transform 0.25s ease, opacity 0.2s ease;
}

.ryc-header__toggle-bars {
	position: relative;
}

.ryc-header__toggle-bars::before,
.ryc-header__toggle-bars::after {
	content: "";
	position: absolute;
	left: 0;
}

.ryc-header__toggle-bars::before {
	top: -6px;
}

.ryc-header__toggle-bars::after {
	top: 6px;
}

.ryc-header__toggle[aria-expanded="true"] .ryc-header__toggle-bars {
	background-color: transparent;
}

.ryc-header__toggle[aria-expanded="true"] .ryc-header__toggle-bars::before {
	transform: translateY(6px) rotate(45deg);
}

.ryc-header__toggle[aria-expanded="true"] .ryc-header__toggle-bars::after {
	transform: translateY(-6px) rotate(-45deg);
}

/* ------------------------------------------- Laptop (max-width 1366px) - */

@media (max-width: 1366px) {
	.ryc-header__logo {
		width: 20%;
	}

	.ryc-header__nav {
		width: 80%;
	}

	.ryc-header__menu a {
		padding: 13px 14px;
	}
}

/* ------------------------ Collapsed menu (tablet and below by default) - */

@media (max-width: 1024px) {
	.ryc-header__inner {
		padding-left: 20px;
		padding-right: 20px;
	}

	.ryc-header__toggle {
		display: flex;
	}

	/* full_width: stretch — panel spans the viewport, 20px below the bar. */
	.ryc-header__panel {
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		z-index: 30;
		display: none;
		width: 100%;
		margin-top: 0;
		padding: 0;
		background-color: var(--ryc-hdr-dd-bg);
		box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.3);
	}

	.ryc-header__panel.is-open {
		display: block;
	}

	.ryc-header__menu {
		display: block;
		max-height: calc(100vh - 120px);
		overflow-y: auto;
	}

	/* Swap in the mobile menu when one was supplied. */
	.ryc-header--has-mobile-menu .ryc-header__menu--desktop {
		display: none;
	}

	.ryc-header--has-mobile-menu .ryc-header__menu--mobile {
		display: block;
	}

	/* Rows are full-width blocks: label left, caret inline after it, and the
	   whole row highlights when open or current. */
	.ryc-header__menu > li {
		display: flex;
		flex-wrap: wrap;
		align-items: center;
		width: 100%;
	}

	.ryc-header__menu a {
		padding: 11px 20px;
		color: var(--ryc-hdr-link-hover);
		font-size: 17px;
	}

	.ryc-header__menu > li > a {
		flex: 0 0 auto;
	}

	.ryc-header__menu > li.is-open,
	.ryc-header__menu > li.current-menu-item,
	.ryc-header__menu > li.current-menu-ancestor {
		background-color: var(--ryc-hdr-dd-hover-bg);
	}

	.ryc-header__menu a:hover,
	.ryc-header__menu a:focus {
		background-color: transparent;
		color: var(--ryc-hdr-link-hover);
	}

	/* The caret button replaces the CSS chevron here. */
	.ryc-header__menu > li.menu-item-has-children > a::after {
		content: none;
	}

	.ryc-header__caret {
		display: flex;
		align-items: center;
		justify-content: center;
		position: static;
		width: 38px;
		height: 38px;
		margin-left: -4px;
		color: var(--ryc-hdr-link-hover);
	}

	.ryc-header__caret svg {
		width: 12px;
		height: 8px;
	}

	.ryc-header__caret[aria-expanded="true"] svg {
		transform: rotate(180deg);
	}

	/* Sub-menus become accordions, full width on their own row. */
	.ryc-header__menu .sub-menu {
		position: static;
		display: none;
		flex: 0 0 100%;
		width: 100%;
		min-width: 0;
		padding: 0;
		border-radius: 0;
		box-shadow: none;
		background-color: var(--ryc-hdr-dd-bg);
		opacity: 1;
		visibility: visible;
		transform: none;
		transition: none;
	}

	.ryc-header__menu li.is-open > .sub-menu {
		display: block;
	}

	.ryc-header__menu .sub-menu a {
		padding: 10px 20px 10px 36px;
		font-size: 16px;
		color: var(--ryc-hdr-link-hover);
	}

	.ryc-header__menu .sub-menu li.current-menu-item,
	.ryc-header__menu .sub-menu a:hover,
	.ryc-header__menu .sub-menu a:focus {
		background-color: var(--ryc-hdr-dd-hover-bg);
	}

}

/* ---- breakpoint="mobile": keep the horizontal menu on tablet ---------- */

@media (min-width: 768px) and (max-width: 1024px) {
	.ryc-header--bp-mobile .ryc-header__toggle {
		display: none;
	}

	.ryc-header--bp-mobile .ryc-header__panel {
		position: static;
		display: flex;
		justify-content: flex-end;
		margin-top: 0;
		background-color: transparent;
		box-shadow: none;
	}

	.ryc-header--bp-mobile .ryc-header__menu {
		display: flex;
		max-height: none;
		overflow: visible;
	}


	/* Still desktop layout here, so keep the desktop menu. */
	.ryc-header--bp-mobile.ryc-header--has-mobile-menu .ryc-header__menu--desktop {
		display: flex;
	}

	.ryc-header--bp-mobile.ryc-header--has-mobile-menu .ryc-header__menu--mobile {
		display: none;
	}

	.ryc-header--bp-mobile .ryc-header__menu > li {
		width: auto;
		border-bottom: 0;
	}

	.ryc-header--bp-mobile .ryc-header__menu a {
		padding: 13px 14px;
		color: var(--ryc-hdr-link);
	}

	.ryc-header--bp-mobile .ryc-header__menu a:hover,
	.ryc-header--bp-mobile .ryc-header__menu a:focus {
		background-color: transparent;
		color: var(--ryc-hdr-link-hover);
	}

	.ryc-header--bp-mobile .ryc-header__menu > li.menu-item-has-children > a::after {
		content: "";
	}

	.ryc-header--bp-mobile .ryc-header__menu li.menu-item-has-children > a {
		padding-right: 14px;
	}

	.ryc-header--bp-mobile .ryc-header__caret {
		display: none;
	}

	.ryc-header--bp-mobile .ryc-header__menu .sub-menu {
		position: absolute;
		display: block;
		min-width: 230px;
		padding: 6px 0;
		border-radius: 6px;
		box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.3);
		background-color: var(--ryc-hdr-dd-bg);
		opacity: 0;
		visibility: hidden;
		transform: translateY(6px);
		transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
	}

	.ryc-header--bp-mobile .ryc-header__menu li:hover > .sub-menu,
	.ryc-header--bp-mobile .ryc-header__menu li:focus-within > .sub-menu {
		opacity: 1;
		visibility: visible;
		transform: translateY(0);
	}

	.ryc-header--bp-mobile .ryc-header__menu .sub-menu a {
		padding: 12px 20px;
		color: var(--ryc-hdr-dd-link);
	}

	.ryc-header--bp-mobile .ryc-header__menu .sub-menu a:hover,
	.ryc-header--bp-mobile .ryc-header__menu .sub-menu a:focus {
		background-color: var(--ryc-hdr-dd-hover-bg);
	}
}

/* ------------------------------------------- Mobile (max-width 767px) -- */

@media (max-width: 767px) {
	.ryc-header__inner {
		height: var(--ryc-hdr-h-m);
		max-width: 100%;
		gap: 0;
		padding: 0 10px;
	}

	.ryc-header__logo {
		width: 34%;
		justify-content: flex-start;
		align-items: center;
	}

	.ryc-header__logo img {
		width: var(--ryc-hdr-logo-w-m, 85px);
	}

	.ryc-header__nav {
		width: 60%;
		justify-content: flex-end;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ryc-header *,
	.ryc-header *::before,
	.ryc-header *::after {
		transition: none !important;
	}
}
