/* ============================================
   Enhanced Single Post Design - CSS Styles
   Add this to your child theme's style.css
   ============================================ */

/* ======================================
   CRITICAL FIX: Featured Image in Content
   Prevents the image from being cut/cropped
   ====================================== */

/* Fix for Enfold theme big-preview image container */
.single .big-preview.single-big,
.single-post .big-preview.single-big,
.template-single-blog .big-preview.single-big,
.template-single-blog .entry-content-wrapper .big-preview {
    position: relative !important;
    overflow: visible !important;
    height: auto !important;
    max-height: none !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    width: 100% !important;
    margin: 0 0 30px 0 !important;
    float: none !important;
}

/* Fix for the link wrapper around image */
.single .big-preview.single-big a,
.single-post .big-preview.single-big a,
.template-single-blog .big-preview a {
    position: relative !important;
    display: block !important;
    height: auto !important;
    padding-bottom: 0 !important;
    padding-top: 0 !important;
    overflow: visible !important;
    width: 100% !important;
}

/* Fix for the actual image */
.single .big-preview img,
.single .big-preview.single-big img,
.single-post .big-preview img,
.template-single-blog .big-preview img,
.template-single-blog .entry-content-wrapper img.wp-post-image {
    position: relative !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: auto !important;
    max-width: 100% !important;
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    transform: none !important;
    border-radius: 8px;
}

/* Remove any Enfold aspect ratio constraints */
.single .big-preview.single-big .av-inner-masonry,
.template-single-blog .av-inner-masonry {
    position: relative !important;
    height: auto !important;
    padding-bottom: 0 !important;
}

/* Hero Section */
.post-hero-section {
    position: relative;
    width: 100vw;
    margin: 0 0 50px 0;
    padding: 0;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
}

.post-hero-image {
    position: relative;
    width: 100%;
    height: 500px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.post-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.7) 100%);
    display: flex;
    align-items: flex-end;
    padding: 60px 0;
}

.post-hero-content {
    max-width: 800px;
    color: #ffffff;
}

.post-hero-category {
    margin-bottom: 20px;
}

.category-badge {
    display: inline-block;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    color: #ffffff;
    text-decoration: none;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-right: 10px;
    transition: all 0.3s ease;
}

