@charset "UTF-8";

/* ================================
   통합검색 기본
================================ */
.search-wrap {
    font-size: 16px;
    line-height: 1.6;
    color: #333;
}

.hover-underline:hover {
    text-decoration: underline !important;
}

.result-text,
.result-content {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    text-overflow: ellipsis;
}

/* ================================
   검색 영역
================================ */
.cont-databox {
    padding: 30px 40px;
    margin-bottom: 20px;
    background: #f5f8fc;
    border-radius: 10px;
}

.cont-databox .form-select,
.cont-databox .form-control {
    height: 52px !important;
    padding: 0 16px !important;
    border-radius: 6px !important;
    font-size: 16px !important;
    line-height: 1.4 !important;
}

.cont-databox .btn {
    height: 52px !important;
    padding: 0 18px !important;
    border-radius: 6px !important;
    font-size: 15px !important;
    font-weight: 600;
}

@media (max-width: 1200px) {
    .cont-databox {
        padding: 20px 30px;
    }
}

@media (max-width: 768px) {
    .cont-databox {
        padding: 15px 20px;
    }

    .cont-databox .form-select,
    .cont-databox .form-control,
    .cont-databox .btn {
        height: 40px !important;
        font-size: 15px !important;
    }
}

/* ================================
   상세검색
================================ */
#detailSearch .card-body {
    padding: 20px 22px !important;
    font-size: 15px;
}

#detailSearch p {
    font-size: 15px !important;
}

#detailSearch .btn-group {
    flex-wrap: wrap;
}

#detailSearch .btn {
    height: 34px !important;
    padding: 0 14px !important;
    font-size: 14px !important;
}

/* ================================
   검색 결과 요약
================================ */
.search-box {
    padding: 20px 0;
    font-size: 18px;
}

.search-box span {
    font-size: 18px;
    font-weight: 600;
}

@media (max-width: 576px) {
    .search-box,
    .search-box span {
        font-size: 16px;
    }
}

/* ================================
   검색 결과 탭
================================ */
.search-menu-link {
    border-bottom: 1px solid #dfe5ec !important;
}

.category-menu-area {
    position: relative;
    z-index: 30;
    width: 100%;
    margin-bottom: 24px;
    overflow: visible;
    background: #fff;
    isolation: isolate;
}

/* PC 탭 */
.category-tabs {
    position: relative;
    z-index: 31;
    display: flex;
    align-items: stretch;
    width: 100%;
    min-width: 0;
    height: 60px;
    overflow: visible;
    white-space: nowrap;
    border-bottom: 1px solid #d8e0e9;
    background: #fff;
}

.category-tabs > .cat-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 1 1 auto;
    min-width: 105px;
    height: 60px;
    padding: 0 18px;
    border: 0;
    background: #fff;
    color: #666;
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    box-sizing: border-box;
}

.category-tabs > .cat-tab:hover {
    color: #0c4689;
}

.category-tabs > .cat-tab.active {
    border-bottom: 3px solid #12629b;
    background: #f1f5fa;
    color: #0c4689;
    font-weight: 700;
}

/* 더보기 메뉴 안으로 이동한 탭 */
.category-extra-items {
    display: none;
}

/* PC 탭 더보기 */
.category-more-wrap {
    position: relative;
    z-index: 100;
    display: none;
    flex: 0 0 auto;
    height: 60px;
}

.category-more-toggle {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-width: 105px;
    height: 60px;
    padding: 0 18px;
    border: 0;
    background: #fff;
    color: #666;
    font-size: 15px;
    cursor: pointer;
    white-space: nowrap;
}

.category-more-toggle:hover {
    color: #0c4689;
}

.category-more-toggle i {
    font-size: 15px;
}

.category-more-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 10px;
    background: #12629b;
    color: #fff;
    font-size: 11px;
    line-height: 1;
}

/* PC 더보기 드롭다운 */
.category-more-menu {
    position: absolute;
    z-index: 1000;
    top: 60px;
    right: 0;
    display: none;
    min-width: 145px;
    border: 1px solid #e4e9ef;
    border-radius: 0 0 8px 8px;
    background: #fff;
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.12);
}

.category-more-wrap.is-open .category-more-menu {
    display: block;
}

