/* REMI Video Gallery - Premium Front-End Styles */

.remi-gallery-wrapper {
	--remi-navy: #123A5C;
	--remi-navy-deep: #0C2A42;
	--remi-red: #D02A53;
	--remi-red-deep: #A31F41;
	--remi-light-bg: #F5F8FA;
	--remi-line: #E2E8EE;
	--remi-slate: #5B6B7A;
	--remi-shadow: 0 8px 24px rgba(18, 58, 92, 0.06);
	--remi-shadow-hover: 0 16px 36px rgba(18, 58, 92, 0.14);
	--remi-radius-card: 14px;
	--remi-radius-pill: 30px;
	--remi-transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);

	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
	margin: 20px 0;
	width: 100%;
}

/* Category Filter Tabs */
.remi-gallery-wrapper .remi-filter-bar {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 10px;
	margin: 0 0 35px 0;
	padding: 0;
	list-style: none;
}

.remi-gallery-wrapper .remi-filter-btn {
	background-color: var(--remi-light-bg) !important;
	border: 1px solid var(--remi-line) !important;
	color: var(--remi-navy) !important;
	font-size: 14px !important;
	font-weight: 600 !important;
	padding: 10px 22px !important;
	border-radius: var(--remi-radius-pill) !important;
	cursor: pointer !important;
	transition: var(--remi-transition) !important;
	outline: none !important;
	box-shadow: none !important;
	text-transform: none !important;
	letter-spacing: normal !important;
}

.remi-gallery-wrapper .remi-filter-btn:hover {
	background-color: var(--remi-navy) !important;
	border-color: var(--remi-navy) !important;
	color: #ffffff !important;
}

.remi-gallery-wrapper .remi-filter-btn:focus-visible {
	outline: 2px solid var(--remi-red) !important;
	outline-offset: 2px !important;
}

.remi-gallery-wrapper .remi-filter-btn.is-active {
	background-color: var(--remi-red) !important;
	border-color: var(--remi-red) !important;
	color: #ffffff !important;
	box-shadow: 0 4px 12px rgba(208, 42, 83, 0.25) !important;
}

/* Responsive Card Grid */
.remi-gallery-wrapper .remi-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 30px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.remi-gallery-wrapper .remi-grid.remi-cols-1 { grid-template-columns: 1fr; }
.remi-gallery-wrapper .remi-grid.remi-cols-2 { grid-template-columns: repeat(2, 1fr); }
.remi-gallery-wrapper .remi-grid.remi-cols-3 { grid-template-columns: repeat(3, 1fr); }
.remi-gallery-wrapper .remi-grid.remi-cols-4 { grid-template-columns: repeat(4, 1fr); }

/* Responsive adjustments */
@media (max-width: 1024px) {
	.remi-gallery-wrapper .remi-grid.remi-cols-3,
	.remi-gallery-wrapper .remi-grid.remi-cols-4 {
		grid-template-columns: repeat(2, 1fr);
		gap: 24px;
	}
}

@media (max-width: 640px) {
	.remi-gallery-wrapper .remi-grid.remi-cols-2,
	.remi-gallery-wrapper .remi-grid.remi-cols-3,
	.remi-gallery-wrapper .remi-grid.remi-cols-4 {
		grid-template-columns: 1fr;
		gap: 20px;
	}
	.remi-gallery-wrapper .remi-filter-bar {
		margin-bottom: 25px;
	}
}

/* Card Styling */
.remi-gallery-wrapper .remi-card {
	display: flex !important;
	flex-direction: column;
	background-color: #ffffff !important;
	border: 1px solid rgba(18, 58, 92, 0.08) !important;
	border-radius: var(--remi-radius-card) !important;
	overflow: hidden;
	cursor: pointer;
	padding: 0;
	text-align: left;
	font: inherit;
	color: inherit;
	transition: background-color 0.3s ease, border-color 0.3s ease, transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.3s ease !important;
	box-shadow: var(--remi-shadow);
	position: relative;
	text-decoration: none;
}

/* Base state for JS filtering */
.remi-gallery-wrapper .remi-card {
	display: none !important;
}

.remi-gallery-wrapper .remi-card.remi-show {
	display: flex !important;
}

/* Hover State - Navy Blue Background and White Text */
.remi-gallery-wrapper .remi-card:hover,
.remi-gallery-wrapper .remi-card:focus-visible {
	background-color: var(--remi-navy) !important;
	border-color: var(--remi-navy) !important;
	transform: translateY(-6px);
	box-shadow: var(--remi-shadow-hover);
	outline: none;
}

