/*
 * TEP 2026: Contact (Figma 807:6129) and Company Forms (2738:6933) pages.
 * Styles hang off the `class` setting of native Beaver Builder rows, columns and modules, so editors
 * keep editing content in module panels. Hero/section/button helpers (.tep-hero-title, .tep-hero-lead,
 * .tep-section-title, .tep-btn, .tep-eyebrow-lg) come from css/tep-services.css; the filter bar,
 * Posts-module card wrappers and pagination come from css/tep-templates.css.
 * Values come from the "TEP Group 2026" design-system tokens (--ds-*).
 */

/* ---------- Page hero (807:6131 / 2738:6935) ---------- */
.tep-page-hero .fl-row-content-wrap {
	background-position: center top;
}

.tep-page-hero .tep-hero-lead.fl-rich-text {
	max-width: 720px;
}

/* Inline red link: semibold so red text stays >= 18px semibold (accessibility rule) */
.tep-hero-lead.fl-rich-text a {
	font-weight: var(--ds-weight-semibold);
	color: var(--ds-color-primary);
	text-decoration: none;
}

.tep-hero-lead.fl-rich-text a:hover,
.tep-hero-lead.fl-rich-text a:focus-visible {
	color: var(--ds-color-primary-dark);
	text-decoration: underline;
}

/* ---------- Contact form placeholder (807:6132) ---------- */
.tep-form-placeholder.fl-rich-text {
	min-height: 300px;
	padding: 25px;
	border: 2px dashed var(--ds-color-muted);
	border-radius: var(--ds-radius-sm);
	background: var(--ds-color-field);
	font-family: var(--ds-font-body);
	font-size: var(--ds-text-sm);
	line-height: var(--ds-line-body);
	color: var(--ds-color-text);
}

.tep-form-placeholder.fl-rich-text p:last-child {
	margin-bottom: 0;
}

/* ---------- Careers CTA band (2966:6600) ---------- */
.tep-cta-band .tep-section-title.fl-heading,
.tep-cta-band .tep-section-intro.fl-rich-text {
	text-align: center;
}

.tep-cta-band .tep-section-intro.fl-rich-text {
	color: var(--ds-color-black);
}

/* ---------- Contact Information + General Inquiries (2704:7205) ---------- */
.tep-contact-info.fl-rich-text,
.tep-general-info.fl-rich-text {
	font-family: var(--ds-font-body);
	font-size: var(--ds-text-base);
	line-height: var(--ds-line-body);
	color: var(--ds-color-text);
}

.tep-contact-info.fl-rich-text p:last-child,
.tep-general-info.fl-rich-text p:last-child {
	margin-bottom: 0;
}

.tep-general-info.fl-rich-text p {
	margin: 0 0 25px;
}

.tep-general-info.fl-rich-text a {
	color: inherit;
	text-decoration: none;
	overflow-wrap: anywhere;
}

.tep-general-info.fl-rich-text a:hover,
.tep-general-info.fl-rich-text a:focus-visible {
	color: var(--ds-color-primary);
	text-decoration: underline;
}

.tep-general-title.fl-heading {
	margin: 0 0 25px;
	font-family: var(--ds-font-heading);
	font-size: var(--ds-text-lg);
	font-weight: var(--ds-weight-semibold);
	letter-spacing: var(--ds-letter-caps);
	line-height: 1.2;
	text-transform: uppercase;
	color: var(--ds-color-primary);
}

/* Figma 2704:7205: General Inquiries sits in a narrow block against the right edge */
@media (min-width: 1025px) {
	.tep-general-col > .fl-col-content {
		align-items: flex-end;
	}

	.tep-general-col > .fl-col-content > .fl-module {
		width: 220px;
		max-width: 100%;
	}
}

/* ---------- Locations: filter bar (2707:8298) ---------- */
.tep-filters.tep-filters--locations {
	grid-template-columns: minmax(0, 784fr) minmax(0, 366fr) auto;
	gap: 50px;
}

.tep-filters--locations .tep-filters__search {
	max-width: none;
}

.tep-filters--locations .tep-filters__search .bb-field {
	background-color: var(--ds-color-field);
}

/* ---------- Locations: cards (Info Box 2704:7319) ---------- */
.tep-lcard {
	display: flex;
	flex-direction: column;
	gap: 25px;
	height: 100%;
	padding: 25px;
	border-radius: var(--ds-radius-sm);
	background: var(--ds-color-surface);
	box-shadow: 0 4px 25px 0 rgba(var(--ds-color-shadow-rgb), 0.1);
	font-family: var(--ds-font-body);
	font-size: var(--ds-text-base);
	line-height: var(--ds-line-body);
	color: var(--ds-color-text);
}

