/********************************************************************
* Вёрстка max, the murderer! © 2022
* Разрешено использование и модификация с копирайтом
********************************************************************/

.insta_single {
    display: block;
    background: white;
    color: black;
    width: fit-content;
    margin: 0 auto;
}

.insta_single_header {
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 16px;
}

.insta_single_avatar img {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid white !important;
}

.insta_single_avatar {
    border-radius: 50%;
    padding: 2px 1px 0px 1px;
    margin: 2px;
    background: linear-gradient(45deg, #b59bc0 25%, #d0bddd 50%, #ebebeb 75%);
}

.insta_single_nickname {
   font-size: 12px;
    line-height: 100%;
    font-family: Montserrat;
    font-weight: 600;
    margin-left: 12px !important;
    flex-grow: 1;
    color: #434343;
}

.insta_single_options {
    width: 24px;
    height: 24px;
    display: inline-block;
    background: url(/files/001b/95/a1/58995.svg) center center no-repeat;
}

.insta_single_buttons {
    display: flex;
    flex-direction: row;
    padding: 16px;
}

.insta_single_icons {
    flex-grow: 1;
}

.insta_single_icons div,
.insta_single_bookmark {
    display: inline-block;
    margin-right: 16px;
    width: 24px;
    height: 24px;
}

.insta_single_like {
    background: url(/files/001b/95/a1/12417.svg) center center no-repeat;
}

.insta_single_comment {
    background: url(/files/001b/95/a1/90428.svg) center center no-repeat;
}

.insta_single_share {
    background: url(/files/001b/95/a1/68541.svg) center center no-repeat;
}

.insta_single_bookmark {
    background: url(/files/001b/95/a1/11440.svg) center center no-repeat;
    margin-right: 0;
}

.insta_single_liked img {
 dysplay: none;
}

.insta_single_liked,
.insta_single_description {
    font-size: 12px;
    line-height: 100%;
    font-family: 'Montserrat';
    font-weight: 400;
    padding: 0 16px;
    color: #434343;
}

.insta_single_liked strong,
.insta_single_description strong {
    font-weight: 600;
}

.insta_single_description {
    margin-top: 8px;
    line-height: 120%;
}

.insta_single_date {
    font-size: 10px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    font-weight: 400;
    padding: 0 16px;
    color: rgba(142 142 142 / 1);
    text-transform: uppercase;
    letter-spacing: .2px;
    padding: 16px;
}

.insta_single_tabbar {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    border-top: 1px solid rgba(219 219 219 / 1);
}

.insta_single_tabbar div {
    flex-grow: 1;
    padding: 16px;
    text-align: center;
}

.insta_single_tabbar .tab_home {
    background: url(/files/001b/95/a1/33203.svg) center center no-repeat;
}

.insta_single_tabbar .tab_search {
    background: url(/files/001b/95/a1/14397.svg) center center no-repeat;
}

.insta_single_tabbar .tab_add {
    background: url(/files/001b/95/a1/48672.svg) center center no-repeat;
}

.insta_single_tabbar .tab_likes {
    background: url(/files/001b/95/a1/12417.svg) center center no-repeat;
}

.insta_single_tabbar .tab_profile img {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid white;
    box-shadow: 0 0 0 1px black;
}

/* Сетка публикаций */
 .insta_post {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    width: 80% !important;
    max-width: 720px;     /* ← регулируйте размер */
}



/* Элемент публикации */
.insta_item {
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    opacity: 0;
    transform: scale(0.95);
    transition: opacity .3s ease, transform .3s ease;
}

.insta_item.show {
    opacity: 1;
    transform: scale(1);
}

.insta_item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    cursor: pointer;
}

.insta_layout {
    width: 100%;
    display: flex;
    justify-content: center;
}


/* Контейнер фото */
.insta_single_photo {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: #000;
}

/* Размытый фон */
.insta_photo_bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    filter: blur(25px);
    transform: scale(1.2);
    opacity: 0.6;
}

/* Основное изображение */
.insta_single_photo img {
    position: relative;
    display: block;
    max-width: 100%;
    max-height: 80vh;
    margin: 0 auto;
    object-fit: contain;
}

/* Вертикальные изображения */
.insta_single_photo.portrait img {
    width: auto;
    max-width: 100%;
}

/* Горизонтальные изображения */
.insta_single_photo.landscape img {
    width: 100%;
    height: auto;
}

/* Квадрат */
.insta_single_photo.square img {
    width: 100%;
}

/* Вкладки */
.insta_tabs {
    display: flex;
    justify-content: center;
    gap: 24px;
    border-top: 1px solid #ddd;
}

.insta_tab {
    padding: 12px 0;
    font-size: 12px;
    font-weight: 600;
    opacity: .6;
    cursor: pointer;
    position: relative;
    transition: opacity .25s ease;
}

.insta_tab.active {
    opacity: 1;
}

/* Подчёркивание активной вкладки */
.insta_tab.active::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 2px;
    background: #000;
}

/* Контейнер контента */
.insta_layout {
    position: relative;
    overflow: hidden !important;
}

/* Анимация смены */
.insta_post {
    transition: opacity .25s ease, transform .25s ease;
}

.insta_post.fade-out {
    opacity: 0;
    transform: translateY(10px);
}

.insta_post.fade-in {
    opacity: 1;
    transform: translateY(0);
}

.insta_placeholder {
    height: 240px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: #999;
}

.insta_post {
    transition: opacity .25s ease, transform .25s ease;
}

.insta_post[hidden] {
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
}

.insta_post:not([hidden]) {
    opacity: 1;
    transform: translateY(0);
}

.instagram-wrapper {
background: url(https://forumstatic.ru/files/001c/97/56/54968.png), var(--bg-img);
    display: flex;
    flex-direction: column;
}

