/**
 * Motion Media Portfolio — Frontend Gallery Styles
 */

.mmp-portfolio-gallery {
	width: 100%;
	margin: 0 auto;
}

.mmp-portfolio-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 24px;
	align-items: stretch;
}

@media (max-width: 1024px) {
	.mmp-portfolio-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 640px) {
	.mmp-portfolio-grid {
		grid-template-columns: 1fr;
		gap: 20px;
	}
}

.mmp-portfolio-item {
	display: flex;
	min-width: 0;
}

.mmp-portfolio-trigger {
	all: unset;
	display: flex;
	flex-direction: column;
	width: 100%;
	cursor: pointer;
	box-sizing: border-box;
}

.mmp-portfolio-trigger:focus-visible {
	outline: 2px solid #2563eb;
	outline-offset: 4px;
	border-radius: 30px;
}

.mmp-portfolio-media {
	position: relative;
	width: 100%;
	aspect-ratio: 4 / 3;
	border-radius: 30px;
	overflow: hidden;
	background: #111827;
}

.mmp-portfolio-thumb {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 30px;
}

.mmp-portfolio-play {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(17, 24, 39, 0.28);
	color: #fff;
	pointer-events: none;
}

.mmp-portfolio-title {
	margin: 14px 6px 0;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.4;
	color: inherit;
	text-align: center;
}

/* Fullscreen Lightbox */
.mmp-lightbox {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
}

.mmp-lightbox[hidden] {
	display: none !important;
}

.mmp-lightbox-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.92);
}

.mmp-lightbox-panel {
	position: relative;
	z-index: 1;
	width: min(1200px, 100%);
	max-height: calc(100vh - 48px);
	display: flex;
	flex-direction: column;
	align-items: stretch;
}

.mmp-lightbox-back {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	align-self: flex-start;
	margin-bottom: 16px;
	padding: 10px 16px;
	border: none;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.12);
	color: #fff;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.2s ease;
}

.mmp-lightbox-back:hover,
.mmp-lightbox-back:focus-visible {
	background: rgba(255, 255, 255, 0.2);
	outline: none;
}

.mmp-lightbox-content {
	display: flex;
	align-items: center;
	justify-content: center;
	flex: 1;
	min-height: 0;
}

.mmp-lightbox-image,
.mmp-lightbox-video {
	display: block;
	max-width: 100%;
	max-height: calc(100vh - 160px);
	width: auto;
	height: auto;
	border-radius: 30px;
	object-fit: contain;
	background: #000;
}

.mmp-lightbox-video {
	width: 100%;
}

.mmp-lightbox-caption {
	margin: 16px 0 0;
	text-align: center;
	color: #f3f4f6;
	font-size: 18px;
	font-weight: 600;
}

body.mmp-lightbox-open {
	overflow: hidden;
}

/* Homepage Tabbed Portfolio */
.mmp-home-portfolio {
	width: 100%;
	margin: 0 auto;
	padding: 0 20px;
	box-sizing: border-box;
}

.mmp-home-inner {
	width: 100%;
	max-width: 1180px;
	margin: 0 auto;
	display: flex;
	flex-direction: column;
	align-items: center;
}

.mmp-home-tabs-wrap {
	width: 100%;
	display: flex;
	justify-content: center;
	margin-bottom: 40px;
}

