/* ============================================
   NEWS DETAIL PAGE - LAYOUT IMPROVEMENTS
   ============================================ */

/* Main Content Spacing */
.wrap__article-detail {
    margin-bottom: 2rem;
}

/* Section Separators - Cleaner Visual Hierarchy */
.comments-area,
.post-navigation,
.related-article {
    margin-top: 3rem !important;
    padding-top: 2.5rem !important;
    border-top: 2px solid rgba(15, 23, 42, 0.08) !important;
}

/* Blog Tags Section */
.blog-tags {
    margin: 2.5rem 0 !important;
    padding: 1.75rem !important;
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%) !important;
    border-radius: 14px !important;
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.03) !important;
    border: 1px solid rgba(15, 23, 42, 0.06) !important;
}

.blog-tags .d-flex {
    gap: 0.5rem;
}

.tag-badge {
    margin: 0.3rem !important;
    transition: all 0.25s ease !important;
}

.tag-badge:hover {
    transform: translateY(-3px) !important;
}

/* ============================================
   CAROUSEL CARD HEIGHT FIX
   ============================================ */

/* Reduce overall card height from 360px to ~280px */
.related-article .article__entry-carousel-three .item {
    max-height: none !important;
    /* Remove any max-height constraint */
}

.related-article .article__entry {
    display: flex !important;
    flex-direction: column !important;
    height: auto !important;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(15, 23, 42, 0.08);
    transition: all 0.3s ease;
}

.related-article .article__entry:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.15);
}

/* Image Section - Reduce from 200px to 160px */
.related-article .article__entry .article__image {
    overflow: hidden !important;
    max-width: 100% !important;
    width: 100% !important;
    height: 160px !important;
    /* Reduced from 200px */
    flex-shrink: 0;
}

.related-article .article__entry .article__image img {
    max-width: 100% !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}

/* Content Section - Compact Layout */
.related-article .article__entry .article__content {
    overflow: hidden !important;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 1rem !important;
    /* Reduced from 1.5rem */
    display: flex !important;
    flex-direction: column !important;
    gap: 0.5rem !important;
    /* Critical: removes large gap */
    flex-grow: 1;
}

