.ig-gallery-wrap {
    background: #000;
    padding: 0;
}

.ig-gallery {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1px;
}

.ig-gallery__item {
    min-width: 0;
    background: #000;
}

.ig-card {
    position: relative;
    display: block;
    overflow: hidden;
    background: #050505;
    text-decoration: none;
    color: inherit;
}

.ig-card::before {
    content: "";
    display: block;
    padding-top: 125%;
}

.ig-card__image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1);
    transition: transform .55s cubic-bezier(.22, .61, .36, 1), opacity .35s ease, filter .35s ease;
    will-change: transform;
}

.ig-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 20%, rgba(0, 0, 0, .18) 100%);
    opacity: 0;
    transition: opacity .35s ease;
    pointer-events: none;
}

.ig-card:hover .ig-card__image,
.ig-card:focus .ig-card__image {
    transform: scale(1.045);
}

.ig-card:hover::after,
.ig-card:focus::after {
    opacity: 1;
}

.ig-card__play {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 54px;
    height: 54px;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: rgba(0, 0, 0, .46);
    border: 1px solid rgba(255, 255, 255, .22);
    backdrop-filter: blur(4px);
    pointer-events: none;
    transition: transform .25s ease, background-color .25s ease, opacity .25s ease;
    z-index: 3;
}

.ig-card:hover .ig-card__play {
    transform: translate(-50%, -50%) scale(1.06);
    background: rgba(0, 0, 0, .58);
}

.ig-card__play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-35%, -50%);
    width: 0;
    height: 0;
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    border-left: 16px solid #fff;
}

.ig-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
}

.ig-modal.d-none {
    display: none !important;
}

.ig-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .88);
    backdrop-filter: blur(3px);
    opacity: 1;
    transition: opacity .28s ease;
}

/* IMPORTANT:
   Dialog width shrinks to fit media + right panel.
   It no longer stretches across the whole screen.
*/
.ig-modal__dialog {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: stretch;
    justify-content: flex-start;
    width: fit-content;
    max-width: calc(100vw - 48px);
    height: calc(100vh - 48px);
    margin: 24px auto;
    overflow: hidden;
    background: #0a0a0a;
    border: 1px solid rgba(255, 184, 0, .14);
    border-radius: 10px;
    box-shadow: 0 30px 70px rgba(0, 0, 0, .42);
}

.ig-modal__close {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 30;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, .5);
    color: #fff;
    font-size: 38px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    transition: background-color .2s ease, transform .2s ease, opacity .2s ease;
}

.ig-modal__close:hover {
    background: rgba(0, 0, 0, .72);
    transform: scale(1.06);
}

/* LEFT SIDE */
.ig-modal__media {
    position: relative;
    flex: 0 0 auto;
    min-width: 0;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: #000;
    overflow: hidden;
}

.ig-modal__media::before,
.ig-modal__media::after {
    display: none !important;
}

/* IMPORTANT:
   Real ratio by width derived from dialog height.
   Also accounts for the fixed 400px right panel.
*/
.ig-modal__media--image {
    width: min(
            calc((100vh - 48px - 48px) * 4 / 5),
            calc(100vw - 48px - 400px - 2px)
    );
}

.ig-modal__media--video {
    width: min(
            calc((100vh - 48px - 48px) * 9 / 16),
            calc(100vw - 48px - 400px - 2px)
    );
}

.ig-modal__frame {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    margin: 0 auto;
}

.ig-modal__media-inner {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #000;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
}

.ig-modal__single-image,
.ig-modal__video,
.ig-modal__youtube {
    display: block;
    background: #000;
    border: 0;
}

.ig-modal__single-image,
.ig-modal__carousel-item img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    margin: auto;
    display: block;
}

.ig-modal__video {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    margin: auto;
    display: block;
}

.ig-modal__youtube {
    width: 100%;
    height: 100%;
    display: block;
}

.ig-modal__single-image {
    opacity: 0;
    transform: scale(1.015);
    transition: opacity .35s ease, transform .55s cubic-bezier(.22, .61, .36, 1);
}

.ig-modal__single-image.is-loaded {
    opacity: 1;
    transform: scale(1);
}

.ig-modal__video,
.ig-modal__youtube {
    opacity: 0;
    transition: opacity .35s ease;
}

.ig-modal__video.is-loaded,
.ig-modal__youtube.is-loaded {
    opacity: 1;
}

.ig-modal__carousel {
    position: relative;
    width: 100%;
    height: 100%;
}

