/* ==========================================================================
   CK Health "Contents" (TOC) — brand colour: #20A4AE
   Minimal, sticky panel that highlights the active heading on scroll.
   Sitenin tasarım diliyle uyumlu: yumuşak yuvarlak köşeler, ferah beyaz
   yüzey, hafif gölge ve teal vurgular.
   ========================================================================== */

:root {
	--ck-brand: #20A4AE;
	--ck-brand-dark: #17808a;
	--ck-brand-soft: rgba(32, 164, 174, 0.09);
	--ck-text: #16232b;
	--ck-text-muted: #6a7a80;
	--ck-border: #e3ebed;
	--ck-bg: #ffffff;
}

.ckhealth-toc {
	--toc-width: 265px;
	font-family: inherit;
	box-sizing: border-box;
}
.ckhealth-toc * {
	box-sizing: border-box;
}

/* ---- Masaüstü: sağda sabit, ince, minimal panel ---- */
.ckhealth-toc-panel {
	position: fixed;
	top: 50%;
	right: 24px;
	transform: translateY(-50%);
	width: var(--toc-width);
	max-height: 70vh;
	background: var(--ck-bg);
	border: 1px solid var(--ck-border);
	border-radius: 16px;
	box-shadow: 0 10px 30px rgba(14, 45, 52, 0.10);
	z-index: 99998;
	overflow: hidden;
	display: none;
	flex-direction: column;
	transition: opacity 0.25s ease, transform 0.25s ease;
}
.ckhealth-toc.is-ready .ckhealth-toc-panel {
	display: flex;
}

.ckhealth-toc-header {
	display: none; /* Masaüstünde gizli; mobilde bottom-sheet başlığı olarak görünür. */
	align-items: center;
	justify-content: space-between;
	padding: 13px 16px;
	border-bottom: 1px solid var(--ck-border);
	flex: 0 0 auto;
}
.ckhealth-toc-header-title {
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.2px;
	color: var(--ck-text);
}
.ckhealth-toc-close {
	background: none;
	border: none;
	font-size: 21px;
	line-height: 1;
	color: var(--ck-text-muted);
	cursor: pointer;
	padding: 2px 4px;
}
.ckhealth-toc-close:hover {
	color: var(--ck-brand);
}

.ckhealth-toc-nav {
	padding: 14px 6px 14px 0;
	overflow-y: auto;
	overflow-x: hidden;
	-webkit-overflow-scrolling: touch;
	overscroll-behavior: contain;
	touch-action: pan-y;
	flex: 1 1 auto;
	min-height: 0;
	will-change: scroll-position;
}
.ckhealth-toc-nav::-webkit-scrollbar {
	width: 4px;
}
.ckhealth-toc-nav::-webkit-scrollbar-thumb {
	background: var(--ck-border);
	border-radius: 4px;
}

#ckhealth-toc-list {
	list-style: none;
	margin: 0;
	padding: 0 0 0 14px;
	border-left: 2px solid var(--ck-border);
	touch-action: pan-y;
}

.ckhealth-toc-item {
	margin: 0;
	touch-action: pan-y;
}
.ckhealth-toc-item.level-3 .ckhealth-toc-link {
	padding-left: 26px;
	font-size: 12.5px;
}

