/**
 * Formation Cards CSS
 * Responsive Bootstrap card styling for formations section
 * Replaces isotope filtering with simple grid layout
 */

/* ========================================
   Formation Card Container
   ======================================== */

.formation-card {
	display: flex;
	flex-direction: column;
	height: 100%;
	background: #fff;
	border: none;
	border-radius: 0;
	overflow: hidden;
	transition: transform 0.3s ease, box-shadow 0.3s ease;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.formation-card:hover {
	transform: translateY(-8px);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.formation-card a {
	color: inherit;
	text-decoration: none;
}

.formation-card a:hover {
	text-decoration: none;
}

/* ========================================
   Image Wrapper with Overlay
   ======================================== */

.formation-card-image-wrapper {
	position: relative;
	overflow: hidden;
	aspect-ratio: 16 / 9;
	width: 100%;
	height: auto;
}

.formation-card-image {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.4s ease;
}

.formation-card:hover .formation-card-image {
	transform: scale(1.05);
}

.formation-card-overlay {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: linear-gradient(135deg, rgba(44, 62, 80, 0.6) 0%, rgba(44, 62, 80, 0.3) 100%);
	opacity: 0;
	transition: opacity 0.3s ease;
}

.formation-card:hover .formation-card-overlay {
	opacity: 1;
}

/* ========================================
   Card Body Content
   ======================================== */

.formation-card-body {
	padding: 1.75rem;
	display: flex;
	flex-direction: column;
	flex-grow: 1;
	background: #fff;
}

.formation-card-title {
	font-size: 1.25rem;
	font-weight: 700;
	color: #2c3e50;
	margin-bottom: 1rem;
	line-height: 1.4;
}

.formation-card-schedule {
	margin-bottom: 1rem;
	margin-top: 0;
}

.badge-duration {
	display: inline-block;
	background-color: #d32f2f;
	color: #fff;
	padding: 0.35rem 0.75rem;
	border-radius: 0.25rem;
	font-size: 0.75rem;
	font-weight: 600;
	text-transform: uppercase;
}

.formation-card-schedule .text-sm {
	color: #666;
	font-size: 0.9rem;
	line-height: 1.5;
}

/* ========================================
   Dates Section
   ======================================== */

.formation-card-dates {
	flex-grow: 1;
	margin-bottom: 1.5rem;
}

.formation-card-dates .text-xs {
	font-size: 0.85rem;
	color: #555;
	line-height: 1.6;
	margin-bottom: 0.5rem;
}

.formation-card-dates p {
	margin: 0;
}

.formation-card-dates .font-weight-semibold {
	font-weight: 600;
	color: #2c3e50;
}

/* ========================================
   Footer with Button
   ======================================== */

.formation-card-footer {
	margin-top: auto;
	padding-top: 1rem;
	border-top: 1px solid #eee;
}

.btn-discover {
	display: inline-flex;
	align-items: center;
	color: #d32f2f;
	font-weight: 600;
	font-size: 0.95rem;
	transition: color 0.3s ease;
	cursor: pointer;
}

.formation-card:hover .btn-discover {
	color: #b71c1c;
}

.btn-discover::after {
	content: '';
	margin-left: 0.5rem;
}

/* ========================================
   Mobile Responsive (XS - max 575px)
   ======================================== */

@media (max-width: 575px) {
	.our-work {
		padding-top: 2rem;
		padding-bottom: 2rem;
	}

	.formation-card-body {
		padding: 1.25rem;
	}

	.formation-card-title {
		font-size: 1.1rem;
		margin-bottom: 0.75rem;
	}

	.formation-card-image-wrapper {
		aspect-ratio: 16 / 9;
		min-height: 160px;
	}

	.formation-card-schedule .text-sm {
		font-size: 0.85rem;
	}

	.formation-card-dates .text-xs {
		font-size: 0.8rem;
	}

	.badge-duration {
		font-size: 0.7rem;
		padding: 0.3rem 0.6rem;
	}
}

/* ========================================
   Small Tablet (SM - 576px to 767px)
   ======================================== */

@media (min-width: 576px) and (max-width: 767px) {
	.our-work {
		padding-top: 2.5rem;
		padding-bottom: 2.5rem;
	}

	.formation-card-image-wrapper {
		aspect-ratio: 16 / 9;
		min-height: 180px;
	}

	.formation-card-body {
		padding: 1.5rem;
	}

	.formation-card-title {
		font-size: 1.15rem;
	}
}

/* ========================================
   Medium Tablet (MD - 768px to 991px)
   ======================================== */

@media (min-width: 768px) and (max-width: 991px) {
	.our-work {
		padding-top: 3rem;
		padding-bottom: 3rem;
	}

	.formation-card-image-wrapper {
		aspect-ratio: 16 / 9;
		min-height: 200px;
	}

	.formation-card-body {
		padding: 1.5rem;
	}

	.formation-card-title {
		font-size: 1.2rem;
	}
}

/* ========================================
   Desktop (LG+ - 992px and up)
   ======================================== */

@media (min-width: 992px) {
	.our-work {
		padding-top: 4rem;
		padding-bottom: 4rem;
	}

	.formation-card-body {
		padding: 1.75rem;
	}

	.formation-card-image-wrapper {
		aspect-ratio: 16 / 9;
		min-height: 220px;
	}

	.formation-card-title {
		font-size: 1.35rem;
	}
}

/* ========================================
   Large Desktop (XL - 1200px and up)
   ======================================== */

@media (min-width: 1200px) {
	.formation-card-image-wrapper {
		min-height: 240px;
	}
}

/* ========================================
   Utility Classes
   ======================================== */

.text-xs {
	font-size: 0.85rem;
}

.text-sm {
	font-size: 0.9rem;
}

.font-weight-semibold {
	font-weight: 600;
}

/* ========================================
   Call to Action Button Alignment
   ======================================== */

.our-work .row .col-12 {
	display: flex;
	justify-content: center;
}

.our-work .btn {
	padding: 0.75rem 2rem;
	font-size: 0.95rem;
	transition: all 0.3s ease;
}

.our-work .btn:hover {
	transform: translateY(-2px);
}

/* ========================================
   Grid Gap Support
   ======================================== */

.g-4 {
	--bs-gutter-y: 1.5rem;
	--bs-gutter-x: 1.5rem;
	gap: var(--bs-gutter-y) var(--bs-gutter-x);
}

@media (max-width: 575px) {
	.g-4 {
		--bs-gutter-y: 1.25rem;
		--bs-gutter-x: 1.25rem;
	}
}

/* ========================================
   Accessibility & Focus States
   ======================================== */

.formation-card a:focus-visible {
	outline: 2px solid #d32f2f;
	outline-offset: 2px;
	border-radius: 0.25rem;
}

.btn-discover:focus-visible {
	outline: 2px solid #d32f2f;
	outline-offset: 2px;
}

/* ========================================
   Dark Background Integration
   ======================================== */

.our-work.bg-color-dark {
	background-color: #1a2735;
}

.our-work .text-color-light {
	color: #fff;
}

.our-work .text-color-quaternary {
	color: #999;
}

/* Heading in dark background section */
.our-work .text-center .text-color-light {
	color: #fff;
	margin-bottom: 0.5rem;
}

.our-work .text-center .text-color-quaternary {
	color: #ccc;
	font-size: 0.95rem;
}
