/* ROI Resources Grid — scoped styles for Avada compatibility */

.roi-rg {
	--roi-rg-navy: #0c2e4e;
	--roi-rg-orange: #EE8434;
	--roi-rg-pill-active: #EE8434;
	--roi-rg-pill-bg: #e0e0e0;
	--roi-rg-cat: #569BBE;
	--roi-rg-text: #5a6570;
	--roi-rg-bg: #ffffff;
	--roi-rg-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
	--roi-rg-radius: 14px;
	--roi-rg-columns: 3;

	box-sizing: border-box;
	width: 100%;
	margin: 0 auto;
	padding: 12px 0 40px;
	font-family: Lato, sans-serif;
	color: var(--roi-rg-navy);
}

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

/* Filters */
.roi-rg__filters-wrap {
	position: relative;
	margin-bottom: 36px;
}

.roi-rg__filters {
	display: flex;
	flex-wrap: nowrap;
	align-items: center;
	gap: 10px;
	overflow-x: auto;
	overflow-y: hidden;
	scrollbar-width: none;
	-ms-overflow-style: none;
	padding: 4px 4px 8px;
	scroll-behavior: smooth;
	min-width: 0;
	-webkit-overflow-scrolling: touch;
	touch-action: pan-x;
}

.roi-rg__filters.is-dragging {
	cursor: grabbing;
	scroll-behavior: auto;
	user-select: none;
}

.roi-rg__filters.is-dragging .roi-rg__filter {
	pointer-events: none;
}

.roi-rg__filters::-webkit-scrollbar {
	display: none;
}

.roi-rg__filter {
	flex: 0 0 auto;
	margin: 0 !important;
	padding: 10px 18px !important;
	border: 0 !important;
	border-radius: 999px !important;
	background: var(--roi-rg-pill-bg) !important;
	color: #111 !important;
	outline: none;
	font-family: Lato, sans-serif !important;
	font-size: 14px !important;
	font-weight: 500 !important;
	line-height: 1.3 !important;
	white-space: nowrap;
	cursor: pointer;
	text-transform: none !important;
	letter-spacing: 0 !important;
	box-shadow: none !important;
	transition: background 0.2s ease, color 0.2s ease;
}

.roi-rg__filter:hover,
.roi-rg__filter:focus {
	background: #e0e0e0 !important;
	color: #111 !important;
	outline: none;
}

.roi-rg__filter.is-active {
	background: var(--roi-rg-pill-active) !important;
	color: #111 !important;
	font-weight: 600 !important;
}

/* Search bar (inline or detached) */
.roi-rg-search-wrap {
	--roi-rg-orange: #EE8434;
	--roi-rg-navy: #0c2e4e;
	--roi-rg-filter-bg: #e8f4fa;
	--roi-rg-filter-border: #9ec9de;
	--roi-rg-filter-text: #0c2e4e;
}

.roi-rg-search-wrap.has-filter {
	display: flex;
	flex-direction: row;
	flex-wrap: nowrap;
	align-items: stretch;
	gap: 16px;
	max-width: 100%;
	width: 100%;
	margin: 0 auto 32px;
}

.roi-rg__search,
.roi-rg-search-wrap .roi-rg__search {
	max-width: 100%;
	width: 100%;
	margin: 0 auto 32px;
	min-width: 0;
}

.roi-rg-search-wrap.has-filter .roi-rg__search {
	margin: 0;
	max-width: none;
	flex: 1 1 70%;
	min-width: 0;
	width: auto;
}

/* Category filter dropdown */
.roi-rg__filter-dd {
	position: relative;
	flex: 0 0 auto;
	align-self: stretch;
	width: auto;
	min-width: 320px;
	max-width: 380px;
}

.roi-rg__filter-dd-toggle {
	display: inline-flex !important;
	align-items: center;
	justify-content: space-between;
	gap: 28px;
	width: 100%;
	height: 100%;
	min-height: 50px;
	min-width: 0;
	margin: 0 !important;
	padding: 12px 20px !important;
	border: 1px solid var(--roi-rg-filter-border) !important;
	border-radius: 10px !important;
	background: var(--roi-rg-filter-bg) !important;
	color: var(--roi-rg-filter-text) !important;
	font-family: Lato, sans-serif !important;
	font-size: 20px !important;
	font-weight: 700 !important;
	font-style: normal !important;
	letter-spacing: 0.06em !important;
	text-transform: uppercase !important;
	line-height: 100% !important;
	cursor: pointer;
	box-shadow: none !important;
	white-space: nowrap;
	transition: border-color 0.2s ease, background 0.2s ease;
}

