/**
 * IHB Teams - Card and Modal Styles
 *
 * @package IHB_Teams
 */

/* ==========================================================================
   CSS Custom Properties (referencing theme.json tokens)
   ========================================================================== */

:root {
	--ihb-color-midnight-teal: #00171B;
	--ihb-color-deep-teal: #007185;
	--ihb-color-sunrise-gold: #FBB025;
	--ihb-color-base: #f2f7f6;
	--ihb-color-text-body: #1A2E32;
	--ihb-color-divider: #99a2a4;
	--ihb-color-white: #ffffff;
	--ihb-font-heading: baskerville-display-pt, serif;
	--ihb-font-body: montserrat, sans-serif;
}

/* ==========================================================================
   Team Grid
   ========================================================================== */

.ihb-team-grid {
	display: grid;
	gap: 32px;
	width: 100%;
}

.ihb-team-grid--cols-2 {
	grid-template-columns: repeat(2, 1fr);
}

.ihb-team-grid--cols-3 {
	grid-template-columns: repeat(3, 1fr);
}

.ihb-team-grid--cols-4 {
	grid-template-columns: repeat(4, 1fr);
}

/* Responsive grid */
@media screen and (max-width: 980px) {
	.ihb-team-grid--cols-3,
	.ihb-team-grid--cols-4 {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media screen and (max-width: 600px) {
	.ihb-team-grid {
		grid-template-columns: 1fr;
		gap: 20px;
	}
}

/* ==========================================================================
   Team Card
   ========================================================================== */

.ihb-team-card {
	display: flex;
	flex-direction: column;
	gap: 24px;
}

@media screen and (max-width: 781px) {
	.ihb-team-card {
		gap: 20px;
	}
}

/* Card Image */
.ihb-team-card__image-wrapper {
	position: relative;
	border-radius: 20px;
	overflow: hidden;
	aspect-ratio: 344 / 430;
	background-color: var(--ihb-color-base);
}

@media screen and (max-width: 600px) {
	.ihb-team-card__image-wrapper {
		aspect-ratio: 1 / 1.25;
		border-radius: 12px;
	}
}

.ihb-team-card__image {
	width: 100%;
	height: 100% !important;
	object-fit: cover;
	transition: transform 0.3s ease;
}

.ihb-team-card:hover .ihb-team-card__image {
	transform: scale(1.05);
}

/* Card Content */
.ihb-team-card__content {
	display: flex;
	align-items: flex-start;
	gap: 16px;
}

.ihb-team-card__text {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

@media screen and (max-width: 600px) {
	.ihb-team-card__text {
		gap: 4px;
	}
}

.ihb-team-card__name {
	font-family: var(--ihb-font-heading);
	font-size: 24px;
	font-weight: 400;
	line-height: 1.2;
	color: var(--ihb-color-midnight-teal);
	margin: 0;
}

@media screen and (max-width: 781px) {
	.ihb-team-card__name {
		font-size: 20px;
	}
}

.ihb-team-card__rank {
	font-family: var(--ihb-font-body);
	font-size: 18px;
	font-weight: 400;
	line-height: 1.5;
	color: var(--ihb-color-text-body);
	margin: 0;
}

@media screen and (max-width: 781px) {
	.ihb-team-card__rank {
		font-size: 16px;
	}
}

/* Card Button */
.ihb-team-card__button {
	flex-shrink: 0;
	width: 48px;
	height: 48px;
	border-radius: 50%;
	border: 2px solid var(--ihb-color-midnight-teal);
	background: transparent;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background-color 0.3s ease, border-color 0.3s ease;
	padding: 0;
}

.ihb-team-card__button:hover {
	background-color: var(--ihb-color-sunrise-gold);
	border-color: var(--ihb-color-sunrise-gold);
}

.ihb-team-card__button:focus {
	outline: 2px solid var(--ihb-color-sunrise-gold);
	outline-offset: 2px;
}

.ihb-team-card__arrow {
	width: 18px;
	height: 24px;
	color: var(--ihb-color-midnight-teal);
	transform: rotate(90deg);
	transition: color 0.3s ease;
}

.ihb-team-card__button:hover .ihb-team-card__arrow {
	color: var(--ihb-color-midnight-teal);
}

/* ==========================================================================
   Team Modal
   ========================================================================== */

.ihb-team-modal {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s ease, visibility 0.3s ease;
}

.ihb-team-modal[aria-hidden="false"] {
	opacity: 1;
	visibility: visible;
}

/* Modal Overlay */
.ihb-team-modal__overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 23, 27, 0.7);
	cursor: pointer;
}

/* Modal Container */
.ihb-team-modal__container {
	position: relative;
	background: var(--ihb-color-white);
	border-radius: 20px;
	max-width: 1280px;
	width: 100%;
	max-height: calc(100vh - 40px);
	overflow: hidden;
	z-index: 1;
	box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* Modal Content Grid */
.ihb-team-modal__content {
	display: grid;
	grid-template-columns: 653px 1fr;
	min-height: 0;
}

@media screen and (max-width: 1100px) {
	.ihb-team-modal__content {
		grid-template-columns: 1fr 1fr;
	}
}

@media screen and (max-width: 781px) {
	.ihb-team-modal__content {
		grid-template-columns: 1fr;
	}
}

/* Modal Image */
.ihb-team-modal__image-wrapper {
	position: relative;
	padding: 24px;
	padding-right: 0;
}

@media screen and (max-width: 781px) {
	.ihb-team-modal__image-wrapper {
		padding: 16px;
		padding-bottom: 0;
		max-height: 300px;
	}
}

.ihb-team-modal__image {
	width: 100%;
	height: 100%;
	max-height: 700px;
	object-fit: cover;
	border-radius: 12px;
}

@media screen and (max-width: 781px) {
	.ihb-team-modal__image {
		max-height: 280px;
	}
}

/* Modal Content Wrapper */
.ihb-team-modal__content-wrapper {
	padding: 48px;
	padding-left: 40px;
	overflow-y: auto;
	display: flex;
	flex-direction: column;
	justify-content: center;
}

@media screen and (max-width: 781px) {
	.ihb-team-modal__content-wrapper {
		padding: 24px 16px 32px;
	}
}

/* Modal Name */
.ihb-team-modal__name {
	font-family: var(--ihb-font-heading);
	font-size: 56px;
	font-weight: 400;
	line-height: 1.2;
	color: var(--ihb-color-midnight-teal);
	margin: 0 0 8px;
	letter-spacing: -1.68px;
}

@media screen and (max-width: 980px) {
	.ihb-team-modal__name {
		font-size: 40px;
	}
}

@media screen and (max-width: 781px) {
	.ihb-team-modal__name {
		font-size: 32px;
		letter-spacing: -0.96px;
	}
}

/* Modal Rank */
.ihb-team-modal__rank {
	font-family: var(--ihb-font-body);
	font-size: 24px;
	font-weight: 500;
	line-height: 1.5;
	color: var(--ihb-color-text-body);
	margin: 0 0 24px;
}

@media screen and (max-width: 781px) {
	.ihb-team-modal__rank {
		font-size: 18px;
		margin-bottom: 16px;
	}
}

/* Modal Address */
.ihb-team-modal__address {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 32px;
}

.ihb-team-modal__address:empty,
.ihb-team-modal__address--hidden {
	display: none;
}

@media screen and (max-width: 781px) {
	.ihb-team-modal__address {
		margin-bottom: 24px;
	}
}

.ihb-team-modal__address-icon {
	width: 32px;
	height: 32px;
	flex-shrink: 0;
	color: var(--ihb-color-deep-teal);
}

@media screen and (max-width: 781px) {
	.ihb-team-modal__address-icon {
		width: 24px;
		height: 24px;
	}
}

.ihb-team-modal__address-text {
	font-family: var(--ihb-font-body);
	font-size: 20px;
	font-weight: 500;
	line-height: 1.5;
	color: var(--ihb-color-text-body);
}

@media screen and (max-width: 781px) {
	.ihb-team-modal__address-text {
		font-size: 16px;
	}
}

/* Modal Divider */
.ihb-team-modal__divider {
	height: 1px;
	background-color: var(--ihb-color-divider);
	margin-bottom: 32px;
}

@media screen and (max-width: 781px) {
	.ihb-team-modal__divider {
		margin-bottom: 24px;
	}
}

/* Modal Bio */
.ihb-team-modal__bio {
	font-family: var(--ihb-font-body);
	font-size: 20px;
	font-weight: 500;
	line-height: 1.5;
	color: var(--ihb-color-text-body);
}

@media screen and (max-width: 781px) {
	.ihb-team-modal__bio {
		font-size: 16px;
	}
}

.ihb-team-modal__bio ul {
	list-style: disc;
	padding-left: 24px;
	margin: 0;
}

.ihb-team-modal__bio li {
	margin-bottom: 8px;
}

.ihb-team-modal__bio li:last-child {
	margin-bottom: 0;
}

.ihb-team-modal__bio strong {
	font-weight: 700;
	color: var(--ihb-color-midnight-teal);
}

/* Modal Close Button */
.ihb-team-modal__close {
	position: absolute;
	top: 32px;
	right: 32px;
	width: 56px;
	height: 56px;
	border-radius: 50%;
	border: none;
	background-color: var(--ihb-color-white);
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 10;
	padding: 0;
	transition: background-color 0.3s ease, transform 0.2s ease;
}

.ihb-team-modal__close:hover {
	background-color: var(--ihb-color-base);
	transform: scale(1.05);
}

.ihb-team-modal__close:focus {
	outline: 2px solid var(--ihb-color-sunrise-gold);
	outline-offset: 2px;
}

@media screen and (max-width: 781px) {
	.ihb-team-modal__close {
		width: 44px;
		height: 44px;
		top: 16px;
		right: 16px;
	}
}

.ihb-team-modal__close-icon {
	width: 24px;
	height: 24px;
	color: var(--ihb-color-deep-teal);
}

@media screen and (max-width: 781px) {
	.ihb-team-modal__close-icon {
		width: 20px;
		height: 20px;
	}
}

/* ==========================================================================
   No Results
   ========================================================================== */

.ihb-team-no-results {
	font-family: var(--ihb-font-body);
	font-size: 18px;
	color: var(--ihb-color-text-body);
	text-align: center;
	padding: 40px;
}

/* ==========================================================================
   Body Scroll Lock (when modal is open)
   ========================================================================== */

body.ihb-modal-open {
	overflow: hidden;
}
