/* =========================================================
   NEWS DETAIL — PREMIUM LAYOUT
   Scoped ONLY to .news-detail-page
   ========================================================= */


/* =========================================================
   PAGE
   ========================================================= */

.news-detail-page {
    width: 100%;
    max-width: 1300px;
    margin: 0 auto;
    padding: 28px 24px 60px;
    box-sizing: border-box;
}


/* =========================================================
   NEWS HEADER
   ========================================================= */

.news-art-header {
    margin-bottom: 22px;
}

.news-breaking-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    padding: 6px 14px;
    border-radius: 4px;
    background: #cc0000;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: .8px;
    text-transform: uppercase;
    box-shadow: 0 4px 12px rgba(204, 0, 0, .14);
}

.news-category-tag {
    display: inline-block;
    margin-bottom: 10px;
    padding: 5px 10px;
    border: 1px solid #e3e8ee;
    border-radius: 4px;
    background: #f7f9fb;
    color: var(--navy);
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: .7px;
    text-transform: uppercase;
}

.news-detail-page h1 {
    max-width: 1050px;
    margin: 0 0 16px;
    color: var(--navy);
    font-family: var(--serif);
    font-size: clamp(30px, 4vw, 48px);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -.4px;
}

.news-art-byline {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    width: 100%;
    max-width: 1050px;
    margin: 0;
    padding: 11px 0;
    border-top: 1px solid #e6ebf0;
    border-bottom: 1px solid #e6ebf0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.6;
}

.news-art-byline strong {
    color: var(--dark);
}


/* =========================================================
   COVER IMAGE
   ========================================================= */

.news-art-cover {
    display: block;
    width: 100%;
    height: auto;
    max-height: none;
    margin: 0 0 32px;
    border: 1px solid #e4e9ef;
    border-radius: 12px;
    background: #f5f7f9;
    box-shadow: 0 8px 26px rgba(15, 35, 55, .07);
    object-fit: contain;
}


/* =========================================================
   MAIN NEWS LAYOUT
   Sidebar card stretches with content.
   Inner sticky wrapper remains natural height.
   ========================================================= */

.news-detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 32px;
    width: 100%;
    min-height: 0;
    height: auto;
    align-items: stretch;
    position: relative;
    overflow: visible !important;
    box-sizing: border-box;
}


/* =========================================================
   NEWS CONTENT CARD
   ========================================================= */

.news-content-card {
    min-width: 0;
    padding: 32px;
    background: var(--white);
    border: 1px solid #e4e9ef;
    border-radius: 12px;
    box-shadow: 0 5px 18px rgba(15, 35, 55, .055);
    box-sizing: border-box;
}


/* =========================================================
   ARTICLE BODY
   ========================================================= */

.news-article-body {
    min-width: 0;
    color: var(--dark);
    font-size: 16px;
    line-height: 1.85;
}

.news-article-body p {
    margin: 0 0 18px;
}

.news-article-body p:last-child {
    margin-bottom: 0;
}

.news-article-body h2,
.news-article-body h3,
.news-article-body h4,
.news-article-body h5,
.news-article-body h6 {
    margin: 28px 0 14px;
    color: var(--navy);
    font-family: var(--serif);
    font-weight: 700;
    line-height: 1.3;
}

.news-article-body h2 {
    font-size: 28px;
}

.news-article-body h3 {
    font-size: 23px;
}

.news-article-body h4 {
    font-size: 20px;
}

.news-article-body h5 {
    font-size: 18px;
}

.news-article-body h6 {
    font-size: 16px;
}

.news-article-body h2:first-child,
.news-article-body h3:first-child,
.news-article-body h4:first-child {
    margin-top: 0;
}

.news-article-body a {
    color: var(--red);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}

.news-article-body a:hover {
    text-decoration-thickness: 2px;
}

.news-article-body strong {
    font-weight: 700;
}

.news-article-body ul,
.news-article-body ol {
    margin: 0 0 20px;
    padding-left: 24px;
}

.news-article-body li {
    margin-bottom: 8px;
}

