/* --- Dokümantasyon Sayfası Stilleri (Modern & Kompakt) --- */

/* Ana Sayfa Container */
#documentation-page {
    padding: 10px;
    max-width: 900px;
    margin: 0 auto;
}

/* Header */
.documentation-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    margin-bottom: 15px;
    background: linear-gradient(135deg, var(--secondary-color) 0%, rgba(40, 40, 40, 0.9) 100%);
    border-radius: 8px;
    border-left: 3px solid var(--accent-color);
}

.documentation-header h2 {
    margin: 0;
    font-size: 1.1em;
    font-weight: 600;
    color: var(--text-color);
}

.documentation-header .nav-button {
    padding: 6px 10px;
    font-size: 0.85em;
}

/* Bölüm Stilleri (details/summary) */
.doc-section {
    padding: 0;
    margin-bottom: 8px;
    background-color: var(--primary-color);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    overflow: hidden;
}

.doc-section > summary {
    padding: 10px 14px;
    cursor: pointer;
    background: var(--secondary-color);
    border-bottom: 1px solid transparent;
    transition: all 0.2s ease;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.doc-section > summary::-webkit-details-marker {
    display: none;
}

.doc-section > summary::after {
    content: '\f078';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 0.7em;
    color: var(--text-muted-color);
    transition: transform 0.2s ease;
}

.doc-section[open] > summary::after {
    transform: rotate(180deg);
}

.doc-section[open] > summary {
    border-bottom-color: var(--border-color);
}

.doc-section > summary:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* Bölüm Başlıkları */
.doc-section h3,
.doc-section summary h3 {
    margin: 0;
    padding: 0;
    border: none;
    font-size: 0.9em;
    font-weight: 600;
    color: var(--accent-color);
}

/* Bölüm İçeriği */
.doc-section > *:not(summary) {
    padding: 0 14px;
}

.doc-section > p:first-of-type {
    margin-top: 12px;
}

.doc-section > *:last-child {
    padding-bottom: 14px;
}

/* Paragraflar */
.doc-section p {
    font-size: 0.8em;
    line-height: 1.55;
    margin: 8px 0;
    color: var(--text-muted-color);
}

/* Listeler */
.doc-section ul,
.doc-section ol {
    padding-left: 18px;
    margin: 8px 0;
    font-size: 0.8em;
}

.doc-section li {
    margin-bottom: 5px;
    line-height: 1.5;
    color: var(--text-color);
    position: relative;
}

.doc-section ul > li {
    list-style: none;
    padding-left: 14px;
}

.doc-section ul > li::before {
    content: '›';
    position: absolute;
    left: 0;
    color: var(--accent-color);
    font-weight: bold;
    font-size: 1.1em;
    line-height: 1.4;
}

.doc-section ol {
    list-style-position: outside;
}

.doc-section ol > li {
    padding-left: 4px;
}

/* İç içe listeler */
.doc-section li ul,
.doc-section li ol {
    margin-top: 4px;
    margin-bottom: 4px;
    font-size: 0.95em;
}

/* Strong ve Em */
.doc-section strong {
    color: var(--text-color);
    font-weight: 600;
}

.doc-section em {
    color: var(--text-muted-color);
    font-style: italic;
    font-size: 0.9em;
}

/* Inline Code */
.doc-section code {
    background: rgba(0, 0, 0, 0.3);
    padding: 1px 5px;
    border-radius: 3px;
    font-size: 0.85em;
    font-family: 'Consolas', 'Monaco', monospace;
    color: #e0e0e0;
}

/* Code Blocks */
.doc-section pre {
    background: rgba(0, 0, 0, 0.4);
    padding: 10px 12px;
    border-radius: 4px;
    overflow-x: auto;
    margin: 10px 0;
    font-size: 0.75em;
    line-height: 1.4;
    border-left: 2px solid var(--accent-color);
}

.doc-section pre code {
    background: none;
    padding: 0;
    font-size: inherit;
}

/* İçindekiler Bölümü (section, details değil) */
#doc-toc-section {
    padding: 12px 14px;
}

#doc-toc-section h3 {
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--border-color);
}

#doc-toc-section ul {
    margin: 0;
    columns: 2;
    column-gap: 20px;
}

#doc-toc-section > ul > li {
    break-inside: avoid;
    margin-bottom: 6px;
}

#doc-toc-section li ul {
    margin-left: 10px;
    margin-top: 3px;
    columns: 1;
}

#doc-toc-section a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.2s;
    font-size: 0.85em;
}

#doc-toc-section a:hover {
    color: var(--accent-color);
}