.roi-rg__filter-dd-toggle:hover,
.roi-rg__filter-dd-toggle:focus {
	background: #dceef7 !important;
	border-color: #7fb6d0 !important;
	color: var(--roi-rg-filter-text) !important;
	outline: none;
}

.roi-rg__filter-dd.is-open .roi-rg__filter-dd-toggle {
	border-color: #569bbe !important;
	box-shadow: 0 0 0 3px rgba(86, 155, 190, 0.18) !important;
}

.roi-rg__filter-dd-label {
	pointer-events: none;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	min-width: 0;
}

.roi-rg__filter-dd-chevron {
	display: block;
	width: 0;
	height: 0;
	border-left: 5px solid transparent;
	border-right: 5px solid transparent;
	border-top: 6px solid var(--roi-rg-filter-text);
	flex-shrink: 0;
	transition: transform 0.2s ease;
}

.roi-rg__filter-dd.is-open .roi-rg__filter-dd-chevron {
	transform: rotate(180deg);
}

.roi-rg__filter-dd-menu {
	position: absolute;
	top: calc(100% + 6px);
	left: 0;
	z-index: 40;
	min-width: 100%;
	max-width: 100%;
	max-height: 280px;
	overflow-x: hidden;
	overflow-y: auto;
	margin: 0;
	padding: 6px 0;
	list-style: none;
	background: #fff;
	border: 1px solid #d0d5da;
	border-radius: 10px;
	box-shadow: 0 10px 28px rgba(12, 46, 78, 0.12);
}

.roi-rg__filter-dd-menu[hidden] {
	display: none !important;
}

.roi-rg__filter-dd-option {
	margin: 0;
	padding: 10px 16px;
	font-family: Lato, sans-serif;
	font-size: 14px;
	font-weight: 500;
	color: #111;
	cursor: pointer;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	transition: background 0.15s ease;
}

.roi-rg__filter-dd-option:hover,
.roi-rg__filter-dd-option:focus {
	background: #f0f6fa;
	outline: none;
}

.roi-rg__filter-dd-option.is-selected {
	background: #e8f4fa;
	color: var(--roi-rg-navy);
	font-weight: 600;
}

.roi-rg__filter-dd-toggle:disabled {
	opacity: 0.65;
	cursor: wait;
}

.roi-rg__search-inner {
	display: flex;
	align-items: stretch;
	width: 100%;
	background: #fff;
	border: 1px solid #d0d5da;
	border-radius: 50px;
	overflow: hidden;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.roi-rg__search-inner:focus-within {
	border-color: var(--roi-rg-orange);
	box-shadow: 0 0 0 3px rgba(238, 132, 52, 0.15);
}

.roi-rg__search-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0 0 0 16px;
	color: #9aa3ab;
	flex-shrink: 0;
}

.roi-rg__search-input {
	flex: 1;
	min-width: 0;
	margin: 0 !important;
	padding: 14px 12px 14px 8px !important;
	border: 0 !important;
	border-radius: 0 !important;
	background: transparent !important;
	box-shadow: none !important;
	outline: none !important;
	font-family: Lato, sans-serif !important;
	font-size: 15px !important;
	line-height: 1.4 !important;
	color: #111 !important;
	height: auto !important;
}

.roi-rg__search-input::placeholder {
	color: #9aa3ab;
	opacity: 1;
}

.roi-rg__search-input::-webkit-search-cancel-button {
	-webkit-appearance: none;
}

.roi-rg__search-btn {
	flex-shrink: 0;
	margin: 0 !important;
	padding: 14px 32px !important;
	border: 0 !important;
	border-radius: 0 !important;
	background: #EE8434 !important;
	color: #fff !important;
	font-family: Lato, sans-serif !important;
	font-size: 15px !important;
	font-weight: 600 !important;
	line-height: 1.4 !important;
	cursor: pointer;
	transition: background 0.2s ease;
	height: auto !important;
	text-transform: none !important;
	letter-spacing: 0 !important;
	box-shadow: none !important;
}

.roi-rg__search-btn:hover,
.roi-rg__search-btn:focus {
	background: #d97328 !important;
	color: #fff !important;
}

.roi-rg__search-btn:disabled,
.roi-rg__search-input:disabled {
	opacity: 0.65;
	cursor: wait;
}

/* Search highlight in cards */
.roi-rg-highlight {
	background: #fff3cd;
	color: inherit;
	padding: 0 2px;
	border-radius: 2px;
}

