/* Gallery lightbox: display source images at a useful preview size, including smaller uploads. */
.kipya-gallery-viewer {
    padding: 56px 72px;
}
.kipya-gallery-viewer img {
    display: block;
    width: min(88vw, 1500px);
    height: min(80vh, 1000px);
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
.kipya-gallery-viewer-close {
    z-index: 2;
    top: 14px;
    right: 24px;
    font-size: 44px;
    line-height: 1;
}
.kipya-gallery-viewer-prev,
.kipya-gallery-viewer-next {
    z-index: 2;
    padding: 18px;
    font-size: 58px;
}

/* Give the collection grid more room and keep the title plaque compact. */
.kipya-gallery-collections {
    width: calc(100% - 64px);
    max-width: 1760px;
}
.kipya-gallery-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
.kipya-gallery-card {
    min-height: 360px;
    padding: 18px;
    z-index: 0;
    isolation: isolate;
}
.kipya-gallery-card::before,
.kipya-gallery-card::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: #fff;
    border: 1px solid #e8e8e8;
    box-shadow: 0 3px 9px rgba(0, 0, 0, .14);
    pointer-events: none;
}
.kipya-gallery-card::before {
    transform: translate(5px, 5px);
}
.kipya-gallery-card::after {
    z-index: -2;
    transform: translate(10px, 10px);
}
.kipya-gallery-card-image {
    height: 320px;
}
.kipya-gallery-card-count {
    background: #026b4b;
    color: #fff;
}
.kipya-gallery-card-title {
    left: 5%;
    width: min(68%, 320px);
    min-height: 112px;
    padding: 16px;
}

/* Align the logo, menu links, search, and contact details into one desktop row. */
@media (min-width: 1200px) {
    .menu-section > .container > .row {
        flex-wrap: nowrap;
        align-items: center;
    }
    .menu-section > .container > .row > .col-lg-3 {
        flex: 0 0 15%;
        max-width: 15%;
    }
    .menu-section > .container > .row > .col-lg-7 {
        flex: 0 0 61%;
        max-width: 61%;
    }
    .menu-section > .container > .row > .col-lg-2 {
        flex: 0 0 24%;
        max-width: 24%;
    }
    .menu-section .navbar .container-fluid {
        padding-right: 0;
        padding-left: 0;
    }
    .menu-section .navbar-nav {
        width: 100%;
        flex-wrap: nowrap;
        align-items: center;
        justify-content: space-between;
        gap: 4px;
    }
    .menu-section .menu-item .nav-link {
        padding: 8px 4px !important;
        white-space: nowrap;
        font-size: clamp(14px, .95vw, 18px);
        line-height: 1.25;
    }
    .menu-section > .container > .row > .col-lg-2 .d-flex {
        justify-content: flex-end;
        align-items: center;
        gap: 14px;
        white-space: nowrap;
    }
    .menu-section > .container > .row > .col-lg-2 .search {
        flex: 0 0 auto;
    }
    .menu-section .number {
        position: static;
        font-size: clamp(13px, .9vw, 17px);
        letter-spacing: 0;
    }
    .menu-section .callus {
        white-space: nowrap;
    }
    .menu-section .dropdown-menu {
        top: 100%;
        left: 0;
        min-width: 14rem;
        margin-top: 0;
    }
}

@media (max-width: 760px) {
    .kipya-gallery-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .kipya-gallery-collections {
        width: calc(100% - 30px);
    }
    .kipya-gallery-card {
        min-height: 340px;
        padding: 12px;
    }
    .kipya-gallery-card-image {
        height: 310px;
    }
    .kipya-gallery-card-title {
        width: 72%;
        min-height: 112px;
        padding: 14px 12px;
    }
    .kipya-gallery-viewer {
        padding: 56px 42px;
    }
    .kipya-gallery-viewer img {
        width: 90vw;
        height: 76vh;
    }
}

@media (max-width: 480px) {
    .kipya-gallery-grid {
        grid-template-columns: 1fr;
    }
}
