/* Luxury Editorial & High-Readability Styles for Etil Siparis Ver */

body {
    font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #1e293b; /* slate-800 */
    background-color: #f8fafc; /* slate-50 */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Line clamp helpers */
.line-clamp-1 {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ==========================================================================
   SUPERIOR ARTICLE READABILITY & EDITORIAL TYPOGRAPHY
   ========================================================================== */

.article-content {
    font-size: 1.125rem !important; /* 18px */
    line-height: 2.0 !important; /* 36px line height for effortless readability */
    color: #334155 !important; /* slate-700 */
    word-break: break-word;
}

/* Paragraphs */
.article-content p {
    margin-top: 0 !important;
    margin-bottom: 1.75rem !important; /* 28px margin */
    font-size: 1.125rem !important;
    line-height: 2.0 !important;
    color: #334155 !important;
}

/* Main Subheadings H2 */
.article-content h2 {
    font-size: 1.75rem !important; /* 28px */
    line-height: 1.35 !important;
    font-weight: 800 !important;
    color: #0f172a !important; /* slate-900 */
    margin-top: 3.5rem !important; /* 56px top margin for clear separation */
    margin-bottom: 1.5rem !important; /* 24px bottom margin */
    padding: 0.75rem 1.25rem !important;
    border-left: 5px solid #2563eb !important;
    background: linear-gradient(90deg, #eff6ff 0%, rgba(239, 246, 255, 0.2) 100%) !important;
    border-radius: 0 0.75rem 0.75rem 0 !important;
    letter-spacing: -0.025em !important;
    display: block !important;
    clear: both !important;
}

@media (min-width: 640px) {
    .article-content h2 {
        font-size: 2.0rem !important; /* 32px on desktop */
    }
}

/* Sub-sections H3 */
.article-content h3 {
    font-size: 1.35rem !important; /* ~22px */
    line-height: 1.4 !important;
    font-weight: 700 !important;
    color: #1e293b !important; /* slate-800 */
    margin-top: 2.5rem !important; /* 40px */
    margin-bottom: 1.0rem !important; /* 16px */
    letter-spacing: -0.015em !important;
    display: block !important;
    position: relative !important;
    padding-left: 0.5rem !important;
    border-left: 3px solid #3b82f6 !important;
}

/* Lists & Bullets */
.article-content ul, 
.article-content ol {
    margin-top: 1.25rem !important;
    margin-bottom: 2.0rem !important;
    padding-left: 2.0rem !important;
}

.article-content ul {
    list-style-type: disc !important;
}

.article-content ol {
    list-style-type: decimal !important;
}

.article-content li {
    margin-bottom: 0.85rem !important;
    padding-left: 0.35rem !important;
    font-size: 1.075rem !important;
    line-height: 1.85 !important;
    color: #334155 !important;
}

.article-content li::marker {
    color: #2563eb !important;
    font-weight: bold !important;
}

/* Bold Emphasis */
.article-content strong, 
.article-content b {
    color: #0f172a !important;
    font-weight: 700 !important;
}

/* Links */
.article-content a {
    color: #2563eb !important;
    font-weight: 600 !important;
    text-decoration: underline !important;
    text-underline-offset: 4px !important;
    transition: all 0.2s ease !important;
}

.article-content a:hover {
    color: #1d4ed8 !important;
    text-decoration-color: #1d4ed8 !important;
}

/* Tables inside article */
.article-content table {
    width: 100% !important;
    margin-top: 2.0rem !important;
    margin-bottom: 2.5rem !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    border-radius: 1.0rem !important;
    overflow: hidden !important;
    border: 1px solid #cbd5e1 !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05) !important;
    font-size: 0.95rem !important;
}

.article-content thead tr {
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%) !important;
    color: #0f172a !important;
    font-weight: 800 !important;
    border-bottom: 2px solid #cbd5e1 !important;
}

.article-content th, 
.article-content td {
    padding: 1.0rem 1.25rem !important;
    border-bottom: 1px solid #e2e8f0 !important;
    border-right: 1px solid #f1f5f9 !important;
    line-height: 1.6 !important;
}

.article-content th:last-child,
.article-content td:last-child {
    border-right: none !important;
}

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

.article-content tbody tr:nth-child(even) {
    background-color: #f8fafc !important;
}

.article-content tbody tr:hover {
    background-color: #eff6ff !important;
}

/* Pre / Code formula styling */
.article-content pre {
    background-color: #0f172a !important; /* dark slate */
    color: #f8fafc !important;
    border-radius: 1.0rem !important;
    padding: 1.5rem !important;
    margin-top: 2.0rem !important;
    margin-bottom: 2.25rem !important;
    overflow-x: auto !important;
    font-size: 0.9rem !important;
    line-height: 1.7 !important;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace !important;
    border: 1px solid #334155 !important;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1) !important;
}

.article-content code {
    background-color: #f1f5f9 !important;
    color: #1d4ed8 !important;
    font-weight: 600 !important;
    padding: 0.2rem 0.45rem !important;
    border-radius: 0.35rem !important;
    font-size: 0.9em !important;
}

.article-content pre code {
    background-color: transparent !important;
    color: inherit !important;
    padding: 0 !important;
}

/* Blockquote / Alert callouts */
.article-content blockquote {
    background: linear-gradient(90deg, #eff6ff 0%, #f8fafc 100%) !important;
    border-left: 5px solid #3b82f6 !important;
    padding: 1.25rem 1.5rem !important;
    border-radius: 0 1.0rem 1.0rem 0 !important;
    margin: 2.0rem 0 !important;
    color: #1e3a8a !important;
    font-style: normal !important;
    font-size: 1.05rem !important;
    line-height: 1.8 !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02) !important;
}

/* Reading Progress Bar */
#reading-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 4px;
    background: linear-gradient(90deg, #2563eb, #10b981);
    z-index: 9999;
    width: 0%;
    transition: width 0.1s ease-out;
}

/* Table of Contents Box */
#table-of-contents-box {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
}

/* Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in-down {
    animation: fadeInDown 0.3s ease-out forwards;
}

/* Print Invoice Styles */
@media print {
    body * {
        visibility: hidden;
    }
    #printable-invoice, #printable-invoice * {
        visibility: visible;
    }
    #printable-invoice {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
    }
}
