/**
 * Instagram Feed Block Styles
 * Homepage Instagram header and Smash Balloon feed customization
 * Lazy loaded for performance
 *
 * @package Kloira
 * @since 1.0.0
 */

/* ==========================================================================
   Section Container
   ========================================================================== */

.instagram-feed {
	width: 100%;
	padding: 80px 0;
	background: #FFFFFF;
	overflow: hidden;
}

.instagram-feed__container {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 50px;
	width: 100%;
}

/* ==========================================================================
   Header
   ========================================================================== */

.instagram-feed__header {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 16px;
	max-width: 700px;
	padding: 0 20px;
}

.instagram-feed__title {
	display: flex;
	flex-direction: row;
	align-items: center;
	justify-content: center;
	flex-wrap: wrap;
	gap: 12px;
	margin: 0;
	font-family: 'DM Serif Display', Georgia, serif;
	font-style: normal;
	font-weight: 400;
	font-size: 44px;
	line-height: 60px;
	text-align: center;
	color: #111111;
}

.instagram-feed__title-text {
	color: #111111;
	white-space: nowrap;
}

.instagram-feed__title-handle {
	display: inline-flex;
	flex-direction: row;
	align-items: center;
	gap: 8px;
	text-decoration: none;
	color: #FF5100;
	transition: opacity 0.3s ease;
	white-space: nowrap;
}

.instagram-feed__title-handle:hover {
	opacity: 0.8;
}

.instagram-feed__title-handle span {
	font-family: 'DM Serif Display', Georgia, serif;
	font-style: normal;
	font-weight: 400;
	font-size: 44px;
	line-height: 60px;
}

.instagram-feed__icon {
	width: 32px;
	height: 32px;
	object-fit: contain;
}

.instagram-feed__description {
	margin: 0;
	font-family: 'Roboto Flex', sans-serif;
	font-style: normal;
	font-weight: 400;
	font-size: 18px;
	line-height: 26px;
	text-align: center;
	color: #666666;
}

/* ==========================================================================
   Slider Wrapper - Full Width
   ========================================================================== */

.instagram-feed__slider-wrapper {
	width: 100vw;
	margin-left: calc(-50vw + 50%);
	overflow: hidden;
	position: relative;
}

.instagram-feed__content {
	width: 100%;
}


/* ==========================================================================
   Smash Balloon - HIDE EVERYTHING EXCEPT IMAGES
   ========================================================================== */

/* Hide the entire header section */
.instagram-feed #sb_instagram .sb_instagram_header,
.instagram-feed .sb_instagram_header,
.instagram-feed .sbi_header_text,
.instagram-feed .sbi_header_link,
.instagram-feed .sbi_header_img,
.instagram-feed .sbi_header_img_hover,
.instagram-feed .sbi_feedtheme_header_text,
.instagram-feed .sbi_bio {
	display: none !important;
	height: 0 !important;
	overflow: hidden !important;
	visibility: hidden !important;
}

/* Hide load more and follow buttons */
.instagram-feed #sbi_load,
.instagram-feed .sbi_load_btn,
.instagram-feed .sbi_follow_btn,
.instagram-feed .sbi_loader {
	display: none !important;
}

/* ==========================================================================
   Smash Balloon - Main Container as Horizontal Slider
   ========================================================================== */

.instagram-feed #sb_instagram {
	width: 100% !important;
	padding: 0 !important;
	margin: 0 !important;
}

/* The images container - horizontal scroll */
.instagram-feed #sbi_images {
	display: flex !important;
	flex-direction: row !important;
	flex-wrap: nowrap !important;
	gap: 8px !important;
	padding: 0 !important;
	margin: 0 !important;
	width: max-content !important;
	animation: instagram-scroll 40s linear infinite;
}

.instagram-feed__slider-wrapper:hover #sbi_images {
	animation-play-state: paused;
}

/* ==========================================================================
   Smash Balloon - Individual Items as 3:4 Aspect Ratio (Instagram Format)
   300px width x 400px height
   ========================================================================== */

