/*
Theme Name: eFunda
Theme URI: https://efunda.co/
Author: Digital Harvest
Author URI: https://digitalharvest.com/
Description: Custom theme for eFunda.co. Hand-built templates, no page builder. Page content lives in the template files.
Version: 1.0.0
Requires at least: 6.3
Requires PHP: 7.4
Text Domain: efunda
*/

/* ---------- Fonts (hosted in the theme) ---------- */
@font-face {
	font-family: "Oswald";
	font-style: normal;
	font-weight: 300;
	font-display: swap;
	src: url("assets/fonts/oswald-latin-300-normal.woff2") format("woff2");
}
@font-face {
	font-family: "Oswald";
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url("assets/fonts/oswald-latin-400-normal.woff2") format("woff2");
}
@font-face {
	font-family: "Oswald";
	font-style: normal;
	font-weight: 700;
	font-display: swap;
	src: url("assets/fonts/oswald-latin-700-normal.woff2") format("woff2");
}
@font-face {
	font-family: "Roboto";
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url("assets/fonts/roboto-latin-400-normal.woff2") format("woff2");
}
@font-face {
	font-family: "Roboto";
	font-style: normal;
	font-weight: 700;
	font-display: swap;
	src: url("assets/fonts/roboto-latin-700-normal.woff2") format("woff2");
}

/* ---------- Base ---------- */
:root {
	--efunda-blue: #2991d6;
	--efunda-blue-dark: #2275ac;
	--efunda-black: #000;
	--efunda-heading: #444;
	--efunda-text: #626262;
	--efunda-list: #737e86;
	--efunda-bg: #fcfcfc;
	--efunda-sidebar-bg: #f9f9f9;
	--efunda-line: #e8e8e8;
	--efunda-field-line: #ebebeb;
	--efunda-font-body: "Roboto", Arial, Tahoma, sans-serif;
	--efunda-font-heading: "Oswald", Arial, Tahoma, sans-serif;
	--efunda-container: 1200px;
	--efunda-gutter: 20px;
	--efunda-header-height: 80px;
}

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

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

.efunda-body {
	margin: 0;
	background: var(--efunda-bg);
	color: var(--efunda-text);
	font-family: var(--efunda-font-body);
	font-size: 14px;
	line-height: 22px;
	-webkit-font-smoothing: antialiased;
}

.efunda-site {
	overflow-x: clip;
}

.efunda-site img {
	max-width: 100%;
	height: auto;
	vertical-align: middle;
}

.efunda-site a {
	color: var(--efunda-blue);
	text-decoration: none;
}

.efunda-site a:hover {
	color: var(--efunda-blue-dark);
}

.efunda-site :focus-visible {
	outline: 2px solid var(--efunda-blue);
	outline-offset: 2px;
}

.efunda-site h1,
.efunda-site h2,
.efunda-site h3,
.efunda-site h4,
.efunda-site h5 {
	margin: 0 0 15px;
	color: var(--efunda-heading);
	font-family: var(--efunda-font-heading);
	font-weight: 300;
}

.efunda-site h2 {
	font-size: 30px;
	line-height: 34px;
}

.efunda-site h3 {
	font-size: 25px;
	line-height: 29px;
}

.efunda-site h4 {
	font-size: 21px;
	line-height: 25px;
}

.efunda-site h5 {
	margin-bottom: 12px;
	font-size: 15px;
	font-weight: 700;
	line-height: 20px;
}

.efunda-site p {
	margin: 0 0 15px;
}

.efunda-container {
	width: 100%;
	max-width: calc(var(--efunda-container) + var(--efunda-gutter) * 2);
	margin: 0 auto;
	padding: 0 var(--efunda-gutter);
}

.efunda-icon {
	display: block;
}

/* ---------- Header ---------- */
.efunda-header {
	position: relative;
	z-index: 20;
	background: var(--efunda-black);
}

.efunda-header__inner {
	display: flex;
	align-items: stretch;
	min-height: var(--efunda-header-height);
}

