/* TBF Agent Pages — public styles
 * Used on /{agent-slug}/ pages and anywhere [tbf_ap_directory] renders.
 * Brand green: #20aa4d (HPA canonical).
 */

:root {
	--tbf-ap-green: #20aa4d;
	--tbf-ap-text: #1f2937;
	--tbf-ap-muted: #6b7280;
	--tbf-ap-border: #e5e7eb;
	--tbf-ap-bg: #ffffff;
}

/* -----------------------------------------------------------------------------
 * Single agent page
 * -------------------------------------------------------------------------- */

/* Full-width container override — our template skips Divi's #content-area /
 * #left-area / #sidebar 2-column wrapper, but if any inherited rules try to
 * shrink the column or paint a divider, neutralise them. */
.tbf-ap-fullwidth {
	width: 100%;
	max-width: none;
	float: none;
}
.tbf-ap-fullwidth::before,
.tbf-ap-fullwidth::after {
	content: none !important;
	display: none !important;
}
.tbf-ap-article {
	max-width: none;
	padding: 0;
	border: 0 !important;
	box-shadow: none !important;
	background: transparent !important;
}
.tbf-ap-article::before,
.tbf-ap-article::after {
	content: none !important;
	display: none !important;
}
.single-agent #main-content,
.single-agent #content-area {
	background: transparent !important;
	box-shadow: none !important;
}

.tbf-ap-single {
	max-width: 960px;
	margin: 0 auto;
	padding: 40px 20px;
	color: var(--tbf-ap-text);
}

.tbf-ap-single__header {
	display: grid;
	grid-template-columns: 280px 1fr;
	gap: 40px;
	align-items: center;
	margin-bottom: 32px;
}

@media (max-width: 720px) {
	.tbf-ap-single__header {
		grid-template-columns: 1fr;
		text-align: center;
	}
}

.tbf-ap-single__photo {
	border: 6px solid var(--tbf-ap-green);
	border-radius: 50%;
	overflow: hidden;
	width: 240px;
	height: 240px;
	margin: 0 auto;
	background: #f3f4f6;
}

.tbf-ap-single__photo-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.tbf-ap-single__name {
	font-size: 2.25rem;
	line-height: 1.2;
	margin: 0 0 16px;
	color: var(--tbf-ap-text);
}

.tbf-ap-single__contact {
	list-style: none;
	margin: 0;
	padding: 0;
}

.tbf-ap-single__contact li {
	display: flex;
	gap: 12px;
	align-items: baseline;
	margin-bottom: 8px;
	font-size: 1.05rem;
}

@media (max-width: 720px) {
	.tbf-ap-single__contact li {
		justify-content: center;
	}
}

.tbf-ap-single__label {
	font-weight: 600;
	color: var(--tbf-ap-muted);
	min-width: 60px;
}

.tbf-ap-single__value {
	color: var(--tbf-ap-green);
	text-decoration: none;
	font-weight: 500;
}

.tbf-ap-single__value:hover,
.tbf-ap-single__value:focus {
	text-decoration: underline;
}

.tbf-ap-single__bio {
	border-top: 1px solid var(--tbf-ap-border);
	padding-top: 24px;
	font-size: 1.05rem;
	line-height: 1.65;
}

.tbf-ap-single__bio p:first-child {
	margin-top: 0;
}

.tbf-ap-single__qr {
	margin-top: 40px;
	padding-top: 24px;
	border-top: 1px solid var(--tbf-ap-border);
	text-align: center;
}

.tbf-ap-single__qr .tbf-ap-qr__canvas {
	display: inline-block;
	background: #ffffff;
	padding: 8px;
	border: 1px solid var(--tbf-ap-border);
	border-radius: 8px;
}

.tbf-ap-single__qr .tbf-ap-qr__canvas svg {
	display: block;
	width: 180px;
	height: 180px;
}

.tbf-ap-single__qr-label {
	margin: 12px 0 0;
	color: var(--tbf-ap-muted);
	font-size: 0.95rem;
	letter-spacing: 0.02em;
}

/* -----------------------------------------------------------------------------
 * Directory grid
 * -------------------------------------------------------------------------- */

.tbf-ap-directory {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 28px;
}

.tbf-ap-directory--cols-1 { grid-template-columns: 1fr; }
.tbf-ap-directory--cols-2 { grid-template-columns: repeat(2, 1fr); }
.tbf-ap-directory--cols-3 { grid-template-columns: repeat(3, 1fr); }
.tbf-ap-directory--cols-4 { grid-template-columns: repeat(4, 1fr); }
.tbf-ap-directory--cols-5 { grid-template-columns: repeat(5, 1fr); }
.tbf-ap-directory--cols-6 { grid-template-columns: repeat(6, 1fr); }

@media (max-width: 980px) {
	.tbf-ap-directory--cols-4,
	.tbf-ap-directory--cols-5,
	.tbf-ap-directory--cols-6 { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 720px) {
	.tbf-ap-directory--cols-2,
	.tbf-ap-directory--cols-3,
	.tbf-ap-directory--cols-4,
	.tbf-ap-directory--cols-5,
	.tbf-ap-directory--cols-6 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
	.tbf-ap-directory { grid-template-columns: 1fr !important; }
}

.tbf-ap-card {
	background: var(--tbf-ap-bg);
	border: 1px solid var(--tbf-ap-border);
	border-radius: 12px;
	padding: 20px;
	text-align: center;
	transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}

.tbf-ap-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 20px rgba(0,0,0,.06);
	border-color: var(--tbf-ap-green);
}

.tbf-ap-card__link {
	display: block;
	color: inherit;
	text-decoration: none;
}

.tbf-ap-card__photo-wrap {
	width: 140px;
	height: 140px;
	margin: 0 auto 16px;
	border-radius: 50%;
	overflow: hidden;
	border: 4px solid var(--tbf-ap-green);
	background: #f3f4f6;
}

.tbf-ap-card__photo {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.tbf-ap-card__name {
	font-size: 1.2rem;
	margin: 0 0 12px;
	color: var(--tbf-ap-text);
}

.tbf-ap-card__contact {
	list-style: none;
	margin: 0;
	padding: 0;
	font-size: 0.95rem;
}

.tbf-ap-card__contact li {
	margin-bottom: 4px;
}

.tbf-ap-card__contact a {
	color: var(--tbf-ap-green);
	text-decoration: none;
}

.tbf-ap-card__contact a:hover,
.tbf-ap-card__contact a:focus {
	text-decoration: underline;
}

.tbf-ap-empty {
	color: var(--tbf-ap-muted);
	text-align: center;
	font-style: italic;
}
