/**
 * Industrial Energy Framework — Video Hub
 */

.rpt-video-page .site-content {
  display: block;
  width: 100%;
  max-width: 100%;
  background: var(--rpt-surface-neutral, #f5f5f5);
}

.rpt-video-page #primary,
.rpt-video-page .content-area,
.rpt-video-page .site-main,
.rpt-video-page article,
.rpt-video-page .inside-article {
  width: 100%;
  max-width: 100%;
  margin-left: 0;
  margin-right: 0;
  box-sizing: border-box;
}

body.rpt-video-page.separate-containers .site-main,
body.rpt-video-page.one-container .site-content {
  margin: 0;
  padding: 0;
  width: 100%;
  max-width: 100%;
}

.rpt-video-page .site-main > * {
  margin-bottom: 0;
}

.rpt-video-page .inside-article,
.rpt-video-page .entry-content {
  padding: 0;
  max-width: none;
  width: 100%;
}

.rpt-video-page .entry-header {
  display: none;
}

.rpt-video-page {
  width: 100%;
  max-width: 100%;
  padding: var(--rpt-stack-md) 0 var(--rpt-section-padding-desktop);
  box-sizing: border-box;
}

.rpt-video-page .rpt-container,
.rpt-video-page__container {
  width: 100%;
  max-width: var(--rpt-container-max);
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}

.rpt-video-page__container {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: var(--rpt-stack-md);
}

.rpt-video-page__panel {
  background: var(--rpt-surface-container-lowest);
  border: var(--rpt-border-light);
  border-radius: var(--rpt-radius-default);
  box-shadow: var(--rpt-shadow-technical);
}

.rpt-video-page__title-block {
  padding: var(--rpt-stack-lg) var(--rpt-stack-md);
  text-align: center;
}

.rpt-video-page__title {
  margin: 0;
  padding-bottom: 12px;
  border-bottom: 3px solid var(--rpt-electric-green);
  display: inline-block;
  font-family: var(--rpt-font-heading);
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  line-height: 1.2;
  font-weight: var(--rpt-headline-lg-weight);
  color: var(--rpt-on-surface);
}

/* Outline green CTA */
.rpt-btn-outline-green {
  background: transparent;
  color: var(--rpt-electric-green);
  border: 1px solid var(--rpt-electric-green);
}

.rpt-btn-outline-green:hover,
.rpt-btn-outline-green:focus {
  background: var(--rpt-electric-green);
  color: var(--rpt-on-primary);
  border-color: var(--rpt-electric-green);
}

/* Section headings */
.rpt-video-page .rpt-section-heading {
  margin-bottom: 20px;
}

.rpt-video-page .rpt-section-heading h2 {
  margin: 0;
  font-family: var(--rpt-font-heading);
  font-size: var(--rpt-headline-md-size);
  line-height: var(--rpt-headline-md-line);
  font-weight: var(--rpt-headline-md-weight);
  color: var(--rpt-on-surface);
}

.rpt-video-page .rpt-heading-line {
  display: block;
  width: 96px;
  height: 4px;
  margin-top: 8px;
  border-radius: var(--rpt-radius-full);
  background: var(--rpt-electric-green);
}

/* Featured video */
.rpt-video-featured {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: var(--rpt-stack-lg);
  align-items: stretch;
  padding: 24px;
  background: var(--rpt-surface-container-lowest);
  border: var(--rpt-border-light);
  border-radius: var(--rpt-radius-lg);
  box-shadow: var(--rpt-shadow-technical);
}

.rpt-video-featured__media {
  min-width: 0;
}

.rpt-video-featured__embed,
.rpt-video-featured__thumb-link {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--rpt-radius-md);
  background: var(--rpt-surface-container-low);
}

.rpt-video-featured__embed iframe,
.rpt-video-featured__embed video,
.rpt-video-featured__embed .rpt-video-player,
.rpt-video-single__embed iframe,
.rpt-video-single__embed video,
.rpt-video-single__embed .rpt-video-player {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  object-fit: cover;
}

.rpt-video-featured__embed > *,
.rpt-video-single__embed > * {
  width: 100% !important;
  max-width: 100%;
  height: 100% !important;
}

.rpt-video-featured__thumb-img,
.rpt-video-featured__thumb-placeholder {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rpt-video-featured__thumb-placeholder {
  background: var(--rpt-surface-container-low);
}

.rpt-video-featured__thumb-link {
  text-decoration: none;
}

.rpt-video-featured__play {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 1;
  width: 64px;
  height: 64px;
  border-radius: var(--rpt-radius-full);
  background: rgba(26, 32, 44, 0.72);
  transform: translate(-50%, -50%);
}

.rpt-video-featured__play::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 54%;
  transform: translate(-50%, -50%);
  border-style: solid;
  border-width: 10px 0 10px 16px;
  border-color: transparent transparent transparent var(--rpt-on-primary);
}