.efunda-logo {
	display: flex;
	align-items: center;
	flex: 0 0 auto;
	padding: 0 32px 0 15px;
}

.efunda-logo__image {
	width: 275px;
	height: 50px;
}

.efunda-nav {
	display: flex;
	flex: 1 1 auto;
}

.efunda-menu {
	display: flex;
	margin: 0;
	padding: 0;
	list-style: none;
}

.efunda-menu__item {
	display: flex;
	border-left: 1px solid rgba(255, 255, 255, 0.16);
}

.efunda-site .efunda-menu__link {
	display: flex;
	align-items: center;
	padding: 0 30px;
	color: #fff;
	font-family: var(--efunda-font-heading);
	font-size: 12px;
	font-weight: 400;
	letter-spacing: 2px;
	text-transform: uppercase;
	white-space: nowrap;
	transition: background-color 0.2s, color 0.2s;
}

.efunda-site .efunda-menu__link:hover,
.efunda-site .efunda-menu__item--current .efunda-menu__link {
	background: #f2f2f2;
	color: var(--efunda-blue);
}

.efunda-search-toggle,
.efunda-nav-toggle {
	display: flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	width: 78px;
	margin: 0;
	padding: 0;
	border: 0;
	border-left: 1px solid rgba(255, 255, 255, 0.16);
	border-radius: 0;
	background: none;
	color: #fff;
	cursor: pointer;
}

.efunda-search-toggle:hover,
.efunda-nav-toggle:hover,
.efunda-search-toggle[aria-expanded="true"],
.efunda-nav-toggle[aria-expanded="true"] {
	color: var(--efunda-blue);
}

.efunda-nav-toggle {
	display: none;
}

.efunda-search {
	border-top: 1px solid rgba(255, 255, 255, 0.16);
	background: var(--efunda-black);
}

.efunda-search__form {
	display: flex;
	gap: 10px;
	padding: 15px 0;
}

.efunda-search__input {
	flex: 1 1 auto;
	min-width: 0;
	padding: 9px 12px;
	border: 1px solid var(--efunda-field-line);
	border-radius: 0;
	background: #fff;
	color: var(--efunda-text);
	font: inherit;
}

.efunda-main .efunda-search__form {
	max-width: 520px;
}

/* ---------- Blue title bar ---------- */
.efunda-bar {
	background: var(--efunda-blue);
	padding: 30px 0;
}

.efunda-bar__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px 30px;
	flex-wrap: wrap;
}

.efunda-site .efunda-bar__title {
	margin: 0;
	padding-left: 4px;
	color: #fff;
	font-size: 25px;
	font-weight: 400;
	line-height: 25px;
}

.efunda-breadcrumbs__list {
	display: flex;
	flex-wrap: wrap;
	margin: 0;
	padding: 0;
	list-style: none;
	color: rgba(255, 255, 255, 0.6);
}

.efunda-breadcrumbs__item + .efunda-breadcrumbs__item::before {
	content: "";
	display: inline-block;
	width: 5px;
	height: 5px;
	margin: 0 20px 2px 18px;
	border-top: 1px solid currentColor;
	border-right: 1px solid currentColor;
	transform: rotate(45deg);
}

.efunda-site .efunda-breadcrumbs__link {
	color: rgba(255, 255, 255, 0.6);
}

.efunda-site .efunda-breadcrumbs__link:hover {
	color: #fff;
}

/* ---------- Content layout ---------- */
.efunda-content {
	box-shadow: inset 0 4px 3px -2px rgba(0, 0, 0, 0.04);
}

.efunda-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 366px;
}

.efunda-main {
	min-width: 0;
	padding: 30px 20px 30px 0;
}

.efunda-main > :last-child {
	margin-bottom: 0;
}

.efunda-sidebar {
	position: relative;
	min-width: 0;
	padding: 30px 0 20px 25px;
	border-left: 1px solid var(--efunda-line);
	background: var(--efunda-sidebar-bg);
}

