/* Blog-specific styles */

.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;
}

/* Rich content formatting */
.blog-content {
    line-height: 1.8;
    color: #374151;
}

.blog-content h1,
.blog-content h2,
.blog-content h3,
.blog-content h4 {
    font-weight: 700;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: #1f2937;
}

.blog-content h1 {
    font-size: 2.25rem;
}

.blog-content h2 {
    font-size: 1.875rem;
}

.blog-content h3 {
    font-size: 1.5rem;
}

.blog-content h4 {
    font-size: 1.25rem;
}

.blog-content p {
    margin-bottom: 1.5rem;
}

.blog-content a {
    color: #d97706;
    text-decoration: underline;
}

.blog-content a:hover {
    color: #b45309;
}

.blog-content ul,
.blog-content ol {
    margin-left: 2rem;
    margin-bottom: 1.5rem;
}

.blog-content ul {
    list-style-type: disc;
}

.blog-content ol {
    list-style-type: decimal;
}

.blog-content li {
    margin-bottom: 0.5rem;
}

.blog-content blockquote {
    border-left: 4px solid #f59e0b;
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: #6b7280;
    background: #f9fafb;
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
}

.blog-content pre {
    background: #1f2937;
    color: #f3f4f6;
    padding: 1.5rem;
    border-radius: 0.5rem;
    overflow-x: auto;
    margin: 1.5rem 0;
}

.blog-content code {
    background: #f3f4f6;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
}

.blog-content pre code {
    background: transparent;
    padding: 0;
}

.blog-content img {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
    margin: 2rem 0;
}

.blog-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
}

.blog-content th,
.blog-content td {
    border: 1px solid #e5e7eb;
    padding: 0.75rem;
    text-align: left;
}

.blog-content th {
    background: #f3f4f6;
    font-weight: 600;
}

/* Reading progress bar */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 4px;
    background: linear-gradient(to right, #f59e0b, #fbbf24);
    z-index: 9999;
    transition: width 0.1s ease;
}

/* Category badges */
.category-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    transition: all 0.2s;
}

.category-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Social sharing buttons */
.social-share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transition: all 0.2s;
}

.social-share-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Newsletter form */
.newsletter-input {
    transition: all 0.2s;
}

.newsletter-input:focus {
    outline: none;
    border-color: #f59e0b;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.1);
}

/* Dark mode support */
body.dark-mode .blog-content {
    color: #e5e7eb;
}

body.dark-mode .blog-content h1,
body.dark-mode .blog-content h2,
body.dark-mode .blog-content h3,
body.dark-mode .blog-content h4 {
    color: #f3f4f6;
}

body.dark-mode .blog-content blockquote {
    background: #1f2937;
    color: #9ca3af;
    border-left-color: #fbbf24;
}

body.dark-mode .blog-content code {
    background: #374151;
    color: #f3f4f6;
}

body.dark-mode .blog-content th {
    background: #374151;
}

/* RTL support for Arabic */
[dir="rtl"] .blog-content {
    text-align: right;
}

[dir="rtl"] .blog-content ul,
[dir="rtl"] .blog-content ol {
    margin-left: 0;
    margin-right: 2rem;
}

[dir="rtl"] .blog-content blockquote {
    border-left: none;
    border-right: 4px solid #f59e0b;
    padding-left: 0;
    padding-right: 1.5rem;
}