/* ==========================================================================
   Azam Team Popup — front-end styles
   Colours are exposed as CSS custom properties so the client can retheme
   from a child theme / Elementor custom CSS without touching this file.
   ========================================================================== */

.azam-team-grid-wrap {
	--azam-card-bg: #ffffff;
	--azam-card-radius: 6px;
	--azam-name-color: #1b1b1b;
	--azam-location-color: #2f6f8f;
	--azam-gap: 24px;
	--azam-overlay-bg: rgba(0, 0, 0, 0.65);
	--azam-badge-bg: #ffffff;
}

/* ---------------------------------- Grid --------------------------------- */

.azam-team-grid {
	display: grid;
	grid-template-columns: repeat(var(--azam-team-columns, 4), 1fr);
	gap: var(--azam-gap);
	width: 100%;
	box-sizing: border-box;
}

.azam-team-card {
	background: var(--azam-card-bg);
	border-radius: var(--azam-card-radius);
	padding: 40px 20px 32px;
	text-align: center;
	cursor: pointer;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: flex-start;
	gap: 14px;
	min-height: 190px;
	transition: transform 0.18s ease, box-shadow 0.18s ease;
	box-shadow: 0 0 0 rgba(0, 0, 0, 0);
}

.azam-team-card:hover,
.azam-team-card:focus-visible {
	transform: translateY(-4px);
	box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

.azam-team-card:focus-visible {
	outline: 3px solid var(--azam-location-color);
	outline-offset: 2px;
}

.azam-team-card__logo {
	height: 44px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.azam-team-card__logo img {
	max-height: 44px;
	max-width: 100%;
	width: auto;
	object-fit: contain;
}

.azam-team-card__name {
	margin: 0;
	font-size: 16px;
	font-weight: 700;
	color: var(--azam-name-color);
	line-height: 1.35;
}

.azam-team-card__location {
	margin: 0;
	font-size: 14px;
	color: var(--azam-location-color);
}

.azam-team-empty {
	color: #fff;
	text-align: center;
}

/* Tablet */
@media (max-width: 1024px) {
	.azam-team-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

/* Mobile */
@media (max-width: 600px) {
	.azam-team-grid {
		grid-template-columns: 1fr;
		--azam-gap: 16px;
	}

	.azam-team-card {
		padding: 32px 20px 26px;
		min-height: unset;
	}
}

/* ---------------------------------- Modal --------------------------------- */

.azam-team-modal {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	visibility: hidden;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.2s ease, visibility 0.2s ease;
	padding: 20px;
	box-sizing: border-box;
}

.azam-team-modal.is-open {
	visibility: visible;
	opacity: 1;
	pointer-events: auto;
}

.azam-team-modal__overlay {
	position: absolute;
	inset: 0;
	background: var(--azam-overlay-bg);
}

.azam-team-modal__dialog {
	position: relative;
	width: 100%;
	max-width: 640px;
	transform: translateY(16px) scale(0.98);
	transition: transform 0.22s ease;
}

/* Scroll/clip boundary lives on the inner wrapper so the close button
   (a sibling, positioned outside it) is never clipped or overlapped by
   the tabs/header content. */
.azam-team-modal__dialog-inner {
	position: relative;
	background: #fff;
	max-height: 90vh;
	overflow-x: hidden;
	overflow-y: auto;
	border-radius: 10px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

.azam-team-modal__tabs {
	display: flex;
	align-items: center;
	gap: 4px;
	padding: 14px 20px 0;
	margin: 0 0 4px;
	background: #f3f5f7;
	border-bottom: none;
}

.azam-team-modal__tabs[hidden] {
	display: none;
}

/* Reset + isolate from the parent theme's global "button" styles, which
   were overriding these with a large white font and making the tabs
   invisible on the light modal header. */
.azam-team-modal__tab-btn {
	all: unset;
	box-sizing: border-box;
	flex: 1 1 0;
	text-align: center;
	background: transparent !important;
	border: none !important;
	border-radius: 8px 8px 0 0 !important;
	padding: 12px 18px !important;
	margin-bottom: 6px;
	font-family: 'Montserrat', sans-serif !important;
	font-size: 14px !important;
	font-weight: 600 !important;
	line-height: 1.2 !important;
	color: #6b7280 !important;
	cursor: pointer;
	transition: color 0.18s ease, background-color 0.18s ease;
}

.azam-team-modal__tab-btn:hover {
	color: var(--azam-location-color) !important;
	background: rgba(255, 255, 255, 0.6) !important;
}

.azam-team-modal__tab-btn:focus-visible {
	outline: 2px solid var(--azam-location-color);
	outline-offset: -2px;
}

.azam-team-modal__tab-btn.is-active {
	color: #fff !important;
	background: var(--azam-location-color) !important;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.azam-team-modal.is-open .azam-team-modal__dialog {
	transform: translateY(0) scale(1);
}

/* Floats just outside the card's top-right corner, over the dark overlay,
   so it never sits on top of (or overlaps) the tabs/header content. */
.azam-team-modal__close {
	position: absolute;
	top: -16px;
	right: -16px;
	width: 36px;
	height: 36px;
	border: none;
	border-radius: 50%;
	background: #fff;
	color: #1b1b1b;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 2;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
	transition: transform 0.15s ease, background-color 0.15s ease;
}

.azam-team-modal__close:hover {
	background: #f3f5f7;
	transform: scale(1.06);
}

.azam-team-modal__photo-wrap {
	position: relative;
	width: 100%;
	background: #ddd;
	line-height: 0;
}

.azam-team-modal__photo {
	width: 100%;
	max-height: 380px;
	object-fit: cover;
	display: block;
}

.azam-team-modal__logo-badge {
	position: absolute;
	left: 20px;
	bottom: -28px;
	width: 76px;
	height: 76px;
	border-radius: 50%;
	background: var(--azam-badge-bg);
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 8px;
	box-sizing: border-box;
	overflow: hidden;
}

/* Explicit, !important-guarded sizing: the theme's own global "img" rules
   were beating these constraints with intrinsic width/height, so wide
   logo lockups spilled outside the circular badge instead of shrinking
   to fit it. */
.azam-team-modal__logo-badge img {
	width: auto !important;
	height: auto !important;
	max-width: 100% !important;
	max-height: 100% !important;
	object-fit: contain !important;
}

.azam-team-modal__body {
	padding: 44px 28px 28px;
}

.azam-team-modal__uni {
	margin: 0 0 18px;
	font-size: 22px;
	font-weight: 700;
	color: var(--azam-name-color);
}

.azam-team-modal__field {
	margin-bottom: 16px;
}

.azam-team-modal__label {
	display: block;
	font-weight: 700;
	color: var(--azam-location-color);
	margin-bottom: 6px;
	font-size: 15px;
}

.azam-team-modal__names {
	margin: 0;
	padding: 0 0 0 20px;
	color: #333;
}

.azam-team-modal__names li {
	margin-bottom: 4px;
}

.azam-team-modal__slogan {
	margin: 0;
	color: #333;
	font-style: italic;
}

body.azam-team-modal-open {
	overflow: hidden;
}

/* Mobile modal adjustments */
@media (max-width: 600px) {
	.azam-team-modal {
		padding: 0;
		align-items: flex-end;
	}

	.azam-team-modal__dialog-inner {
		max-height: 92vh;
		border-radius: 14px 14px 0 0;
	}

	.azam-team-modal__close {
		top: -14px;
		right: 4px;
	}

	.azam-team-modal__photo {
		max-height: 220px;
	}

	.azam-team-modal__logo-badge {
		width: 60px;
		height: 60px;
		left: 16px;
		bottom: -20px;
	}

	.azam-team-modal__body {
		padding: 34px 18px 22px;
	}

	.azam-team-modal__uni {
		font-size: 19px;
	}
}
