/* ========================================
   Blog Detail Page Styles
   ======================================== */

/* Prose (Article Content) Styling */
.prose {
    color: #374151;
    line-height: 1.75;
}

.prose h2 {
    color: #111827;
    font-weight: 700;
    font-size: 1.875rem;
    margin-top: 2.5rem;
    margin-bottom: 1.25rem;
    line-height: 1.3;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid #3b82f6;
    display: inline-block;
}

.prose h3 {
    color: #1f2937;
    font-weight: 600;
    font-size: 1.5rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.prose h4 {
    color: #374151;
    font-weight: 600;
    font-size: 1.25rem;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.prose p {
    margin-bottom: 1.25rem;
    font-size: 1.125rem;
    line-height: 1.8;
}

.prose strong {
    color: #111827;
    font-weight: 600;
}

.prose a {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 500;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.prose a:hover {
    color: #2563eb;
    border-bottom-color: #3b82f6;
}

/* Lists */
.prose ul,
.prose ol {
    margin-top: 1.25rem;
    margin-bottom: 1.25rem;
    padding-left: 1.5rem;
}

.prose li {
    margin-bottom: 0.75rem;
    font-size: 1.125rem;
    line-height: 1.75;
}

.prose ul li {
    position: relative;
    padding-left: 0.5rem;
}

.prose ul li::marker {
    color: #3b82f6;
    font-size: 1.2em;
}

.prose ol li {
    padding-left: 0.5rem;
}

.prose ol li::marker {
    color: #3b82f6;
    font-weight: 600;
}

/* Nested Lists */
.prose ul ul,
.prose ol ol,
.prose ul ol,
.prose ol ul {
    margin-top: 0.75rem;
    margin-bottom: 0.75rem;
}

/* Code */
.prose code {
    background-color: #f3f4f6;
    color: #e11d48;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.9em;
    font-family: 'Monaco', 'Courier New', monospace;
    font-weight: 500;
}

.prose pre {
    background-color: #1f2937;
    color: #f9fafb;
    padding: 1.5rem;
    border-radius: 0.75rem;
    overflow-x: auto;
    margin: 1.5rem 0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.prose pre code {
    background-color: transparent;
    color: inherit;
    padding: 0;
    font-size: 0.95em;
}

/* Blockquotes */
.prose blockquote {
    border-left: 4px solid #3b82f6;
    padding-left: 1.5rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: #4b5563;
    background-color: #f9fafb;
    padding: 1.25rem 1.5rem;
    border-radius: 0.5rem;
}

/* Alert Boxes (from blog content) */
.prose .bg-blue-50 {
    background-color: #eff6ff !important;
    border-left: 4px solid #3b82f6;
    padding: 1.25rem;
    border-radius: 0.5rem;
    margin: 1.5rem 0;
}

.prose .bg-yellow-50 {
    background-color: #fefce8 !important;
    border-left: 4px solid #eab308;
    padding: 1.25rem;
    border-radius: 0.5rem;
    margin: 1.5rem 0;
}

.prose .bg-red-50 {
    background-color: #fef2f2 !important;
    border-left: 4px solid #ef4444;
    padding: 1.25rem;
    border-radius: 0.5rem;
    margin: 1.5rem 0;
}

.prose .bg-green-50 {
    background-color: #f0fdf4 !important;
    border-left: 4px solid #22c55e;
    padding: 1.25rem;
    border-radius: 0.5rem;
    margin: 1.5rem 0;
}

.prose .bg-gray-50 {
    background-color: #f9fafb !important;
    border-left: 4px solid #6b7280;
    padding: 1.25rem;
    border-radius: 0.5rem;
    margin: 1.5rem 0;
}

/* Example Subject Boxes */
.prose .bg-gray-50 p {
    margin-bottom: 0.5rem;
}

.prose .bg-gray-50 .font-semibold {
    color: #111827;
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: block;
}

.prose .bg-gray-50 .italic {
    color: #4b5563;
    font-style: italic;
}

/* Tables */
.prose table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border-radius: 0.5rem;
    overflow: hidden;
}

.prose thead {
    background-color: #f3f4f6;
}

.prose th {
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 600;
    color: #111827;
    border-bottom: 2px solid #e5e7eb;
}

.prose td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e5e7eb;
}

.prose tbody tr:hover {
    background-color: #f9fafb;
}

/* Images */
.prose img {
    border-radius: 0.75rem;
    margin: 1.5rem 0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Horizontal Rule */
.prose hr {
    border: none;
    height: 2px;
    background: linear-gradient(to right, transparent, #e5e7eb, transparent);
    margin: 2.5rem 0;
}

/* First Letter Drop Cap (Optional) */
.prose > p:first-of-type::first-letter {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1;
    float: left;
    margin-right: 0.5rem;
    margin-top: 0.1rem;
    color: #3b82f6;
}

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

/* Smooth Scroll */
html {
    scroll-behavior: smooth;
}

/* Selection Color */
.prose ::selection {
    background-color: #dbeafe;
    color: #1e40af;
}

/* Responsive */
@media (max-width: 768px) {
    .prose h2 {
        font-size: 1.5rem;
    }
    
    .prose h3 {
        font-size: 1.25rem;
    }
    
    .prose p,
    .prose li {
        font-size: 1rem;
    }
    
    .prose > p:first-of-type::first-letter {
        font-size: 2.5rem;
    }
}

/* Animation for Cards */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-slide-up {
    animation: slideUp 0.6s ease-out;
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Backdrop Blur Support */
@supports (backdrop-filter: blur(10px)) {
    .backdrop-blur-sm {
        backdrop-filter: blur(4px);
    }
}