/* Card Thumbnail Overlay */
.remi-gallery-wrapper .remi-thumb-wrap {
	position: relative;
	display: block;
	width: 100%;
	aspect-ratio: 16 / 9;
	background: linear-gradient(135deg, var(--remi-navy) 0%, #1c486d 60%, var(--remi-red-deep) 130%);
	overflow: hidden;
}

.remi-gallery-wrapper .remi-thumb {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.remi-gallery-wrapper .remi-card:hover .remi-thumb {
	transform: scale(1.06);
}

.remi-gallery-wrapper .remi-play-icon {
	position: absolute;
	inset: 0;
	margin: auto;
	width: 56px;
	height: 56px;
	border-radius: 50%;
	background: rgba(18, 58, 92, 0.75) !important;
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
	display: flex;
	align-items: center;
	justify-content: center;
	transition: var(--remi-transition);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.remi-gallery-wrapper .remi-play-icon svg {
	width: 20px;
	height: 20px;
	fill: #ffffff;
	margin-left: 3px;
	transition: var(--remi-transition);
}

/* Play Icon Overlay Hover State */
.remi-gallery-wrapper .remi-card:hover .remi-play-icon,
.remi-gallery-wrapper .remi-card:focus-visible .remi-play-icon {
	background: var(--remi-red) !important;
	transform: scale(1.12);
	box-shadow: 0 6px 18px rgba(208, 42, 83, 0.4);
}

/* Card Details (Title & Description) */
.remi-gallery-wrapper .remi-card-details {
	padding: 20px;
	display: flex;
	flex-direction: column;
	flex-grow: 1;
}

.remi-gallery-wrapper .remi-title {
	font-size: 17px !important;
	font-weight: 700 !important;
	line-height: 1.4 !important;
	color: var(--remi-navy) !important;
	margin: 0 0 8px 0 !important;
	transition: color 0.3s ease !important;
}

.remi-gallery-wrapper .remi-card:hover .remi-title,
.remi-gallery-wrapper .remi-card:focus-visible .remi-title {
	color: #ffffff !important;
}

.remi-gallery-wrapper .remi-description {
	font-size: 14px !important;
	line-height: 1.55 !important;
	color: var(--remi-slate) !important;
	margin: 0 !important;
	overflow: hidden;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	transition: color 0.3s ease !important;
}

.remi-gallery-wrapper .remi-card:hover .remi-description,
.remi-gallery-wrapper .remi-card:focus-visible .remi-description {
	color: rgba(255, 255, 255, 0.85) !important;
}

/* Category Badge inside Details */
.remi-gallery-wrapper .remi-card-badge {
	align-self: flex-start;
	font-size: 11px !important;
	text-transform: uppercase !important;
	letter-spacing: 0.05em !important;
	font-weight: 700 !important;
	color: var(--remi-red) !important;
	margin-bottom: 8px !important;
	transition: color 0.3s ease !important;
}

.remi-gallery-wrapper .remi-card:hover .remi-card-badge,
.remi-gallery-wrapper .remi-card:focus-visible .remi-card-badge {
	color: #ffffff !important;
}

/* Load More Section */
.remi-gallery-wrapper .remi-load-more-wrap {
	display: flex;
	justify-content: center;
	margin-top: 40px;
	width: 100%;
}

.remi-gallery-wrapper .remi-load-more-wrap.is-hidden {
	display: none;
}

.remi-gallery-wrapper .remi-load-more-btn {
	background-color: var(--remi-navy) !important;
	border: 1px solid var(--remi-navy) !important;
	color: #ffffff !important;
	font-size: 15px !important;
	font-weight: 600 !important;
	padding: 12px 28px !important;
	border-radius: var(--remi-radius-pill) !important;
	cursor: pointer;
	transition: var(--remi-transition);
	box-shadow: 0 4px 14px rgba(18, 58, 92, 0.15);
	display: flex;
	align-items: center;
	gap: 8px;
}

.remi-gallery-wrapper .remi-load-more-btn:hover {
	background-color: var(--remi-red) !important;
	border-color: var(--remi-red) !important;
	box-shadow: 0 6px 20px rgba(208, 42, 83, 0.25);
}

.remi-gallery-wrapper .remi-load-more-btn:focus-visible {
	outline: 2px solid var(--remi-red) !important;
	outline-offset: 2px;
}

.remi-gallery-wrapper .remi-empty-message {
	text-align: center;
	color: var(--remi-slate);
	font-style: italic;
	padding: 40px 0;
	grid-column: 1 / -1;
	width: 100%;
}

/* Lightbox Modal */
.remi-modal {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 20px;
}

.remi-modal.is-open {
	display: flex;
}

.remi-modal-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(9, 24, 38, 0.9);
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
	transition: opacity 0.3s ease;
}

.remi-modal-inner {
	position: relative;
	width: 100%;
	max-width: 960px;
	z-index: 2;
	transform: scale(0.95);
	opacity: 0;
	transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), opacity 0.3s ease;
}

.remi-modal.is-open .remi-modal-inner {
	transform: scale(1);
	opacity: 1;
}

.remi-modal-frame {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
	background: #000000;
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
	border: 1px solid rgba(255, 255, 255, 0.1);
}

.remi-modal-frame iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

.remi-modal-close {
	position: absolute;
	top: -48px;
	right: 0;
	width: 38px;
	height: 38px;
	border-radius: 50%;
	border: none;
	background: rgba(255, 255, 255, 0.15);
	color: #ffffff;
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: var(--remi-transition);
	outline: none;
}

.remi-modal-close:hover {
	background: rgba(255, 255, 255, 0.3);
	transform: rotate(90deg);
}

.remi-modal-close:focus-visible {
	outline: 2px solid var(--remi-red);
	background: rgba(255, 255, 255, 0.3);
}

@media (max-width: 640px) {
	.remi-modal {
		padding: 10px;
	}
	.remi-modal-close {
		top: -42px;
		width: 32px;
		height: 32px;
		font-size: 20px;
	}
}
