/**
 * IFA Bağış Kartları — front-end stilleri.
 */

.ifa-bk {
	position: relative;
	width: 100%;
}

.ifa-bk-swiper {
	overflow: hidden;
	width: 100%;
	padding: 4px 0 6px;
}

.ifa-bk .swiper-wrapper {
	display: flex;
	align-items: stretch;
}

.ifa-bk .swiper-slide {
	height: auto;
	display: flex;
}

/* Swiper başlatıldığında (carousel modu). */
.ifa-bk--ready .swiper-wrapper {
	box-sizing: content-box;
	flex-wrap: nowrap;
	justify-content: flex-start;
	gap: 0;
}

.ifa-bk--ready .swiper-slide {
	flex-shrink: 0;
}

/**
 * Swiper yüklenmemişse ya da henüz başlamamışsa: ortalanmış esnek ızgara.
 * Kolon sayısı ve boşluk, Elementor'ın yazdığı CSS değişkenlerinden gelir.
 */
.ifa-bk:not(.ifa-bk--ready) .swiper-wrapper {
	flex-wrap: wrap;
	justify-content: center;
	gap: var(--ifa-bk-gap, 30px);
}

.ifa-bk:not(.ifa-bk--ready) .swiper-slide {
	width: calc((100% - (var(--ifa-bk-cols, 3) - 1) * var(--ifa-bk-gap, 30px)) / var(--ifa-bk-cols, 3));
	max-width: 100%;
}

/* ---------- Kart ---------- */
.ifa-bk-card {
	display: flex;
	flex-direction: column;
	width: 100%;
	margin-left: auto;
	margin-right: auto;
	background-color: #fff;
	border: 1px solid #ececec;
	border-radius: 8px;
	overflow: hidden;
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

/* ---------- Görsel ---------- */
.ifa-bk-media {
	display: block;
	position: relative;
	width: 100%;
	aspect-ratio: var(--ifa-bk-ratio, 1.5);
	overflow: hidden;
	background-color: #f2f4f6;
	line-height: 0;
}

.ifa-bk-media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.45s ease;
}

.ifa-bk--zoom .ifa-bk-card:hover .ifa-bk-media img {
	transform: scale(1.05);
}

/* ---------- Gövde ---------- */
.ifa-bk-body {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	padding: 24px 26px 28px;
}

/* ---------- Başlık ---------- */
.ifa-bk-title {
	margin: 0 0 18px;
	padding: 0;
	color: #2b3d4f;
	font-size: 26px;
	font-weight: 700;
	line-height: 1.25;
	letter-spacing: 0.3px;
	text-transform: uppercase;
}

.ifa-bk-title a {
	color: inherit;
	text-decoration: none;
	transition: color 0.25s ease;
}

/* ---------- Yüzde + çubuk ---------- */
.ifa-bk-progress {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 14px;
}

.ifa-bk-percent {
	color: #2f8fa3;
	font-size: 24px;
	font-weight: 500;
	line-height: 1;
	white-space: nowrap;
}

.ifa-bk-bar {
	position: relative;
	flex: 1 1 auto;
	min-width: 0;
	height: 6px;
	background-color: #e6e9ec;
	border-radius: 4px;
	overflow: hidden;
}

.ifa-bk-bar-fill {
	display: block;
	height: 100%;
	width: var(--ifa-bk-fill, 0%);
	background-color: #2f8fa3;
	border-radius: inherit;
}

/**
 * Animasyon açıkken sıfırdan doldur.
 * Sadece JS çalışıyorsa sıfırla — aksi halde çubuk hiç dolmadan kalır.
 */
.ifa-bk--js.ifa-bk--anim .ifa-bk-bar-fill {
	width: 0;
	transition: width 1.2s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.ifa-bk--js.ifa-bk--anim .ifa-bk-bar-fill.is-filled {
	width: var(--ifa-bk-fill, 0%);
}

/* ---------- Mevcut / Hedef ---------- */
.ifa-bk-amounts {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 12px;
	flex-wrap: wrap;
	margin-bottom: 20px;
}

.ifa-bk-amount {
	font-size: 15px;
	font-weight: 500;
	letter-spacing: 0.3px;
	text-transform: uppercase;
	line-height: 1.4;
}

.ifa-bk-amount-label {
	color: #9aa3ab;
}

.ifa-bk-amount--current .ifa-bk-amount-value {
	color: #2f8fa3;
}

.ifa-bk-amount--target .ifa-bk-amount-value {
	color: #ea6a52;
}

/* ---------- Orta alan metni (tutar yerine) ---------- */
.ifa-bk-subtitle {
	font-size: 16px;
	font-weight: 500;
	line-height: 1.5;
	color: #5a6773;
	margin-bottom: 20px;
}

.ifa-bk-subtitle:last-child {
	margin-bottom: 0;
}

/* ---------- Buton ---------- */
.ifa-bk-button {
	display: block;
	margin-top: auto;
	width: 100%;
	padding: 16px 20px;
	background-color: #ea6a52;
	color: #fff;
	border: 0;
	border-radius: 6px;
	font-size: 15px;
	font-weight: 600;
	letter-spacing: 1px;
	line-height: 1.2;
	text-align: center;
	text-transform: uppercase;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.ifa-bk-button:hover,
.ifa-bk-button:focus {
	background-color: #de5940;
	color: #fff;
	text-decoration: none;
}

/* ---------- Oklar ---------- */
.ifa-bk-arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 5;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background-color: #fff;
	color: #2b3d4f;
	box-shadow: 0 3px 14px rgba(0, 0, 0, 0.14);
	cursor: pointer;
	transition: opacity 0.25s ease, box-shadow 0.25s ease;
}

.ifa-bk-arrow:hover {
	box-shadow: 0 4px 18px rgba(0, 0, 0, 0.2);
}

.ifa-bk-arrow--prev {
	left: -14px;
}

.ifa-bk-arrow--next {
	right: -14px;
}

/* Kaydırılacak bir şey yoksa okları ve noktaları gizle. */
.ifa-bk-arrow.swiper-button-disabled,
.ifa-bk-arrow.swiper-button-lock,
.ifa-bk-pagination.swiper-pagination-lock {
	opacity: 0;
	pointer-events: none;
}

/* Swiper başlamadıysa kaydırma yoktur; ok ve noktaları gösterme. */
.ifa-bk:not(.ifa-bk--ready) .ifa-bk-arrow,
.ifa-bk:not(.ifa-bk--ready) .ifa-bk-pagination {
	display: none;
}

/* ---------- Noktalar ---------- */
.ifa-bk-pagination {
	position: static;
	margin-top: 22px;
	text-align: center;
	line-height: 0;
}

.ifa-bk-pagination .swiper-pagination-bullet {
	width: 10px;
	height: 10px;
	margin: 0 5px;
	background-color: #cbd3d8;
	opacity: 1;
	border-radius: 50%;
	transition: background-color 0.25s ease, transform 0.25s ease;
}

.ifa-bk-pagination .swiper-pagination-bullet-active {
	background-color: #ea6a52;
	transform: scale(1.15);
}

/* ---------- Mobil ---------- */
@media (max-width: 1024px) {
	.ifa-bk-arrow--prev {
		left: 4px;
	}

	.ifa-bk-arrow--next {
		right: 4px;
	}
}

@media (max-width: 767px) {
	.ifa-bk-title {
		font-size: 22px;
	}

	.ifa-bk-percent {
		font-size: 21px;
	}
}
