/* ==========================================================================
   WRESA Home V2
   Loaded on the "Front Page V2" and "Inner Page Template" templates, single
   posts and Events Calendar pages (see inc/home-v2.php), after the theme's
   style.css (Bootstrap 3). Layout uses
   Bootstrap's container, row and col-* classes; these rules override
   Bootstrap's base styles.
   Base type, link and image styles are scoped to the V2 header, homepage
   main and footer, so legacy content on inner pages keeps its own styles.
   Desktop layout follows homepage-v2-design/Homepage.png,
   mobile layout follows homepage-v2-design/Homepage-Mobile.png.
   Breakpoints match Bootstrap: 768px (sm), 992px (md), 1200px (lg).
   ========================================================================== */

:root {
	--v2-blue: #1565e8;
	--v2-blue-dark: #0d4fbf;
	--v2-green: #4caa4f;
	--v2-green-dark: #3b8f3e;
	--v2-text: #222;
	--v2-page-bg: #f1f2f4;
	--v2-card-bg: #fff;
	--v2-card-border: #e1e3e6;
	--v2-dark: #2b2b2b;
	--v2-font: "Roboto", "Segoe UI", Helvetica, Arial, sans-serif;
}

/* ---- Base --------------------------------------------------------------- */

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

html {
	-webkit-text-size-adjust: 100%;
}

body.wresa-v2 {
	margin: 0;
	background: var(--v2-page-bg);
}

:is(.v2-header, .v2-main, .v2-footer) {
	color: var(--v2-text);
	font-family: var(--v2-font);
	font-size: 18px;
	line-height: 1.4;
}

:is(.v2-header, .v2-main, .v2-footer) img {
	max-width: 100%;
	height: auto;
	display: block;
}

:is(.v2-header, .v2-main, .v2-footer) a,
:is(.v2-header, .v2-main, .v2-footer) a:hover,
:is(.v2-header, .v2-main, .v2-footer) a:focus {
	color: var(--v2-blue);
}

/* Bootstrap's mouse-click focus outline; keyboard focus uses :focus-visible below */
:is(.v2-header, .v2-main, .v2-footer) a:focus:not(:focus-visible) {
	outline: none;
}

/* Bootstrap container: 1140px on medium desktops, 1440px on large ones.
   The theme's Bootstrap build has its own widths (992/1200/1280px), so
   these override it on V2 only. */
@media (min-width: 992px) {
	.wresa-v2 .container {
		width: 970px;
	}
}

@media (min-width: 1200px) {
	.wresa-v2 .container {
		width: 1140px;
	}
}

@media (min-width: 1500px) {
	.wresa-v2 .container {
		width: 1440px;
	}
}

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.skip-link:focus {
	position: fixed !important;
	top: 8px;
	left: 8px;
	z-index: 100000;
	width: auto;
	height: auto;
	padding: 12px 18px;
	clip: auto;
	background: #fff;
	color: var(--v2-blue);
	font-weight: 700;
}

:is(.v2-header, .v2-main, .v2-footer) :focus-visible {
	outline: 3px solid #f5b400;
	outline-offset: 2px;
}

/* ---- Header ------------------------------------------------------------- */

.v2-header {
	background: #fff;
	border-top: 38px solid var(--v2-blue);
}

.v2-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	padding-top: 28px;
	padding-bottom: 20px;
}

.v2-logo img {
	width: 335px;
	height: auto;
}

.v2-header__contact {
	display: flex;
	align-items: center;
	gap: 34px;
	margin-top: -12px;
}

.v2-header__phone-email {
	margin: 0;
	font-size: 20px;
	white-space: nowrap;
}

.v2-header__phone-email a {
	color: var(--v2-text);
	text-decoration: none;
}

.v2-header__phone-email a:hover {
	color: var(--v2-blue);
}

.v2-header__phone-email span {
	margin: 0 8px;
}

/* Social icons */