.instagram-feed .sbi_item {
	flex: 0 0 300px !important;
	width: 300px !important;
	height: 400px !important;
	min-width: 300px !important;
	max-width: 300px !important;
	margin: 0 !important;
	padding: 0 !important;
	overflow: hidden !important;
	position: relative !important;
	background: #D9D9D9 !important;
}

.instagram-feed .sbi_item .sbi_photo_wrap {
	width: 100% !important;
	height: 100% !important;
	padding: 0 !important;
	padding-bottom: 0 !important;
	margin: 0 !important;
	position: relative !important;
}

.instagram-feed .sbi_item .sbi_photo {
	display: block !important;
	width: 100% !important;
	height: 100% !important;
	padding: 0 !important;
	margin: 0 !important;
	position: absolute !important;
	top: 0 !important;
	left: 0 !important;
	right: 0 !important;
	bottom: 0 !important;
}

.instagram-feed .sbi_item .sbi_photo img {
	width: 100% !important;
	height: 100% !important;
	object-fit: cover !important;
	position: absolute !important;
	top: 0 !important;
	left: 0 !important;
}

/* ==========================================================================
   Video/Reel Autoplay Styling
   ========================================================================== */

.instagram-feed .sbi_item video,
.instagram-feed .sbi_item .sbi-video {
	width: 100% !important;
	height: 100% !important;
	object-fit: cover !important;
	position: absolute !important;
	top: 0 !important;
	left: 0 !important;
}

/* ==========================================================================
   Hover Effect - Instagram Logo Overlay
   ========================================================================== */

.instagram-feed .sbi_item .sbi_photo::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 0, 0, 0.4);
	opacity: 0;
	transition: opacity 0.3s ease;
	z-index: 1;
}

.instagram-feed .sbi_item .sbi_photo::after {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 40px;
	height: 40px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 512' fill='%23ffffff'%3E%3Cpath d='M224.1 141c-63.6 0-114.9 51.3-114.9 114.9s51.3 114.9 114.9 114.9S339 319.5 339 255.9 287.7 141 224.1 141zm0 189.6c-41.1 0-74.7-33.5-74.7-74.7s33.5-74.7 74.7-74.7 74.7 33.5 74.7 74.7-33.6 74.7-74.7 74.7zm146.4-194.3c0 14.9-12 26.8-26.8 26.8-14.9 0-26.8-12-26.8-26.8s12-26.8 26.8-26.8 26.8 12 26.8 26.8zm76.1 27.2c-1.7-35.9-9.9-67.7-36.2-93.9-26.2-26.2-58-34.4-93.9-36.2-37-2.1-147.9-2.1-184.9 0-35.8 1.7-67.6 9.9-93.9 36.1s-34.4 58-36.2 93.9c-2.1 37-2.1 147.9 0 184.9 1.7 35.9 9.9 67.7 36.2 93.9s58 34.4 93.9 36.2c37 2.1 147.9 2.1 184.9 0 35.9-1.7 67.7-9.9 93.9-36.2 26.2-26.2 34.4-58 36.2-93.9 2.1-37 2.1-147.8 0-184.8zM398.8 388c-7.8 19.6-22.9 34.7-42.6 42.6-29.5 11.7-99.5 9-132.1 9s-102.7 2.6-132.1-9c-19.6-7.8-34.7-22.9-42.6-42.6-11.7-29.5-9-99.5-9-132.1s-2.6-102.7 9-132.1c7.8-19.6 22.9-34.7 42.6-42.6 29.5-11.7 99.5-9 132.1-9s102.7-2.6 132.1 9c19.6 7.8 34.7 22.9 42.6 42.6 11.7 29.5 9 99.5 9 132.1s2.7 102.7-9 132.1z'/%3E%3C/svg%3E");
	background-size: contain;
	background-repeat: no-repeat;
	background-position: center;
	opacity: 0;
	transition: opacity 0.3s ease;
	z-index: 2;
}

.instagram-feed .sbi_item .sbi_photo:hover::before,
.instagram-feed .sbi_item .sbi_photo:hover::after {
	opacity: 1;
}