.category-badge:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.post-hero-title {
    font-size: 48px;
    font-weight: 800;
    line-height: 1.2;
    margin: 0 0 25px 0;
    color: #ffffff;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.post-hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 25px;
    font-size: 15px;
    color: rgba(255, 255, 255, 0.9);
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.meta-item svg {
    opacity: 0.8;
}

/* Social Sharing Sidebar */
.social-sharing-sidebar {
    position: fixed;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 100;
}

.social-sharing-sticky {
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: #ffffff;
    padding: 15px 10px;
    border-radius: 50px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.share-button {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #f3f4f6;
    color: #6b7280;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

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

.share-facebook {
    background: #1877f2;
    color: #ffffff;
}

.share-facebook:hover {
    background: #0d5dbd;
}

.share-twitter {
    background: #1da1f2;
    color: #ffffff;
}

.share-twitter:hover {
    background: #0c85d0;
}

.share-linkedin {
    background: #0077b5;
    color: #ffffff;
}

.share-linkedin:hover {
    background: #005885;
}

.share-whatsapp {
    background: #25d366;
    color: #ffffff;
}

.share-whatsapp:hover {
    background: #1da851;
}

.share-copy:hover {
    background: #6366f1;
    color: #ffffff;
}

/* Content Area Improvements */
.template-single-blog .content {
    background: #ffffff;
    padding: 50px 60px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

/* Typography Enhancements */
.template-single-blog .entry-content {
    font-size: 18px;
    line-height: 1.8;
    color: #374151;
}

.template-single-blog .entry-content h2 {
    font-size: 32px;
    font-weight: 700;
    margin: 40px 0 20px;
    color: #111827;
    line-height: 1.3;
}

.template-single-blog .entry-content h3 {
    font-size: 26px;
    font-weight: 600;
    margin: 35px 0 18px;
    color: #1f2937;
}

.template-single-blog .entry-content h4 {
    font-size: 22px;
    font-weight: 600;
    margin: 30px 0 15px;
    color: #374151;
}

.template-single-blog .entry-content p {
    margin-bottom: 25px;
}

.template-single-blog .entry-content a {
    color: #2563eb;
    text-decoration: underline;
    transition: color 0.2s ease;
}

.template-single-blog .entry-content a:hover {
    color: #1d4ed8;
}

.template-single-blog .entry-content img {
    border-radius: 8px;
    margin: 30px 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.template-single-blog .entry-content blockquote {
    border-left: 4px solid #2563eb;
    padding: 20px 30px;
    margin: 30px 0;
    background: #f9fafb;
    border-radius: 0 8px 8px 0;
    font-style: italic;
    color: #4b5563;
}

.template-single-blog .entry-content ul,
.template-single-blog .entry-content ol {
    margin: 25px 0;
    padding-left: 30px;
}

.template-single-blog .entry-content li {
    margin-bottom: 12px;
    line-height: 1.7;
}

/* Author Info Box */
.author-info-box {
    display: flex;
    gap: 25px;
    padding: 35px;
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    border-radius: 12px;
    margin: 50px 0 40px;
    border: 1px solid #e5e7eb;
}

.author-avatar {
    flex-shrink: 0;
}

.author-avatar img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid #ffffff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.author-details {
    flex: 1;
}

.author-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #6b7280;
    font-weight: 600;
    margin-bottom: 5px;
}

.author-name {
    font-size: 24px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 12px 0;
}

.author-bio {
    font-size: 15px;
    line-height: 1.6;
    color: #4b5563;
    margin: 0 0 15px 0;
}

.author-meta {
    display: flex;
    gap: 20px;
    font-size: 14px;
    color: #6b7280;
}

.author-posts-count {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Related Posts Section Enhancement */
.template-single-blog .related_posts {
    margin-top: 60px;
    padding-top: 50px;
    border-top: 2px solid #e5e7eb;
}

.template-single-blog .related_posts h3 {
    font-size: 28px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 30px;
}

/* Comments Section */
.template-single-blog #comments {
    margin-top: 60px;
    padding-top: 50px;
    border-top: 2px solid #e5e7eb;
}

/* Post Tags */
.template-single-blog .post-meta-infos .tag_list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 30px 0;
}

.template-single-blog .post-meta-infos .tag_list a {
    display: inline-block;
    padding: 8px 16px;
    background: #f3f4f6;
    color: #4b5563;
    text-decoration: none;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.template-single-blog .post-meta-infos .tag_list a:hover {
    background: #2563eb;
    color: #ffffff;
    transform: translateY(-2px);
}

/* Responsive Design */
@media (max-width: 1200px) {
    .social-sharing-sidebar {
        left: 10px;
    }
}

@media (max-width: 989px) {
    .post-hero-title {
        font-size: 36px;
    }
    
    .post-hero-image {
        height: 400px;
    }
    
    .template-single-blog .content {
        padding: 40px 40px;
    }
    
    .social-sharing-sidebar {
        position: relative;
        left: auto;
        top: auto;
        transform: none;
        margin: 30px auto;
        width: fit-content;
    }
    
    .social-sharing-sticky {
        flex-direction: row;
        padding: 10px 15px;
    }
}

@media (max-width: 767px) {
    .post-hero-title {
        font-size: 28px;
    }
    
    .post-hero-image {
        height: 350px;
    }
    
    .post-hero-meta {
        font-size: 13px;
        gap: 15px;
    }
    
    .template-single-blog .content {
        padding: 30px 20px;
    }
    
    .template-single-blog .entry-content {
        font-size: 16px;
    }
    
    .template-single-blog .entry-content h2 {
        font-size: 26px;
    }
    
    .template-single-blog .entry-content h3 {
        font-size: 22px;
    }
    
    .author-info-box {
        flex-direction: column;
        text-align: center;
        padding: 25px;
    }
    
    .author-meta {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .post-hero-title {
        font-size: 24px;
    }
    
    .post-hero-image {
        height: 300px;
    }
    
    .post-hero-overlay {
        padding: 30px 0;
    }
    
    .category-badge {
        font-size: 12px;
        padding: 6px 12px;
    }
    
    .share-button {
        width: 40px;
        height: 40px;
    }
}

/* Print Styles */
@media print {
    .social-sharing-sidebar,
    .post-hero-category,
    .related_posts,
    #comments {
        display: none;
    }
    
    .post-hero-overlay {
        background: rgba(0,0,0,0.5);
    }
}