.rpt-video-featured__content {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

.rpt-video-featured__title {
  margin: 0;
  font-family: var(--rpt-font-heading);
  font-size: var(--rpt-headline-md-size);
  line-height: var(--rpt-headline-md-line);
  font-weight: var(--rpt-headline-md-weight);
  color: var(--rpt-on-surface);
}

.rpt-video-featured__date {
  font-family: var(--rpt-font-body);
  font-size: var(--rpt-body-sm-size, 14px);
  line-height: 20px;
  color: var(--rpt-on-surface-variant);
}

.rpt-video-featured__description {
  margin: 0;
  font-family: var(--rpt-font-body);
  font-size: var(--rpt-body-md-size);
  line-height: 1.65;
  color: var(--rpt-on-surface);
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.rpt-video-featured__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: auto;
  padding-top: 8px;
}

/* Main layout */
.rpt-video-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: var(--rpt-stack-lg);
  align-items: start;
  width: 100%;
  max-width: 100%;
}

.rpt-video-sidebar {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 260px;
  min-width: 0;
  grid-column: 1;
  align-self: start;
}

.rpt-video-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0;
  grid-column: 2;
  align-self: start;
}

.rpt-video-sections {
  display: flex;
  flex-direction: column;
  gap: var(--rpt-stack-md);
  width: 100%;
  max-width: 100%;
}

.rpt-video-sections__empty {
  margin: 0;
  padding: var(--rpt-stack-lg);
  text-align: center;
  font-family: var(--rpt-font-body);
  font-size: var(--rpt-body-md-size);
  color: var(--rpt-on-surface-variant);
  background: var(--rpt-surface-container-lowest);
  border: var(--rpt-border-light);
  border-radius: var(--rpt-radius-lg);
}

.rpt-video-category-section {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  background: var(--rpt-surface-container-lowest);
  border: var(--rpt-border-light);
  border-radius: var(--rpt-radius-lg);
  box-shadow: var(--rpt-shadow-technical);
  padding: 24px;
}

.rpt-video-category-section__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--rpt-outline-variant);
}

.rpt-video-category-section__title {
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
  font-family: var(--rpt-font-heading);
  font-size: var(--rpt-body-lg-size);
  line-height: var(--rpt-body-lg-line);
  font-weight: var(--rpt-headline-md-weight);
  color: var(--rpt-on-surface);
}

.rpt-video-category-section__more {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  flex: 0 0 auto;
  margin-left: 12px;
  padding: 4px 0;
  font-family: var(--rpt-font-body);
  font-size: 13px;
  line-height: 18px;
  font-weight: 500;
  color: var(--rpt-electric-green);
  text-decoration: none;
  white-space: nowrap;
}

.rpt-video-category-section__more:hover,
.rpt-video-category-section__more:focus {
  color: var(--rpt-secondary);
}

.rpt-video-category-section__more-icon {
  font-size: 14px;
  line-height: 1;
}

.rpt-video-category-section__body {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.rpt-video-section {
  width: 100%;
}

/* Sidebar */
.rpt-video-sidebar__widget {
  background: var(--rpt-surface-container-lowest);
  border: var(--rpt-border-light);
  border-radius: var(--rpt-radius-default);
  overflow: hidden;
  box-shadow: var(--rpt-shadow-technical);
}

.rpt-video-sidebar__title {
  margin: 0;
  padding: 14px var(--rpt-stack-md);
  background: var(--rpt-electric-green);
  color: var(--rpt-on-primary);
  font-family: var(--rpt-font-heading);
  font-size: var(--rpt-body-lg-size);
  font-weight: var(--rpt-headline-md-weight);
  line-height: var(--rpt-body-lg-line);
}

.rpt-video-sidebar__nav {
  display: flex;
  flex-direction: column;
}

.rpt-video-sidebar__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--rpt-outline-variant);
  color: var(--rpt-on-surface);
  text-decoration: none;
  background: var(--rpt-surface-container-lowest);
  transition: background var(--rpt-transition-fast), color var(--rpt-transition-fast);
}

.rpt-video-sidebar__item:last-child {
  border-bottom: 0;
}

.rpt-video-sidebar__label {
  font-family: var(--rpt-font-body);
  font-size: var(--rpt-body-md-size);
  line-height: var(--rpt-body-md-line);
}

