/* Minimal Vimeo Enhancement - Focus on Content Organization */

/* Video section container */
.video-section {
  margin: 2rem 0;
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 12px;
  background: var(--bg-secondary, #f8fafc);
  overflow: hidden;
  transition: all 0.3s ease;
}

.dark .video-section {
  background: var(--bg-tertiary, #1e293b);
  border-color: var(--border-color, #374151);
}

/* Video header with show/hide toggle */
.video-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  background: var(--bg-primary, #ffffff);
  border-bottom: 1px solid var(--border-color, #e2e8f0);
  cursor: pointer;
  transition: all 0.3s ease;
}

.dark .video-header {
  background: var(--bg-secondary, #374151);
  border-bottom-color: var(--border-color, #4b5563);
}

.video-header:hover {
  background: var(--bg-accent, #f1f5f9);
}

.dark .video-header:hover {
  background: var(--bg-accent, #475569);
}

/* Video indicator and title */
.video-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.video-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--primary-color, #02C1D8), var(--primary-hover, #029eb6));
  border-radius: 8px;
  color: white;
  font-size: 14px;
}

.video-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary, #020617);
  margin: 0;
}

.dark .video-title {
  color: var(--text-primary, #f8fafc);
}

.video-count {
  font-size: 0.8rem;
  color: var(--text-secondary, #64748b);
  font-weight: 400;
}

/* Toggle button */
.video-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--bg-tertiary, #f1f5f9);
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary, #64748b);
  cursor: pointer;
  transition: all 0.3s ease;
}

.dark .video-toggle {
  background: var(--bg-primary, #1f2937);
  border-color: var(--border-color, #374151);
  color: var(--text-secondary, #9ca3af);
}

.video-toggle:hover {
  background: var(--primary-color, #02C1D8);
  color: white;
  border-color: var(--primary-color, #02C1D8);
}

.video-toggle svg {
  width: 16px;
  height: 16px;
  transition: transform 0.3s ease;
}

.video-section.expanded .video-toggle svg {
  transform: rotate(180deg);
}

/* Video content area */
.video-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  background: var(--bg-primary, #ffffff);
}

.dark .video-content {
  background: var(--bg-secondary, #1f2937);
}

.video-section.expanded .video-content {
  max-height: 2000px; /* Large enough for multiple videos */
}

/* Individual video wrapper */
.video-wrapper {
  padding: 1.5rem;
  border-bottom: 1px solid var(--border-color, #e2e8f0);
}

.dark .video-wrapper {
  border-bottom-color: var(--border-color, #374151);
}

.video-wrapper:last-child {
  border-bottom: none;
}

/* Video iframe container - keep original responsive behavior */
.video-embed {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  height: 0;
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg-secondary, #f8fafc);
}

.dark .video-embed {
  background: var(--bg-tertiary, #374151);
}

.video-embed iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 8px;
}

/* Video metadata */
.video-meta {
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: var(--text-secondary, #64748b);
}

.dark .video-meta {
  color: var(--text-secondary, #9ca3af);
}

/* Multiple videos in series */
.video-series .video-wrapper {
  position: relative;
}

.video-number {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: var(--primary-color, #02C1D8);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  z-index: 10;
}

/* Collapsed state styling */
.video-section:not(.expanded) {
  background: var(--bg-accent, #f8fafc);
}

.dark .video-section:not(.expanded) {
  background: var(--bg-secondary, #374151);
}

/* Focus states for accessibility */
.video-header:focus {
  outline: 2px solid var(--primary-color, #02C1D8);
  outline-offset: 2px;
}

.video-toggle:focus {
  outline: 2px solid var(--primary-color, #02C1D8);
  outline-offset: 2px;
}

/* Animation for smooth transitions */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.video-section.expanded .video-wrapper {
  animation: fadeIn 0.3s ease-out;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .video-header {
    padding: 0.75rem 1rem;
  }
  
  .video-info {
    gap: 0.5rem;
  }
  
  .video-indicator {
    width: 28px;
    height: 28px;
    font-size: 12px;
  }
  
  .video-title {
    font-size: 0.9rem;
  }
  
  .video-toggle {
    padding: 0.375rem 0.75rem;
    font-size: 0.8rem;
  }
  
  .video-wrapper {
    padding: 1rem;
  }
  
  .video-number {
    top: 0.75rem;
    right: 0.75rem;
    padding: 0.2rem 0.6rem;
    font-size: 0.7rem;
  }
}

/* Print styles - show all videos when printing */
@media print {
  .video-section {
    break-inside: avoid;
    page-break-inside: avoid;
  }
  
  .video-content {
    max-height: none !important;
    overflow: visible !important;
  }
  
  .video-toggle {
    display: none;
  }
  
  .video-header::after {
    content: " (Videos included below)";
    font-style: italic;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .video-section {
    border: 2px solid var(--text-primary, #020617);
  }
  
  .video-header {
    border-bottom: 2px solid var(--text-primary, #020617);
  }
  
  .video-toggle {
    border: 2px solid var(--text-primary, #020617);
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .video-section,
  .video-content,
  .video-toggle svg,
  .video-wrapper {
    transition: none;
  }
  
  .video-wrapper {
    animation: none;
  }
}