/* Hide default Smash Balloon hover overlays and play buttons */
.instagram-feed .sbi_item .sbi_hover_top,
.instagram-feed .sbi_item .sbi_hover_bottom,
.instagram-feed .sbi_item .sbi_playbtn,
.instagram-feed .sbi_item svg.sbi_playbtn,
.instagram-feed .sbi_item .sbi_video_icon,
.instagram-feed .sbi_item .sbi_link,
.instagram-feed .sbi_item .sbi_type_indicator,
.instagram-feed .sbi_item .sbi_photo svg {
	display: none !important;
	opacity: 0 !important;
	visibility: hidden !important;
}

/* ==========================================================================
   Reel/Video Badge in Corner
   ========================================================================== */

.instagram-feed .sbi_item.sbi_type_video::after {
	content: '';
	position: absolute;
	top: 12px;
	right: 12px;
	width: 24px;
	height: 24px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ffffff'%3E%3Cpath d='M12 3c-4.97 0-9 4.03-9 9s4.03 9 9 9 9-4.03 9-9-4.03-9-9-9zm0 16c-3.86 0-7-3.14-7-7s3.14-7 7-7 7 3.14 7 7-3.14 7-7 7zm-1-11v6l5-3-5-3z'/%3E%3C/svg%3E");
	background-size: contain;
	background-repeat: no-repeat;
	z-index: 5;
	filter: drop-shadow(0 1px 3px rgba(0,0,0,0.5));
}

/* ==========================================================================
   Carousel Indicator
   ========================================================================== */

.instagram-carousel-indicator {
	position: absolute;
	top: 12px;
	right: 12px;
	width: 24px;
	height: 24px;
	z-index: 10;
	pointer-events: none;
}

.instagram-carousel-indicator svg {
	width: 24px !important;
	height: 24px !important;
	color: #ffffff;
	display: block !important;
	opacity: 1 !important;
	visibility: visible !important;
	filter: drop-shadow(0 1px 3px rgba(0,0,0,0.5));
}

/* ==========================================================================
   Auto-scroll Animation
   ========================================================================== */

@keyframes instagram-scroll {
	0% {
		transform: translateX(0);
	}
	100% {
		transform: translateX(-50%);
	}
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 992px) {
	.instagram-feed {
		padding: 60px 0;
	}
	
	.instagram-feed__container {
		gap: 40px;
	}
	
	.instagram-feed__title {
		font-size: 36px;
		line-height: 48px;
	}
	
	.instagram-feed__title-handle span {
		font-size: 36px;
		line-height: 48px;
	}
	
	.instagram-feed__description {
		font-size: 16px;
		line-height: 24px;
	}
	
	.instagram-feed .sbi_item,
	.instagram-feed__placeholder-card {
		flex: 0 0 250px !important;
		width: 250px !important;
		height: 333px !important;
		min-width: 250px !important;
		max-width: 250px !important;
	}
}

@media (max-width: 768px) {
	.instagram-feed {
		padding: 50px 0;
	}
	
	.instagram-feed__header {
		gap: 12px;
	}
	
	.instagram-feed__title {
		font-size: 28px;
		line-height: 36px;
		gap: 10px;
	}
	
	.instagram-feed__title-handle span {
		font-size: 28px;
		line-height: 36px;
	}
	
	.instagram-feed__icon {
		width: 24px;
		height: 24px;
	}
	
	.instagram-feed__description {
		font-size: 14px;
		line-height: 22px;
	}
	
	.instagram-feed .sbi_item,
	.instagram-feed__placeholder-card {
		flex: 0 0 200px !important;
		width: 200px !important;
		height: 267px !important;
		min-width: 200px !important;
		max-width: 200px !important;
	}
}

@media (max-width: 480px) {
	.instagram-feed__title {
		flex-direction: column;
		gap: 8px;
	}
	
	.instagram-feed .sbi_item,
	.instagram-feed__placeholder-card {
		flex: 0 0 150px !important;
		width: 150px !important;
		height: 200px !important;
		min-width: 150px !important;
		max-width: 150px !important;
	}
}
