.sort-wrapper {
    width: 8%;
}

/* 2025.08.26 관심강의 스타일 */
.star-btn-outline {
    background: white;
    border: 0px solid #e5e7eb;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #9ca3af;
    transition: all 0.3s ease;
    vertical-align: middle;
    margin-left: 5px;
}

.tab-buttons {
    display: flex;
    background: #eee;
}

.tab-button {
    flex: 1;
    padding: 15px;
    border: none;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab-button.active {
    background: white;
    color: #666;
}

.tab-content {
    display: none;
    padding: 20px;
    max-height: 70vh;
    overflow-y: auto;
}

.tab-content.active {
    display: block;
}

.layout-info {
    background: #f8f9ff;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid #eee;
}

.layout-info h4 {
    color: #666;
    margin-bottom: 8px;
    font-size: 14px;
}

.layout-info p {
    color: #666;
    font-size: 12px;
    line-height: 1.4;
}

.count-info {
    text-align: center;
    padding: 10px;
    background: #f8f8f8;
    color: #666;
    font-weight: bold;
    font-size: 14px;
    margin-bottom: 15px;
}

/* 강좌 카드 공통 스타일 */
.course-card,
.compact-card {
    width: 100%;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
}

.course-card:hover,
.compact-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
    z-index: 20;
}

.course-card-content,
.compact-card-content {
    display: flex;
    padding: 12px;
}

/* PC 버전: 그리드 대응 */
@media (min-width: 992px) {

    .course-card,
    .compact-card {
        margin-bottom: 0;
        border-radius: 12px;
        height: 100%;
        width: 100%;
    }

    .course-card-content,
    .compact-card-content {
        flex-direction: column;
        padding: 0;
        height: 100%;
    }

    .course-image,
    .compact-image {
        width: 100% !important;
        height: 160px !important;
        margin-right: 0 !important;
    }

    .course-image img,
    .compact-image img {
        width: 100% !important;
        height: 160px !important;
        object-fit: cover;
        border-radius: 12px 12px 0 0;
    }

    .compact-image .course-placeholder {
        width: 100% !important;
        height: 160px !important;
        border-radius: 12px 12px 0 0;
    }

    .course-info,
    .compact-info {
        flex: 1;
        padding: 15px;
        display: flex;
        flex-direction: column;
    }

    .course-title,
    .compact-title {
        font-size: 15px;
        font-weight: 600;
        line-height: 1.4;
        margin-bottom: 10px;
        min-height: 42px;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        overflow: hidden;
    }

    .compact-meta {
        font-size: 13px;
    }

    .compact-price {
        font-size: 11px;
    }

    .compact-btn-primary,
    .compact-btn-secondary,
    .compact-btn-utility {
        font-size: 11px;
        padding: 4px 8px;
    }
}

/* 대형 모니터: 여유있게 (Bootstrap container에 맞춰 자동 조절되도록 제한 제거) */
@media (min-width: 1200px) {

    .course-image,
    .compact-image {
        height: 180px !important;
    }

    .course-image img,
    .compact-image img {
        height: 180px !important;
    }

    .compact-image .course-placeholder {
        height: 180px !important;
    }

    .course-title,
    .compact-title {
        font-size: 16px;
    }
}

/* 태블릿: 3칼럼 */
@media (min-width: 768px) and (max-width: 991px) {
    .improved-design {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        max-width: 720px;
        gap: 20px;
        margin: 0 auto;
    }

    .compact-card {
        max-width: 220px;
    }

    .compact-card-content {
        flex-direction: column;
        padding: 0;
    }

    .compact-image img {
        width: 100% !important;
        height: 100px !important;
        object-fit: cover;
    }
}


.compact-image {
    overflow: hidden;
    width: 35%;
    height: 80px;
    background: #eee;
    border-radius: 6px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 10px;
    font-weight: bold;
    text-align: center;
}


.compact-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.compact-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.compact-title {
    font-size: 14px;
    font-weight: bold;
    color: #333;
    margin-bottom: 4px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
    min-height: calc(14px * 1.3 * 2);
}

.compact-title a {
    color: inherit;
    text-decoration: none;
}

.compact-title a:hover {
    text-decoration: underline;
}

.compact-meta {
    display: flex;
    gap: 8px;
    font-size: 13px;
    color: #666;
    margin-bottom: 6px;
    align-items: center;
    flex-wrap: nowrap;
}

.compact-meta span {
    white-space: nowrap;
}

.compact-price {
    display: flex;
    align-items: center;
    gap: 6px;
    min-height: 22px;
    flex-wrap: nowrap;
}

.compact-price-wrapper {
    margin-bottom: 8px;
}

.compact-original {
    text-decoration: line-through;
    color: #999;
    font-size: 11px;
    line-height: 1.4;
    white-space: nowrap;
}

.compact-sale {
    color: #e74c3c;
    font-weight: bold;
    font-size: 14px;
    white-space: nowrap;
}

