/* =============================================================================
   Masonry Portfolio 1997 — Stylesheet
   Version: 2.0.0
   ============================================================================= */

/* --- CSS Custom Properties (overridden by Elementor selectors) --- */
.mp-1997-wrapper {
	--mp-gap: 20px;
	width: 100%;
}

/* =============================================================================
   FILTER BAR
   ============================================================================= */

.mp-1997-wrapper .mp-1997-filter-bar {
	display: flex !important;
	flex-wrap: wrap;
	justify-content: center;
	gap: 15px;
	margin-bottom: 40px;
	list-style: none;
	padding: 0;
}

.mp-1997-wrapper .mp-1997-filter-item {
	background: #f4f4f4;
	border: none;
	cursor: pointer;
	font-size: 14px;
	font-family: 'Inter', sans-serif;
	font-weight: 400;
	color: #5D5D5D;
	padding: 10px 30px;
	border-radius: 4px;
	transition: background-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
	line-height: 1;
	margin: 0;
	text-decoration: none;
	display: inline-block;
}

.mp-1997-wrapper .mp-1997-filter-item:hover,
.mp-1997-wrapper .mp-1997-filter-item.active {
	background: #0B96FF;
	color: #fff;
}

/* =============================================================================
   GRID
   ============================================================================= */

.mp-1997-wrapper .mp-1997-grid {
	/* Negative margin compensates for item side-margins. Isotope needs this. */
	margin: 0 calc(var(--mp-gap, 20px) / -2);
	display: block;
}

/* IMPORTANT: Force 3-column layout on desktop */
.mp-1997-wrapper .mp-1997-grid-sizer,
.mp-1997-wrapper .mp-1997-item {
	width: calc(33.333% - var(--mp-gap, 20px)) !important;
	margin: 0 calc(var(--mp-gap, 20px) / 2) var(--mp-gap, 20px);
	float: left;
	box-sizing: border-box;
}

/* Responsive defaults — only kick in when Elementor responsive controls are NOT set */
@media (max-width: 1024px) {
	.mp-1997-wrapper .mp-1997-grid-sizer,
	.mp-1997-wrapper .mp-1997-item {
		width: calc(50% - var(--mp-gap, 20px)) !important;
	}
}

@media (max-width: 767px) {
	.mp-1997-wrapper .mp-1997-grid-sizer,
	.mp-1997-wrapper .mp-1997-item {
		width: calc(100% - var(--mp-gap, 20px)) !important;
	}
}

/* =============================================================================
   CARD
   ============================================================================= */

.mp-1997-wrapper .mp-1997-item-inner {
	position: relative;
	width: 100%;
	border-radius: 12px;
	overflow: hidden;
	background-size: cover;
	background-position: center;
	background-color: #ddd; /* Fallback while image loads */
	box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.mp-1997-wrapper .mp-1997-item-inner:hover {
	transform: translateY(-5px);
	box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* Height Variations — deterministic masonry effect */
.mp-1997-wrapper .mp-height-1 { padding-top: 100%; }
.mp-1997-wrapper .mp-height-2 { padding-top: 130%; }
.mp-1997-wrapper .mp-height-3 { padding-top: 80%; }

/* =============================================================================
   LINK OVERLAY (accessibility: hidden from AT, acts as card clickable area)
   ============================================================================= */

.mp-1997-wrapper .mp-1997-link-overlay {
	position: absolute;
	inset: 0;
	z-index: 10;
}

/* =============================================================================
   HOVER BOX
   ============================================================================= */

.mp-1997-wrapper .mp-1997-hover-box {
	position: absolute;
	bottom: 15px;
	left: 15px;
	right: 15px;
	background-color: #fff;
	padding: 20px;
	border-radius: 8px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	opacity: 0;
	transform: translateY(30px);
	transition: opacity 0.4s cubic-bezier(0.25, 0.8, 0.25, 1),
	            transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
	z-index: 11;
}

.mp-1997-wrapper .mp-1997-item-inner:hover .mp-1997-hover-box {
	opacity: 1;
	transform: translateY(0);
}

/* =============================================================================
   CONTENT (title + term)
   ============================================================================= */

.mp-1997-wrapper .mp-1997-content {
	flex: 1;
	min-width: 0; /* Prevent text overflow in flex */
}

.mp-1997-wrapper .mp-1997-term {
	display: block;
	font-family: 'Inter', sans-serif;
	font-size: 13px;
	color: #5D5D5D;
	margin-bottom: 6px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.mp-1997-wrapper .mp-1997-title {
	margin: 0;
	font-family: 'Poppins', sans-serif;
	font-size: 18px;
	font-weight: 600;
	color: #272262;
	line-height: 1.3;
	/* Two-line clamp for long titles */
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* =============================================================================
   BUTTON / ICON
   ============================================================================= */

.mp-1997-wrapper .mp-1997-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	text-decoration: none;
	transition: transform 0.3s ease, background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
	position: relative;
	z-index: 12;
}

.mp-1997-wrapper .mp-1997-item-inner:hover .mp-1997-btn {
	transform: translateX(5px);
}

/* --- View: Default (no background) --- */
.mp-1997-wrapper .mp-1997-btn.view-default {
	background: transparent;
	color: #0B96FF;
}

/* --- View: Stacked (filled background) --- */
.mp-1997-wrapper .mp-1997-btn.view-stacked {
	width: 44px;
	height: 44px;
	background-color: #0B96FF;
	color: #fff;
}

/* --- View: Framed (bordered, no fill) --- */
.mp-1997-wrapper .mp-1997-btn.view-framed {
	width: 44px;
	height: 44px;
	background-color: transparent;
	border: 2px solid #0B96FF;
	color: #0B96FF;
}

/* --- Shape: Circle (default) --- */
.mp-1997-wrapper .mp-1997-btn.view-stacked.shape-circle,
.mp-1997-wrapper .mp-1997-btn.view-framed.shape-circle {
	border-radius: 50%;
}

/* --- Shape: Square --- */
.mp-1997-wrapper .mp-1997-btn.view-stacked.shape-square,
.mp-1997-wrapper .mp-1997-btn.view-framed.shape-square {
	border-radius: 6px;
}

/* --- Icons inside btn --- */
.mp-1997-wrapper .mp-1997-btn i {
	font-size: 18px;
	line-height: 1;
}

.mp-1997-wrapper .mp-1997-btn svg {
	width: 18px;
	height: 18px;
	fill: currentColor;
	display: block;
}

/* =============================================================================
   NO POSTS MESSAGE
   ============================================================================= */

.mp-1997-wrapper .mp-1997-no-posts {
	width: 100%;
	text-align: center;
	padding: 40px 20px;
	color: #888;
	font-family: 'Inter', sans-serif;
	font-size: 15px;
}