/****************************************************************************************************
* YouTube (youtubeChannel.htm), drawn by js/videoCatalog.js.  Built on css/home.css - its colours,  *
* panels, section heads and footer; this page's own pieces are prefixed yt-.                       *
*****************************************************************************************************/
.yt-page main { padding-top: 22px; }

.yt-title { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px 24px; flex-wrap: wrap; }
.yt-title h1 { margin: 0; font-size: 26px; font-weight: 900; }
.yt-title-sub { color: var(--hw-faint); font-size: 13px; margin-top: 2px; }
.yt-channel, .yt-watch { display: inline-block; padding: 8px 16px; border-radius: 10px; font-weight: 700; font-size: 14px; white-space: nowrap;
                         color: var(--hw-text) !important; background: rgba(91, 200, 245, .16); border: 1px solid rgba(91, 200, 245, .6);
                         transition: background .15s ease, border-color .15s ease; }
.yt-channel:hover, .yt-watch:hover { background: rgba(91, 200, 245, .28); border-color: var(--hw-accent); text-decoration: none !important; }

.yt-status { margin-top: 20px; color: var(--hw-faint); }

/* ---- the featured video ---- */
.yt-feature { display: grid; grid-template-columns: 8fr 4fr; margin-top: 20px; overflow: hidden; }
.yt-player { position: relative; aspect-ratio: 16 / 9; background: #000; min-width: 0; }
.yt-player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.yt-poster { position: absolute; inset: 0; padding: 0; border: 0; background: #000; cursor: pointer; }
.yt-poster img { width: 100%; height: 100%; object-fit: cover; display: block; transition: opacity .2s ease; }
.yt-poster:hover img { opacity: .85; }
.yt-poster:focus-visible { outline: 2px solid var(--hw-accent); outline-offset: -4px; }

/* the play button:  a rounded square with a triangle */
.yt-play { position: absolute; left: 50%; top: 50%; width: 76px; height: 54px; transform: translate(-50%, -50%); border-radius: 16px;
           background: rgba(8, 14, 26, .78); backdrop-filter: blur(6px); border: 1px solid rgba(255, 255, 255, .22); transition: background .15s ease; }
.yt-play::after { content: ''; position: absolute; left: 50%; top: 50%; transform: translate(-35%, -50%);
                  border-style: solid; border-width: 12px 0 12px 20px; border-color: transparent transparent transparent #fff; }
.yt-poster:hover .yt-play, .yt-card:hover .yt-play { background: #e62117; border-color: #e62117; }
.yt-play-sm { width: 48px; height: 34px; border-radius: 10px; }
.yt-play-sm::after { border-width: 8px 0 8px 13px; }

.yt-feature-text { padding: 22px 24px; display: flex; flex-direction: column; min-width: 0; }
.yt-feature-text h2 { margin: 6px 0 4px; font-size: 22px; font-weight: 900; line-height: 1.3; overflow-wrap: anywhere; }
.yt-date { font-size: 13px; color: var(--hw-faint); }
.yt-desc { margin: 12px 0 0; color: var(--hw-dim); font-size: 14px; line-height: 1.6; white-space: pre-line; overflow-wrap: anywhere;
           display: -webkit-box; -webkit-line-clamp: 8; -webkit-box-orient: vertical; overflow: hidden; }
.yt-watch { margin-top: auto; align-self: flex-start; }
.yt-desc + .yt-watch, .yt-date + .yt-desc[hidden] + .yt-watch { margin-top: 18px; }

/* ---- more videos ---- */
.yt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.yt-card { display: flex; flex-direction: column; padding: 0; text-align: left; font: inherit; color: inherit; overflow: hidden; cursor: pointer;
           transition: border-color .15s ease, transform .15s ease; }
.yt-card:hover { border-color: rgba(91, 200, 245, .45); transform: translateY(-2px); }
.yt-card:focus-visible { outline: 2px solid var(--hw-accent); outline-offset: 2px; }
.yt-thumb { position: relative; display: block; aspect-ratio: 16 / 9; background: #000; }
.yt-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.yt-card-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; padding: 12px 14px 0;
                 font-weight: 700; line-height: 1.35; overflow-wrap: anywhere; }
.yt-card-date { padding: 4px 14px 14px; font-size: 12px; color: var(--hw-faint); }

@media (max-width: 1000px) {
  .yt-feature { grid-template-columns: 1fr; }
  .yt-watch { margin-top: 18px; }
}

@media (max-width: 520px) {
  .yt-feature-text { padding: 16px 16px 18px; }
  .yt-feature-text h2 { font-size: 19px; }
  .yt-grid { grid-template-columns: 1fr; }
}
