/* ===== VSPISHKA GALLERY ===== */

.vg-main{
    min-width:0!important;
    padding-bottom:55px!important;
}

.vg-breadcrumb{
    margin:0 0 18px;
    color:#7890a6;
    font-size:12px;
}

.vg-breadcrumb a{
    color:#1596df!important;
    text-decoration:none!important;
}

.vg-breadcrumb span{
    margin:0 6px;
    color:#a5b7c7;
}

.vg-title{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:20px;
    margin:0 0 20px;
}

.vg-kicker{
    margin-bottom:4px;
    color:#1596df;
    font-size:11px;
    font-weight:800;
    text-transform:uppercase;
    letter-spacing:.4px;
}

.vg-title h1{
    margin:0 0 5px!important;
    color:#0b2f63!important;
    font-size:28px!important;
    font-weight:800!important;
    line-height:1.2!important;
}

.vg-title p{
    margin:0;
    color:#7890a6;
    font-size:13px;
}

.vg-back{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-height:38px;
    padding:8px 13px;
    border:1px solid #b9def4;
    border-radius:8px;
    background:#e7f5ff;
    color:#14365e!important;
    font-size:12px;
    font-weight:700;
    text-decoration:none!important;
}

/* ===== FILTER ===== */

.vg-filter{
    display:grid;
    grid-template-columns:115px 155px 190px minmax(200px,1fr) 85px 85px;
    gap:7px;
    margin-bottom:17px;
    padding:7px;
    background:#e7f5ff;
    border:1px solid #b9def4;
    border-radius:12px;
    width:100%!important;
}

.vg-filter input,
.vg-filter select,
.vg-filter button{
    height:38px;
    border:1px solid #cddfec;
    border-radius:8px;
    background:#fff;
    padding:0 10px;
    color:#14365e;
    font-size:12px;
}

.vg-filter button{
    background:#1596df;
    border-color:#1596df;
    color:#fff;
    font-weight:700;
    cursor:pointer;
}

.vg-filter button:hover{
    background:#0d87d1;
}

.vg-filter .vg-light{
    background:#fff;
    color:#14365e;
    border-color:#b9def4;
}

.vg-meta{
    margin:0 0 11px;
    color:#14365e;
    font-size:12px;
}

/* ===== GRID ===== */

.vg-grid{
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:14px;
}

.vg-card{
    overflow:hidden;
    background:#fff;
    border:1px solid #dcebf5;
    border-radius:13px;
    box-shadow:0 5px 16px rgba(31,95,145,.05);
}

.vg-photo{
    display:block;
    width:100%;
    height:230px;
    padding:8px;
    border:0;
    background:#f7fbfe;
    cursor:pointer;
}

.vg-photo img{
    width:100%;
    height:100%;
    object-fit:contain;
    border-radius:8px;
}

.vg-body{
    padding:11px 12px 13px;
}

.vg-number{
    color:#1596df;
    font-size:10px;
    font-weight:800;
}

.vg-card h2{
    margin:4px 0 8px;
    color:#14365e;
    font-size:14px;
    font-weight:800;
    line-height:1.3;
}

.vg-info{
    display:flex;
    justify-content:space-between;
    gap:8px;
    color:#55728d;
    font-size:11px;
}

.vg-theme{
    margin-top:8px;
    padding:6px 8px;
    border-radius:7px;
    background:#e7f5ff;
    color:#14365e;
    font-size:10px;
    font-weight:700;
}

.vg-empty{
    grid-column:1/-1;
    padding:45px;
    text-align:center;
    color:#7890a6;
    background:#fff;
    border:1px dashed #c8ddeb;
    border-radius:12px;
}

.vg-error{
    color:#b84646;
}

/* ===== PAGER ===== */

.vg-pager{
    display:flex;
    flex-wrap:wrap;
    gap:5px;
    margin-top:18px;
}

.vg-pager button{
    min-width:32px;
    height:32px;
    border:1px solid #b9def4;
    border-radius:7px;
    background:#fff;
    color:#14365e;
    cursor:pointer;
}

