@charset "utf-8";

/* ==========================================================================
   DMZ Waterfall Gallery Mobile Skin CSS
   ========================================================================== */

.bd {
    background: transparent;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Pretendard", "Nanum Gothic", sans-serif;
}

/* 1. Header Toolbar */
.wf-header-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    margin-bottom: 10px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.wf-page-title {
    margin: 0;
    font-size: 15px;
    font-weight: 800;
    color: #1e1b4b;
    display: flex;
    align-items: center;
    gap: 8px;
}

.wf-count-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 12px;
    background: #f0fdf4;
    color: #15803d;
    font-size: 11.5px;
    font-weight: 800;
    border: 1px solid #bbf7d0;
}

.wf-header-right {
    display: flex;
    align-items: center;
    gap: 6px;
}

.wf-btn-ca {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    background: #f8fafc;
    color: #475569;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
}

.wf-btn-write {
    display: inline-flex;
    align-items: center;
    padding: 7px 16px;
    background: #660099;
    color: #ffffff !important;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 2px 6px rgba(102, 0, 153, 0.3);
    transition: background 0.15s, transform 0.15s;
}
.wf-btn-write:hover {
    background: #4c0073;
    transform: translateY(-1px);
}

/* 2. Horizontal Category Scroll Chips */
.wf-category-chips {
    display: flex;
    align-items: center;
    gap: 6px;
    overflow-x: auto;
    padding: 2px 2px 10px;
    margin-bottom: 8px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.wf-category-chips::-webkit-scrollbar {
    display: none;
}

@media (min-width: 768px) {
    .wf-category-chips {
        flex-wrap: wrap;
        overflow-x: visible;
        gap: 8px;
        padding-bottom: 12px;
    }
}

.wf-chip {
    flex-shrink: 0;
    padding: 6px 14px;
    border-radius: 18px;
    font-size: 12.5px;
    font-weight: 700;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    color: #475569;
    text-decoration: none;
    transition: all 0.15s ease;
}

.wf-chip:hover {
    border-color: #660099;
    color: #660099;
    background: #faf6fd;
}

.wf-chip.active {
    background: #660099;
    color: #ffffff;
    border-color: #660099;
    box-shadow: 0 2px 6px rgba(102, 0, 153, 0.25);
}

/* 3. True Masonry / Waterfall Grid */
.waterfall-grid {
    column-count: 3;
    column-gap: 18px;
    margin: 12px 0 24px;
}

@media (min-width: 1200px) {
    .waterfall-grid {
        column-count: 4;
        column-gap: 20px;
    }
}

@media (max-width: 900px) {
    .waterfall-grid {
        column-count: 2;
        column-gap: 14px;
    }
}

@media (max-width: 480px) {
    .waterfall-grid {
        column-count: 1;
        column-gap: 10px;
    }
}

.waterfall-card {
    break-inside: avoid;
    display: inline-block;
    width: 100%;
    margin-bottom: 16px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
    box-sizing: border-box;
    vertical-align: top;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.waterfall-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 22px rgba(45, 30, 62, 0.12);
    border-color: #c084fc;
}

.waterfall-card:active {
    transform: scale(0.99);
}

.wf-card-inner {
    display: block;
    text-decoration: none;
    color: inherit;
}

/* Thumbnail with Floating Badge */
.wf-card-thumb {
    position: relative;
    width: 100%;
    background: #f1f5f9;
    overflow: hidden;
}

.wf-card-thumb img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    transition: transform 0.25s ease;
}

.wf-card-inner:hover .wf-card-thumb img {
    transform: scale(1.03);
}

.wf-card-cat {
    position: absolute;
    top: 8px;
    left: 8px;
    padding: 3px 8px;
    border-radius: 6px;
    background: rgba(45, 30, 62, 0.85);
    backdrop-filter: blur(4px);
    color: #ffffff;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: -0.01em;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.wf-badge-notice {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 3px 8px;
    border-radius: 6px;
    background: #ef4444;
    color: #ffffff;
    font-size: 11px;
    font-weight: 800;
}