.category-more-menu .cat-tab {
    display: flex !important;
    align-items: center;
    width: 100%;
    min-width: 0;
    height: 42px;
    padding: 0 18px;
    border: 0;
    background: #fff;
    color: #666;
    font-size: 14px;
    text-align: left;
    white-space: nowrap;
}

.category-more-menu .cat-tab:hover {
    background: #f5f8fb;
    color: #0c4689;
}

.category-more-menu .cat-tab.active {
    background: #f1f5fa;
    color: #0c4689;
    font-weight: 700;
}

/* 모바일 */
@media (max-width: 991.98px) {
    .category-menu-area {
        margin-bottom: 24px;
    }

    .search-side-stack {
        margin-bottom: 24px;
    }
}

/* ================================
   모바일 검색 결과 탭 선택 메뉴
================================ */
.category-mobile-select-wrap {
    position: relative;
    z-index: 101;
    display: none;
    width: 100%;
}

.category-mobile-select {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: 50px;
    padding: 0 16px;
    border: 1px solid #e4e9ef;
    border-radius: 8px;
    outline: 0;
    background: #fff;
    color: #4d5863;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    text-align: left;
    box-sizing: border-box;
    cursor: pointer;
}

.category-mobile-select:hover {
    border-color: #d5dce5;
}

.category-mobile-select[aria-expanded="true"] {
    border-color: #12629b;
    border-radius: 8px 8px 0 0;
    box-shadow: 0 0 0 2px rgba(18, 98, 155, 0.06);
}

.category-mobile-select-text {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.category-mobile-select-icon {
    flex: 0 0 auto;
    margin-left: 12px;
    color: #718096;
    font-size: 13px;
    transition: transform 0.15s ease;
}

.category-mobile-select[aria-expanded="true"] .category-mobile-select-icon {
    transform: rotate(180deg);
}


.category-mobile-select-menu {
    position: absolute;
    z-index: 1100;
    top: 60px;
    right: 0;
    left: 0;
    display: none;
    overflow: hidden;
    border: 1px solid #e4e9ef;
    border-top: 0;
    border-radius: 0 0 8px 8px;
    background: #fff;
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.14);
}

.category-mobile-select-menu.is-open {
    display: block;
}

.category-mobile-option {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 42px;
    padding: 0 16px;
    border: 0;
    background: #fff;
    color: #4d5863;
    font-size: 14px;
    font-weight: 500;
    text-align: left;
    box-sizing: border-box;
    cursor: pointer;
}

.category-mobile-option:hover {
    background: #f5f8fb;
    color: #0c4689;
}

.category-mobile-option.active {
    background: #f1f5fa;
    color: #0c4689;
    font-weight: 700;
}

.category-mobile-option.active::after {
    margin-left: auto;
    color: #12629b;
    content: "✓";
    font-size: 13px;
    font-weight: 700;
}

@media (max-width: 768px) {
    .category-menu-area {
        z-index: 100;
        margin-bottom: 20px;
    }

    .category-tabs {
        display: none;
    }

    .category-mobile-select-wrap {
        position: relative;
        z-index: 101;
        display: block;
        padding: 10px 0;
    }

    .category-mobile-select-menu {
        z-index: 1100;
        top: 60px;
    }
}

@media (min-width: 769px) {
    .category-mobile-select-wrap {
        display: none;
    }
}

/* ================================
   검색 결과 섹션
================================ */
.cont-accent {
    position: relative;
    padding-top: 7px;
    margin: 40px 0 20px;
    color: #0c4689;
    font-size: 25px !important;
    font-weight: 700;
    line-height: 1.4;
}

.cont-accent::before {
    position: absolute;
    top: 0;
    left: 0;
    width: 22px;
    height: 3px;
    background: #0c4689;
    content: "";
}

.result-section > .result-section-header small {
    font-size: 15px !important;
}

.result-section > .result-section-header .result-more {
    font-size: 15px !important;
}

