/* ── Pods Grid ── */

/* Reset Elementor default widget spacing */
.elementor-widget-braillard-pods-grid {
	margin-bottom: 0 !important;
	padding: 0 !important;
}

.elementor-widget-braillard-pods-grid > .elementor-widget-container {
	margin: 0 !important;
	padding: 0 !important;
}

.pods-grid-wrapper {
	width: 100%;
	margin: 0;
	padding: 0;
}

/* Filters */
.pods-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 32px;
}

.pods-filter {
	padding: 8px 20px;
	border: 2px solid #ddd;
	border-radius: 24px;
	background: transparent;
	color: #333;
	font-size: 14px;
	font-weight: 500;
	cursor: pointer;
	transition: all 0.25s ease;
}

.pods-filter:hover {
	border-color: #999;
}

.pods-filter--active {
	background-color: #0073aa;
	border-color: #0073aa;
	color: #fff;
}

/* Hidden pod data */
.pods-data {
	display: none !important;
}

/* Layout: grid + optional description sidebar */
.pods-grid-layout {
	display: flex;
	gap: 32px;
	align-items: flex-start;
}

/* Grid */
.pods-grid {
	display: grid;
	gap: 24px;
	position: relative;
	flex: 1;
	min-width: 0;
}

.pods-grid--cols-2 { grid-template-columns: repeat(2, 1fr); }
.pods-grid--cols-3 { grid-template-columns: repeat(3, 1fr); }
.pods-grid--cols-4 { grid-template-columns: repeat(4, 1fr); }
.pods-grid--cols-5 { grid-template-columns: repeat(5, 1fr); }
.pods-grid--cols-6 { grid-template-columns: repeat(6, 1fr); }

/* When description sidebar is open, reduce columns by 2 to keep card size */
.pods-grid-layout--with-desc .pods-grid--cols-6 { grid-template-columns: repeat(4, 1fr); }
.pods-grid-layout--with-desc .pods-grid--cols-5 { grid-template-columns: repeat(3, 1fr); }
.pods-grid-layout--with-desc .pods-grid--cols-4 { grid-template-columns: repeat(3, 1fr); }
.pods-grid-layout--with-desc .pods-grid--cols-3 { grid-template-columns: repeat(2, 1fr); }
.pods-grid-layout--with-desc .pods-grid--cols-2 { grid-template-columns: repeat(1, 1fr); }

/* Card */
.pod-card {
	background: #f5f5f5;
	border-radius: 8px;
	overflow: hidden;
	cursor: pointer;
	transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
	            opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1),
	            box-shadow 0.3s ease;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.pod-card:hover {
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
	transform: translateY(-2px);
}

/* Card image */
.pod-card__image {
	width: 100%;
	aspect-ratio: 1 / 1;
	overflow: hidden;
}

.pod-card__image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.4s ease;
}

.pod-card:hover .pod-card__image img {
	transform: scale(1.03);
}

/* Placeholder (no photo) */
.pod-card__placeholder {
	width: 100%;
	height: 100%;
	background: #e9ecef;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #adb5bd;
}

.pod-card__placeholder svg {
	width: 50%;
	height: 50%;
}

/* Card content */
.pod-card__content {
	padding: 16px;
}

.pod-card__name {
	margin: 0 0 8px;
	font-size: 15px;
	font-weight: 400;
	line-height: 1.3;
	min-height: 2.6em;
}

.pod-card__surname {
	font-weight: 700;
}

