.business-gallery-section {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    order: 3;
}

.profile-left > #featured-services { order: 4; }
.profile-left > .profile-journey-stack { order: 5; }
.profile-left > #services { order: 6; }
.profile-left > .profile-reviews-section { order: 7; }

.business-gallery-section::before {
    content: "";
    position: absolute;
    width: 240px;
    height: 240px;
    right: -110px;
    top: -120px;
    border-radius: 50%;
    background: radial-gradient(circle, color-mix(in srgb, var(--business-secondary) 25%, transparent), transparent 70%);
    pointer-events: none;
    z-index: -1;
}

.business-gallery-heading {
    align-items: flex-end;
    gap: 20px;
    margin-bottom: 22px;
}

.business-gallery-heading p {
    margin: 8px 0 0;
    color: #a9b7d1;
    line-height: 1.65;
}

.business-gallery-count {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
    padding: 10px 13px;
    border: 1px solid rgba(102, 226, 255, .18);
    border-radius: 999px;
    background: rgba(16, 31, 54, .75);
    color: #dce9fb;
    font-size: .76rem;
    font-weight: 800;
}

.business-gallery-count i { color: #63e5ff; }

.business-gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-auto-rows: 150px;
    gap: 12px;
}

.business-gallery-item {
    position: relative;
    min-width: 0;
    padding: 0;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, .14);
    border-radius: 18px;
    background: #101a2e;
    color: #fff;
    cursor: zoom-in;
    box-shadow: 0 16px 38px rgba(0, 0, 0, .2);
}

.business-gallery-item.is-lead {
    grid-column: span 2;
    grid-row: span 2;
}

.business-gallery-count-1 .business-gallery-item.is-lead {
    grid-column: 1 / -1;
    min-height: 360px;
}

.business-gallery-count-2 .business-gallery-item,
.business-gallery-count-3 .business-gallery-item { grid-column: span 2; }

.business-gallery-count-2 .business-gallery-item:not(.is-lead) { grid-row: span 2; }

.business-gallery-item img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: transform .45s ease, filter .45s ease;
}

.business-gallery-item:hover img,
.business-gallery-item:focus-visible img {
    transform: scale(1.045);
    filter: saturate(1.08);
}

.business-gallery-item:focus-visible {
    outline: 3px solid #65e6ff;
    outline-offset: 3px;
}

.business-gallery-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 44%, rgba(3, 8, 20, .82));
    opacity: .88;
    pointer-events: none;
}

.business-gallery-caption {
    position: absolute;
    left: 15px;
    right: 48px;
    bottom: 14px;
    color: #fff;
    font-size: .84rem;
    font-weight: 800;
    line-height: 1.35;
    text-align: left;
    text-shadow: 0 2px 12px rgba(0, 0, 0, .5);
}

.business-gallery-expand {
    position: absolute;
    right: 12px;
    top: 12px;
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 11px;
    background: rgba(5, 12, 27, .72);
    color: #fff;
    opacity: 0;
    transform: translateY(-4px);
    transition: opacity .2s ease, transform .2s ease;
}

.business-gallery-item:hover .business-gallery-expand,
.business-gallery-item:focus-visible .business-gallery-expand {
    opacity: 1;
    transform: none;
}

.profile-gallery-lightbox {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: grid;
    place-items: center;
    padding: 24px;
}

.profile-gallery-lightbox[hidden] { display: none; }

.profile-gallery-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(2, 6, 17, .9);
    backdrop-filter: blur(14px);
}

.profile-gallery-dialog {
    position: relative;
    width: min(1120px, 96vw);
    max-height: 92vh;
    overflow: hidden;
    border: 1px solid rgba(125, 211, 252, .2);
    border-radius: 24px;
    background: #091121;
    box-shadow: 0 34px 100px rgba(0, 0, 0, .62);
}

.profile-gallery-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    min-height: 68px;
    padding: 12px 16px 12px 22px;
    border-bottom: 1px solid rgba(148, 163, 184, .13);
}

.profile-gallery-toolbar > div {
    display: flex;
    align-items: baseline;
    gap: 12px;
}

.profile-gallery-toolbar span { color: #f8fbff; font-weight: 850; }
.profile-gallery-toolbar strong { color: #7ee8ff; font-size: .78rem; }

.profile-gallery-toolbar button,
.profile-gallery-arrow {
    display: grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, .14);
    background: rgba(255, 255, 255, .07);
    color: #fff;
    cursor: pointer;
}

.profile-gallery-toolbar button {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    font-size: 1rem;
}

.profile-gallery-stage {
    position: relative;
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr) 58px;
    align-items: center;
    min-height: 400px;
    padding: 18px;
}

.profile-gallery-stage figure {
    min-width: 0;
    margin: 0;
    text-align: center;
}

.profile-gallery-stage img {
    display: block;
    width: 100%;
    height: min(70vh, 720px);
    object-fit: contain;
    border-radius: 14px;
    background: #050a14;
}

.profile-gallery-stage figcaption {
    min-height: 26px;
    padding: 14px 10px 0;
    color: #c3d0e4;
    font-size: .9rem;
}

.profile-gallery-stage figcaption:empty { display: none; }

.profile-gallery-arrow {
    position: relative;
    z-index: 2;
    width: 44px;
    height: 52px;
    margin: auto;
    border-radius: 15px;
}

.profile-gallery-arrow:hover,
.profile-gallery-toolbar button:hover { background: rgba(83, 215, 255, .17); border-color: rgba(83, 215, 255, .4); }
.profile-gallery-arrow:disabled { opacity: .3; cursor: default; }
body.profile-gallery-open { overflow: hidden; }

@media (max-width: 760px) {
    .business-gallery-heading { align-items: flex-start; }
    .business-gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 132px; gap: 9px; }
    .business-gallery-item.is-lead { grid-column: 1 / -1; grid-row: span 2; }
    .business-gallery-count-1 .business-gallery-item.is-lead { min-height: 280px; }
    .profile-gallery-lightbox { padding: 10px; }
    .profile-gallery-dialog { width: 100%; border-radius: 19px; }
    .profile-gallery-stage { grid-template-columns: 42px minmax(0, 1fr) 42px; min-height: 300px; padding: 10px 4px 14px; }
    .profile-gallery-stage img { height: min(69vh, 620px); border-radius: 10px; }
    .profile-gallery-arrow { width: 36px; height: 46px; }
}

@media (max-width: 460px) {
    .business-gallery-heading { display: block; }
    .business-gallery-count { margin-top: 14px; }
    .business-gallery-grid { grid-auto-rows: 112px; }
    .business-gallery-item.is-lead { grid-row: span 2; }
    .business-gallery-caption { left: 11px; right: 11px; bottom: 10px; font-size: .75rem; }
    .business-gallery-expand { opacity: 1; width: 30px; height: 30px; right: 8px; top: 8px; }
    .profile-gallery-toolbar { min-height: 60px; padding: 9px 10px 9px 15px; }
    .profile-gallery-stage { grid-template-columns: 38px minmax(0, 1fr) 38px; }
}

@media (prefers-reduced-motion: reduce) {
    .business-gallery-item img,
    .business-gallery-expand { transition: none; }
}
