/* ============================================
   CKEditor 4 İçerik Stilleri - Tam Uyumluluk
   ============================================ */

/* Temel Tipografi */
.prose {
    color: #334155;
    line-height: 1.75;
    font-size: 1rem;
    max-width: none;
}

.prose-lg {
    font-size: 1.125rem;
    line-height: 1.875;
}

.prose-xl {
    font-size: 1.25rem;
    line-height: 2;
}

/* Başlıklar */
.prose h1,
.prose h2,
.prose h3,
.prose h4,
.prose h5,
.prose h6 {
    color: var(--color-text-heading, #0f172a);
    font-weight: 700;
    line-height: 1.3;
    margin-top: 2em;
    margin-bottom: 0.75em;
}

.prose h1 {
    font-size: 2.25rem;
    margin-top: 0;
}

.prose h2 {
    font-size: 1.875rem;
    position: relative;
    padding-left: 0.875rem;
    border-bottom: none !important;
    padding-bottom: 0;
}

.prose h2::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(to bottom, var(--color-primary, #0ea5e9), transparent);
    border-radius: 2px;
}

.prose h3 {
    font-size: 1.5rem;
    position: relative;
    padding-left: 0.75rem;
}

.prose h3::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--color-primary, #0ea5e9), transparent);
    border-radius: 2px;
}

.prose h4 {
    font-size: 1.25rem;
}

.prose h5 {
    font-size: 1.125rem;
}

.prose h6 {
    font-size: 1rem;
    font-weight: 600;
}

/* Paragraflar */
.prose p {
    margin-top: 0;
    margin-bottom: 1.25em;
}

.prose p:last-child {
    margin-bottom: 0;
}

/* Linkler */
.prose a {
    color: var(--color-primary, #0ea5e9);
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px solid transparent;
    transition: all 0.2s ease;
}

.prose a:hover {
    color: var(--color-button-primary, #0284c7);
    border-bottom-color: currentColor;
}

/* Kalın ve İtalik */
.prose strong,
.prose b {
    font-weight: 700;
    color: #1e293b;
}

.prose em,
.prose i {
    font-style: italic;
}

/* Listeler */
.prose ul,
.prose ol {
    margin-top: 1.25em;
    margin-bottom: 1.25em;
    padding-left: 1.75rem;
}

.prose ul {
    list-style-type: disc;
}

.prose ol {
    list-style-type: decimal;
}

.prose li {
    margin-top: 0.5em;
    margin-bottom: 0.5em;
    padding-left: 0.375rem;
}

.prose li::marker {
    color: var(--color-primary, #0ea5e9);
    font-weight: 600;
}

.prose ul ul,
.prose ul ol,
.prose ol ul,
.prose ol ol {
    margin-top: 0.75em;
    margin-bottom: 0.75em;
}

.prose ul ul {
    list-style-type: circle;
}

.prose ul ul ul {
    list-style-type: square;
}

/* Alıntılar (Blockquote) */
.prose blockquote {
    font-style: italic;
    border-left: 4px solid var(--color-primary, #0ea5e9);
    padding-left: 1.5rem;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    margin: 1.5em 0;
    background: #f8fafc;
    color: #475569;
    quotes: """ """ "'" "'";
}

.prose blockquote p {
    margin: 0.5em 0;
}

.prose blockquote p:first-child::before {
    content: open-quote;
    font-size: 1.5em;
    color: var(--color-primary, #0ea5e9);
    margin-right: 0.25rem;
}

.prose blockquote p:last-child::after {
    content: close-quote;
    font-size: 1.5em;
    color: var(--color-primary, #0ea5e9);
    margin-left: 0.25rem;
}

.prose blockquote cite {
    display: block;
    margin-top: 0.75em;
    font-size: 0.875rem;
    color: #64748b;
    font-style: normal;
}

.prose blockquote cite::before {
    content: "— ";
}

/* Kod Blokları */
.prose code {
    background: #f1f5f9;
    color: #e11d48;
    padding: 0.2em 0.4em;
    border-radius: 0.25rem;
    font-size: 0.875em;
    font-family: 'Courier New', Courier, monospace;
    font-weight: 600;
}

.prose pre {
    background: #1e293b;
    color: #e2e8f0;
    padding: 1.25rem;
    border-radius: 0.5rem;
    overflow-x: auto;
    margin: 1.5em 0;
    line-height: 1.7;
}

.prose pre code {
    background: transparent;
    color: inherit;
    padding: 0;
    font-size: 0.875rem;
    font-weight: 400;
}

/* Tablolar */
.prose table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5em 0;
    font-size: 0.875rem;
}

.prose table thead {
    background: var(--color-primary, #0ea5e9);
    color: white;
}

.prose table thead th {
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.prose table tbody tr {
    border-bottom: 1px solid #e2e8f0;
}

.prose table tbody tr:nth-child(even) {
    background: #f8fafc;
}

.prose table tbody tr:hover {
    background: #f1f5f9;
}

.prose table tbody td {
    padding: 0.75rem 1rem;
    border: 1px solid #e2e8f0;
}

.prose table tbody td:first-child {
    font-weight: 500;
}

/* Yatay Çizgi */
.prose hr {
    border: none;
    border-top: 2px solid #e2e8f0;
    margin: 2.5em 0;
}

/* Görseller */
.prose img {
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius-base, 0.5rem);
    margin: 1.5em 0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.prose figure {
    margin: 1.5em 0;
}

.prose figure img {
    margin: 0;
}

.prose figcaption {
    text-align: center;
    font-size: 0.875rem;
    color: #64748b;
    margin-top: 0.75rem;
    font-style: italic;
}

/* Hizalama Sınıfları (CKEditor Align Plugin) */
.prose .image-style-align-left,
.prose img[style*="float: left"],
.prose img[style*="float:left"] {
    float: left;
    margin-right: 1.5rem;
    margin-bottom: 1rem;
    max-width: 50%;
}

.prose .image-style-align-right,
.prose img[style*="float: right"],
.prose img[style*="float:right"] {
    float: right;
    margin-left: 1.5rem;
    margin-bottom: 1rem;
    max-width: 50%;
}

.prose .image-style-align-center,
.prose img[style*="display: block"][style*="margin-left: auto"] {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

/* Metin Hizalama */
.prose [style*="text-align: left"],
.prose .text-left {
    text-align: left;
}

.prose [style*="text-align: center"],
.prose .text-center {
    text-align: center;
}

.prose [style*="text-align: right"],
.prose .text-right {
    text-align: right;
}

.prose [style*="text-align: justify"],
.prose .text-justify {
    text-align: justify;
}

/* Renkli Metinler */
.prose [style*="color:"],
.prose [style*="color :"] {
    /* CKEditor'den gelen inline renkler korunur */
}

.prose [style*="background-color:"],
.prose [style*="background-color :"] {
    padding: 0.125rem 0.25rem;
    border-radius: 0.25rem;
}

/* Girinti */
.prose [style*="margin-left:"],
.prose [style*="margin-left :"],
.prose .indent {
    margin-left: 2.5rem;
}

/* Alt ve Üst Simge */
.prose sub {
    font-size: 0.75em;
    vertical-align: sub;
}

.prose sup {
    font-size: 0.75em;
    vertical-align: super;
}

/* Tanım Listeleri */
.prose dl {
    margin: 1.5em 0;
}

.prose dt {
    font-weight: 700;
    color: #1e293b;
    margin-top: 1em;
}

.prose dd {
    margin-left: 1.5rem;
    margin-top: 0.5em;
    color: #475569;
}

/* Adres */
.prose address {
    font-style: normal;
    line-height: 1.75;
    margin: 1.5em 0;
}

/* Kısaltmalar */
.prose abbr[title] {
    text-decoration: underline dotted;
    cursor: help;
}

/* İşaretli Metin (Mark) */
.prose mark {
    background-color: #fef08a;
    color: #854d0e;
    padding: 0.125rem 0.25rem;
    border-radius: 0.25rem;
}

/* Silinmiş ve Eklenmiş Metin */
.prose del,
.prose s {
    text-decoration: line-through;
    color: #94a3b8;
}

.prose ins {
    text-decoration: underline;
    color: #059669;
}

/* Klavye Tuşları */
.prose kbd {
    background: #1e293b;
    color: #e2e8f0;
    padding: 0.125rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.875em;
    font-family: 'Courier New', Courier, monospace;
    border: 1px solid #475569;
    box-shadow: 0 2px 0 #475569;
}

/* Örnek Çıktı */
.prose samp {
    background: #f1f5f9;
    color: #1e293b;
    padding: 0.125rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.875em;
    font-family: 'Courier New', Courier, monospace;
}

/* Değişken */
.prose var {
    font-style: italic;
    color: #7c3aed;
    font-weight: 500;
}

/* Küçük Metin */
.prose small {
    font-size: 0.875em;
    color: #64748b;
}

/* CKEditor Widget Stilleri */
.prose .cke_widget_wrapper {
    margin: 1em 0;
}

/* Video ve iframe */
.prose iframe,
.prose video {
    max-width: 100%;
    border-radius: var(--border-radius-base, 0.5rem);
    margin: 1.5em 0;
}

/* Responsive Video Container */
.prose .video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    overflow: hidden;
    margin: 1.5em 0;
}

.prose .video-container iframe,
.prose .video-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    margin: 0;
}

/* Temizleme */
.prose::after {
    content: "";
    display: table;
    clear: both;
}

/* Mobil Responsive */
@media (max-width: 640px) {
    .prose {
        font-size: 0.9375rem;
    }
    
    .prose h1 {
        font-size: 1.875rem;
    }
    
    .prose h2 {
        font-size: 1.5rem;
    }
    
    .prose h3 {
        font-size: 1.25rem;
    }
    
    .prose .image-style-align-left,
    .prose .image-style-align-right,
    .prose img[style*="float"] {
        float: none;
        max-width: 100%;
        margin: 1em 0;
    }
    
    .prose table {
        font-size: 0.75rem;
    }
    
    .prose table thead th,
    .prose table tbody td {
        padding: 0.5rem;
    }
}

/* Print Stilleri */
@media print {
    .prose {
        color: #000;
    }
    
    .prose a {
        color: #000;
        text-decoration: underline;
    }
    
    .prose blockquote {
        border-left-color: #000;
        background: transparent;
    }
}
/* ============================================
   Kart Başlık ve Özet Sınırlamaları
   ============================================ */

/* Başlık - 2 satır sınırı */
.card-title-text {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
}

/* Özet - 3 satır sınırı */
.card-summary {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.5;
}


/* ============================================
   DARK MODE STİLLERİ
   ============================================ */
html.dark-mode .prose {
    color: #cbd5e1;
}

html.dark-mode .prose h1,
html.dark-mode .prose h2,
html.dark-mode .prose h3,
html.dark-mode .prose h4,
html.dark-mode .prose h5,
html.dark-mode .prose h6 {
    color: #f1f5f9 !important;
}

html.dark-mode .prose strong,
html.dark-mode .prose b {
    color: #f1f5f9 !important;
}

html.dark-mode .prose p,
html.dark-mode .prose li,
html.dark-mode .prose span {
    color: #cbd5e1;
}

html.dark-mode .prose blockquote {
    background: #1e293b;
    color: #94a3b8;
    border-left-color: var(--color-primary);
}

html.dark-mode .prose code {
    background: #334155;
    color: #f472b6;
}

html.dark-mode .prose table tbody tr:nth-child(even) {
    background: #1e293b;
}

html.dark-mode .prose table tbody tr:hover {
    background: #334155;
}

html.dark-mode .prose table tbody td {
    border-color: #334155;
}

html.dark-mode .prose hr {
    border-top-color: #334155;
}

html.dark-mode .prose dt {
    color: #f1f5f9;
}

html.dark-mode .prose dd {
    color: #94a3b8;
}

html.dark-mode .prose figcaption {
    color: #94a3b8;
}

html.dark-mode .prose mark {
    background-color: #854d0e;
    color: #fef08a;
}

html.dark-mode .prose small {
    color: #94a3b8;
}
