.gallery-item {
    display: block;
    overflow: hidden;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    background: #f2f2f2;
    aspect-ratio: 4 / 3;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-item:hover img,
.gallery-item:focus img {
    transform: scale(1.05);
}

.gallery-item:focus {
    outline: 3px solid #162F6A;
    outline-offset: 2px;
}

#galleryModal .modal-content {
    background: transparent;
    border: 0;
}

#galleryModal .modal-body {
    position: relative;
    padding: 0;
    text-align: center;
}

#galleryModal .modal-body img {
    max-width: 100%;
    max-height: 85vh;
    border-radius: 4px;
}

.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(22, 47, 106, 0.8);
    color: #fff;
    border: 0;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 1.4rem;
    line-height: 1;
}

.gallery-nav:hover {
    background: #162F6A;
}

.gallery-prev {
    left: 8px;
}

.gallery-next {
    right: 8px;
}

.gallery-close {
    position: absolute;
    top: -40px;
    right: 0;
    filter: invert(1);
}

.gallery-counter {
    color: #fff;
    margin-top: 8px;
    font-size: 0.9rem;
}
