/* York Experts Widget */

.yew { font-family: inherit; box-sizing: border-box; }
.yew *, .yew *::before, .yew *::after { box-sizing: inherit; }

/* ── Fix: browser auto-detects phone numbers as links (iOS yellow / Android blue) ── */
.yew a[x-apple-data-detectors],
.yew [x-apple-data-detectors] a,
.yew-contact__phone a,
.yew-contact__phone a:link,
.yew-contact__phone a:visited,
.yew-contact__email a,
.yew-contact__email a:link,
.yew-contact__email a:visited {
	color: inherit !important;
	text-decoration: none !important;
}

/* ── Header row ───────────────────────────────────────── */
.yew__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 16px;
	margin-bottom: 20px;
}

.yew__heading {
	margin: 0;
	font-size: 2.4rem;
	font-weight: 700;
	line-height: 1.2;
	color: #111827;
	letter-spacing: -0.01em;
	align-self: center;
	flex: 1 1 auto;
}

/* ── Heading letter animation ─────────────────────────── */
.yew__heading .yew-heading__word {
	display: inline-block;
	overflow: hidden;
	vertical-align: bottom;
}

/* space between words */
.yew__heading .yew-heading__word + .yew-heading__word::before {
	content: '\00a0';
	display: inline-block;
}

.yew__heading .yew-heading__letter {
	display: inline-block;
	opacity: 0;
	transform: translateY(115%);
	animation: yewLetterIn var(--yew-letter-dur, 550ms) cubic-bezier(0.22, 1, 0.36, 1) forwards;
	will-change: transform, opacity;
}

@keyframes yewLetterIn {
	from { opacity: 0; transform: translateY(115%); }
	to   { opacity: 1; transform: translateY(0); }
}

/* Editor: show heading normally, no animation */
.elementor-editor-active .yew__heading .yew-heading__word { overflow: visible; }
.elementor-editor-active .yew__heading .yew-heading__letter {
	opacity: 1;
	transform: none;
	animation: none;
}

/* ── Custom Dropdown ──────────────────────────────────── */
.yew__dropdown-wrapper {
	position: relative;
	display: inline-flex;
	align-items: center;
	flex: 0 0 auto;
	align-self: center;
}

.yew__dropdown-btn {
	/* Full browser reset */
	-webkit-appearance: none;
	appearance: none;
	font-family: inherit;
	/* Layout */
	display: inline-flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	/* Sizing */
	min-width: 200px;
	width: 100%;
	/* Look */
	background: #ffffff;
	border: 1.5px solid #c9cdd4;
	border-radius: 30px;
	padding: 10px 18px;
	font-size: 0.8rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	line-height: 1.4;
	color: #1a1a1a;
	cursor: pointer;
	white-space: nowrap;
	transition: border-color 0.15s;
}

