/* ==========================================================================
   서브 타이틀 영역
   ========================================================================== */
.title-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6rem;
    padding-bottom: 4rem;
    border-bottom: 1px solid var(--stroke-separator);
}

.title-wrap .section-title {
    padding-bottom: 0;
}

.title-wrap h2 {
    font-size: 4rem;
}

.sub-filter-tabs {
    display: flex;
    gap: 8px;
}

.sub-filter-tabs .btn-tab {
    width: 124px;
    height: 50px;
    text-align: center;
    font-size: 1.8rem;
    line-height: 50px;
    border-radius: 25px;
}

/* ==========================================================================
   인기글 콘텐츠
   ========================================================================== */
.card-popular-wide {
    margin-bottom: 5rem;
}

.card-popular-wide a {
    display: flex;
    gap: 30px;
}

.card-popular-wide .card-popular {
    width: 100%;
    max-width: calc(33.333333% - 20px);
}

.card-popular-wide .txt-box {
    flex-grow: 1;
    padding-top: 2rem;
}

.card-popular-wide h3 {
    text-wrap: balance;
    font-size: 3.4rem;
    font-weight: 700;
}

/* ==========================================================================
   카테고리 히어로 슬라이더
   ========================================================================== */
.category-swiper-wrap {
    position: relative;
    width: 100%;
    margin-bottom: 8rem;
    box-sizing: border-box;
    min-width: 0;
}

.category-swiper {
    width: 100%;
    height: 380px;
    border-radius: 24px;
    overflow: hidden;
}

.category-swiper .swiper-slide {
    position: relative;
    width: 740px;
    height: 100%;
    border-radius: 24px;
    overflow: hidden;
    opacity: 0.4;
    transform: scale(0.95);
    transition: opacity 0.4s ease, transform 0.4s ease;
    box-sizing: border-box;
}

.category-swiper .swiper-slide.swiper-slide-active {
    opacity: 1;
    transform: scale(1);
}

.category-swiper .swiper-slide a {
    display: block;
    width: 100%;
    height: 100%;
}

.category-swiper .img-box {
    width: 100%;
    height: 100%;
}

.category-swiper .img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.category-swiper .swiper-slide::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;
    pointer-events: none;
}

.category-swiper .txt-box {
    box-sizing: border-box;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    width: auto;
    padding: 3.8rem 3.8rem 2.8rem;
    z-index: 3;
    box-sizing: border-box;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.category-swiper .swiper-slide.swiper-slide-active .txt-box {
    opacity: 1;
}

.category-swiper .txt-box .cate {
    color: var(--text-impact-light);
}

.category-swiper .txt-box .title {
    margin-bottom: 6px;
    font-size: 3.4rem;
    font-weight: 700;
    line-height: 1.26;
    color: var(--text-inverted);
    text-wrap: balance;
}

.category-swiper .info-box {
    margin-top: 18px;
}

.category-swiper .txt-box .meta {
    color: color-mix(in srgb, var(--text-inverted) 80%, transparent);
}

.category-swiper .info-box time[class*="meta"]::before {
    background-color: #ffff;
}

.category-swiper .keyword-tag {
    font-size: 1.4rem;
    color: var(--text-inverted);
}

.category-swiper-wrap .slide-buttons button {
    position: absolute;
    top: calc(50% - 18px);
    transform: translateY(-50%);
    width: 4.8rem;
    height: 4.8rem;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
    z-index: 10;
}

.category-swiper-wrap .btn-slide-prev {
    left: -2.4rem;
}

.category-swiper-wrap .btn-slide-next {
    right: -2.4rem;
}

.category-swiper-wrap .progress-bar {
    margin: 3.5rem auto 0;
}

/* ==========================================================================
   검색 결과 페이지 전용 스타일
   ========================================================================== */
.search-page-header {
    display: flex;
    justify-content: center;
    margin-bottom: 10rem;
}

.search-summary-wrap {
    padding-bottom: 3rem;
}

.search-summary-text {
    font-size: 3rem;
    font-weight: 600;
    color: var(--text-primary);
}

.search-summary-text .count {
    margin: 0 2px;
    color: var(--text-impact);
}

.search-empty-container {
    padding-bottom: 4rem;
}

.search-empty-box {
    padding: 2rem 0 10rem;
}

.search-empty-box .icon-area {
    text-align: center;
}

.search-empty-box .ico-search-none {
    display: inline-block;
    width: 12.0rem;
    height: 12.0rem;
    margin-bottom: 3.2rem;
    background: url(../../img/frown.svg) no-repeat center / contain;
}

.search-empty-box .empty-msg {
    text-align: center;
    font-size: 2.4rem;
    font-weight: 500;
    color: var(--text-black);
    letter-spacing: -0.05rem;
    word-break: keep-all;
}

.search-empty-box .search-keyword {
    color: var(--background-impact);
    font-weight: 700;
}

.search-tips-box {
    max-width: 88rem;
    margin: 0 auto;
    padding: 4.6rem 5rem;
    background-color: var(--background-dark);
    border-radius: 20px;
    text-align: left;
}

.tips-list li {
    position: relative;
    padding-left: 1.6rem;
    font-size: 1.6rem;
    line-height: 1.4;
    color: var(--text-secondary);
}

.tips-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: .9rem;
    width: 0.4rem;
    height: 0.4rem;
    background-color: var(--background-disable);
    border-radius: 50%;
}

