/* =========================================================================
 * Şablon kütüphanesi + haftalık karne kartı
 * ====================================================================== */

.tma-sab, .tma-sab *, .tma-hafta, .tma-hafta * { box-sizing: border-box; }

.tma-sab {
	--sab-mavi: #2563eb;
	--sab-mor: #7c3aed;
	--sab-text: var(--tma-text, #16181d);
	--sab-muted: var(--tma-text-muted, #6b7280);
	--sab-line: rgba(0, 0, 0, 0.08);
	--sab-surface: var(--tma-surface, #fff);
	max-width: 1040px;
	margin: 0 auto;
	padding: 0 16px 80px;
	color: var(--sab-text);
	-webkit-font-smoothing: antialiased;
}

/* ---------------------------------------------------------------- Sahne */

.tma-sab__sahne {
	position: relative;
	overflow: hidden;
	border-radius: 24px;
	background: linear-gradient(160deg, #11141d 0%, #0b0d13 55%, #0a0c12 100%);
	color: #fff;
	padding: 40px 28px 34px;
	margin: 12px 0 22px;
	box-shadow: 0 22px 50px -28px rgba(11, 13, 19, 0.75);
	text-align: center;
}
.tma-sab__isik {
	position: absolute;
	inset: -45% -20% auto -20%;
	height: 320px;
	background:
		radial-gradient(closest-side, rgba(37, 99, 235, 0.5), transparent 72%) 25% 55% / 60% 100% no-repeat,
		radial-gradient(closest-side, rgba(124, 58, 237, 0.42), transparent 72%) 75% 40% / 58% 100% no-repeat;
	filter: blur(12px);
	opacity: 0.85;
	pointer-events: none;
}
.tma-sab__sahneic { position: relative; }
.tma-sab__etiket {
	display: inline-block;
	font-size: 11.5px;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.78);
	background: rgba(255, 255, 255, 0.08);
	border: 1px solid rgba(255, 255, 255, 0.14);
	border-radius: 999px;
	padding: 5px 12px;
}
.tma-sab__sahneic h1 {
	font-size: clamp(28px, 4.4vw, 38px);
	line-height: 1.1;
	letter-spacing: -0.03em;
	font-weight: 700;
	margin: 14px 0 10px;
	color: #fff;
}
.tma-sab__sahneic p {
	color: rgba(255, 255, 255, 0.66);
	font-size: 15px;
	line-height: 1.6;
	max-width: 560px;
	margin: 0 auto;
}

/* ----------------------------------------------------------- Araç şeridi */

.tma-sab__arac { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.tma-sab__ara {
	flex: 1 1 260px;
	border: 1px solid var(--sab-line);
	border-radius: 12px;
	padding: 12px 15px;
	font: inherit;
	font-size: 15px;
	background: var(--sab-surface);
	color: var(--sab-text);
}
.tma-sab__ara:focus { outline: none; border-color: var(--sab-mavi); box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.13); }
/* ------------------------------------------------------------- Bölümler */

/* Kategori — tıklanınca açılan başlık */
.tma-sab__bolum {
	margin-bottom: 10px;
	border: 1px solid var(--sab-line);
	border-radius: 16px;
	background: var(--sab-surface);
	overflow: hidden;
	transition: box-shadow 0.18s, border-color 0.18s;
}
.tma-sab__bolum[hidden] { display: none; }
.tma-sab__bolum[open] {
	border-color: rgba(37, 99, 235, 0.28);
	box-shadow: 0 10px 30px -22px rgba(0, 0, 0, 0.5);
	margin-bottom: 16px;
}
.tma-sab__bolum > summary {
	display: flex;
	align-items: center;
	gap: 12px;
	cursor: pointer;
	list-style: none;
	padding: 17px 20px;
	font-size: 16px;
	font-weight: 650;
	letter-spacing: -0.01em;
	user-select: none;
	transition: background 0.14s;
}
.tma-sab__bolum > summary::-webkit-details-marker { display: none; }
.tma-sab__bolum > summary:hover { background: rgba(37, 99, 235, 0.035); }
.tma-sab__bolumikon {
	display: grid;
	place-items: center;
	width: 38px;
	height: 38px;
	flex: 0 0 38px;
	border-radius: 11px;
	background: rgba(37, 99, 235, 0.08);
	font-size: 18px;
}
.tma-sab__bolumad { flex: 1; min-width: 0; }
.tma-sab__bolum > summary em {
	font-style: normal;
	font-size: 12px;
	font-weight: 700;
	color: var(--sab-muted);
	background: rgba(0, 0, 0, 0.05);
	border-radius: 99px;
	padding: 3px 10px;
	flex: 0 0 auto;
}
.tma-sab__bolumok {
	flex: 0 0 auto;
	width: 9px;
	height: 9px;
	border-right: 2px solid var(--sab-muted);
	border-bottom: 2px solid var(--sab-muted);
	transform: rotate(45deg) translate(-2px, -2px);
	transition: transform 0.22s ease;
}
.tma-sab__bolum[open] > summary { border-bottom: 1px solid var(--sab-line); }
.tma-sab__bolum[open] .tma-sab__bolumok { transform: rotate(225deg) translate(-2px, -2px); }
.tma-sab__bolum[open] .tma-sab__bolumikon { background: linear-gradient(135deg, var(--sab-mavi), var(--sab-mor)); }
.tma-sab__bolum > .tma-sab__kartlar { padding: 16px 18px 20px; }

.tma-sab__kartlar { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 14px; align-items: start; }

.tma-sab__kart {
	border: 1px solid var(--sab-line);
	border-radius: 18px;
	background: var(--sab-surface);
	padding: 18px 20px 16px;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
	transition: border-color 0.16s, transform 0.16s, box-shadow 0.16s;
}
.tma-sab__kart[hidden] { display: none; }
.tma-sab__kart:hover {
	border-color: rgba(37, 99, 235, 0.4);
	transform: translateY(-1px);
	box-shadow: 0 10px 24px -18px rgba(0, 0, 0, 0.5);
}
.tma-sab__kart h3 { font-size: 15.5px; font-weight: 650; margin: 0 0 5px; letter-spacing: -0.01em; }
.tma-sab__nedir { color: var(--sab-muted); font-size: 13px; line-height: 1.5; margin: 0 0 12px; }
.tma-sab__kart { display: block; }

.tma-sab__kartust { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.tma-sab__olcu {
	flex: 0 0 auto;
	font-size: 11px;
	color: var(--sab-muted);
	background: rgba(0, 0, 0, 0.04);
	border-radius: 99px;
	padding: 3px 9px;
	white-space: nowrap;
}
.tma-sab__olcu b { color: var(--sab-mavi); }


.tma-sab__ayak { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tma-sab__btn {
	background: linear-gradient(135deg, var(--sab-mavi), var(--sab-mor));
	color: #fff;
	border: 0;
	border-radius: 11px;
	padding: 10px 18px;
	font: inherit;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	box-shadow: 0 10px 20px -14px rgba(37, 99, 235, 0.95);
	transition: transform 0.12s, filter 0.15s;
}
.tma-sab__btn:hover { transform: translateY(-1px); filter: brightness(1.05); }
.tma-sab__btn--ok { background: #16a34a; box-shadow: none; }
.tma-sab__mini {
	border: 1px solid var(--sab-line);
	background: transparent;
	color: var(--sab-text);
	border-radius: 10px;
	padding: 9px 14px;
	font: inherit;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.14s;
}
.tma-sab__mini:hover { border-color: var(--sab-mavi); color: var(--sab-mavi); }
.tma-sab__ders {
	flex: 1 0 100%;
	font-size: 12px;
	color: var(--sab-muted);
	text-decoration: none;
	margin-top: 4px;
}
.tma-sab__ders:hover { color: var(--sab-mavi); text-decoration: underline; }

.tma-sab__kurulum { margin-top: 10px; border-top: 1px solid var(--sab-line); padding-top: 10px; }
.tma-sab__kurulum > summary { cursor: pointer; font-size: 12.5px; font-weight: 600; color: var(--sab-mavi); list-style: none; }
.tma-sab__kurulum > summary::-webkit-details-marker { display: none; }
.tma-sab__kurulum > summary::before { content: "▸ "; }
.tma-sab__kurulum[open] > summary::before { content: "▾ "; }
.tma-sab__kurulum div { font-size: 13px; line-height: 1.6; color: var(--sab-muted); }
.tma-sab__kurulum p { margin: 8px 0 0; }

.tma-sab__bos, .tma-sab__bosarama {
	text-align: center;
	padding: 46px 20px;
	border: 1.5px dashed var(--sab-line);
	border-radius: 18px;
	color: var(--sab-muted);
}
.tma-sab__bos strong { display: block; font-size: 16px; color: var(--sab-text); margin-bottom: 5px; }
.tma-sab-kapali { max-width: 560px; margin: 40px auto; text-align: center; padding: 28px; }

@keyframes tma-sab-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

@media (max-width: 760px) {
	.tma-sab { padding: 0 12px 70px; }
	.tma-sab__sahne { padding: 30px 18px 26px; border-radius: 20px; }
	.tma-sab__kartlar { grid-template-columns: 1fr; }
}

/* ==================================================== Haftalık karne kartı */

.tma-hafta {
	position: relative;
	max-width: 900px;
	margin: 0 auto 26px;
	border-radius: 20px;
	padding: 22px 26px 20px;
	color: #fff;
	background: linear-gradient(150deg, #16255c 0%, #101a38 60%, #0b1226 100%);
	box-shadow: 0 20px 44px -30px rgba(16, 26, 56, 0.9);
	overflow: hidden;
	animation: tma-sab-in 0.35s cubic-bezier(0.22, 1, 0.36, 1) both;
	transition: opacity 0.24s ease, transform 0.24s ease, height 0.24s ease, margin 0.24s ease, padding 0.24s ease;
}
.tma-hafta--kapaniyor { opacity: 0; transform: translateY(-8px); height: 0 !important; margin: 0; padding-top: 0; padding-bottom: 0; }
.tma-hafta__kapat {
	position: absolute;
	top: 12px;
	right: 14px;
	width: 28px;
	height: 28px;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.1);
	color: rgba(255, 255, 255, 0.75);
	font-size: 17px;
	line-height: 1;
	cursor: pointer;
	transition: background 0.15s;
}
.tma-hafta__kapat:hover { background: rgba(255, 255, 255, 0.2); color: #fff; }
.tma-hafta__rozet {
	display: inline-block;
	font-size: 10.5px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: #a5b8ff;
	background: rgba(165, 184, 255, 0.13);
	border-radius: 99px;
	padding: 3px 10px;
}
.tma-hafta__bas h2 { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; margin: 9px 0 14px; color: #fff; }
.tma-hafta__liste { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.tma-hafta__satir {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	font-size: 14.5px;
	line-height: 1.55;
	color: rgba(255, 255, 255, 0.86);
}
.tma-hafta__ikon {
	flex: 0 0 22px;
	width: 22px;
	height: 22px;
	display: grid;
	place-items: center;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.1);
	font-size: 12px;
	margin-top: 1px;
}
.tma-hafta__satir--ok .tma-hafta__ikon { background: rgba(34, 197, 94, 0.22); color: #86efac; }
.tma-hafta__satir--devam .tma-hafta__ikon { background: rgba(251, 191, 36, 0.2); color: #fcd34d; }
.tma-hafta__satir--mm .tma-hafta__ikon { background: rgba(165, 184, 255, 0.18); }
.tma-hafta__satir--bos { color: rgba(255, 255, 255, 0.6); }
.tma-hafta__metin { flex: 1; min-width: 0; }
.tma-hafta__link {
	flex: 0 0 auto;
	font-size: 13px;
	font-weight: 650;
	color: #fff;
	text-decoration: none;
	background: rgba(255, 255, 255, 0.12);
	border-radius: 9px;
	padding: 5px 12px;
	white-space: nowrap;
	transition: background 0.15s;
}
.tma-hafta__link:hover { background: rgba(255, 255, 255, 0.22); color: #fff; }

@media (max-width: 640px) {
	.tma-hafta { padding: 18px 18px 16px; border-radius: 16px; }
	.tma-hafta__satir { flex-wrap: wrap; }
	.tma-hafta__link { margin-left: 32px; }
}

/* ------------------------------------------------- Kullanılacak metin */

.tma-sab__metinkutu { position: relative; margin: 0 0 13px; }
.tma-sab__metin {
	white-space: pre-wrap;
	word-break: break-word;
	font: inherit;
	font-size: 14.5px;
	line-height: 1.65;
	background: #f6f8fc;
	border: 1px solid rgba(37, 99, 235, 0.18);
	border-left: 3px solid var(--sab-mavi);
	border-radius: 0 12px 12px 0;
	padding: 15px 17px;
	margin: 0;
	color: var(--sab-text);
}
.tma-sab__metinkutu--kisa .tma-sab__metin {
	max-height: 210px;
	overflow: hidden;
	-webkit-mask-image: linear-gradient(180deg, #000 62%, transparent 100%);
	mask-image: linear-gradient(180deg, #000 62%, transparent 100%);
}
.tma-sab__acbtn {
	position: absolute;
	left: 50%;
	bottom: 8px;
	transform: translateX(-50%);
	border: 1px solid var(--sab-line);
	background: var(--sab-surface);
	color: var(--sab-mavi);
	border-radius: 99px;
	padding: 4px 14px;
	font: inherit;
	font-size: 12px;
	font-weight: 650;
	cursor: pointer;
	box-shadow: 0 4px 12px -6px rgba(0, 0, 0, 0.35);
}
.tma-sab__acbtn:hover { border-color: var(--sab-mavi); }

/* --------------------------------------------------------- Açıklama */

.tma-sab__kurulum { margin-top: 4px; border-top: 1px solid var(--sab-line); padding-top: 11px; }
.tma-sab__kurulum > summary {
	cursor: pointer;
	font-size: 13px;
	font-weight: 600;
	color: var(--sab-mavi);
	list-style: none;
	display: inline-flex;
	align-items: center;
	gap: 5px;
}
.tma-sab__kurulum > summary::-webkit-details-marker { display: none; }
.tma-sab__kurulum > summary::before { content: "▸"; font-size: 11px; }
.tma-sab__kurulum[open] > summary::before { content: "▾"; }
.tma-sab__kurulumic { font-size: 13.5px; line-height: 1.65; color: var(--sab-muted); margin-top: 10px; }
.tma-sab__kurulumic h4 { font-size: 13px; font-weight: 700; color: var(--sab-text); margin: 14px 0 6px; }
.tma-sab__kurulumic h4:first-child { margin-top: 0; }
.tma-sab__kurulumic p { margin: 0 0 9px; }
.tma-sab__kurulumic ul { margin: 0 0 10px; padding-left: 2px; list-style: none; }
.tma-sab__kurulumic li { position: relative; padding-left: 16px; margin-bottom: 5px; }
.tma-sab__kurulumic li::before {
	content: ""; position: absolute; left: 2px; top: 0.62em;
	width: 5px; height: 5px; border-radius: 50%; background: var(--sab-mavi); opacity: 0.5;
}
.tma-sab__kurulumic strong { color: var(--sab-text); }
.tma-sab__kurulumic code { background: rgba(37,99,235,0.08); color: var(--sab-mavi); border-radius: 5px; padding: 1px 5px; font-size: 12.5px; }
.tma-sab__tablo { overflow-x: auto; margin: 0 0 11px; border: 1px solid var(--sab-line); border-radius: 10px; }
.tma-sab__tablo table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.tma-sab__tablo th, .tma-sab__tablo td { padding: 7px 11px; text-align: left; border-bottom: 1px solid rgba(0,0,0,0.05); }
.tma-sab__tablo th { background: rgba(0,0,0,0.025); font-weight: 700; font-size: 11px; text-transform: uppercase; letter-spacing: 0.02em; }
.tma-sab__tablo tr:last-child td { border-bottom: 0; }

@media (max-width: 760px) {
	.tma-sab__metin { font-size: 14px; padding: 13px 15px; }
}
@media print {
	.tma-sab__acbtn, .tma-sab__ayak, .tma-sab__arac { display: none !important; }
	.tma-sab__metinkutu--kisa .tma-sab__metin { max-height: none; mask-image: none; -webkit-mask-image: none; }
	.tma-sab__kurulum { display: block; }
}

/* Arama vurgusu */
.tma-sab__vurgu {
	background: #fde68a;
	color: inherit;
	border-radius: 3px;
	padding: 0 2px;
	box-shadow: 0 0 0 1px rgba(245, 158, 11, 0.4);
	font-weight: 650;
}
.tma-sab__kart h3 .tma-sab__vurgu,
.tma-sab__nedir .tma-sab__vurgu { padding: 1px 3px; }



/* Dersten gelindiğinde açılan kategori kısa süre belirginleşir */
.tma-sab__bolum--geldi { animation: tma-sab-geldi 1.6s ease; }
@keyframes tma-sab-geldi {
	0%, 100% { box-shadow: 0 10px 30px -22px rgba(0, 0, 0, 0.5); }
	30% { box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.25); }
}