.tep-lcard .tep-lcard__title {
	margin: 0;
	padding-bottom: 25px;
	border-bottom: 1px solid var(--ds-color-secondary-light);
	font-family: var(--ds-font-heading);
	font-size: var(--ds-text-lg);
	font-weight: var(--ds-weight-medium);
	line-height: var(--ds-line-body); /* Figma 20/30 */
	color: var(--ds-color-black);
}

.tep-lcard p {
	margin: 0;
}

.tep-lcard__item {
	display: flex;
	flex-direction: column;
	gap: 15px;
}

.tep-lcard__label {
	font-family: var(--ds-font-heading);
	font-size: var(--ds-text-sm);
	font-weight: var(--ds-weight-semibold);
	letter-spacing: var(--ds-letter-caps);
	line-height: 1.2;
	text-transform: uppercase;
	color: var(--ds-color-text);
}

.tep-lcard a {
	color: inherit;
	text-decoration: none;
	overflow-wrap: anywhere;
}

.tep-lcard a:hover,
.tep-lcard a:focus-visible {
	color: var(--ds-color-primary);
	text-decoration: underline;
}

.tep-lcard .tep-tags {
	gap: 15px;
}

/* Grid spacing between cards (Figma: 50px gutters) */
.tep-locations-grid .fl-post-column {
	padding-bottom: 50px;
}

.tep-locations-grid .fl-builder-pagination {
	margin-top: 0;
}

#tep-locations {
	scroll-margin-top: 24px;
}

/* ---------- Company Forms: download cards (2742:4223) ---------- */
.tep-fcard > .fl-col-content {
	display: flex;
	flex-direction: column;
	gap: 25px;
	height: 100%;
	padding: 25px 0;
	border-radius: var(--ds-radius-sm);
	background: var(--ds-color-surface);
	box-shadow: var(--ds-shadow-card);
}

.tep-fcard .fl-module {
	margin: 0;
}

.tep-fcard .tep-fcard__cat.fl-rich-text {
	padding: 0 25px;
	font-family: var(--ds-font-body);
	font-size: var(--ds-text-xs);
	line-height: var(--ds-line-snug);
	color: var(--ds-color-black);
}

.tep-fcard .tep-fcard__cat.fl-rich-text p {
	margin: 0;
}

/* Figma annotation: H2 for SEO, styled as H6 */
.tep-fcard .tep-fcard__title.fl-heading {
	margin: 0;
	padding: 0 25px 0 25px; /* text 30px in from the card edge (Figma 2742:4237) */
	border-left: 5px solid var(--ds-color-primary);
	font-family: var(--ds-font-heading);
	font-size: var(--ds-text-xl);
	font-weight: var(--ds-weight-medium);
	line-height: var(--ds-line-body); /* Figma 26/39 */
	max-width: 475px; /* ~420px of text, so titles break where Figma's do */
	color: var(--ds-color-black);
}

.tep-fcard .tep-fcard__link.fl-rich-text {
	margin-top: auto;
	padding: 0 25px;
}

.tep-fcard .tep-fcard__link.fl-rich-text p {
	margin: 0;
}

.tep-fcard .tep-fcard__link .bb-link-arrow {
	color: var(--ds-color-black);
	text-decoration: none;
}

.tep-fcard .tep-fcard__link .bb-link-arrow:hover,
.tep-fcard .tep-fcard__link .bb-link-arrow:focus-visible {
	color: var(--ds-color-black);
}

/* An odd last card keeps the half-width slot (Figma), instead of BB widening a lone column */
@media (min-width: 769px) {
	.tep-fcard-row .fl-col-group > .tep-fcard:only-child {
		flex-grow: 0;
		width: calc(50% - 17.5px) !important;
	}

	.tep-fcard-row .fl-col-group > .tep-fcard:only-child > .fl-col-content {
		margin-right: 0;
	}
}

/* ---------- Responsive ---------- */
@media (max-width: 992px) {
	.tep-filters.tep-filters--locations {
		gap: 25px;
	}
}

@media (max-width: 768px) {
	/* BB caps stacked "small" columns at 400px; these stack full width */
	.fl-col-group .fl-col.fl-col-small.tep-fcard,
	.fl-col-group .fl-col.fl-col-small.tep-general-col {
		max-width: none;
	}

	.tep-filters.tep-filters--locations {
		grid-template-columns: 1fr;
		gap: 10px;
	}

	.tep-locations-grid .fl-post-column {
		padding-bottom: 25px;
	}

	.fl-row .fl-col.tep-general-col > .fl-col-content {
		margin-top: 40px;
	}

	.tep-fcard + .tep-fcard > .fl-col-content {
		margin-top: 25px;
	}
}