.compact-discount {
    background: #e74c3c;
    color: white;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 10px;
}

.compact-discount::before {
    content: "▼ ";
    font-size: 8px;
    vertical-align: middle;
}

.discount-rate {
    background: #e74c3c;
    color: white;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: bold;
}

.discount-rate::before {
    content: "▼ ";
    font-size: 8px;
    vertical-align: middle;
}

.compact-actions {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* 주 버튼: 바로구매 (최우선) */
.compact-btn-primary {
    width: 100%;
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
    border: none;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(231, 76, 60, 0.3);
}

.compact-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.4);
}

/* 부 버튼 컨테이너 */
.compact-actions-secondary {
    display: flex;
    gap: 6px;
    flex-wrap: nowrap;
}

/* 부 버튼: 장바구니 + 상세보기 */
.compact-btn-secondary {
    flex: 1;
    min-width: 0;
    background: white;
    color: #666;
    border: 1.5px solid #ddd;
    padding: 8px 6px;
    border-radius: 5px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.compact-btn-secondary:first-child {
    color: #667eea;
    border-color: #667eea;
}

.compact-btn-secondary:hover {
    border-color: #999;
    background: #f8f9fa;
}

.compact-btn-secondary:first-child:hover {
    border-color: #5568d3;
    background: #f0f2ff;
}

/* 유틸리티 버튼 컨테이너 */
.compact-utility-actions {
    display: flex;
    gap: 6px;
    padding-top: 4px;
}

/* 유틸리티 버튼: 홍보영상 + 샘플강의 */
.compact-btn-utility {
    flex: 1;
    background: transparent;
    color: #999;
    border: 1px dashed #ddd;
    padding: 6px 8px;
    border-radius: 4px;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.compact-btn-utility:hover {
    border-color: #999;
    color: #666;
    background: #fafafa;
}

.compact-detail-btn {
    background: #9ca3af;
    color: white;
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.3s ease;
    margin-left: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.compact-detail-btn:hover {
    background: #999;
}

.compact-title-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.compact-star-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    font-size: 16px;
    line-height: 1;
    position: relative;
    transition: all 0.3s ease;
    margin: 0;
    flex-shrink: 0;
    align-self: flex-start;
}

.compact-star-btn .star-empty {
    color: #d1d5db;
}

.compact-star-btn.active .star-empty {
    color: #fbbf24;
}




/* =========================================
   compact-card 세로형 레이아웃
   ========================================= */

.compact-thumb {
    width: 100%;
    overflow: hidden;
    border-radius: 12px 12px 0 0;
    flex-shrink: 0;
}

.compact-thumb img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 12px 12px 0 0;
    display: block;
}

.compact-thumb-placeholder {
    width: 100%;
    height: 180px;
    background-color: #f5f6f7;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px 12px 0 0;
}

.compact-thumb-placeholder i {
    font-size: 36px;
    color: #9ca3af;
}

.compact-body {
    padding: 14px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.compact-category {
    margin-bottom: 6px;
}

/* =========================================
   상세 페이지 스타일
   ========================================= */

/* 탭 스타일 */
ul.tab {
    list-style: none;
    padding: 0;
    margin: 20px 0 0 0;
    display: flex;
    border-bottom: 1px solid #ddd;
    position: sticky;
    top: 42px; /* 2행 dark nav 높이 (sticky) */
    z-index: 50;
    background: #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}

ul.tab li {
    background: #f8f9fa;
    color: #666;
    padding: 10px 20px;
    cursor: pointer;
    border: 1px solid #ddd;
    border-bottom: none;
    margin-right: -1px;
    font-weight: bold;
    border-radius: 5px 5px 0 0;
}

ul.tab li.current {
    background: #fff;
    color: #333;
    border-bottom: 1px solid #fff;
    position: relative;
    top: 1px;
}

.tabcontent {
    display: block;
    padding: 20px;
    border: 1px solid #ddd;
    border-top: none;
    background: #fff;
    scroll-margin-top: 100px; /* JS가 동적으로 덮어씀 */
}

/* 상세 정보 테이블 */
.webzine_type2 {
    width: 100%;
}

.webzine_type_img img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.inner_tbl {
    width: 100%;
    border-collapse: collapse;
}

.inner_tbl td {
    padding: 8px 0;
}

.under_line {
    border-bottom: 1px solid #eee;
}

.under_line_dot {
    border-bottom: 1px dotted #ccc;
    padding: 10px 5px;
}

.obj_name {
    font-weight: bold;
    color: #555;
    margin-right: 10px;
    display: inline-block;
    width: 100px;
}

.obj_value {
    color: #333;
}

/* 버튼 스타일 */
.btn-round {
    border-radius: 20px;
    padding: 8px 20px;
    font-weight: bold;
}

.btn-danger {
    background-color: #e74c3c;
    border-color: #e74c3c;
    color: white;
}

.btn-danger:hover {
    background-color: #c0392b;
}

/* 수료기준 테이블 */
.criteria-table th {
    background-color: #e5effa;
    text-align: center;
    padding: 10px;
    font-weight: normal;
    border: 1px solid #ddd;
}

.criteria-table td {
    text-align: center;
    padding: 10px;
    border: 1px solid #ddd;
}

/* 강의 목차 */
.lecture-list {
    width: 100%;
}

.lecture-item {
    display: flex;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.lecture-seq {
    width: 60px;
    text-align: right;
    margin-right: 15px;
    font-weight: bold;
    color: #666;
}

.lecture-title {
    flex: 1;
}

.lecture-time {
    color: #888;
    font-size: 0.9em;
}

/* 강사 소개 */
.instructor-info {
    display: flex;
    gap: 20px;
    padding: 10px;
}

.instructor-img {
    width: 120px;
    height: 150px;
    object-fit: cover;
    border-radius: 4px;
    background: #eee;
}

.instructor-desc h3 {
    font-size: 18px;
    margin-bottom: 10px;
    color: #333;
}

.instructor-bio {
    line-height: 1.6;
    color: #555;
}

/* =========================================
   교재 정보 및 배지 스타일 (2025.01.05 추가)
   ========================================= */

/* 교재 카드 스타일 */
.book-card {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    padding: 20px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: #fafafa;
    transition: all 0.3s ease;
}

.book-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.book-cover img {
    width: 150px;
    height: 200px;
    object-fit: cover;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.book-cover-placeholder {
    width: 150px;
    height: 200px;
    background: #e0e0e0;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 12px;
}

.required-badge {
    background: #dc3545;
    color: white;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 11px;
    margin-left: 8px;
}

.optional-badge {
    background: #6c757d;
    color: white;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 11px;
    margin-left: 8px;
}

/* 핵심 개념 태그 배지 */
.concept-tag-badge {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4px 12px;
    margin: 3px 5px 3px 0;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.3);
}

/* 강사 역할 배지 */
.instructor-role-badge {
    display: inline-block;
    background: #17a2b8;
    color: white;
    padding: 3px 10px;
    margin-left: 10px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: normal;
}



/* =========================================
   검색 결과 페이지 전용 스타일
   ========================================= */

.search-bar-wrapper {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    padding: 20px 0;
    margin-bottom: 40px;
    border-radius: 16px;
    border: 1px solid #eee;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03) !important;
}

.search-hero-content h2 {
    font-size: 1.8rem;
    letter-spacing: -0.5px;
    color: #1a1a1a;
}

.search-mini-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 0 15px;
    position: relative;
    z-index: 1;
}

.search-input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input-main {
    width: 100%;
    padding: 15px 25px;
    padding-right: 60px;
    border: 1px solid #ddd;
    border-radius: 12px;
    font-size: 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    background: #fff;
}

.search-input-main:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.1);
}

.search-submit-btn {
    position: absolute;
    right: 8px;
    background: #2563eb;
    color: white;
    border: none;
    width: 42px;
    height: 42px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.2);
}

