@charset "utf-8";
/* board_term/search.css */

/* ========================================
   기본 스타일
   ======================================== */
.main-content { 
    padding: 0; 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    text-align: left; 
}

ul { 
    list-style: none; 
    padding: 0; 
    margin: 0; 
}

.pagination { 
    text-align: center; 
    margin: 20px 0; 
}

.pagination a, .pagination span { 
    display: inline-block; 
    padding: 6px 10px; 
    margin: 0 2px; 
    text-decoration: none; 
    border: 1px solid #ddd; 
    border-radius: 4px; 
    color: #333; 
}

.pagination a:hover { 
    background: #f0f0f0; 
}

.pagination .active { 
    background: #6200ea; 
    color: #fff; 
    border-color: #6200ea; 
}

h2.result-header { 
    font-size: 18px; 
    font-weight: bold; 
    margin-bottom: 10px; 
}

.btn { 
    display: inline-block; 
    padding: 10px 16px; 
    background: #6200ea; 
    color: #fff; 
    border: none; 
    border-radius: 4px; 
    text-decoration: none; 
    margin: 10px 0; 
    cursor: pointer; 
    font-size: 15px; 
    text-align: center; 
}

.search-form { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    padding: 0; 
    gap: 5%; 
    margin-bottom: 16px; 
}

.search-form input[type="text"] { 
    flex: 0 0 70%; 
    padding: 10px; 
    border: 1px solid #ccc; 
    border-radius: 4px; 
    font-size: 14px; 
}

.search-form button { 
    flex: 0 0 20%; 
    padding: 10px; 
    background: #6200ea; 
    color: #fff; 
    border: none; 
    border-radius: 4px; 
    font-size: 14px; 
    cursor: pointer; 
    display: flex; 
    justify-content: center; 
    align-items: center; 
}

.selchk { 
    text-align: left;
}

.photo-list li { 
    display: flex; 
    flex-direction: column; 
    padding: 12px 0; 
    border-bottom: 1px solid #eee; 
}

.checkbox { 
    margin-bottom: 5px; 
}

.thumb { 
    width: 100%; 
    max-width: 100%; 
    height: auto; 
    object-fit: cover; 
    border-radius: 4px; 
    margin-bottom: 6px; 
}

.title { 
    font-size: 16px; 
    font-weight: bold; 
    color: #000; 
    text-decoration: none; 
    margin-bottom: 4px; 
}

.icons { 
    margin-left: 6px; 
    color: #888; 
    font-size: 14px; 
}

.info { 
    font-size: 13px; 
    color: #666; 
}

@media (min-width: 600px) {
    .search-form { 
        flex-direction: row; 
    }
    
    .search-form input[type="text"] { 
        flex: 1; 
        border-radius: 4px 0 0 4px; 
    }
    
    .search-form button { 
        border-radius: 0 4px 4px 0; 
    }
    
    .photo-list li { 
        flex-direction: row; 
        align-items: center; 
    }
    
    .thumb { 
        width: 100px; 
        max-width: 100px; 
        margin-right: 10px; 
        margin-bottom: 0; 
    }
    
    .title { 
        flex: 1; 
        margin: 0 10px; 
    }
    
    .info { 
        text-align: right; 
        white-space: nowrap; 
    }
}


/* ========================================
   용어사전 검색 결과 페이지 스타일
   ======================================== */

/* 검색 결과 헤더 */
.search-result-header {
    text-align: center;
    margin: 2rem 0;
    padding: 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    color: white;
}

