/* ==========================================================================
   Hana Card Video Gallery — Styles
   Version: 1.0.0
   ========================================================================== */

:root {
	--hana-cvg-columns: 3;
	--hana-cvg-transition-smooth: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
	--hana-cvg-transition-fast: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.hana-cvg-wrapper {
	position: relative;
	width: 100%;
	font-family: 'Inter', sans-serif;
	box-sizing: border-box;
}

/* ─── Header: Title & Filters Side by Side ─── */
.hana-cvg-header {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: center;
	gap: 20px;
	margin-bottom: 40px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.08);
	padding-bottom: 24px;
}

.hana-cvg-heading {
	font-family: 'Playfair Display', serif;
	font-size: 28px;
	font-weight: 600;
	color: #c8a06e;
	margin: 0;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

/* ─── Filter Tabs (Outlined Gold / Filled Active) ─── */
.hana-cvg-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
}

.hana-cvg-tab {
	display: inline-flex;
	align-items: center;
	padding: 10px 24px;
	border: 1px solid #c8a06e;
	border-radius: 4px;
	background-color: transparent;
	color: #ffffff;
	font-family: inherit;
	font-size: 13px;
	font-weight: 500;
	letter-spacing: 0.03em;
	cursor: pointer;
	transition: var(--hana-cvg-transition-smooth);
	outline: none;
}

.hana-cvg-tab:hover {
	background-color: rgba(200, 160, 110, 0.15);
	transform: translateY(-2px);
}

.hana-cvg-tab.active {
	background-color: #c8a06e;
	color: #07070a;
	box-shadow: 0 4px 15px rgba(200, 160, 110, 0.25);
}

/* ─── Grid ─── */
.hana-cvg-grid {
	display: grid;
	grid-template-columns: repeat(var(--hana-cvg-columns, 3), 1fr);
	gap: 24px;
}

