.gallery-top {
    padding: 90px 20px 60px;
    text-align: center;
    border-bottom: 1px solid #eceff4;
    background: #fff;
}

.gallery-top h1 {
    margin: 0 0 14px;
    font-size: 42px;
    font-weight: 800;
    color: #173b72;
}

.gallery-top p {
    margin: 0;
    font-size: 18px;
    color: #666;
}

.gallery-main {
    max-width: 1150px;
    margin: 0 auto;
    padding: 70px 20px 100px;
}

.gallery-wrap {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.gallery-card {
    overflow: hidden;
    border: 1px solid #e6ebf2;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 10px 25px rgba(0, 0, 0, .04);
    transition: .25s;
}

.gallery-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 34px rgba(0, 0, 0, .08);
}

.gallery-img {
    height: 330px;
    overflow: hidden;
    background: #f5f7fa;
}

.gallery-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transform: translateZ(0);
}

.gallery-text {
    padding: 22px 24px;
}

.gallery-text h3 {
    margin: 0 0 8px;
    font-size: 21px;
    font-weight: 800;
    color: #173b72;
}

.gallery-text span {
    font-size: 14px;
    color: #888;
}

.gallery-empty {
    padding: 80px 20px;
    text-align: center;
    border: 1px solid #e6ebf2;
    border-radius: 18px;
    background: #fff;
    color: #777;
    font-size: 17px;
}

.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition:
        opacity .7s ease,
        transform .7s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.gallery-admin-btn-wrap {
    margin-top: 28px;
}

.gallery-admin-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 44px;
    padding: 0 22px;
    border-radius: 10px;
    background: #173b72;
    color: #fff;
    font-size: 15px;
    font-weight: 800;
    text-decoration: none;
}

.gallery-admin-btn:hover {
    background: #0f2d58;
}

.gallery-admin-btn-wrap {
    margin-top: 28px;
}

.gallery-admin-btn {
    height: 44px;
    padding: 0 22px;
    border: 0;
    border-radius: 10px;
    background: #173b72;
    color: #fff;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
}

.gallery-layer {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 3000;
    background: rgba(0, 0, 0, .45);
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.gallery-layer.active {
    display: flex;
}

.gallery-layer-box {
    position: relative;
    width: 100%;
    max-width: 480px;
    padding: 36px 32px;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .22);
}

.gallery-layer-box h2 {
    margin: 0 0 26px;
    font-size: 24px;
    color: #173b72;
    text-align: center;
}

.gallery-layer-close {
    position: absolute;
    top: 14px;
    right: 18px;
    border: 0;
    background: none;
    font-size: 30px;
    cursor: pointer;
    color: #555;
}

.gallery-form-group {
    margin-bottom: 16px;
}

.gallery-form-group label {
    display: block;
    margin-bottom: 7px;
    font-size: 14px;
    font-weight: 700;
}

.gallery-form-group input[type="text"],
.gallery-form-group input[type="file"] {
    width: 100%;
    height: 44px;
    padding: 9px 13px;
    border: 1px solid #d8dde8;
    border-radius: 10px;
    font-size: 14px;
}

.gallery-preview {
    margin: 12px 0 18px;
}

.gallery-preview img {
    width: 100%;
    max-height: 260px;
    object-fit: cover;
    border-radius: 12px;
    display: block;
}

.gallery-submit-btn {
    width: 100%;
    height: 48px;
    border: 0;
    border-radius: 12px;
    background: #174c94;
    color: #fff;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
}

@media (max-width: 900px) {
    .gallery-top {
        padding: 60px 16px 40px;
    }

    .gallery-top h1 {
        font-size: 32px;
    }

    .gallery-top p {
        font-size: 15px;
    }

    .gallery-main {
        padding: 50px 16px 80px;
    }

    .gallery-wrap {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .gallery-img {
        height: 240px;
    }

    .gallery-text h3 {
        font-size: 19px;
    }
}

.gallery-file-input {
    display: none;
}

.gallery-file-box {

    width: 100%;
    min-height: 150px;

    border: 2px dashed #d4dbe7;
    border-radius: 16px;

    background: #f8fafd;

    display: flex;
    flex-direction: column;

    justify-content: center;
    align-items: center;

    text-align: center;

    cursor: pointer;

    padding: 20px;

    transition: .2s;
}


.gallery-file-box:hover {

    border-color: #173b72;
    background: #f2f7ff;

}


.gallery-file-icon {

    width: 54px;
    height: 54px;

    border-radius: 50%;

    background: #173b72;
    color: #fff;

    display: flex;

    justify-content: center;
    align-items: center;

    font-size: 30px;

    margin: 0 auto 14px;
}


.gallery-file-box strong {

    display: block;

    margin-bottom: 8px;

    font-size: 16px;

    color: #173b72;
}


.gallery-file-box em {

    display: block;

    font-style: normal;

    color: #777;

    font-size: 13px;
}

.gallery-more-wrap {

    text-align: center;

    margin-top: 50px;

}


#galleryMoreBtn {

    border: 0;

    height: 50px;

    padding: 0 30px;

    border-radius: 50px;

    background: #173b72;

    color: #fff;

    cursor: pointer;

    font-size: 15px;

    font-weight: 700;
}


#galleryMoreBtn:hover {

    opacity: .9;

}

.gallery-img {
    position: relative;
}


.gallery-admin-control {

    position: absolute;

    top: 12px;
    right: 12px;

    display: flex;

    gap: 6px;

    z-index: 5;
}


.gallery-edit-btn,
.gallery-delete-btn {

    display: flex;

    align-items: center;
    justify-content: center;

    height: 32px;

    padding: 0 12px;

    border: 0;
    border-radius: 8px;

    font-size: 13px;
    font-weight: 700;

    line-height: 1;

    color: #fff;

    cursor: pointer;
}


.gallery-edit-btn {

    background:
        rgba(0, 0, 0, .65);

}


.gallery-delete-btn {

    background:
        rgba(190, 40, 40, .85);

}


.gallery-edit-btn input {

    display: none;

}

@media (max-width: 900px) {
    .gallery-top {
        padding: 25px 16px 30px !important;
    }
}