/* ==========================================================================
   ULTRA-PREMIUM CONTENT SYSTEM v1.3.2
   Modern Hukuk Vizyonu İçin Tasarlanmış İçerik Bileşenleri
   ========================================================================== */

/* 1. Temel Tipografi ve Alan Yönetimi */
.entry-content {
    font-size: 1.125rem;
    line-height: 1.9;
    color: var(--color-text);
    overflow-wrap: break-word !important;
    word-wrap: break-word !important;
    max-width: 100% !important;
}

.entry-content p {
    margin-bottom: 2rem;
    letter-spacing: -0.011em;
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
}

/* Drop Cap: İlk Harf Estetiği */
.entry-content>p:first-of-type::first-letter,
.entry-content>.wp-block-paragraph:first-of-type::first-letter {
    font-family: var(--font-heading);
    float: left;
    font-size: 4.5rem;
    line-height: 0.7;
    margin: 0.1em 0.12em 0.05em 0;
    color: var(--color-accent);
    font-weight: 800;
    text-shadow: 2px 2px 0px rgba(var(--color-accent-rgb), 0.1);
}

/* 2. Başlıklar: Kurumsal ve Belirgin */
.entry-content h2,
.entry-content h3,
.entry-content .wp-block-heading {
    margin: 3.5rem 0 1.5rem;
    color: var(--color-primary);
    font-family: var(--font-heading);
    position: relative;
    font-weight: 700;
    line-height: 1.3;
}

[data-theme="dark"] .entry-content h2,
[data-theme="dark"] .entry-content h3 {
    color: var(--color-text);
}

.entry-content h2::after {
    content: "";
    display: block;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--color-accent) 0%, transparent 100%);
    margin-top: 15px;
    border-radius: 4px;
}

.entry-content h3::after {
    content: "";
    display: block;
    width: 35px;
    height: 3px;
    background: linear-gradient(90deg, var(--color-accent) 0%, transparent 100%);
    margin-top: 10px;
    border-radius: 4px;
    opacity: 0.7;
}

/* 3. Blockquotes: Modern Hukuki Alıntılar (v1.4.0 Ultra-Premium - v1.9.1 Optimize) */
.entry-content blockquote,
.entry-content .wp-block-quote {
    margin: 3rem 0 !important;
    padding: 2.5rem !important;
    background: linear-gradient(135deg, rgba(var(--color-accent-rgb), 0.08) 0%, rgba(var(--color-accent-rgb), 0.02) 100%) !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-left: 6px solid var(--color-accent) !important;
    position: relative !important;
    border-radius: 0 20px 20px 0 !important;
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.03) !important;
}

.entry-content blockquote::before {
    content: "\201C";
    position: absolute;
    top: -10px;
    left: 20px;
    font-size: 4rem;
    color: var(--color-accent);
    opacity: 0.15;
    font-family: "Playfair Display", serif;
    line-height: 1;
}

