@charset "utf-8";
/* ==========================================================================
   유튜브 롱폼·쇼츠 캐러셀 (theme/basic/wn_youtube.lib.php 가 그리는 마크업)

   ★기존 .media 캐러셀과 클래스를 겹치지 않게 wn_yt_ 로 뗐다.
     홈의 index.js 가 .swiper-btn-next 같은 전역 선택자로 스와이퍼를 잡고 있어서,
     같은 클래스를 쓰면 한 페이지에 캐러셀이 둘일 때 두 줄이 같이 움직인다.

   ★단위: 제목·설명은 em(본문과 같이 커져야 한다), 버튼·배지처럼 크기가 고정돼야 하는
     것은 px 다. 이 테마는 responsive.css 에서 html { font-size: 1~2.125vw } 로
     루트 글꼴을 화면 폭에 묶어 놓아, rem 을 쓰면 좁은 화면에서 버튼이 20px 대로
     쪼그라든다(2026-09-10 실측).
   ========================================================================== */

.wn_yt { position: relative; margin: 0 auto 48px; }
.wn_yt:last-child { margin-bottom: 0; }

/* 제목 */
.wn_yt_head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.wn_yt_title { font-size: 1.5em; font-weight: 600; color: #111; letter-spacing: -0.01em; margin: 0; }
.wn_yt_sub { font-size: 0.95em; color: #777; margin: 0; }

/* 캐러셀 틀 — 진행 막대 자리를 아래에 비워 둔다 */
.wn_yt_swiper { position: relative; padding: 0 0 26px; }
.wn_yt_list { list-style: none; margin: 0; padding: 0; align-items: stretch; }
.wn_yt_item { height: auto; }

/* 카드 */
.wn_yt_card { display: flex; flex-direction: column; height: 100%; color: inherit; text-decoration: none; }
.wn_yt_card:hover { color: inherit; }

.wn_yt_thumb {
    position: relative; display: block; width: 100%; overflow: hidden;
    border-radius: 12px; background-color: #eceff1;
}
.wn_yt_thumb img {
    width: 100%; height: 100%; object-fit: cover; display: block;
    transition: transform 0.5s ease;
}
.wn_yt_card:hover .wn_yt_thumb img { transform: scale(1.04); }

/* 롱폼은 16:9, 쇼츠는 9:16.
   ★쇼츠 썸네일이 oardefault(원본 세로)가 아니라 hqdefault(4:3 레터박스)로 떨어지는
     영상이 있다. object-fit: cover 가 가운데를 잘라 주므로 두 경우 다 같게 보인다. */
.wn_yt-long  .wn_yt_thumb { aspect-ratio: 16 / 9; }
.wn_yt-short .wn_yt_thumb { aspect-ratio: 9 / 16; }

/* 재생 버튼 */
.wn_yt_play {
    position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
    width: 58px; height: 41px; pointer-events: none;
    transition: opacity 0.25s ease;
}
.wn_yt_play svg { width: 100%; height: 100%; display: block; }
.wn_yt_play_bg { fill: #212121; fill-opacity: 0.8; transition: fill 0.2s ease, fill-opacity 0.2s ease; }
.wn_yt_card:hover .wn_yt_play_bg { fill: #f00; fill-opacity: 1; }
.wn_yt-short .wn_yt_play { width: 46px; height: 32px; }

/* 재생시간 */
.wn_yt_dur {
    position: absolute; right: 8px; bottom: 8px;
    background-color: rgba(0,0,0,0.78); color: #fff;
    font-size: 12px; font-weight: 500; line-height: 1;
    padding: 4px 5px; border-radius: 4px;
    font-variant-numeric: tabular-nums;
}

/* 제목·날짜 */
.wn_yt_caption { display: flex; flex-direction: column; gap: 5px; padding: 13px 4px 0; }
.wn_yt_name {
    font-size: 1em; font-weight: 500; line-height: 1.45; color: #1a1a1a;
    /* 두 줄까지만 보이고 넘치면 말줄임. 카드 높이가 들쭉날쭉해지지 않게 한다. */
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden; word-break: keep-all;
}
.wn_yt_card:hover .wn_yt_name { color: var(--theme, #992835); }
.wn_yt_date { font-size: 0.85em; color: #8a8a8a; font-variant-numeric: tabular-nums; }

/* 재생 중 — 썸네일 자리를 iframe 이 대신한다 */
.wn_yt_item.is-playing .wn_yt_thumb { background-color: #000; }
.wn_yt_item.is-playing .wn_yt_thumb iframe { width: 100%; height: 100%; border: 0; display: block; }

/* 좌우 이동 */
.wn_yt_nav {
    position: absolute; top: calc(50% - 30px); transform: translateY(-50%);
    width: 44px; height: 44px; border-radius: 999px; border: 0;
    background-color: var(--theme, #992835); color: #fff;
    display: inline-flex; justify-content: center; align-items: center;
    font-size: 24px; cursor: pointer; z-index: 5; padding: 0;
    opacity: 0.92; transition: opacity 0.2s ease;
}
.wn_yt_nav:hover { opacity: 1; }
.wn_yt_nav-prev { left: -12px; }
.wn_yt_nav-next { right: -12px; }
/* 넘길 것이 없거나 끝에 닿으면 화살표를 숨긴다 */
.wn_yt_nav.swiper-button-disabled,
.wn_yt_nav.swiper-button-lock { opacity: 0; pointer-events: none; }

/* 진행 막대 */
.wn_yt_bar {
    position: absolute; left: 50%; transform: translateX(-50%); bottom: 0;
    width: 55%; height: 5px; border-radius: 999px; background-color: #e8e8e8;
}
.wn_yt_bar .swiper-scrollbar-drag { background-color: var(--theme, #992835); }

/* 채널로 가는 버튼 — /youtube 페이지와 홈에서 같이 쓴다 */
.wn_yt_more {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 1.05em; font-weight: 500; color: #111;
    border: 1px solid #111; border-radius: 999px; padding: 13px 24px;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.wn_yt_more:hover { background-color: var(--theme, #992835); border-color: var(--theme, #992835); color: #fff; }
.wn_yt_more_wrap {
    text-align: center; margin-top: 36px;
    display: flex; justify-content: center; gap: 12px; flex-wrap: wrap;
}

/* /youtube 페이지 아래쪽 게시판 목록의 소제목.
   캐러셀이 본문이고 이쪽은 부차적이라는 것이 보이게 작게 둔다. */
.wn_yt_board_title {
    font-size: 1.05em; font-weight: 600; color: #444;
    margin: 48px 0 20px; padding-top: 32px; border-top: 1px solid #ededed;
}

@media (max-width: 1280px) {
    .wn_yt_nav-prev { left: 0; }
    .wn_yt_nav-next { right: 0; }
}

@media (max-width: 767px) {
    .wn_yt { margin-bottom: 36px; }
    .wn_yt_swiper { padding-bottom: 22px; }
    .wn_yt_nav { width: 36px; height: 36px; font-size: 20px; }
    .wn_yt_bar { width: 70%; height: 4px; }
    .wn_yt_play { width: 46px; height: 32px; }
    .wn_yt-short .wn_yt_play { width: 38px; height: 27px; }
    .wn_yt_dur { font-size: 11px; }
    .wn_yt_more { padding: 12px 20px; }
    .wn_yt_more_wrap { margin-top: 26px; }
}
