/* Single Post Styles */

/* Post Hero Section */
.post-hero-section {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
}

.post-featured-img {
    transition: transform 0.3s ease;
}

.post-featured-img:hover {
    transform: scale(1.02);
}

/* Post Content - Prevent Overflow */
.post-content {
    font-size: 1.1rem;
    line-height: 1.9;
    overflow-x: hidden;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.post-content h2 {
    margin-top: 2.5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e9ecef;
}

.post-content h3 {
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.post-content p {
    margin-bottom: 1.5rem;
}

/* Images - Responsive */
.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
    margin: 1.5rem 0;
    display: block;
}

/* Tables - Responsive with Scroll */
.post-content table {
    max-width: 100%;
    width: 100%;
    overflow-x: auto;
    display: block;
    border-collapse: collapse;
    margin: 1.5rem 0;
}

.post-content table td,
.post-content table th {
    padding: 0.75rem;
    border: 1px solid #dee2e6;
    word-break: break-word;
    min-width: 100px;
}

/* Media Elements - Responsive */
.post-content iframe,
.post-content video,
.post-content embed,
.post-content object {
    max-width: 100%;
    height: auto;
}

/* Code Blocks - Scrollable */
.post-content pre {
    max-width: 100%;
    overflow-x: auto;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 0.5rem;
    margin: 1.5rem 0;
}

.post-content ul,
.post-content ol {
    margin-bottom: 1.5rem;
    padding-right: 2rem;
}

.post-content li {
    margin-bottom: 0.5rem;
}

.post-content blockquote {
    border-right: 4px solid var(--primary-color, #008080);
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    background: #f8f9fa;
    border-radius: 0.5rem;
    word-wrap: break-word;
}

/* Entry Content Wrapper - Prevent Overflow */
.entry-content {
    overflow-x: hidden;
    max-width: 100%;
}

.entry-content>* {
    max-width: 100%;
}

/* Feature Box */
.feature-box {
    border-right: 4px solid var(--primary-color, #008080);
}

/* Statistics Box */
.stat-box {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

/* Author Bio */
.author-bio {
    transition: transform 0.3s ease;
}

.author-bio:hover {
    transform: translateY(-3px);
}

.author-avatar img {
    width: 80px;
    height: 80px;
    object-fit: cover;
}

/* Comments Section */
.comment-item {
    transition: background-color 0.3s ease;
}

.comment-item:hover {
    background-color: #f8f9fa;
    border-radius: 0.5rem;
    padding: 1rem !important;
}

.comment-form input,
.comment-form textarea {
    border: 1px solid #dee2e6;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.comment-form input:focus,
.comment-form textarea:focus {
    border-color: var(--primary-color, #008080);
    box-shadow: 0 0 0 0.2rem rgba(0, 128, 128, 0.1);
}

/* Sidebar Widgets */
.sidebar-widget {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.sidebar-widget:hover {
    transform: translateY(-3px);
    box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.1) !important;
}

.popular-post {
    transition: background-color 0.3s ease;
}

.popular-post:hover {
    background-color: #f8f9fa;
    border-radius: 0.5rem;
    padding: 0.5rem !important;
}

.popular-post img {
    transition: transform 0.3s ease;
}

.popular-post:hover img {
    transform: scale(1.05);
}

/* Article Cards */
.article-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 1rem 2rem rgba(0, 0, 0, 0.15) !important;
}

.article-img img {
    transition: transform 0.3s ease;
}

.article-card:hover .article-img img {
    transform: scale(1.1);
}

.article-date {
    border-radius: 0.5rem 0 0 0;
}

/* Line Clamp */
.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Share Buttons */
.post-share .btn {
    transition: all 0.3s ease;
}

.post-share .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.1);
}

/* Tags */
.post-tags .badge,
.sidebar-widget .badge {
    transition: all 0.3s ease;
}

.post-tags .badge:hover,
.sidebar-widget .badge:hover {
    background-color: var(--primary-color, #008080) !important;
    color: white !important;
    transform: translateY(-2px);
}

/* Breadcrumb */
.breadcrumb-section {
    border-bottom: 1px solid #e9ecef;
}

.breadcrumb-item+.breadcrumb-item::before {
    content: "←";
    padding: 0 0.5rem;
}

/* Responsive */
@media (max-width: 768px) {
    .post-content {
        font-size: 1rem;
        padding: 1.5rem !important;
    }

    .post-hero-section {
        padding: 2rem 0 !important;
    }

    .author-bio {
        flex-direction: column;
        text-align: center;
    }

    .author-avatar {
        margin: 0 auto;
    }

    /* Extra overflow protection for mobile */
    .post-content table {
        font-size: 0.9rem;
    }

    .post-content table td,
    .post-content table th {
        padding: 0.5rem;
        min-width: 80px;
    }
}

/* Background Colors */
.bg-light-blue {
    background-color: rgba(0, 128, 128, 0.1);
}

.bg-light-green {
    background-color: rgba(40, 167, 69, 0.1);
}

/* Custom Scrollbar for Content */
.post-content::-webkit-scrollbar {
    width: 8px;
}

.post-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.post-content::-webkit-scrollbar-thumb {
    background: var(--primary-color, #008080);
    border-radius: 10px;
}

.post-content::-webkit-scrollbar-thumb:hover {
    background: #006666;
}

/* Print Styles */
@media print {

    .sidebar-widget,
    .post-share,
    .comments-section,
    .related-posts-section,
    .breadcrumb-section {
        display: none;
    }

    .col-lg-8 {
        width: 100%;
    }
}