/* Title - Better Spacing */
.related-article .article__entry .article__content h5 {
    overflow: hidden !important;
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 !important;
    font-size: 0.95rem !important;
    line-height: 1.4 !important;
    font-weight: 600 !important;
    color: #0f1f3d !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    /* Limit to 2 lines */
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.related-article .article__entry .article__content h5 a {
    color: inherit !important;
    text-decoration: none !important;
    transition: color 0.2s ease !important;
}

.related-article .article__entry .article__content h5 a:hover {
    color: var(--colorPrimary) !important;
}

/* Metadata - Compact */
.related-article .article__entry .article__content .list-inline {
    margin: 0 !important;
    padding: 0 !important;
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 0.5rem !important;
    font-size: 0.8rem !important;
    color: #64748b !important;
}

.related-article .article__entry .article__content .list-inline-item {
    margin: 0 !important;
    padding: 0 !important;
}

/* ============================================
   TAGS, AUTHOR & LOGIN SECTION IMPROVEMENTS
   ============================================ */

/* Blog Tags Below Content - Cleaner Layout */
.wrap__article-detail .blog-tags {
    margin: 2rem 0 !important;
    padding: 1.25rem 1.5rem !important;
}

.wrap__article-detail .blog-tags .tags-label {
    font-weight: 600 !important;
    color: #0f1f3d !important;
    margin-right: 0.75rem !important;
    font-size: 0.95rem !important;
}

.wrap__article-detail .blog-tags .list-inline {
    display: inline-flex !important;
    flex-wrap: wrap !important;
    gap: 0.5rem !important;
}

/* Author Highlight - Compact */
.author-highlight {
    margin: 2.5rem 0 !important;
    padding: 1.5rem !important;
    /* Reduced from 2rem */
    border-left: 4px solid var(--colorPrimary) !important;
    background: #f9fafb !important;
    border-radius: 10px !important;
}

.author-highlight .media {
    align-items: center !important;
}

.author-highlight .media img {
    width: 80px !important;
    /* Reduced from 120px */
    height: 80px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    margin-right: 1.25rem !important;
}

.author-highlight .media-body h5 {
    font-size: 1.1rem !important;
    margin-bottom: 0.25rem !important;
    font-weight: 600 !important;
}

.author-highlight .media-body p {
    font-size: 0.9rem !important;
    color: #64748b !important;
    margin: 0 !important;
}

/* Login Reminder - More Prominent */
.login-reminder-card {
    background: linear-gradient(135deg, #fff9e6 0%, #fffef7 100%) !important;
    border: 2px dashed var(--colorPrimary) !important;
    border-radius: 12px !important;
    padding: 1.5rem 2rem !important;
    margin: 2rem 0 !important;
    text-align: center !important;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.1) !important;
}

.login-reminder-card h5 {
    font-size: 1.1rem !important;
    font-weight: 600 !important;
    color: #0f1f3d !important;
    margin: 0 !important;
    line-height: 1.5 !important;
}

.login-reminder-card h5 i {
    color: var(--colorPrimary) !important;
    margin-right: 0.5rem !important;
}


/* Widget Spacing in Sidebar */
.wrapper__list__article-small,
.widget {
    margin-bottom: 2rem !important;
}

.wrapper__list__article-small:last-child,
.widget:last-child {
    margin-bottom: 0 !important;
}

/* Section Titles - Consistent Design */
.related-article h4 {
    font-size: 1.5rem !important;
    font-weight: 700 !important;
    margin-bottom: 1.75rem !important;
    padding-bottom: 1rem !important;
    border-bottom: 3px solid var(--colorPrimary) !important;
    color: #0f1f3d !important;
}

.comments-title {
    font-size: 1.4rem !important;
    font-weight: 700 !important;
    margin-bottom: 1.5rem !important;
    padding-bottom: 0.85rem !important;
    border-bottom: 3px solid var(--colorPrimary) !important;
    color: #0f1f3d !important;
}

.widget h5 {
    font-size: 1.2rem !important;
    font-weight: 700 !important;
    margin-bottom: 1.25rem !important;
    padding-bottom: 0.75rem !important;
    border-bottom: 2px solid var(--colorPrimary) !important;
    color: #0f1f3d !important;
}

/* Post Navigation Enhanced */
.post-navigation {
    margin-top: 3rem !important;
    margin-bottom: 3rem !important;
    padding-top: 2.5rem !important;
}

.post-navigation-card {
    min-height: 120px !important;
    padding: 1.5rem !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.post-navigation-card:hover {
    border-color: var(--colorPrimary) !important;
    background: #f9fafb !important;
}

.post-navigation-card p {
    line-height: 1.6 !important;
    margin-top: 0.5rem !important;
    font-size: 1rem !important;
}

.post-navigation-card span {
    font-size: 0.8rem !important;
    letter-spacing: 0.05em !important;
    color: var(--colorPrimary) !important;
}


/* ============================================
   SIDEBAR NEWS CARDS - IMPROVED LAYOUT
   ============================================ */

/* Card Container - Better Structure */
.wrapper__list__article-small .card__post-list {
    display: flex !important;
    align-items: flex-start !important;
    gap: 1rem !important;
    padding: 0.85rem !important;
    margin-bottom: 1rem !important;
    transition: all 0.3s ease !important;
    border-radius: 8px !important;
    background: #fff !important;
    border: 1px solid rgba(15, 23, 42, 0.06) !important;
}

.wrapper__list__article-small .card__post-list:hover {
    transform: translateY(-3px) !important;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.12) !important;
    border-color: rgba(76, 175, 80, 0.3) !important;
}

/* Image Section - LARGER SIZE (40% instead of 28%) */
.wrapper__list__article-small .card__post-list .image-sm {
    flex: 0 0 40% !important;
    /* Increased from 28% */
    max-width: 40% !important;
    height: 90px !important;
    /* Fixed height for consistency */
    overflow: hidden !important;
    border-radius: 6px !important;
}

.wrapper__list__article-small .card__post-list .image-sm img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    transition: transform 0.3s ease !important;
}

.wrapper__list__article-small .card__post-list:hover .image-sm img {
    transform: scale(1.05) !important;
}

/* Content Section - Better Spacing */
.wrapper__list__article-small .card__post-list .card__post__body {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 0.5rem !important;
    min-width: 0 !important;
    /* Prevent overflow */
}

/* Author Info - NEAT ARRANGEMENT */
.wrapper__list__article-small .card__post__author-info {
    margin: 0 !important;
    padding: 0 !important;
}

.wrapper__list__article-small .card__post__author-info .list-inline {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 0.35rem !important;
    margin: 0 !important;
    padding: 0 !important;
    font-size: 0.75rem !important;
    color: #64748b !important;
    line-height: 1.3 !important;
}

.wrapper__list__article-small .card__post__author-info .list-inline-item {
    margin: 0 !important;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
}