/* Carries the sidebar background out to the right edge of the window. */
.efunda-sidebar::before {
	content: "";
	position: absolute;
	top: 0;
	bottom: 0;
	left: 100%;
	width: 50vw;
	background: var(--efunda-sidebar-bg);
}

.efunda-widget {
	position: relative;
	padding-bottom: 30px;
	margin-bottom: 30px;
}

.efunda-widget:last-child {
	margin-bottom: 0;
	padding-bottom: 0;
}

.efunda-widget:not(:last-child)::after {
	content: "";
	position: absolute;
	bottom: 0;
	left: 0;
	width: 60vw;
	border-top: 1px solid #e5e5e5;
}

.efunda-site .efunda-widget__title {
	font-size: 18px;
	line-height: 22px;
}

.efunda-widget__logo {
	display: block;
	margin-bottom: 20px;
}

.efunda-widget > p {
	max-width: 340px;
}

/* ---------- Content elements ---------- */
.efunda-site .efunda-list {
	margin: 0 0 15px 30px;
	padding: 0;
	list-style: disc outside;
	color: var(--efunda-list);
	font-size: 15px;
	line-height: 21px;
}

.efunda-list li {
	margin-bottom: 10px;
}

.efunda-site .efunda-spaced {
	margin-top: 30px;
}

.efunda-site .efunda-title--gap {
	margin-bottom: 30px;
}

.efunda-columns {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0 20px;
}

.efunda-columns--features {
	margin: 30px 0 15px;
	gap: 15px 20px;
}

.efunda-site .efunda-feature__title {
	color: var(--efunda-blue);
}

.efunda-intro {
	display: grid;
	grid-template-columns: minmax(0, 58%) minmax(0, 1fr);
	gap: 20px 40px;
	align-items: start;
	margin: 45px 0 40px;
}

.efunda-intro__media {
	text-align: center;
}

.efunda-intro .efunda-list {
	margin-top: 22px;
	margin-bottom: 0;
}

/* ---------- Advertiser logos ---------- */
.efunda-logos {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 50px 30px;
	align-items: center;
	margin: 45px 0 30px;
	padding: 0;
	list-style: none;
}

.efunda-logos__item {
	text-align: center;
}

.efunda-logos__image {
	width: 100%;
	max-width: 260px;
}

.efunda-logos__item--more {
	color: #7e7e7e;
	font-weight: 700;
	font-size: 14px;
	text-transform: uppercase;
}

/* ---------- FAQ ---------- */
.efunda-faq__item {
	position: relative;
	margin-bottom: 5px;
	background: rgba(0, 0, 0, 0.02);
}

.efunda-faq__question {
	position: relative;
	display: block;
	padding: 20px 40px 20px 80px;
	color: var(--efunda-heading);
	font-size: 15px;
	cursor: pointer;
	list-style: none;
}

.efunda-faq__question::-webkit-details-marker {
	display: none;
}

/* Grey block on the left with a plus / minus. */
.efunda-faq__question::before {
	content: "+";
	position: absolute;
	top: 0;
	bottom: 0;
	left: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 61px;
	border-right: 1px solid #ddd;
	background: rgba(0, 0, 0, 0.04);
	color: #999;
	font-size: 20px;
	font-weight: 400;
}

.efunda-faq__item[open] > .efunda-faq__question::before {
	content: "\2212";
	color: var(--efunda-blue);
}

.efunda-faq__answer {
	position: relative;
	padding: 0 20px 20px 80px;
}

.efunda-faq__answer::before {
	content: "";
	position: absolute;
	top: 0;
	bottom: 0;
	left: 0;
	width: 61px;
	border-right: 1px solid #ddd;
	background: rgba(0, 0, 0, 0.04);
}

.efunda-faq__answer > :last-child {
	margin-bottom: 0;
}

/* ---------- Contact page ---------- */
.efunda-columns--contact {
	margin-top: 30px;
	gap: 25px 20px;
}

