/**
 * Competition Category Cards Frontend Styles
 * Responsive layout matching the reference competition category cards design.
 * Automatically centers second-row cards (e.g. 4 cards in Row 1, 2 centered in Row 2).
 */

.aptech-category-grid-container {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 24px;
	width: 100%;
	max-width: 1280px;
	margin: 0 auto;
	box-sizing: border-box;
	padding: 0 15px;
}

/* Card Design */
.aptech-cat-card {
	flex: 0 0 calc(25% - 18px);
	max-width: calc(25% - 18px);
	min-width: 250px;
	border-radius: 24px;
	padding: 48px 26px 42px;
	text-align: center;
	color: #ffffff;
	box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
	transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1);
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	min-height: 380px;
	box-sizing: border-box;
	position: relative;
	overflow: hidden;
}

.aptech-cat-card:hover {
	transform: translateY(-8px);
	box-shadow: 0 20px 40px rgba(0, 0, 0, 0.16);
}

.aptech-cat-card-inner {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: space-between;
	height: 100%;
	width: 100%;
}

/* Icon */
.aptech-cat-icon-wrap {
	margin-bottom: 24px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 72px;
	height: 72px;
}

.aptech-cat-icon-wrap i {
	font-size: 54px;
	color: #ffffff;
	line-height: 1;
}

.aptech-cat-custom-icon {
	max-width: 68px;
	max-height: 68px;
	object-fit: contain;
	filter: brightness(0) invert(1);
}

/* Title */
.aptech-cat-title {
	font-size: 22px !important;
	font-weight: 700 !important;
	color: #ffffff !important;
	line-height: 1.3 !important;
	margin: 0 0 14px 0 !important;
	text-align: center;
	word-break: break-word;
	flex-grow: 1;
	display: flex;
	align-items: center;
	justify-content: center;
}

/* Subtitle */
.aptech-cat-subtitle {
	font-size: 15px;
	font-weight: 600;
	color: rgba(255, 255, 255, 0.95);
	margin-bottom: 30px;
	letter-spacing: 0.3px;
}

/* Read More */
.aptech-cat-action {
	margin-top: auto;
}

.aptech-cat-read-more {
	display: inline-block;
	color: #ffffff !important;
	font-size: 14px;
	font-weight: 700;
	text-decoration: underline !important;
	text-underline-offset: 6px;
	letter-spacing: 0.5px;
	transition: opacity 0.2s, transform 0.2s;
}

.aptech-cat-read-more:hover {
	opacity: 0.85;
	transform: translateY(-1px);
}

/* Responsive Media Queries */
@media (max-width: 1100px) {
	.aptech-cat-card {
		flex: 0 0 calc(50% - 12px);
		max-width: calc(50% - 12px);
		min-width: 240px;
	}
}

@media (max-width: 640px) {
	.aptech-cat-card {
		flex: 0 0 100%;
		max-width: 100%;
		min-height: 320px;
		padding: 35px 20px 30px;
		border-radius: 20px;
	}

	.aptech-cat-title {
		font-size: 20px !important;
	}
}
