/* --- Filter Section --- */
.filter-section-wrap { border-bottom: 1px solid #f1f3f5; padding-top: 30px; }

/* Large Search Bar */
.search-bar-large-wrap {display: flex;justify-content: center;margin-bottom: 14px;}
.search-bar-large { 
    display: flex; align-items: center; 
    width: 100%; max-width: 580px; height: 50px; 
    border: 2px solid #445969; border-radius: 25px; 
    overflow: hidden; background: white; 
}
.search-icon-box { padding-left: 16px; font-size: 18px; }
.search-input { 
    flex: 1; border: none; outline: none; padding: 0 12px; font-size: 15px; 
}
.search-btn { 
    background: #445969; color: white; border: none; 
    width: 48px; height: 100%; cursor: pointer; font-size: 18px; 
    display: flex; align-items: center; justify-content: center;
}

/* Category Icon Nav */
.category-icon-nav {display: flex;justify-content: center;gap: 32px;padding-bottom: 0;flex-wrap: wrap;}
.cat-item { display: flex; flex-direction: column; align-items: center; gap: 8px; cursor: pointer; color: #495057; transition: 0.2s; }
.cat-item:hover, .cat-item.active { color: #445969; }
.cat-item.active .ci-icon { background: #e6fcf5; color: #445969; border-color: #445969; }
.ci-icon { 
    width: 48px; height: 48px; 
    border: 1px solid #dee2e6; border-radius: 50%; 
    display: flex; align-items: center; justify-content: center; 
    font-size: 20px; background: white; transition: 0.2s;
}
.cat-item span { font-size: 13px; font-weight: 500; }

/* Banner Section */
.banner-section { margin-top: 40px; }
.promo-banner { 
    background: #ff4d4f; color: white; 
    border-radius: 8px; padding: 40px; 
    display: flex; justify-content: space-between; align-items: center; 
    position: relative; overflow: hidden;
}
.banner-content { max-width: 60%; position: relative; z-index: 2; }
.banner-badge span { 
    display: inline-block; padding: 4px 8px; border-radius: 4px; 
    font-size: 12px; font-weight: 700; margin-right: 6px; margin-bottom: 12px;
}
.badge-hot { background: #ff7875; color: #fff; }
.badge-sale { background: rgba(0,0,0,0.2); }
.banner-content h2 { font-size: 28px; font-weight: 800; margin-bottom: 12px; line-height: 1.3; }
.banner-content p { font-size: 15px; opacity: 0.9; }
.banner-img img { 
    width: 200px; height: auto; border-radius: 8px; 
    box-shadow: 0 10px 20px rgba(0,0,0,0.2); 
}

/* Tag Filter Section */
.tag-filter-section { display: flex; justify-content: space-between; align-items: center; margin-top: 30px; margin-bottom: 20px; }
.tag-group { display: flex; gap: 8px; flex-wrap: wrap; }
.tag-btn { 
    border: 1px solid #d5dbe2; background: white; 
    padding: 8px 14px; border-radius: 20px; 
    font-size: 13px; color: #495057; cursor: pointer; transition: 0.2s; 
    display: flex; align-items: center; gap: 6px;
}
.tag-btn:hover, .tag-btn.active { border-color: #445969; color: #445969; background: #e6fcf5; font-weight: 600; }
.sort-dropdown { font-size: 13px; color: #495057; cursor: pointer; }

/* Course Grid */
.course-grid-4 { 
    display: grid; 
    grid-template-columns: repeat(4, 1fr); 
    gap: 24px; margin-bottom: 60px; 
}
.course-card { cursor: pointer; transition: transform 0.2s; }
.course-card:hover { transform: translateY(-5px); }
.card-thumb { position: relative; border-radius: 8px; overflow: hidden; margin-bottom: 10px; aspect-ratio: 16/10; }
.card-thumb img { width: 100%; height: 100%; object-fit: cover; }
.card-badge { 
    position: absolute; top: 10px; left: 10px; 
    padding: 4px 8px; font-size: 11px; font-weight: 700; 
    color: white; border-radius: 4px; 
}
.badge-best { background: #445969; }
.badge-new { background: #339af0; }

.card-title { font-size: 15px; font-weight: 700; color: #343a40; margin-bottom: 6px; line-height: 1.4; height: 42px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.card-instructor { font-size: 12px; color: #868e96; margin-bottom: 8px; }
.card-meta { font-size: 12px; color: #495057; margin-bottom: 8px; display: flex; gap: 4px; align-items: center; }
.card-meta .rating { font-weight: 700; color: #fd7e14; }
.card-meta .review-cnt { color: #868e96; }
.card-price-area { font-size: 15px; font-weight: 700; display: flex; gap: 6px; align-items: center; margin-bottom: 8px; }
.card-price-area .discount { color: #ff4d4f; }
.card-price-area .price { color: #1b1c1d; }
.card-price-area .origin { font-size: 12px; color: #adb5bd; text-decoration: line-through; font-weight: 400; }
.card-tags { display: flex; gap: 4px; flex-wrap: wrap; }
.card-tags span { background: #f1f3f5; color: #868e96; font-size: 11px; padding: 2px 6px; border-radius: 4px; }

/* Pagination */
.pagination-wrap { display: flex; justify-content: center; gap: 8px; margin-bottom: 80px; }
.page-btn { 
    width: 32px; height: 32px; 
    border: 1px solid #dee2e6; background: white; 
    border-radius: 4px; color: #868e96; cursor: pointer; 
    display: flex; align-items: center; justify-content: center; transition: 0.2s;
}
.page-btn:hover, .page-btn.active { background: #445969; color: white; border-color: #445969; }

/* Responsive */
@media (max-width: 1024px) {
    .course-grid-4 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
    .course-grid-4 { grid-template-columns: repeat(2, 1fr); gap: 16px; }
    .banner-img { display: none; }
    .banner-content { max-width: 100%; }
    .category-icon-nav { gap: 16px; justify-content: flex-start; overflow-x: auto; flex-wrap: nowrap; padding-left: 16px; }
    .cat-item { flex: 0 0 auto; }
}
@media (max-width: 480px) {
    .course-grid-4 { grid-template-columns: 1fr; }
}
/* --- Wide banner like example --- */
.banner-wide {margin-top: 0;}
.promo-banner-wide {
    border-radius: 16px;
    padding: 40px 48px;
}
.promo-banner-wide .banner-content h2 {
    font-size: 32px;
    font-weight: 800;
}
.promo-banner-wide .banner-content p {
    font-size: 15px;
    margin-top: 8px;
}

/* Challenge-style header + tabs */
.challenge-header-section {
    margin-top: 32px;
    margin-bottom: 8px;
}
.challenge-title-wrap {
    margin-bottom: 12px;
    margin-top: 50px;
}
.challenge-title {
    font-size: 22px;
    font-weight: 800;
    color: #212529;
}
.challenge-subtitle {
    font-size: 14px;
    color: #868e96;
}
.challenge-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.challenge-tab {
    padding: 8px 16px;
    border-radius: 999px;
    border: 1px solid #d5dbe2;
    background: #fff;
    font-size: 13px;
    color: #495057;
    cursor: pointer;
    transition: 0.2s;
}
.challenge-tab.active {
    background: #212529;
    color: #fff;
    border-color: #212529;
}

/* Card strip section */
.challenge-list-section {
    margin-top: 12px;
    margin-bottom: 40px;
}

.challenge-panel { display: none; }
.challenge-panel.active { display: block; }

.challenge-row {
    margin-bottom: 32px;
}
.challenge-row-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 12px;
}
.challenge-row-title {
    font-size: 18px;
    font-weight: 800;
    color: #212529;
}
.challenge-row-desc {
    font-size: 13px;
    color: #868e96;
}

/* Horizontal scroll like example */
.challenge-card-strip {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 4px;
}
.challenge-card-strip::-webkit-scrollbar {
    height: 6px;
}
.challenge-card-strip::-webkit-scrollbar-thumb {
    background: #dee2e6;
    border-radius: 3px;
}

.challenge-card {
    flex: 0 0 260px;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #f1f3f5;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.challenge-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.06);
    border-color: #e9ecef;
}
.challenge-thumb {
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
}
.challenge-thumb img {
    width: 100%;
    height: auto;
    object-fit: cover;
}
.challenge-body {
    padding: 12px 14px 14px;
}
.challenge-badge-line {
    margin-bottom: 4px;
}
.challenge-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    color: #fff;
    background: #ff6b6b;
}
.challenge-title-text {
    font-size: 14px;
    font-weight: 700;
    color: #212529;
    margin: 4px 0 4px;
    line-height: 1.4;
}
.challenge-instructor {
    font-size: 12px;
    color: #868e96;
    margin-bottom: 6px;
}
.challenge-meta {
    font-size: 12px;
    color: #495057;
    display: flex;
    gap: 4px;
    align-items: center;
    margin-bottom: 6px;
}
.challenge-meta .rating {
    color: #fd7e14;
    font-weight: 700;
}
.challenge-meta .review {
    color: #adb5bd;
}
.challenge-price .price {
    font-size: 15px;
    font-weight: 800;
    color: #212529;
}
.challenge-empty {
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: #adb5bd;
}

/* Responsive */
@media (max-width: 768px) {
    .promo-banner-wide {
        padding: 24px 20px;
    }
    .promo-banner-wide .banner-content h2 {
        font-size: 22px;
    }
    .challenge-row-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
}