.news-article-body blockquote {
    margin: 24px 0;
    padding: 16px 20px;
    border-left: 4px solid var(--red);
    background: #f7f9fb;
    color: var(--dark);
    font-size: 17px;
    font-style: italic;
}

.news-article-body img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 24px auto;
    border-radius: 8px;
}

.news-article-body figure {
    max-width: 100%;
    margin: 24px 0;
}

.news-article-body figure img {
    margin: 0 auto 10px;
}

.news-article-body figcaption {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.5;
    text-align: center;
}

.news-article-body table {
    width: 100%;
    max-width: 100%;
    margin: 24px 0;
    border-collapse: collapse;
    font-size: 14px;
}

.news-article-body th,
.news-article-body td {
    padding: 10px 12px;
    border: 1px solid #e4e9ef;
    text-align: left;
}

.news-article-body th {
    background: #f7f9fb;
    color: var(--navy);
    font-weight: 700;
}

.news-article-body pre {
    max-width: 100%;
    margin: 24px 0;
    padding: 16px;
    overflow-x: auto;
    border-radius: 6px;
    background: #f4f6f8;
    font-size: 13px;
    line-height: 1.6;
}

.news-article-body code {
    font-size: .9em;
}


/* =========================================================
   SUMMARY
   ========================================================= */

.news-summary-quote {
    margin: 0 0 26px !important;
    padding: 16px 18px;
    border-left: 4px solid var(--red);
    background: #f7f9fb;
    color: var(--navy);
    font-size: 17px;
    font-weight: 600;
    line-height: 1.65;
}


/* =========================================================
   SHARE BAR
   ========================================================= */

.news-share-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 30px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.news-share-label {
    color: var(--mid);
    font-size: 13px;
    font-weight: 700;
}

.news-share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 5px 13px;
    border-radius: 4px;
    color: #fff !important;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none !important;
    transition:
            transform .2s ease,
            opacity .2s ease;
}

.news-share-btn:hover {
    transform: translateY(-1px);
    opacity: .9;
}

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

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

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


/* =========================================================
   SINGLE SIDEBAR CARD
   Same premium architecture as Company Detail.
   ========================================================= */

.news-sidebar-card {
    position: relative;
    align-self: stretch;
    width: 100%;
    height: auto;
    min-height: 0;
    padding: 22px 24px;
    background: var(--white);
    border: 1px solid #e4e9ef;
    border-radius: 12px;
    box-shadow: 0 5px 18px rgba(15, 35, 55, .055);
    box-sizing: border-box;
    overflow: visible !important;
}

.news-sidebar-sticky {
    position: sticky;
    top: 100px;
    width: 100%;
    height: max-content;
    box-sizing: border-box;
}


/* =========================================================
   SIDEBAR SECTIONS
   ========================================================= */

.news-sidebar-section {
    width: 100%;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.news-sidebar-section + .news-sidebar-section {
    margin-top: 22px;
    padding-top: 22px;
    border-top: 1px solid #e8edf3;
}

.news-sidebar-section h4 {
    margin: 0 0 16px;
    padding: 0 0 12px;
    border-bottom: 1px solid #e8edf3;
    color: var(--navy);
    font-family: var(--serif);
    font-size: 17px;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: 0;
}


/* =========================================================
   LATEST NEWS
   ========================================================= */

.news-sidebar-item {
    display: flex;
    gap: 11px;
    align-items: flex-start;
    min-width: 0;
    margin: 0 0 14px;
    padding-bottom: 14px;
    border-bottom: 1px solid #edf0f3;
}

.news-sidebar-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: 0;
}

.news-sidebar-item img {
    width: 72px;
    height: 48px;
    flex: 0 0 72px;
    border: 1px solid #e4e9ef;
    border-radius: 5px;
    background: #f5f7f9;
    object-fit: cover;
}

.news-sidebar-item h5 {
    min-width: 0;
    margin: 0;
    font-family: var(--serif);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.4;
}

.news-sidebar-item h5 a {
    color: var(--dark);
    text-decoration: none;
}

