/* ========================================
   Blog Detail Page Styles
   ======================================== */

/* Reading Progress Bar */
.reading-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 4px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    z-index: 9999;
    transition: width 0.1s ease;
}

/* Blog Detail Section */
.blog-detail {
    background: #fff;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    margin-bottom: 2rem;
}

/* Blog Detail Image */
.blog-detail-image {
    margin-bottom: 2rem;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.blog-detail-image img {
    width: 100%;
    height: auto;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.blog-detail-image:hover img {
    transform: scale(1.02);
}

/* Blog Detail Meta */
.blog-detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid #e9ecef;
}

.blog-detail-meta .meta-item {
    display: inline-flex;
    align-items: center;
    color: #6c757d;
    font-size: 0.9rem;
    font-weight: 500;
}

.blog-detail-meta .meta-item i {
    margin-right: 0.5rem;
    color: #667eea;
    font-size: 1rem;
}

/* Blog Detail Title */
.blog-detail-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 2rem;
    line-height: 1.3;
}

/* Blog Detail Content */
.blog-detail-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #495057;
    margin-bottom: 2rem;
}

.blog-detail-content h2,
.blog-detail-content h3,
.blog-detail-content h4,
.blog-detail-content h5,
.blog-detail-content h6 {
    color: #2c3e50;
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.blog-detail-content h2 {
    font-size: 1.8rem;
}

.blog-detail-content h3 {
    font-size: 1.5rem;
}

.blog-detail-content h4 {
    font-size: 1.3rem;
}

.blog-detail-content p {
    margin-bottom: 1.5rem;
}

.blog-detail-content ul,
.blog-detail-content ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.blog-detail-content li {
    margin-bottom: 0.5rem;
}

.blog-detail-content a {
    color: #667eea;
    text-decoration: none;
    transition: color 0.3s ease;
}

.blog-detail-content a:hover {
    color: #764ba2;
    text-decoration: underline;
}

.blog-detail-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1.5rem 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.blog-detail-content blockquote {
    border-left: 4px solid #667eea;
    padding-left: 1.5rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: #6c757d;
    background: #f8f9fa;
    padding: 1rem 1.5rem;
    border-radius: 0 8px 8px 0;
}

.blog-detail-content code {
    background: #f8f9fa;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: "Courier New", monospace;
    color: #e83e8c;
}

.blog-detail-content pre {
    background: #2c3e50;
    color: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 1.5rem 0;
}

.blog-detail-content pre code {
    background: none;
    color: inherit;
    padding: 0;
}

/* Blog Detail Share */
.blog-detail-share {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 12px;
}

.share-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 1rem;
}

.share-buttons {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    color: #fff;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    text-decoration: none;
    border: none;
    cursor: pointer;
}

.share-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.share-facebook {
    background: #1877f2;
}

.share-facebook:hover {
    background: #0d65d9;
}

.share-twitter {
    background: #1da1f2;
}

.share-twitter:hover {
    background: #0c85d0;
}

.share-linkedin {
    background: #0a66c2;
}

.share-linkedin:hover {
    background: #004182;
}

.share-whatsapp {
    background: #25d366;
}

.share-whatsapp:hover {
    background: #128c7e;
}

.share-copy {
    background: #6c757d;
}

.share-copy:hover {
    background: #545b62;
}

/* Blog Detail Tags */
.blog-detail-tags {
    margin-bottom: 2rem;
}

.tags-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 1rem;
}

.tags-list {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.tag-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
}

.tag-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* Blog Detail Navigation */
.blog-detail-navigation {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid #e9ecef;
}

.nav-item-blog {
    flex: 1;
}

.nav-link-blog {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.nav-link-blog:hover {
    background: #e9ecef;
    transform: translateY(-2px);
}

.nav-link-blog i {
    font-size: 1.5rem;
    color: #667eea;
}

.nav-content {
    flex: 1;
}

.nav-label {
    display: block;
    font-size: 0.85rem;
    color: #6c757d;
    margin-bottom: 0.25rem;
}

.nav-title {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    color: #2c3e50;
    line-height: 1.4;
}

.nav-next {
    text-align: right;
}

.nav-next .nav-link-blog {
    flex-direction: row-reverse;
}

/* Sidebar Widgets */
.sidebar-widget {
    background: #fff;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    margin-bottom: 1.5rem;
}

.widget-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #e9ecef;
}

/* Category Widget */
.category-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-item {
    margin-bottom: 0.75rem;
}