.entry-content blockquote p,
.entry-content .wp-block-quote p {
    font-family: var(--font-heading) !important;
    font-style: italic !important;
    font-size: 1.15rem !important;
    line-height: 1.7 !important;
    color: var(--color-primary) !important;
    margin: 0 !important;
    font-weight: 500 !important;
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

[data-theme="dark"] .entry-content blockquote p {
    color: var(--color-text) !important;
}

.entry-content blockquote cite,
.entry-content .wp-block-quote cite {
    display: block !important;
    margin-top: 1.5rem !important;
    font-size: 1rem !important;
    color: var(--color-text-muted) !important;
    font-style: normal !important;
    font-weight: 600 !important;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    opacity: 1 !important;
    visibility: visible !important;
}

/* 4. Tablolar: Kurumsal ve Mobil-Friendly (v1.3.2 KESİN/SADE ÇÖZÜM) */

.entry-content .wp-block-table,
.entry-content figure.wp-block-table {
    margin: 3.5rem 0 !important;
    position: relative !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    touch-action: pan-x pan-y !important;
    width: 100% !important;
    display: block !important;
    border-radius: 12px;
}

/* Scroll Fade Effect: Daha fazla içerik olduğunu hissettirir */
.entry-content .wp-block-table::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 30px;
    background: linear-gradient(to right, transparent, rgba(var(--color-surface-rgb), 0.8));
    pointer-events: none;
    z-index: 5;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.entry-content .wp-block-table.has-scroll::after {
    opacity: 1;
}

/* Özel Premium Kaydırma Çubuğu */
.entry-content .wp-block-table::-webkit-scrollbar {
    height: 6px;
}

.entry-content .wp-block-table::-webkit-scrollbar-track {
    background: rgba(var(--color-border-rgb), 0.1);
    border-radius: 10px;
}

.entry-content .wp-block-table::-webkit-scrollbar-thumb {
    background: var(--color-accent);
    border-radius: 10px;
    opacity: 0.5;
}

.entry-content .wp-block-table::-webkit-scrollbar-thumb:hover {
    background: var(--color-primary);
}

@media (max-width: 768px) {
    .entry-content .wp-block-table table {
        min-width: 750px !important;
        /* Kaydırmayı zorunlu kılar */
    }
}

.entry-content table {
    width: 100% !important;
    display: table !important;
    /* Sticky için şart */
    border-collapse: separate !important;
    /* For border radius */
    border-spacing: 0 !important;
    margin-bottom: 2rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.entry-content th {
    background: #111827 !important;
    color: #F9FAFB !important;
    padding: 1.5rem 1.25rem !important;
    text-align: left;
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 3px solid var(--color-accent) !important;
    white-space: nowrap;
    /* Başlıkların binmesini engeller */
}

/* Sticky First Column: Radikal Kesin Sürüm (v1.5.3) */
.entry-content table th:first-child,
.entry-content table td:first-child {
    position: -webkit-sticky !important;
    position: sticky !important;
    left: 0 !important;
    z-index: 50 !important;
    /* Çok yüksek tutuyoruz */
    background-color: var(--color-surface) !important;
    background-clip: padding-box !important;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.08) !important;
}

/* Koyu mod td arka planı */
[data-theme="dark"] .entry-content table td:first-child {
    background-color: #0f172a !important;
    /* Saf koyu arka plan */
}

/* Başlık alanı sticky (th) */
.entry-content table th:first-child {
    z-index: 51 !important;
    background-color: #111827 !important;
    color: #ffffff !important;
}

[data-theme="dark"] .entry-content table th:first-child {
    background-color: #1e293b !important;
    color: var(--color-accent) !important;
}

/* Çift satırlarda sticky arka plan koordinasyonu */
.entry-content tr:nth-child(even) td:first-child {
    background-color: #f8f9fa !important;
}

[data-theme="dark"] .entry-content tr:nth-child(even) td:first-child {
    background-color: #1a2333 !important;
}

/* Sütun ayrım çizgisi */
.entry-content table th:first-child::after,
.entry-content table td:first-child::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 2px;
    background: rgba(var(--color-accent-rgb), 0.1);
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .entry-content th {
    background: #1e293b !important;
}

.entry-content td {
    padding: 1.25rem 1.5rem !important;
    border-bottom: 1px solid rgba(var(--color-border-rgb), 0.5) !important;
    font-size: 1rem;
    color: var(--color-text);
    transition: background 0.2s ease;
}

.entry-content tr:last-child td {
    border-bottom: none !important;
}

.entry-content tr:hover td {
    background: rgba(var(--color-accent-rgb), 0.04) !important;
}

.entry-content tr:nth-child(even) td {
    background: rgba(var(--color-accent-rgb), 0.015);
}

/* 5. Listeler: Modern ve Temiz Madde İmleri */
.entry-content ul:not(.sub-menu),
.entry-content ol {
    margin: 2rem 0 2.5rem 1.5rem;
    padding: 0;
}

.entry-content ul:not(.sub-menu) li {
    list-style: none;
    position: relative;
    padding-left: 2rem;
    margin-bottom: 1rem;
}

.entry-content ul:not(.sub-menu) li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.85rem;
    width: 10px;
    height: 10px;
    background: var(--color-accent);
    transform: rotate(45deg);
    /* Diamond shape */
    border-radius: 2px;
    box-shadow: 0 0 10px rgba(var(--color-accent-rgb), 0.3);
}

.entry-content ul:not(.sub-menu) li::after {
    content: "";
    position: absolute;
    left: 4px;
    top: 0.85rem;
    width: 2px;
    height: 10px;
    background: var(--color-accent);
    opacity: 0.2;
    transform: rotate(45deg) translateY(-5px);
}

.entry-content ol li {
    margin-bottom: 1rem;
    padding-left: 0.5rem;
    color: var(--color-text);
}

/* 6. Kod ve Pre Blokları */
.entry-content pre {
    background: #1e293b !important;
    color: #e2e8f0 !important;
    padding: 2rem !important;
    border-radius: 8px;
    overflow-x: auto;
    font-size: 0.9rem;
    margin: 3rem 0;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
}

/* Linkler ve Vurgular */
.entry-content a:not(.article-card__category) {
    color: var(--color-accent);
    text-decoration: none;
    border-bottom: 1px solid rgba(var(--color-accent-rgb), 0.3);
    transition: all 0.3s ease;
}

