.resource-detail {
  background: #fff;
  padding-bottom: 80px;
}

.resource-hero {
  background: linear-gradient(135deg, #eef2ff 0%, #f8fafc 45%, #e0e7ff 100%);
  padding: 96px 0 72px;
  position: relative;
  overflow: hidden;
}

.resource-hero-card {
  background: #ffffff;
  border: 1px solid rgba(148,163,184,0.18);
  border-radius: 24px;
  box-shadow: 0 18px 60px rgba(102,126,234,0.18);
  padding: 48px 56px;
  max-width: 960px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.resource-header .resource-meta {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.resource-badge {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: 999px;
  background: #eef2ff;
  color: #4338ca;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 12px;
}

.resource-pill {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 10px;
  background: #f1f5f9;
  color: #475569;
  font-weight: 600;
  font-size: 12px;
}

.resource-title {
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 16px 0;
  line-height: 1.15;
}

.resource-desc {
  font-size: 18px;
  color: #475569;
  line-height: 1.7;
  margin: 0;
  max-width: 760px;
}

.resource-body {
  max-width: 960px;
  margin: -24px auto 0;
  position: relative;
  z-index: 3;
  padding: 0 16px;
}

.resource-media {
  background: #ffffff;
  border: 1px solid rgba(148,163,184,0.18);
  border-radius: 18px;
  padding: 20px;
  box-shadow: 0 12px 30px rgba(15,23,42,0.08);
  margin-top: 32px;
}

.resource-media video,
.resource-media audio {
  width: 100%;
  border-radius: 12px;
  background: #0b1221;
  display: block;
  min-height: 300px;
}

/* Audio container with cover image background */
.audio-container {
  position: relative;
  width: 100%;
  min-height: 400px;
  border-radius: 12px;
  overflow: hidden;
  background: #0b1221;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 24px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.audio-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.4) 50%, rgba(0, 0, 0, 0.2) 100%);
  z-index: 1;
}

.audio-container audio {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 800px;
  background: rgba(0, 0, 0, 0.6);
  border-radius: 8px;
  padding: 8px;
  backdrop-filter: blur(4px);
  min-height: auto;
}

/* Ensure audio controls are visible */
.audio-container audio::-webkit-media-controls-panel {
  background-color: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
}

.audio-container audio::-webkit-media-controls-play-button,
.audio-container audio::-webkit-media-controls-timeline,
.audio-container audio::-webkit-media-controls-current-time-display,
.audio-container audio::-webkit-media-controls-time-remaining-display,
.audio-container audio::-webkit-media-controls-mute-button,
.audio-container audio::-webkit-media-controls-volume-slider {
  filter: brightness(1.2);
}

.resource-media video {
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: center;
  height: auto;
  width: 100%;
  background-color: #0b1221;
  display: block;
}

/* Ensure poster image covers full container - works in modern browsers */
.resource-media video[poster] {
  object-fit: cover;
}

/* Fallback for browsers that support ::poster pseudo-element */
.resource-media video::poster {
  object-fit: cover;
  object-position: center;
  width: 100%;
  height: 100%;
}

.resource-media video::-webkit-media-controls-panel {
  background-color: rgba(0, 0, 0, 0.5);
}

.embed-frame {
  position: relative;
  padding-top: 56.25%;
  border-radius: 12px;
  overflow: hidden;
}

.embed-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.resource-note {
  margin-top: 12px;
  color: #475569;
  font-size: 14px;
}

.resource-footer {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid rgba(148, 163, 184, 0.15);
}

.resource-footer .btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 24px;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  color: #475569;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 12px;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  position: relative;
  overflow: hidden;
}

.resource-footer .btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  transition: left 0.5s ease;
}

.resource-footer .btn:hover {
  background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
  border-color: rgba(102, 126, 234, 0.3);
  color: #4338ca;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.15);
}

.resource-footer .btn:hover::before {
  left: 100%;
}

.resource-footer .btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.1);
}

@media (max-width: 1024px) {
  .resource-hero { padding: 72px 0 60px; }
  .resource-hero-card { padding: 40px 42px; }
}

@media (max-width: 768px) {
  .resource-hero { padding: 64px 0 52px; }
  .resource-hero-card { padding: 32px 28px; }
  .resource-title { font-size: clamp(28px, 6.5vw, 40px); }
  .resource-body { margin-top: -12px; }
  
  .resource-footer {
    margin-top: 36px;
    padding-top: 24px;
  }
  
  .resource-footer .btn {
    padding: 12px 20px;
    font-size: 14px;
    width: 100%;
    justify-content: center;
  }
}

