/* Basic styles for the embedded MuckRack portfolio */
.mpe-embed {
	direction: ltr;
	text-align: left;
}

.mpe-embed .portfolio-item-container {
	margin-left: 1%;
    margin-right: 1%;
    margin-bottom: 2%;

}

.mpe-embed img {
	max-width: 100%;
	height: auto;
	display: block;
}

.mpe-embed .portfolio-item-title {
	font-size: 1rem;
	margin: .5rem 0;
	line-height: 1.3;
	direction: ltr;
	text-align: left;
}

.mpe-embed .preview-contents .date {
	opacity: .7;
	font-size: .9rem;
	direction: ltr;
}

/* Responsive grid helpers in case the source site classes differ */
.mpe-embed .row::after {
	content: "";
	display: table;
	clear: both;
}

@media (min-width: 576px) {
	.mpe-embed .col-sm-4 { width: 23%; float: left; }
}

@media (max-width: 575.98px) {
	.mpe-embed .col-6 { width: 50%; float: left; }
}

/* Grid layout - 4 columns with equal heights and better proportions */
.mpe-embed .portfolio-items {
	display: grid !important;
	grid-template-columns: repeat(4, 1fr);
	gap: 24px;
	align-items: stretch; /* Make all items equal height */
	padding: 32px 20px;
	direction: ltr;
	justify-content: center;
	max-width: 1400px;
	margin: 0 auto;
}

/* Responsive breakpoints with improved spacing */
@media (max-width: 1400px) {
	.mpe-embed .portfolio-items {
		grid-template-columns: repeat(3, 1fr);
		gap: 20px;
		padding: 28px 18px;
	}
}

@media (max-width: 1000px) {
	.mpe-embed .portfolio-items {
		grid-template-columns: repeat(2, 1fr);
		gap: 18px;
		padding: 24px 16px;
	}
}

@media (max-width: 650px) {
	.mpe-embed .portfolio-items {
		grid-template-columns: 1fr;
		gap: 16px;
		padding: 20px 14px;
	}
}

/* Card base - equal height layout with improved proportions */
.mpe-embed .portfolio-item-container {
	position: relative;
	background: #ffffff;
	border: 1px solid #e5e7eb;
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 2px 8px rgba(0,0,0,.08), 0 1px 4px rgba(0,0,0,.04);
	transition: all .3s cubic-bezier(0.4, 0, 0.2, 1);
	cursor: pointer;
	display: flex;
	flex-direction: column;
	height: 100%; /* Ensure equal height */
	min-height: 320px; /* Minimum height for better proportions */
	direction: ltr;
}

.mpe-embed .portfolio-item-container:hover {
	box-shadow: 0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -2px rgba(0,0,0,.05);
	transform: translateY(-2px);
	border-color: #d1d5db;
}

/* Hover overlay - more subtle */
.mpe-embed .portfolio-item-container::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(to top, rgba(0,0,0,.6), rgba(0,0,0,.2));
	opacity: 0;
	transition: opacity .3s cubic-bezier(0.4, 0, 0.2, 1);
	pointer-events: none;
	z-index: 1;
}

.mpe-embed .portfolio-item-container:hover::after { 
	opacity: 1; 
}

/* Image - improved aspect ratio and proportions */
.mpe-embed .portfolio-item-image { 
	position: relative; 
	overflow: hidden;
	flex-shrink: 0; /* Don't shrink image area */
	height: 180px; /* Fixed height for better consistency */
}
.mpe-embed .portfolio-item-image img,
.mpe-embed .portfolio-no-img {
	width: 100%;
	height: 100%;
	display: block;
	object-fit: cover;
	background: #f8fafc;
	transition: transform .4s cubic-bezier(0.4, 0, 0.2, 1);
}
.mpe-embed .portfolio-item-container:hover .portfolio-item-image img {
	transform: scale(1.05);
}

/* Title area under image - improved spacing and LTR support */
.mpe-embed .portfolio-item-content { 
	padding: 0; 
	flex: 1; /* Take remaining space */
	display: flex;
	flex-direction: column;
	direction: ltr;
	text-align: left;
}
.mpe-embed .main-contents { 
	background: #ffffff; 
	padding: 20px 22px 22px;
	border-top: none;
	flex: 1; /* Expand to fill available space */
	display: flex;
	align-items: flex-start; /* Align title to top */
	direction: ltr;
}
.mpe-embed .main-contents .portfolio-item-title { 
	font-size: 1.1rem; 
	line-height: 1.5; 
	margin: 0; 
	color: #1f2937; 
	font-weight: 600;
	letter-spacing: -0.025em;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
	word-break: break-word;
	direction: ltr;
	text-align: left;
}

