@charset "UTF-8";

/* ==========================================================================
   1. 디자인 시스템 변수
   ========================================================================== */
:root {
    /* Background */
    --background-default: #FFFFFF;
    --background-dark: #F2F5F8;
    --background-disable: #C2C2C2;
    --background-highlight: #e0e8ef;
    --background-black: #111111;
    --background-footer: #F2F0EB;
    --background-impact: #011C6B;
    --background-fullbg: #1B2C5E;

    /* Stroke */
    --stroke-primary: #111111;
    --stroke-dashed: #9d9d9d;
    --stroke-separator: #E6E6E6;

    /* Text */
    --text-primary: #111111;
    --text-secondary: #505050;
    --text-description: #767676;

    --text-inverted: #FFFFFF;
    --text-impact: #011C6B;
    --text-impact-light: #abc1ff;

    /* Dim */
    --dim: rgba(0, 0, 0, 0.7);
    --gradient-dimm-bottom: linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, .9));
    --opacity-dim: 0.4;
    --opacity-dim-strong: 0.6;

    /* Arrow */
    --svg-ico-arrow-d-12: url("../../img/ico-arrow-down-12.svg");
    --svg-ico-arrow-r-12: url("../../img/ico-arrow-right-12.svg");
    --svg-ico-arrow-r-16: url("../../img/ico-arrow-right-16.svg");
    --svg-ico-arrow-l-16: url("../../img/ico-arrow-left-16.svg");
    --svg-ico-arrow-tail-t-24: url("../../img/ico-arrow-tail-top-24.svg");

    /* Icon */
    --svg-ico-search-28: url("../../img/ico-search-28.svg");
    --svg-ico-search-40: url("../../img/ico-search-40.svg");
    --svg-ico-share-kakao: url("../../img/ico-share-kakao.svg");
    --svg-ico-share-facebook: url("../../img/ico-share-facebook.svg");
    --svg-ico-share-x: url("../../img/ico-share-x.svg");
    --svg-ico-share-naver: url("../../img/ico-share-naver.svg");
    --svg-ico-share-url: url("../../img/ico-share-url.svg");
    --svg-logo-lifetag: url("../../img/logo-lifetag.svg");
    --svg-logo-lifetag-ft: url("../../img/logo-lifetag-ft.svg");
}

/* ==========================================================================
   2. 웹 폰트
   ========================================================================== */
/* [FONT] 통짜 PretendardVariable.woff2(2MB) @font-face 제거.
   - unicode-range 가 없어 모든 문자에 매칭되므로, jsDelivr dynamic-subset 이 비동기로 바뀐 뒤
     첫 렌더 시점에 이 규칙만 남아 2MB 파일을 통째로 내려받았다(FCP 2.3s → 12.3s 악화).
   - 'Pretendard' 는 resource_view.jsp 의 jsDelivr dynamic-subset(unicode-range 별 분할)으로만 제공한다.
   - 본문 대부분은 self-host 'PretendardKR'(pretendard-kr.woff2) 이 커버한다. */

/* ==========================================================================
   3. 기본 타이포그래피
   ========================================================================== */
h1 {
    line-height: 1.3;
}

h2 {
    font-size: 3.4rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--text-primary);
}

h2.border-t-2 {
    padding-top: 1.8rem;
}

h3 {
    font-size: 2rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.4;
    color: var(--text-primary);
    word-break: keep-all;
}

p {
    line-height: 1.6;
}

.desc {
    margin: 12px 0 20px;
    font-size: 1.6rem;
    line-height: 1.36;
    color: var(--text-description);
}

.cate {
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--text-impact);
}

time[class*="meta"] {
    display: block;
    font-size: 1.5rem;
    color: var(--text-secondary);
}

.info-box {
    display: flex;
    align-items: center;
    gap: 5px;
}

.info-box .cate {
    margin-bottom: 0;
}

.info-box time[class*="meta"] {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.info-box time[class*="meta"]::before {
    content: '';
    display: inline-block;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background-color: currentColor;
    opacity: 0.3;
}

.title-wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4rem;
}

.title-wrap .section-title {
    padding-bottom: 0;
    margin-bottom: 0;
}

.txt-box .cate {
    display: inline-block;
}

nav li,
.button {
    line-height: 1.2;
}

