/* TAR Affiliate Directory — colors sampled from the approved mockup. */
.tar-aff,
.tar-aff-hero,
.tar-aff-section,
.tar-aff-panel,
.tar-aff-btn {
	--tar-navy: #072144;
	--tar-navy-deep: #010627;
	--tar-gold: #ecd48a;
	--tar-gold-dark: #8a6d1f;
	--tar-text: #404040;
	--tar-muted: #6b6b6b;
	--tar-bg: #eff3f6;
	--tar-shadow: 0 4px 14px rgba(7, 33, 68, .12);
}

.tar-aff {
	color: var(--tar-text);
}

.tar-aff__sr {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

/* Toolbar: full-width gold band (background bleeds to the viewport edges). */
.tar-aff__toolbar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 16px 32px;
	padding: 40px 0;
	background: var(--tar-gold);
	box-shadow: 0 0 0 100vmax var(--tar-gold);
	clip-path: inset(0 -100vmax);
}

.tar-aff__search {
	position: relative;
	flex: 1 1 320px;
	max-width: 440px;
	color: var(--tar-navy);
}

.tar-aff__search svg {
	position: absolute;
	left: 18px;
	top: 50%;
	transform: translateY(-50%);
	pointer-events: none;
}

.tar-aff .tar-aff__search input {
	box-sizing: border-box;
	width: 100%;
	height: 50px;
	margin: 0;
	padding: 0 18px 0 46px;
	border: 2px solid transparent;
	border-radius: 12px;
	background: #fff;
	color: var(--tar-text);
	font: inherit;
	font-weight: 600;
	box-shadow: var(--tar-shadow);
}

.tar-aff .tar-aff__search input::placeholder {
	color: #222;
}

.tar-aff .tar-aff__search input:focus {
	outline: none;
	border-color: var(--tar-navy);
}

.tar-aff__cats {
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
	flex: 1 1 400px;
	justify-content: flex-end;
}

.tar-aff .tar-aff__cat {
	margin: 0;
	padding: 10px 18px;
	border: 2px solid var(--tar-navy);
	border-radius: 8px;
	background: var(--tar-navy);
	color: #fff;
	font: inherit;
	font-size: 15px;
	line-height: 1.2;
	cursor: pointer;
	box-shadow: 3px 4px 8px rgba(7, 33, 68, .3);
	transition: background-color .15s, color .15s;
}

.tar-aff .tar-aff__cat:hover,
.tar-aff .tar-aff__cat[aria-pressed="true"] {
	background: #fff;
	color: var(--tar-navy);
}

.tar-aff .tar-aff__cat:focus-visible {
	outline: 3px solid #fff;
	outline-offset: 2px;
}

/* Results header */
.tar-aff .tar-aff__title {
	margin: 56px 0 8px;
	color: var(--tar-navy);
	text-align: center;
}

.tar-aff__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 8px 16px;
	margin: 0 0 20px;
}

.tar-aff .tar-aff__count {
	margin: 0;
	color: var(--tar-muted);
	font-size: 14px;
}

.tar-aff__years {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 14px;
}

.tar-aff__years label {
	color: var(--tar-muted);
}

.tar-aff .tar-aff__years select {
	height: 40px;
	margin: 0;
	padding: 0 36px 0 14px;
	border: 2px solid var(--tar-navy);
	border-radius: 8px;
	background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23072144' stroke-width='2'/%3E%3C/svg%3E") no-repeat right 12px center;
	color: var(--tar-navy);
	font: inherit;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
}

.tar-aff .tar-aff__years select:focus-visible {
	outline: 3px solid var(--tar-gold);
	outline-offset: 2px;
}

/* Grid */
.tar-aff .tar-aff__grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
	gap: 40px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.tar-aff .tar-aff__card {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	margin: 0;
	padding: 32px 22px 28px;
	border-top: 8px solid var(--tar-gold);
	border-radius: 4px;
	background: #fff;
	text-align: center;
	box-shadow: var(--tar-shadow);
}

.tar-aff__card[hidden] {
	display: none !important;
}

.tar-aff__badge {
	position: absolute;
	top: 10px;
	right: 10px;
	padding: 3px 8px;
	border-radius: 999px;
	background: var(--tar-bg);
	color: var(--tar-gold-dark);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .02em;
}