/* Card Body */
.wf-card-body {
    padding: 10px 12px 12px;
}

.wf-card-title {
    margin: 0 0 6px;
    font-size: 13.5px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.42;
    word-break: keep-all;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.wf-comment-count {
    color: #16a34a;
    font-weight: 800;
    font-size: 12px;
}

.wf-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11px;
    color: #94a3b8;
    margin-top: 4px;
    padding-top: 6px;
    border-top: 1px dashed #f1f5f9;
}

.wf-author {
    font-weight: 600;
    color: #475569;
}

.wf-date {
    font-variant-numeric: tabular-nums;
}

/* 4. Waterfall Pagination */
.wf-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 28px 0;
    flex-wrap: wrap;
}

.wf-pg-numbers {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.wf-pg-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 16px;
    height: 38px;
    line-height: 38px;
    border-radius: 8px;
    font-size: 13.5px;
    font-weight: 700;
    background: #ffffff;
    border: 1.5px solid #cbd5e1;
    color: #334155;
    text-decoration: none;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    white-space: nowrap;
    box-sizing: border-box;
    transition: all 0.15s ease;
}

.wf-pg-btn:hover {
    border-color: #660099;
    color: #660099;
    background: #faf6fd;
    transform: translateY(-1px);
}

.wf-pg-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    line-height: 38px;
    padding: 0 8px;
    border-radius: 8px;
    border: 1.5px solid #cbd5e1;
    background: #ffffff;
    color: #334155;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    box-sizing: border-box;
    transition: all 0.15s ease;
}

.wf-pg-num:hover {
    border-color: #660099;
    color: #660099;
    background: #faf6fd;
    transform: translateY(-1px);
}

.wf-pg-num.active {
    background: linear-gradient(135deg, #660099, #4a0072);
    color: #ffffff;
    border-color: #660099;
    box-shadow: 0 3px 8px rgba(102, 0, 153, 0.25);
}

/* 5. Search Box */
.wf-search-box {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 12px 14px;
    margin-top: 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.wf-search-box form {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
}

.wf-search-box select {
    padding: 7px 8px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 12.5px;
    background: #f8fafc;
    color: #334155;
    outline: none;
    flex-shrink: 0;
}

.wf-search-box input[type="search"] {
    flex: 1;
    padding: 7px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 13px;
    background: #ffffff;
    color: #1e293b;
    outline: none;
    min-width: 0;
}

.wf-btn-search {
    padding: 7px 14px;
    background: #2d1e3e;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    flex-shrink: 0;
}

/* 6. Read View Modernization */
.bd .hx.h2 {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 18px 24px;
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
.bd .hx.h2 h2 {
    font-size: 20px;
    font-weight: 800;
    color: #1e1b4b;
    margin: 0;
    line-height: 1.45;
}
.bd .hx.h2 .ex {
    font-size: 13px;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 12px;
}
.bd .hx.h2 .ex a {
    color: #94a3b8;
    text-decoration: none;
}
.bd .co {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 28px;
    margin-bottom: 18px;
    font-size: 15.5px;
    line-height: 1.75;
    color: #334155;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
.bd .co img {
    max-width: 100% !important;
    height: auto !important;
    border-radius: 10px;
    margin: 14px auto;
    display: block;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}
.bd .hx.h3 {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 10px 16px;
    margin: 16px 0 10px;
    font-size: 14px;
    font-weight: 700;
    color: #1e293b;
}
.bd .bna {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    margin-top: 14px;
}
.bd .bna a.bn {
    display: inline-flex;
    align-items: center;
    padding: 8px 20px;
    border-radius: 8px;
    font-size: 13.5px;
    font-weight: 700;
    text-decoration: none;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: #334155;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    transition: all 0.15s ease;
}
.bd .bna a.bn:hover {
    border-color: #660099;
    color: #660099;
    background: #faf6fd;
}

