/* Role-grouped videos layout (node 4 + /videos/role/{role}). */

.role-videos .page-container {
  display: block;
}

.role-videos .content-container,
.role-content {
  width: 100% !important;
  padding-right: 0 !important;
}

.role-section {
  margin: 0 0 3rem 0;
}

.role-section__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.role-section__title-block {
  flex: 1 1 auto;
  min-width: 0;
}

.role-section__title {
  margin: 0 0 0.25rem 0;
  font-size: 1.75rem;
  font-weight: 700;
  color: #76b829;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  line-height: 1.2;
}

.role-section__icon {
  font-size: 1.5rem;
  line-height: 1;
}

.role-section__subtitle {
  margin: 0;
  color: #6b7280;
  font-size: 1rem;
  font-weight: 400;
}

.role-section__view-all {
  flex: 0 0 auto;
  color: #16a34a;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  padding-top: 0.5rem;
}

.role-section__view-all:hover {
  color: #15803d;
  text-decoration: underline;
}

.role-section__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

@media (max-width: 960px) {
  .role-section__grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .role-section__grid {
    grid-template-columns: 1fr;
  }
}

.role-section__empty {
  color: #9ca3af;
  font-style: italic;
}

/* Wrapper for contextual edit pencil. Card itself is inside. */
.video-card-wrapper {
  position: relative;
  display: flex;
}

.video-card-wrapper .contextual {
  top: 0.5rem;
  right: 0.5rem;
}

.video-card-wrapper .video-card {
  flex: 1 1 auto;
}

/* Video card */
.video-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.video-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  color: inherit;
  text-decoration: none;
}

.video-card__thumb {
  position: relative;
  padding-top: 56.25%; /* 16:9 */
  background-size: cover;
  background-position: center;
  background-color: #111827;
}

.video-card__duration {
  position: absolute;
  right: 0.5rem;
  bottom: 0.5rem;
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  padding: 0.125rem 0.5rem;
  border-radius: 4px;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.video-card__body {
  padding: 0.875rem 1rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.video-card__category {
  display: inline-block;
  align-self: flex-start;
  padding: 0.125rem 0.625rem;
  border-radius: 9999px;
  background: #dbeafe;
  color: #1d4ed8;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.4;
}

.video-card__title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.3;
  color: #111827;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.video-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  color: #6b7280;
  font-size: 0.85rem;
  margin-top: auto;
}

.video-card__views {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.video-card__icon {
  flex: 0 0 auto;
}

.video-card__sep {
  display: none;
}

.role-videos .tabsnav--pills {
  justify-content: center;
}

.role-section {
  padding: 0 5rem;
}

@media (max-width: 1200px) {
  .role-section { padding: 0 3rem; }
}

@media (max-width: 768px) {
  .role-section { padding: 0 1rem; }
}

@media (max-width: 480px) {
  .role-section { padding: 0 0.75rem; }
}
