/* ==========================================================================

Feed Container & Header
========================================================================== */
.sif-pro-container {
width: 100%;
max-width: 1200px;
margin: 0 auto;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.sif-header { margin-bottom: 20px; }
.sif-header-link {
display: inline-flex; align-items: center; text-decoration: none; color: #262626; transition: opacity 0.2s;
}
.sif-header-link:hover { opacity: 0.8; }
.sif-avatar {
width: 50px; height: 50px; border-radius: 50%;
background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
color: white; display: flex; align-items: center; justify-content: center;
font-size: 24px; font-weight: bold; margin-right: 15px;
}
.sif-username { display: block; font-weight: 600; font-size: 16px; line-height: 1.2; }
.sif-bio-hint { display: block; font-size: 12px; color: #8e8e8e; margin-top: 4px; }

/* ==========================================================================
2. Feed Layouts (Grid, Masonry, Carousel)
========================================================================== */
.sif-feed-wrapper { width: 100%; }
.sif-item { position: relative; overflow: hidden; background: #fafafa; border-radius: 6px; }
.sif-item img { width: 100%; display: block; transition: transform 0.4s ease; }

/* 오버레이 (마우스 호버 시 어두워지며 아이콘 표시) */
.sif-overlay {
position: absolute; top: 0; left: 0; right: 0; bottom: 0;
background: rgba(0,0,0,0.6); display: flex; flex-direction: column;
align-items: center; justify-content: center;
opacity: 0; transition: opacity 0.3s ease; color: white; padding: 20px; text-align: center;
}
.sif-item:hover .sif-overlay { opacity: 1; }
.sif-item:hover img { transform: scale(1.08); }
.sif-ig-icon { margin-bottom: 10px; }
.sif-caption {
font-size: 13px; line-height: 1.4; margin: 0;
display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}

/* 우측 상단 다중 이미지 아이콘 */
.sif-carousel-icon {
position: absolute; top: 10px; right: 10px; color: #fff; background: rgba(0,0,0,0.4);
border-radius: 50%; padding: 6px; display: flex; z-index: 2; pointer-events: none;
}

/* 레이아웃 1: Grid (정방형) */
.sif-layout-grid {
display: grid; grid-template-columns: repeat(var(--cols-desktop, 3), 1fr); gap: 10px;
}
.sif-layout-grid .sif-item { aspect-ratio: 1 / 1; }
.sif-layout-grid img { height: 100%; object-fit: cover; }

/* 레이아웃 2: Masonry (조적식) */
.sif-layout-masonry {
column-count: var(--cols-desktop, 3); column-gap: 10px;
}
.sif-layout-masonry .sif-item { margin-bottom: 10px; display: inline-block; width: 100%; }

/* 레이아웃 3: Carousel (가로 스크롤) */
.sif-layout-carousel {
display: flex; flex-wrap: nowrap; overflow-x: auto; gap: 10px;
scroll-behavior: smooth; scroll-snap-type: x mandatory; padding-bottom: 10px;
-ms-overflow-style: none; scrollbar-width: none;
}
.sif-layout-carousel::-webkit-scrollbar { display: none; }
.sif-layout-carousel .sif-item {
flex: 0 0 calc((100% - ((var(--cols-desktop, 3) - 1) * 10px)) / var(--cols-desktop, 3));
max-width: calc((100% - ((var(--cols-desktop, 3) - 1) * 10px)) / var(--cols-desktop, 3));
scroll-snap-align: start; aspect-ratio: 1 / 1;
}
.sif-layout-carousel img { height: 100%; object-fit: cover; }

/* 푸터 팔로우 버튼 */
.sif-footer { margin-top: 25px; text-align: center; }
.sif-btn-follow {
display: inline-flex; align-items: center; gap: 8px; background-color: var(--btn-color, #3897f0);
color: #fff; padding: 10px 24px; border-radius: 4px; text-decoration: none;
font-weight: 600; font-size: 14px; transition: background-color 0.2s;
}
.sif-btn-follow:hover { filter: brightness(0.9); color: #fff; }

/* ==========================================================================
3. Lightbox UI (Instagram Split Screen Dark Theme)
========================================================================== */
.sif-lightbox {
position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; z-index: 999999;
display: flex; align-items: center; justify-content: center;
}
.sif-lightbox-overlay {
position: absolute; top: 0; left: 0; width: 100%; height: 100%;
background: rgba(0, 0, 0, 0.65); backdrop-filter: blur(5px);
}
.sif-lightbox-content {
position: relative; z-index: 1; display: flex; align-items: center; justify-content: center;
width: 100%; height: 100%; padding: 20px 60px; box-sizing: border-box;
}

/* 핵심: 좌/우 분할 레이아웃 */
.sif-lightbox-inner {
display: flex; flex-direction: row; background: #000; border-radius: 4px;
overflow: hidden; width: 100%; max-width: 1200px; height: 85vh;
box-shadow: 0 10px 40px rgba(0,0,0,0.5); border: 1px solid #363636;
}

/* 좌측 (미디어 사진 영역) */
.sif-lightbox-media {
flex: 1; position: relative; display: flex; align-items: center; justify-content: center;
background: #000; overflow: hidden;
}
.sif-lightbox-img { max-width: 100%; max-height: 100%; object-fit: contain; }

/* 우측 (정보 다크 테마) */
.sif-lightbox-info {
width: 350px; min-width: 350px; background: #000; color: #fff;
display: flex; flex-direction: column; border-left: 1px solid #262626;
}

/* 우측: 헤더 영역 */
.sif-lightbox-header { padding: 14px 16px; border-bottom: 1px solid #262626; display: flex; align-items: center; }
.sif-lightbox-avatar {
width: 32px; height: 32px; border-radius: 50%;
background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
color: white; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: bold; margin-right: 12px;
}
.sif-lightbox-username { font-weight: 600; font-size: 14px; color: #fff; text-decoration: none; display: inline-block; }

/* 우측: 본문/댓글 영역 */
.sif-lightbox-comments { flex: 1; overflow-y: auto; padding: 16px; scrollbar-width: thin; scrollbar-color: #555 #000; }
.sif-lightbox-comments::-webkit-scrollbar { width: 6px; }
.sif-lightbox-comments::-webkit-scrollbar-thumb { background: #555; border-radius: 3px; }
.sif-comment-wrapper { display: flex; gap: 12px; }
.sif-comment-text-wrap { flex: 1; }
.sif-lightbox-caption { font-size: 14px; line-height: 1.5; white-space: pre-wrap; word-break: break-word; color: #f5f5f5; }
.sif-lightbox-date { font-size: 12px; color: #a8a8a8; margin-top: 10px; }

/* 우측: 하단 액션 영역 (좋아요, 공유 등) */
.sif-lightbox-footer { padding: 14px 16px; border-top: 1px solid #262626; }
.sif-lightbox-actions { display: flex; justify-content: space-between; margin-bottom: 12px; color: #fff; }
.sif-actions-left { display: flex; gap: 16px; }
.sif-lightbox-actions svg { cursor: pointer; transition: opacity 0.2s; }
.sif-lightbox-actions svg:hover { opacity: 0.6; }

.sif-lightbox-link {
display: block; text-align: center; background: #0095f6; color: #fff;
text-decoration: none; padding: 8px; border-radius: 8px; font-size: 14px; font-weight: 600; transition: background 0.2s;
}
.sif-lightbox-link:hover { background: #1877f2; color: #fff; }

/* ==========================================================================
4. Lightbox Controls (Arrows & Navigation)
========================================================================== */
.sif-lightbox-close {
position: absolute; top: 15px; right: 25px; color: #fff; font-size: 36px; cursor: pointer; z-index: 10; transition: 0.2s;
}
.sif-lightbox-close:hover { opacity: 0.6; }

/* 좌우 전체 게시물 이동 버튼 */
.sif-lightbox-btn {
background: rgba(255,255,255,0.2); border: none; color: white; font-size: 24px; cursor: pointer;
width: 40px; height: 40px; border-radius: 50%; position: absolute; top: 50%; transform: translateY(-50%);
display: flex; align-items: center; justify-content: center; z-index: 10; transition: background 0.3s;
}
.sif-lightbox-btn:hover { background: rgba(255,255,255,0.6); }
.sif-prev { left: 20px; }
.sif-next { right: 20px; }

/* 갤러리 내부 슬라이드 버튼 (사진 여러장) */
.sif-gallery-btn {
position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,0.8);
border: none; width: 30px; height: 30px; border-radius: 50%; cursor: pointer;
display: flex; align-items: center; justify-content: center; font-size: 14px;
box-shadow: 0 2px 5px rgba(0,0,0,0.3); transition: background 0.2s; z-index: 10; color: #000;
}
.sif-gallery-btn:hover { background: #fff; }
.sif-gallery-prev { left: 15px; }
.sif-gallery-next { right: 15px; }

/* 갤러리 하단 점(Dots) 네비게이션 */
.sif-gallery-dots { position: absolute; bottom: 15px; display: flex; gap: 6px; left: 50%; transform: translateX(-50%); z-index: 10; }
.sif-dot { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,0.4); cursor: pointer; transition: 0.3s; box-shadow: 0 1px 3px rgba(0,0,0,0.3); }
.sif-dot:hover { background: rgba(255,255,255,0.8); }
.sif-dot.active { background: #fff; transform: scale(1.3); }

/* ==========================================================================
5. Responsive Styles (Mobile Adaptations)
========================================================================== /
@media (max-width: 768px) {
/ 모바일 피드 레이아웃 /
.sif-layout-grid { grid-template-columns: repeat(var(--cols-mobile, 2), 1fr); }
.sif-layout-masonry { column-count: var(--cols-mobile, 2); }
.sif-layout-carousel .sif-item {
flex: 0 0 calc((100% - ((var(--cols-mobile, 2) - 1) * 10px)) / var(--cols-mobile, 2));
max-width: calc((100% - ((var(--cols-mobile, 2) - 1) * 10px)) / var(--cols-mobile, 2));
}
.sif-overlay { display: none; / 모바일 터치 간섭 방지 */ }

/* 모바일 라이트박스 분할 화면 (상하 배치로 변경) */
.sif-lightbox-content { padding: 10px; }
.sif-lightbox-inner { flex-direction: column; height: auto; max-height: 90vh; }
.sif-lightbox-media { flex: none; height: 50vh; }
.sif-lightbox-info { width: 100%; min-width: auto; flex: 1; border-left: none; border-top: 1px solid #262626; max-height: 40vh; }
.sif-prev { left: 5px; } 
.sif-next { right: 5px; }
.sif-lightbox-close { top: 10px; right: 15px; font-size: 30px; }


}