.rpt-video-sidebar__chevron {
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
  opacity: 0.55;
}

.rpt-video-sidebar__item:hover,
.rpt-video-sidebar__item:focus-visible {
  background: var(--rpt-surface-container-low);
  color: var(--rpt-electric-green);
}

.rpt-video-sidebar__item.is-active {
  background: var(--rpt-surface-container-low);
  color: var(--rpt-electric-green);
}

.rpt-video-sidebar__item.is-active .rpt-video-sidebar__label {
  font-weight: 600;
}

/* Video grid */
.rpt-video-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  align-items: stretch;
  width: 100%;
}

.rpt-video-grid > .rpt-video-card {
  width: 100%;
  min-width: 0;
}

/* Video card */
.rpt-video-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--rpt-surface-container-lowest);
  border: var(--rpt-border-light);
  border-radius: var(--rpt-radius-default);
  overflow: hidden;
  transition: border-color var(--rpt-transition-fast), box-shadow var(--rpt-transition-fast);
}

.rpt-video-card:hover {
  border-color: rgba(139, 249, 89, 0.65);
  box-shadow: var(--rpt-shadow-technical);
}

.rpt-video-card__thumb-wrap {
  position: relative;
}

.rpt-video-card__thumb {
  position: relative;
  display: block;
  width: 100%;
  max-width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--rpt-surface-container-low);
  text-decoration: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

.rpt-video-card__thumb--play {
  text-align: left;
}

.rpt-video-card__play {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: var(--rpt-radius-full);
  background: rgba(26, 32, 44, 0.72);
  color: var(--rpt-on-primary);
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.rpt-video-card__img,
.rpt-video-card__placeholder {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center center;
}

.rpt-video-card__placeholder {
  background: var(--rpt-surface-container-low);
}

.rpt-video-card__duration {
  position: absolute;
  right: 8px;
  bottom: 8px;
  z-index: 2;
  padding: 4px 8px;
  border-radius: var(--rpt-radius-sm);
  background: rgba(26, 32, 44, 0.82);
  color: var(--rpt-on-primary);
  font-family: var(--rpt-font-body);
  font-size: 12px;
  line-height: 16px;
  font-weight: 600;
}

.rpt-video-card__body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1 1 auto;
  padding: 12px 14px 14px;
}

.rpt-video-card__category {
  font-family: var(--rpt-font-body);
  font-size: 12px;
  line-height: 16px;
  font-weight: 600;
  color: var(--rpt-spec-label-color, #8aa0bd);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.rpt-video-card__category a {
  color: inherit;
  text-decoration: none;
}

.rpt-video-card__category a:hover,
.rpt-video-card__category a:focus {
  color: var(--rpt-electric-green);
}

.rpt-video-single__category a {
  color: inherit;
  text-decoration: none;
}

.rpt-video-single__category a:hover,
.rpt-video-single__category a:focus {
  color: var(--rpt-electric-green);
}

.rpt-video-card__title {
  margin: 0;
  font-family: var(--rpt-font-body);
  font-size: var(--rpt-body-md-size);
  line-height: 22px;
  font-weight: 600;
}

.rpt-video-card__title a {
  color: var(--rpt-on-surface);
  text-decoration: none;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 44px;
}

.rpt-video-card__title a:hover,
.rpt-video-card__title a:focus {
  color: var(--rpt-electric-green);
}

.rpt-video-card__date {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
  font-family: var(--rpt-font-body);
  font-size: 13px;
  line-height: 18px;
  color: var(--rpt-on-surface-variant);
}

.rpt-video-card__date-icon {
  width: 14px;
  height: 14px;
  border: 1.5px solid currentColor;
  border-radius: var(--rpt-radius-full);
  position: relative;
  flex: 0 0 auto;
}

.rpt-video-card__date-icon::before,
.rpt-video-card__date-icon::after {
  content: "";
  position: absolute;
  background: currentColor;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

.rpt-video-card__date-icon::before {
  width: 1.5px;
  height: 4px;
  margin-top: -1px;
}

.rpt-video-card__date-icon::after {
  width: 3px;
  height: 1.5px;
  margin-left: 1px;
}

/* Single video */
.rpt-video-single {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: var(--rpt-stack-lg);
  padding: 24px;
}

.rpt-video-single__embed,
.rpt-video-single__thumb {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--rpt-radius-md);
  background: var(--rpt-surface-container-low);
}

.rpt-video-single__embed iframe,
.rpt-video-single__embed video,
.rpt-video-single__embed .rpt-video-player {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.rpt-video-single__thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rpt-video-single__category {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--rpt-spec-label-color, #8aa0bd);
}

.rpt-video-single__title {
  margin: 0;
  font-family: var(--rpt-font-heading);
  font-size: var(--rpt-headline-md-size);
  line-height: var(--rpt-headline-md-line);
  color: var(--rpt-on-surface);
}

.rpt-video-single__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: var(--rpt-body-sm-size, 14px);
  color: var(--rpt-on-surface-variant);
}

.rpt-video-single__description {
  font-family: var(--rpt-font-body);
  font-size: var(--rpt-body-md-size);
  line-height: 1.7;
  color: var(--rpt-on-surface);
}

.rpt-video-single__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
}

