/* Blog Image Lightbox Styles - Framer-like Smooth Animations
--------------------------------------------- */

.blog-image-lightbox {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	pointer-events: none;
	opacity: 0;
	transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.blog-image-lightbox.is-active {
	opacity: 1;
	pointer-events: auto;
}

.blog-image-lightbox__overlay {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, 0);
	backdrop-filter: blur(0px);
	-webkit-backdrop-filter: blur(0px);
	cursor: pointer;
	transition: background-color 0.5s cubic-bezier(0.16, 1, 0.3, 1),
				backdrop-filter 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.blog-image-lightbox.is-active .blog-image-lightbox__overlay {
	background-color: rgba(0, 0, 0, 0.92);
	backdrop-filter: blur(20px);
	-webkit-backdrop-filter: blur(20px);
}

.blog-image-lightbox__container {
	position: relative;
	max-width: 90vw;
	max-height: 90vh;
	z-index: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	transform: scale(0.9) translateY(20px);
	opacity: 0;
	transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1),
				opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.blog-image-lightbox.is-active .blog-image-lightbox__container {
	transform: scale(1) translateY(0);
	opacity: 1;
}

.blog-image-lightbox__image {
	max-width: 100%;
	max-height: 90vh;
	width: auto;
	height: auto;
	object-fit: contain;
	border-radius: 12px;
	box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8),
				0 0 0 1px rgba(255, 255, 255, 0.1);
	user-select: none;
	-webkit-user-select: none;
}

.blog-image-lightbox__close {
	position: absolute;
	top: -60px;
	right: 0;
	background: rgba(255, 255, 255, 0.08);
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: 50%;
	width: 44px;
	height: 44px;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	color: #fff;
	transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	opacity: 0;
	transform: translateY(10px);
}

.blog-image-lightbox.is-active .blog-image-lightbox__close {
	opacity: 1;
	transform: translateY(0);
	transition-delay: 0.1s;
}

.blog-image-lightbox__close:hover {
	background: rgba(255, 255, 255, 0.15);
	border-color: rgba(255, 255, 255, 0.25);
	transform: scale(1.08);
}

.blog-image-lightbox__close:active {
	transform: scale(0.95);
}

.blog-image-lightbox__close:focus {
	outline: none;
	box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}

.blog-image-lightbox__close svg {
	width: 20px;
	height: 20px;
	transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.blog-image-lightbox__close:hover svg {
	transform: rotate(90deg);
}

/* Add hover effect to clickable images in post content */
.wp-block-post-content img:not(.wp-block-gallery img):not(a img) {
	cursor: pointer;
	transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
				opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1),
				box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1);
	will-change: transform;
}

.wp-block-post-content img:not(.wp-block-gallery img):not(a img):hover {
	opacity: 0.96;
	transform: scale(1.005);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.wp-block-post-content img:not(.wp-block-gallery img):not(a img):active {
	transform: scale(0.995);
}

/* Mobile styles */
@media (max-width: 768px) {
	.blog-image-lightbox__container {
		max-width: 95vw;
		max-height: 95vh;
	}

	.blog-image-lightbox__image {
		max-height: 85vh;
		border-radius: 8px;
	}

	.blog-image-lightbox__close {
		top: 16px;
		right: 16px;
		width: 40px;
		height: 40px;
		background: rgba(0, 0, 0, 0.8);
		border-color: rgba(255, 255, 255, 0.2);
	}

	.blog-image-lightbox__close svg {
		width: 18px;
		height: 18px;
	}

	.wp-block-post-content img:not(.wp-block-gallery img):not(a img):hover {
		transform: none;
		opacity: 1;
		box-shadow: none;
	}
}

/* Prevent body scroll when lightbox is active */
body:has(.blog-image-lightbox.is-active) {
	overflow: hidden;
}

/* Smooth loading state */
.blog-image-lightbox__image {
	animation: fadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeIn {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}