.vg-pager button.active{
    background:#1596df;
    color:#fff;
    border-color:#1596df;
}

/* ===== MODAL ===== */

.vg-modal{
    position:fixed;
    inset:0;
    z-index:1000;
    display:none;
    align-items:center;
    justify-content:center;
    padding:25px;
    background:rgba(7,33,58,.72);
}

.vg-modal.open{
    display:flex;
}

.vg-modal-box{
    max-width:950px;
    max-height:90vh;
    overflow:auto;
    background:#fff;
    border-radius:14px;
    padding:15px;
}

.vg-modal-box img{
    display:block;
    max-width:100%;
    max-height:70vh;
    margin:auto;
    object-fit:contain;
}

.vg-modal-box h2{
    margin:13px 0 5px;
}

.vg-modal-box p{
    margin:5px 0;
    color:#55728d;
}

.vg-close{
    position:fixed;
    top:18px;
    right:22px;
    width:42px;
    height:42px;
    border:0;
    border-radius:50%;
    background:#fff;
    color:#d93025;
    font-size:30px;
    cursor:pointer;
}

/* ===== GALLERY INSIDE CABINET ===== */

.vg-main{
    min-width:0!important;
    width:auto!important;
    padding:25px 20px 55px!important;
}

.vg-main>h1{
    display:block!important;
}

.vg-title h1{
    display:block!important;
    margin:0 0 6px!important;
    color:#0b2f63!important;
    font-size:26px!important;
    font-weight:800!important;
}

/* ===== VOTING ===== */

.vg-voting-info{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    margin:0 0 15px;
    padding:13px 16px;
    border:1px solid #b9def4;
    border-radius:12px;
    background:#e7f5ff;
    color:#14365e;
}

.vg-voting-info strong{
    font-size:14px;
    font-weight:800;
}

.vg-voting-info span{
    font-size:12px;
    color:#56738c;
}

.vg-vote-btn{
    width:100%;
    margin-top:12px;
    min-height:40px;
    border:0;
    border-radius:8px;
    background:#1596df;
    color:#fff;
    font-size:13px;
    font-weight:800;
    cursor:pointer;
}

.vg-vote-btn:hover{
    background:#0d87d1;
}

.vg-vote-btn:disabled{
    opacity:.65;
    cursor:default;
}

.vg-vote-done,
.vg-vote-disabled{
    margin-top:12px;
    padding:10px 12px;
    border-radius:8px;
    font-size:12px;
    font-weight:700;
}

.vg-vote-done{
    background:#e8f8ee;
    color:#237246;
}

.vg-vote-disabled{
    background:#f0f3f6;
    color:#6b7b89;
}

/* ===== RESPONSIVE ===== */

@media(max-width:1300px){

    .vg-grid{
        grid-template-columns:repeat(3,minmax(0,1fr));
    }

    .vg-filter{
        grid-template-columns:repeat(3,1fr);
    }
}

@media(max-width:900px){

    .vg-grid{
        grid-template-columns:repeat(2,minmax(0,1fr));
    }

    .vg-title{
        display:block;
    }

    .vg-back{
        margin-top:12px;
    }
}

@media(max-width:850px){

    .vg-main{
        padding:18px 12px 40px!important;
    }
}

@media(max-width:650px){

    .vg-grid{
        grid-template-columns:1fr;
    }

    .vg-filter{
        grid-template-columns:1fr;
    }

    .vg-photo{
        height:300px;
    }

    .vg-voting-info{
        flex-direction:column;
        align-items:flex-start;
    }
}
/* Изображение работы при открытии */

.vg-modal.open {
    display: flex;
    align-items: center;
    justify-content: center;
}

.vg-modal-dialog,
.vg-modal-box {
    max-width: 95vw;
    max-height: 95vh;
    overflow: auto;
}

.vg-modal-image-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
}

#vg-modal-img {
    display: block;
    width: auto !important;
    height: auto !important;
    max-width: 100% !important;
    max-height: 85vh !important;
    object-fit: contain !important;
}