/* Category Cards Grid */
.cc-cards-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 20px;
	width: 100%;
}

.cc-cards-count-1 { grid-template-columns: 1fr; }
.cc-cards-count-2 { grid-template-columns: repeat(2, 1fr); }
.cc-cards-count-3 { grid-template-columns: repeat(3, 1fr); }

/* Card */
.cc-card {
	position: relative;
	height: 350px;
	perspective: 1000px;
	cursor: pointer;
}

.cc-card__inner {
	position: relative;
	width: 100%;
	height: 100%;
	transition: transform 0.6s ease;
	transform-style: preserve-3d;
}

.cc-card--flippable.is-flipped .cc-card__inner {
	transform: rotateY(180deg);
}

/* Front side */
.cc-card__front {
	position: absolute;
	inset: 0;
	backface-visibility: hidden;
	-webkit-backface-visibility: hidden;
	border-radius: 12px;
	overflow: hidden;
}

.cc-card__image {
	position: absolute;
	top: 0;
	left: 50%;
	transform: translateX(-50%);
    height: 100% !important;
    width: auto;
    max-width: none !important;
	min-width: 100%;
	display: block;
}

.cc-card__overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 27, 106, 0.45);
	display: flex;
	align-items: flex-end;
	justify-content: center;
	padding: 24px 16px;
	transition: background 0.3s ease;
}

.cc-card:hover .cc-card__overlay {
	background: rgba(0, 27, 106, 0.35) !important;
}

.cc-card__title {
	color: #fff;
	font-size: 21px;
	font-weight: 700;
	text-align: center;
	line-height: 1.3;
	font-family: Inter, sans-serif;
}

.cc-card__link-overlay {
	position: absolute;
	inset: 0;
	z-index: 2;
}

/* Back side */
.cc-card__back {
	position: absolute;
	inset: 0;
	backface-visibility: hidden;
	-webkit-backface-visibility: hidden;
	transform: rotateY(180deg);
	border-radius: 12px;
	background-color: #001B6A;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 30px 20px 20px;
	overflow: hidden;
}

/* Close button */
.cc-card__close {
	position: absolute;
	top: 10px;
	right: 14px;
	background: none;
	border: none;
	color: #fff;
	font-size: 28px;
	line-height: 1;
	cursor: pointer;
	width: 36px;
	height: 36px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	transition: background 0.2s ease;
	z-index: 5;
	padding: 0;
}

.cc-card__close:hover {
	background: rgba(255, 255, 255, 0.15);
}

/* Back title */
.cc-card__back-title {
	color: #fff;
	font-size: 20px;
	font-weight: 700;
	margin-bottom: 20px;
	font-family: Inter, sans-serif;
	text-align: center;
    border-bottom: 1px solid red;
}

/* Subcategory list */
.cc-card__subcat-list {
	list-style: none;
	margin: 0;
	padding: 0;
	width: 100%;
	text-align: center;
}

.cc-card__subcat-item {
	margin-bottom: 10px;
}

.cc-card__subcat-link {
	color: #fff;
	text-decoration: none;
	font-size: 16px;
	font-weight: 500;
	font-family: Inter, sans-serif;
	padding: 5px 10px;
	display: inline-block;
	border-radius: 6px;
	transition: background 0.2s ease;
}

.cc-card__subcat-link:hover {
	background: rgba(255, 255, 255, 0.15);
	color: #fff;
	text-decoration: none;
}

/* View all link */
.cc-card__view-all {
	color: rgba(255, 255, 255, 0.7);
	text-decoration: none;
	font-size: 14px;
	font-family: Inter, sans-serif;
	margin-top: auto;
	padding-top: 12px;
	transition: color 0.2s ease;
}

.cc-card__view-all:hover {
	color: #fff;
}
/* Tablet: 2 columns */
@media (max-width: 1024px) {
	.cc-cards-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 16px;
	}

	.cc-card {
		max-height: 300px;
	}
}

/* Mobile: 2 columns, compact */
@media (max-width: 767px) {
	.cc-cards-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 10px;
	}

	.cc-card__title {
		font-size: 16px;
	}

	.cc-card__overlay {
		padding: 16px 10px;
	}

	.cc-card__back {
		padding: 24px 12px 14px;
	}

	.cc-card__back-title {
		font-size: 16px;
		margin-bottom: 12px;
	}

	.cc-card__subcat-link {
		font-size: 13px;
		padding: 6px 10px;
	}

	.cc-card__subcat-item {
		margin-bottom: 6px;
	}

	.cc-card__close {
		font-size: 24px;
		top: 6px;
		right: 8px;
	}

	.cc-card__view-all {
		font-size: 12px;
	}
}
@media (max-width: 420px) {
    .cc-cards-grid {
        grid-template-columns: repeat(1, 1fr);
    }
}