/* Lady Learner Feed Layout */
.feed-wrapper {margin: 0 auto; padding-bottom: 120px;}
.feed-list {display: flex;flex-direction: column;gap: 0px;}
.feed-item-wrapper {padding:30px;}
.feed-item {display: flex;flex-direction: column; border-bottom: 1px solid var(--palegray);}
.feed-title {font-size: var(--text-h2); line-height: 1.4;}
.feed-title a {color: var(--ink); text-decoration: none;}
.feed-title a:hover {text-decoration: underline;}
.feed-meta {font-size: var(--text-small);color: var(--gray);display: flex;align-items: center;gap: 6px; margin-top:6px;}
.single-meta {justify-content: space-between;}
.event-details {margin-top: 6px; display: inline-block; font-size: var(--text-small); color:var(--ink)}
.feed-thumb {margin-top:16px; display: flex;}
.feed-thumb img {width: 100%;height: auto; object-fit: cover; border-radius: 6px;}
.feed-excerpt {font-size: var(--text-small);color: var(--ink);line-height: 1.6;}
.feed-reference .feed-type {background: #f8f8ff;color: var(--llred);border-radius: 4px;padding: 2px 6px;font-size: var(--text-tiny);}
#ll-load-more {font-size:var(--text-small); display: block; width: calc(100% - 60px); margin: 40px auto 0;padding: 12px 12px;border: 1px solid var(--llsoftblue);border-radius: 6px;background-color: var(--llsoftblue); color: var(--lldarkblue); font-weight: 500; cursor: pointer;transition: all 0.2s ease;}
#ll-load-more:hover {background-color: var(--llpaleblue);}
.no-posts {text-align: center;color: var(--gray);margin-top: 40px;font-size: var(--text-small);}

.feed-item-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.feed-item-link:hover {
    color:var(--llred);
}

/* feed-list 전용 스타일 */
.feed-item.feed-list .feed-list-body {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}


.feed-item.feed-list .feed-list-thumb, .feed-item.feed-list .feed-event-thumb {
    flex-shrink: 0;
        width: 28%;
        height: auto;
        overflow: hidden;
        border-radius: 6px;
}


.feed-item.feed-list .feed-list-thumb img, .feed-item.feed-list .feed-event-thumb img {
width: 100%;
    height: auto;
    /* ✅ 원본 비율 유지 */
    object-fit: contain;
    /* 필요에 따라 contain / cover 선택 가능 */
    display: block;
}

.feed-summary {
    display: -webkit-box;
    /* 한 줄만 표시 */
    -webkit-box-orient: vertical;
    overflow: hidden;
    /* 말줄임 (…) 표시 */
    white-space: normal;
    margin:6px 0 0;
    color:var(--ink);
}

.feed-badge {
    align-self: flex-start;
    display: inline-block;
    padding: .25em .5em;
    border-radius: .375rem;
    font-size: var(--text-tiny);
    font-weight: 600;
    margin-bottom:6px;
}

.status-upcoming {
    background: #eef4ff;
    color: #1e40af;
}

.status-ongoing, .status-today-open {
    background: #ecfdf5;
    color: #065f46;
}

.status-closing, .status-today-close {
    background: #fff7ed;
    color: #9a3412;
}

.status-closed {
    background: #f3f4f6;
    color: #374151;
}

.feed-info {
    display: flex;
    justify-content: space-between;
    gap: .5rem;
    color:var(--ink);
    font-size: var(--text-small);
    font-weight: 500;
    margin-top: 12px;
    padding-left: 4px;
    align-items: center;
}

.feed-stats {
    display: inline-flex;
    gap: 10px;
    cursor: default;
}

.feed-comments,
.feed-reactions {
    white-space: nowrap;
}

.feed-reactions .rx-icon {
    display: inline-block;
    position: relative;
    margin-left: -4px;
    /* ← 살짝 겹치게 */
    transform: translateY(0);
    transition: transform 0.2s ease;
}

.feed-actions {
    display: flex;
    gap: 4px;
}

.feed-actions > button {
    margin: 0;
    padding: 0;
    display: inline-flex;
}

.feed-prompt {
    font-weight: 400;
    margin-left: -4px;
    color:var(--gray);
    font-size: var(--text-tiny);
}

.ratio {
    display: flex;
}


/* ========== 주간 네비게이터 ========== */

.week-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    height:46px;
    border-bottom: 1px solid var(--palegray);
}

.week-nav a {
    text-decoration: none;
}

.week-nav a:hover {
    color: var(--llred);
}

.week-label {width:150px;
text-align: center;
font-size: var(--text-small);
font-weight: 600;}


.week-nav .week-prev,
.week-nav .week-next {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    text-decoration: none;
    line-height: 1;
    color:var(--ink);
}

.week-next-disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}



/* ===== News Tabs (sticky) ===== */
.feed-tabs {
    position: sticky;
    top: 0;
    /* 데스크탑: 상단 고정 */
    z-index: 15;
    background: var(--paper);
}

@media (max-width:1024px) {
    .feed-tabs {
        top: 54px;
    }

    /* 모바일 헤더 높이 보정 */
}

.feed-tabs .tabs {
    display: flex;
    gap: 0;
    /* 탭 간격 (디자인에 맞게 조절) */
    align-items: center;
    padding: 12px 30px 0px;
    border-bottom: 1px solid var(--palegray);
    height:46px;
}

.feed-tabs .tab {
    position: relative;
    display: inline-block;
    padding-bottom: 11px;
    font-weight: 600;
    text-decoration: none;
    color: var(--ink);
    white-space: nowrap;
    width: 100%;
    text-align: center;
    font-size:var(--text-small);
}

