/* نافذة تشغيل المقاطع (المعرّف association-video-modal)، مستقلة عن أنماط قسم المكتبة المرئية */
.video-modal {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
}

.video-modal[hidden] {
	display: none;
}

.video-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(15, 23, 42, 0.82);
}

.video-modal__box {
	position: relative;
	width: min(960px, 100%);
}

.video-modal__frame {
	aspect-ratio: 16 / 9;
	border-radius: 14px;
	background: #000;
	overflow: hidden;
	box-shadow: 0 25px 60px rgba(0, 0, 0, 0.45);
}

.video-modal__frame iframe {
	display: block;
	width: 100%;
	height: 100%;
	border: 0;
}

.video-modal__close {
	position: absolute;
	top: -48px;
	inset-inline-end: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.15);
	color: #fff;
	cursor: pointer;
	transition: background 0.25s ease;
}

.video-modal__close:hover,
.video-modal__close:focus-visible {
	background: var(--theme-secondary);
}

body.video-modal-open {
	overflow: hidden;
}

@media (max-width: 768px) {
	.videos-section .section-title {
		font-size: 1.6rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	.video-card,
	.video-thumb img,
	.video-play {
		transition: none;
	}
}
