/* ============================================================================
   HEY LSIP — Skills Videos
   Carousel block + admin preview iframe.
   ============================================================================ */

/* ── Admin preview ───────────────────────────────────────────────────────── */

.video-preview {
    position: relative;
    width: 100%;
    max-width: 560px;
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: 6px;
    overflow: hidden;
}

.video-preview iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* ── Carousel block (drop-in for sector/job/homepage pages) ──────────────── */

.video-carousel-block {
    background: #f6f6f1;
    padding: 4rem 1rem;
}

.video-carousel-inner {
    max-width: 1200px;
    margin: 0 auto;
}

.video-carousel-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.video-carousel-header h2 {
    font-size: 2rem;
    font-weight: 700;
    color: #14387a;
    margin: 0;
    line-height: 1.2;
    letter-spacing: -0.01em;
}

.video-carousel-all {
    color: #14387a;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.15s;
}

.video-carousel-all:hover { color: #d77c1a; }

.video-carousel-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.video-card {
    background: #fff;
    border: 1px solid #e6e6e6;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    transition: box-shadow 0.15s ease;
}

.video-card:hover {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}

.video-card-thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    border: 0;
    padding: 0;
    cursor: pointer;
    display: block;
    overflow: hidden;
}

.video-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.video-card-thumb:hover img {
    transform: scale(1.04);
    opacity: 0.85;
}

.video-card-play-icon {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    color: #fff;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

.video-card-play-icon .material-symbols-outlined {
    font-size: 4rem;
    font-variation-settings: "FILL" 1;
    opacity: 0.92;
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.video-card-thumb:hover .video-card-play-icon .material-symbols-outlined {
    opacity: 1;
    transform: scale(1.05);
}

.video-card-thumb iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    z-index: 2;
}

.video-card-body {
    padding: 1rem 1.25rem 1.25rem;
}

.video-card-body h3 {
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.3;
    color: #222;
    margin: 0 0 0.5rem;
}

.video-card-body p {
    color: #555;
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@media (max-width: 600px) {
    .video-carousel-block { padding: 2rem 1rem; }
    .video-carousel-header h2 { font-size: 1.35rem; }
}

/* ── Videos index page ───────────────────────────────────────────────────── */

.videos-page { padding-bottom: 3rem; }

.video-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1.5rem 0 1rem;
}

.video-filter-chip {
    padding: 0.45rem 1rem;
    border: 1px solid #ced4da;
    background: #fff;
    color: #555;
    border-radius: 999px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.15s ease;
}

.video-filter-chip:hover {
    border-color: #28a745;
    color: #28a745;
}

.video-filter-chip.active {
    background: #28a745;
    border-color: #28a745;
    color: #fff;
}

.video-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    margin-top: 0.75rem;
}

.video-card-tag {
    padding: 0.15rem 0.55rem;
    background: #f4f4f0;
    color: #555;
    font-size: 0.72rem;
    border-radius: 999px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* ── Inline YouTube embed (auto-injected by YouTubeEmbedRewriter) ───────
   Wrapper produced server-side when rendering CMS ContentHtml. Acts as a
   responsive 16:9 container so the iframe scales cleanly inside .site-prose
   without inline width/height attributes. */
.lsip-video-embed {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    margin: 1.5rem 0;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(15, 42, 92, 0.12);
}
.lsip-video-embed iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Sub-headline beneath the carousel section title — provides context for
   why these videos appear (e.g. "matched based on this article's topic"). */
.video-carousel-sub {
    margin: 0.25rem 0 0;
    color: rgba(15, 42, 92, 0.65);
    font-size: 0.92rem;
    line-height: 1.5;
    max-width: 42rem;
}

/* ── Video card polish (2026-06-24) ───────────────────────────────────
   Adds duration badge, featured ribbon, in-card close button, watch-on-
   YouTube affordance, and a more pronounced hover lift. */

.video-card {
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    border-radius: 12px;
    overflow: hidden;
    background: white;
    border: 1px solid #e7e3d6;
    display: flex;
    flex-direction: column;
}
.video-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(15, 42, 92, 0.14);
}

/* Featured ribbon — a star + label in the top-left corner of the thumb. */
.video-card.is-featured {
    border-color: #d77c1a;
}
.video-card-badge {
    position: absolute;
    top: 0.65rem;
    left: 0.65rem;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.55rem 0.25rem 0.35rem;
    background: #d77c1a;
    color: white;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}
.video-card-badge .material-symbols-outlined {
    font-size: 0.9rem !important;
}

/* Duration badge — bottom-right corner of the thumb (YouTube convention). */
.video-card-duration {
    position: absolute;
    bottom: 0.55rem;
    right: 0.55rem;
    z-index: 3;
    padding: 0.15rem 0.45rem;
    background: rgba(0, 0, 0, 0.82);
    color: white;
    font-size: 0.78rem;
    font-weight: 600;
    border-radius: 4px;
    font-variant-numeric: tabular-nums;
    pointer-events: none;
}

/* Make sure the thumb is a positioning context so badges anchor. */
.video-card-thumb {
    position: relative;
}
.video-card-play {
    display: block;
    width: 100%;
    border: 0;
    padding: 0;
    background: transparent;
    cursor: pointer;
    position: relative;
}
.video-card-play img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

/* Close button — shown only while a video is playing. Sits at top-right
   of the thumb cell, above the iframe so it's always reachable. */
.video-card.is-playing .video-card-thumb {
    aspect-ratio: 16 / 9;
}
.video-card.is-playing .video-card-thumb iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}
.video-card-close {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    z-index: 5;
    width: 2.25rem;
    height: 2.25rem;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.72);
    color: white;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}
.video-card-close:hover {
    background: rgba(0, 0, 0, 0.9);
}
.video-card-close .material-symbols-outlined {
    font-size: 1.2rem !important;
}

/* Watch on YouTube link — appears in body when iframe is playing. */
.video-card-watch-on-yt {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.6rem;
    color: #d77c1a;
    font-weight: 600;
    font-size: 0.85rem;
    text-decoration: none;
}
.video-card-watch-on-yt:hover {
    text-decoration: underline;
}
.video-card-watch-on-yt .material-symbols-outlined {
    font-size: 1rem !important;
}