.efunda-site .efunda-contact__call {
	font-size: 34px;
	line-height: 38px;
}

.efunda-site .efunda-contact__call a {
	color: inherit;
}

.efunda-map {
	display: block;
	width: 100%;
	height: 300px;
	border: 0;
}

/* ---------- Buttons ---------- */
.efunda-site .efunda-button,
.efunda-body .efunda-site .efunda-form .gform_wrapper .gform_button,
.efunda-body .efunda-site .efunda-form .gform_wrapper input[type="submit"],
.efunda-body .efunda-site .efunda-form .gform_wrapper .gform_footer .button {
	display: inline-block;
	width: auto;
	margin: 0;
	padding: 11px 20px;
	border: 0;
	border-radius: 5px;
	background: var(--efunda-blue);
	color: #fff;
	font-family: var(--efunda-font-body);
	font-size: 14px;
	font-weight: 400;
	line-height: 16px;
	cursor: pointer;
	transition: background-color 0.2s;
}

.efunda-site .efunda-button:hover,
.efunda-body .efunda-site .efunda-form .gform_wrapper .gform_button:hover,
.efunda-body .efunda-site .efunda-form .gform_wrapper input[type="submit"]:hover,
.efunda-body .efunda-site .efunda-form .gform_wrapper .gform_footer .button:hover {
	background: var(--efunda-blue-dark);
	color: #fff;
}

/* ---------- Gravity Forms ---------- */
.efunda-body .efunda-site .efunda-form .gform_wrapper {
	margin: 0;
}

.efunda-body .efunda-site .efunda-form .gform_wrapper .ginput_container {
	width: 100%;
	max-width: 100%;
}

/*
 * Gravity Forms sizes fields by their Field Size setting (small / medium / large),
 * e.g. input.medium is half width. The selectors in this block carry enough weight
 * to override that, so every field fills the form.
 */
.efunda-body .efunda-site .efunda-form .gform_wrapper .gform_heading {
	display: none;
}

