.gallery-hero {
    margin-top: 65px;
    min-height: 250px;
    background:
        linear-gradient(rgba(10, 26, 54, .78), rgba(10, 26, 54, .78)),
        url('../assets/images/home/mmrhss1.webp') center/cover;
    display: flex;
    align-items: center;
}

.gallery-hero-content h1 {
    color: #fff;
    font-size: 4rem;
    font-weight: 700;
}

.gallery-hero-content p {
    color: rgba(255, 255, 255, .85);
    max-width: 650px;
}

.gallery-filter {
    padding: 40px 0 10px;
}

.gallery-tabs {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.gallery-tabs span {
    padding: 12px 24px;
    border-radius: 40px;
    background: #f3f5f8;
}

.gallery-tabs .active {
    background: #0A1A36;
    color: #fff;
}

.gallery-section {
    padding: 30px 0 60px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 280px;
    grid-auto-flow: dense;
    gap: 20px;
}

.gallery-item {
    overflow: hidden;
    border-radius: 24px;
    transition: .4s;
    opacity: 0;
    transform: translateY(12px);
    animation: fadeGallery .45s ease forwards;
    background: #eef2f7;
}

.gallery-item.landscape {
    grid-column: span 2;
}

.gallery-item.portrait {
    grid-row: span 2;
}

.gallery-item.square {
    grid-column: span 1;
    grid-row: span 1;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center top;
    transition: .5s;
}

.gallery-item:hover img {
    transform: scale(1.04);
}

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

.gallery-item a {
    display: block;
    width: 100%;
    height: 100%;
}

.gallery-item a img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .9);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.image-modal img {
    max-width: 90%;
    max-height: 85vh;
    border-radius: 12px;
}

.modal-close {
    position: absolute;
    top: 25px;
    right: 35px;
    color: #fff;
    font-size: 42px;
    cursor: pointer;
    z-index: 10000;
}

.modal-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, .2);
    color: #fff;
    border: none;
    font-size: 45px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
}

.modal-btn:hover {
    background: rgba(255, 255, 255, .35);
}

.prev {
    left: 30px;
}

.next {
    right: 30px;
}

@media(max-width:768px) {
    .modal-btn {
        font-size: 30px;
        width: 45px;
        height: 45px;
    }

    .prev {
        left: 10px;
    }

    .next {
        right: 10px;
    }

    .modal-close {
        top: 15px;
        right: 20px;
        font-size: 36px;
    }
}

@media(max-width:991px) {
    .gallery-grid {
        grid-template-columns: 1fr;
        grid-auto-rows: auto;
    }

    .gallery-item,
    .gallery-item.landscape,
    .gallery-item.portrait,
    .gallery-item.square {
        grid-column: auto;
        grid-row: auto;
        min-height: 220px;
    }

    .gallery-item img {
        height: auto;
        min-height: 220px;
        max-height: 420px;
        object-fit: cover;
    }

    .gallery-hero-content h1 {
        font-size: 2.5rem;
    }
}

.gallery-skeleton {
    background: #fff;
    border-radius: 22px;
    overflow: hidden;
    min-height: 230px;
    position: relative;
}

.gallery-skeleton::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg,
            #f1f5f9 0%,
            #e2e8f0 50%,
            #f1f5f9 100%);
    animation: skeletonLoading 1.4s infinite;
}

@keyframes skeletonLoading {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

.gallery-item {
    opacity: 0;
    transform: translateY(12px);
    animation: fadeGallery .45s ease forwards;
}

@keyframes fadeGallery {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-content-box {
    max-width: 90%;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.modal-content-box img {
    max-width: 100%;
    max-height: 72vh;
    object-fit: contain;
    border-radius: 14px;
}

.modal-caption {
    margin-top: 14px;
    text-align: center;
    color: #fff;
}

.modal-caption h4 {
    margin: 0 0 4px;
    font-weight: 800;
}

.modal-caption p {
    margin: 0;
    color: rgba(255, 255, 255, .75);
}

.modal-caption span {
    display: block;
    margin-top: 6px;
    font-size: .85rem;
    color: rgba(255, 255, 255, .65);
}