/* ================================
   검색 결과 항목
================================ */
.result-section .result-item {
    display: block;
    padding: 16px 0 !important;
    margin: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

.result-section .result-item:first-child {
    padding-top: 0 !important;
}

.result-section .result-item:last-child {
    padding-bottom: 0 !important;
}

.result-section .result-item .result-title {
    display: block;
    margin: 0 0 7px !important;
    color: #222 !important;
    font-size: 21px !important;
    font-weight: 700 !important;
    line-height: 1.5 !important;
}

.result-section .result-item .result-text,
.result-section .result-item .result-content {
    margin: 0 0 7px !important;
    color: #666 !important;
    font-size: 17px !important;
    line-height: 1.7 !important;
}

.result-section .result-item .result-date {
    color: #666;
    font-size: 15px;
    line-height: 1.5;
}

.result-section .result-item strong,
.result-section .result-item .highlight {
    color: #0c4689;
    font-weight: 700;
}

.result-section {
    margin-bottom: 45px;
}

.result-section:last-child {
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .result-section .result-item {
        padding: 14px 0 !important;
    }

    .result-section .result-item .result-title {
        font-size: 19px !important;
    }

    .result-section .result-item .result-text,
    .result-section .result-item .result-content {
        font-size: 16px !important;
        line-height: 1.7 !important;
    }

    .result-section .result-item .result-date {
        font-size: 14px !important;
    }
}

@media (max-width: 576px) {
    .result-section .result-item .result-title {
        font-size: 18px !important;
    }

    .result-section .result-item .result-text,
    .result-section .result-item .result-content {
        font-size: 15px !important;
    }
}

/* ================================
   사이드 카드 공통
================================ */
/*
 * 탭 영역보다 낮은 레이어를 부여한다.
 * 따라서 탭의 PC 더보기/모바일 드롭다운 메뉴가
 * 최근 검색어 또는 인기검색어 카드 뒤에 가려지지 않는다.
 */
.search-side-stack {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 16px;
}

.popular-keyword-box,
.recent-keyword-box {
    position: relative;
    z-index: 1;
    border: 1px solid #e4e9ef;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 3px 12px rgba(31, 59, 86, 0.08);
}

.popular-keyword-box {
    z-index: 10;
    overflow: visible;
}

.recent-keyword-box {
    z-index: 1;
    overflow: hidden;
}

/* ================================
   인기검색어
================================ */
.popular-keyword-inner {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 54px;
    padding: 0 18px;
    border-radius: 12px;
}

.popular-keyword-title {
    flex: 0 0 auto;
    margin-right: 8px;
    overflow: hidden;
    color: #172b4d;
    font-size: 16px;
    font-weight: 800;
    line-height: 1.4;
    letter-spacing: -0.5px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#popularKeywordCurrent {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
    height: 54px;
    cursor: pointer;
}

#popularKeywordArrow {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 24px;
    width: 24px;
    height: 54px;
    padding: 0;
    border: 0;
    background: none;
    color: #718096;
    font-size: 11px;
    cursor: pointer;
}

#popularKeywordPanel {
    position: absolute;
    z-index: 1000;
    top: 100%;
    right: -1px;
    left: -1px;
    display: none;
    overflow: hidden;
    border: 1px solid #e4e9ef;
    border-radius: 0 0 12px 12px;
    background: #fff;
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.14);
}

.popular-keyword-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-bottom: 1px solid #edf0f3;
    background: #f8fafc;
}

.popular-keyword-panel-header > span:first-child {
    color: #0c4689;
    font-size: 13px;
    font-weight: 800;
}

.popular-keyword-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 10px;
    background: #eef3fa;
    color: #0c4689;
    font-size: 10px;
    font-weight: 700;
}

.popular-keyword-panel-info {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-left: auto;
    flex: 0 0 auto;
}

.popular-keyword-period {
    color: #666;
    font-size: 11px;
    font-weight: 400;
    line-height: 1.4;
    white-space: nowrap;
}

.popular-keyword-list {
    padding: 7px 0;
    margin: 0;
    list-style: none;
}

.popular-keyword-list li {
    min-height: 32px;
    border-bottom: 1px solid #f1f3f5;
}

.popular-keyword-list li:last-child {
    border-bottom: 0;
}

.popular-keyword-link {
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 32px;
    padding: 4px 14px;
    color: #333;
    text-decoration: none;
    transition: background 0.15s ease;
}

.popular-keyword-link:hover {
    background: #f5f8fb;
}

.popular-keyword-rank {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 24px;
    width: 24px;
    height: 24px;
    border-radius: 4px;
    background: #12629b;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
}

.popular-keyword-rank.top {
    background: #e0362f;
}

.popular-keyword-value {
    display: block;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    color: #4d5863;
    font-size: 13px;
    font-weight: 500;
    line-height: 24px;
    letter-spacing: -0.2px;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: color 0.15s ease;
}

.popular-keyword-rank.top + .popular-keyword-value {
    font-weight: 700;
}