/* Stacked with flex, so Gravity Forms' own 12-column grid spans cannot shrink the fields. */
.efunda-body .efunda-site .efunda-form .gform_wrapper .gform_fields {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.efunda-body .efunda-site .efunda-form .gform_wrapper .gfield {
	width: 100%;
	min-width: 0;
	margin: 0;
	padding: 0;
	border: 0;
}

.efunda-body .efunda-site .efunda-form .gform_wrapper .gfield_label,
.efunda-body .efunda-site .efunda-form .gform_wrapper legend.gfield_label {
	display: block;
	margin: 0 0 12px;
	padding: 0;
	color: var(--efunda-text);
	font-family: var(--efunda-font-body);
	font-size: 14px;
	font-weight: 700;
	line-height: 18px;
}

.efunda-body .efunda-site .efunda-form .gform_wrapper .gfield_required {
	padding-left: 6px;
	color: #790000;
	font-size: 14px;
}

.efunda-body .efunda-site .efunda-form .gform_wrapper input[type="text"],
.efunda-body .efunda-site .efunda-form .gform_wrapper input[type="email"],
.efunda-body .efunda-site .efunda-form .gform_wrapper input[type="tel"],
.efunda-body .efunda-site .efunda-form .gform_wrapper input[type="url"],
.efunda-body .efunda-site .efunda-form .gform_wrapper input[type="number"],
.efunda-body .efunda-site .efunda-form .gform_wrapper select,
.efunda-body .efunda-site .efunda-form .gform_wrapper textarea {
	width: 100%;
	min-width: 0;
	max-width: 100%;
	margin: 0;
	padding: 5px 8px;
	border: 1px solid var(--efunda-field-line);
	border-radius: 0;
	background: #fff;
	box-shadow: inset 0 0 2px 2px rgba(0, 0, 0, 0.02);
	color: var(--efunda-text);
	font-family: var(--efunda-font-body);
	font-size: 14px;
	line-height: 18px;
}

.efunda-body .efunda-site .efunda-form .gform_wrapper textarea {
	height: 160px;
	padding: 6px 8px;
	line-height: 21px;
	resize: vertical;
}

.efunda-body .efunda-site .efunda-form .gform_wrapper input:focus,
.efunda-body .efunda-site .efunda-form .gform_wrapper select:focus,
.efunda-body .efunda-site .efunda-form .gform_wrapper textarea:focus {
	border-color: var(--efunda-blue);
	outline: 0;
}

.efunda-body .efunda-site .efunda-form .gform_wrapper .gfield_description,
.efunda-body .efunda-site .efunda-form .gform_wrapper .gform_fileupload_rules,
.efunda-body .efunda-site .efunda-form .gform_wrapper .gform-field-label--type-sub {
	margin: 0;
	padding: 6px 0 0;
	color: var(--efunda-list);
	font-size: 13px;
	line-height: 18px;
}

.efunda-body .efunda-site .efunda-form .gform_wrapper .gfield_validation_message,
.efunda-body .efunda-site .efunda-form .gform_wrapper .validation_message {
	margin-top: 6px;
	padding: 6px 10px;
	border: 1px solid #f0c3c3;
	background: #fff5f5;
	color: #b02a2a;
	font-size: 13px;
}

.efunda-body .efunda-site .efunda-form .gform_wrapper .gform_validation_errors {
	margin: 0 0 20px;
	padding: 12px 15px;
	border: 1px solid #f0c3c3;
	border-radius: 0;
	background: #fff5f5;
	box-shadow: none;
}

.efunda-body .efunda-site .efunda-form .gform_wrapper .gform_validation_errors h2 {
	margin: 0;
	color: #b02a2a;
	font-family: var(--efunda-font-body);
	font-size: 14px;
	font-weight: 700;
	line-height: 20px;
}

.efunda-body .efunda-site .efunda-form .gform_wrapper .gform_footer,
.efunda-body .efunda-site .efunda-form .gform_wrapper .gform_page_footer {
	margin: 30px 0 0;
	padding: 0;
}

.efunda-form .gform_confirmation_message {
	padding: 15px;
	border: 1px solid #cfe6f6;
	background: #f1f8fd;
	color: var(--efunda-heading);
}

.efunda-form__notice {
	padding: 12px 15px;
	border: 1px dashed #d5d5d5;
	color: var(--efunda-list);
}

/* Sidebar contact form keeps the narrower fields of the original design. */
.efunda-sidebar .efunda-form {
	max-width: 324px;
}

/* Traffic form in the main column. */
.efunda-form--traffic {
	max-width: 640px;
	margin-top: 30px;
}

.efunda-body .efunda-site .efunda-form--traffic .gform_wrapper .ginput_container_date,
.efunda-body .efunda-site .efunda-form--traffic .gform_wrapper .ginput_container_time {
	max-width: 260px;
}

/* ---------- Lightbox ---------- */
.efunda-lightbox {
	max-width: min(92vw, 900px);
	max-height: 92vh;
	margin: auto;
	padding: 0;
	border: 0;
	background: #fff;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
	overflow: visible;
}

.efunda-lightbox::backdrop {
	background: rgba(0, 0, 0, 0.8);
}

.efunda-lightbox__inner {
	max-height: 92vh;
	padding: 10px;
	overflow: auto;
}

.efunda-lightbox__image {
	display: block;
	max-width: 100%;
	height: auto;
}

.efunda-lightbox__close {
	position: absolute;
	top: -16px;
	right: -16px;
	width: 36px;
	height: 36px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--efunda-blue);
	color: #fff;
	font-size: 24px;
	line-height: 36px;
	cursor: pointer;
}

.efunda-lightbox__close:hover {
	background: var(--efunda-blue-dark);
}

/* ---------- Footer ---------- */
.efunda-footer {
	background: var(--efunda-black);
	color: #ccc;
}

.efunda-footer__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	min-height: 85px;
	padding-top: 20px;
	padding-bottom: 20px;
}

