/* KKTC Table of Contents — Elementor Widget */
.kktc-toc {
    background: #f8f9fa;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 18px 22px;
    font-size: 15px;
    line-height: 1.6;
    box-sizing: border-box;
}

.kktc-toc *,
.kktc-toc *::before,
.kktc-toc *::after {
    box-sizing: border-box;
}

.kktc-toc__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.kktc-toc__title {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #111827;
    line-height: 1.3;
}

.kktc-toc__toggle {
    background: none;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    width: 30px;
    height: 30px;
    cursor: pointer;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.kktc-toc__toggle:hover {
    background: #fff;
    border-color: #9ca3af;
}

.kktc-toc__toggle-icon {
    width: 10px;
    height: 10px;
    border-right: 2px solid #374151;
    border-bottom: 2px solid #374151;
    transform: rotate(45deg);
    transition: transform 0.2s ease;
    margin-top: -3px;
}

.kktc-toc--collapsed .kktc-toc__toggle-icon {
    transform: rotate(-45deg);
    margin-top: 3px;
}

.kktc-toc--collapsed .kktc-toc__body {
    display: none;
}

.kktc-toc__body {
    margin-top: 6px;
}

.kktc-toc__placeholder {
    color: #9ca3af;
    font-size: 14px;
    font-style: italic;
}

.kktc-toc__list {
    list-style: none;
    margin: 0;
    padding: 0 0 0 4px;
}

.kktc-toc__list .kktc-toc__list {
    padding-left: 18px;
    margin-top: 4px;
}

.kktc-toc__item {
    margin: 4px 0;
    padding: 0;
}

.kktc-toc__link {
    color: #1f6feb;
    text-decoration: none;
    border-bottom: 1px dotted transparent;
    transition: color 0.15s ease, border-color 0.15s ease;
}

.kktc-toc__link:hover,
.kktc-toc__link:focus {
    color: #0a4ec9;
    border-bottom-color: currentColor;
}

.kktc-toc__link.is-active {
    font-weight: 600;
    color: #0a4ec9;
}

/* Numaralandırma */
.kktc-toc--numbered .kktc-toc__list {
    counter-reset: kktc-toc-counter;
}
.kktc-toc--numbered .kktc-toc__item::before {
    counter-increment: kktc-toc-counter;
    content: counters(kktc-toc-counter, ".") ". ";
    color: #6b7280;
    font-weight: 500;
    margin-right: 4px;
}
.kktc-toc--numbered .kktc-toc__list .kktc-toc__list {
    counter-reset: kktc-toc-counter;
}

/* Sticky (sadece masaüstü) */
@media (min-width: 1024px) {
    .kktc-toc--sticky {
        position: sticky;
        top: 80px;
        max-height: calc(100vh - 100px);
        overflow-y: auto;
    }
}

/* Mobil */
@media (max-width: 600px) {
    .kktc-toc {
        padding: 14px 16px;
        font-size: 14px;
    }
    .kktc-toc__title {
        font-size: 16px;
    }
}

/* Erişilebilirlik */
.kktc-toc .screen-reader-text {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}