.tar-aff__logo {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 120px;
	height: 64px;
	margin-bottom: 10px;
	color: var(--tar-navy);
}

.tar-aff__logo svg {
	box-sizing: content-box;
	padding: 12px;
	border-radius: 10px;
	background: var(--tar-bg);
}

.tar-aff__logo img {
	max-width: 100%;
	max-height: 100%;
	width: auto;
	height: auto;
	object-fit: contain;
}

.tar-aff .tar-aff__name {
	margin: 0;
	color: #111;
	font-family: inherit;
	font-size: 18px;
	font-weight: 700;
	line-height: 1.3;
	text-transform: none;
	letter-spacing: 0;
}

.tar-aff .tar-aff__category {
	margin: 2px 0 0;
	color: var(--tar-gold-dark);
	font-size: 14px;
}

.tar-aff .tar-aff__contact {
	margin: 2px 0 0;
	font-size: 14px;
}

.tar-aff__details {
	display: flex;
	flex-direction: column;
	gap: 2px;
	margin: 14px 0 0;
	font-size: 14px;
	overflow-wrap: anywhere;
}

.tar-aff .tar-aff__details a {
	color: var(--tar-text);
	text-decoration: none;
}

.tar-aff .tar-aff__phone {
	color: #111 !important;
	font-size: 16px;
	font-weight: 700;
}

.tar-aff .tar-aff__details a:hover {
	color: var(--tar-navy);
	text-decoration: underline;
}

.tar-aff__actions {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	width: 100%;
	margin-top: auto;
	padding-top: 16px;
}

.tar-aff .tar-aff__btn {
	box-sizing: border-box;
	width: 100%;
	max-width: 170px;
	padding: 7px 14px;
	border: 2px solid var(--tar-navy);
	border-radius: 8px;
	background: var(--tar-navy);
	color: #fff;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.2;
	text-decoration: none;
	transition: background-color .15s, color .15s;
}

.tar-aff .tar-aff__btn:hover,
.tar-aff .tar-aff__btn:focus-visible {
	background: #fff;
	color: var(--tar-navy);
}

.tar-aff .tar-aff__btn--ghost {
	background: #fff;
	color: var(--tar-navy);
}

.tar-aff .tar-aff__btn--ghost:hover,
.tar-aff .tar-aff__btn--ghost:focus-visible {
	background: var(--tar-navy);
	color: #fff;
}

.tar-aff__empty {
	padding: 40px 20px;
	border-radius: 6px;
	background: #fff;
	text-align: center;
}

.tar-aff__empty[hidden] {
	display: none;
}

/* -------------------------------------------------------------------------
 * Page pieces built in YOOtheme around the directory (classes set in the builder).
 * ---------------------------------------------------------------------- */

/* Site header turns navy on the directory page only (body class added by the plugin). */
.tar-aff-page .tm-header .uk-navbar-container,
.tar-aff-page .tm-header-mobile .uk-navbar-container {
	background: #072245 !important;
}

.tar-aff-page .tm-header .uk-navbar-nav > li > a,
.tar-aff-page .tm-header-mobile .uk-navbar-toggle,
.tar-aff-page .tm-header-mobile .uk-navbar-item,
.tar-aff-page .tm-header-mobile .uk-icon-link {
	color: #fff !important;
}

.tar-aff-page .tm-header .uk-navbar-nav > li:hover > a,
.tar-aff-page .tm-header .uk-navbar-nav > li > a[aria-expanded="true"],
.tar-aff-page .tm-header .uk-navbar-nav > li.uk-active > a {
	color: #ecd48a !important;
}