/* Hover reveal for preview details */
.mpe-embed .preview-contents { 
	position: absolute; 
	inset: 0; 
	display: flex; 
	align-items: flex-end; 
	pointer-events: none; 
	z-index: 2;
}
.mpe-embed .portfolio-item-hover { 
	pointer-events: auto; 
	display: block; 
	width: 100%; 
	text-decoration: none; 
	padding: 20px; 
}

/* Hidden by default - smoother transitions */
.mpe-embed .preview-contents p,
.mpe-embed .preview-contents .view-link,
.mpe-embed .preview-contents .date { 
	opacity: 0; 
	transform: translateY(20px); 
	transition: all .4s cubic-bezier(0.4, 0, 0.2, 1); 
	transition-delay: 0s;
}

/* Stagger the animations */
.mpe-embed .preview-contents .date { transition-delay: 0.1s; }
.mpe-embed .preview-contents p { transition-delay: 0.15s; }
.mpe-embed .preview-contents .view-link { transition-delay: 0.2s; }

/* Text on overlay - improved LTR layout */
.mpe-embed .preview-contents a.portfolio-item-hover p { 
	color: #ffffff; 
	padding: 0; 
	background: transparent;
	font-size: 1.2rem;
	font-weight: 600;
	text-shadow: 0 2px 4px rgba(0,0,0,0.5);
	max-width: 95%;
	line-height: 1.5;
	margin-bottom: 10px;
	direction: ltr;
	text-align: left;
}
.mpe-embed .preview-contents a.portfolio-item-hover .date { 
	color: #e5e7eb; 
	padding: 0; 
	background: transparent; 
	margin-top: 6px; 
	margin-bottom: 18px;
	display: block;
	font-size: 0.9rem;
	text-shadow: 0 1px 2px rgba(0,0,0,0.3);
	font-weight: 400;
	direction: ltr;
	text-align: left;
}
.mpe-embed .preview-contents a.portfolio-item-hover .view-link { 
	background: #ffffff; 
	color: #1f2937; 
	border-radius: 6px; 
	padding: 10px 20px; 
	font-weight: 600; 
	display: inline-block; 
	margin-top: 8px; 
	box-shadow: 0 4px 6px -1px rgba(0,0,0,.1), 0 2px 4px -1px rgba(0,0,0,.06);
	transition: all .2s cubic-bezier(0.4, 0, 0.2, 1);
	font-size: 0.875rem;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}
.mpe-embed .preview-contents a.portfolio-item-hover .view-link:hover {
	background: #f9fafb;
	transform: translateY(-1px);
	box-shadow: 0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -2px rgba(0,0,0,.05);
}

/* Reveal on hover with staggered timing */
.mpe-embed .portfolio-item-container:hover .preview-contents .date { 
	opacity: 1; 
	transform: translateY(0); 
	transition-delay: 0.1s;
}
.mpe-embed .portfolio-item-container:hover .preview-contents p { 
	opacity: 1; 
	transform: translateY(0); 
	transition-delay: 0.15s;
}
.mpe-embed .portfolio-item-container:hover .preview-contents .view-link { 
	opacity: 1; 
	transform: translateY(0); 
	transition-delay: 0.2s;
}

/* Load more button - refined style */
.mpe-loadmore-wrap { 
	text-align: center; 
	margin: 40px auto 0 auto;
	padding: 0 16px;
	width: 100%;
	display: block;
	clear: both;
}
.mpe-loadmore-btn { 
	background: #1f2937; 
	color: #fff; 
	border: 0; 
	border-radius: 6px; 
	
	font-weight: 600; 
	cursor: pointer; 
	box-shadow: 0 4px 6px -1px rgba(0,0,0,.1), 0 2px 4px -1px rgba(0,0,0,.06);
	transition: all .3s cubic-bezier(0.4, 0, 0.2, 1);
	font-size: 0.875rem;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}
.mpe-loadmore-btn:hover {
	background: #374151;
	transform: translateY(-1px);
	box-shadow: 0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -2px rgba(0,0,0,.05);
}
.mpe-loadmore-btn[disabled] { 
	opacity: .5; 
	cursor: not-allowed; 
	background: #9ca3af;
	box-shadow: 0 1px 2px rgba(0,0,0,.05);
	transform: none;
}
.mpe-loading { 
	display: inline-block; 
	margin-left: 10px; 
	color: #64748b;
	animation: pulse 1.5s infinite;
}

@keyframes pulse {
	0% { opacity: 0.6; }
	50% { opacity: 1; }
	100% { opacity: 0.6; }
} 