@media (min-width: 992px) {
  .rpt-video-sidebar {
    position: sticky;
    top: 88px;
  }
}

@media (max-width: 991px) {
  .rpt-video-layout {
    grid-template-columns: 1fr;
  }

  .rpt-video-sidebar {
    width: 100%;
    max-width: 100%;
  }

  .rpt-video-featured {
    grid-template-columns: 1fr;
  }

  .rpt-video-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .rpt-video-single {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 767px) {
  body.rpt-video-page.separate-containers .site-main,
  body.rpt-video-page .site-main {
    margin: 0;
  }

  body.rpt-video-page .inside-article,
  body.rpt-video-page .entry-content,
  body.rpt-video-page.one-container .site-content {
    padding-left: 0;
    padding-right: 0;
  }

  .rpt-video-page {
    padding: var(--rpt-stack-sm) 0 var(--rpt-section-padding-mobile);
  }

  .rpt-video-page .rpt-container,
  .rpt-video-page__container {
    padding-left: 12px;
    padding-right: 12px;
    gap: var(--rpt-stack-md);
  }

  .rpt-video-featured {
    padding: 16px;
    gap: var(--rpt-stack-md);
  }

  .rpt-video-featured__actions {
    flex-direction: column;
  }

  .rpt-video-featured__actions .rpt-btn {
    width: 100%;
  }

  .rpt-video-page__title-block {
    padding: var(--rpt-stack-md) var(--rpt-stack-sm);
  }

  .rpt-video-page__title {
    font-size: var(--rpt-headline-md-size);
    line-height: var(--rpt-headline-md-line);
  }

  .rpt-video-page .rpt-video-layout {
    display: flex;
    flex-direction: column;
    gap: var(--rpt-stack-md);
  }

  .rpt-video-main,
  .rpt-video-sidebar {
    grid-column: auto;
    max-width: 100%;
  }

  .rpt-video-category-section {
    padding: 16px;
  }

  .rpt-video-category-section__header {
    align-items: center;
  }

  .rpt-video-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .rpt-video-single {
    padding: 16px;
  }

  .rpt-video-single__actions {
    flex-direction: column;
  }

  .rpt-video-single__actions .rpt-btn {
    width: 100%;
  }
}

@media (max-width: 575px) {
  .rpt-video-grid {
    grid-template-columns: 1fr;
  }
}

/* Video lightbox — duplicated here so /videos/ always has overlay styles with video.css */
html.rpt-video-lightbox-open,
body.rpt-video-lightbox-open {
  overflow: hidden;
  overscroll-behavior: none;
}

.rpt-video-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  box-sizing: border-box;
}

.rpt-video-lightbox[hidden] {
  display: none !important;
}

.rpt-video-lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 8, 19, 0.82);
}

.rpt-video-lightbox__dialog {
  position: relative;
  z-index: 1;
  width: min(960px, 100%);
  max-width: 100%;
  background: var(--rpt-surface-container-lowest);
  border-radius: var(--rpt-radius-lg);
  box-shadow: var(--rpt-shadow-technical);
  overflow: hidden;
}

.rpt-video-lightbox__close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: var(--rpt-radius-full);
  background: rgba(26, 32, 44, 0.72);
  color: var(--rpt-on-primary);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  transition: background var(--rpt-transition-fast);
}

.rpt-video-lightbox__close:hover,
.rpt-video-lightbox__close:focus {
  background: var(--rpt-electric-green);
}

.rpt-video-lightbox__content {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: 200px;
  background: #000000;
}

.rpt-video-lightbox__content iframe,
.rpt-video-lightbox__content video {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #000000;
}

@media (max-width: 575px) {
  .rpt-video-lightbox {
    padding: 16px 12px;
  }

  .rpt-video-lightbox__close {
    top: 8px;
    right: 8px;
    width: 36px;
    height: 36px;
    font-size: 24px;
  }

  .rpt-video-lightbox__content {
    min-height: 180px;
  }
}