.btn-more {
    display: flex;
    gap: 6px;
    align-items: center;
    font-size: 1.5rem;
    line-height: 1.2;
}

/* ==========================================================================
   4. 공통 버튼 컴포넌트
   ========================================================================== */
.keyword-box {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem 0.8rem;
    margin-bottom: 1.2rem;
}

.keyword-tag {
    position: relative;
    display: inline-block;
    padding: 0 2px;
    font-size: 1.4rem;
    font-weight: 500;
    letter-spacing: -0.02em;
    line-height: 1.4;
    color: var(--text-primary);
    z-index: 1;
    transition: all 0.2s ease;
}

.keyword-tag::before {
    content: '# ';
}

.keyword-tag::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 0;
    width: 100%;
    height: 26%;
    background-color: rgba(102, 141, 255, 0.45);
    border-radius: 2px;
    z-index: -1;
}

.slide-buttons {
    display: flex;
    gap: 8px;
    align-items: center;
}

.slide-buttons button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background-color: var(--background-default);
    border-radius: 50%;
    border: 1px solid var(--stroke-separator);
    transition: background-color 0.2s ease;
    cursor: pointer;
}

.btn-hero-prev,
.btn-hero-next {
    background-color: var(--background-default) !important;
}

.slide-buttons button:hover {
    background-color: var(--background-highlight) !important;
    border: 1px solid var(--background-highlight) !important;
}

.btn-tab {
    height: 45px;
    padding: 0 24px;
    font-size: 1.7rem;
    font-weight: 500;
    line-height: 45px;
    color: var(--text-description);
    background-color: var(--background-default);
    border: 1px solid var(--stroke-separator);
    border-radius: 22px;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.btn-tab:hover {
    color: var(--text-primary);
    background-color: var(--background-highlight);
    border: 1px solid var(--background-highlight);
}

.btn-tab.active {
    background-color: var(--background-black);
    color: var(--text-inverted);
}

.btn-layer-close {
    display: none;
    position: absolute;
    bottom: -7.6rem;
    left: 50%;
    transform: translateX(-50%);
    width: 52px;
    height: 52px;
    background-color: #FFFFFF;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.btn-layer-close::before,
.btn-layer-close::after {
    content: '';
    position: absolute;
    width: 2.0rem;
    height: 2px;
    background-color: var(--stroke-primary);
}

.btn-layer-close::before {
    transform: rotate(45deg);
}

.btn-layer-close::after {
    transform: rotate(-45deg);
}

/* ==========================================================================
   5. 유틸리티 클래스
   ========================================================================== */
.section-title {
    padding-bottom: 4rem;
}

.section-title:has(.blind) {
    padding: 0;
}

.section-title:has(.ico-arrow-long) {
    padding-bottom: 0;
}

.txt-ellipsis {
    display: block;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.txt-ellipsis-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    text-overflow: ellipsis;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ==========================================================================
   6. 아이콘 및 그래픽 요소
   ========================================================================== */
[class*="ico-arrow-"] {
    display: inline-block;
    background-repeat: no-repeat;
    background-position: center;
}

.ico-arrow-down-12 {
    width: 12px;
    height: 12px;
    background-image: var(--svg-ico-arrow-d-12);
}

.ico-arrow-right-12 {
    width: 12px;
    height: 12px;
    background-image: var(--svg-ico-arrow-r-12);
}

.ico-arrow-left-16 {
    width: 16px;
    height: 16px;
    background-image: var(--svg-ico-arrow-l-16);
}

.ico-arrow-right-16 {
    width: 16px;
    height: 16px;
    background-image: var(--svg-ico-arrow-r-16);
}

.btn-search {
    background: var(--svg-ico-search-28) no-repeat center;
}

.ico-search {
    display: inline-block;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    vertical-align: middle;
}

.ico-search.sm {
    width: 28px;
    height: 28px;
    background-image: var(--svg-ico-search-28);
    background-size: 28px;
}

.ico-search.lg {
    width: 50px;
    height: 50px;
    background-image: var(--svg-ico-search-40);
    background-size: 38px;
}


/* ==========================================================================
   7. 컴포넌트
   ========================================================================== */
.img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

a:hover .img-box img {
    transform: scale(1.05);
}

.popular-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3.4rem 3rem;
}

.card-popular {
    position: relative;
    aspect-ratio: 1 / .94;
    border-radius: 20px;
    overflow: hidden;
}

.card-popular a {
    display: block;
    width: 100%;
    height: 100%;
}

.card-popular .img-box {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.img-box img {
    transition: transform 0.4s ease;
}

.card-popular a::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 30%, rgba(0, 0, 0, 0.85) 100%);
    z-index: 2;
}

.card-popular .rank-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 3;
    width: 36px;
    height: 36px;
    background-color: color-mix(in srgb, var(--text-inverted) 50%, transparent);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 1.4rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-popular .txt-box {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 24px;
    z-index: 3;
}

.card-popular .txt-box .cate {
    color: var(--text-impact-light);
}

.card-popular .txt-box .title {
    color: var(--text-inverted);
    font-size: 2.2rem;
    margin-bottom: 10px;
}

.card-popular .txt-box .meta {
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.4rem;
}

.card-popular a:hover .img-box img {
    transform: scale(1.06);
}

.keyword-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0 6rem;
}