.efunda-site .efunda-footer__copy {
	margin: 0;
	padding-left: 4px;
}

.efunda-site .efunda-footer__top {
	display: flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	width: 45px;
	height: 44px;
	border-radius: 5px;
	background: #eaeaea;
	color: #666;
}

.efunda-site .efunda-footer__top:hover {
	background: #fff;
	color: var(--efunda-blue);
}

/* ---------- Posts and search results (fallback templates) ---------- */
.efunda-entry {
	margin-bottom: 30px;
}

.efunda-pagination .nav-links {
	display: flex;
	gap: 10px;
}

/* ---------- Responsive ---------- */
@media (max-width: 1240px) {
	.efunda-site .efunda-menu__link {
		padding: 0 18px;
	}

	.efunda-logo {
		padding: 0 20px 0 0;
	}

	.efunda-search-toggle {
		width: 60px;
	}
}

@media (max-width: 1100px) {
	.efunda-layout {
		grid-template-columns: minmax(0, 1fr) 300px;
	}

	.efunda-logo__image {
		width: 220px;
		height: 40px;
	}

	.efunda-site .efunda-menu__link {
		padding: 0 13px;
		letter-spacing: 1.5px;
	}
}

@media (max-width: 959px) {
	.efunda-header__inner {
		flex-wrap: wrap;
		min-height: 70px;
	}

	.efunda-logo {
		margin-right: auto;
		min-height: 70px;
	}

	.efunda-nav-toggle {
		display: flex;
		order: 2;
		width: 56px;
		min-height: 70px;
	}

	.efunda-search-toggle {
		order: 3;
		width: 56px;
		min-height: 70px;
	}

	.efunda-nav {
		display: none;
		order: 4;
		flex: 0 0 calc(100% + var(--efunda-gutter) * 2);
		margin: 0 calc(var(--efunda-gutter) * -1);
	}

	.efunda-nav.efunda-is-open {
		display: block;
	}

	.efunda-menu {
		flex-direction: column;
	}

	.efunda-menu__item {
		border-left: 0;
		border-top: 1px solid rgba(255, 255, 255, 0.16);
	}

	.efunda-site .efunda-menu__link {
		flex: 1 1 auto;
		padding: 16px var(--efunda-gutter);
		letter-spacing: 2px;
	}

	.efunda-layout {
		grid-template-columns: minmax(0, 1fr);
	}

	.efunda-main {
		padding-right: 0;
	}

	.efunda-sidebar {
		margin: 0 calc(var(--efunda-gutter) * -1);
		padding: 30px var(--efunda-gutter);
		border-top: 1px solid var(--efunda-line);
		border-left: 0;
	}

	.efunda-sidebar::before {
		display: none;
	}

	.efunda-widget:not(:last-child)::after {
		width: 100%;
	}

	.efunda-sidebar .efunda-form {
		max-width: 480px;
	}

	.efunda-logos {
		gap: 30px 20px;
	}
}

@media (max-width: 640px) {
	.efunda-site h2 {
		font-size: 26px;
		line-height: 31px;
	}

	.efunda-site h3 {
		font-size: 22px;
		line-height: 27px;
	}

	.efunda-logo__image {
		width: 200px;
		height: 36px;
	}

	.efunda-bar {
		padding: 22px 0;
	}

	.efunda-columns,
	.efunda-intro {
		grid-template-columns: minmax(0, 1fr);
	}

	.efunda-intro {
		margin: 25px 0 30px;
	}

	.efunda-logos {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.efunda-faq__question {
		padding: 16px 15px 16px 60px;
	}

	.efunda-faq__question::before,
	.efunda-faq__answer::before {
		width: 45px;
	}

	.efunda-faq__answer {
		padding: 0 15px 16px 60px;
	}

	.efunda-site .efunda-contact__call {
		font-size: 28px;
		line-height: 33px;
	}

	.efunda-lightbox__close {
		top: 6px;
		right: 6px;
	}
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}
}
