/* Team Block – member modal, animations & card hover effects */

/* ---------- Card hover effects (widget class: tmb-hover-*) ---------- */
.tmb-hover-lift [class*="team-current-theme"],
.tmb-hover-shadow [class*="team-current-theme"] { transition: transform .35s ease, box-shadow .35s ease; }
.tmb-hover-lift [class*="team-current-theme"]:hover { transform: translateY(-8px); }
.tmb-hover-shadow [class*="team-current-theme"]:hover { box-shadow: 0 18px 45px rgba(15, 20, 35, .18); }

.tmb-hover-zoom .image, .tmb-hover-zoom .team-image, .tmb-hover-zoom .image-box { overflow: hidden; }
.tmb-hover-zoom [class*="team-current-theme"] img { transition: transform .6s ease; }
.tmb-hover-zoom [class*="team-current-theme"]:hover img { transform: scale(1.08); }

.tmb-hover-grayscale [class*="team-current-theme"] img { filter: grayscale(1); transition: filter .5s ease; }
.tmb-hover-grayscale [class*="team-current-theme"]:hover img { filter: grayscale(0); }

[data-tmb-open] { cursor: pointer; }
[data-tmb-open]:focus-visible { outline: 2px solid var(--theme-color1, #2563eb); outline-offset: 3px; }

/* ---------- "View Profile" trigger button ---------- */
.tmb-open-wrap { margin-top: 14px; text-align: center; }
.tmb-open-btn {
	display: inline-flex; align-items: center; gap: 8px;
	padding: 10px 22px; border: 0; border-radius: 40px; cursor: pointer;
	font-size: 14px; font-weight: 600; line-height: 1.2;
	background: var(--theme-color1, #2563eb); color: #fff;
	transition: transform .25s ease, background-color .25s ease, color .25s ease;
}
.tmb-open-btn svg { transition: transform .25s ease; }
.tmb-open-btn:hover { transform: translateY(-2px); }
.tmb-open-btn:hover svg { transform: translateX(4px); }

/* ---------- Modal base + colour variables ---------- */
.tmb-modal {
	--tmb-dur: 450ms; --tmb-blur: 6px; --tmb-width: 860px;
	--tmb-accent: var(--theme-color1, #2563eb);
	--tmb-bg: #fff; --tmb-heading: #12141a; --tmb-text: #5a6170; --tmb-muted: #8b91a0;
	--tmb-line: rgba(18, 20, 26, .1); --tmb-overlay: rgba(10, 12, 20, .6);
	--tmb-chip: rgba(18, 20, 26, .06);
	position: fixed; inset: 0; z-index: 99999;
	display: flex; align-items: center; justify-content: center;
	padding: 20px; box-sizing: border-box; text-align: left;
}
.tmb-modal[hidden] { display: none !important; }
.tmb-modal *, .tmb-modal *::before, .tmb-modal *::after { box-sizing: border-box; }
.tmb-modal.tmb-scheme-dark {
	--tmb-bg: #161922; --tmb-heading: #fff; --tmb-text: #b6bccb; --tmb-muted: #868da0;
	--tmb-line: rgba(255, 255, 255, .12); --tmb-chip: rgba(255, 255, 255, .09);
}

.tmb-overlay {
	position: absolute; inset: 0; background: var(--tmb-overlay);
	-webkit-backdrop-filter: blur(var(--tmb-blur)); backdrop-filter: blur(var(--tmb-blur));
	opacity: 0; transition: opacity var(--tmb-dur) ease;
}
.tmb-modal.is-open .tmb-overlay { opacity: 1; }

/* ---------- Dialog + entrance animations ---------- */
.tmb-dialog {
	position: relative; display: flex; width: 100%; max-width: var(--tmb-width);
	max-height: calc(100vh - 40px); max-height: calc(100dvh - 40px);
	overflow: hidden; outline: none;
	background: var(--tmb-bg); border-radius: 18px;
	box-shadow: 0 30px 80px rgba(0, 0, 0, .35);
	opacity: 0;
	transition: opacity var(--tmb-dur) ease, transform var(--tmb-dur) cubic-bezier(.22, 1, .36, 1);
}
.tmb-modal.is-open .tmb-dialog { opacity: 1; transform: none; }

.tmb-anim-zoom .tmb-dialog        { transform: scale(.85); }
.tmb-anim-slide-up .tmb-dialog    { transform: translateY(70px); }
.tmb-anim-slide-down .tmb-dialog  { transform: translateY(-70px); }
.tmb-anim-slide-left .tmb-dialog  { transform: translateX(90px); }
.tmb-anim-slide-right .tmb-dialog { transform: translateX(-90px); }
.tmb-anim-flip-x .tmb-dialog      { transform: perspective(1200px) rotateX(-70deg); }
.tmb-anim-flip-y .tmb-dialog      { transform: perspective(1200px) rotateY(70deg); }
.tmb-anim-rotate .tmb-dialog      { transform: rotate(-8deg) scale(.8); }
.tmb-anim-bounce .tmb-dialog      { transform: scale(.55); transition-timing-function: ease, cubic-bezier(.34, 1.56, .64, 1); }
.tmb-anim-none .tmb-dialog,
.tmb-anim-none .tmb-overlay       { transition: none; }

/* ---------- Layout ---------- */
.tmb-layout-right .tmb-dialog { flex-direction: row-reverse; }
.tmb-layout-top .tmb-dialog { flex-direction: column; }

.tmb-media { position: relative; flex: 0 0 42%; align-self: stretch; min-height: 280px; background: var(--tmb-chip); }
.tmb-layout-top .tmb-media { flex: 0 0 var(--tmb-top-h, 300px); min-height: 0; }
/* Specific + !important so theme/Elementor rules like ".elementor img { height:auto }" cannot break the fill. */
.tmb-modal .tmb-media { overflow: hidden; }
.tmb-modal .tmb-media img,
.tmb-modal .tmb-media .tmb-img {
	position: absolute !important; top: 0 !important; left: 0 !important; right: auto !important; bottom: auto !important;
	width: 100% !important; height: 100% !important; max-width: none !important; max-height: none !important;
	margin: 0 !important; padding: 0 !important; border: 0 !important; border-radius: 0 !important; box-shadow: none !important;
	object-fit: cover !important; object-position: var(--tmb-img-pos, center top) !important;
	display: block !important; transform: none !important; filter: none !important;
}

.tmb-body { flex: 1 1 auto; min-width: 0; padding: 42px 40px 38px; overflow-y: auto; overscroll-behavior: contain; }
.tmb-no-media .tmb-dialog { max-width: min(var(--tmb-width), 560px); }

.tmb-head { position: relative; padding-bottom: 18px; margin-bottom: 18px; border-bottom: 1px solid var(--tmb-line); }
.tmb-head::after { content: ""; position: absolute; left: 0; bottom: -1px; width: 56px; height: 3px; border-radius: 3px; background: var(--tmb-accent); }
.tmb-name { margin: 0 0 6px; padding: 0; font-size: 28px; line-height: 1.2; font-weight: 700; color: var(--tmb-heading); }
.tmb-role { font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--tmb-accent); }

.tmb-meta { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 28px; }
.tmb-meta li { margin: 0; padding: 0; font-size: 14px; display: flex; flex-direction: column; }
.tmb-meta-label { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--tmb-muted); }
.tmb-meta a { color: var(--tmb-heading); text-decoration: none; font-weight: 500; }
.tmb-meta a:hover { color: var(--tmb-accent); }

.tmb-bio { font-size: 15px; line-height: 1.75; color: var(--tmb-text); }
.tmb-bio p { margin: 0 0 12px; color: inherit; }
.tmb-bio p:last-child { margin-bottom: 0; }

.tmb-skills { list-style: none; margin: 20px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tmb-skills li { margin: 0; padding: 6px 14px; border-radius: 30px; font-size: 13px; font-weight: 500; line-height: 1.3; background: var(--tmb-chip); color: var(--tmb-text); }

.tmb-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--tmb-line); }
.tmb-cta {
	display: inline-block; padding: 12px 26px; border-radius: 40px; text-decoration: none;
	font-size: 14px; font-weight: 600; line-height: 1.2; color: #fff; background: var(--tmb-accent);
	transition: transform .25s ease, box-shadow .25s ease, background-color .25s ease;
}
.tmb-cta:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(0, 0, 0, .2); color: #fff; }

.tmb-social { list-style: none; margin: 0; padding: 0; display: flex; gap: 8px; margin-left: auto; }
.tmb-social li { margin: 0; padding: 0; }
.tmb-social a {
	display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px;
	border-radius: 50%; font-size: 15px; text-decoration: none;
	background: var(--tmb-chip); color: var(--tmb-heading);
	transition: transform .25s ease, background-color .25s ease, color .25s ease;
}
.tmb-social a:hover { background: var(--tmb-accent); color: #fff; transform: translateY(-3px); }

/* ---------- Close button ---------- */
.tmb-close {
	position: absolute; top: 14px; right: 14px; z-index: 5; width: 40px; height: 40px; padding: 0;
	display: inline-flex; align-items: center; justify-content: center;
	border: 0; border-radius: 50%; cursor: pointer;
	background: var(--tmb-bg); color: var(--tmb-heading);
	box-shadow: 0 4px 14px rgba(0, 0, 0, .18);
	transition: transform .35s ease, background-color .25s ease, color .25s ease;
}
.tmb-close:hover { background: var(--tmb-accent); color: #fff; transform: rotate(90deg); }
.tmb-close:focus-visible, .tmb-cta:focus-visible, .tmb-social a:focus-visible, .tmb-meta a:focus-visible { outline: 2px solid var(--tmb-accent); outline-offset: 2px; }

/* ---------- Sequenced content reveal ---------- */
.tmb-stagger .tmb-body > * { opacity: 0; transform: translateY(16px); transition: opacity .5s ease, transform .5s ease; }
.tmb-stagger.is-open .tmb-body > * { opacity: 1; transform: none; }
.tmb-stagger.is-open .tmb-body > :nth-child(1) { transition-delay: calc(var(--tmb-dur) * .40); }
.tmb-stagger.is-open .tmb-body > :nth-child(2) { transition-delay: calc(var(--tmb-dur) * .40 + 80ms); }
.tmb-stagger.is-open .tmb-body > :nth-child(3) { transition-delay: calc(var(--tmb-dur) * .40 + 160ms); }
.tmb-stagger.is-open .tmb-body > :nth-child(4) { transition-delay: calc(var(--tmb-dur) * .40 + 240ms); }
.tmb-stagger.is-open .tmb-body > :nth-child(5) { transition-delay: calc(var(--tmb-dur) * .40 + 320ms); }
.tmb-stagger.is-open .tmb-body > :nth-child(n+6) { transition-delay: calc(var(--tmb-dur) * .40 + 400ms); }

/* ---------- Scroll lock ---------- */
html.tmb-lock, html.tmb-lock body { overflow: hidden !important; }

/* ---------- Responsive ---------- */
@media (max-width: 767px) {
	.tmb-dialog, .tmb-layout-right .tmb-dialog { flex-direction: column; }
	.tmb-media, .tmb-layout-top .tmb-media { flex: 0 0 min(var(--tmb-top-h, 300px), 240px); min-height: 0; }
	.tmb-body { padding: 26px 22px 26px; }
	.tmb-name { font-size: 23px; }
	.tmb-foot { flex-direction: column; align-items: flex-start; }
	.tmb-social { margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
	.tmb-modal *, .tmb-open-btn, [class*="team-current-theme"], [class*="team-current-theme"] img {
		transition-duration: .01ms !important; transition-delay: 0s !important;
	}
}
