/**
 * Instagram Feed Premium - Public CSS
 */

.ifp-feed-wrapper {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	margin: 2rem auto;
	width: 100%;
	max-width: var(--ifp-max-width, 100%);
}

.ifp-feed-main-title {
	font-size: 1.5rem;
	font-weight: 700;
	margin-bottom: 1.25rem;
	color: #262626;
	text-align: left;
	letter-spacing: -0.5px;
}

/* Grid Layout */
.ifp-grid-container {
	display: grid;
	grid-template-columns: repeat(var(--ifp-cols, 4), 1fr);
	gap: 16px;
}

/* Base Feed Item */
.ifp-item {
	position: relative;
	width: 100%;
}

.ifp-link {
	display: block;
	text-decoration: none;
	color: inherit;
}

.ifp-img-container {
	position: relative;
	width: 100%;
	aspect-ratio: var(--ifp-aspect-ratio, 1 / 1);
	overflow: hidden;
	border-radius: 12px;
	background-color: #f0f0f0;
	box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
	transition: box-shadow 0.3s ease;
}

.ifp-img-container:hover {
	box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.ifp-img,
.ifp-video {
	width: 100% !important;
	height: 100% !important;
	object-fit: cover !important;
	display: block;
	transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

.ifp-item:hover .ifp-img,
.ifp-item:hover .ifp-video {
	transform: scale(1.08);
}

/* Dark Glassmorphism Hover Overlay */
.ifp-overlay {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.6);
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
	opacity: 0;
	transition: opacity 0.4s cubic-bezier(0.25, 1, 0.5, 1);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	box-sizing: border-box;
	border-radius: 12px;
}

.ifp-item:hover .ifp-overlay {
	opacity: 1;
}

.ifp-overlay-content {
	text-align: center;
	color: #ffffff;
	transform: translateY(15px);
	transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.ifp-item:hover .ifp-overlay-content {
	transform: translateY(0);
}

.ifp-insta-icon {
	font-size: 1.5rem;
	margin-bottom: 8px;
	animation: ifp-bounce 1s infinite alternate;
}

.ifp-username {
	display: block;
	font-size: 0.85rem;
	font-weight: 600;
	margin-bottom: 6px;
	letter-spacing: 0.5px;
	opacity: 0.9;
}

.ifp-caption {
	font-size: 0.8rem;
	line-height: 1.4;
	margin: 0;
	font-weight: 400;
	opacity: 0.85;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* Error Messages */
.ifp-error-msg {
	background: #ffe3e3;
	border-left: 4px solid #ff4d4d;
	color: #d11919;
	padding: 12px 16px;
	border-radius: 6px;
	font-size: 0.9rem;
	margin: 1rem 0;
}

/* Carousel Layout */
.ifp-carousel-outer {
	position: relative;
	width: 100%;
	display: flex;
	align-items: center;
}

.ifp-carousel-viewport {
	overflow: hidden;
	width: 100%;
	border-radius: 12px;
}

.ifp-carousel-track {
	display: flex;
	transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
	will-change: transform;
}

.ifp-carousel-slide {
	flex: 0 0 calc(100% / var(--ifp-carousel-cols, 4));
	padding: 0 8px;
	box-sizing: border-box;
}

/* Slider navigation arrows */
.ifp-carousel-nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	background: rgba(255, 255, 255, 0.9);
	color: #262626;
	border: none;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	cursor: pointer;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
	font-size: 1.2rem;
	font-weight: bold;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.3s ease;
	z-index: 10;
}

.ifp-carousel-nav:hover {
	background: #ffffff;
	transform: translateY(-50%) scale(1.1);
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
}

.ifp-carousel-prev {
	left: -20px;
}

.ifp-carousel-next {
	right: -20px;
}

/* Footer Strip Mode */
.ifp-footer-strip {
	display: flex;
	flex-wrap: nowrap;
	gap: 12px;
	overflow-x: auto;
	padding: 10px 0;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none; /* Hide default scrollbar on Firefox */
}

.ifp-footer-strip::-webkit-scrollbar {
	display: none; /* Hide default scrollbar on Safari/Chrome */
}

.ifp-footer-strip .ifp-item {
	flex: 0 0 160px;
}

/* Responsive Rules */
@media (max-width: 1024px) {
	.ifp-carousel-slide {
		flex: 0 0 calc(100% / var(--ifp-carousel-cols-tablet, 3));
	}
}

@media (max-width: 768px) {
	.ifp-grid-container {
		grid-template-columns: repeat(min(var(--ifp-cols, 4), 2), 1fr);
		gap: 12px;
	}
	.ifp-carousel-slide {
		flex: 0 0 calc(100% / var(--ifp-carousel-cols-mobile, 2));
	}
	.ifp-carousel-prev {
		left: -10px;
	}
	.ifp-carousel-next {
		right: -10px;
	}
}

@media (max-width: 480px) {
	.ifp-grid-container {
		grid-template-columns: 1fr;
	}
	.ifp-carousel-slide {
		flex: 0 0 100%; /* 1 slide */
	}
	.ifp-carousel-nav {
		width: 32px;
		height: 32px;
		font-size: 1rem;
	}
	.ifp-carousel-prev {
		left: -5px;
	}
	.ifp-carousel-next {
		right: -5px;
	}
}

/* Animations */
@keyframes ifp-bounce {
	from {
		transform: translateY(0);
	}
	to {
		transform: translateY(-4px);
	}
}
