/* ==========================================================================
   File: Resource/3d/3d.css
   KHALA STUDIO — 3D RESOURCE GALLERY
   - Clean 3D Assets Gallery (Pure Resource Showcase)
   - Multi-Height Continuous Masonry Grid
   - Glass Blur Direct Telegram Download Action
   ========================================================================== */

/* --------------------------------------------------------------------------
   Top Bar — Back button + Title (50px from top)
   -------------------------------------------------------------------------- */
.threed-top-bar {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 50px 0 24px;
}

/* --------------------------------------------------------------------------
   Masonry Column Grid (Natural Multi-Height 3D Assets)
   -------------------------------------------------------------------------- */
.threed-grid-viewport {
    position: relative;
    width: 100%;
    min-height: 400px;
}

.threed-loading-mask {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--hub-bg);
    z-index: 10;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.28s ease, visibility 0.28s ease;
    pointer-events: none;
}

.threed-loading-mask.hidden {
    opacity: 0;
    visibility: hidden;
}

.threed-grid {
    display: flex;
    gap: var(--hub-gap);
    width: 100%;
    align-items: flex-start;
    opacity: 0;
    animation: pureFadeIn 0.28s ease forwards;
}

.threed-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: var(--hub-gap);
    min-width: 0;
}

.threed-card {
    position: relative;
    width: 100%;
    border-radius: var(--hub-radius) !important;
    overflow: hidden;
    cursor: pointer;
    background-color: var(--hub-soft);
    background-image: 
        linear-gradient(45deg, var(--hub-border) 25%, transparent 25%), 
        linear-gradient(-45deg, var(--hub-border) 25%, transparent 25%), 
        linear-gradient(45deg, transparent 75%, var(--hub-border) 75%), 
        linear-gradient(-45deg, transparent 75%, var(--hub-border) 75%);
    background-size: 16px 16px;
}

.threed-card img {
    width: 100%;
    height: auto;
    display: block;
    pointer-events: none;
}

/* Glass Blur Download Action */
.threed-download-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50% !important;
    background: rgba(0, 0, 0, 0.121);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity .18s ease;
    cursor: pointer;
    z-index: 2;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.threed-download-btn span {
    font-size: 20px !important;
    color: #ffffff;
}

.threed-card:hover .threed-download-btn,
.threed-card:focus-within .threed-download-btn {
    opacity: 1;
}

.threed-empty {
    width: 100%;
    text-align: center;
    font-size: 1.125rem !important;
    color: var(--hub-text);
    padding: 60px 0;
    line-height: 1.5;
    background: var(--hub-soft);
    border-radius: var(--hub-radius);
}

@keyframes pureFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* --------------------------------------------------------------------------
   Responsive Breakpoints
   -------------------------------------------------------------------------- */
@media (max-width: 700px) {
    .threed-top-bar {
        margin-top: 48px;
    }

    .threed-download-btn {
        width: 30px;
        height: 30px;
        opacity: 0.9;
    }

    .threed-download-btn span {
        font-size: 16px !important;
    }
}