.v2-social {
	display: flex;
	gap: 20px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.v2-social a {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 54px;
	height: 54px;
	border-radius: 50%;
	overflow: hidden; /* clips the Facebook "f" stem at the circle edge */
	transition: transform 0.15s ease, background-color 0.15s ease;
}

/* Glyphs are drawn on a 40x40 grid that fills the whole circle */
.v2-social svg {
	width: 100%;
	height: 100%;
}

.v2-social--solid a {
	background: var(--v2-blue);
	color: #fff;
}

.v2-social--solid a:hover {
	background: var(--v2-blue-dark);
	transform: translateY(-2px);
}

.v2-social--light a {
	width: 44px;
	height: 44px;
	background: #fff;
	color: var(--v2-blue);
}

.v2-social--light a:hover {
	transform: translateY(-2px);
}

/* Navigation */

.v2-nav {
	padding-bottom: 22px;
}

.v2-nav__toggle-input,
.v2-nav__toggle {
	display: none;
}

.v2-nav__list {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	margin: 0;
	padding: 0;
	list-style: none;
}

.v2-nav__list > li {
	display: flex;
	align-items: center;
}

.v2-nav__list > li + li::before {
	content: "|";
	color: var(--v2-blue);
	font-size: 24px;
	font-weight: 400;
	padding: 0 4px;
}

.v2-nav__list a {
	display: block;
	padding: 6px 30px;
	color: var(--v2-blue);
	font-size: 21px;
	font-weight: 700;
	text-decoration: none;
}

.v2-nav__list a:hover,
.v2-nav__list .current-menu-item > a {
	text-decoration: underline;
	text-underline-offset: 6px;
}

/* Dropdowns: a checkbox + label after each parent link (see
   wresa_v2_submenu_toggle()). The label is the chevron. */

.v2-nav__sub-input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.v2-nav__sub-toggle {
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0; /* Bootstrap label margin */
	cursor: pointer;
	user-select: none;
}

.v2-nav__sub-toggle::before {
	content: "";
	width: 9px;
	height: 9px;
	border-right: 3px solid var(--v2-blue);
	border-bottom: 3px solid var(--v2-blue);
	transform: translateY(-3px) rotate(45deg);
	transition: transform 0.2s ease;
}

.v2-nav__sub-input:checked + .v2-nav__sub-toggle::before {
	transform: translateY(2px) rotate(-135deg);
}

.v2-nav__sub-input:focus-visible + .v2-nav__sub-toggle {
	outline: 3px solid #f5b400;
	outline-offset: 2px;
}

.v2-nav__list .sub-menu {
	display: none;
	margin: 0;
	padding: 0;
	list-style: none;
}

.v2-nav__sub-input:checked ~ .sub-menu {
	display: block;
}

@media (min-width: 992px) {
	.v2-nav__list > li {
		position: relative;
	}

	.v2-nav__list > .menu-item-has-children > a {
		padding-right: 8px;
	}

	.v2-nav__sub-toggle {
		align-self: stretch;
		padding-right: 22px;
	}

	.v2-nav__list .sub-menu {
		position: absolute;
		top: 100%;
		left: 50%;
		z-index: 100;
		min-width: 230px;
		padding: 8px 0;
		background: #fff;
		border: 1px solid var(--v2-card-border);
		border-radius: 6px;
		box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
		transform: translateX(-50%);
		text-align: left;
	}

	/* Mouse and keyboard open it; touch screens use the chevron (checkbox) */
	.v2-nav__list > li:hover > .sub-menu,
	.v2-nav__list > li:focus-within > .sub-menu {
		display: block;
	}

	.v2-nav__list .sub-menu a {
		padding: 10px 22px;
		font-size: 18px;
		font-weight: 500;
		white-space: nowrap;
	}

	.v2-nav__list .sub-menu a:hover {
		background: var(--v2-page-bg);
	}
}

/* ---- Main --------------------------------------------------------------- */

.v2-main {
	padding: 28px 0 110px;
}

.v2-alert {
	display: block;
	margin-bottom: 20px;
	padding: 14px 20px;
	background: #e7f0ff;
	border-left: 6px solid var(--v2-blue);
	color: var(--v2-text) !important;
	text-decoration: none;
}

.v2-alert strong {
	color: var(--v2-blue);
	margin-right: 6px;
}

/* Hero */

.v2-hero {
	margin-bottom: 22px;
}

.v2-hero__slide {
	display: block;
}

.v2-hero__slide img {
	width: 100%;
}

.v2-hero--multi {
	display: flex;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scrollbar-width: thin;
}

.v2-hero--multi .v2-hero__slide {
	flex: 0 0 100%;
	scroll-snap-align: start;
}

/* Card grids: Bootstrap row + col-* with a narrower 10px gutter. The row is a
   flex container so cards in a row share the same height. */

.v2-grid {
	display: flex;
	flex-wrap: wrap;
	margin: 0 -5px 16px;
}

/* Bootstrap's clearfix pseudo-elements would become flex items */
.v2-grid::before,
.v2-grid::after {
	content: none;
}

.v2-grid > [class*="col-"] {
	display: flex;
	padding: 0 5px;
	margin-bottom: 10px;
}

.v2-grid--2 > [class*="col-"] {
	margin-bottom: 22px;
}

.v2-card {
	display: flex;
	flex: 1;
	flex-direction: column;
	padding: 14px 14px 20px;
	background: var(--v2-card-bg);
	border: 1px solid var(--v2-card-border);
}

.v2-card__media {
	display: block;
	overflow: hidden;
}

.v2-card__media img {
	width: 100%;
	aspect-ratio: 400 / 230;
	object-fit: cover;
	transition: transform 0.3s ease;
}

.v2-card__media:hover img {
	transform: scale(1.03);
}

.v2-card__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	padding: 14px 8px 0;
}