.feed-tabs .tab.active {
    color: var(--llred);
}

.feed-tabs .tab:hover {
    color: var(--llred);
}

.feed-tabs .tab.active::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 2px;
    background: var(--llred);
    border-radius: 2px;
}


/* 영상이 썸네일을 대체할 때 */
.feed-thumb--video .ratio {
    width: 100%;
    aspect-ratio: 16 / 9;
    /* 필요시 4/3 등으로 변경 가능 */
    border-radius: 6px;
    overflow: hidden;
    position: relative;
}


.feed-thumb--video iframe,
.feed-thumb--video video,
.feed-thumb--video embed {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    z-index: 2;
    /* <video>에만 적용, iframe은 무시됨 */
}

/* 리스트형(가로 180px 고정)을 쓰는 경우 */
.feed-list-thumb.feed-thumb--video .ratio {
    width: 180px;
    /* 기존 썸네일 가로값과 동일하게 */
    aspect-ratio: 16 / 9;
    /* 높이는 자동 계산 */
}

/* iOS 파란 하이라이트 등 기본 효과 제거(선택) */
.feed-thumb--video iframe {
    border: 0;
}

/* Video Facade 스타일 */
.video-facade {
    position: relative;
    cursor: pointer;
    border-radius: 6px;
}

.video-facade .ratio {
    position: relative;
    padding-bottom: 56.25%;
    /* 16:9 */
    overflow: hidden;
}

.video-facade__thumb,
.video-facade__placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s ease;
}

.video-facade__placeholder {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}


.video-facade__play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    transition: transform 0.2s ease, opacity 0.3s ease;
    z-index: 2;
}

.video-facade__play svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.4));
}

.video-facade:hover .video-facade__play {
    transform: translate(-50%, -50%) scale(1.15);
}


.video-facade.is-loaded .video-facade__play {
    opacity: 0;
    pointer-events: none;
}

/* 로딩 애니메이션 (선택사항) */
.video-facade.is-loaded::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: #000;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    z-index: 1;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* iframe이 로드되면 로딩 스피너 제거 */
.video-facade.is-loaded iframe {
    animation: fadeIn 0.1s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.weekly-summary .feed-list-text {
    width: calc(100% - 92px);
}

.weekly-summary .feed-list-body {
    gap:26px !important;
    justify-content: unset;
}

.weekly-summary .feed-list-thumb {
    width: 96px !important;
    height: 96px !important;
    display: flex;
}

.weekly-summary .feed-list-thumb > img {
    object-fit: cover !important;
}

.weekly-summary .feed-meta {
    overflow: hidden;
}

.weekly-summary .feed-meta span {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    min-width: 0;
}

/*single*/

/* ===== Single Back Topbar ===== */
.single-topbar {
    position: sticky;
    top: 0;
    z-index: 1500;
    background: var(--paper);
    border-bottom: 1px solid var(--palegray);
    height: 46px;
}

.single-topbar-inner {
    height: 46px;
    display: flex;
    align-items: center;
    margin: 0 auto;
    max-width: 1200px;
}

.single-topbar-title {
    position: absolute;
    left: 0;
    right: 0;
    text-align: center;
    font-weight: 600;
    cursor: default;
    font-size: var(--text-small);
}

.back-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    color: #333;
    text-decoration: none;
    border-radius: 10px;
    position: relative;
    z-index: 10;
}

.back-btn:hover {
    color: var(--llred);
}

.back-btn svg {
    pointer-events: none;
}

.entry-byline {
    font-size:var(--text-tiny);
    color:#bbb;
    margin-top:10px;
    display: flex;
    justify-content: space-between;
}

/* 본문 하단 정보 블록 (세로 나열형) */
.ll-info-block {
    margin-bottom: 20px;
    padding: 16px 18px;
    border: 1px solid var(--palegray);
    border-radius: 6px;
    background: var(--shadow);
    font-size: var(--text-small);
}

.ll-info-block a {
    padding-bottom:0;
    border-bottom: none;
    font-weight: 400;
}

.ll-info-block__grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ll-info-block__item {
    display: flex;
    gap: 8px;
    align-items: baseline;
    line-height: 1.6;
}

.ll-info-block__label {
    flex: none;
    font-weight: 500;
    color: var(--ll-text-muted, var(--darkgray));
}

.ll-info-block__value {
    flex: 1;
    color: var(--ink);
    word-break: break-word;
}


.ll-info-block__link {
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* 관련 포스트 */
.ll-related-block {
}

.ll-related-block__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 30px 30px 0;
    border-top:4px solid var(--shadow);
}

.ll-related-block__title {
    font-size: 1rem;
    font-weight: 500;
    margin: 0;
}

.ll-related-block__list {
    display: flex;
    flex-direction: column;
}

/* 태블릿/모바일에서는 싱글 상단 뒤로가기 바 숨김 */
@media (max-width: 1024px) {
    .single-topbar {
        z-index: 0;
    }

    .single-topbar a {
        display: none;
    }

    .single-topbar-pconly {
        display: none;
    }

    .feed-tabs .tabs {
        padding: 13px 20px 0px;
    }
}

@media (max-width: 720px) {

    .feed-wrapper {
        padding-bottom: 0;
    }
    .feed-item-wrapper {
        padding: 20px;
    }
    
    .feed-title {
        font-size: var(--text-h4);
        font-weight: 600;
    }

    .weekly-summary .feed-list-body {
        gap:18px !important;
    }



    .weekly-summary .feed-list-thumb {
        width: 72px !important;
        height: 72px !important;
    }

    .ll-related-block__head {
        padding: 20px 20px 0;
    }

    #ll-load-more {
        width: calc(100% - 40px);
    }

}