.entry-content a:hover {
    border-bottom-color: var(--color-accent);
    background: rgba(var(--color-accent-rgb), 0.05);
}

.entry-content strong {
    color: var(--color-primary);
    font-weight: 700;
}

[data-theme="dark"] .entry-content strong {
    color: #fff;
}

/* 7. Özel İçerik Kutuları (AI Prompt Entegrasyonu) */

/* Yargıtay Kararı Kutusu */
.entry-content .judgment-box {
    background: linear-gradient(to right, rgba(184, 134, 11, 0.05), rgba(184, 134, 11, 0.01));
    border: 1px solid rgba(184, 134, 11, 0.3);
    border-left: 4px solid var(--color-accent);
    border-radius: 12px;
    padding: 2rem;
    margin: 3rem 0;
    position: relative;
}

.entry-content .judgment-box::before {
    content: "⚖️ YARGI KARARI";
    display: block;
    font-family: var(--font-heading);
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    font-weight: 700;
    color: var(--color-accent);
    margin-bottom: 1rem;
    text-transform: uppercase;
}

.entry-content .judgment-box h4 {
    margin-top: 0;
    font-size: 1.1rem;
    color: var(--color-primary);
}

/* ==========================================================================
   DİLEKÇE KUTUSU (PREMIUM)
   ========================================================================== */
.petition-box {
    background-color: #f9f9fc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin: 40px 0;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    font-family: 'Inter', sans-serif;
}

.petition-header {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    padding: 15px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid var(--color-accent);
}

.petition-header h3 {
    margin: 0;
    color: #fff;
    font-size: 1.1rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.petition-header h3::before {
    content: '\f15c';
    /* File Icon (FontAwesome varsa veya unicode) */
    font-family: sans-serif;
    /* Yedek */
    font-size: 1.2em;
    opacity: 0.8;
}

.copy-petition-btn {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.copy-petition-btn:hover {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: #000;
    transform: translateY(-1px);
}

.petition-content {
    padding: 30px;
    background: #fff;
    color: #334155;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.95rem;
    line-height: 1.7;
    white-space: pre-wrap;
    border-top: 1px solid #f1f5f9;
}

/* Dark Mode Support */
[data-theme="dark"] .petition-box {
    background-color: #1e293b;
    border-color: #334155;
}

[data-theme="dark"] .petition-content {
    background: #0f172a;
    color: #cbd5e1;
    border-top-color: #334155;
}

/* Hukuki Uyarı/Not Kutusu */
.entry-content .legal-warning {
    background: rgba(220, 38, 38, 0.05);
    border-left: 4px solid #dc2626;
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 8px;
    font-size: 1rem;
}

.entry-content .legal-warning strong {
    color: #dc2626;
}

/* Mevzuat/Kanun Atıf Kutusu */
.entry-content .statute-box {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    padding: 1.5rem;
    border-radius: 8px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.95rem;
    margin: 2rem 0;
    background-image: repeating-linear-gradient(45deg, transparent, transparent 10px, rgba(0, 0, 0, 0.02) 10px, rgba(0, 0, 0, 0.02) 20px);
}

/* SSS (FAQ) Bölümü - Accordion Stili */
.entry-content .faq-section {
    margin-top: 4rem;
}

.entry-content .faq-item {
    border-bottom: 2px solid var(--color-border);
    padding: 1.5rem 0;
}

.entry-content .faq-question {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-primary);
    margin: 0;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: color 0.3s ease;
}

.entry-content .faq-question:hover {
    color: var(--color-accent);
}

.entry-content .faq-question::after {
    content: '+';
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--color-accent);
    transition: transform 0.3s ease;
}

.entry-content .faq-item.active .faq-question::after {
    content: '-';
    transform: rotate(180deg);
}

.entry-content .faq-answer {
    color: var(--color-text);
    font-size: 1.05rem;
    line-height: 1.7;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out, padding 0.4s ease;
    opacity: 0;
}

.entry-content .faq-item.active .faq-answer {
    max-height: 1000px;
    /* İçeriğe göre yetecek bir değer */
    padding-top: 1rem;
    opacity: 1;
    transition: max-height 0.5s ease-in, opacity 0.3s ease-in;
}

/* Dark Mode Fixes for FAQ */
[data-theme="dark"] .entry-content .faq-question {
    color: #e2e8f0;
}

[data-theme="dark"] .entry-content .faq-question:hover {
    color: var(--color-accent);
}

[data-theme="dark"] .entry-content .faq-answer {
    color: #cbd5e1;
}