/*
 * TMDSB – Home page only (body.tmdsb-home). Shared styles live in base.css.
 */

/* ---------- Hero ---------- */
/* Image composition: fluid, positions expressed as % of the 592 × 580 Figma frame */
.tmdsb-page .tmdsb-hero-media {
	position: relative;
	flex: 0 1 592px !important;
	min-width: 0;
	aspect-ratio: 592 / 580;
	height: auto;
	/* In Figma the composition overhangs the 1152 grid by 40px; only do so when the gutter allows it. */
	margin-right: calc(-1 * min(40px, max(0px, (100vw - 1152px) / 2 - 52px)));
}
.tmdsb-page .tmdsb-hero-media > .elementor-element { position: absolute; margin: 0; }
.tmdsb-page .tmdsb-hero-img1 { left: 25.676%; top: 4.828%; width: 74.324%; height: 82.759%; }
.tmdsb-page .tmdsb-hero-img1 img { width: 100%; height: 100%; object-fit: cover; border-radius: 18px; }
.tmdsb-page .tmdsb-hero-checker {
	left: 89.865%; top: 0; width: 12.162%; aspect-ratio: 1;
	border: 4px solid #fff; border-radius: 10px; overflow: hidden; background: #fff; box-sizing: border-box; z-index: 2;
}
.tmdsb-page .tmdsb-hero-checker img { width: calc(100% + 8px); max-width: none; height: auto; margin: -4px; }
.tmdsb-page .tmdsb-hero-img2 {
	left: 6.757%; top: 58.621%; width: 43.919%; height: 38.621%;
	border: 6px solid #fff; border-radius: 14px; box-sizing: border-box; z-index: 2;
}
.tmdsb-page .tmdsb-hero-img2 img { width: 100%; height: 100%; object-fit: cover; border-radius: 14px; }
.tmdsb-page .tmdsb-hero-media > .tmdsb-hero-badge { left: 64.189%; top: 75.862%; --width: max-content; width: max-content; white-space: nowrap; z-index: 3; }

/* Below the 1440 design width there is no gutter for the badge's Figma overhang:
   keep it inside the image group (right-aligned) so the page never scrolls sideways. */
@media (min-width: 1025px) and (max-width: 1339px) {
	.tmdsb-page .tmdsb-hero-media > .tmdsb-hero-badge { left: auto; right: 0; }
}
@media (max-width: 1024px) {
	.tmdsb-page .tmdsb-hero-media { flex: none !important; width: 100%; max-width: 592px; margin: 0 auto; }
	.tmdsb-page .tmdsb-hero-content { width: 100%; }
}
@media (max-width: 767px) {
	.tmdsb-page .tmdsb-hero-media { width: calc(100% - 8px); margin: 0; }
	.tmdsb-page .tmdsb-hero-media > .tmdsb-hero-badge { left: auto; right: 0; top: 78%; padding: 12px 16px; }
	.tmdsb-page .tmdsb-hero-checker { border-width: 3px; }
}

/* ---------- Topics tabs ---------- */
.tmdsb-page .tmdsb-topics .e-n-tab-title[aria-selected="true"] { font-weight: 600; }
.tmdsb-page .tmdsb-topics .e-n-tabs-heading { flex-wrap: wrap; row-gap: 8px; }
.tmdsb-page .tmdsb-topics .e-n-tab-title { white-space: nowrap; }
/* Keep the tab button at the browser default size (its text is sized by the widget); Site Settings > Buttons would make it 15px and 2px taller. */
.tmdsb-page .tmdsb-topics .e-n-tab-title { font-size: 13.3333px; }
.tmdsb-page .tmdsb-topic-list .elementor-icon-list-text { white-space: nowrap; }
@media (max-width: 1024px) {
	.tmdsb-page .tmdsb-topic-list .elementor-icon-list-text { white-space: normal; }
}
.tmdsb-page .tmdsb-footnote a { font-weight: 700; }

/* ---------- Advertisement ---------- */
.tmdsb-page .tmdsb-ad-pool { display: none !important; }
.elementor-editor-active .tmdsb-page .tmdsb-ad-pool,
body.elementor-editor-active .tmdsb-ad-pool { display: block !important; opacity: .6; max-width: 360px; }
.tmdsb-page .tmdsb-ad-label { align-self: flex-start; }
/* Carousel: two cross-fading layers behind the label (created by site.js) */
.tmdsb-page .tmdsb-ad { position: relative; overflow: hidden; }
.tmdsb-page .tmdsb-ad-layer {
	position: absolute; inset: 0; z-index: 0; pointer-events: none;
	background-position: center center; background-size: cover; background-repeat: no-repeat;
	opacity: 0; transition: opacity .8s ease;
}
.tmdsb-page .tmdsb-ad-layer.is-active { opacity: 1; }
.tmdsb-page .tmdsb-ad > .e-con-inner { position: relative; z-index: 1; }
@media (prefers-reduced-motion: reduce) { .tmdsb-page .tmdsb-ad-layer { transition: none; } }

/* Footer "Are You a Speaker? →": #595959 everywhere (footer template). Updated Figma (24 Nov): on Home it is regular weight like the other footer links; interior pages keep semi-bold. */
body.tmdsb-home .elementor-80 .elementor-element.elementor-element-9d28248 .elementor-button { font-weight: 400; }