.v2-card__title {
	margin: 0 0 6px;
	font-size: 26px;
	font-weight: 700;
	line-height: 1.15;
}

.v2-card__title a {
	color: var(--v2-blue);
	text-decoration: none;
}

.v2-card__title a:hover {
	text-decoration: underline;
}

.v2-card__text {
	margin: 0 0 24px;
	font-size: 19px;
	line-height: 1.4;
}

/* Keeps the buttons in a row lined up when card text lengths differ */
.v2-btn {
	align-self: flex-start;
	margin-top: auto;
	padding: 10px 36px 8px;
	background: var(--v2-green);
	color: #fff !important;
	font-size: 21px;
	font-weight: 600;
	line-height: 1.4;
	text-decoration: none;
	transition: background-color 0.15s ease;
}

.v2-btn:hover {
	background: var(--v2-green-dark);
}

/* ---- Footer ------------------------------------------------------------- */

.v2-footer__main {
	padding: 30px 0;
	background: var(--v2-blue);
	color: #fff;
}

.v2-footer__inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 16px 30px;
}

.v2-footer__info {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	margin: 0;
	font-size: 20px;
	font-style: normal;
}

.v2-footer__group {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
}

.v2-footer__group > * {
	white-space: nowrap;
}

.v2-footer__info a {
	color: #fff;
	text-decoration: none;
}

.v2-footer__info a:hover {
	text-decoration: underline;
}

.v2-sep {
	margin: 0 14px;
}

.v2-social--light {
	gap: 16px;
}

.v2-footer__copyright {
	background: var(--v2-dark);
	color: #fff;
}

.v2-footer__copyright p {
	margin-top: 0;
	margin-bottom: 0;
	padding-top: 34px;
	padding-bottom: 34px;
	font-size: 20px;
	text-align: center;
}

/* ==========================================================================
   Large desktop: below the 1440px container
   ========================================================================== */

@media (max-width: 1499px) {
	.v2-nav__list a {
		padding: 6px 13px;
	}

	.v2-nav__sub-toggle {
		padding-right: 13px;
	}
}

/* ==========================================================================
   Small desktop / iPad landscape (Bootstrap md)
   ========================================================================== */

@media (max-width: 1199px) {
	.v2-logo img {
		width: 280px;
	}

	.v2-header__contact {
		gap: 20px;
	}

	.v2-header__phone-email {
		font-size: 18px;
	}

	.v2-social a {
		width: 46px;
		height: 46px;
	}

	.v2-social--solid {
		gap: 14px;
	}

	.v2-nav__list a {
		padding: 6px 7px;
		font-size: 18px;
	}

	.v2-nav__list > .menu-item-has-children > a {
		padding-right: 6px;
	}

	.v2-nav__sub-toggle {
		padding-right: 7px;
	}

	.v2-nav__list > li + li::before {
		padding: 0 2px;
	}

	.v2-card__title {
		font-size: 23px;
	}

	.v2-card__text {
		font-size: 18px;
	}

	.v2-footer__info {
		font-size: 19px;
	}

	.v2-sep {
		margin: 0 10px;
	}
}

/* ==========================================================================
   Tablet / iPad portrait and below: menu button replaces the inline nav
   ========================================================================== */

