/**
 * Inline Expandable Project Gallery – base layout and structure.
 * Scoped to widget type. Style tab controls output via Elementor with {{WRAPPER}} selectors.
 */

/* Gallery wrapper – scoped by Elementor widget class; Style tab uses {{WRAPPER}} */
.elementor-widget-ieg_inline_expandable_gallery .ieg-gallery {
	position: relative;
	width: 100%;
}

/* Inner grid/flex container – layout (columns, gap) set by widget style block */
.elementor-widget-ieg_inline_expandable_gallery .ieg-gallery__inner {
	width: 100%;
}

.elementor-widget-ieg_inline_expandable_gallery .ieg-gallery__row {
	display: contents;
}

/* Card – Approved Electrix style: image on top, icon overlay, then title/description/button below */
.elementor-widget-ieg_inline_expandable_gallery .ieg-card {
	position: relative;
	overflow: hidden;
	cursor: pointer;
	border: 2px solid transparent;
	transition: box-shadow 0.3s ease;
	display: flex;
	flex-direction: column;
	background: #fff;
	border-radius: 8px;
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
	transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.ieg-card:hover .ieg-card__bg img {
    transform: scale(1.04);
}
.ieg-card .ieg-card__bg img {
    transition: transform 0.4s ease;
}

.elementor-widget-ieg_inline_expandable_gallery .ieg-card:hover {
	transform: translateY(-3px);
}

.elementor-widget-ieg_inline_expandable_gallery .ieg-card__bg,
.elementor-widget-ieg_inline_expandable_gallery .ieg-card__bg-image {
	display: block;
	width: 100%;
}

/* Image area wrapper – for "Centered overlay" icon positioning */
.elementor-widget-ieg_inline_expandable_gallery .ieg-card__media {
	position: relative;
	flex: 0 0 auto;
}


.elementor-widget-ieg_inline_expandable_gallery .ieg-card__bg-image {
	display: block;
	object-fit: cover;
	object-position: center center;
	width: 100%;
	height: 100%;
	min-height: 220px;
	border-radius: 6px;
}

/* Icon on image: size/colors from Style tab; no fixed dimensions here so frontend respects widget settings */
.elementor-widget-ieg_inline_expandable_gallery .ieg-card__media .ieg-card__icon {
	position: absolute;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	pointer-events: none;
	background-color: #fff;
	border-radius: 50%;
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
}

.elementor-widget-ieg_inline_expandable_gallery .ieg-card__overlay {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	padding: 1.25rem 1rem 1.5rem;
	flex: 1 1 auto;
}

.elementor-widget-ieg_inline_expandable_gallery .ieg-card__icon i,
.elementor-widget-ieg_inline_expandable_gallery .ieg-card__icon svg {
	display: block;
}

.elementor-widget-ieg_inline_expandable_gallery .ieg-card__icon img {
	display: block;
	object-fit: contain;
}

.elementor-widget-ieg_inline_expandable_gallery .ieg-card__title {
	margin: 0 0 0.5em;
	line-height: 1.2;
}

.elementor-widget-ieg_inline_expandable_gallery .ieg-card__description {
	margin: 0 0 0.75em;
	font-size: 0.9em;
	line-height: 1.4;
}

.elementor-widget-ieg_inline_expandable_gallery .ieg-card__button {
	display: inline-block;
	text-decoration: none;
	transition: background-color 0.3s ease;
}

.elementor-widget-ieg_inline_expandable_gallery .ieg-card__button {
	border-radius: 6px;
	padding: 0.5rem 1.25rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.02em;
}

.elementor-widget-ieg_inline_expandable_gallery .ieg-card__button:hover {
	text-decoration: none;
}

/* Expand panel – full width, blue block, image left / content right, close button */
.elementor-widget-ieg_inline_expandable_gallery .ieg-expand {
	width: 100%;
	transition: opacity 0.25s ease;
	position: relative;
}

.elementor-widget-ieg_inline_expandable_gallery .ieg-expand__close {
	position: absolute;
    top: 14px;
    right: 16px;
    z-index: 2;
    width: 30px;
    height: 30px;
    padding: 0;
    border: none;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.25s ease, transform 0.25s ease, opacity 0.25s ease;
    opacity: 0;
    transform: scale(0.8);
}

/* Animate close button in when expand panel opens */
.elementor-widget-ieg_inline_expandable_gallery .ieg-expand.ieg-expand--open .ieg-expand__close {
	animation: ieg-close-in 0.3s ease 0.15s forwards;
}

@keyframes ieg-close-in {
	from {
		opacity: 0;
		transform: scale(0.8);
	}
	to {
		opacity: 1;
		transform: scale(1);
	}
}

.elementor-widget-ieg_inline_expandable_gallery .ieg-expand__close:hover {
	background: rgba(255, 255, 255, 0.35);
	transform: scale(1.1) rotate(90deg);
	border: 0;
    border-radius: 50px;
}

.elementor-widget-ieg_inline_expandable_gallery .ieg-expand__close:active {
	transform: scale(0.95) rotate(90deg);
}

.elementor-widget-ieg_inline_expandable_gallery .ieg-expand:not(.ieg-expand--open) {
	display: none !important;
}

.elementor-widget-ieg_inline_expandable_gallery .ieg-expand.ieg-expand--open {
	display: block !important;
	animation: ieg-expand-in 0.35s ease forwards;
	grid-column: 1 / -1;
	margin-top: 20px;
    margin-bottom: 20px;
}

@keyframes ieg-expand-in {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}

/* Close animation – same duration as open, reverse opacity */
.elementor-widget-ieg_inline_expandable_gallery .ieg-expand.ieg-expand--open.ieg-expand--closing {
	animation: ieg-expand-out 0.35s ease forwards;
}

@keyframes ieg-expand-out {
	from {
		opacity: 1;
	}
	to {
		opacity: 0;
	}
}

.ieg-expand__inner {
	display: grid;
	grid-template-columns: 1fr 2fr;
	gap: 32px;
	align-items: start;
	position: relative;
}

/* Responsive layout for expand panel */
@media (max-width: 1024px) {
	.ieg-expand__inner {
		grid-template-columns: 1fr;
		gap: 24px;
	}
}

@media (max-width: 767px) {
	.ieg-expand__inner {
		grid-template-columns: 1fr;
		gap: 20px;
	}

	.elementor-widget-ieg_inline_expandable_gallery .ieg-expand__image-wrap {
		height: auto;
	}

	.elementor-widget-ieg_inline_expandable_gallery .ieg-expand__close {
		top: 8px;
		right: 8px;
		width: 25px;
		height: 25px;
		font-size: 12px;
	}
}

.elementor-widget-ieg_inline_expandable_gallery .ieg-expand__image-wrap {
	border-radius: 6px;
    overflow: hidden;
    height: 100%;
}

.elementor-widget-ieg_inline_expandable_gallery .ieg-expand__image {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}


.elementor-widget-ieg_inline_expandable_gallery .ieg-expand__title {
	margin: 0 0 0.5em;
	line-height: 1.2;
}

.elementor-widget-ieg_inline_expandable_gallery .ieg-expand__description {
	margin: 0 0 1em;
	line-height: 1.5;
}

.elementor-widget-ieg_inline_expandable_gallery .ieg-expand__description p:last-child {
	margin-bottom: 0;
}

.elementor-widget-ieg_inline_expandable_gallery .ieg-expand__button {
	display: inline-block;
	text-decoration: none;
	align-self: flex-start;
	transition: background-color 0.3s ease;
	border-radius: 6px;
	padding: 0.6rem 1.5rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.02em;
	transition: background 0.2s, transform 0.15s;
}

.elementor-widget-ieg_inline_expandable_gallery .ieg-expand__button:hover {
	text-decoration: none;
	transform: translateY(-1px);
}

/* Arrow indicator – border color overridden by Expand Panel Background Color in widget */
.elementor-widget-ieg_inline_expandable_gallery .ieg-expand__arrow {
	position: absolute;
	bottom: 100%;
	left: 50%;
	transform: translateX(-50%);
	width: 0;
	height: 0;
	border-left: 16px solid transparent;
	border-right: 16px solid transparent;
	border-bottom: 16px solid #2181d8;
	margin-bottom: -1px;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.2s ease;
}

.elementor-widget-ieg_inline_expandable_gallery .ieg-expand__arrow.ieg-expand__arrow--visible {
	opacity: 1;
}

.elementor-widget-ieg_inline_expandable_gallery .ieg-expand {
	position: relative;
}