.search-result-title {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.search-keyword {
    color: #ffd700;
    font-weight: bold;
}

.search-result-count {
    font-size: 1.1rem;
    opacity: 0.9;
}

.search-result-count strong {
    color: #ffd700;
    font-size: 1.3rem;
}


/* 재검색 폼 */
.search-form-inline {
    display: flex;
    gap: 0.5rem;
    margin: 2rem 0;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.search-input-inline {
    flex: 1;
    padding: 0.8rem;
    font-size: 1rem;
    border: 2px solid #ddd;
    border-radius: 5px;
    transition: border-color 0.3s;
}

.search-input-inline:focus {
    outline: none;
    border-color: #667eea;
}

.search-button-inline {
    padding: 0.8rem 1.5rem;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.3s;
}

.search-button-inline:hover {
    background: #5568d3;
}


/* %%% 추가: 매칭 섹션별 구분 스타일 %%% */
/* 각 매칭 타입별 섹션 스타일 */
.match-section {
    margin-bottom: 3rem;
    padding: 1.5rem;
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.match-section-title {
    font-size: 1.4rem;
    font-weight: bold;
    margin-bottom: 0.8rem;
    padding-bottom: 0.8rem;
    border-bottom: 3px solid #e0e0e0;
    color: #333;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.match-section-title i {
    font-size: 1.2rem;
}

.match-section-desc {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 1rem;
    padding-left: 0.5rem;
}

/* 제목 일치 섹션 - 보라색 */
.title-match-section {
    background: linear-gradient(to right, #f8f7ff 0%, #ffffff 100%);
    border-left: 5px solid #667eea;
}

.title-match-section .match-section-title {
    border-bottom-color: #667eea;
    color: #667eea;
}

.title-match {
    border-left: 4px solid #667eea;
    background: linear-gradient(to right, #faf9ff 0%, #ffffff 100%);
}

/* 약어 일치 섹션 - 초록색 */
.abbr-match-section {
    background: linear-gradient(to right, #f7fcf8 0%, #ffffff 100%);
    border-left: 5px solid #28a745;
}

.abbr-match-section .match-section-title {
    border-bottom-color: #28a745;
    color: #28a745;
}

.abbr-match {
    border-left: 4px solid #28a745;
    background: linear-gradient(to right, #f9fdf9 0%, #ffffff 100%);
}

/* 설명 일치 섹션 - 회색 */
.desc-match-section {
    background: linear-gradient(to right, #f8f9fa 0%, #ffffff 100%);
    border-left: 5px solid #6c757d;
}

.desc-match-section .match-section-title {
    border-bottom-color: #6c757d;
    color: #6c757d;
}

.desc-match {
    border-left: 4px solid #6c757d;
    background: linear-gradient(to right, #fafbfc 0%, #ffffff 100%);
    opacity: 0.95;
}
/* %%% 매칭 섹션 스타일 끝 %%% */


/* 검색 결과 목록 */
.term-search-list {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
}

.term-search-item {
    margin-bottom: 1rem;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: white;
    transition: all 0.3s;
    overflow: hidden;
}

.term-search-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}

.term-search-link {
    display: block;
    padding: 1.5rem;
    text-decoration: none;
    color: #333;
}

.term-search-main {
    margin-bottom: 0.8rem;
}

.term-search-ko {
    font-size: 1.4rem;
    font-weight: bold;
    color: #333;
    margin-bottom: 0.3rem;
}

.term-search-en {
    font-size: 1.1rem;
    color: #666;
    font-weight: normal;
    margin-bottom: 0.5rem;
}

/* %%% 추가: 제목 강조 스타일 %%% */
/* 제목 일치 시 크고 진하게 */
.highlight-title {
    font-size: 1.5rem !important;
    font-weight: 700 !important;
    color: #667eea !important;
    line-height: 1.4;
}

/* 제목 흐리게 (설명 일치 시) */
.dim-title {
    color: #888 !important;
    font-size: 1.1rem !important;
    font-weight: 500 !important;
}
/* %%% 제목 스타일 끝 %%% */


.term-search-abbr {
    margin-bottom: 0.8rem;
}

.abbr-badge {
    display: inline-block;
    padding: 0.4rem 0.9rem;
    margin-right: 0.5rem;
    margin-bottom: 0.3rem;
    background: #e9ecef;
    color: #495057;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: bold;
}

/* %%% 추가: 약어 강조 스타일 %%% */
.highlight-abbr {
    background: #28a745 !important;
    color: white !important;
    font-size: 1rem !important;
    font-weight: 700 !important;
    padding: 0.5rem 1rem !important;
    box-shadow: 0 2px 4px rgba(40, 167, 69, 0.3);
}
/* %%% 약어 스타일 끝 %%% */


/* %%% 추가: 매칭 배지 스타일 %%% */
.term-search-meta {
    display: flex;
    gap: 1rem;
    align-items: center;
    color: #999;
    font-size: 0.9rem;
    flex-wrap: wrap;
}

/* 매칭 타입 배지 */
.match-badge {
    display: inline-block;
    padding: 0.4rem 0.9rem;
    border-radius: 14px;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.title-badge {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.3);
}

.abbr-badge.match-badge {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    box-shadow: 0 2px 4px rgba(40, 167, 69, 0.3);
}

.desc-badge {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
    color: white;
    box-shadow: 0 2px 4px rgba(108, 117, 125, 0.3);
}
/* %%% 배지 스타일 끝 %%% */


/* 검색 결과 없음 */
.no-result {
    text-align: center;
    padding: 4rem 2rem;
}

.no-result-icon {
    font-size: 5rem;
    margin-bottom: 1rem;
}

.no-result-title {
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 1rem;
}

.no-result-text {
    font-size: 1.1rem;
    color: #666;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.no-result-tips {
    max-width: 400px;
    margin: 0 auto;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
    text-align: left;
}

.no-result-tips h4 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: #333;
}

.no-result-tips ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.no-result-tips li {
    padding: 0.5rem 0;
    color: #666;
    border-bottom: 1px solid #e0e0e0;
}

.no-result-tips li:last-child {
    border-bottom: none;
}


/* 하단 액션 */
.search-actions {
    text-align: center;
    margin: 2rem 0;
}

.btn-back {
    display: inline-block;
    padding: 1rem 2rem;
    background: #6c757d;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: background 0.3s;
}

.btn-back:hover {
    background: #5a6268;
}


/* 검색 결과 설명 미리보기 */
.term-search-preview {
    margin-top: 0.5rem;
    color: #666;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* %%% 추가: 설명 강조 스타일 %%% */
.highlight-desc {
    font-weight: 600 !important;
    color: #333 !important;
    line-height: 1.7;
    background: linear-gradient(to right, rgba(255, 235, 59, 0.2) 0%, transparent 100%);
    padding: 0.5rem;
    border-radius: 4px;
}
/* %%% 설명 스타일 끝 %%% */


/* =========================================
   검색어 하이라이트 (2025.12.13 추가)
   ========================================= */

/* 검색어 강조 스타일 */
.search-highlight,
mark.search-highlight {
    background-color: #fff59d; /* 노란색 배경 */
    color: #000;               /* 검은색 텍스트 */
    padding: 2px 4px;
    border-radius: 3px;
    font-weight: bold;
    font-style: normal;        /* 기울임 제거 */
}

/* 링크 안에서도 하이라이트 유지 */
a .search-highlight {
    color: inherit;
}

/* 호버 시 하이라이트 강조 */
.term-search-item:hover .search-highlight {
    background-color: #ffeb3b; /* 더 밝은 노란색 */
    box-shadow: 0 0 0 2px rgba(255, 235, 59, 0.3);
}


/* %%% 추가: 매칭 타입별 호버 효과 %%% */
/* 제목 일치 항목 호버 */
.title-match:hover {
    border-left-color: #5568d3;
    background: linear-gradient(to right, #f3f1ff 0%, #ffffff 100%);
}

/* 약어 일치 항목 호버 */
.abbr-match:hover {
    border-left-color: #20c997;
    background: linear-gradient(to right, #f0fdf4 0%, #ffffff 100%);
}

/* 설명 일치 항목 호버 */
.desc-match:hover {
    border-left-color: #495057;
    background: linear-gradient(to right, #f0f1f3 0%, #ffffff 100%);
}
/* %%% 호버 효과 끝 %%% */


/* %%% 추가: 아이콘 스타일 %%% */
.term-search-meta i {
    margin-right: 0.3rem;
}
/* %%% 아이콘 스타일 끝 %%% */


/* 반응형 */
@media (max-width: 768px) {
    .search-result-title {
        font-size: 1.4rem;
    }
    
    .search-form-inline {
        flex-direction: column;
    }
    
    .search-button-inline {
        width: 100%;
    }
    
    .term-search-ko {
        font-size: 1.2rem;
    }
    
    .term-search-en {
        font-size: 1rem;
    }
    
    /* %%% 추가: 모바일 반응형 %%% */
    .highlight-title {
        font-size: 1.3rem !important;
    }
    
    .match-section {
        padding: 1rem;
        margin-bottom: 2rem;
    }
    
    .match-section-title {
        font-size: 1.2rem;
    }
    
    .term-search-link {
        padding: 1rem;
    }
    
    .term-search-meta {
        font-size: 0.85rem;
        gap: 0.5rem;
    }
    
    .match-badge {
        font-size: 0.75rem;
        padding: 0.3rem 0.7rem;
    }
    /* %%% 모바일 반응형 끝 %%% */
}


/* %%% 추가: 인쇄 스타일 %%% */
@media print {
    .search-form-inline,
    .search-actions,
    .pagination {
        display: none;
    }
    
    .term-search-item {
        page-break-inside: avoid;
        border: 1px solid #000;
        margin-bottom: 1rem;
    }
    
    .match-section {
        page-break-inside: avoid;
    }
}
/* %%% 인쇄 스타일 끝 %%% */