/**
 * Impact Custom Widget — Image Grid Styles
 *
 * @package Impact_Custom_Widget
 * @author  Abu Zannat
 */

/* ── Wrapper ─────────────────────────────────────────────────────────────── */
.icw-wrapper {
	width: 100%;
}

/* ── Section Heading ─────────────────────────────────────────────────────── */
.icw-section-heading {
	font-size: 1.4rem;
	font-weight: 600;
	color: #2b9ad1;
	margin: 0 0 16px;
	padding: 0;
	line-height: 1.3;
}

/* ── Grid ────────────────────────────────────────────────────────────────── */
.icw-image-grid {
	display: grid;
	grid-template-columns: repeat(6, 1fr);
	gap: 12px;
	width: 100%;
}

/* ── Card ────────────────────────────────────────────────────────────────── */
.icw-card {
	position: relative;
	height: 160px;
	border-radius: 10px;
	overflow: hidden;
	cursor: pointer;
	display: flex;
	flex-direction: column;
}

/* Whole-card anchor reset */
.icw-card-link {
	display: flex;
	flex-direction: column;
	width: 100%;
	height: 100%;
	text-decoration: none;
	color: inherit;
	position: absolute;
	top: 0;
	left: 0;
	z-index: 4;
}

/* ── Background Image ────────────────────────────────────────────────────── */
.icw-card-image {
	position: absolute;
	inset: 0;
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	transition: transform 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94);
	z-index: 1;
}

.icw-card--scale:hover .icw-card-image {
	transform: scale(1.08);
}

/* ── Overlay ─────────────────────────────────────────────────────────────── */
.icw-card-overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.35);
	transition: background 0.3s ease;
	z-index: 2;
}

.icw-card:hover .icw-card-overlay {
	background: rgba(0, 0, 0, 0.55);
}

/* ── Hover Arrow Icon ────────────────────────────────────────────────────── */
.icw-hover-icon {
	position: absolute;
	top: 10px;
	right: 10px;
	z-index: 5;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.25);
	color: #fff;
	opacity: 0;
	transform: scale(0.7) translateY(-4px);
	transition: opacity 0.28s ease, transform 0.28s ease;
	pointer-events: none;
}

.icw-hover-icon svg {
	width: 18px;
	height: 18px;
	display: block;
}

.icw-card:hover .icw-hover-icon {
	opacity: 1;
	transform: scale(1) translateY(0);
}

/* ── Footer / Title ──────────────────────────────────────────────────────── */
.icw-card-footer {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	z-index: 3;
	padding: 6px 10px;
	text-align: left;
}

.icw-card-title {
	display: block;
	color: #fff;
	font-size: 0.85rem;
	font-weight: 600;
	line-height: 1.3;
	text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.icw-card-title a {
	color: inherit;
	text-decoration: none;
	transition: opacity 0.2s;
}

.icw-card-title a:hover {
	opacity: 0.85;
	text-decoration: underline;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
	.icw-image-grid {
		grid-template-columns: repeat(3, 1fr);
	}
}

@media (max-width: 767px) {
	.icw-image-grid {
		grid-template-columns: repeat(2, 1fr);
	}

	.icw-card {
		height: 120px;
	}
}

@media (max-width: 480px) {
	.icw-image-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 8px;
	}
}
