/* ==========================================
   [1. 공통 섹션 & 레이아웃 구조 정의]
   ========================================== */
.nw-section { width: 100%; padding: 20px 0; background: #fff; box-sizing: border-box; font-family: 'Noto Sans KR', sans-serif; }
.nw-section.nw-bg-alt { background: #f8fafc; }
.nw-container { width: 100%; max-width: 1430px; margin: 0 auto; position: relative; padding: 0 16px; box-sizing: border-box; }
.nw-section-header { position: relative; margin-bottom: 30px; text-align: left; padding-right: 90px; }
.nw-main-title { font-size: 26px; font-weight: 700; color: #1e293b; margin: 0 0 8px 0; letter-spacing: -0.5px; }
.nw-title-line { width: 35px; height: 4px; background: #5f8def; border-radius: 2px; margin-bottom: 10px; }
.nw-section-ment { font-size: 14px; color: #64748b; margin: 0; }

/* ==========================================
   [2. 상단 네비게이션 & 키워드 태그]
   ========================================== */
.nw-nav-group { position: absolute; right: 16px; bottom: 0; display: flex; gap: 6px; z-index: 10; }
.nw-arrow-btn { width: 36px; height: 36px; border: 1px solid #cbd5e1; background: #fff; cursor: pointer; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; position: relative; transition: all 0.2s ease; padding: 0; }
.nw-arrow-btn:hover { background: #f1f5f9; border-color: #94a3b8; }
.nw-arrow-btn::before { content: ''; width: 8px; height: 8px; border-top: 2px solid #64748b; border-right: 2px solid #64748b; display: block; transition: border-color 0.2s ease; }
.nw-arrow-btn:hover::before { border-color: #1e293b; }
.nw-btn-prev::before { transform: rotate(-135deg); margin-left: 2px; }
.nw-btn-next::before { transform: rotate(45deg); margin-right: 2px; }
.nw-tag-list { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; padding: 0; margin: 0; justify-content: center;}
.nw-tag-list li a { display: block; padding: 10px 20px; background: #fff; border: 1px solid #e2e8f0; border-radius: 50px; color: #475569; text-decoration: none; font-size: 14px; font-weight: 500; transition: all 0.2s; }
.nw-tag-list li a:hover { border-color: #5f8def; color: #5f8def; background: #f0f6ff; transform: translateY(-2px); }
.nw-empty-data { font-size: 14px; color: #94a3b8; list-style: none; }

/* ==========================================
   [3. 그리드 & 슬라이더 모드 뷰포트]
   ========================================== */
.nw-row-viewport { width: 100%; position: relative; }
.nw-row-viewport.nw-grid-mode .nw-row-track { display: flex; flex-wrap: wrap; gap: 24px; list-style: none; padding: 0; margin: 0; width: 100%; }

.nw-row-viewport.nw-grid-mode .nw-col-item { width: calc(25% - 18px); flex-shrink: 0; box-sizing: border-box; }

.nw-design-type-2.nw-grid-mode .nw-col-item { width: calc(50% - 12px) !important; }

.nw-row-viewport.nw-slider-mode { overflow: hidden; width: 100%; }
.nw-row-viewport.nw-slider-mode .nw-row-track { list-style: none; padding: 0; margin: 0; }
.nw-row-viewport.nw-slider-mode .nw-row-track:not(.slick-initialized) { display: flex !important; flex-direction: row !important; flex-wrap: nowrap !important; gap: 0 !important; margin: 0 -12px !important; width: auto !important; }
.nw-row-viewport.nw-slider-mode .nw-row-track:not(.slick-initialized) .nw-col-item { width: 25% !important; flex-shrink: 0 !important; box-sizing: border-box !important; float: left; }

.nw-design-type-2.nw-slider-mode .nw-row-track:not(.slick-initialized) .nw-col-item { width: 50% !important; }
.nw-row-viewport.nw-slider-mode .nw-col-item { padding: 0 12px; box-sizing: border-box; }
.nw-row-viewport.nw-slider-mode .slick-list { overflow: hidden; margin: 0 -12px; }
.nw-row-viewport.nw-slider-mode .slick-track { display: flex !important; }
.nw-row-viewport.nw-slider-mode .slick-slide { height: auto !important; display: block !important; }

/* ==========================================
   [4. 개별 카드 컴포넌트 기본 구조체]
   ========================================== */
.nw-card-box { position: relative !important; width: 100%; height: 100%; background: transparent; box-sizing: border-box; }
.nw-card-inner, .nw-card-link { display: block; position: relative !important; overflow: hidden; text-decoration: none; background: #fff; height: 100%; box-sizing: border-box; }
.nw-img-wrap { width: 100%; overflow: hidden; position: relative; background: #f1f5f9; }
.nw-img-wrap img { width: 100% !important; height: 100% !important; object-fit: cover !important; display: block; }
.nw-text-wrap { padding: 16px; box-sizing: border-box; }
.nw-text-title { margin: 0 0 8px 0; font-size: 15px; font-weight: 600; color: #1e293b; height: 42px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.4; letter-spacing: -0.3px; }
.nw-text-tutor { margin: 0; font-size: 13px; color: #64748b; font-weight: 400; }
.nw-badge-absolute { position: absolute; top: 12px; left: 16px; z-index: 2; display: flex; gap: 4px; }
.nw-badge-inline { display: flex; gap: 4px; margin-bottom: 8px; min-height: 20px; }

/* ==========================================
   [5. 디자인 타입별 UI 완전 변형화 정의]
   ========================================== */
/* [디자인 타입 1 : 기본형 (스탠다드)] */
.nw-design-type-1 .nw-card-inner, .nw-design-type-1 .nw-card-link { border: 1px solid #e2e8f0; border-radius: 8px; }
.nw-design-type-1 .nw-img-wrap { height: 165px !important; }

/* [디자인 타입 2 : 카드형(가로)] */
.nw-design-type-2 .nw-card-inner, .nw-design-type-2 .nw-card-link { display: flex !important; flex-direction: row !important; align-items: stretch; border: 1px solid #e2e8f0; border-radius: 8px; background: #fff; height: 100%; min-height: 140px; }
.nw-design-type-2 .nw-img-wrap { width: 180px !important; height: auto !important; flex-shrink: 0; border-right: 1px solid #f1f5f9; }
.nw-design-type-2 .nw-text-wrap { flex-grow: 1; display: flex; flex-direction: column; justify-content: center; padding: 16px 20px; background: #f8fafc; }
.nw-design-type-2 .nw-text-title { font-size: 15px; height: 42px; line-height: 1.4; margin-bottom: 6px; color: #1e293b; font-weight: 600; }
.nw-design-type-2 .nw-text-tutor { font-size: 13px; color: #64748b; }
.nw-design-type-2 .nw-badge-inline { margin-bottom: 6px; min-height: auto; }
.nw-design-type-2 .nw-badge-absolute { display: none !important; }

/* [디자인 타입 3 : 카드형(세로)] */
.nw-design-type-3 .nw-card-inner, .nw-design-type-3 .nw-card-link { border: 1px solid #cbd5e1; border-radius: 12px; padding: 10px; background: #fff; box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04); }
.nw-design-type-3 .nw-img-wrap { height: 155px !important; border-radius: 8px; }
.nw-design-type-3 .nw-text-wrap { padding: 14px 6px 6px 6px; }
.nw-design-type-3 .nw-text-title { font-size: 15.5px; font-weight: 700; color: #0f172a; }
.nw-design-type-3 .nw-badge-absolute { top: 22px; left: 22px; }

/* ==========================================
   [6. 마우스 오버 호버 레이어 시스템]
   ========================================== */
.nw-hover-layer { position: absolute !important; top: 0 !important; left: 0 !important; right: 0 !important; bottom: 0 !important; width: 100% !important; height: 100% !important; background: #ffffff !important; border: 1.5px solid #5f8def !important; border-radius: 8px !important; padding: 16px; box-sizing: border-box; opacity: 0; visibility: hidden; z-index: 5; transition: opacity 0.2s ease, visibility 0.2s ease; display: flex; flex-direction: column; justify-content: space-between; box-shadow: 0 10px 25px rgba(0,0,0,0.08); cursor: pointer; }
.nw-design-type-3 .nw-hover-layer { border-radius: 12px !important; }
.nw-hover-layer * { cursor: pointer; -webkit-user-select: none; -moz-user-select: none; user-select: none; }
.nw-card-box:hover .nw-hover-layer { opacity: 1; visibility: visible; }
.nw-hl-title { font-size: 14px; font-weight: 700; color: #0f172a; margin: 0 0 6px 0; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.nw-hl-rating { display: flex; align-items: center; gap: 4px; margin-bottom: 8px; background: #f8fafc; padding: 4px 8px; border-radius: 4px; width: fit-content; }
.nw-hl-rating i { font-size: 13px; display: inline-flex; align-items: center; }
.nw-hl-rating strong { font-size: 12px; color: #1e293b; font-weight: 700; }
.nw-hl-count { font-size: 11px; color: #64748b; margin-left: 1px; }
.nw-hl-meta p { margin: 0 0 4px 0; font-size: 12px; color: #334155; }
.nw-hl-meta p span { color: #64748b; font-weight: 500; margin-right: 4px; }
.nw-hl-btn-wrap { width: 100%; margin-top: auto; }
.nw-hl-btn { display: block; width: 100%; padding: 6px 0; border: 1px solid #cbd5e1; background: #fff; border-radius: 6px; font-size: 12px; color: #1e293b; font-weight: 600; text-align: center; transition: all 0.2s; }
.nw-card-box:hover .nw-hl-btn { background: #5f8def; border-color: #5f8def; color: #fff; }

/* ==========================================
   [7. 완벽 반응형 미디어 쿼리 분리 인젝션 (여백 계산 보정 완료)]
   ========================================== */
@media (max-width: 1430px) {
    .nw-row-viewport.nw-grid-mode .nw-col-item { width: calc(33.333% - 16px); }
    .nw-row-viewport.nw-slider-mode .nw-row-track:not(.slick-initialized) .nw-col-item { width: 33.333% !important; }
    
    .nw-design-type-2.nw-grid-mode .nw-col-item { width: 100% !important; }
    .nw-design-type-2.nw-slider-mode .nw-row-track:not(.slick-initialized) .nw-col-item { width: 100% !important; }
}

@media (max-width: 768px) {
    .nw-section { padding: 15px 0; }
    .nw-section-header { margin-bottom: 20px; }
    .nw-main-title { font-size: 20px; }
    .nw-nav-group { right: 16px; }
    
    .nw-row-viewport.nw-grid-mode .nw-col-item { width: calc(50% - 12px); }
    .nw-row-viewport.nw-slider-mode .nw-row-track:not(.slick-initialized) .nw-col-item { width: 50% !important; }
    
    .nw-design-type-2.nw-grid-mode .nw-col-item { width: 100% !important; }
    .nw-design-type-2.nw-slider-mode .nw-row-track:not(.slick-initialized) .nw-col-item { width: 100% !important; }
    .nw-design-type-2 .nw-img-wrap { width: 130px !important; }
    
    .nw-badge-absolute { left: 12px; top: 10px; }
    .nw-hover-layer { padding: 12px; }
}

@media (max-width: 500px) {
    .nw-row-viewport.nw-grid-mode .nw-col-item { width: 100% !important; }
    .nw-row-viewport.nw-slider-mode .nw-row-track:not(.slick-initialized) .nw-col-item { width: 100% !important; }
    
    .nw-design-type-2 .nw-card-inner, .nw-design-type-2 .nw-card-link { flex-direction: column !important; }
    .nw-design-type-2 .nw-img-wrap { width: 100% !important; height: 140px !important; border-right: none; border-bottom: 1px solid #e2e8f0; }
}