/* Instagram Feed Gallery for Elementor - Frontend Styles */

.ife-widget {
	--ife-columns: 4;
	--ife-columns-tablet: 3;
	--ife-columns-mobile: 2;
	box-sizing: border-box;
	width: 100%;
}

.ife-widget * {
	box-sizing: border-box;
}

/* Profile header */
.ife-header {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 20px;
	flex-wrap: wrap;
}

.ife-header-icon {
	display: inline-flex;
	flex-shrink: 0;
	color: currentColor;
}

.ife-header-info {
	display: flex;
	flex-direction: column;
	line-height: 1.3;
}

.ife-username {
	font-weight: 600;
	text-decoration: none;
	color: inherit;
}

.ife-username:hover {
	text-decoration: underline;
}

.ife-followers {
	font-size: 0.85em;
	opacity: 0.75;
}

.ife-follow-button {
	margin-left: auto;
	display: inline-block;
	text-decoration: none;
	padding: 8px 18px;
	border-radius: 6px;
	background-color: #1877f2;
	color: #ffffff;
	font-size: 0.9em;
	font-weight: 500;
	transition: background-color 0.2s ease, color 0.2s ease, opacity 0.2s ease;
	white-space: nowrap;
}

.ife-follow-button:hover {
	opacity: 0.9;
	color: #ffffff;
}

/* Grid */
.ife-grid {
	display: grid;
	grid-template-columns: repeat(var(--ife-columns), 1fr);
	gap: 8px;
	width: 100%;
}

@media (max-width: 1024px) {
	.ife-grid {
		grid-template-columns: repeat(var(--ife-columns-tablet), 1fr);
	}
}

@media (max-width: 600px) {
	.ife-grid {
		grid-template-columns: repeat(var(--ife-columns-mobile), 1fr);
	}
}

.ife-post {
	position: relative;
	display: block;
	aspect-ratio: 1 / 1;
	overflow: hidden;
	border-radius: 4px;
	background-color: #f0f0f0;
	text-decoration: none;
	color: inherit;
}

.ife-post img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.35s ease, opacity 0.35s ease;
}

/* Hover effects */
.ife-hover-zoom .ife-post:hover img {
	transform: scale(1.08);
}

.ife-hover-fade .ife-post .ife-overlay {
	opacity: 0;
	transition: opacity 0.25s ease;
}

.ife-hover-fade .ife-post:hover .ife-overlay {
	opacity: 1;
}

.ife-hover-none .ife-post:hover img {
	transform: none;
}

.ife-video-icon {
	position: absolute;
	top: 8px;
	right: 8px;
	color: #fff;
	font-size: 14px;
	text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
	z-index: 2;
}

.ife-overlay {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background-color: rgba(0, 0, 0, 0.35);
	color: #fff;
	opacity: 0;
	transition: opacity 0.25s ease;
	pointer-events: none;
}

.ife-post:hover .ife-overlay {
	opacity: 1;
}

.ife-like-count {
	font-weight: 600;
	font-size: 0.95em;
}

.ife-caption {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	padding: 6px 8px;
	font-size: 0.75em;
	color: #fff;
	background: linear-gradient(to top, rgba(0, 0, 0, 0.65), transparent);
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* Fallback / error state */
.ife-fallback-message {
	padding: 24px;
	text-align: center;
	border: 1px dashed rgba(0, 0, 0, 0.15);
	border-radius: 6px;
	font-size: 0.95em;
	opacity: 0.8;
}
