/* Profile container to stack image and text properly */
#page-editable-content .container-2,
#page-editable-content .container-3,
#page-editable-content .container-4,
#page-editable-content .container-5,
#page-editable-content .container-6,
#page-editable-content .container-7,
#page-editable-content .container-8,
#page-editable-content .container-9 {
	display: block;
	width: 100%;
	clear: both;
	margin-bottom: 20px;
}

/* Add top margin specifically to container-2 which is the first row */
#page-editable-content .container-2 {
	margin-top: 20px;
}

.profile {
	display: inline-block;
	text-align: center;
	margin: 0 auto;
	vertical-align: top;
	width: 280px;
	position: relative;
	margin-bottom: 40px;
}

.profile-image-container {
	position: relative;
	width: 280px;
	height: 421px;
	margin-bottom: 20px;
}

.profile-image-container img {
	transition: opacity 0.3s ease;
	position: absolute;
	top: 0;
	left: 0;
}

/* Initially hide the hover image */
.profile-hover-img {
	opacity: 0;
}

/* Show hover image on mouse hover */
.profile-image-container:hover .profile-hover-img {
	opacity: 1;
}

/* Hide the default image on hover */
.profile-image-container:hover .profile-default-img {
	opacity: 0;
}

/* Limit image dimensions */
.profile-default-img,
.profile-hover-img {
	width: 280px;
	height: auto;
}

/* h2 styling */
.profile-text {
	text-align: center;
	position: absolute;
	width: 100%;
	bottom: -40px; /* Position text below the image */
	left: 0;
	font-family: Arial, sans-serif;
	font-size: 1.5rem;
	z-index: 1;
}

/* Media query for mobile screens */
@media screen and (max-width: 767px) {
	.profile {
		margin-bottom: 60px; /* Increase bottom margin for mobile to prevent overlap */
	}

	.col-md-3 {
		margin-bottom: 20px;
	}
}
