.ff-media {
	--ff-columns: 4;
	--ff-card-bg: #25494a;
	--ff-border: rgba( 255, 255, 255, 0.08 );
	--ff-accent: #99f36c;
	--ff-heading: #ffffff;
	--ff-text-muted: #d3d3d3;
	max-width: 1200px;
	margin: 0 auto;
	padding: 48px 20px;
	text-align: center;
}

.ff-media .ff-media__header {
	margin: 0 0 28px;
}

.ff-media .ff-media__title {
	margin: 0 0 12px;
	color: var( --ff-heading );
	font-size: 28px;
	font-weight: 600;
	line-height: 1.3;
}

.ff-media .ff-media__description {
	margin: 0 auto;
	max-width: 620px;
	color: var( --ff-text-muted );
	font-size: 15px;
	line-height: 1.6;
}

.ff-media .ff-media__social {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 10px;
	margin: 0 0 28px;
}

.ff-media .ff-media__social-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	border-radius: 50%;
	border: 1px solid var( --ff-border );
	color: var( --ff-text-muted );
	transition: border-color 0.15s ease, color 0.15s ease;
}

.ff-media .ff-media__social-link:hover {
	border-color: var( --ff-accent );
	color: var( --ff-accent );
}

.ff-media .ff-media__filters {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px;
	margin: 0 0 32px;
}

.ff-media .ff-media__filter {
	border: 1px solid var( --ff-border );
	background: transparent;
	color: var( --ff-text-muted );
	padding: 7px 16px;
	border-radius: 6px;
	cursor: pointer;
	font-size: 13px;
	letter-spacing: 0.02em;
	transition: border-color 0.15s ease, color 0.15s ease;
}

.ff-media .ff-media__filter:hover {
	border-color: var( --ff-accent );
	color: var( --ff-heading );
}

.ff-media .ff-media__filter.is-active {
	border-color: var( --ff-accent );
	color: var( --ff-accent );
}

.ff-media .ff-media__gallery {
	display: grid;
	grid-template-columns: repeat( var( --ff-columns ), 1fr );
	gap: 16px;
	margin: 0 0 32px;
	text-align: left;
}

.ff-media .ff-media__empty {
	grid-column: 1 / -1;
	text-align: center;
	color: var( --ff-text-muted );
}

.ff-media .ff-media__card {
	background: var( --ff-card-bg );
	border: 1px solid var( --ff-border );
	border-radius: 8px;
	overflow: hidden;
	display: flex;
	flex-direction: column;
}

.ff-media .ff-media__image-link,
.ff-media .ff-media__video {
	display: block;
	position: relative;
	cursor: pointer;
	aspect-ratio: 4 / 3;
	overflow: hidden;
}

.ff-media .ff-media__image-link img,
.ff-media .ff-media__video img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	margin: 0;
}

.ff-media .ff-media__play {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 44px;
	height: 44px;
	margin: -22px 0 0 -22px;
	border-radius: 50%;
	background: rgba( 0, 0, 0, 0.45 );
	border: 1px solid rgba( 255, 255, 255, 0.6 );
}

.ff-media .ff-media__play::after {
	content: '';
	position: absolute;
	top: 50%;
	left: 56%;
	width: 0;
	height: 0;
	transform: translate( -50%, -50% );
	border-style: solid;
	border-width: 7px 0 7px 12px;
	border-color: transparent transparent transparent #fff;
}

.ff-media .ff-media__caption {
	margin: 0;
	padding: 10px 12px;
	font-size: 13px;
	line-height: 1.4;
	color: var( --ff-text-muted );
}

@media ( max-width: 480px ) {
	.ff-media .ff-media__caption {
		padding: 6px 8px;
		font-size: 11px;
		white-space: nowrap;
		overflow: hidden;
		text-overflow: ellipsis;
	}
}

.ff-media .ff-media__load-more-wrap {
	text-align: center;
	margin: 0;
}

.ff-media .ff-media__load-more {
	background: transparent;
	border: 1px solid var( --ff-border );
	color: var( --ff-text-muted );
	padding: 9px 24px;
	border-radius: 6px;
	cursor: pointer;
	font-size: 13px;
	transition: border-color 0.15s ease, color 0.15s ease;
}

.ff-media .ff-media__load-more:hover:not( :disabled ) {
	border-color: var( --ff-accent );
	color: var( --ff-accent );
}

.ff-media .ff-media__load-more:disabled {
	opacity: 0.5;
	cursor: default;
}

.ff-media__overlay {
	position: fixed;
	inset: 0;
	background: rgba( 10, 20, 20, 0.92 );
	display: none;
	align-items: center;
	justify-content: center;
	z-index: 100000;
	padding: 30px;
}

.ff-media__overlay.is-open {
	display: flex;
}

.ff-media__overlay-content {
	max-width: min( 90vw, 1000px );
	max-height: 85vh;
}

.ff-media__overlay-content img,
.ff-media__overlay-content video {
	max-width: 100%;
	max-height: 85vh;
	display: block;
	margin: 0;
	border-radius: 4px;
}

.ff-media__overlay-content iframe {
	width: min( 90vw, 960px );
	height: min( 70vh, 540px );
	border-radius: 4px;
}

.ff-media__overlay-close {
	position: absolute;
	top: 20px;
	right: 24px;
	background: none;
	border: none;
	color: #fff;
	font-size: 28px;
	line-height: 1;
	cursor: pointer;
	opacity: 0.8;
}

.ff-media__overlay-close:hover {
	opacity: 1;
}

.ff-media__overlay-prev,
.ff-media__overlay-next {
	position: absolute;
	top: 50%;
	transform: translateY( -50% );
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: rgba( 255, 255, 255, 0.08 );
	border: 1px solid rgba( 255, 255, 255, 0.2 );
	color: #fff;
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
	opacity: 0.85;
	transition: opacity 0.15s ease, border-color 0.15s ease;
}

.ff-media__overlay-prev:hover,
.ff-media__overlay-next:hover {
	opacity: 1;
	border-color: rgba( 255, 255, 255, 0.5 );
}

.ff-media__overlay-prev {
	left: 16px;
}

.ff-media__overlay-next {
	right: 16px;
}

@media ( max-width: 640px ) {
	.ff-media__overlay-prev,
	.ff-media__overlay-next {
		width: 36px;
		height: 36px;
		font-size: 18px;
	}

	.ff-media__overlay-prev {
		left: 8px;
	}

	.ff-media__overlay-next {
		right: 8px;
	}
}

body.ff-media-lock-scroll {
	overflow: hidden;
}
