/**
 * The Trig Point — organiser single page and organiser archive.
 * Reuses .ttp-race-row styles (from archive.css) for race lists; this file
 * adds organiser-specific header, facts, and archive-row styling.
 * Inherits palette via Kadence global CSS variables.
 */

.ttp-org,
.ttp-org-archive {
	--ttp-green: var(--global-palette1, #21402E);
	--ttp-ink: var(--global-palette3, #1C1F1A);
	--ttp-muted: var(--global-palette5, #4A6678);
	--ttp-line: var(--global-palette6, #D9D3C5);
	--ttp-chalk: var(--global-palette8, #F7F5EF);
	--ttp-white: var(--global-palette9, #FFFFFF);
}

/* === Single organiser ================================================== */

.ttp-org__head {
	background: var(--ttp-green);
	color: var(--ttp-chalk);
	padding: 3rem 1.5rem;
}
.ttp-org__head-inner {
	max-width: 1140px;
	margin: 0 auto;
	display: flex;
	align-items: center;
	gap: 1.5rem;
}
.ttp-org__logo {
	flex: 0 0 auto;
	width: 96px;
	height: 96px;
	background: var(--ttp-white);
	border-radius: 10px;
	padding: 0.6rem;
	display: flex;
	align-items: center;
	justify-content: center;
}
.ttp-org__logo img {
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
	display: block;
}
.ttp-org__eyebrow {
	font-size: 0.78rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--ttp-chalk);
	opacity: 0.75;
	margin: 0 0 0.3rem;
}
.ttp-org__title {
	color: var(--ttp-chalk);
	font-size: 2.2rem;
	margin: 0;
}

.ttp-org__body {
	max-width: 1140px;
	margin: 0 auto;
	padding: 2.5rem 1.5rem 4rem;
}

.ttp-org__description {
	margin-bottom: 2rem;
	max-width: 70ch;
}
.ttp-org__prose {
	font-size: 1.05rem;
	line-height: 1.7;
	color: var(--ttp-ink);
}

/* Key facts */
.ttp-org__facts {
	background: var(--ttp-chalk);
	border: 1px solid var(--ttp-line);
	border-radius: 8px;
	padding: 1.25rem 1.5rem;
	margin-bottom: 2.5rem;
}
.ttp-org__facts-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	gap: 1rem 2rem;
	margin: 0;
}
.ttp-org__fact dt {
	font-size: 0.72rem;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--ttp-muted);
	margin-bottom: 0.15rem;
}
.ttp-org__fact dd {
	margin: 0;
	font-size: 0.95rem;
	color: var(--ttp-ink);
}
.ttp-org__fact a {
	color: var(--ttp-green);
	text-decoration: none;
}
.ttp-org__fact a:hover {
	text-decoration: underline;
}

/* Social icon row */
.ttp-org__socials {
	display: flex;
	align-items: center;
	gap: 0.85rem;
	margin-top: 1.25rem;
	padding-top: 1.1rem;
	border-top: 1px solid var(--ttp-line);
}
.ttp-org__socials-label {
	font-size: 0.72rem;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--ttp-muted);
}
.ttp-org__socials-row {
	display: flex;
	align-items: center;
	gap: 0.6rem;
}
.ttp-org__social-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	border-radius: 50%;
	background: var(--ttp-white);
	border: 1px solid var(--ttp-line);
	color: var(--ttp-green);
	transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.ttp-org__social-link:hover,
.ttp-org__social-link:focus {
	color: #BE8A2E;
	background: var(--ttp-chalk);
	border-color: #BE8A2E;
}

/* Races by this organiser */
.ttp-org__races-title {
	font-size: 1.5rem;
	margin: 0 0 1rem;
	padding-bottom: 0.5rem;
	border-bottom: 2px solid var(--ttp-line);
}
.ttp-org__no-races {
	color: var(--ttp-muted);
	padding: 1rem 0;
}

/* === Organiser archive ================================================= */

.ttp-org-list {
	list-style: none;
	margin: 0;
	padding: 0;
}
.ttp-org-row + .ttp-org-row {
	border-top: 1px solid var(--ttp-line);
}
.ttp-org-row__link {
	display: flex;
	align-items: center;
	gap: 1.25rem;
	padding: 1rem 0.5rem;
	text-decoration: none;
	color: var(--ttp-ink);
	transition: background 0.15s;
}
.ttp-org-row__link:hover,
.ttp-org-row__link:focus {
	background: var(--ttp-chalk);
}
.ttp-org-row__logo {
	flex: 0 0 auto;
	width: 60px;
	height: 60px;
	border-radius: 8px;
	background: var(--ttp-white);
	border: 1px solid var(--ttp-line);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0.35rem;
	overflow: hidden;
}
.ttp-org-row__logo img {
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
}
.ttp-org-row__logo--empty {
	background: var(--ttp-green);
}
.ttp-org-row__logo-fallback {
	font-family: var(--global-heading-font-family, 'Bitter', serif);
	font-weight: 700;
	font-size: 1.6rem;
	color: var(--ttp-chalk);
}
.ttp-org-row__main {
	flex: 1 1 auto;
	min-width: 0;
}
.ttp-org-row__name {
	display: block;
	font-family: var(--global-heading-font-family, 'Bitter', serif);
	font-weight: 700;
	font-size: 1.25rem;
	color: var(--ttp-ink);
	line-height: 1.2;
}
.ttp-org-row__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 0.3rem 1rem;
	margin-top: 0.25rem;
	font-size: 0.9rem;
	color: var(--ttp-muted);
}
.ttp-org-row__count {
	font-weight: 600;
	color: var(--ttp-ink);
}

@media (max-width: 560px) {
	.ttp-org__head-inner {
		flex-direction: column;
		text-align: center;
		gap: 1rem;
	}
	.ttp-org__title {
		font-size: 1.8rem;
	}
	.ttp-org__facts-grid {
		grid-template-columns: 1fr 1fr;
	}
	.ttp-org-row__logo {
		width: 48px;
		height: 48px;
	}
	.ttp-org-row__name {
		font-size: 1.1rem;
	}
}
