/**
 * Dynamic Blog Post Styling
 * Enhanced styles for interactive and dynamic blog features
 */

/* Enhanced Post Styling */
.blog-post-content {
    position: relative;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 2rem;
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
}

/* Blog Read Container */
.blog-read {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 1rem;
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

/* Post Meta Information */
.post-meta {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 1rem;
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Post Tags */
.post-tags .badge {
    background: linear-gradient(45deg, #007bff, #0056b3);
    border: none;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.post-tags .badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.4);
}

/* Social Share Buttons */
.social-share .btn {
    border-radius: 2rem;
    padding: 0.5rem 1.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.social-share .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Related Posts */
.related-posts .card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    overflow: hidden;
    transition: all 0.3s ease;
}

.related-posts .card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.related-posts .card-img-top {
    transition: transform 0.3s ease;
}

.related-posts .card:hover .card-img-top {
    transform: scale(1.05);
}

/* Comments Section */
#blog-comment {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 1rem;
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

#blog-comment ol {
    list-style: none;
    padding: 0;
}

#blog-comment li {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 1rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.avatar img {
    border: 3px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.avatar img:hover {
    border-color: rgba(0, 123, 255, 0.5);
    transform: scale(1.05);
}

.comment-info {
    margin-bottom: 1rem;
}

.c_name {
    font-weight: 600;
    font-size: 1.1rem;
    margin-right: 1rem;
}

.c_date {
    color: #6c757d;
    font-size: 0.9rem;
    margin-right: 1rem;
}

.c_reply a {
    color: #007bff;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.c_reply a:hover {
    color: #0056b3;
}

.comment {
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
}

/* Comment Actions */
.comment-actions .btn {
    border-radius: 2rem;
    padding: 0.4rem 1rem;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.comment-actions .btn:hover {
    transform: translateY(-2px);
}

/* Comment Form */
#comment-form-wrapper {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 1rem;
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.form-border input,
.form-border textarea {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 0.5rem;
    color: #fff;
    transition: all 0.3s ease;
}

.form-border input:focus,
.form-border textarea:focus {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(0, 123, 255, 0.5);
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.form-border label {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

/* Sidebar */
.sidebar {
    position: sticky;
    top: 2rem;
}

.widget {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 1rem;
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 1.5rem;
    backdrop-filter: blur(10px);
}

.widget h5 {
    color: #fff;
    font-weight: 600;
    margin-bottom: 1rem;
    border-bottom: 2px solid rgba(0, 123, 255, 0.3);
    padding-bottom: 0.5rem;
}

/* Author Info */
.author-info img {
    border: 3px solid rgba(0, 123, 255, 0.3);
    transition: all 0.3s ease;
}

.author-info img:hover {
    border-color: rgba(0, 123, 255, 0.6);
    transform: scale(1.05);
}

/* Categories */
.widget ul li {
    margin-bottom: 0.75rem;
}

.widget ul li a {
    color: rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.widget ul li a:hover {
    color: #fff;
    transform: translateX(5px);
}

.widget ul li a .badge {
    background: rgba(0, 123, 255, 0.2);
    color: #007bff;
    border: 1px solid rgba(0, 123, 255, 0.3);
}

/* Tags */
.widget .badge {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.widget .badge:hover {
    background: rgba(0, 123, 255, 0.2);
    border-color: rgba(0, 123, 255, 0.5);
    transform: translateY(-2px);
}

/* Blog Stats */
.stat-item {
    text-align: center;
    padding: 1rem;
    background: rgba(0, 123, 255, 0.1);
    border-radius: 0.5rem;
    border: 1px solid rgba(0, 123, 255, 0.2);
}

.stat-item h4 {
    color: #007bff;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.stat-item small {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
}

/* Success/Error Messages */
.success {
    background: rgba(40, 167, 69, 0.2);
    color: #28a745;
    padding: 1rem;
    border-radius: 0.5rem;
    border: 1px solid rgba(40, 167, 69, 0.3);
    margin-bottom: 1rem;
    display: none;
}

.error {
    background: rgba(220, 53, 69, 0.2);
    color: #dc3545;
    padding: 1rem;
    border-radius: 0.5rem;
    border: 1px solid rgba(220, 53, 69, 0.3);
    margin-bottom: 1rem;
    display: none;
}

/* Info Alert for Comment Form */
.alert-info {
    background: rgba(13, 202, 240, 0.1);
    color: #0dcaf0;
    border: 1px solid rgba(13, 202, 240, 0.3);
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1rem;
}

.alert-info strong {
    color: #0dcaf0;
}

.alert-info i {
    color: #0dcaf0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .sidebar {
        position: static;
        margin-top: 2rem;
    }
    
    .post-meta .row {
        text-align: center;
    }
    
    .post-meta .col-md-6:last-child {
        margin-top: 1rem;
        justify-content: center;
    }
    
    .social-share .d-flex {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .social-share .btn {
        width: 100%;
    }
}

.post-title {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease;
}

.post-title:hover {
    transform: translateY(-2px);
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.7);
}

/* Enhanced Meta Information */
.post-meta-enhanced {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 1rem;
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
}

.meta-item {
    display: flex;
    align-items: center;
    padding: 0.5rem 1rem;
    background: rgba(13, 110, 253, 0.1);
    border-radius: 2rem;
    border: 1px solid rgba(13, 110, 253, 0.2);
    transition: all 0.3s ease;
}

.meta-item:hover {
    background: rgba(13, 110, 253, 0.2);
    border-color: rgba(13, 110, 253, 0.4);
    transform: translateY(-2px);
}

/* Reading Time and Stats Badges */
.reading-time .badge {
    font-size: 0.9rem;
    padding: 0.75rem 1.25rem;
    border-radius: 2rem;
    transition: all 0.3s ease;
}

.reading-time .badge:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Featured Image Enhancements */
.featured-image {
    position: relative;
    overflow: hidden;
    border-radius: 1rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.featured-image img {
    transition: transform 0.5s ease;
}

.featured-image:hover img {
    transform: scale(1.05);
}

.featured-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent, rgba(13, 110, 253, 0.1));
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.featured-image:hover::before {
    opacity: 1;
}

/* Post Content Container */
.post-content {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 1.5rem;
    padding: 2rem;
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

/* Content Body Enhancements */
.content-body {
    position: relative;
    line-height: 1.8;
    font-size: 1.1rem;
    color: #333;
    background: rgba(255, 255, 255, 0.98);
    padding: 2rem;
    border-radius: 1rem;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.content-body p {
    margin-bottom: 1.5rem;
    color: #333;
    transition: all 0.3s ease;
    line-height: 1.8;
}

.content-body h1,
.content-body h2,
.content-body h3,
.content-body h4,
.content-body h5,
.content-body h6 {
    color: #2c3e50;
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 600;
    line-height: 1.3;
}

.content-body ul,
.content-body ol {
    color: #333;
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.content-body li {
    color: #333;
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.content-body strong,
.content-body b {
    color: #2c3e50;
    font-weight: 600;
}

.content-body em,
.content-body i {
    color: #34495e;
    font-style: italic;
}

.content-body a {
    color: #007bff;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: all 0.3s ease;
}

.content-body a:hover {
    color: #0056b3;
    border-bottom-color: #0056b3;
}

.content-body blockquote {
    background: #f8f9fa;
    border-left: 4px solid #007bff;
    padding: 1.5rem;
    margin: 2rem 0;
    color: #495057;
    font-style: italic;
    border-radius: 0 0.5rem 0.5rem 0;
}

.content-body code {
    background: #f8f9fa;
    color: #e83e8c;
    padding: 0.2rem 0.4rem;
    border-radius: 0.25rem;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

.content-body pre {
    background: #f8f9fa;
    color: #495057;
    padding: 1.5rem;
    border-radius: 0.5rem;
    overflow-x: auto;
    border: 1px solid #e9ecef;
    margin: 1.5rem 0;
}

/* Highlight effect for paragraphs */
.highlight-paragraph {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem;
    border-radius: 0.5rem;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    transform: scale(1.02);
    transition: all 0.3s ease;
}

.highlight-paragraph::before {
    content: '💡';
    position: absolute;
    left: -2rem;
    top: 0.5rem;
    font-size: 1.2rem;
    opacity: 0.9;
}

/* Heading Styles for Better Visibility */
.content-body h1,
.content-body h2,
.content-body h3,
.content-body h4,
.content-body h5,
.content-body h6 {
    color: #ffffff;
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.9);
    border-bottom: 2px solid rgba(13, 110, 253, 0.5);
    padding-bottom: 0.5rem;
}

.content-body h2 {
    font-size: 1.8rem;
    color: #0d6efd;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.9);
}

.content-body h3 {
    font-size: 1.5rem;
    color: #0dcaf0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.9);
}

.content-body h4 {
    font-size: 1.3rem;
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.9);
}

/* List Styles */
.content-body ul,
.content-body ol {
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
    margin-bottom: 1.5rem;
}

.content-body li {
    margin-bottom: 0.5rem;
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

/* Tag Styling */
.tags-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.tag-badge {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: rgba(13, 110, 253, 0.15);
    border: 2px solid rgba(13, 110, 253, 0.3);
    border-radius: 3rem;
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.tag-badge::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.tag-badge:hover::before {
    left: 100%;
}

.tag-badge:hover {
    background: rgba(13, 110, 253, 0.3);
    border-color: rgba(13, 110, 253, 0.6);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 25px rgba(13, 110, 253, 0.3);
    text-decoration: none;
    color: #fff;
}

.animate-tag {
    animation: tagPulse 0.6s ease-in-out;
}

@keyframes tagPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Author Profile Enhancements */
.author-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1.5rem;
    padding: 2rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.author-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #0d6efd, #0dcaf0, #198754);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.author-card:hover::before {
    transform: scaleX(1);
}

.author-card:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.05) 100%);
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
    border-color: rgba(13, 110, 253, 0.3);
}

.author-avatar {
    position: relative;
    display: inline-block;
}

.author-avatar img {
    border: 3px solid rgba(13, 110, 253, 0.3);
    transition: all 0.3s ease;
}

.author-card:hover .author-avatar img {
    border-color: rgba(13, 110, 253, 0.6);
    transform: scale(1.1);
}

.author-stats .badge {
    font-size: 0.8rem;
    padding: 0.5rem 1rem;
    border-radius: 1.5rem;
    transition: all 0.3s ease;
}

.author-stats .badge:hover {
    transform: scale(1.1);
}

.author-links .btn {
    border-radius: 2rem;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.author-links .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Reading Progress Bar */
.reading-progress {
    position: sticky;
    top: 20px;
    z-index: 100;
    background: rgba(0, 0, 0, 0.8);
    padding: 1rem;
    border-radius: 1rem;
    backdrop-filter: blur(10px);
}

.progress-container {
    width: 100%;
    height: 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    overflow: hidden;
    position: relative;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #0d6efd, #0dcaf0, #198754);
    width: 0%;
    transition: width 0.3s ease;
    position: relative;
    overflow: hidden;
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Share Buttons */
.share-buttons {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 1rem;
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.social-share {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.share-btn {
    border-radius: 2rem;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.share-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.share-btn:hover::before {
    left: 100%;
}

.share-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.share-count {
    background: rgba(0, 0, 0, 0.2);
    padding: 0.25rem 0.5rem;
    border-radius: 1rem;
    font-size: 0.8rem;
    margin-left: 0.5rem;
}

/* Related Posts */
.related-post-card, .author-post-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    padding: 1rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.related-post-card::before, .author-post-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #0d6efd, #0dcaf0);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.related-post-card:hover::before, .author-post-card:hover::before {
    transform: scaleX(1);
}

.related-post-card:hover, .author-post-card:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    border-color: rgba(13, 110, 253, 0.3);
}

.related-post-card img, .author-post-card img {
    transition: transform 0.3s ease;
}

.related-post-card:hover img, .author-post-card:hover img {
    transform: scale(1.1);
}

/* Sidebar Enhancements */
.sidebar-widget {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 1rem;
    padding: 1.5rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.sidebar-widget::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, #0d6efd, #0dcaf0);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.sidebar-widget:hover::before {
    transform: scaleX(1);
}

.sidebar-widget:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.stats-card {
    background: linear-gradient(135deg, rgba(13, 110, 253, 0.1) 0%, rgba(13, 110, 253, 0.05) 100%);
    border: 1px solid rgba(13, 110, 253, 0.2);
}

.stat-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.stat-item:last-child {
    border-bottom: none;
}

.stat-item:hover {
    background: rgba(13, 110, 253, 0.1);
    border-radius: 0.5rem;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

/* Newsletter Signup */
.newsletter-signup {
    background: linear-gradient(135deg, #0d6efd 0%, #0dcaf0 100%);
    border: none;
    position: relative;
    overflow: hidden;
}

.newsletter-signup::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: translateX(-100%);
    transition: transform 0.5s ease;
}

.newsletter-signup:hover::before {
    transform: translateX(100%);
}

.newsletter-signup .form-control {
    border: none;
    border-radius: 2rem 0 0 2rem;
    padding: 0.75rem 1.25rem;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
}

.newsletter-signup .btn {
    border: none;
    border-radius: 0 2rem 2rem 0;
    padding: 0.75rem 1.25rem;
    background: rgba(255, 255, 255, 0.9);
    color: #0d6efd;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.newsletter-signup .btn:hover {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.05);
}

/* Trending Posts */
.trending-post {
    padding: 1rem;
    border-radius: 0.75rem;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
    overflow: hidden;
}

.trending-post::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: linear-gradient(180deg, #0d6efd, #0dcaf0);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.trending-post:hover::before {
    transform: scaleY(1);
}

.trending-post:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateX(5px);
    border-color: rgba(13, 110, 253, 0.3);
}

/* Table of Contents */
.table-of-contents {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: sticky;
    top: 20px;
    z-index: 50;
}

.toc-link {
    display: block;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    position: relative;
}

.toc-link[data-heading="h2"] {
    font-weight: 600;
    padding-left: 1.5rem;
}

.toc-link[data-heading="h3"] {
    font-weight: 500;
    padding-left: 2.5rem;
    font-size: 0.9rem;
}

.toc-link[data-heading="h4"] {
    font-weight: 400;
    padding-left: 3.5rem;
    font-size: 0.85rem;
}

.toc-link:hover {
    background: rgba(13, 110, 253, 0.1);
    color: #0d6efd;
    transform: translateX(5px);
}

/* Search Container */
.search-container {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 1rem;
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.search-container .form-control {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    border-radius: 2rem 0 0 2rem;
}

.search-container .form-control::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.search-container .btn {
    border-radius: 0 2rem 2rem 0;
    background: rgba(13, 110, 253, 0.8);
    border: 1px solid rgba(13, 110, 253, 0.8);
}

.search-result {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.search-result:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(13, 110, 253, 0.3);
}

/* Content Visibility Animations */
.content-body p {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.content-body p.content-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive Design */
@media (max-width: 768px) {
    .post-title {
        font-size: 2rem;
    }
    
    .meta-row {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .meta-item {
        width: 100%;
        justify-content: center;
    }
    
    .social-share {
        flex-direction: column;
    }
    
    .share-btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .author-card .row {
        text-align: center;
    }
    
    .reading-progress {
        position: relative;
        top: auto;
    }
    
    .table-of-contents {
        position: relative;
        top: auto;
    }
}

@media (max-width: 576px) {
    .post-header {
        text-align: center;
    }
    
    .reading-time .badge {
        display: block;
        margin-bottom: 0.5rem;
        margin-left: 0 !important;
    }
    
    .tags-cloud {
        justify-content: center;
    }
    
    .sidebar-widget {
        margin-bottom: 1rem;
    }
}

/* Print Styles */
@media print {
    .reading-progress,
    .share-buttons,
    .newsletter-signup,
    .sidebar-widget,
    .table-of-contents,
    .search-container {
        display: none !important;
    }
    
    .blog-post-content {
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    .post-title {
        color: #000 !important;
        text-shadow: none !important;
    }
    
    .content-body {
        color: #000 !important;
    }
}

/* Loading States */
.spinner-border {
    width: 1.5rem;
    height: 1.5rem;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Focus States for Accessibility */
.tag-badge:focus,
.share-btn:focus,
.newsletter-signup .btn:focus {
    outline: 2px solid #0d6efd;
    outline-offset: 2px;
}

/* Dark Mode Enhancements */
@media (prefers-color-scheme: dark) {
    .content-body p {
        color: rgba(255, 255, 255, 0.9);
    }
    
    .highlight-paragraph {
        background: linear-gradient(90deg, rgba(13, 110, 253, 0.2) 0%, transparent 100%);
    }
}

/* Animation Performance */
* {
    will-change: auto;
}

.content-body p,
.tag-badge,
.share-btn,
.related-post-card,
.author-post-card {
    will-change: transform, opacity;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .tag-badge {
        border-width: 3px;
    }
    
    .progress-bar {
        border: 2px solid #fff;
    }
    
    .sidebar-widget {
        border-width: 2px;
    }
}
