/* ============================================
   커뮤니티 전용 스타일
   ============================================ */

/* ============================================
   HOT 랭킹 카드 (정적 카드 + 수동 넘김)
   ============================================ */

/* 카드 뷰포트 */
.hot-card-viewport {
    overflow-x: auto;
    scroll-behavior: smooth;
    -ms-overflow-style: none;
    scrollbar-width: none;
    padding: 4px 0;
}
.hot-card-viewport::-webkit-scrollbar {
    display: none;
}

/* 카드 트랙 */
.hot-card-track {
    display: flex;
    gap: 14px;
    width: max-content;
}

/* 랭킹 카드 */
.hot-rank-card {
    flex-shrink: 0;
    width: 220px;
    background: #fff;
    border-radius: 12px;
    padding: 16px;
    border: 1px solid #f3f4f6;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    gap: 12px;
    align-items: flex-start;
    position: relative;
}

.hot-rank-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
}

/* 랭킹 숫자 */
.hot-rank-number {
    font-size: 28px;
    font-weight: 800;
    line-height: 1;
    flex-shrink: 0;
    width: 28px;
    text-align: center;
    font-style: italic;
    opacity: 0.85;
}

/* 랭킹 콘텐츠 */
.hot-rank-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

/* 좌우 화살표 */
.hot-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid #e5e7eb;
    color: #374151;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
.hot-nav-btn:hover {
    background: #003366;
    color: #fff;
    border-color: #003366;
}
.hot-nav-prev { left: -12px; }
.hot-nav-next { right: -12px; }

/* 빈 상태 */
.hot-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px;
    background: #f9fafb;
    border-radius: 12px;
    border: 1px dashed #e5e7eb;
}

/* HOT 탭 버튼 */
.hot-tab-btn {
    padding: 4px 0;
    border: none;
    background: none;
    transition: all 0.2s;
}
.hot-tab-btn span {
    color: #9ca3af;
    transition: color 0.2s;
}
.hot-tab-btn i {
    opacity: 0.4;
    transition: opacity 0.2s;
}
.hot-tab-btn.active span {
    color: #1f2937;
}
.hot-tab-btn.active i {
    opacity: 1;
}
.hot-tab-btn:hover span {
    color: #374151;
}
.hot-tab-btn:hover i {
    opacity: 0.7;
}

/* 모바일 카드 크기 */
@media (max-width: 640px) {
    .hot-rank-card {
        width: 200px;
        padding: 12px;
        gap: 8px;
    }
    .hot-rank-number {
        font-size: 22px;
        width: 22px;
    }
    .hot-nav-btn {
        width: 30px;
        height: 30px;
    }
    .hot-nav-prev { left: -6px; }
    .hot-nav-next { right: -6px; }
}

/* ============================================
   탭 버튼
   ============================================ */
.community-tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    color: #6b7280;
    background: #fff;
    border: 1px solid #e5e7eb;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.community-tab-btn:hover {
    border-color: #00A896;
    color: #00A896;
}

.community-tab-btn.active {
    background: #003366;
    color: #fff;
    border-color: #003366;
}

/* ============================================
   태그 버튼
   ============================================ */
.community-tag-btn {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 4px 10px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 500;
    color: #6b7280;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    cursor: pointer;
    transition: all 0.2s;
}

.community-tag-btn:hover {
    border-color: #00A896;
    color: #00A896;
    background: #f0fdf9;
}

.community-tag-btn.active {
    background: #00A896;
    color: #fff;
    border-color: #00A896;
}

/* ============================================
   스크롤바 숨김 / 텍스트 줄 제한
   ============================================ */
.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}
.scrollbar-hide::-webkit-scrollbar {
    display: none;
}