/* Matching category filter pills */
.roi-rg__filter.is-search-match {
	background: #f5e6c8 !important;
	box-shadow: inset 0 0 0 2px #EE8434;
	font-weight: 600 !important;
}

.roi-rg__filter.is-in-results {
	background: #f5e6c8 !important;
	box-shadow: inset 0 0 0 2px #f5c542;
	font-weight: 600 !important;
}

.roi-rg__filter.is-search-match.is-active,
.roi-rg__filter.is-in-results.is-active {
	background: var(--roi-rg-pill-active) !important;
	color: #111 !important;
	box-shadow: inset 0 0 0 2px #111;
}

.roi-rg__filter.is-filter-hidden {
	display: none !important;
}

.roi-rg .screen-reader-text,
.roi-rg-search-wrap .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;
}

/* Grid */
.roi-rg__grid {
	display: grid;
	grid-template-columns: repeat(var(--roi-rg-columns), 1fr);
	gap: 80px 24px;
	min-height: 80px;
}

.roi-rg__grid.is-loading {
	opacity: 0.55;
	pointer-events: none;
	transition: opacity 0.15s ease;
}

.roi-rg-empty {
	grid-column: 1 / -1;
	margin: 24px 0;
	text-align: center;
	font-size: 16px;
	color: var(--roi-rg-text);
}

/* Load more */
.roi-rg__more-wrap {
	display: flex;
	justify-content: center;
	margin-top: 48px;
}

.roi-rg__more-wrap.is-hidden {
	display: none;
}

.roi-rg__more-btn {
	margin: 0 !important;
	padding: 14px 40px !important;
	border: 2px solid #EE8434 !important;
	border-radius: 12px !important;
	background: #EE8434 !important;
	color: #fff !important;
	font-family: Lato, sans-serif !important;
	font-size: 20px !important;
	font-weight: 700 !important;
	font-style: normal !important;
	line-height: 100% !important;
	text-transform: none !important;
	letter-spacing: 0 !important;
	box-shadow: none !important;
	cursor: pointer;
	transition: background 0.2s ease, color 0.2s ease, opacity 0.2s ease;
}

.roi-rg__more-btn.is-solid {
	border-color: #EE8434 !important;
	background: #EE8434 !important;
	color: #fff !important;
}

.roi-rg__more-btn.is-solid:hover,
.roi-rg__more-btn.is-solid:focus {
	background: #d97328 !important;
	border-color: #d97328 !important;
	color: #fff !important;
	opacity: 1;
}

.roi-rg__more-btn.is-outline {
	background: transparent !important;
	border-color: #EE8434 !important;
	color: #EE8434 !important;
}

.roi-rg__more-btn.is-outline:hover,
.roi-rg__more-btn.is-outline:focus {
	background: #EE8434 !important;
	border-color: #EE8434 !important;
	color: #fff !important;
}

.roi-rg__more-btn:hover,
.roi-rg__more-btn:focus {
	opacity: 1;
}

.roi-rg__more-btn:disabled {
	opacity: 0.6;
	cursor: wait;
}