.search-submit-btn:hover {
    background: #1d4ed8;
}

.discovery-section {
/*    margin-top: 60px;*/
    padding: 40px 0;
    border-top: 1px solid #eee;
}

.discovery-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.discovery-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #1a1a1a;
    display: flex;
    align-items: center;
    gap: 10px;
}

.discovery-title span {
    color: #2563eb;
}

.empty-results-box {
    text-align: center;
    padding: 60px 20px;
    background: #f9fafb;
    border-radius: 12px;
    border: 1px dashed #d1d5db;
    margin-bottom: 40px;
}

.empty-icon {
    font-size: 3rem;
    color: #9ca3af;
    margin-bottom: 15px;
}

.empty-text {
    font-size: 1.1rem;
    color: #4b5563;
    font-weight: 500;
}

.suggested-keywords-mini {
    margin-top: 12px;
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.keyword-tag-mini {
    font-size: 13px;
    color: #666;
    background: #fff;
    padding: 4px 14px;
    border-radius: 30px;
    text-decoration: none;
    transition: all 0.2s;
    border: 1px solid #eee;
}

.keyword-tag-mini:hover {
    background: #e5e7eb;
    color: #2563eb;
}

/* =========================================
   공용 강좌 리스트 레이아웃 (4열 그리드)
   ========================================= */

/* 데스크톱: 4열 그리드 */
.course-scroll-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-bottom: 20px;
}

.course-scroll-item {
    min-width: 0;
    cursor: pointer;
}

/* 모바일: 횡스크롤 대응 */
@media (max-width: 767.98px) {
    .course-scroll-row {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-bottom: 8px;
        gap: 12px;
    }

    .course-scroll-row::-webkit-scrollbar {
        display: none;
    }

    .course-scroll-row > .course-scroll-item {
        flex: 0 0 75%;
        min-width: 75%;
        scroll-snap-align: start;
    }
}