/* SSS (FAQ) Stilleri */
.faq-item {
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.faq-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.faq-item h4 {
    font-size: 0.85em;
    font-weight: 600;
    color: var(--text-color);
    margin: 0 0 6px 0;
}

.faq-item p {
    margin: 0;
}

/* Tablolar */
.doc-section table {
    width: 100%;
    border-collapse: collapse;
    margin: 10px 0;
    font-size: 0.75em;
}

.doc-section th,
.doc-section td {
    padding: 6px 8px;
    text-align: left;
    border: 1px solid var(--border-color);
}

.doc-section th {
    background: var(--secondary-color);
    font-weight: 600;
    color: var(--text-color);
}

.doc-section td {
    color: var(--text-muted-color);
}

/* HR */
.doc-section hr {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 15px 0;
}

/* Alt Başlıklar (h4, h5) */
.doc-section h4 {
    font-size: 0.85em;
    font-weight: 600;
    color: var(--text-color);
    margin: 12px 0 8px 0;
    padding-left: 0;
}

.doc-section section h4 {
    margin-top: 15px;
    padding-bottom: 4px;
    border-bottom: 1px dashed var(--border-color);
}

/* Özellikler ve Changelog Listesi */
#features-section > ul,
#changelog-section > ul {
    padding-left: 0;
}

#features-section > ul > li,
#changelog-section > ul > li {
    padding: 8px 0;
    padding-left: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

#features-section > ul > li::before,
#changelog-section > ul > li::before {
    display: none;
}

#features-section > ul > li:last-child,
#changelog-section > ul > li:last-child {
    border-bottom: none;
}

#features-section li ul,
#changelog-section li ul {
    margin-top: 6px;
    padding-left: 15px;
}

/* Sözlük Stilleri Override */
#glossary-section dl {
    max-height: 350px;
    padding-right: 8px;
}

#glossary-section dt {
    font-size: 0.9em;
    margin-top: 12px;
    padding-bottom: 3px;
}

#glossary-section dd {
    font-size: 0.78em;
    margin-left: 18px;
    margin-bottom: 10px;
    line-height: 1.5;
}

/* Gizlilik Politikası ve KVKK Bölümleri */
#privacy-policy-terms-section section,
#kvkk-section section {
    padding: 10px 0;
}

#privacy-policy-terms-section section:first-of-type,
#kvkk-section section:first-of-type {
    padding-top: 5px;
}

/* Linkler */
.doc-section a:not(.nav-button) {
    color: var(--accent-color);
    text-decoration: none;
}

.doc-section a:not(.nav-button):hover {
    text-decoration: underline;
}

/* === MOBİL UYUMLULUK === */

@media (max-width: 768px) {
    #documentation-page {
        padding: 8px;
    }

    .documentation-header {
        padding: 8px 12px;
        margin-bottom: 12px;
    }

    .documentation-header h2 {
        font-size: 1em;
    }

    .doc-section {
        margin-bottom: 6px;
    }

    .doc-section > summary {
        padding: 8px 12px;
    }

    .doc-section h3,
    .doc-section summary h3 {
        font-size: 0.85em;
    }

    .doc-section > *:not(summary) {
        padding: 0 12px;
    }

    .doc-section p,
    .doc-section ul,
    .doc-section ol {
        font-size: 0.78em;
    }

    /* İçindekiler tek sütun */
    #doc-toc-section ul {
        columns: 1;
    }

    #doc-toc-section a {
        font-size: 0.8em;
    }

    /* Tablolar */
    .doc-section table {
        font-size: 0.7em;
    }

    .doc-section th,
    .doc-section td {
        padding: 4px 6px;
    }

    /* Code */
    .doc-section pre {
        font-size: 0.7em;
        padding: 8px 10px;
    }

    /* Sözlük */
    #glossary-section dl {
        max-height: 280px;
    }

    #glossary-section dt {
        font-size: 0.85em;
    }

    #glossary-section dd {
        font-size: 0.75em;
        margin-left: 14px;
    }
}

@media (max-width: 480px) {
    #documentation-page {
        padding: 5px;
    }

    .documentation-header {
        padding: 6px 10px;
        margin-bottom: 10px;
    }

    .documentation-header h2 {
        font-size: 0.9em;
    }

    .doc-section > summary {
        padding: 7px 10px;
    }

    .doc-section h3,
    .doc-section summary h3 {
        font-size: 0.8em;
    }

    .doc-section > *:not(summary) {
        padding: 0 10px;
    }

    .doc-section p,
    .doc-section ul,
    .doc-section ol {
        font-size: 0.75em;
    }

    .faq-item h4 {
        font-size: 0.8em;
    }

    /* Code */
    .doc-section code {
        font-size: 0.8em;
        padding: 1px 3px;
    }

    .doc-section pre {
        font-size: 0.65em;
        padding: 6px 8px;
    }

    /* Sözlük */
    #glossary-section dl {
        max-height: 250px;
    }

    #glossary-section dt {
        font-size: 0.8em;
        margin-top: 10px;
    }

    #glossary-section dd {
        font-size: 0.7em;
        margin-left: 12px;
    }
}