.popular-keyword-link:hover .popular-keyword-value {
    color: #155d91;
}

.popular-keyword-empty {
    padding: 18px 14px;
    color: #8793a0;
    font-size: 12px;
    text-align: center;
}

.popular-current-rank {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 24px;
    width: 24px;
    height: 24px;
    margin-right: 9px;
    border-radius: 4px;
    background: #12629b;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
}

.popular-current-rank.top {
    background: #e0362f;
}

.popular-current-keyword {
    display: block;
    min-width: 0;
    overflow: hidden;
    color: #4d5863;
    font-size: 14px;
    font-weight: 500;
    line-height: 24px;
    letter-spacing: -0.2px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ================================
   내가 찾은 검색어
================================ */
.recent-keyword-box {
    width: 100%;
}

.recent-keyword-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 54px;
    padding: 0 18px;
    border-bottom: 1px solid #e1e6ec;
    background: #f5f8fc;
}

.recent-keyword-header > span,
.recent-keyword-title {
    color: #172b4d;
    font-size: 16px;
    font-weight: 800;
    line-height: 1.4;
    letter-spacing: -0.5px;
    white-space: nowrap;
}

.recent-keyword-header button,
.recent-keyword-clear {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 0;
    border-radius: 5px;
    background: transparent;
    color: #718096;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.recent-keyword-header button:hover,
.recent-keyword-clear:hover {
    background: #e8eef5;
    color: #d9534f;
}

.recent-keyword-header button:focus-visible,
.recent-keyword-clear:focus-visible {
    outline: 2px solid #1769aa;
    outline-offset: 2px;
}

.recent-keyword-panel {
    padding: 14px 16px 12px;
    background: #fff;
}

.recent-keyword-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.recent-keyword-item {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    min-height: 32px;
    padding: 0;
}

.recent-keyword-link {
    display: flex;
    align-items: center;
    flex: 1;
    gap: 9px;
    min-width: 0;
    padding: 3px 0;
    border-radius: 4px;
    color: #4d5863;
    text-decoration: none;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.recent-keyword-link:hover {
    background: #f5f8fb;
    color: #155d91;
}

/* 최근 검색어 순위는 모두 파란색 */
.recent-keyword-rank,
.recent-keyword-rank.top,
.recent-keyword-rank.normal {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 24px;
    width: 24px;
    height: 24px;
    border-radius: 4px;
    background: #12629b;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
}

.recent-keyword-text {
    display: block;
    min-width: 0;
    overflow: hidden;
    color: #4d5863;
    font-size: 14px;
    font-weight: 500;
    line-height: 24px;
    letter-spacing: -0.2px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.recent-keyword-delete-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 22px;
    width: 22px;
    height: 24px;
    padding: 0;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: #a0aab4;
    font-size: 12px;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.recent-keyword-delete-btn:hover {
    background: #f1f4f7;
    color: #d9534f;
	width: 22px;
}

.recent-keyword-delete-btn:focus-visible {
    outline: 2px solid #1769aa;
    outline-offset: 1px;
}

.recent-keyword-empty {
    padding: 18px 0;
    color: #8793a0;
    font-size: 12px;
    text-align: left;
}

.recent-keyword-guide {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid #edf0f3;
    color: #8a949e;
    font-size: 12px;
    line-height: 1.5;
}

/* ================================
   검색 오류 및 안내 카드
================================ */
.search-notice .search-notice-title {
    font-size: 21px !important;
}

.search-notice .search-notice-text {
    font-size: 16px !important;
    line-height: 1.7;
}

/* ================================
   사이드바 반응형
================================ */
@media (max-width: 767.98px) {
    .search-side-stack {
        z-index: 1;
    }

    .popular-keyword-box,
    .recent-keyword-box {
        border-radius: 8px;
    }

    .popular-keyword-inner,
    .recent-keyword-header {
        min-height: 50px;
        padding: 0 14px;
    }

    #popularKeywordCurrent,
    #popularKeywordArrow {
        height: 50px;
    }

    .popular-keyword-title,
    .recent-keyword-header > span,
    .recent-keyword-title {
        font-size: 15px;
    }

    .recent-keyword-panel {
        padding: 12px 14px 10px;
    }

    .popular-keyword-panel-info {
        gap: 4px;
    }

    .popular-keyword-period {
        font-size: 10px;
    }
}