@charset "utf-8";

/**
 * @project ZZAN NeonLime Board Skin - Gallery Layout
 * @author ZZAN Studio
 * @copyright (c) ZZAN Studio. All rights reserved.
 * @description Gallery grid style for ZZAN NeonLime theme.
 */

/* 1. Gallery Layout Variables */
:root {
    --gallery-card-bg: #fff;
    --gallery-card-border: var(--zzan-border);
    --gallery-text-main: var(--zzan-text);
    --gallery-text-sub: var(--zzan-gray-text);
}

[data-theme='dark'] {
    --gallery-card-bg: #1a1a1a;
    --gallery-card-border: rgba(255, 255, 255, 0.1);
}

.zzan-gallery-container {
    margin-top: 20px;
}

/* 2. Grid System Configuration */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(var(--cols, 3), 1fr);
    gap: 24px;
}

/* 3. Gallery Card Component */
.gallery-card {
    background: var(--gallery-card-bg);
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid var(--gallery-card-border);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.gallery-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.15), 0 0 15px var(--zzan-neon);
    border-color: var(--zzan-neon);
}

/* 4. Thumbnail & Visual Area */
.thumb-wrap {
    position: relative;
    display: block;
    width: 100%;
    overflow: hidden;
    background: var(--zzan-menu-hover-bg);
}

.thumb-box {
    position: relative;
    width: 100%;
}

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

.gallery-card:hover .thumb-img {
    transform: scale(1.08);
}

.no-thumb {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 800;
    color: var(--gallery-text-sub);
    opacity: 0.5;
}

.cate-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    padding: 6px 14px;
    background: var(--zzan-neon);
    color: #000;
    font-size: 11px;
    font-weight: 900;
    border-radius: 50px; 
    z-index: 2;
    pointer-events: none;
    text-transform: uppercase;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

/* 5. Card Overlay Controls */
.gallery-card .col-chk {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 10;
    background: var(--gallery-card-bg);
    padding: 5px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: 1px solid var(--gallery-card-border);
    opacity: 0;
    transition: 0.2s;
}

.gallery-card:hover .col-chk,
.gallery-card .col-chk:has(input:checked) {
    opacity: 1;
}

/* 6. Card Body Content */
.card-content {
    padding: 24px 20px 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.subject-link {
    text-decoration: none;
    display: block;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--gallery-card-border);
}

.gallery-card .subject {
    font-size: 18px;
    font-weight: 800;
    color: var(--gallery-text-main);
    margin: 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 2.8em;
    transition: color 0.2s;
}

.gallery-card:hover .subject {
    color: var(--zzan-neon);
}

.gallery-card .cmt-count {
    color: var(--zzan-neon);
    font-weight: 800;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9em;
    margin-left: 5px;
}

/* 7. Card Footer & Metadata */
.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 0;
    border-top: none;
}

.card-footer .author {
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: 60%;
}

.card-footer .p-img {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--gallery-card-border);
}

.card-footer .nick {
    font-size: 13px;
    font-weight: 700;
    color: var(--gallery-text-main);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.card-footer .meta {
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-footer .zzan-cnt {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 800;
    color: var(--zzan-neon);
    transition: 0.2s;
}

.card-footer .zzan-cnt svg {
    width: 14px;
    height: 14px;
}

/* 8. Responsive Gallery Layout */
@media screen and (max-width: 1024px) {
    .gallery-grid {
        gap: 20px;
    }
}

@media screen and (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(var(--m-cols, 1), 1fr);
        gap: 12px;
    }
    .zzan-gallery-container {
        padding: 0;
    }
    .gallery-notices {
        margin-left: 3px;
        margin-right: 3px;
    }
    .gallery-grid {
        padding: 0 3px;
    }
    .card-content {
        padding: 15px;
    }
    .gallery-card .subject {
        font-size: 15px;
    }
    .cate-badge {
        top: 12px;
        left: 12px;
        padding: 4px 10px;
        font-size: 10px;
    }
}
