/**
 * HOSPITAL_PROFILE_GALLERY_UI_R1
 * Booking-style public hospital profile mosaic. Presentation only.
 */

.hospital-profile-gallery-wrap {
    max-width: 100%;
    overflow: hidden;
    padding-left: 0;
    padding-right: 0;
}

.hpg {
    position: relative;
    display: grid;
    gap: 8px;
    width: 100%;
    max-width: 100%;
    height: 420px;
    border-radius: 12px;
    overflow: hidden;
}

.hpg--count-1 {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
}

.hpg--count-2 {
    grid-template-columns: 1.7fr 1fr;
    grid-template-rows: 1fr;
}

.hpg--count-3 {
    grid-template-columns: 1.7fr 1fr;
    grid-template-rows: repeat(2, minmax(0, 1fr));
}

.hpg--count-many {
    grid-template-columns: 2fr 1fr 1fr;
    grid-template-rows: repeat(2, minmax(0, 1fr));
}

.hpg__item {
    position: relative;
    display: block;
    min-width: 0;
    min-height: 44px;
    overflow: hidden;
    background: #e8eef6;
    cursor: pointer;
    -webkit-tap-highlight-color: rgba(0, 0, 53, 0.12);
}

.hpg__item:focus {
    outline: 3px solid #00357b;
    outline-offset: 2px;
    z-index: 1;
}

.hpg__item--hero {
    grid-column: 1;
    grid-row: 1 / span 2;
}

.hpg--count-1 .hpg__item--hero,
.hpg--count-2 .hpg__item--hero {
    grid-row: 1;
}

.hpg--count-2 .hpg__item--side {
    grid-row: 1 / span 2;
}

.hpg__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.hpg__more {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 53, 0.55);
    color: #fff;
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    pointer-events: none;
    text-align: center;
    padding: 8px;
}

.hpg__more--mobile {
    display: none;
}

.hpg__item--extra {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

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

    .hpg__item--hero {
        grid-column: 1 / -1;
        grid-row: 1;
        min-height: 220px;
        max-height: 280px;
    }

    .hpg--count-1 .hpg__item--hero {
        max-height: 320px;
    }

    .hpg--count-2 .hpg__item--side {
        grid-column: 1 / -1;
        grid-row: auto;
        min-height: 140px;
    }

    .hpg__item--side {
        min-height: 120px;
    }

    .hpg__item--desktop-only {
        position: absolute !important;
        width: 1px !important;
        height: 1px !important;
        padding: 0 !important;
        margin: -1px !important;
        overflow: hidden !important;
        clip: rect(0, 0, 0, 0) !important;
        white-space: nowrap !important;
        border: 0 !important;
    }

    .hpg__more--desktop {
        display: none;
    }

    .hpg__more--mobile {
        display: flex;
    }
}

@media (min-width: 992px) {
    .hpg__item:hover img {
        transform: scale(1.03);
        transition: transform 0.35s ease;
    }

    .hpg__item img {
        transition: transform 0.35s ease;
    }
}
