/* ========================================
   TEXT CONTENT WRAPPER
   ======================================== */

.text-content {
    font-family: var(--font-primary);
    font-size: var(--text-base);
    font-weight: var(--font-normal);
    color: var(--color-gray-700);
    line-height: var(--leading-relaxed);
}

/* ========================================
   HEADINGS
   ======================================== */

.text-content h1 {
    font-family: var(--font-primary);
    font-size: var(--text-3xl);
    font-weight: var(--font-semibold);
    color: var(--color-secondary);
    line-height: 1.3;
    margin-top: 0;
    margin-bottom: var(--space-4);
}

.text-content h2 {
    font-family: var(--font-primary);
    font-size: var(--text-2xl);
    font-weight: var(--font-semibold);
    color: var(--color-secondary);
    line-height: 1.3;
    margin-top: var(--space-8);
    margin-bottom: var(--space-3);
}

.text-content h3 {
    font-family: var(--font-primary);
    font-size: var(--text-xl);
    font-weight: var(--font-semibold);
    color: var(--color-secondary);
    line-height: 1.35;
    margin-top: var(--space-6);
    margin-bottom: var(--space-2);
}

.text-content h4 {
    font-family: var(--font-primary);
    font-size: var(--text-lg);
    font-weight: var(--font-semibold);
    color: var(--color-secondary);
    line-height: 1.4;
    margin-top: var(--space-5);
    margin-bottom: var(--space-2);
}

.text-content h5 {
    font-family: var(--font-primary);
    font-size: var(--text-base);
    font-weight: var(--font-semibold);
    color: var(--color-secondary);
    line-height: 1.4;
    margin-top: var(--space-4);
    margin-bottom: var(--space-2);
}

.text-content h6 {
    font-family: var(--font-primary);
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    color: var(--color-secondary);
    line-height: 1.4;
    margin-top: var(--space-4);
    margin-bottom: var(--space-1);
}

/* İlk heading için üst margin kaldır */
.text-content>h1:first-child,
.text-content>h2:first-child,
.text-content>h3:first-child,
.text-content>h4:first-child,
.text-content>h5:first-child,
.text-content>h6:first-child {
    margin-top: 0;
}

/* ========================================
   PARAGRAPHS
   ======================================== */

.text-content p {
    margin-top: 0;
    margin-bottom: var(--space-4);
    color: var(--color-gray-700);
}

.text-content p:last-child {
    margin-bottom: 0;
}

/* Lead paragraph */
.text-content p.lead {
    font-size: var(--text-lg);
    font-weight: var(--font-normal);
    color: var(--color-gray-600);
    line-height: var(--leading-relaxed);
}

/* Small text */
.text-content small,
.text-content .small {
    font-size: var(--text-sm);
    color: var(--color-gray-500);
}

/* ========================================
   LINKS
   ======================================== */

.text-content a {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: var(--font-medium);
    transition: color var(--transition-fast);
}

.text-content a:hover {
    color: var(--color-primary-dark);
    text-decoration: underline;
}

/* ========================================
   LISTS - UNORDERED
   ======================================== */

.text-content ul {
    margin-top: 0;
    margin-bottom: var(--space-4);
    padding-left: var(--space-6);
    list-style: none;
}

.text-content ul li {
    position: relative;
    margin-bottom: var(--space-2);
    padding-left: var(--space-4);
    color: var(--color-gray-700);
}

.text-content ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.6em;
    width: 6px;
    height: 6px;
    background: var(--color-primary);
    border-radius: var(--radius-full);
}

.text-content ul li:last-child {
    margin-bottom: 0;
}

/* Nested ul */
.text-content ul ul {
    margin-top: var(--space-2);
    margin-bottom: 0;
}

.text-content ul ul li::before {
    background: transparent;
    border: 1px solid var(--color-primary);
}

/* ========================================
   LISTS - ORDERED
   ======================================== */

.text-content ol {
    margin-top: 0;
    margin-bottom: var(--space-4);
    padding-left: var(--space-6);
    list-style: none;
    counter-reset: list-counter;
}

.text-content ol li {
    position: relative;
    margin-bottom: var(--space-2);
    padding-left: var(--space-6);
    color: var(--color-gray-700);
    counter-increment: list-counter;
}

.text-content ol li::before {
    content: counter(list-counter) ".";
    position: absolute;
    left: 0;
    top: 0;
    font-weight: var(--font-semibold);
    color: var(--color-primary);
}

.text-content ol li:last-child {
    margin-bottom: 0;
}

/* Nested ol */
.text-content ol ol {
    margin-top: var(--space-2);
    margin-bottom: 0;
}

/* ========================================
   BLOCKQUOTE
   ======================================== */