.line-clamp-1 {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ============================================
   게시판 분류 배지 색상 (board_type별)
   ============================================ */

.badge-free { background: #eff6ff; color: #3b82f6; }
.badge-tip { background: #fff7ed; color: #f97316; }
.badge-school { background: #f5f3ff; color: #8b5cf6; }
.badge-study { background: #f0fdfa; color: #00A896; }
.badge-exchange { background: #fdf2f8; color: #ec4899; }
.badge-companion { background: #fdf2f8; color: #ec4899; }
.badge-notice { background: #f0fdf4; color: #16a34a; }
.badge-event { background: #f0fdf4; color: #16a34a; }
.badge-parttime { background: #fff8f0; color: #ea580c; }
.badge-job { background: #f0f4ff; color: #4f46e5; }
.badge-faq { background: #eef2ff; color: #6366f1; }
.badge-kuniv_news { background: #ecfeff; color: #0891b2; }

/* 중요 배지 (is_important) */
.badge-important {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    background: #fffbeb;
    color: #d97706;
    border: 1px solid #fde68a;
}

/* ============================================
   탭 버튼 - 게시판별 선택 색상
   ============================================ */
.community-tab-btn[data-type="FREE"].active    { background-color: #3b82f6; color: #fff; border-color: #3b82f6; }
.community-tab-btn[data-type="TIP"].active     { background-color: #f97316; color: #fff; border-color: #f97316; }
.community-tab-btn[data-type="SCHOOL"].active  { background-color: #8b5cf6; color: #fff; border-color: #8b5cf6; }
.community-tab-btn[data-type="STUDY"].active   { background-color: #00A896; color: #fff; border-color: #00A896; }
.community-tab-btn[data-type="EXCHANGE"].active { background-color: #ec4899; color: #fff; border-color: #ec4899; }
.community-tab-btn[data-type="COMPANION"].active { background-color: #ec4899; color: #fff; border-color: #ec4899; }
.community-tab-btn[data-type="NOTICE"].active  { background-color: #16a34a; color: #fff; border-color: #16a34a; }
.community-tab-btn[data-type="EVENT"].active   { background-color: #16a34a; color: #fff; border-color: #16a34a; }

/* ============================================
   태그 입력
   ============================================ */
.tag-input-wrap{display:flex;flex-wrap:wrap;gap:6px;padding:8px 12px;border:1px solid #d1d5db;border-radius:8px;min-height:44px;align-items:center;cursor:text;transition:border-color .2s}
.tag-input-wrap:focus-within{border-color:#00A896;box-shadow:0 0 0 3px rgba(0,168,150,.12)}
.tag-input-wrap .tag-item{display:inline-flex;align-items:center;gap:4px;background:#e0f5f1;color:#00A896;padding:4px 10px;border-radius:16px;font-size:13px;font-weight:500}
.tag-input-wrap .tag-item button{background:none;border:none;color:#00A896;cursor:pointer;font-size:15px;line-height:1;padding:0}
.tag-input-wrap input{border:none;outline:none;flex:1;min-width:120px;font-size:14px;background:transparent}
.tag-suggest{position:absolute;top:100%;left:0;right:0;background:#fff;border:1px solid #e5e7eb;border-radius:8px;box-shadow:0 4px 12px rgba(0,0,0,.1);z-index:20;max-height:200px;overflow-y:auto;display:none}
.tag-suggest.active{display:block}
.tag-suggest-item{padding:10px 14px;cursor:pointer;font-size:14px;transition:background .15s}
.tag-suggest-item:hover{background:#f0fdf9}
.tag-suggest-item .tag-count{color:#9ca3af;font-size:12px;margin-left:6px}

/* 모집 설정 */
.recruit-section{background:#f8fafc;border:1px solid #e2e8f0;border-radius:12px;padding:20px;margin-top:4px}
.recruit-row{display:flex;gap:16px;flex-wrap:wrap}
.recruit-row > div{flex:1;min-width:200px}

/* 첨부파일 */
.file-list-item{display:flex;align-items:center;gap:10px;padding:10px 14px;background:#f9fafb;border-radius:8px;margin-top:8px}
.file-list-item .file-name{flex:1;font-size:14px;color:#374151;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.file-list-item .file-size{font-size:12px;color:#9ca3af;white-space:nowrap}
.file-list-item .file-remove{background:none;border:none;color:#ef4444;cursor:pointer;font-size:18px;padding:0 4px}

/* CKEditor 높이 조정 */
.ck-editor__editable{min-height:300px !important;font-size:15px !important;line-height:1.7 !important}

/* 로딩 오버레이 */
.loading-overlay{display:none;position:fixed;top:0;left:0;right:0;bottom:0;background:rgba(0,0,0,.5);z-index:9999;justify-content:center;align-items:center}
.loading-content{background:#fff;padding:40px;border-radius:16px;text-align:center}
.loading-spinner{width:40px;height:40px;border:4px solid #e5e7eb;border-top-color:#00A896;border-radius:50%;animation:spin 1s linear infinite;margin:0 auto 16px}
@keyframes spin{to{transform:rotate(360deg)}}

/* 드래그 오버 */
.file-upload-area.dragover{border-color:#00A896;background:#f0fdf9}

@media(max-width:640px){
    .recruit-row{flex-direction:column;gap:12px}
    .ck-editor__editable{min-height:200px !important}
}