/* ==========================================================================
   Wiki - Styles chung
   ========================================================================== */

/* --- Tiêu đề section --- */
.wiki-section-title {
    font-size: 26px;
    font-weight: 900;
    text-transform: uppercase;
    margin-bottom: 25px;
}

/* ==========================================================================
   Wiki Card (dùng chung cho index và search)
   ========================================================================== */

.wiki-card-col {
    margin-bottom: 25px;
}

.wiki-card {
    display: block;
    color: inherit;
    text-decoration: none;
    background: #fff;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .1);
    height: 100%;
    transition: box-shadow .2s;
}

.wiki-card:hover {
    color: inherit;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .15);
}

.wiki-card-img-wrap {
    position: relative;
    overflow: hidden;
}

.wiki-card-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.wiki-card-placeholder {
    width: 100%;
    height: 200px;
    background: #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #adb5bd;
    font-size: 13px;
}

.wiki-card-cat-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    font-size: 11px;
    padding: 4px 8px;
}

.wiki-card-body {
    padding: 15px;
}

.wiki-card-title {
    margin: 0 0 8px;
    font-weight: 700;
    font-size: 15px;
    line-height: 1.4;
}

.wiki-card-desc {
    font-size: 13px;
    margin: 0;
}

/* ==========================================================================
   Index - Hero
   ========================================================================== */

.wiki-hero {
    position: relative;
    padding: 60px 0;
    background: #fff;
}

.wiki-hero h1 {
    font-size: 52px;
    font-weight: 900;
    margin-bottom: 10px;
    line-height: 1.1;
}

.wiki-hero h1 .accent {
    color: #e84c3d;
}

.wiki-hero .subtitle {
    font-size: 18px;
    margin-bottom: 30px;
}

.wiki-badge-link {
    margin: 3px;
}

/* ==========================================================================
   Index - Khám phá nổi bật
   ========================================================================== */

.wiki-hot {
    padding: 50px 0;
    background: #f8f9fa;
}

/* ==========================================================================
   Index - Chủ đề phổ biến
   ========================================================================== */

.wiki-categories {
    padding: 50px 0;
    background: #fff;
}

.wiki-cat-col {
    margin-bottom: 20px;
}

.wiki-cat-card {
    display: block;
    position: relative;
    height: 160px;
    overflow: hidden;
    border-radius: 6px;
    text-decoration: none;
}

.wiki-cat-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s;
}

.wiki-cat-card:hover .wiki-cat-img {
    transform: scale(1.05);
}

.wiki-cat-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #adb5bd;
}

.wiki-cat-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, .7) 0%, transparent 60%);
}

.wiki-cat-title-wrap {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 10px 12px;
}

.wiki-cat-title {
    color: #fff;
    font-size: 14px;
    line-height: 1.3;
    display: block;
}

/* ==========================================================================
   Detail
   ========================================================================== */

.wiki-detail-title {
    font-size: 28px;
    font-weight: 900;
    margin-top: 10px;
    margin-bottom: 8px;
    line-height: 1.3;
}

.wiki-detail-cover {
    margin: 15px 0;
    border-radius: 6px;
    overflow: hidden;
}

.wiki-detail-cover img {
    width: 100%;
    max-height: 480px;
    object-fit: cover;
    display: block;
}

.wiki-sapo {
    font-size: 17px;
    font-family: 'Times New Roman', serif;
    font-weight: bold;
    border-left: 4px solid #337ab7;
    padding-left: 12px;
    color: #555;
}

.wiki-content {
    font-size: 17px;
    font-family: 'Times New Roman', serif;
}

.wiki-tags {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.wiki-tag {
    margin: 2px;
}

.wiki-related-item {
    display: flex;
    gap: 10px;
    color: inherit;
    text-decoration: none;
}

.wiki-related-item:hover {
    color: inherit;
    text-decoration: none;
}

.wiki-related-img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}

.wiki-related-img-placeholder {
    width: 60px;
    height: 60px;
    background: #e9ecef;
    border-radius: 4px;
    flex-shrink: 0;
}

.wiki-related-title {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
}

/* ==========================================================================
   Search
   ========================================================================== */

.wiki-search-hero {
    padding: 50px 0;
    background: #fff;
}

.wiki-search-hero h1 {
    font-size: 32px;
    font-weight: 900;
    margin-bottom: 6px;
}

.wiki-search-results {
    padding: 30px 0 50px;
    background: #f8f9fa;
}

.wiki-empty {
    padding: 60px 0;
    color: #adb5bd;
}

.wiki-empty-icon {
    font-size: 48px;
    margin-bottom: 15px;
    display: block;
}

.wiki-empty-text {
    font-size: 16px;
    font-weight: 600;
}

.wiki-empty-sub {
    font-size: 14px;
    margin-top: 6px;
}

/* ==========================================================================
   Contribute button (absolute top-right of .wiki-hero .container)
   ========================================================================== */

.wiki-hero .container {
    position: relative;
}

.wiki-contribute-btn {
    position: absolute;
    top: -30px;
    right: 0;
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 13px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .2);
}

/* ==========================================================================
   Dropzone (contribute modal)
   ========================================================================== */

.wiki-dropzone {
    border: 2px dashed #ddd;
    border-radius: 6px;
    padding: 25px 15px;
    text-align: center;
    cursor: pointer;
    background: #fafafa;
    transition: border-color .2s, background .2s;
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wiki-dropzone:hover,
.wiki-dropzone.wiki-dz-over {
    border-color: #337ab7;
    background: #f0f5ff;
}

.wiki-dz-icon {
    display: block;
    margin-bottom: 8px;
    color: #aaa;
}

.wiki-dz-text {
    margin: 4px 0 2px;
    font-size: 13px;
}

.wiki-dropzone-preview {
    max-width: 100%;
    max-height: 180px;
    border-radius: 4px;
}

/* Nhãn gợi ý nhỏ bên cạnh badges */
.wiki-suggest-label {
    font-size: 13px;
}

/* Dòng thông tin số kết quả tìm kiếm */
.wiki-result-info {
    margin-bottom: 20px;
}

/* ==========================================================================
   My Wiki card (div-based, không phải anchor)
   ========================================================================== */

.wiki-my-card {
    cursor: default;
    display: flex;
    flex-direction: column;
}

.wiki-my-card .wiki-card-body {
    flex: 1;
}

.wiki-card-title-link {
    color: inherit;
    text-decoration: none;
}

.wiki-card-title-link:hover {
    color: #337ab7;
    text-decoration: none;
}

/* Badge trạng thái (góc trên bên phải ảnh) */
.wiki-status-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 11px;
    padding: 4px 8px;
}

/* Thanh action bên dưới mỗi card */
.wiki-card-actions {
    padding: 10px 15px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    gap: 6px;
}