.keyword-grid .card-list:nth-last-child(-n+2) {
    border-bottom: none;
}


/* 이미지 가로형 리스트 */
.card-list {
    border-bottom: 1px solid var(--stroke-separator);
}

.card-list:last-child {
    border-bottom: none;
}

.card-list a {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1.8rem;
    padding: 2rem 0;
}

.card-list .txt-box {
    flex: 1;
}

.card-list .txt-box .title {
    font-size: 2rem;
    font-weight: 600;
    line-height: 1.4;
    margin-top: 10px;
    margin-bottom: 14px;
}

.card-list .txt-box:has(.keyword-box) .title {
    margin-top: 0;
    margin-bottom: 6px;
}

.card-list .img-box {
    flex-shrink: 0;
    width: 174px;
    height: 116px;
    border-radius: 12px;
    overflow: hidden;
}

.card-list .img-box--sqaure {
    width: 110px;
    height: 110px;
}

.card-list .keyword-tag {
    color: var(--text-description);
}

.card-list .keyword-tag::after {
    content: none;
}

.card-vertical a {
    display: flex;
    flex-direction: column;
}

.card-vertical .img-box {
    width: 100%;
    aspect-ratio: 16 / 10;
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 16px;
}

.card-vertical .txt-box .title {
    margin-bottom: 10px;
    min-height: 5.6rem;
}

.progress-bar {
    position: relative;
    width: 14rem;
    height: 3px;
    margin: 3.5rem auto 0;
    background-color: #E5E8EB;
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    position: absolute;
    top: 0;
    left: 0;
    width: 0%;
    height: 100%;
    background-color: var(--background-black);
    transition: width 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 6rem;
}

