/**
 * BK Quy Trình Widget CSS
 * Author: Bùi Đức Hạnh (https://buhaweb.com/)
 * Prefix: bdh-bk-
 * Kit 4 Green Theme: dominant green (#2CAC55, #2A9150, #1E6B3A), white text on green backgrounds
 */

/* ==========================================================================
   1. ROOT WRAPPER & CONTAINER
   ========================================================================== */
.bdh-bk-quy-trinh-wrap {
	position: relative;
	width: 100%;
	box-sizing: border-box;
}

.bdh-bk-quy-trinh-wrap *,
.bdh-bk-quy-trinh-wrap *::before,
.bdh-bk-quy-trinh-wrap *::after {
	box-sizing: border-box;
}

/* ==========================================================================
   2. SLIDER & GRID MODES
   ========================================================================== */
/* Swiper Slider Mode */
.bdh-bk-quy-trinh-slider {
	position: relative;
	width: 100%;
	overflow: hidden;
	padding: 10px 4px 18px;
}

.bdh-bk-quy-trinh-slider .swiper-wrapper {
	display: flex;
	transition-property: transform;
	box-sizing: content-box;
}

.bdh-bk-quy-trinh-slider .swiper-slide {
	height: auto;
	flex-shrink: 0;
	display: flex;
	box-sizing: border-box;
}

/* Grid Mode */
.bdh-bk-quy-trinh-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 24px;
	width: 100%;
}

/* ==========================================================================
   3. PROCESS CARD
   ========================================================================== */