.yew__dropdown-btn:hover  { border-color: #6b7280; }
.yew__dropdown-btn:focus  { outline: 2px solid rgba(107,114,128,.3); outline-offset: 2px; border-color: #6b7280; }

.yew__dropdown-label { flex: 1; text-align: left; }

.yew__dropdown-arrow {
	flex-shrink: 0;
	font-size: 0.8rem;
	color: #374151;
	transition: transform 0.2s ease;
	line-height: 1;
}

.yew__dropdown-wrapper--open .yew__dropdown-arrow { transform: rotate(180deg); }

/* ── Dropdown panel ───────────────────────────────────── */
.yew__dropdown-panel {
	position: absolute;
	top: calc(100% + 6px);
	right: 0;
	min-width: 100%;
	background: #ffffff;
	border: 1.5px solid #c9cdd4;
	border-radius: 12px;
	box-shadow: 0 6px 20px rgba(0,0,0,.12);
	z-index: 9999;
	display: none;
	overflow: hidden;
}

.yew__dropdown-wrapper--open .yew__dropdown-panel { display: block; }

.yew__dropdown-option {
	padding: 10px 16px;
	font-size: 0.8rem;
	font-weight: 600;
	letter-spacing: 0.05em;
	color: #374151;
	cursor: pointer;
	transition: background 0.12s;
}

.yew__dropdown-option:hover         { background-color: #f3f4f6; }
.yew__dropdown-option--active       { background-color: #f0f4ff; color: #111827; }

/* ── Divider ──────────────────────────────────────────── */
.yew__divider {
	height: 1px;
	background: #e5e7eb;
	margin: 0 0 24px;
}

/* ── Panels ───────────────────────────────────────────── */
.yew__panel { display: none; opacity: 0; }
.yew__panel--active { display: block; animation: yewFadeIn 0.22s ease forwards; }

@keyframes yewFadeIn {
	from { opacity: 0; transform: translateY(4px); }
	to   { opacity: 1; transform: translateY(0); }
}

.yew__office-name {
	font-size: 1.5rem;
	font-weight: 700;
	color: #c0392b;
	margin: 0 0 20px;
	line-height: 1.2;
}

.yew__no-contacts { color: #6b7280; font-size: 0.875rem; }

/* ── Grid ─────────────────────────────────────────────── */
.yew__grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 14px;
}

/* ── Card ─────────────────────────────────────────────── */
.yew-contact {
	background: #ffffff;
	border: 1px solid #e2e5ea;
	border-radius: 10px;
	padding: 16px;
	display: flex;
	align-items: flex-start;
	gap: 12px;
	transition: box-shadow 0.15s;
}

.yew-contact:hover { box-shadow: 0 2px 12px rgba(0,0,0,.08); }

/* Body: name/role stacked, then phone/email stacked — all aligned under each other */
.yew-contact__body {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.yew-contact__call { flex: 0 0 auto; align-self: flex-start; margin-top: 2px; }

/* ── Avatar ───────────────────────────────────────────── */
.yew-contact__avatar-wrap { flex: 0 0 auto; flex-shrink: 0; align-self: flex-start; padding-top: 2px; line-height: 0; }

.yew-contact__avatar {
	width: 44px;
	height: 44px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	flex-shrink: 0;
}

.yew-contact__avatar--photo { object-fit: cover; display: block; }

.yew-contact__avatar--icon {
	background-color: #e5e7eb;
	color: #9ca3af;
	transition: background-color 0.2s ease, color 0.2s ease;
}

/* Avatar turns red on card hover */
.yew-contact:hover .yew-contact__avatar--icon {
	background-color: #c0392b;
	color: #ffffff;
}

.yew-avatar-icon { width: 62%; height: 62%; fill: currentColor; }

/* ── Name / Role ──────────────────────────────────────── */
.yew-contact__info { display: flex; flex-direction: column; gap: 3px; }

.yew-contact__name {
	font-size: 0.95rem;
	font-weight: 700;
	color: #111827;
	line-height: 1.3;
}

.yew-contact__role {
	font-size: 0.75rem;
	color: #6b7280;
	line-height: 1.4;
}

/* ── Call button ──────────────────────────────────────── */
.yew-contact__call {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	background-color: #28a745;
	color: #ffffff;
	border: 1.5px solid #28a745;
	border-radius: 6px;
	padding: 7px 14px;
	font-size: 0.78rem;
	font-weight: 600;
	text-decoration: none;
	white-space: nowrap;
	min-height: 34px;
	transition: filter 0.15s, transform 0.1s;
}

.yew-contact__call:hover  { filter: brightness(.88); transform: translateY(-1px); }
.yew-contact__call:active { transform: translateY(0); }

/* ── Meta (phone + email) ─────────────────────────────── */
.yew-contact__meta { padding-top: 2px; }

.yew-contact__phone {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 0.82rem;
	font-weight: 500;
	color: #374151;
}

.yew-contact__email-row {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	flex-wrap: wrap;
}

.yew-contact__email {
	font-size: 0.78rem;
	color: #374151;
	word-break: break-all;
}

/* ── Compose button ───────────────────────────────────── */
.yew-contact__compose {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	background: transparent;
	border: 1.5px solid #d1d5db;
	border-radius: 6px;
	padding: 4px 10px;
	font-size: 0.75rem;
	font-weight: 500;
	color: #374151;
	text-decoration: none;
	white-space: nowrap;
	min-height: 28px;
	transition: border-color 0.15s;
}

.yew-contact__compose:hover { border-color: #6b7280; }

/* ── Icons ────────────────────────────────────────────── */
.yew-icon     { width: 16px; height: 16px; fill: currentColor; flex-shrink: 0; }
.yew-icon--sm { width: 14px; height: 14px; }

/* ── Sticky label: hidden on desktop ─────────────────── */
.yew__sticky-office-label { display: none; }

/* ── Sticky spacer (JS-inserted, compensates for fixed header lift-off) ── */
.yew__sticky-spacer { display: block; width: 100%; }

/* ── Responsive: tablet (768–1024px) ─────────────────── */
@media (max-width: 1024px) and (min-width: 768px) {
	.yew__heading { font-size: 1.9rem; }

	.yew__grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }

	.yew-contact { padding: 14px; gap: 10px; }
	.yew-contact__name  { font-size: 0.88rem; }
	.yew-contact__role  { font-size: 0.72rem; }
	.yew-contact__phone { font-size: 0.78rem; }
	.yew-contact__email { font-size: 0.72rem; }
}

/* ── Responsive: mobile (≤767px) ─────────────────────── */
@media (max-width: 767px) {

	/* Sticky bar — fixed state */
	.yew__sticky-header--active.yew--is-fixed {
		position: fixed !important;
		top: var(--yew-sticky-top, 85px) !important;
		left: 0;
		right: 0;
		z-index: 9999;
		background-color: var(--yew-sticky-bg, #ffffff);
		padding: 8px 16px 4px;
		box-shadow: 0 2px 10px rgba(0,0,0,.12);
	}

	/* Header becomes column: heading row, then dropdown row */
	.yew__sticky-header--active.yew--is-fixed .yew__header {
		flex-direction: column;
		align-items: flex-start;
		gap: 4px;
		margin-bottom: 4px;
	}

	/* Compact heading — own row, never competes with dropdown */
	.yew__sticky-header--active.yew--is-fixed .yew__heading {
		font-size: 1.1rem !important;
		font-weight: 700;
		line-height: 1.2;
		letter-spacing: -0.01em;
		width: 100%;
		white-space: nowrap;
		overflow: hidden;
		text-overflow: ellipsis;
		margin: 0;
	}

	/* Dropdown full-width in sticky */
	.yew__sticky-header--active.yew--is-fixed .yew__dropdown-wrapper { width: 100%; }
	.yew__sticky-header--active.yew--is-fixed .yew__dropdown-btn {
		width: 100%;
		min-width: unset;
		padding: 6px 12px;
		font-size: 0.72rem;
	}

	/* Thin divider */
	.yew__sticky-header--active.yew--is-fixed .yew__divider { margin: 0 0 4px; }

	/* Office label */
	.yew__sticky-header--active .yew__sticky-office-label {
		display: block;
		font-size: 0.95rem;
		font-weight: 700;
		color: #c0392b;
		padding: 0 0 4px;
		line-height: 1.2;
	}

	/* Hide the in-panel office name on mobile (shown in sticky bar instead) */
	.yew__sticky-header--active ~ .yew__panel .yew__office-name { display: none; }

	/* Header */
	.yew__heading         { font-size: 1.5rem; }
	.yew__header          { flex-direction: column; align-items: flex-start; gap: 12px; }

	/* Dropdown full-width */
	.yew__dropdown-wrapper { width: 100%; }
	.yew__dropdown-btn    { width: 100%; min-width: unset; justify-content: space-between; }
	.yew__dropdown-panel  { right: auto; left: 0; width: 100%; }

	/* Office name */
	.yew__office-name { font-size: 1.15rem; }

	/* Grid: 1 col or 2 col depending on screen */
	.yew__grid {
		grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
		gap: 10px;
	}

	/* Cards */
	.yew-contact { padding: 12px; gap: 10px; }

	/* Avatar slightly smaller */
	.yew-contact__avatar { width: 38px; height: 38px; }

	/* Text sizes */
	.yew-contact__name  { font-size: 0.88rem; }
	.yew-contact__role  { font-size: 0.72rem; }
	.yew-contact__phone { font-size: 0.8rem; }
	.yew-contact__email { font-size: 0.72rem; word-break: break-all; }

	/* Touch targets */
	.yew-contact__call    { min-height: 44px; padding: 10px 16px; font-size: 0.875rem; }
	.yew-contact__compose { min-height: 44px; padding: 10px 12px; font-size: 0.875rem; }
}

/* ── Responsive: small mobile (≤480px) ───────────────── */
@media (max-width: 480px) {
	.yew__heading { font-size: 1.3rem; }
	.yew__grid    { grid-template-columns: 1fr; }

	.yew-contact  { padding: 12px 10px; }

	/* Call button compact — no flex-wrap (that breaks avatar position) */
	.yew-contact__call {
		padding: 6px 10px;
		font-size: 0.72rem;
		min-height: 38px;
		align-self: flex-start;
	}
	/* Hide "Call" text, keep icon only on very small screens */
	.yew-contact__call .yew-icon { width: 18px; height: 18px; }
}

/* ── Responsive: very small (≤360px) ─────────────────── */
@media (max-width: 360px) {
	.yew__heading { font-size: 1.15rem; }
	.yew-contact__name  { font-size: 0.82rem; }
	.yew-contact__phone,
	.yew-contact__email { font-size: 0.7rem; }
}

/* ── Elementor editor: all panels visible ─────────────── */
.elementor-editor-active .yew__panel { display: block; opacity: 1; }