@media (max-width: 991px) {
	/* Header: logo + icons on one row, menu button below */
	.v2-header {
		border-top-width: 14px;
	}

	.v2-header__inner {
		padding-top: 10px;
		padding-bottom: 6px;
	}

	.v2-logo img {
		width: 220px;
	}

	.v2-header__contact {
		margin-top: 0;
	}

	.v2-header__phone-email {
		display: none;
	}

	.v2-social {
		gap: 12px;
	}

	.v2-social a {
		width: 40px;
		height: 40px;
	}

	.v2-nav {
		padding-bottom: 6px;
	}

	.v2-nav__toggle {
		display: inline-flex;
		align-items: center;
		gap: 14px;
		margin: 0; /* Bootstrap label margin */
		padding: 6px 0;
		color: var(--v2-blue);
		font-size: 19px;
		font-weight: 600;
		cursor: pointer;
		user-select: none;
	}

	.v2-nav__burger,
	.v2-nav__burger::before,
	.v2-nav__burger::after,
	.v2-nav__burger span {
		display: block;
		width: 30px;
		height: 3px;
		border-radius: 2px;
		background: var(--v2-blue);
	}

	.v2-nav__burger {
		position: relative;
		background: transparent;
	}

	.v2-nav__burger::before,
	.v2-nav__burger::after {
		content: "";
		position: absolute;
		left: 0;
		transition: transform 0.2s ease;
	}

	.v2-nav__burger::before {
		top: -9px;
	}

	.v2-nav__burger::after {
		top: 9px;
	}

	.v2-nav__toggle-input:checked + .v2-nav__toggle .v2-nav__burger span {
		opacity: 0;
	}

	.v2-nav__toggle-input:checked + .v2-nav__toggle .v2-nav__burger::before {
		transform: translateY(9px) rotate(45deg);
	}

	.v2-nav__toggle-input:checked + .v2-nav__toggle .v2-nav__burger::after {
		transform: translateY(-9px) rotate(-45deg);
	}

	/* Keyboard users: show focus ring on the label when the checkbox is focused */
	.v2-nav__toggle-input:focus-visible + .v2-nav__toggle {
		outline: 3px solid #f5b400;
		outline-offset: 2px;
	}

	.v2-nav__toggle-input {
		display: block;
		position: absolute;
		opacity: 0;
		pointer-events: none;
	}

	.v2-nav__list {
		display: none;
		flex-direction: column;
		padding: 4px 0 8px;
		border-top: 1px solid var(--v2-card-border);
	}

	.v2-nav__toggle-input:checked ~ .v2-nav__list {
		display: flex;
	}

	.v2-nav__list > li + li::before {
		content: none;
	}

	.v2-nav__list li + li {
		border-top: 1px solid var(--v2-card-border);
	}

	.v2-nav__list a {
		width: 100%;
		padding: 12px 4px;
		font-size: 18px;
	}

	/* Submenus: accordion opened by the chevron */
	.v2-nav__list > .menu-item-has-children {
		flex-wrap: wrap;
	}

	.v2-nav__list > .menu-item-has-children > a {
		flex: 1;
		width: auto;
	}

	.v2-nav__sub-toggle {
		width: 48px;
		align-self: stretch;
		border-left: 1px solid var(--v2-card-border);
	}

	.v2-nav__list .sub-menu {
		flex-basis: 100%;
		border-top: 1px solid var(--v2-card-border);
		background: var(--v2-page-bg);
	}

	.v2-nav__list .sub-menu a {
		padding: 10px 4px 10px 24px;
		font-size: 17px;
		font-weight: 500;
	}

	/* Footer: address on two rows above the icons */
	.v2-footer__inner {
		flex-direction: column;
		gap: 12px;
	}
}

/* ==========================================================================
   Phone (Bootstrap xs, Homepage-Mobile.png)
   ========================================================================== */

@media (max-width: 767px) {
	:is(.v2-header, .v2-main, .v2-footer) {
		font-size: 16px;
	}

	/* Content */
	.v2-main {
		padding: 14px 0 0;
	}

	.v2-hero {
		margin-bottom: 12px;
	}

	.v2-grid {
		margin-bottom: 0;
	}

	.v2-grid > [class*="col-"],
	.v2-grid--2 > [class*="col-"] {
		margin-bottom: 12px;
	}

	.v2-card {
		padding: 12px 12px 14px;
	}

	.v2-card__body {
		padding: 8px 4px 0;
	}

	.v2-card__title {
		margin-bottom: 4px;
		font-size: 21px;
	}

	.v2-card__text {
		margin-bottom: 12px;
		font-size: 17px;
		line-height: 1.35;
	}

	.v2-btn {
		padding: 7px 30px 5px;
		font-size: 17px;
	}

	/* Footer: stacked and centred */
	.v2-footer__main {
		padding: 10px 0 8px;
	}

	.v2-footer__inner {
		flex-direction: column;
		gap: 6px;
	}

	.v2-footer__info {
		flex-direction: column;
		align-items: center;
		font-size: 16px;
		line-height: 1.35;
	}

	.v2-sep {
		margin: 0 8px;
	}

	.v2-sep--group {
		display: none;
	}

	.v2-social--light {
		gap: 10px;
	}

	.v2-social--light a {
		width: 28px;
		height: 28px;
	}

	.v2-footer__copyright p {
		padding-top: 10px;
		padding-bottom: 10px;
		font-size: 13px;
	}
}

/* Small phones: keep logo and icons on one row */
@media (max-width: 400px) {
	.v2-logo img {
		width: 180px;
	}

	.v2-social--solid {
		gap: 8px;
	}

	.v2-social--solid a {
		width: 36px;
		height: 36px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.wresa-v2 * {
		transition: none !important;
	}
}
