/* ============================================
   Video Modal Styles
   ============================================ */

/* Modal Container */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.modal[aria-hidden="false"] {
  opacity: 1;
  visibility: visible;
}

/* Dark Overlay */
.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  cursor: pointer;
}

/* Modal Content Box */
.modal-container {
  position: relative;
  width: 100%;
  max-width: 1200px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  z-index: 1;
  transform: scale(0.9);
  transition: transform 0.3s ease;
}
.modal[aria-hidden="false"].modal-container {
  transform: scale(1);
}

/* Modal Header */
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid #e0e0e0;
}
.modal-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: #333;
  padding-right: 2rem;
}

/* Close Button */
.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  font-size: 2rem;
  line-height: 1;
  color: #666;
  cursor: pointer;
  border-radius: 4px;
  transition: background 0.2s ease, color 0.2s ease;
}
.modal-close:hover {
  background: #f0f0f0;
  color: #333;
}
.modal-close:focus {
  outline: 3px solid #4A90E2;
  outline-offset: 2px;
}

/* Modal Body */
.modal-body {
  padding: 0;
}

/* Video Wrapper - 16:9 Aspect Ratio */
.video-wrapper {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  background: #000;
  border-radius: 0 0 8px 8px;
  overflow: hidden;
}
.video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* ============================================
   Responsive Adjustments
   ============================================ */

@media (max-width: 768px) {
	.modal-container {
		max-width: 100%;
		margin: 0;
		border-radius: 0;
	  }
	.modal-title {
		font-size: 1.125rem;
	  }
	.video-link {
		flex-direction: column;
		align-items: flex-start;
		gap: 0.5rem;
	  }
}

/* ============================================
   Accessibility
   ============================================ */

/* Prevent body scroll when modal open */
body.modal-open {
  overflow: hidden;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
	.modal,.modal-container {
		transition: none;
	  }
}

/* High Contrast */
@media (prefers-contrast: high) {
	.modal-overlay {
		background: rgba(0, 0, 0, 0.95);
	  }
	.modal-close {
		border: 2px solid currentColor;
	  }
}