/*=========================================
SINGLE POST STYLES - FIXED & RESPONSIVE
=========================================*/

/* Main Layout Centered & Aligned with Header */
.single-content-wrapper {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 30px;
    margin: 20px auto;
    width: 1400px;
    max-width: 95%;
    box-sizing: border-box;
    direction: rtl; /* اردو لے آؤٹ */
}

.content-area {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    padding: 25px;
    box-sizing: border-box;
    width: 100%;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
}

/* HEADER - COMPACT & NO EXTRA GAPS */
.entry-header {
    margin-bottom: 18px;
    padding: 0;
}

.entry-header .post-category,
.entry-header .cat-links {
    display: none !important;
}

.entry-title {
    font-family: "Jameel Noori Nastaleeq", "Urdu Typesetting", serif;
    font-size: 38px;
    line-height: 1.4;
    color: #111;
    margin: 0 0 10px;
    padding: 0;
    font-weight: 700;
    text-align: right;
}

.entry-meta {
    color: #777;
    font-size: 14px;
    border-bottom: 1px solid #eee;
    padding-bottom: 12px;
    margin-bottom: 20px;
    text-align: right;
}

/* FEATURED IMAGE - PERFECT 16:9 RATIO & STYLISH LINE */
.featured-image {
    margin-bottom: 25px;
    position: relative;
    padding-bottom: 10px;
    border-bottom: 3px solid #bb1919; /* ریڈ نچلی لائن */
}

.featured-image::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 100%;
    height: 1px;
    background: #e5e5e5;
    z-index: -1;
}

.featured-image img {
    width: 100%;
    max-width: 100%;
    aspect-ratio: 16 / 9; /* پرفیکٹ 16:9 ریشو */
    height: auto;
    object-fit: cover; /* فریم میں تصویر خود بخود فٹ ہوگی */
    display: block;
    border-radius: 6px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
}

/* CONTENT AREA */
.entry-content {
    font-family: "Jameel Noori Nastaleeq", "Urdu Typesetting", serif;
    font-size: 28px;
    line-height: 1.9;
    color: #222;
    text-align: right;
    overflow-wrap: break-word;
    word-break: break-word;
}

.entry-content p {
    margin-bottom: 18px;
}

.entry-content h2 {
    font-size: 32px;
    margin: 25px 0 12px;
    line-height: 1.4;
    color: #bb1919;
    border-right: 4px solid #bb1919;
    padding-right: 10px;
}

.entry-content h3 {
    font-size: 28px;
    margin: 20px 0 10px;
    line-height: 1.4;
    color: #111;
}

.entry-content img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    margin: 15px 0;
}

/*=========================================
DYNAMIC EMBEDS & VIDEO FIXES
=========================================*/

/* General iFrames Container Reset */
.entry-content iframe,
.entry-content embed,
.entry-content object,
.entry-content video {
    max-width: 100% !important;
    margin: 15px auto !important;
    display: block;
    border-radius: 6px;
}

/* YouTube & Standard Landscape Videos (16:9) */
.entry-content iframe[src*="youtube.com"],
.entry-content iframe[src*="youtu.be"],
.entry-content iframe[src*="vimeo.com"],
.entry-content .wp-block-embed-youtube iframe {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 16 / 9 !important;
}

/* Facebook Reels & Vertical Short Videos (9:16 Original Ratio) */
.entry-content iframe[src*="facebook.com/plugins/video.php"] {
    width: 100% !important;
    max-width: 350px !important;
    height: auto !important;
    aspect-ratio: 9 / 16 !important;
    margin: 20px auto !important;
}

/* Social Embeds Alignment Fix (X/Twitter, Instagram, FB) */
.entry-content .twitter-tweet,
.entry-content .fb-post,
.entry-content .fb-video,
.entry-content .instagram-media {
    margin-left: auto !important;
    margin-right: auto !important;
    max-width: 100% !important;
}

.entry-content table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
    border-collapse: collapse;
}

.entry-content ul,
.entry-content ol {
    margin: 15px 30px 15px 0;
    padding: 0;
}

.entry-content li {
    margin-bottom: 8px;
}

/*=========================================
STYLISH POST SHARE
=========================================*/

.post-share {
    width: 100%;
    margin: 35px 0 15px;
    padding: 20px 15px;
    background: #fafafa;
    border: 1px solid #eaeaea;
    border-radius: 8px;
    text-align: center;
    box-sizing: border-box;
}

.post-share h3 {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 15px;
    color: #222;
}

.share-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.share-buttons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 150px;
    height: 45px;
    padding: 0 18px;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.3s ease;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.08);
}

.share-buttons a:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 12px rgba(0, 0, 0, 0.12);
}

.share-facebook { background: #1877f2; }
.share-facebook:hover { background: #0d65d9; }

.share-whatsapp { background: #25d366; }
.share-whatsapp:hover { background: #1eb857; }

.share-x { background: #111; }
.share-x:hover { background: #333; }

.share-copy { background: #ff8a00; }
.share-copy:hover { background: #e87500; }

/*=========================================
RELATED POSTS
=========================================*/

.related-posts {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 2px solid #f0f0f0;
}

.related-posts h2 {
    border-right: 4px solid #bb1919;
    padding-right: 10px;
    margin-bottom: 20px;
    font-size: 22px;
    color: #111;
    text-align: right;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.related-item {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 6px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.related-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

.related-item img {
    width: 100%;
    aspect-ratio: 16 / 9; /* متعلقہ خبروں کی تصاویر بھی 16:9 */
    object-fit: cover;
    display: block;
}

.related-item h3 {
    padding: 10px 12px;
    font-size: 16px;
    line-height: 1.5;
    margin: 0;
    color: #222;
    text-align: right;
}

/*=========================================
RESPONSIVE DESIGN (MEDIA QUERIES)
=========================================*/

@media (max-width: 992px) {
    .single-content-wrapper {
        display: block !important;
        width: 100%;
    }

    .content-area {
        padding: 20px;
    }

    .related-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    html, body {
        overflow-x: hidden;
    }

    .entry-title {
        font-size: 30px;
    }

    .entry-content {
        font-size: 24px;
    }

    .share-buttons {
        flex-direction: column;
        width: 100%;
    }

    .share-buttons a {
        width: 100%;
        min-width: 100%;
    }
}

@media (max-width: 576px) {
    .entry-title {
        font-size: 26px;
    }

    .entry-content {
        font-size: 22px;
    }

    .related-grid {
        grid-template-columns: 1fr;
    }

    .content-area {
        padding: 15px;
    }
}