/* Join Us (/join-us/), Renew (/membership-renewal/) and Development Bursary (/development-bursary/) pages. Loaded only on those pages by functions-tesl.php.
   Theme palette: orange #f90, green #529047, teal #017676, olive #767c42. */

.tj {
	--tj-orange: #f90;
	--tj-orange-dark: #c76f00;
	--tj-green: #529047;
	--tj-teal: #017676;
	--tj-olive: #767c42;
	--tj-tint: #f4f7ee;
	--tj-line: #dfe5d3;
	font-size: 15px;
	line-height: 1.6;
	color: #333;
}
.tj *, .tj *::before, .tj *::after { box-sizing: border-box; }
/* classic theme wraps every Group block in an extra div; let the grid/flex rules below see the real children */
.tj .wp-block-group__inner-container { display: contents; }
.entry-content .tj p, .entry-content .tj li { font-size: 15px; line-height: 1.6; }
.tj p { margin: 0 0 1em; }
.tj h2 { font-size: 24px; line-height: 1.25; margin: 0 0 .5em; color: var(--tj-teal); font-weight: 700; }
.tj h3 { font-size: 18px; line-height: 1.3; margin: 1.4em 0 .6em; color: var(--tj-teal); font-weight: 700; }
.tj .tj-lead { font-size: 17px !important; }
.tj .tj-small, .entry-content .tj .tj-small p, .entry-content .tj .tj-small li { font-size: 13px; color: #555; }
.tj .wp-block-image { margin: 0; }
.tj .wp-block-image img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 6px; }

/* benefit list with check marks */
.tj ul.tj-checks { list-style: none; margin: 0 0 1.2em; padding: 0; }
.tj ul.tj-checks li { position: relative; padding-left: 28px; margin: 0 0 .5em; }
.tj ul.tj-checks li::before {
	content: "\2713"; position: absolute; left: 0; top: 1px;
	width: 20px; height: 20px; border-radius: 50%;
	background: var(--tj-green); color: #fff; font-size: 12px; line-height: 20px; text-align: center; font-weight: 700;
}

/* fee tables */
.tj .wp-block-table { margin: 0 0 1em; overflow-x: auto; }
.tj table { width: 100%; border-collapse: collapse; margin: 0; font-size: 15px; }
.tj table th, .tj table td { padding: 8px 10px; border-bottom: 1px solid var(--tj-line); text-align: left; vertical-align: top; }
.entry-content .tj table { color: #333; line-height: 1.4; }
/* theme makes every th 27px uppercase; keep fee headers small and on one line */
.entry-content .tj table th { font-size: 14px; line-height: 1.3; text-transform: none; white-space: nowrap; }
.tj table thead th { background: var(--tj-olive); color: #fff; font-weight: 700; border-bottom: 0; }
.tj table td:not(:first-child), .tj table th:not(:first-child) { text-align: right; white-space: nowrap; }
.tj table tbody tr:nth-child(even) { background: var(--tj-tint); }
.tj table .tj-save { display: block; font-size: 12px; color: var(--tj-green); font-weight: 700; }
.tj .wp-block-table figcaption { font-size: 13px; color: #666; margin-top: .4em; }
.tj .wp-block-table + .tj-table-note { margin-top: -.6em; }

/* call-to-action button */
.tj .wp-block-buttons { margin: 1.2em 0; }
.entry-content .tj .wp-block-button__link {
	display: inline-block; background: var(--tj-orange); color: #fff !important;
	font-weight: 700; font-size: 16px; padding: 12px 22px; border-radius: 6px; text-decoration: none;
}
.entry-content .tj .wp-block-button__link:hover { background: var(--tj-orange-dark); text-decoration: none !important; }

/* fine print box */
.tj .tj-note { background: #f7f7f7; border-left: 4px solid var(--tj-orange); padding: 12px 16px; margin: 1.5em 0 0; border-radius: 0 6px 6px 0; }
.tj .tj-note p, .tj .tj-note ul { margin: 0 0 .4em; }
.tj .tj-note ul { padding-left: 1.2em; }

/* ---------- layout: small photo beside the intro, two fee tables side by side ---------- */
.tj-a .tj-intro { display: flow-root; margin-bottom: 1em; }
.tj-a .tj-intro .wp-block-image { float: right; width: 280px; aspect-ratio: 3 / 2; margin: 4px 0 12px 24px; }
.tj-a .tj-fees { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.tj-a .tj-fees h3 { margin-top: .4em; }

/* ---------- Renew page: two payment options side by side ---------- */
.tj-renew h3 { margin-top: 1.2em; }
.tj-renew .wp-block-buttons { margin: .4em 0 .6em; }
.tj .tj-pay { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 0 0 .6em; }
.tj .tj-pay-opt { background: var(--tj-tint); border: 1px solid var(--tj-line); border-top: 4px solid var(--tj-green); border-radius: 6px; padding: 14px 16px; }
.entry-content .tj .tj-pay-opt p { margin: 0 0 .6em; }
.entry-content .tj .tj-pay-opt p:last-child { margin-bottom: 0; }
.entry-content .tj .tj-pay-title { font-size: 17px; font-weight: 700; color: var(--tj-teal); }
.entry-content .tj .tj-addr { font-weight: 600; line-height: 1.5; }

/* ---------- Development Bursary page: lists inside the two cards ---------- */
.tj-bursary .tj-pay-opt ul { margin: 0; padding-left: 1.2em; }
.entry-content .tj-bursary .tj-pay-opt li { margin: 0 0 .2em; }
.tj-bursary .tj-pay-opt ul { margin-bottom: .6em; }
/* Each card ends with its own form button, lined up at the bottom of both cards. */
.tj-bursary .tj-pay-opt { display: flex; flex-direction: column; }
.tj-bursary .tj-pay-opt .wp-block-buttons { margin: auto 0 0; padding-top: .6em; }

/* ---------- tablet ---------- */
@media screen and (max-width: 700px) {
	.tj-a .tj-fees { grid-template-columns: 1fr; gap: 0; }
	.tj .tj-pay { grid-template-columns: 1fr; }
}

/* ---------- phone ---------- */
@media screen and (max-width: 519px) {
	.tj, .entry-content .tj p, .entry-content .tj li { font-size: 15px; }
	.tj table { font-size: 14px; }
	.tj table th, .tj table td { padding: 7px 6px; }
	.tj h2 { font-size: 21px; }
	/* small thumbnail tucked beside the intro text: nothing to scroll past */
	.tj-a .tj-intro .wp-block-image { width: 96px; aspect-ratio: 1; margin: 4px 0 6px 12px; }
	.entry-content .tj .wp-block-image img { width: 100%; }
	.tj .wp-block-button, .tj .wp-block-button__link { display: block; width: 100%; text-align: center; }
}