.ig-modal__carousel-track {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #000;
}

.ig-modal__carousel-item {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: scale(1.02);
    transition: opacity .32s ease, transform .42s cubic-bezier(.22, .61, .36, 1), visibility .32s ease;
    will-change: opacity, transform;
}

.ig-modal__carousel-item.is-active {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
    z-index: 2;
}

.ig-modal__carousel-item img {
    opacity: 0;
    transform: scale(1.015);
    transition: opacity .28s ease, transform .55s cubic-bezier(.22, .61, .36, 1);
}

.ig-modal__carousel-item img.is-loaded,
.ig-modal__carousel-item.is-active img {
    opacity: 1;
    transform: scale(1);
}

.ig-modal__nav {
    position: absolute;
    top: 50%;
    z-index: 8;
    width: 44px;
    height: 44px;
    margin-top: -22px;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, .48);
    color: #fff;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    backdrop-filter: blur(4px);
    transition: background-color .2s ease, transform .2s ease, opacity .2s ease;
}

.ig-modal__nav:hover {
    background: rgba(0, 0, 0, .72);
    transform: scale(1.06);
}

.ig-modal__nav--prev {
    left: 14px;
}

.ig-modal__nav--next {
    right: 14px;
}

.ig-modal__dots {
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: 16px;
    z-index: 8;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    pointer-events: none;
}

.ig-modal__dot {
    width: 8px;
    height: 8px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .42);
    cursor: pointer;
    padding: 0;
    pointer-events: auto;
    transition: transform .2s ease, opacity .2s ease, background-color .2s ease;
}

.ig-modal__dot.is-active {
    background: #fff;
    transform: scale(1.2);
}

/* RIGHT SIDE */
.ig-modal__content {
    position: relative;
    flex: 0 0 400px;
    width: 400px;
    min-width: 400px;
    max-width: 400px;
    flex-shrink: 0;
    background: #050505;
    color: #fff;
    border-left: 1px solid rgba(255, 184, 0, .14);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 184, 0, .32) transparent;
}

.ig-modal__content::-webkit-scrollbar {
    width: 8px;
}

.ig-modal__content::-webkit-scrollbar-thumb {
    background: rgba(255, 184, 0, .26);
    border-radius: 10px;
}

.ig-modal__content-inner {
    padding: 28px 24px;
}

.ig-modal__text {
    color: rgba(255, 255, 255, .92);
    font-size: 15px;
    line-height: 1.92;
}

.ig-modal__text p {
    margin-bottom: 22px;
}

.ig-modal__text p:last-child {
    margin-bottom: 0;
}

.ig-modal__text strong,
.ig-modal__text b {
    color: #fff;
    font-weight: 700;
}

.ig-modal__text a {
    color: #ffb948;
    text-decoration: none;
}

.ig-modal__text a:hover {
    text-decoration: underline;
}

.ig-modal__post-nav {
    position: absolute;
    top: 50%;
    z-index: 30;
    width: 48px;
    height: 48px;
    margin-top: -24px;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, .56);
    color: #fff;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    backdrop-filter: blur(4px);
    transition: background-color .2s ease, transform .2s ease, opacity .2s ease;
}

.ig-modal__post-nav:hover {
    background: rgba(0, 0, 0, .76);
    transform: scale(1.06);
}

.ig-modal__post-nav--prev {
    left: 18px;
}

.ig-modal__post-nav--next {
    right: 18px;
}