.news-sidebar-item h5 a:hover {
    color: var(--red);
}


/* =========================================================
   TOPICS
   ========================================================= */

.news-topic-link {
    display: block;
    padding: 8px 0;
    border-bottom: 1px solid #edf0f3;
    color: var(--dark);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
    text-decoration: none;
    transition:
            color .2s ease,
            padding-left .2s ease;
}

.news-topic-link:hover {
    padding-left: 4px;
    color: var(--red);
}

.news-topic-link:last-child {
    border-bottom: 0;
}


/* =========================================================
   STICKY / FLOW SAFETY
   ========================================================= */

.news-detail-page,
.news-detail-layout,
.news-detail-layout > div,
.news-detail-layout > aside,
.news-sidebar-card,
.news-sidebar-sticky {
    max-height: none;
}

.news-detail-page,
.news-detail-layout,
.news-detail-layout > div,
.news-detail-layout > aside,
.news-sidebar-card {
    overflow: visible !important;
}


/* =========================================================
   DESKTOP
   ========================================================= */

@media (min-width: 1101px) {

    .news-detail-page {
        padding-left: 32px;
        padding-right: 32px;
    }

    .news-detail-layout {
        grid-template-columns: minmax(0, 1fr) 300px;
        gap: 32px;
    }
}


/* =========================================================
   SMALL LAPTOP / TABLET
   ========================================================= */

@media (max-width: 1100px) and (min-width: 901px) {

    .news-detail-page {
        max-width: 100%;
        padding: 22px 20px 50px;
    }

    .news-detail-layout {
        grid-template-columns: minmax(0, 1fr) 270px;
        gap: 24px;
    }

    .news-content-card {
        padding: 26px;
    }

    .news-sidebar-card {
        padding: 20px;
    }

    .news-sidebar-sticky {
        top: 90px;
    }
}


/* =========================================================
   TABLET / MOBILE
   ========================================================= */

@media (max-width: 900px) {

    .news-detail-page {
        max-width: 100%;
        padding: 18px 16px 50px;
    }

    .news-detail-page h1 {
        font-size: clamp(27px, 5vw, 38px);
    }

    .news-detail-layout {
        display: flex;
        flex-direction: column;
        gap: 22px;
        align-items: stretch;
    }

    .news-content-card,
    .news-sidebar-card {
        width: 100%;
    }

    .news-content-card {
        padding: 24px 22px;
    }

    .news-sidebar-card {
        position: static;
        height: auto;
    }

    .news-sidebar-sticky {
        position: static;
        height: auto;
    }
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 600px) {

    .news-detail-page {
        padding: 14px 12px 40px;
    }

    .news-art-header {
        margin-bottom: 18px;
    }

    .news-detail-page h1 {
        font-size: 27px;
        line-height: 1.2;
        letter-spacing: -.2px;
    }

    .news-art-byline {
        font-size: 12px;
    }

    .news-art-cover {
        margin-bottom: 22px;
        border-radius: 8px;
    }

    .news-content-card {
        padding: 20px 17px;
        border-radius: 10px;
    }

    .news-article-body {
        font-size: 16px;
        line-height: 1.8;
    }

    .news-summary-quote {
        padding: 13px 14px;
        font-size: 16px;
    }

    .news-sidebar-card {
        padding: 19px 18px;
        border-radius: 10px;
    }

    .news-share-bar {
        gap: 7px;
    }

    .news-share-btn {
        padding: 6px 11px;
    }
}


/* =========================================================
   VERY SMALL MOBILE
   ========================================================= */

@media (max-width: 420px) {

    .news-detail-page {
        padding-left: 10px;
        padding-right: 10px;
    }

    .news-detail-page h1 {
        font-size: 24px;
    }

    .news-content-card {
        padding: 18px 14px;
    }

    .news-sidebar-card {
        padding: 17px 15px;
    }

    .news-sidebar-item img {
        width: 66px;
        height: 44px;
        flex-basis: 66px;
    }
}


/* =========================================================
   END NEWS DETAIL CSS
   ========================================================= */