/* File: css/videos.css
   Videos page (videos.html, built by js/videos.js from
   stories-database/Videos.json). The look follows the design draft
   (mathematics-visualized-entwurf-e). */

.videos-section {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

/* the subscribe banner below brings its own margin */
.section-container.videos-section {
  margin-bottom: 0;
}

/* --- Featured video ------------------------------------------------------------ */

.videos-featured {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: stretch;
}

.videos-player {
  position: relative;
  flex: 3 1 560px;
  min-width: 0;
  aspect-ratio: 16 / 9;
  background: #2E2F39;
  border: 2px solid var(--primary-color);
  border-radius: 16px;
  overflow: hidden;
}

.videos-player img,
.videos-player iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: cover;
}

.videos-player img.is-contained,
.videos-card-thumb img.is-contained {
  object-fit: contain;
}

.videos-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: none;
  cursor: pointer;
}

.videos-play span {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: var(--secondary-color);
  color: #22232B;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.45);
  transition: transform 0.2s ease;
}

.videos-play:hover span {
  transform: scale(1.06);
}

.videos-info {
  flex: 2 1 300px;
  min-width: 0;
  background: var(--background-color-lighter);
  border: 1px solid var(--line-color);
  border-radius: 16px;
  padding: clamp(24px, 2.6vw, 34px);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.videos-topic {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
}

.videos-topic-small {
  font-size: 13px;
}

.videos-topic-dot {
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary-color);
}

.videos-info-title {
  margin: 0;
  font-size: clamp(24px, 2.4vw, 30px);
  line-height: 1.25;
  font-weight: 700;
}

.videos-info-text {
  margin: 0;
  font-size: 16px;
  line-height: 1.65;
  text-align: left;
  color: var(--text-muted);
}

.videos-info-actions {
  margin-top: auto;
  padding-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* --- Buttons ----------------------------------------------------------------- */

.videos-btn {
  min-height: 48px;
  padding: 0 20px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  transition: background-color var(--transition-fast), border-color var(--transition-fast);
}

.videos-btn:hover {
  text-decoration: none;
}

.videos-btn-blue,
.videos-btn-blue:hover {
  background: var(--primary-color);
  color: #FFFFFF;
}

.videos-btn-blue:hover {
  background: #285FA8;
}

.videos-btn-gold,
.videos-btn-gold:hover {
  background: var(--secondary-color);
  color: #22232B;
}

.videos-btn-gold:hover {
  background: #DA9F12;
}

/* Red of the site's figures (REDMV_NEW) for the subscribe button */
.videos-btn-youtube,
.videos-btn-youtube:hover {
  background: #DF4A4A;
  color: #FFFFFF;
}

.videos-btn-youtube:hover {
  background: #C93F3F;
}

.videos-btn-outline {
  border: 1px solid var(--line-color);
  color: var(--text-color);
}

.videos-btn-outline:hover {
  border-color: var(--primary-color);
  color: var(--text-color);
}

/* --- List ---------------------------------------------------------------------- */

.videos-list-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.videos-list-title {
  margin: 0;
  font-size: 26px;
  font-weight: 500;
}

.videos-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.videos-chips[hidden] {
  display: none;
}

.videos-list {
  list-style: none;
  margin: -16px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr));
  gap: 22px;
}

.videos-list li {
  display: flex;
}

.videos-card {
  width: 100%;
  padding: 0;
  text-align: left;
  border-radius: 14px;
  border: 2px solid var(--line-color);
  background: var(--background-color-lighter);
  color: var(--text-color);
  cursor: pointer;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.videos-card:hover {
  transform: translateY(-2px);
}

.videos-card[aria-pressed="true"] {
  border-color: var(--primary-color);
}

.videos-card-thumb {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  background: #2E2F39;
}

.videos-card-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.videos-card-play {
  position: absolute;
  left: 12px;
  bottom: 12px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(30, 31, 39, 0.88);
  color: #F5F5F5;
  display: flex;
  align-items: center;
  justify-content: center;
}

.videos-card-now {
  position: absolute;
  right: 0;
  top: 0;
  padding: 5px 12px;
  border-bottom-left-radius: 10px;
  background: var(--primary-color);
  color: #FFFFFF;
  font-size: 13px;
  font-weight: 500;
}

.videos-card-body {
  padding: 16px 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.videos-card-title {
  font-size: 18px;
  line-height: 1.35;
  font-weight: 700;
}

/* --- No videos yet --------------------------------------------------------------- */

.videos-empty {
  padding: 48px 28px;
  border: 1px dashed var(--line-color);
  border-radius: 14px;
  background: var(--background-color-lighter);
}

.videos-empty h2 {
  margin: 0 0 12px;
  font-size: 22px;
  font-weight: 500;
}

.videos-empty p {
  margin: 0;
  max-width: 60ch;
  font-size: 16px;
  line-height: 1.6;
  text-align: left;
  color: var(--text-muted);
}

/* --- Subscribe banner ------------------------------------------------------------ */

/* Same dark chrome as navbar and footer, in both themes. */
.videos-subscribe {
  margin: 56px 0 96px;
  /* same dark gray as behind the story card images */
  background: var(--card-image-backdrop);
  border-radius: 18px;
  padding: clamp(28px, 4vw, 48px);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  color: #F5F5F5;
}

.videos-subscribe-text {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 46ch;
}

.videos-subscribe h2 {
  margin: 0;
  font-size: clamp(24px, 2.6vw, 32px);
  font-weight: 500;
  color: #F5F5F5;
}

.videos-subscribe p {
  margin: 0;
  font-size: 17px;
  line-height: 1.6;
  text-align: left;
  color: #C9CAD3;
}

.videos-subscribe-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.videos-subscribe .videos-btn {
  min-height: 50px;
}

.videos-subscribe .videos-btn-outline,
.videos-subscribe .videos-btn-outline:hover {
  border-color: #4A4C5E;
  color: #C9CAD3;
}

.videos-subscribe .videos-btn-outline:hover {
  border-color: var(--secondary-color);
  color: var(--secondary-color);
}

/* --- Smaller screens ------------------------------------------------------------- */

@media (max-width: 767px) {
  .videos-play span {
    width: 64px;
    height: 64px;
  }

  .videos-list-title {
    font-size: 22px;
  }
}

/* === Viewport ~1500px (Full HD at 125% Windows scaling)
   All font sizes ~10% smaller (rounded to half pixels), content ~10% narrower.
   Generated from the font-size rules above that apply at this width;
   keep them in sync when a size up there changes. === */
@media (min-width: 1200px) and (max-width: 1799px) {
  .videos-info-text { font-size: 14.5px; } /* 16px */
  .videos-list-title { font-size: 23.5px; } /* 26px */
  .videos-card-title { font-size: 16px; } /* 18px */
  .videos-btn { font-size: 14.5px; } /* 16px */
  .videos-subscribe p { font-size: 15.5px; } /* 17px */
}