/* Hero: navy gradient, dot pattern, gold mountain line art. */
.uk-section.tar-aff-hero {
	position: relative;
	overflow: hidden;
	background-color: var(--tar-navy-deep);
	background-image:
		radial-gradient(rgba(255, 255, 255, .07) 1px, transparent 1.5px),
		linear-gradient(180deg, #072245 0%, var(--tar-navy-deep) 100%);
	background-size: 14px 14px, 100% 100%;
}

.uk-section.tar-aff-hero::after {
	content: "";
	position: absolute;
	right: -2%;
	bottom: 12%;
	width: 56%;
	aspect-ratio: 4618 / 1284;
	background: url("mountains.svg") no-repeat center / contain;
	pointer-events: none;
}

.tar-aff-hero > * {
	position: relative;
	z-index: 1;
}

.tar-aff-hero h1 {
	max-width: 620px;
	color: #fff;
	font-size: clamp(2.25rem, 3.4vw, 3.25rem);
	line-height: 1.15;
}

/* "Interested in increasing your exposure?" band: dark on the left, photo shows through on the right. */
.tar-aff-cta .uk-position-cover {
	background: linear-gradient(90deg, rgba(1, 6, 39, .88) 0%, rgba(1, 6, 39, .6) 40%, rgba(1, 6, 39, .05) 100%) !important;
}

.tar-aff-cta h2 {
	max-width: 720px;
	margin-bottom: 20px;
	color: #fff;
	font-size: clamp(2rem, 3vw, 2.75rem);
	line-height: 1.15;
}

.tar-aff-cta .tar-aff-btn {
	padding: 6px 30px;
}

.tar-aff-cta p {
	margin: 0 0 14px;
}

/* Light blue-grey sections behind the cards and resources. */
.uk-section.tar-aff-section {
	background: var(--tar-bg);
}

/* Section holding the directory: gold band sits flush under the hero. */
.uk-section.tar-aff-flush {
	padding-top: 0;
}

.tar-aff-panel {
	box-sizing: border-box;
	height: 100%;
	padding: 48px 56px;
	border-top: 8px solid var(--tar-gold);
	border-radius: 4px;
	background: #fff;
	box-shadow: var(--tar-shadow);
}

.tar-aff-panel .el-title {
	color: var(--tar-navy);
}

.tar-aff-panel .el-content > :last-child {
	margin-bottom: 0;
}

.tar-aff-links {
	margin: 0;
	padding: 0;
	list-style: none;
}

.tar-aff-links li + li {
	margin-top: 6px;
}

.tar-aff-links a {
	color: #111;
	font-weight: 700;
	text-decoration: none;
}

.tar-aff-links a::before {
	content: ">> ";
}

.tar-aff-links a:hover {
	color: var(--tar-navy);
	text-decoration: underline;
}

.tar-aff-note {
	margin-top: 16px;
	color: #111;
	font-size: 12px;
}

.tar-aff-merch {
	display: flex;
	flex-wrap: wrap;
	gap: 16px 24px;
}

.tar-aff-merch > div {
	display: flex;
	flex-direction: column;
	gap: 10px;
	min-width: 150px;
}

.tar-aff-merch strong {
	color: #111;
}

.tar-aff-merch strong::before {
	content: "• ";
}

.tar-aff-btn {
	display: inline-block;
	padding: 7px 26px;
	border: 2px solid var(--tar-navy);
	border-radius: 8px;
	background: var(--tar-navy);
	color: #fff !important;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.3;
	text-align: center;
	text-decoration: none !important;
	transition: background-color .15s, color .15s;
}

.tar-aff-btn:hover,
.tar-aff-btn:focus-visible {
	background: #fff;
	color: var(--tar-navy) !important;
}

.tar-aff-btn--gold {
	border-color: var(--tar-gold);
	background: var(--tar-gold);
	color: var(--tar-navy) !important;
}

.tar-aff-btn--gold:hover,
.tar-aff-btn--gold:focus-visible {
	border-color: #fff;
	background: #fff;
}

.tar-aff-link {
	color: #fff !important;
	font-weight: 700;
}

@media (max-width: 959px) {
	.tar-aff__cats {
		justify-content: flex-start;
	}

	.tar-aff__search {
		max-width: none;
	}

	.uk-section.tar-aff-hero::after {
		width: 90%;
		right: -20%;
		bottom: 4%;
		opacity: .45;
	}
}

@media (max-width: 640px) {
	.tar-aff__toolbar {
		padding: 24px 0;
	}

	.tar-aff__cats {
		flex-wrap: nowrap;
		overflow-x: auto;
		padding: 4px 4px 10px;
		-webkit-overflow-scrolling: touch;
	}

	.tar-aff .tar-aff__cat {
		flex: 0 0 auto;
	}

	.tar-aff .tar-aff__grid {
		gap: 24px;
	}

	.tar-aff .tar-aff__title {
		margin-top: 36px;
	}

	.tar-aff-panel {
		padding: 32px 24px;
	}
}