.bdh-bk-quy-trinh-card {
	position: relative;
	width: 100%;
	display: flex;
	flex-direction: column;
	background-color: var(--e-global-color-8d5d81d, #FFFFFF);
	border: 1px solid var(--e-global-color-fcc82ce, #E5E7EB);
	border-radius: 20px;
	padding: 30px 24px 28px;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
	transition: border-color 0.35s ease, box-shadow 0.35s ease, background-color 0.35s ease;
	text-decoration: none;
	color: inherit;
	box-sizing: border-box;
	overflow: hidden; /* Crucial for clipping the corner shape */
}

/* Top Accent Line (Gradient from Green to Orange) */
.bdh-bk-quy-trinh-card::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 4px;
	background: linear-gradient(90deg, #1E6B3A 0%, #2CAC55 45%, #FAA632 100%);
	border-top-left-radius: 20px;
	border-top-right-radius: 20px;
	z-index: 3;
	transition: height 0.3s ease;
}

/* Hover State - Stationary, no translateY jump */
.bdh-bk-quy-trinh-card:hover {
	transform: none !important;
	border-color: var(--e-global-color-1070229, #2CAC55);
	box-shadow: 0 12px 36px rgba(44, 172, 85, 0.16);
}

.bdh-bk-quy-trinh-card:hover::before {
	height: 5px;
}

/* Top Row: Icon Left, Number Right */
.bdh-bk-quy-trinh-card__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 22px;
	width: 100%;
	position: relative;
	z-index: 2;
}

/* Process Icon Box */
.bdh-bk-quy-trinh-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 60px;
	height: 60px;
	background: linear-gradient(135deg, #0d7a3e 0%, #20b85a 100%);
	color: #FFFFFF;
	border-radius: 18px;
	font-size: 26px;
	line-height: 1;
	box-shadow: 0 8px 20px rgba(32, 184, 90, 0.28);
	transition: transform 0.35s ease, box-shadow 0.35s ease;
	flex-shrink: 0;
}

.bdh-bk-quy-trinh-icon svg {
	width: 28px;
	height: 28px;
	fill: currentColor;
	transition: transform 0.3s ease;
}

.bdh-bk-quy-trinh-icon i {
	transition: transform 0.3s ease;
}

.bdh-bk-quy-trinh-card:hover .bdh-bk-quy-trinh-icon {
	transform: scale(1.06);
	box-shadow: 0 12px 26px rgba(32, 184, 90, 0.38);
}

.bdh-bk-quy-trinh-card:hover .bdh-bk-quy-trinh-icon svg,
.bdh-bk-quy-trinh-card:hover .bdh-bk-quy-trinh-icon i {
	transform: scale(1.08);
}

/* Process Number: Large Watermark style */
.bdh-bk-quy-trinh-number {
	display: inline-flex;
	align-items: center;
	justify-content: flex-end;
	font-size: 40px;
	font-weight: 800;
	line-height: 1;
	color: #D4EDE0;
	background: transparent;
	padding: 0;
	min-width: auto;
	height: auto;
	border-radius: 0;
	letter-spacing: -1px;
	transition: color 0.35s ease, transform 0.35s ease;
	flex-shrink: 0;
}

.bdh-bk-quy-trinh-card:hover .bdh-bk-quy-trinh-number {
	color: var(--e-global-color-938e6c1, #2A9150);
	transform: scale(1.04);
}

/* Body: Title & Description */
.bdh-bk-quy-trinh-card__body {
	display: flex;
	flex-direction: column;
	flex-grow: 1;
	position: relative;
	z-index: 2;
}

.bdh-bk-quy-trinh-wrap--align-center .bdh-bk-quy-trinh-card__body {
	text-align: center;
	align-items: center;
}

.bdh-bk-quy-trinh-wrap--align-right .bdh-bk-quy-trinh-card__body {
	text-align: right;
	align-items: flex-end;
}

.bdh-bk-quy-trinh-wrap--align-left .bdh-bk-quy-trinh-card__body {
	text-align: left;
	align-items: flex-start;
}

/* Process Title */
.bdh-bk-quy-trinh-title {
	margin: 0 0 10px 0;
	color: var(--e-global-color-d27c3cc, #1F2328);
	font-size: var(--e-global-typography-8dc9564-font-size, 19px);
	font-weight: 700;
	line-height: var(--e-global-typography-8dc9564-line-height, 1.4em);
	transition: color 0.3s ease;
	word-break: break-word;
}

.bdh-bk-quy-trinh-card:hover .bdh-bk-quy-trinh-title {
	color: var(--e-global-color-938e6c1, #2A9150);
}

/* Process Description */
.bdh-bk-quy-trinh-desc {
	margin: 0;
	color: var(--e-global-color-76ff1c6, #4B5563);
	font-size: var(--e-global-typography-afd6f4d-font-size, 14px);
	font-weight: var(--e-global-typography-afd6f4d-font-weight, 400);
	line-height: var(--e-global-typography-afd6f4d-line-height, 1.65em);
	word-break: break-word;
}

/* ==========================================================================
   4. BOTTOM RIGHT CORNER SHAPE (EXPANDS AND CHANGES COLOR ON HOVER)
   ========================================================================== */
.bdh-bk-quy-trinh-card__shape {
	position: absolute;
	right: -30px;
	bottom: -30px;
	width: 130px;
	height: 130px;
	border-radius: 50%;
	background-color: #FDF6ED;
	pointer-events: none;
	z-index: 1;
	transform-origin: bottom right;
	transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.4s ease, opacity 0.4s ease;
}

/* Corner Shape on Card Hover: Gets bigger and changes color! */
.bdh-bk-quy-trinh-card:hover .bdh-bk-quy-trinh-card__shape {
	transform: scale(1.45);
	background-color: var(--e-global-color-d9c2012, #E8F6EC);
}

/* Card Link Wrap */
a.bdh-bk-quy-trinh-card {
	cursor: pointer;
}

/* ==========================================================================
   5. NAVIGATION ARROWS (SIDES OR BOTTOM)
   ========================================================================== */
/* Side Positioned Arrows (As seen in screenshot) */
.bdh-bk-quy-trinh-wrap--arrows-sides {
	position: relative;
	padding: 0 16px;
}

.bdh-bk-quy-trinh-wrap--arrows-inside {
	padding-left: 0;
	padding-right: 0;
}

.bdh-bk-quy-trinh-wrap--arrows-sides .bdh-bk-quy-trinh-navigation {
	position: static;
	margin: 0;
}

.bdh-bk-quy-trinh-wrap--arrows-sides .bdh-bk-quy-trinh-arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 10;
}

.bdh-bk-quy-trinh-wrap--arrows-sides .bdh-bk-quy-trinh-arrow--prev {
	left: -6px;
}

.bdh-bk-quy-trinh-wrap--arrows-sides .bdh-bk-quy-trinh-arrow--next {
	right: -6px;
}

.bdh-bk-quy-trinh-wrap--arrows-inside .bdh-bk-quy-trinh-arrow--prev {
	left: 12px;
}

.bdh-bk-quy-trinh-wrap--arrows-inside .bdh-bk-quy-trinh-arrow--next {
	right: 12px;
}

/* Bottom Positioned Arrows */
.bdh-bk-quy-trinh-wrap--arrows-bottom .bdh-bk-quy-trinh-navigation {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 14px;
	margin-top: 24px;
	width: 100%;
}

/* Arrow Button Styling */
.bdh-bk-quy-trinh-arrow {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	background-color: #FFFFFF;
	color: var(--e-global-color-1070229, #2CAC55);
	border: 1px solid rgba(0, 0, 0, 0.06);
	border-radius: 50%;
	font-size: 16px;
	line-height: 1;
	cursor: pointer;
	outline: none;
	user-select: none;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
	transition: all 0.3s ease;
}

.bdh-bk-quy-trinh-arrow svg {
	width: 14px;
	height: 14px;
	fill: currentColor;
	transition: transform 0.25s ease;
}

.bdh-bk-quy-trinh-arrow:hover:not(.swiper-button-disabled) {
	background-color: var(--e-global-color-938e6c1, #2A9150);
	color: #FFFFFF;
	border-color: var(--e-global-color-938e6c1, #2A9150);
	box-shadow: 0 6px 20px rgba(42, 145, 80, 0.32);
}

.bdh-bk-quy-trinh-wrap--arrows-sides .bdh-bk-quy-trinh-arrow:hover:not(.swiper-button-disabled) {
	transform: translateY(-50%) scale(1.08);
}

.bdh-bk-quy-trinh-arrow.swiper-button-disabled {
	opacity: 0.35;
	cursor: not-allowed;
	pointer-events: none;
}

/* ==========================================================================
   6. PAGINATION DOTS
   ========================================================================== */
.bdh-bk-quy-trinh-pagination {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin-top: 22px;
	width: 100%;
}

.bdh-bk-quy-trinh-pagination .swiper-pagination-bullet {
	width: 8px;
	height: 8px;
	margin: 0 !important;
	background-color: var(--e-global-color-fcc82ce, #E5E7EB);
	opacity: 1;
	border-radius: 4px;
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	cursor: pointer;
}

.bdh-bk-quy-trinh-pagination .swiper-pagination-bullet-active {
	width: 24px;
	background-color: var(--e-global-color-1070229, #2CAC55);
}

/* ==========================================================================
   7. RESPONSIVE BREAKPOINTS
   ========================================================================== */
@media (max-width: 1024px) {
	.bdh-bk-quy-trinh-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 20px;
	}

	.bdh-bk-quy-trinh-card {
		padding: 24px 20px 22px;
	}

	.bdh-bk-quy-trinh-wrap--arrows-sides {
		padding: 0 8px;
	}

	.bdh-bk-quy-trinh-wrap--arrows-sides .bdh-bk-quy-trinh-arrow--prev {
		left: -2px;
	}

	.bdh-bk-quy-trinh-wrap--arrows-sides .bdh-bk-quy-trinh-arrow--next {
		right: -2px;
	}
}

@media (max-width: 767px) {
	.bdh-bk-quy-trinh-grid {
		grid-template-columns: 1fr;
		gap: 16px;
	}

	.bdh-bk-quy-trinh-card {
		padding: 22px 18px 20px;
	}

	.bdh-bk-quy-trinh-icon {
		width: 52px;
		height: 52px;
		font-size: 22px;
		border-radius: 15px;
	}

	.bdh-bk-quy-trinh-icon svg {
		width: 24px;
		height: 24px;
	}

	.bdh-bk-quy-trinh-number {
		font-size: 34px;
	}

	.bdh-bk-quy-trinh-arrow {
		width: 38px;
		height: 38px;
		font-size: 14px;
	}
}