/* Card */
.roi-rg-card {
	display: flex;
	flex-direction: column;
	background: var(--roi-rg-bg);
	border-radius: var(--roi-rg-radius);
	box-shadow: var(--roi-rg-shadow);
	overflow: hidden;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.roi-rg-card:hover {
	transform: translateY(-3px);
	box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
}

.roi-rg-card__image-link {
	position: relative;
	display: block;
	line-height: 0;
	text-decoration: none !important;
	overflow: hidden;
}

.roi-rg-card__image-link::after {
	content: '';
	position: absolute;
	right: 0;
	bottom: -1px;
	left: 0;
	height: 10px;
	background: var(--roi-rg-card-border-img, var(--roi-rg-card-border)) center / 100% 100% no-repeat;
	pointer-events: none;
	z-index: 1;
}

/* A different border variant per column. The newsletter spans the full row
   (grid-column: 1 / -1) and is a <section>, so nth-of-type keeps counting
   cards in column order across it. */
.roi-rg-card:nth-of-type(3n + 2) .roi-rg-card__image-link::after {
	--roi-rg-card-border-img: var(--roi-rg-card-border-2);
}

.roi-rg-card:nth-of-type(3n + 3) .roi-rg-card__image-link::after {
	--roi-rg-card-border-img: var(--roi-rg-card-border-3);
}

.roi-rg-card__image {
	display: block;
	width: 100%;
	height: 200px;
	object-fit: cover;
	object-position: center;
	border: 0;
}

.roi-rg-card__image--placeholder {
	background: linear-gradient(135deg, #d8dee4 0%, #eef1f4 100%);
}

.roi-rg-card__body {
	display: flex;
	flex-direction: column;
	align-items: center;
	flex: 1;
	padding: 22px 22px 26px;
	text-align: center;
}

.roi-rg-card__category {
	margin: 0px;
	padding: 0;
	font-family: Lato, sans-serif;
	font-size: 18px;
	font-weight: 700;
	font-style: normal;
	line-height: 33px;
	text-align: center;
	text-transform: uppercase;
	color: #569BBE;
	padding-bottom: 0px;
	margin-bottom: 10px !important;
}

.roi-rg-card__title {
	margin: 0 0 12px;
	padding: 0;
	font-family: Lato, sans-serif;
	font-weight: 700;
	font-style: normal;
	font-size: 28px;
	line-height: 34px !important;
	color: #111;
	text-align: center;
}

.roi-rg-card__title a {
	color: inherit !important;
	text-decoration: none !important;
	border: 0 !important;
	box-shadow: none !important;
	font-family: Lato, sans-serif;
	font-weight: 700;
	font-style: normal;
	font-size: 28px;
	line-height: 34px !important;
}

.roi-rg-card__title a:hover {
	color: var(--roi-rg-orange) !important;
}

.roi-rg-card__excerpt {
	margin: 0 0 20px;
	padding: 0;
	flex: 1;
	color: var(--roi-rg-text);
	font-family: Lato, sans-serif;
	font-weight: 300;
	font-style: normal;
	font-size: 23px;
	line-height: 33px;
	letter-spacing: 0;
	text-align: center;
}

.roi-rg-card__more {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 4px;
	margin: 0 auto !important;
	padding: 0 !important;
	border: 0 !important;
	background: transparent !important;
	color: #EE8434 !important;
	font-family: Lato, sans-serif !important;
	font-size: 19px !important;
	font-weight: 900 !important;
	line-height: 100% !important;
	text-decoration: none !important;
	text-transform: none !important;
	letter-spacing: 0 !important;
	box-shadow: none !important;
	align-self: center;
	transition: opacity 0.2s ease;
}

.roi-rg-card__more:hover,
.roi-rg-card__more:focus {
	color: #EE8434 !important;
	opacity: 0.85;
	text-decoration: none !important;
}

.roi-rg-card__more-arrow {
	font-size: 22px !important;
	line-height: 1;
}

/* Newsletter banner (after first row) — user-provided styles */
.roi-rg .newsletter {
	grid-column: 1 / -1;
	width: 100%;
	min-height: 224px;
	margin: 0 auto;
	padding: 18px clamp(22px, 4vw, 50px);
	box-sizing: border-box;

	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: clamp(15px, 2.4vw, 30px);

	background: linear-gradient(90deg, #07557a 0%, #448eaf 100%);
	border-radius: 25px;
	color: #fff;
}

.roi-rg .newsletter-content {
	flex: 1;
	min-width: 0;
}

.roi-rg .newsletter-content h2 {
	margin: 0 0 5px;
	font-family: Arial, sans-serif;
	font-size: clamp(26px, 3.2vw, 44px);
	line-height: 1.2;
	font-weight: 700;
	color: #fff;
}

.roi-rg .newsletter-content p {
	margin: 0;
	font-family: Arial, sans-serif;
	font-size: clamp(16px, 1.7vw, 23px);
	line-height: 1.5;
	font-weight: 400;
	color: rgba(255, 255, 255, 0.65);
}

.roi-rg .newsletter-form {
	width: clamp(280px, 34%, 460px);
	max-width: 100%;
	flex-shrink: 0;
}

/* CF7 shell */
.roi-rg .newsletter-form .wpcf7 {
	margin: 0 !important;
	width: 100% !important;
	max-width: none !important;
}

.roi-rg .newsletter-form .wpcf7 form,
.roi-rg .newsletter-form .wpcf7-form {
	display: flex !important;
	flex-direction: row !important;
	flex-wrap: nowrap !important;
	align-items: stretch !important;
	width: 100% !important;
	margin: 0 !important;
	padding: 0 !important;
	overflow: hidden;
	background: #fff;
	border-radius: 25px;
	position: relative;
}

/* Flatten CF7 wrappers (theme strips p/span tags too) */
.roi-rg .newsletter-form .wpcf7-form > p,
.roi-rg .newsletter-form .wpcf7-form label,
.roi-rg .newsletter-form .wpcf7-form-control-wrap {
	display: contents !important;
	margin: 0 !important;
	padding: 0 !important;
}

.roi-rg .newsletter-form .screen-reader-response,
.roi-rg .newsletter-form .wpcf7-spinner {
	display: none !important;
}

/* Email input */
.roi-rg .newsletter-form input[type="email"],
.roi-rg .newsletter-form input[type="text"],
.roi-rg .newsletter-form input.wpcf7-email,
.roi-rg .newsletter-form input.wpcf7-form-control:not([type="submit"]) {
	flex: 1 1 auto !important;
	width: 1% !important;
	min-width: 0 !important;
	height: 55px !important;
	margin: 0 !important;
	padding: 0 18px !important;
	border: 0 !important;
	border-radius: 20px 0 0 20px !important;
	outline: none !important;
	background: #fff !important;
	box-shadow: none !important;
	float: none !important;
	display: block !important;
	font-family: Arial, sans-serif !important;
	font-size: 14px !important;
	line-height: 52px !important;
	color: #333 !important;
}

.roi-rg .newsletter-form input::placeholder {
	color: #999 !important;
	opacity: 1;
}

/* Sign Up button */
.roi-rg .newsletter-form button,
.roi-rg .newsletter-form input[type="submit"],
.roi-rg .newsletter-form .wpcf7-submit {
	flex: 0 0 auto !important;
	width: auto !important;
	min-width: 100px !important;
	height: 55px !important;
	margin: 0 !important;
	padding: 0 22px !important;
	border: 0 !important;
	border-radius: 0 20px 20px 0 !important;
	background: #f7933b !important;
	background-image: none !important;
	color: #fff !important;
	font-family: Arial, sans-serif !important;
	font-size: 14px !important;
	font-weight: 600 !important;
	line-height: 52px !important;
	text-transform: none !important;
	letter-spacing: 0 !important;
	box-shadow: none !important;
	float: none !important;
	display: inline-block !important;
	cursor: pointer;
	white-space: nowrap;
	transition: background 0.2s ease;
	-webkit-appearance: none;
	appearance: none;
}

.roi-rg .newsletter-form button:hover,
.roi-rg .newsletter-form input[type="submit"]:hover,
.roi-rg .newsletter-form .wpcf7-submit:hover {
	background: #e9822c !important;
	color: #fff !important;
}

.roi-rg .newsletter-form .wpcf7-not-valid-tip {
	position: absolute;
	left: 16px;
	top: calc(100% + 4px);
	font-size: 12px;
	color: #ffe0c2;
}

.roi-rg .newsletter-form .wpcf7-response-output {
	margin: 8px 0 0 !important;
	padding: 6px 10px !important;
	border: 0 !important;
	border-radius: 6px;
	background: rgba(255, 255, 255, 0.15);
	color: #fff !important;
	font-size: 12px;
}

/* Stack once the side-by-side form would squeeze the copy. */
@media (max-width: 820px) {
	.roi-rg .newsletter {
		flex-direction: column;
		align-items: stretch;
		min-height: 0;
		padding: 22px;
	}

	.roi-rg .newsletter-content p {
		max-width: 100%;
	}

	.roi-rg .newsletter-form {
		width: 100%;
	}
}

/* Mobile */
@media (max-width: 600px) {
	.roi-rg .newsletter-form input[type="email"],
	.roi-rg .newsletter-form input[type="text"],
	.roi-rg .newsletter-form input.wpcf7-email,
	.roi-rg .newsletter-form input.wpcf7-form-control:not([type="submit"]),
	.roi-rg .newsletter-form button,
	.roi-rg .newsletter-form input[type="submit"],
	.roi-rg .newsletter-form .wpcf7-submit {
		line-height: 48px !important;
		font-size: 13px !important;
	}
}

/* Responsive grid.
   The shortcode sets --roi-rg-columns inline on .roi-rg, which outranks any
   stylesheet rule, so the breakpoints override grid-template-columns on the
   grid itself. Scoped by data-columns so a narrower screen only ever reduces
   the configured count, never raises it. */
@media (min-width: 601px) and (max-width: 900px) {
	.roi-rg[data-columns="3"] .roi-rg__grid,
	.roi-rg[data-columns="4"] .roi-rg__grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 56px 20px;
	}
}

@media (max-width: 600px) {
	.roi-rg .roi-rg__grid {
		grid-template-columns: 1fr;
		gap: 40px;
	}

	.roi-rg {
		padding: 8px 0 28px;
	}

	.roi-rg__filters-wrap {
		margin-bottom: 24px;
	}

	.roi-rg-card__image {
		height: 200px;
	}

	.roi-rg-card__title,
	.roi-rg-card__title a {
		font-size: 20px;
		line-height: 26px !important;
	}
}