.text-content blockquote {
    position: relative;
    margin: var(--space-5) 0;
    padding: var(--space-5) var(--space-6);
    background: var(--color-gray-50);
    border-left: 4px solid var(--color-primary);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.text-content blockquote p {
    font-size: var(--text-base);
    font-style: italic;
    color: var(--color-gray-600);
    margin-bottom: 0;
}

.text-content blockquote cite {
    display: block;
    margin-top: var(--space-2);
    font-size: var(--text-sm);
    font-style: normal;
    font-weight: var(--font-medium);
    color: var(--color-gray-500);
}

.text-content blockquote cite::before {
    content: '— ';
}

/* ========================================
   HORIZONTAL RULE
   ======================================== */

.text-content hr {
    border: none;
    height: 1px;
    background: var(--color-gray-200);
    margin: var(--space-6) 0;
}

.text-content hr.thick {
    height: 2px;
}

.text-content hr.primary {
    background: var(--color-primary);
}

/* ========================================
   STRONG & EMPHASIS
   ======================================== */

.text-content strong,
.text-content b {
    font-weight: var(--font-semibold);
    color: var(--color-secondary);
}

.text-content em,
.text-content i {
    font-style: italic;
}

.text-content mark {
    background: rgba(var(--color-primary-rgb), 0.2);
    padding: 0.1em 0.3em;
    border-radius: var(--radius-sm);
}

/* ========================================
   CODE & PRE
   ======================================== */

.text-content code {
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9em;
    background: var(--color-gray-100);
    padding: 0.2em 0.4em;
    border-radius: var(--radius-sm);
    color: var(--color-secondary);
}

.text-content pre {
    margin: var(--space-5) 0;
    padding: var(--space-4);
    background: var(--color-gray-900);
    border-radius: var(--radius-md);
    overflow-x: auto;
}

.text-content pre code {
    background: transparent;
    padding: 0;
    color: var(--color-gray-100);
    font-size: var(--text-sm);
    line-height: var(--leading-relaxed);
}

/* ========================================
   TABLES
   ======================================== */

.text-content table {
    width: 100%;
    margin: var(--space-5) 0;
    border-collapse: collapse;
    font-size: var(--text-sm);
}

.text-content table th,
.text-content table td {
    padding: var(--space-3) var(--space-4);
    text-align: left;
    border-bottom: 1px solid var(--color-gray-200);
}

.text-content table th {
    font-weight: var(--font-semibold);
    color: var(--color-secondary);
    background: var(--color-gray-50);
}

.text-content table tr:hover td {
    background: var(--color-gray-50);
}

/* ========================================
   IMAGES
   ======================================== */

.text-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    margin: var(--space-5) 0;
}

.text-content figure {
    margin: var(--space-5) 0;
}

.text-content figure img {
    margin: 0;
}

.text-content figcaption {
    margin-top: var(--space-2);
    font-size: var(--text-sm);
    color: var(--color-gray-500);
    text-align: center;
}

/* ========================================
   DEFINITION LIST
   ======================================== */

.text-content dl {
    margin: var(--space-5) 0;
}

.text-content dt {
    font-weight: var(--font-semibold);
    color: var(--color-secondary);
    margin-bottom: var(--space-1);
}

.text-content dd {
    margin-left: var(--space-6);
    margin-bottom: var(--space-3);
    color: var(--color-gray-700);
}

/* ========================================
   ABBREVIATION
   ======================================== */

.text-content abbr[title] {
    text-decoration: underline dotted;
    cursor: help;
}

/* ========================================
   SUBSCRIPT & SUPERSCRIPT
   ======================================== */

.text-content sub,
.text-content sup {
    font-size: 0.75em;
    line-height: 0;
    position: relative;
    vertical-align: baseline;
}

.text-content sup {
    top: -0.5em;
}

.text-content sub {
    bottom: -0.25em;
}

/* ========================================
   ADDRESS
   ======================================== */

.text-content address {
    font-style: normal;
    margin: var(--space-4) 0;
    padding: var(--space-4);
    background: var(--color-gray-50);
    border-radius: var(--radius-md);
}

/* ========================================
   KEYBOARD INPUT
   ======================================== */

.text-content kbd {
    display: inline-block;
    padding: 0.2em 0.5em;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.85em;
    background: var(--color-gray-100);
    border: 1px solid var(--color-gray-300);
    border-radius: var(--radius-sm);
    box-shadow: 0 1px 0 var(--color-gray-300);
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 768px) {
    .text-content h1 {
        font-size: var(--text-2xl);
        margin-bottom: var(--space-3);
    }

    .text-content h2 {
        font-size: var(--text-xl);
        margin-top: var(--space-6);
        margin-bottom: var(--space-2);
    }

    .text-content h3 {
        font-size: var(--text-lg);
        margin-top: var(--space-5);
    }

    .text-content h4 {
        font-size: var(--text-base);
        margin-top: var(--space-4);
    }

    .text-content blockquote {
        padding: var(--space-4) var(--space-5);
    }

    .text-content blockquote p {
        font-size: var(--text-sm);
    }

    .text-content table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}

@media (max-width: 480px) {
    .text-content h1 {
        font-size: var(--text-xl);
    }

    .text-content h2 {
        font-size: var(--text-lg);
    }

    .text-content h3 {
        font-size: var(--text-base);
    }

    .text-content h4 {
        font-size: var(--text-sm);
    }

    .text-content ul,
    .text-content ol {
        padding-left: var(--space-4);
    }

    .text-content blockquote {
        padding: var(--space-3) var(--space-4);
    }
}