.ig-modal__loader-skeleton,
.ig-modal__error {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.ig-modal__media-skeleton {
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, #111 25%, #1e1e1e 37%, #111 63%);
    background-size: 400% 100%;
    animation: igSkeleton 1.4s ease infinite;
}

.ig-modal__content-loading {
    padding: 28px 24px;
}

.ig-modal__content-line {
    height: 14px;
    margin-bottom: 14px;
    border-radius: 4px;
    background: linear-gradient(90deg, #121212 25%, #1c1c1c 37%, #121212 63%);
    background-size: 400% 100%;
    animation: igSkeleton 1.4s ease infinite;
}

.ig-modal__content-line--short {
    width: 60%;
}

.ig-modal__error-text {
    color: #fff;
    font-size: 16px;
    text-align: center;
    padding: 20px;
}

body.ig-modal-open {
    overflow: hidden;
}

.d-none {
    display: none !important;
}
@media (min-width: 768px) {
    .d-md-inline-block {
        display: inline-block !important;
    }
}

@media (min-width: 992px) {
    .d-lg-inline-block {
        display: inline-block !important;
    }
}

@media (min-width: 1200px) {
    .d-xl-inline-block {
        display: inline-block !important;
    }
}

@media (min-width: 1400px) {
    .d-xxl-inline-block {
        display: inline-block !important;
    }
}
@media (min-width:768px) {
    .d-md-block {
        display: block !important
    }
}
@keyframes igSkeleton {
    0% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0 50%;
    }
}

@media (max-width: 1199.98px) {
    .ig-gallery {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .ig-modal__content {
        flex: 0 0 360px;
        width: 360px;
        min-width: 360px;
        max-width: 360px;
    }

    .ig-modal__media--image {
        width: min(
                calc((100vh - 48px - 48px) * 4 / 5),
                calc(100vw - 48px - 360px - 2px)
        );
    }

    .ig-modal__media--video {
        width: min(
                calc((100vh - 48px - 48px) * 9 / 16),
                calc(100vw - 48px - 360px - 2px)
        );
    }

    .ig-modal__content-inner,
    .ig-modal__content-loading {
        padding: 24px 20px;
    }
}

@media (max-width: 991.98px) {
    .ig-gallery {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ig-modal__dialog {
        max-width: calc(100vw - 20px);
        height: calc(100vh - 20px);
        margin: 10px auto;
    }

    .ig-modal__media {
        padding: 18px;
    }

    .ig-modal__content {
        flex: 0 0 320px;
        width: 320px;
        min-width: 320px;
        max-width: 320px;
    }

    .ig-modal__media--image {
        width: min(
                calc((100vh - 20px - 36px) * 4 / 5),
                calc(100vw - 20px - 320px - 2px)
        );
    }

    .ig-modal__media--video {
        width: min(
                calc((100vh - 20px - 36px) * 9 / 16),
                calc(100vw - 20px - 320px - 2px)
        );
    }
}

@media (max-width: 767.98px) {
    .ig-gallery {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ig-modal__dialog {
        display: flex;
        flex-direction: column;
        width: calc(100vw - 20px);
        max-width: calc(100vw - 20px);
        height: calc(100vh - 20px);
        margin: 10px auto;
        overflow-y: auto;
        background: #050505;
        border-radius: 0;
        border: 0;
    }

    .ig-modal__media {
        position: relative;
        flex: 0 0 auto;
        width: 100% !important;
        max-width: 100% !important;
        height: auto;
        min-height: 280px;
        padding: 16px;
        background: #000;
        overflow: hidden;
    }

    .ig-modal__media--image {
        aspect-ratio: 4 / 5;
    }

    .ig-modal__media--video {
        aspect-ratio: 16 / 9;
    }

    .ig-modal__frame {
        position: relative;
        width: 100%;
        height: 100%;
        max-width: 100%;
        max-height: none;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .ig-modal__media-inner {
        position: relative;
        width: 100%;
        height: 100%;
        min-height: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        overflow: hidden;
        background: #000;
    }

    .ig-modal__single-image,
    .ig-modal__carousel-item img {
        display: block;
        width: 100%;
        height: 100%;
        max-width: 100%;
        max-height: 100%;
        object-fit: contain;
        margin: 0;
    }

    .ig-modal__carousel,
    .ig-modal__carousel-track {
        width: 100%;
        height: 100%;
        min-height: 100%;
    }

    .ig-modal__carousel-item {
        position: absolute;
        inset: 0;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .ig-modal__video,
    .ig-modal__youtube {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }

    .ig-modal__content {
        flex: 0 0 auto;
        width: 100%;
        min-width: 100%;
        max-width: 100%;
        border-left: 0;
        border-top: 1px solid rgba(255, 184, 0, .12);
    }

    .ig-modal__content-inner,
    .ig-modal__content-loading {
        padding: 20px 16px;
    }

    .ig-modal__post-nav {
        width: 42px;
        height: 42px;
        margin-top: -21px;
    }

    .ig-modal__post-nav--prev {
        left: 10px;
    }

    .ig-modal__post-nav--next {
        right: 10px;
    }

    .ig-modal__nav {
        width: 40px;
        height: 40px;
        margin-top: -20px;
    }

    .ig-modal__nav--prev {
        left: 10px;
    }

    .ig-modal__nav--next {
        right: 10px;
    }
    .ig-modal__post-nav {
        display: none;
    }
}