.mmp-home-tabs {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-wrap: wrap;
	gap: 12px 56px;
	max-width: 100%;
	padding: 16px 36px;
	background: linear-gradient(180deg, #0b1a30 0%, #071222 100%);
	border-radius: 18px;
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}

.mmp-home-tab {
	all: unset;
	box-sizing: border-box;
	appearance: none;
	-webkit-appearance: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	border: none;
	background: transparent;
	color: #ffffff !important;
	font-family: inherit;
	font-size: 18px;
	font-weight: 700;
	line-height: 1;
	padding: 12px 26px;
	border-radius: 12px;
	transition: background 0.3s ease, color 0.3s ease, box-shadow 0.3s ease, transform 0.2s ease;
	white-space: nowrap;
	text-decoration: none;
}

.mmp-home-tab-text {
	display: inline-flex;
	align-items: baseline;
	gap: 6px;
}

.mmp-home-tab:hover,
.mmp-home-tab:focus-visible {
	outline: none;
	color: #ffffff;
	transform: translateY(-1px);
}

.mmp-home-tab:not(.is-active):hover {
	opacity: 0.85;
}

.mmp-home-tab.is-active {
	background: #00adf7 !important;
	color: #ffffff !important;
	box-shadow: 0 6px 22px rgba(0, 173, 247, 0.45);
	transform: none;
}

.mmp-home-tab-index {
	font-weight: 700;
}

.mmp-home-tab-label {
	font-weight: 700;
}

.mmp-home-panels {
	width: 100%;
	display: flex;
	justify-content: center;
}

.mmp-home-panel {
	display: none;
	width: 100%;
	animation: mmpFadeIn 0.4s ease;
}

.mmp-home-panel.is-active {
	display: block;
}

.mmp-home-panel[hidden] {
	display: none !important;
}

.mmp-home-gallery {
	width: 100%;
	max-width: 1080px;
	margin: 0 auto;
}

.mmp-home-portfolio .mmp-portfolio-grid {
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 28px;
	justify-items: center;
}

.mmp-home-portfolio .mmp-portfolio-item {
	width: 100%;
	max-width: 340px;
}

.mmp-home-portfolio .mmp-portfolio-trigger {
	transition: transform 0.3s ease;
}

.mmp-home-portfolio .mmp-portfolio-trigger:hover {
	transform: translateY(-4px);
}

.mmp-home-portfolio .mmp-portfolio-media {
	box-shadow: 0 8px 28px rgba(0, 0, 0, 0.18);
	transition: box-shadow 0.3s ease;
}

.mmp-home-portfolio .mmp-portfolio-trigger:hover .mmp-portfolio-media {
	box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
}

.mmp-home-portfolio .mmp-portfolio-title {
	margin-top: 16px;
	font-size: 15px;
	font-weight: 600;
	text-align: center;
	color: #1f2937;
	letter-spacing: 0.01em;
}

.mmp-home-empty-wrap {
	width: 100%;
	display: flex;
	justify-content: center;
}

.mmp-home-empty {
	text-align: center;
	color: #9ca3af;
	font-size: 16px;
	font-weight: 500;
	padding: 48px 24px;
	margin: 0;
	background: #f9fafb;
	border-radius: 20px;
	max-width: 480px;
	width: 100%;
}

@keyframes mmpFadeIn {
	from {
		opacity: 0;
		transform: translateY(12px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@media (max-width: 1024px) {
	.mmp-home-portfolio .mmp-portfolio-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 24px;
	}

	.mmp-home-portfolio .mmp-portfolio-item {
		max-width: 100%;
	}

	.mmp-home-tabs {
		gap: 10px 36px;
		padding: 14px 28px;
	}

	.mmp-home-tab {
		font-size: 17px;
		padding: 11px 22px;
	}
}

@media (max-width: 768px) {
	.mmp-home-portfolio {
		padding: 0 16px;
	}

	.mmp-home-tabs-wrap {
		margin-bottom: 28px;
		overflow-x: auto;
		justify-content: flex-start;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: none;
		padding-bottom: 4px;
	}

	.mmp-home-tabs-wrap::-webkit-scrollbar {
		display: none;
	}

	.mmp-home-tabs {
		flex-wrap: nowrap;
		justify-content: center;
		min-width: min-content;
		gap: 32px;
		padding: 14px 24px;
		margin: 0 auto;
	}

	.mmp-home-tab {
		font-size: 16px;
		padding: 10px 20px;
		flex-shrink: 0;
	}

	.mmp-home-portfolio .mmp-portfolio-grid {
		gap: 20px;
	}
}

@media (max-width: 640px) {
	.mmp-home-portfolio .mmp-portfolio-grid {
		grid-template-columns: 1fr;
		max-width: 360px;
		margin: 0 auto;
	}

	.mmp-home-tabs {
		gap: 24px;
		padding: 12px 20px;
		border-radius: 14px;
	}

	.mmp-home-tab {
		font-size: 15px;
		padding: 9px 18px;
		border-radius: 10px;
	}
}

@media (max-width: 480px) {
	.mmp-home-tabs {
		gap: 20px;
	}
}