.pagination .page-number,
.pagination [class^="btn-page-"] {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    font-size: 1.6rem;
    font-weight: 500;
    color: var(--text-secondary);
    border-radius: 50%;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.pagination .page-number:hover {
    background-color: var(--background-dark);
    color: var(--text-primary);
}

.pagination .page-number.active {
    background-color: var(--background-impact);
    color: var(--text-inverted);
    font-weight: 700;
}

.pagination .btn-page-prev {
    background: var(--background-dark) var(--svg-ico-arrow-l-16) no-repeat center / 12px;
}

.pagination .btn-page-next {
    background: var(--background-dark) var(--svg-ico-arrow-r-16) no-repeat center / 12px;
}

.pagination [class^="btn-page-"]:hover {
    background-color: var(--background-highlight);
}

.pagination [class^="btn-page-"].disabled {
    opacity: 0.25;
    pointer-events: none;
    cursor: default;
}

.search-input-box {
    position: relative;
    width: 100%;
    max-width: 640px;
    height: 64px;
    margin: 0 auto;
    border-bottom: 2px solid var(--stroke-primary);
    box-sizing: border-box;
}

.search-input-box input[type="text"] {
    width: 100%;
    height: 100%;
    padding: 0 60px 0 5px;
    border: none;
    background: transparent;
    font-size: 3.6rem;
    font-weight: 600;
    color: var(--text-primary);
    box-sizing: border-box;
    outline: none;
}

.search-input-box input[type="text"]::placeholder {
    color: var(--background-disable);
    font-weight: 400;
}

.search-input-box button {
    position: absolute;
    top: 50%;
    right: 5px;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 59vh;
    max-width: 1200px;
    margin: 0 auto;
    padding: 5rem 2rem 0 !important;
}

.error-box {
    text-align: center;
}

.error-box-title {
    display: block;
    margin-bottom: 2rem;
    font-size: 14rem;
    font-weight: 400;
    line-height: 1;
}

.error-box-subtitle {
    display: block;
    font-size: 3rem;
    font-weight: 600;
}

.error-box-desc {
    font-size: 16px;
}

.error-btn {
    display: flex;
    gap: 1rem;
    margin-top: 5rem;
}

.btn-style {
    display: block;
    height: 50px;
    padding: 0 24px;
    font-size: 1.7rem;
    font-weight: 500;
    line-height: 51px;
    border-radius: 25px;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.btn-style--primary {
    color: var(--text-inverted);
    background-color: var(--background-impact);
}

.btn-style--ghost {
    color: var(--text-primary);
    background-color: var(--background-default);
    border: 1px solid var(--stroke-separator);
}


@media (max-width: 768px) {
    h3 {
        font-size: 2.2rem;
    }

    .btn-more {
        text-indent: -9999px;
        font-size: 0;
    }

    .btn-more .ico-arrow-right-12 {
        width: 30px;
        height: 30px;
        background-size: 20px;
        margin-right: -5px;
    }

    time[class*="meta"] {
        font-size: 1.4rem;
    }

    .title-wrap {
        margin-bottom: 2.8rem;
    }

    .section-title {
        padding-bottom: 2.8rem;
        font-size: 2.4rem;
    }

    .cate {
        font-size: 1.4rem;
    }

    .txt-box .cate {
        margin-bottom: 0;
    }

    .card-list a {
        gap: 1.4rem;
    }

    .card-list .txt-box .title {
        margin-bottom: .4rem;
        font-size: 1.8rem;
    }

    .card-list .img-box {
        width: 136px;
        height: 100px;
    }

    .card-list .img-box--sqaure {
        width: 100px;
        height: 100px;
    }

    .card-list:last-child a {
        padding-bottom: 0;
    }

    .ico-search.lg {
        width: 46px;
        height: 46px;
        background-size: 28px;
    }

    .btn-layer-close {
        bottom: -6.2rem;
        width: 46px;
        height: 46px;
    }

    .search-input-box {
        height: 58px;
    }

    .search-input-box input[type="text"] {
        padding-right: 55px;
        font-size: 2.2rem;
    }

    .slide-buttons button {
        width: 40px;
        height: 40px;
    }

    .progress-bar {
        width: 100px;
        margin-top: 2.4rem;
    }

    .keyword-grid {
        grid-template-columns: 1fr;
    }

    .popular-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2.4rem 1rem;
    }

    .popular-grid> :nth-child(1 of .card-popular) {
        grid-column: span 2;
    }

    .popular-grid> :nth-child(n+2 of .card-popular) {
        grid-column: span 1;
        aspect-ratio: unset;
        border-radius: unset;
    }

    .popular-grid> :nth-child(n+2 of .card-popular) .rank-badge {
        top: 10px;
        right: 10px;
        width: 32px;
        height: 32px;
    }

    .popular-grid> :nth-child(n+2 of .card-popular) .img-box,
    .popular-grid> :nth-child(n+2 of .card-popular) .txt-box {
        position: relative;
        top: unset;
        bottom: unset;
        left: unset;
    }

    .popular-grid> :nth-child(n+2 of .card-popular) .img-box {
        aspect-ratio: 1 / .94;
        width: auto;
        height: auto;
        border-radius: 12px;
        overflow: hidden;
    }

    .popular-grid> :nth-child(n+2 of .card-popular) .txt-box {
        padding: 5px 0 0;
    }

    .popular-grid> :nth-child(n+2 of .card-popular) .txt-box .title {
        font-size: 1.6rem;
    }

    .popular-grid> :nth-child(n+2 of .card-popular) a::before {
        content: none;
    }

    .card-popular .txt-box .title {
        margin-bottom: 4px;
    }

    .card-popular .txt-box .cate {
        color: var(--text-impact);
    }

    .error-box-title {
        font-size: 10rem;
    }
}