/* Tags */
.pod-card__tags {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.pod-tag {
	display: inline-block;
	padding: 2px 8px;
	border-radius: 10px;
	background-color: #e8e8e8;
	color: #333;
	font-size: 11px;
	font-weight: 500;
	line-height: 1.5;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 100%;
}

/* Hide role on grid cards, show only in modal */
.pod-card .pod-tag__role {
	display: none;
}

.pods-modal__tags .pod-tag__role {
	display: inline;
	opacity: 0.65;
	font-weight: 400;
	font-size: 12px;
}

/* Hidden bio data in card (for JS to read) */
.pod-card__bio-data {
	display: none !important;
}

/* ── Filtering animation ── */
/* Step 1: fade out (still in flow) */
.pod-card--hiding {
	opacity: 0;
	transform: scale(0.85);
	pointer-events: none;
}

/* Step 2: removed from layout after fade */
.pod-card--hidden {
	display: none;
}

/* Step 3: fade in when revealed */
.pod-card--showing {
	animation: podCardShow 0.35s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes podCardShow {
	from {
		opacity: 0;
		transform: scale(0.85);
	}
	to {
		opacity: 1;
		transform: scale(1);
	}
}

/* Empty state */
.pods-grid__empty {
	grid-column: 1 / -1;
	text-align: center;
	padding: 48px 24px;
	color: #999;
	font-size: 16px;
}

/* ── Pod description sidebar ── */
.pods-description {
	flex: 0 0 calc(100% * 2 / var(--pods-cols, 6));
	max-width: 340px;
	align-self: start;
	position: sticky;
	top: 100px;
	padding: 28px;
	background: #f5f5f5;
	border-radius: 12px;
	animation: podsDescIn 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.pods-description[hidden] {
	display: none !important;
}

.pods-description__title {
	margin: 0 0 16px;
	font-size: 22px;
	font-weight: 700;
	line-height: 1.25;
	color: #1a1a1a;
}

.pods-description__text {
	font-size: 14px;
	line-height: 1.65;
	color: #555;
	margin-bottom: 20px;
}

.pods-description__text p {
	margin: 0 0 10px;
}

.pods-description__link {
	display: inline-block;
	font-size: 14px;
	font-weight: 600;
	color: #0073aa;
	text-decoration: none;
	transition: color 0.2s ease;
}

.pods-description__link:hover {
	color: #005177;
	text-decoration: underline;
}

@keyframes podsDescIn {
	from {
		opacity: 0;
		transform: translateX(20px);
	}
	to {
		opacity: 1;
		transform: translateX(0);
	}
}

/* ── Modal ── */
.pods-modal {
	display: none;
	position: fixed;
	inset: 0;
	z-index: 100000;
	align-items: center;
	justify-content: center;
}

.pods-modal--open {
	display: flex;
}

.pods-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.6);
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
	animation: podsModalFadeIn 0.25s ease;
}

.pods-modal__dialog {
	position: relative;
	background: #fff;
	border-radius: 12px;
	max-width: 800px;
	width: 90vw;
	max-height: 85vh;
	overflow: hidden;
	box-shadow: 0 24px 64px rgba(0, 0, 0, 0.25);
	animation: podsModalSlideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	display: flex;
	flex-direction: column;
}

.pods-modal__close {
	position: absolute;
	top: 12px;
	right: 12px;
	z-index: 2;
	width: 36px;
	height: 36px;
	border: none;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.06);
	color: #333;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.2s ease;
}

.pods-modal__close:hover {
	background: rgba(0, 0, 0, 0.12);
}

.pods-modal__body {
	display: flex;
	overflow-y: auto;
	max-height: 85vh;
}

.pods-modal__image {
	flex: 0 0 280px;
	min-height: 280px;
	overflow: hidden;
}

.pods-modal__image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.pods-modal__image .pod-card__placeholder {
	min-height: 280px;
}

.pods-modal__content {
	flex: 1;
	padding: 32px;
	overflow-y: auto;
}

.pods-modal__name {
	margin: 0 0 12px;
	font-size: 26px;
	font-weight: 700;
	line-height: 1.2;
	color: #1a1a1a;
}

.pods-modal__tags {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-bottom: 20px;
}

.pods-modal__tags .pod-tag {
	font-size: 13px;
	padding: 4px 12px;
}

.pods-modal__bio {
	font-size: 15px;
	line-height: 1.65;
	color: #444;
}

.pods-modal__bio p {
	margin: 0 0 12px;
}

/* Modal animations */
@keyframes podsModalFadeIn {
	from { opacity: 0; }
	to { opacity: 1; }
}

@keyframes podsModalSlideIn {
	from {
		opacity: 0;
		transform: translateY(20px) scale(0.97);
	}
	to {
		opacity: 1;
		transform: translateY(0) scale(1);
	}
}

/* ── Responsive ── */
@media (max-width: 1200px) {
	.pods-grid--cols-6 { grid-template-columns: repeat(4, 1fr); }
	.pods-grid--cols-5 { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 1024px) {
	.pods-grid--cols-4,
	.pods-grid--cols-5,
	.pods-grid--cols-6 { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
	.pods-grid--cols-3,
	.pods-grid--cols-4,
	.pods-grid--cols-5,
	.pods-grid--cols-6 { grid-template-columns: repeat(2, 1fr); }

	.pods-grid-layout {
		flex-direction: column;
	}

	.pods-description {
		flex: none;
		max-width: 100%;
		position: static;
		order: -1;
	}

	.pods-modal__body {
		flex-direction: column;
	}

	.pods-modal__image {
		flex: 0 0 auto;
		min-height: 200px;
		max-height: 250px;
	}

	.pods-modal__content {
		padding: 24px;
	}

	.pods-modal__name {
		font-size: 22px;
	}
}

@media (max-width: 480px) {
	.pods-grid--cols-2,
	.pods-grid--cols-3,
	.pods-grid--cols-4,
	.pods-grid--cols-5,
	.pods-grid--cols-6 { grid-template-columns: 1fr; }

	.pods-grid {
		gap: 16px;
	}

	.pods-filters {
		gap: 6px;
		margin-bottom: 24px;
	}

	.pods-filter {
		padding: 6px 14px;
		font-size: 13px;
	}

	.pods-modal__dialog {
		width: 95vw;
		max-height: 90vh;
	}

	.pods-modal__content {
		padding: 20px;
	}
}