/* "by" text styling */
.wrapper__list__article-small .card__post__author-info .list-inline-item:first-child {
    font-weight: 400 !important;
    color: #94a3b8 !important;
}

/* Author name styling */
.wrapper__list__article-small .card__post__author-info .list-inline-item a {
    font-weight: 600 !important;
    color: var(--colorPrimary) !important;
    text-decoration: none !important;
    transition: color 0.2s ease !important;
}

.wrapper__list__article-small .card__post__author-info .list-inline-item a:hover {
    color: #059669 !important;
    text-decoration: underline !important;
}

/* Date styling */
.wrapper__list__article-small .card__post__author-info .list-inline-item:last-child {
    color: #64748b !important;
    font-weight: 400 !important;
}

/* Title - Better Typography */
.wrapper__list__article-small .card__post__title {
    margin: 0 !important;
    padding: 0 !important;
}

.wrapper__list__article-small .card__post__title h6 {
    margin: 0 !important;
    font-size: 0.9rem !important;
    line-height: 1.45 !important;
    font-weight: 600 !important;
    color: #0f1f3d !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    /* Limit to 2 lines */
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.wrapper__list__article-small .card__post__title h6 a {
    color: inherit !important;
    text-decoration: none !important;
    transition: color 0.2s ease !important;
}

.wrapper__list__article-small .card__post__title h6 a:hover {
    color: var(--colorPrimary) !important;
}

/* Responsive Adjustments for Sidebar Cards */
@media (max-width: 767.98px) {
    .wrapper__list__article-small .card__post-list .image-sm {
        flex: 0 0 35% !important;
        max-width: 35% !important;
        height: 80px !important;
    }

    .wrapper__list__article-small .card__post__title h6 {
        font-size: 0.85rem !important;
    }

    .wrapper__list__article-small .card__post__author-info .list-inline {
        font-size: 0.7rem !important;
    }
}

@media (max-width: 575.98px) {
    .wrapper__list__article-small .card__post-list {
        padding: 0.75rem !important;
        gap: 0.85rem !important;
    }

    .wrapper__list__article-small .card__post-list .image-sm {
        height: 75px !important;
    }
}

/* Share Buttons - Better Spacing */
.total-views {
    margin: 1.5rem 0 !important;
}

.total-views .list-inline {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 0.75rem !important;
    margin-top: 1rem !important;
}

.total-views .list-inline-item {
    margin: 0 !important;
}

.total-views .btn {
    padding: 0.65rem 1.25rem !important;
    border-radius: 8px !important;
    font-size: 0.9rem !important;
    font-weight: 600 !important;
    transition: all 0.3s ease !important;
}

.total-views .btn:hover {
    transform: translateY(-3px) !important;
}

/* Article Content Polish */
.wrap__article-detail-content {
    line-height: 1.8 !important;
    font-size: 1.05rem !important;
    color: #334155 !important;
}

.wrap__article-detail-content p {
    margin-bottom: 1.25rem !important;
}

/* Comments Section */
.comments-area {
    background: #fafbfc;
    padding: 2rem;
    border-radius: 12px;
    margin-top: 3rem !important;
}

.comment {
    background: #fff !important;
    border-radius: 10px !important;
    padding: 1.5rem !important;
    margin-bottom: 1.5rem !important;
    border-left: 3px solid var(--colorPrimary) !important;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04) !important;
}

/* Ads Blocks */
.wrapper__list__article-small-ads {
    margin-bottom: 2rem !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08) !important;
}

/* Responsive Adjustments */
@media (max-width: 991.98px) {
    .related-article h4 {
        font-size: 1.3rem !important;
    }

    .comments-title {
        font-size: 1.2rem !important;
    }
}

@media (max-width: 767.98px) {

    .comments-area,
    .post-navigation,
    .related-article {
        margin-top: 2rem !important;
        padding-top: 1.75rem !important;
    }

    .blog-tags {
        padding: 1.25rem !important;
    }

    .wrapper__list__article-small,
    .widget {
        margin-bottom: 1.5rem !important;
    }

    .post-navigation-card {
        min-height: 100px !important;
        padding: 1.25rem !important;
    }

    .total-views .list-inline {
        gap: 0.5rem !important;
    }

    .total-views .btn {
        padding: 0.55rem 1rem !important;
        font-size: 0.85rem !important;
    }
}

@media (max-width: 575.98px) {

    .related-article h4,
    .comments-title {
        font-size: 1.15rem !important;
    }

    .widget h5 {
        font-size: 1.05rem !important;
    }

    .wrap__article-detail-content {
        font-size: 1rem !important;
    }
}