.category-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: #495057;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.category-link i {
    margin-right: 0.75rem;
    color: #667eea;
}

.category-link:hover {
    background: #f8f9fa;
    color: #667eea;
    transform: translateX(5px);
}

/* Recent Posts Widget */
.recent-posts-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.recent-post-item {
    margin-bottom: 1rem;
}

.recent-post-item:last-child {
    margin-bottom: 0;
}

.recent-post-link {
    display: flex;
    gap: 1rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.recent-post-link:hover {
    transform: translateX(5px);
}

.recent-post-image {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
}

.recent-post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.recent-post-info {
    flex: 1;
}

.recent-post-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.recent-post-date {
    font-size: 0.85rem;
    color: #6c757d;
}

/* Related Articles Section */
.section-header {
    margin-bottom: 3rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.1rem;
    color: #6c757d;
}

/* Blog Card (for Related Articles) */
.blog-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.blog-image {
    position: relative;
    overflow: hidden;
    height: 200px;
}

.blog-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.blog-card:hover .blog-image img {
    transform: scale(1.1);
}

.blog-category-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 2;
}

.blog-category-badge span {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.blog-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.blog-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.blog-meta .meta-item {
    display: inline-flex;
    align-items: center;
    color: #6c757d;
    font-size: 0.875rem;
}

.blog-meta .meta-item i {
    margin-right: 0.4rem;
    color: #667eea;
}

.blog-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.blog-title a {
    color: #2c3e50;
    text-decoration: none;
    transition: color 0.3s ease;
}

.blog-title a:hover {
    color: #667eea;
}

.blog-excerpt {
    color: #6c757d;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    flex: 1;
}

.btn-read-more {
    display: inline-flex;
    align-items: center;
    color: #667eea;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.btn-read-more i {
    margin-left: 0.5rem;
    transition: transform 0.3s ease;
}

.btn-read-more:hover {
    color: #764ba2;
}

.btn-read-more:hover i {
    transform: translateX(5px);
}

/* Responsive Design */
@media (max-width: 991px) {
    .blog-detail {
        padding: 1.5rem;
    }

    .blog-detail-title {
        font-size: 2rem;
    }

    .blog-detail-content {
        font-size: 1rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .blog-detail-navigation {
        flex-direction: column;
    }

    .nav-next {
        text-align: left;
    }

    .nav-next .nav-link-blog {
        flex-direction: row;
    }
}

@media (max-width: 767px) {
    .blog-detail {
        padding: 1.25rem;
    }

    .blog-detail-title {
        font-size: 1.75rem;
    }

    .blog-detail-meta {
        gap: 1rem;
    }

    .blog-detail-meta .meta-item {
        font-size: 0.85rem;
    }

    .share-buttons {
        justify-content: center;
    }

    .section-title {
        font-size: 1.75rem;
    }

    .section-subtitle {
        font-size: 1rem;
    }

    .blog-image {
        height: 180px;
    }

    .blog-title {
        font-size: 1.1rem;
    }

    .blog-content {
        padding: 1.25rem;
    }
}

@media (max-width: 575px) {
    .blog-detail {
        padding: 1rem;
    }

    .blog-detail-title {
        font-size: 1.5rem;
    }

    .blog-detail-content {
        font-size: 0.95rem;
    }

    .blog-detail-content h2 {
        font-size: 1.5rem;
    }

    .blog-detail-content h3 {
        font-size: 1.3rem;
    }

    .share-buttons {
        gap: 0.5rem;
    }

    .share-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .sidebar-widget {
        padding: 1rem;
    }

    .widget-title {
        font-size: 1.1rem;
    }

    .recent-post-image {
        width: 60px;
        height: 60px;
    }

    .recent-post-title {
        font-size: 0.9rem;
    }

    .blog-image {
        height: 160px;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.blog-card {
    animation: fadeInUp 0.5s ease-out;
}

.blog-card:nth-child(1) {
    animation-delay: 0.1s;
}

.blog-card:nth-child(2) {
    animation-delay: 0.2s;
}

.blog-card:nth-child(3) {
    animation-delay: 0.3s;
}

/* Notification Toast */
.notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 1rem 1.5rem;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    z-index: 10000;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s ease;
}

.notification.show {
    transform: translateY(0);
    opacity: 1;
}

.notification-success {
    border-left: 4px solid #28a745;
}

.notification-error {
    border-left: 4px solid #dc3545;
}