.ckhealth-toc-link {
	position: relative;
	display: block;
	padding: 6px 12px;
	margin-left: -2px;
	font-size: 13.5px;
	line-height: 1.45;
	color: var(--ck-text-muted);
	text-decoration: none;
	border-left: 2px solid transparent;
	/* Parmak bir başlığın üzerindeyken de dikey kaydırma çalışsın diye
	   (touch-action miras alınmaz, her elemanda ayrıca tanımlanmalı). */
	touch-action: pan-y;
	-webkit-tap-highlight-color: transparent;
	-webkit-user-select: none;
	user-select: none;
	transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.ckhealth-toc-link:hover {
	color: var(--ck-brand-dark);
	background: var(--ck-brand-soft);
}
.ckhealth-toc-item.is-active > .ckhealth-toc-link {
	color: var(--ck-brand-dark);
	font-weight: 600;
	border-left-color: var(--ck-brand);
	background: var(--ck-brand-soft);
}

/* ---- Masaüstünde toggle butonu gizli ---- */
.ckhealth-toc-toggle {
	display: none;
}

/* ==========================================================================
   Masaüstünde panel, sayfanın üst başlık/görsel alanı geçilene kadar gizli
   kalır; JS uygun noktada "ck-toc-scrolled" sınıfını ekler.
   ========================================================================== */
@media screen and (min-width: 993px) {
	.ckhealth-toc-panel {
		opacity: 0;
		pointer-events: none;
		transform: translateY(-50%) translateX(14px);
	}
	.ckhealth-toc.ck-toc-scrolled .ckhealth-toc-panel {
		opacity: 0.96;
		pointer-events: auto;
		transform: translateY(-50%) translateX(0);
	}
	.ckhealth-toc.ck-toc-scrolled .ckhealth-toc-panel:hover,
	.ckhealth-toc.ck-toc-scrolled .ckhealth-toc-panel:focus-within {
		opacity: 1;
	}
}

/* Tablet/dizüstü: panel biraz daralır. */
@media screen and (max-width: 1400px) {
	.ckhealth-toc-panel {
		right: 16px;
		width: 225px;
	}
}

/* ==========================================================================
   İçerik bittiğinde TOC tamamen gizlenir (masaüstü panel + mobil buton).
   ========================================================================== */
.ckhealth-toc.ck-toc-hidden .ckhealth-toc-panel,
.ckhealth-toc.ck-toc-hidden .ckhealth-toc-toggle {
	opacity: 0 !important;
	pointer-events: none !important;
	visibility: hidden;
	transition: opacity 0.3s ease, visibility 0s linear 0.3s;
}

/* ==========================================================================
   Mobil ve tablet (<= 992px): sağ kenarda küçük bir açma butonu; tıklanınca
   alttan açılan panel (bottom sheet).

   Buton önce "Contents" yazısıyla belirir, 1.5 sn sonra küçük bir ikon
   düğmesine dönüşür. Geçiş, boyut animasyonu yerine "sön → boyutu görünmezken
   değiştir → tekrar belir" (crossfade) yöntemiyle yapılır; böylece mobilde
   takılma/kasma olmaz.
   ========================================================================== */
@media screen and (max-width: 992px) {

	@keyframes ck-toc-pop-in {
		0% {
			opacity: 0;
			transform: translateY(-50%) translateX(18px) translateZ(0);
		}
		100% {
			opacity: 1;
			transform: translateY(-50%) translateX(0) translateZ(0);
		}
	}

	.ckhealth-toc-toggle {
		display: flex;
		align-items: center;
		justify-content: center;
		gap: 6px;
		position: fixed;
		right: 0;
		top: 66%;
		transform: translateY(-50%) translateZ(0);
		z-index: 99999;
		background: var(--ck-brand);
		color: #fff;
		border: none;
		border-radius: 999px 0 0 999px;
		padding: 8px 12px;
		box-shadow: -2px 4px 14px rgba(32, 164, 174, 0.32);
		cursor: pointer;
		width: 120px;
		height: 34px;
		overflow: hidden;
		white-space: nowrap;
		opacity: 1;
		animation: ck-toc-pop-in 0.45s ease-out both;
		/* Sadece opacity ve transform animasyonlu (compositor dostu). */
		transition:
			opacity 0.26s ease,
			transform 0.26s ease,
			background 0.3s ease;
	}

	/* Geçiş anı: element sönerken hafifçe sağa kayar. */
	.ckhealth-toc-toggle.is-swapping {
		opacity: 0;
		transform: translateY(-50%) translateX(14px) translateZ(0);
	}

	.ckhealth-toc-toggle-icon {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		flex-direction: column;
		gap: 3px;
		flex: 0 0 auto;
	}
	.ckhealth-toc-toggle-icon span {
		display: block;
		width: 13px;
		height: 2px;
		background: #fff;
		border-radius: 1px;
	}

	.ckhealth-toc-toggle-label {
		font-size: 12px;
		font-weight: 600;
		white-space: nowrap;
	}

	/* ---- Küçültülmüş (ikon-only) hal ---- */
	.ckhealth-toc-toggle.is-collapsed {
		flex-direction: column;
		gap: 0;
		width: 18px;
		height: 44px;
		padding: 0;
		background: rgba(32, 164, 174, 0.42);
		opacity: 0.7;
		box-shadow: -1px 2px 6px rgba(32, 164, 174, 0.12);
	}
	.ckhealth-toc-toggle.is-collapsed.is-swapping {
		opacity: 0;
	}
	.ckhealth-toc-toggle.is-collapsed .ckhealth-toc-toggle-icon {
		flex-direction: row;
		gap: 2px;
		margin: 0;
	}
	.ckhealth-toc-toggle.is-collapsed .ckhealth-toc-toggle-icon span {
		width: 2px;
		height: 8px;
	}
	.ckhealth-toc-toggle.is-collapsed .ckhealth-toc-toggle-icon span:nth-child(2) {
		height: 12px;
	}
	.ckhealth-toc-toggle.is-collapsed:active,
	.ckhealth-toc-toggle.is-collapsed:focus-visible {
		opacity: 1;
		background: var(--ck-brand);
		box-shadow: -2px 4px 14px rgba(32, 164, 174, 0.32);
	}
	.ckhealth-toc-toggle.is-collapsed .ckhealth-toc-toggle-label {
		display: none;
	}

	.ckhealth-toc-panel {
		position: fixed;
		top: auto;
		right: 0;
		left: 0;
		bottom: 0;
		transform: translateY(100%);
		width: 100%;
		max-height: 65vh;
		border-radius: 18px 18px 0 0;
		display: flex;
		opacity: 1;
		z-index: 999990;
		transition: transform 0.25s ease;
	}
	.ckhealth-toc.is-open .ckhealth-toc-panel {
		transform: translateY(0);
	}
	.ckhealth-toc-header {
		display: flex;
	}
	#ckhealth-toc-list {
		padding-left: 16px;
	}
}

/* ==========================================================================
   TOC paneli açıkken, sayfanın altındaki sabit iletişim/CTA balonları
   geçici olarak gizlenir; panel kapanınca tekrar görünür.
   ========================================================================== */
@media screen and (max-width: 992px) {
	body.ckhealth-toc-open .floating-buttons,
	body.ckhealth-toc-open .ht-whatsapp-btn,
	body.ckhealth-toc-open .whatsapp-float,
	body.ckhealth-toc-open .wa-widget,
	body.ckhealth-toc-open .chaty-widget,
	body.ckhealth-toc-open #chaty-widget-0 {
		opacity: 0;
		visibility: hidden;
		pointer-events: none;
		transition: opacity 0.2s ease, visibility 0s linear 0.2s;
	}
}