.tips-list li+li {
    margin-top: 1rem;
}

@media (max-width: 768px) {
    .main section {
        padding-top: 2rem;
    }

    .title-wrap {
        flex-direction: column;
        align-items: flex-start;
        gap: 2.6rem;
        margin-bottom: 3.4rem;
        padding: 0;
        border: none;
    }

    .title-wrap h2 {
        font-size: 2.4rem;
    }

    .sub-filter-tabs {
        display: flex;
        gap: 6px;
        width: 100%;
    }

    .sub-filter-tabs .btn-tab {
        flex: 1;
        min-width: 0;
        width: auto;
        height: 42px;
        font-size: 1.5rem;
        line-height: 42px;
        padding: 0 4px;
        text-align: center;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .card-popular-wide {
        margin-bottom: 2.4rem;
    }

    .card-popular-wide a {
        display: block;
        width: 100%;
        height: 100%;
    }

    .card-popular-wide .card-popular {
        max-width: unset;
    }

    .card-popular-wide .txt-box {
        width: 100%;
        padding-top: 1.2rem;
        z-index: 3;
    }

    .card-popular-wide h3 {
        font-size: 2.2rem;
        margin-bottom: 1rem;
    }

    .card-popular-wide .desc {
        display: none;
    }

    .card-popular .img-box,
    .card-popular .txt-box {
        position: relative;
        top: unset;
        bottom: unset;
        left: unset;
    }

    .card-popular .img-box {
        aspect-ratio: 1 / .94;
        width: auto;
        height: auto;
        border-radius: 12px;
        overflow: hidden;
    }

    .card-popular .txt-box {
        padding: 5px 0 0;
    }

    .card-popular .txt-box .title {
        font-size: 1.6rem;
        color: var(--text-primary);
    }

    .card-popular a::before {
        display: none;
    }

    .popular-grid> :nth-child(1 of .card-popular) {
        aspect-ratio: unset;
        grid-column: span 1;
        overflow: visible;
    }

    .card-popular .txt-box .meta {
        color: var(--text-description);
    }

    .category-swiper-wrap {
        margin-bottom: 4rem;
    }

    .category-swiper {
        aspect-ratio: 16 / 10;
        height: auto;
        border-radius: 12px;
    }

    .category-swiper .swiper-slide {
        width: 100%;
        border-radius: 12px;
    }

    .category-swiper .txt-box {
        padding: 0 2rem 1.6rem;
    }

    .category-swiper .keyword-box {
        gap: 4px 6px;
        margin-bottom: 10px;
    }

    .category-swiper .keyword-tag {
        font-size: 1.3rem;
        padding: 0 2px;
    }

    .category-swiper .txt-box .title {
        margin-bottom: 4px;
        text-wrap: unset;
        font-size: 2.2rem;
    }

    .category-swiper .info-box {
        margin-top: 6px;
    }

    .search-page-header {
        margin-bottom: 4rem;
    }

    .search-summary-wrap {
        padding-bottom: 0;
    }

    .search-summary-text {
        font-size: 2.4rem;
    }

    .search-empty-box {
        padding-bottom: 8rem;
    }

    .search-tips-box {
        padding: 2.4rem 2rem;
    }

    .tips-list li {
        font-size: 1.5rem;
    }

    .section-keyword .title-wrap {
        flex-direction: row;
    }

    .section-keyword .popular-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .section-keyword .popular-grid .img-box {
        aspect-ratio: 16 / 10 !important;
    }

    .section-keyword .popular-grid .txt-box .title {
        font-size: 2.2rem !important;
    }

}