/* ─── Video Gallery Card Item ─── */
.hana-cvg-item {
	position: relative;
	background-color: #f4f1ea; /* Creamy card background as in the image */
	border-radius: 14px;
	overflow: hidden;
	cursor: pointer;
	display: flex;
	flex-direction: column;
	transition: var(--hana-cvg-transition-smooth);
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.hana-cvg-item:hover {
	transform: translateY(-8px);
	box-shadow: 0 16px 35px rgba(0, 0, 0, 0.35);
}

/* Filter Tab animations */
.hana-cvg-item.hana-cvg-hidden {
	opacity: 0;
	transform: scale(0.9);
	pointer-events: none;
	position: absolute;
	visibility: hidden;
}

.hana-cvg-item.hana-cvg-visible {
	opacity: 1;
	transform: scale(1);
	transition: opacity 0.4s ease, transform 0.4s ease;
}

/* ─── Card Thumbnail Area ─── */
.hana-cvg-thumb-wrapper {
	position: relative;
	width: 100%;
	padding-top: 56.25%; /* 16:9 ratio */
	overflow: hidden;
	background-color: #000000;
}

.hana-cvg-thumb-wrapper img {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.hana-cvg-item:hover .hana-cvg-thumb-wrapper img {
	transform: scale(1.08);
}

/* Placeholder thumb */
.hana-cvg-placeholder {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: linear-gradient(135deg, #16213e 0%, #0f3460 100%);
}

/* Dark Overlay */
.hana-cvg-overlay {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, 0.3);
	display: flex;
	align-items: center;
	justify-content: center;
	transition: var(--hana-cvg-transition-smooth);
}

.hana-cvg-item:hover .hana-cvg-overlay {
	background-color: rgba(0, 0, 0, 0.55);
}

/* ─── Circular Dark Play Button ─── */
.hana-cvg-play {
	width: 54px;
	height: 54px;
	border-radius: 50%;
	background-color: #07070a;
	border: 2px solid #ffffff;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: var(--hana-cvg-transition-smooth);
	cursor: pointer;
	box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

.hana-cvg-play svg {
	width: 22px;
	height: 22px;
	fill: #ffffff;
	margin-left: 2px; /* optical centering */
	transition: var(--hana-cvg-transition-fast);
}

/* Play button hover response */
.hana-cvg-item:hover .hana-cvg-play {
	transform: scale(1.15);
	background-color: #c8a06e;
	border-color: #ffffff;
	box-shadow: 0 4px 20px rgba(200, 160, 110, 0.4);
}

.hana-cvg-item:hover .hana-cvg-play svg {
	fill: #07070a;
	transform: scale(1.05);
}

/* ─── Card Info Block ─── */
.hana-cvg-info {
	background-color: #f4f1ea; /* Light cream base as shown in the mockup */
	padding: 16px 20px 20px;
	display: flex;
	flex-direction: column;
	flex-grow: 1;
}

.hana-cvg-title {
	font-size: 15px;
	font-weight: 700;
	color: #07070a;
	margin: 0 0 6px 0;
	line-height: 1.35;
}

.hana-cvg-subtitle {
	font-size: 13px;
	font-weight: 400;
	color: #5a5a5a;
	margin: 0;
	line-height: 1.4;
}

/* ─── Popup Lightbox ─── */
.hana-cvg-popup {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.35s ease, visibility 0.35s ease;
}

.hana-cvg-popup.active {
	opacity: 1;
	visibility: visible;
}

.hana-cvg-popup-backdrop {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: var(--popup-overlay, rgba(7, 7, 10, 0.9));
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
}

.hana-cvg-popup-inner {
	position: relative;
	width: 90%;
	max-width: 900px;
	z-index: 2;
}

/* Popup animations */
.hana-cvg-popup[data-animation="zoom"] .hana-cvg-popup-inner {
	transform: scale(0.85);
	transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.hana-cvg-popup.active[data-animation="zoom"] .hana-cvg-popup-inner {
	transform: scale(1);
}

.hana-cvg-popup[data-animation="fade"] .hana-cvg-popup-inner {
	opacity: 0;
	transition: opacity 0.35s ease;
}
.hana-cvg-popup.active[data-animation="fade"] .hana-cvg-popup-inner {
	opacity: 1;
}

/* Close Button */
.hana-cvg-popup-close {
	position: absolute;
	top: -46px;
	right: 0;
	width: 38px;
	height: 38px;
	border: none;
	background-color: rgba(255, 255, 255, 0.1);
	border-radius: 50%;
	color: #ffffff;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: var(--hana-cvg-transition-smooth);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
}

.hana-cvg-popup-close svg {
	width: 16px;
	height: 16px;
}

.hana-cvg-popup-close:hover {
	background-color: rgba(255, 255, 255, 0.25);
	transform: rotate(90deg);
}

/* Video Wrapper */
.hana-cvg-popup-video {
	position: relative;
	width: 100%;
	padding-top: 56.25%;
	background-color: #000000;
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6);
}

.hana-cvg-popup-video iframe {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	border: none;
}

/* Title on popup bottom */
.hana-cvg-popup-title {
	margin: 16px 0 0 0;
	text-align: center;
	font-size: 16px;
	font-weight: 500;
	color: #ffffff;
	opacity: 0.9;
}

/* Body lock */
body.hana-cvg-popup-open {
	overflow: hidden;
}

/* ─── Responsive Styles ─── */
@media (max-width: 1024px) {
	.hana-cvg-grid {
		--hana-cvg-columns: 2;
	}
}

@media (max-width: 767px) {
	.hana-cvg-grid {
		--hana-cvg-columns: 1;
	}

	.hana-cvg-header {
		flex-direction: column;
		align-items: flex-start;
		gap: 16px;
	}

	.hana-cvg-tabs {
		width: 100%;
	}

	.hana-cvg-tab {
		flex-grow: 1;
		justify-content: center;
		padding: 8px 16px;
		font-size: 12px;
	}

	.hana-cvg-heading {
		font-size: 24px;
	}

	.hana-cvg-play {
		width: 46px;
		height: 46px;
	}

	.hana-cvg-play svg {
		width: 18px;
		height: 18px;
	}
}

/* ─── Accessibility: Reduced Motion ─── */
@media (prefers-reduced-motion: reduce) {
	.hana-cvg-item,
	.hana-cvg-thumb-wrapper img,
	.hana-cvg-play,
	.hana-cvg-overlay,
	.hana-cvg-popup,
	.hana-cvg-popup-inner,
	.hana-cvg-popup-close {
		transition-duration: 0.01ms !important;
		animation-duration: 0.01ms !important;
	}
}
