/* Divonex video blocks: featured player, gallery grid, pop-up player, single video player. */

.dx-vg { --dx-v-radius: 20px; }
.dx-vg > * + * { margin-top: 36px; }

/* Player (featured + single) */
.dx-vplayer {
	position: relative;
	aspect-ratio: 16 / 9;
	border-radius: var(--dx-v-radius, 20px);
	overflow: hidden;
	background: #0b0f1c;
	box-shadow: 0 40px 80px -40px rgba(26, 43, 110, 0.55);
}
.dx-vplayer iframe,
.dx-vmodal__frame iframe { display: block; width: 100%; height: 100%; border: 0; }
.dx-vplayer__poster,
.dx-vcard__thumb {
	position: relative;
	display: block;
	width: 100%;
	height: 100%;
	padding: 0;
	border: 0;
	background: #0b0f1c;
	cursor: pointer;
	overflow: hidden;
}
.dx-vplayer__poster img,
.dx-vcard__thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.3s;
}
.dx-vplayer__poster::after,
.dx-vcard__thumb::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, transparent 50%, rgba(11, 15, 28, 0.55));
	pointer-events: none;
}
.dx-vplayer__poster:hover img,
.dx-vcard__thumb:hover img { transform: scale(1.04); }
.dx-vplay-icon {
	position: absolute;
	top: 50%;
	left: 50%;
	z-index: 1;
	display: grid;
	place-items: center;
	width: 76px;
	height: 76px;
	margin: -38px 0 0 -38px;
	padding-left: 4px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.95);
	color: #0b0f1c;
	box-shadow: 0 12px 40px rgba(11, 15, 28, 0.4), 0 0 0 10px rgba(255, 255, 255, 0.18);
	transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.2s, color 0.2s;
}
.dx-vplay-icon--sm { width: 54px; height: 54px; margin: -27px 0 0 -27px; box-shadow: 0 10px 30px rgba(11, 15, 28, 0.35), 0 0 0 6px rgba(255, 255, 255, 0.16); }
.dx-vplayer__poster:hover .dx-vplay-icon,
.dx-vcard__thumb:hover .dx-vplay-icon { transform: scale(1.1); background: #2b59ff; color: #fff; }
.dx-vplayer__poster:focus-visible,
.dx-vcard__thumb:focus-visible { outline: 3px solid #7a96ff; outline-offset: 3px; }
.dx-vdur {
	position: absolute;
	right: 12px;
	bottom: 12px;
	z-index: 1;
	padding: 3px 8px;
	border-radius: 6px;
	background: rgba(11, 15, 28, 0.82);
	color: #fff;
	font-size: 0.78rem;
	font-weight: 600;
	font-variant-numeric: tabular-nums;
}

/* Featured */
.dx-vg-featured {
	display: grid;
	grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
	gap: clamp(24px, 4vw, 48px);
	align-items: center;
}
.dx-vg-featured__body > * { margin: 0; }
.dx-vg-featured__body > * + * { margin-top: 14px; }
.dx-vg-eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 0.78rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: #2b59ff; }
.dx-vg-dot { width: 8px; height: 8px; border-radius: 50%; background: #ef4444; box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.5); animation: dx-vpulse 2s infinite; }
@keyframes dx-vpulse { 70% { box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); } 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); } }
.dx-vg-featured__title { font-size: clamp(1.5rem, 2.6vw, 2.1rem); line-height: 1.15; letter-spacing: -0.03em; font-weight: 700; }
.dx-vg-featured__title a { color: #0b0f1c; text-decoration: none; }
.dx-vg-featured__title a:hover { color: #2b59ff; }
.dx-vg-featured__excerpt { color: #4a5268; line-height: 1.65; }
.dx-vg-featured__links { display: flex; flex-wrap: wrap; gap: 18px; font-size: 0.93rem; font-weight: 600; }
.dx-vg-featured__links a { color: #2b59ff; text-decoration: none; }
.dx-vg-featured__links a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* Tags */
.dx-vmeta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; }
.dx-vtag { padding: 3px 9px; border-radius: 999px; background: #eef2fd; color: #2b59ff; font-size: 0.74rem; font-weight: 600; }
.dx-vtag--level { background: #f1f4fb; color: #4a5268; }
.dx-vtag--time { background: #f1f4fb; color: #4a5268; font-variant-numeric: tabular-nums; }

/* Toolbar */
.dx-vg-toolbar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	padding: 8px;
	border: 1px solid #e6eaf3;
	border-radius: 16px;
	background: #fff;
	box-shadow: 0 1px 2px rgba(11, 15, 28, 0.04), 0 10px 30px -18px rgba(26, 43, 110, 0.3);
}
.dx-vg-filters { display: flex; flex-wrap: wrap; gap: 4px; }
.dx-vg-filter {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 8px 14px;
	border: 0;
	border-radius: 10px;
	background: transparent;
	color: #4a5268;
	font: inherit;
	font-size: 0.9rem;
	font-weight: 600;
	cursor: pointer;
	transition: background-color 0.2s, color 0.2s;
}
.dx-vg-filter span { padding: 1px 7px; border-radius: 999px; background: #f1f4fb; color: #8a93a8; font-size: 0.74rem; }
.dx-vg-filter:hover { background: #f4f6fc; color: #0b0f1c; }
.dx-vg-filter.is-active { background: #0b0f1c; color: #fff; }
.dx-vg-filter.is-active span { background: rgba(255, 255, 255, 0.16); color: #fff; }
.dx-vg-filter:focus-visible { outline: 2px solid #2b59ff; outline-offset: 2px; }
.dx-vg-search {
	display: flex;
	align-items: center;
	gap: 8px;
	min-width: min(100%, 260px);
	padding: 0 12px;
	border: 1px solid #e6eaf3;
	border-radius: 11px;
	background: #f8f9fd;
	color: #8a93a8;
	transition: border-color 0.2s, box-shadow 0.2s;
}
.dx-vg-search:focus-within { border-color: #2b59ff; box-shadow: 0 0 0 3px rgba(43, 89, 255, 0.15); }
.dx-vg-search input { flex: 1; min-width: 0; padding: 10px 0; border: 0; background: transparent; color: #0b0f1c; font: inherit; font-size: 0.92rem; outline: none; }

/* Grid */
.dx-vg-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
	gap: 24px;
	margin: 0;
	padding: 0;
	list-style: none;
}
/* Space between the topic filters and the grid (the grid's margin reset would otherwise remove it). */
.dx-vg .dx-vg-toolbar + .dx-vg-grid { margin-top: 28px; }
.dx-vcard {
	display: flex;
	flex-direction: column;
	border: 1px solid #e6eaf3;
	border-radius: var(--dx-v-radius, 20px);
	background: #fff;
	overflow: hidden;
	box-shadow: 0 1px 2px rgba(11, 15, 28, 0.04), 0 20px 40px -32px rgba(26, 43, 110, 0.35);
	transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s, border-color 0.35s;
	animation: dx-vcard-in 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.dx-vcard[hidden] { display: none; }
.dx-vcard:hover { transform: translateY(-4px); border-color: #d4dcf0; box-shadow: 0 1px 2px rgba(11, 15, 28, 0.04), 0 36px 60px -34px rgba(26, 43, 110, 0.5); }
@keyframes dx-vcard-in { from { opacity: 0; transform: translateY(10px); } }
.dx-vcard__thumb { aspect-ratio: 16 / 9; height: auto; }
.dx-vcard__body { display: flex; flex-direction: column; gap: 10px; padding: 18px 20px 22px; }
.dx-vcard__title { margin: 0; font-size: 1.08rem; line-height: 1.35; letter-spacing: -0.01em; font-weight: 700; }
.dx-vcard__title a { color: #0b0f1c; text-decoration: none; }
.dx-vcard__title a:hover { color: #2b59ff; }
.dx-vcard__excerpt { margin: 0; color: #4a5268; font-size: 0.92rem; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.dx-vg-none { padding: 40px; border: 1px dashed #d4dcf0; border-radius: 16px; text-align: center; color: #8a93a8; }
.dx-vg-empty-admin { padding: 20px; border: 1px dashed #c3cbe0; border-radius: 12px; color: #4a5268; }

/* Pop-up player */
.dx-vmodal {
	width: min(1100px, calc(100vw - 32px));
	max-width: none;
	max-height: none;
	padding: 0;
	border: 0;
	background: transparent;
	overflow: visible;
}
.dx-vmodal::backdrop { background: rgba(11, 15, 28, 0.82); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.dx-vmodal[open] { animation: dx-vmodal-in 0.35s cubic-bezier(0.22, 1, 0.36, 1); }
@keyframes dx-vmodal-in { from { opacity: 0; transform: translateY(16px) scale(0.98); } }
.dx-vmodal__inner { position: relative; }
.dx-vmodal__frame { aspect-ratio: 16 / 9; border-radius: 16px; overflow: hidden; background: #000; box-shadow: 0 40px 100px rgba(0, 0, 0, 0.5); }
.dx-vmodal__bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px 20px; padding: 14px 4px 0; color: #fff; }
.dx-vmodal__title { margin: 0; font-weight: 600; font-size: 1rem; }
.dx-vmodal__links { display: flex; gap: 16px; margin: 0; font-size: 0.9rem; }
.dx-vmodal__links a { color: #c3cbe0; text-decoration: none; }
.dx-vmodal__links a:hover { color: #fff; }
.dx-vmodal__close {
	position: absolute;
	top: -52px;
	right: 0;
	display: grid;
	place-items: center;
	width: 40px;
	height: 40px;
	border: 1px solid rgba(255, 255, 255, 0.2);
	border-radius: 12px;
	background: rgba(255, 255, 255, 0.08);
	color: #fff;
	cursor: pointer;
}
.dx-vmodal__close:hover { background: rgba(255, 255, 255, 0.18); }
.dx-vmodal__close:focus-visible { outline: 2px solid #7a96ff; outline-offset: 2px; }
html.dx-vmodal-open { overflow: hidden; }

/* Single video player block */
.dx-vplayer-block > * + * { margin-top: 16px; }
.dx-vmeta--player { justify-content: flex-start; }
.dx-vyt { margin-left: auto; color: #2b59ff; font-size: 0.9rem; font-weight: 600; text-decoration: none; }
.dx-vyt:hover { text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 781px) {
	.dx-vg-featured { grid-template-columns: 1fr; }
	.dx-vg-toolbar { flex-direction: column; align-items: stretch; max-width: 100%; box-sizing: border-box; }
	.dx-vg-toolbar > * { min-width: 0; max-width: 100%; }
	.dx-vg-filters { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
	.dx-vg-filter { flex: none; }
	.dx-vmodal__close { top: -48px; }
}
@media (prefers-reduced-motion: reduce) {
	.dx-vcard, .dx-vmodal[open], .dx-vg-dot { animation: none; }
}

/* Single video page */
.dx-video-single__hero { padding-top: clamp(40px, 6vw, 72px) !important; background: linear-gradient(180deg, #fbfcff, #fff); }
.dx-video-single__hero > * + * { margin-top: 20px !important; }
.dx-video-single__title { margin: 8px 0 0 !important; font-size: clamp(1.9rem, 4vw, 3rem); line-height: 1.1; letter-spacing: -0.035em; font-weight: 700; }
.dx-video-single__content { margin-top: 32px !important; color: #4a5268; font-size: 1.05rem; line-height: 1.7; }
.dx-video-single__more { margin: 0 !important; font-size: clamp(1.5rem, 3vw, 2rem) !important; letter-spacing: -0.03em; }
.dx-video-single__all { margin: 0; font-weight: 600; }
.dx-video-single__all a { color: #2b59ff; text-decoration: none; }
.dx-video-single .dx-crumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-block: 0 !important; font-size: 0.88rem; color: #8a93a8; }
.dx-video-single .dx-crumbs a { color: #4a5268; text-decoration: none; }
.dx-video-single .dx-crumbs a:hover { color: #2b59ff; }

/* Featured tutorial text: scoped selectors so section-wide h2/p rules don't override them. */
.dx-vg .dx-vg-featured__body .dx-vg-featured__title {
	margin-top: 10px;
	font-size: clamp(1.3rem, 2vw, 1.65rem);
	line-height: 1.25;
	letter-spacing: -0.02em;
}
.dx-vg .dx-vg-featured__body .dx-vg-featured__excerpt { margin-top: 12px; margin-bottom: 0; font-size: 0.98rem; }
.dx-vg .dx-vg-featured__body .dx-vmeta { margin-top: 20px; }
.dx-vg .dx-vg-featured__body .dx-vg-featured__links { margin-top: 20px; }
