/* ==========================================================================
   news.css — News listing (news/index.htm) and news detail pages
   (news/*.htm). A 1:1 port of the enago.com/publishers/resources UI
   (Next.js + Bootstrap 5) onto this Bootstrap 3 site.

   Everything is scoped under .enago-news so nothing leaks into the shared
   header/footer. The site-wide css/open-sans-global.css forces
   `body *{font-family:...!important}` and enago-kr.css sets global
   a / p / strong / h1 rules, so the typography below re-asserts the source
   values with !important at a higher specificity.

   Direction: written with logical properties (margin-inline-*, text-align:
   start) so the same rules serve LTR (/en/news/) and RTL (/news/). The only
   physical flips are in section 6.
   ========================================================================== */

/* ---- 0. fonts / base (source: body{font-family:Inter;font-size:16px;line-height:1.7}) ---- */
.enago-news,
.enago-news * {
    font-family: 'Inter', 'IBM Plex Sans Arabic', 'Segoe UI', Tahoma, Arial, sans-serif !important;
}

.enago-news {
    font-size: 18px;
    line-height: 1.5;
    color: #212529;
    background: #fff;
}

.enago-news *,
.enago-news *::before,
.enago-news *::after {
    box-sizing: border-box;
}

.enago-news p {
    margin: 0 0 16px;
    font-size: 18px;
    line-height: 1.5;
    word-break: normal;
    color: #212529;
}

.enago-news strong,
.enago-news b {
    font-weight: bolder;
}

.enago-news a {
    color: #0d6efd;
    text-decoration: underline;
}

.enago-news a:hover {
    color: #0a58ca;
    text-decoration: underline;
}

.enago-news img {
    vertical-align: middle;
}

/* Container as rendered on the source: 1140px wide with 15px gutters */
.enago-news .container {
    width: 100%;
    max-width: 1140px;
    padding-inline: 15px;
    margin-inline: auto;
}

@media (min-width: 576px) { .enago-news .container { max-width: 540px; } }
@media (min-width: 768px) { .enago-news .container { max-width: 720px; } }
@media (min-width: 992px) { .enago-news .container { max-width: 960px; } }
@media (min-width: 1200px) { .enago-news .container { max-width: 1140px; } }

.enago-news .container::before,
.enago-news .container::after {
    content: none;
}

.enago-news .nw-row {
    display: flex;
    flex-wrap: wrap;
    margin-inline: -15px;
}

/* Headings: IBM Plex Sans Arabic (covers Latin + Arabic) */
.enago-news .nw-serif,
.enago-news .cwg_heading1,
.enago-news .banner_subtitle,
.enago-news .news-card__title,
.enago-news .detail-section h1 {
    font-family: 'IBM Plex Sans Arabic', 'Segoe UI', Tahoma, Arial, sans-serif !important;
}


/* ==========================================================================
   1. Top banner (source: section.home_banner_component)
   ========================================================================== */
.enago-news .home_banner_component {
    position: relative;
    padding: 30px 0;
    background-color: #F9F0E9;
    overflow: hidden;
}

/* background art on a layer so RTL can mirror it without mirroring the text */
.enago-news .home_banner_component::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: var(--nw-banner);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 0;
}

.enago-news .home_banner_component > .container {
    position: relative;
    z-index: 1;
}

.enago-news .home_banner_component .nw-row {
    align-items: center;
}

.enago-news .home_banner_component .nw-col-banner {
    width: 100%;
    padding-inline: 15px;
}

@media (min-width: 768px) {
    .enago-news .home_banner_component .nw-col-banner {
        width: 58.33333333%;
    }
}

.enago-news .home_banner_component .banner_info {
    display: flex;
    min-height: 360px;
    align-items: center;
    justify-content: flex-start;
    text-align: start;
    width: 100%;
}

.enago-news .home_banner_component .banner_info.width_450 {
    max-width: 450px;
}

.enago-news .cwg_heading1 {
    color: #283341 !important;
    font-size: 60px !important;
    font-style: normal;
    font-weight: 700 !important;
    line-height: 110% !important;
    margin: 0 0 8px !important;
    padding: 0;
    line-break: auto;
}

.enago-news .banner_subtitle {
    color: #db2f28 !important;
    font-size: 40px !important;
    font-style: italic;
    font-weight: 500 !important;
    line-height: 110% !important;
    margin: -10px 0 0 !important;
    padding: 0;
}

@media screen and (max-width: 992px) {
    .enago-news .home_banner_component .banner_info.width_450 {
        max-width: 350px;
    }
}

@media screen and (max-width: 767px) {
    .enago-news .cwg_heading1 {
        font-size: 36px !important;
        line-height: 46px !important;
    }
}


/* ==========================================================================
   2. News grid (source: section.ai_service_component.pt-5.pb-5 > .masonry-news)
   ========================================================================== */
.enago-news .ai_service_component {
    padding-top: 48px;
    padding-bottom: 48px;
}

.enago-news .masonry-news {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
    max-width: 1140px;
    margin: 0 auto;
    padding: 28px 15px 56px;
}

@media screen and (max-width: 991px) {
    .enago-news .masonry-news {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media screen and (max-width: 575px) {
    .enago-news .masonry-news {
        grid-template-columns: 1fr;
        padding: 20px 15px 40px;
    }
}

.enago-news .news-card {
    position: relative;
    overflow: hidden;
    min-height: 466px;
    display: flex;
    flex-direction: column;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 4px 20px 9px rgb(0 0 0 / 13%);
}

.enago-news .news-card__image {
      position: relative;
    /* overflow: hidden; */
    display: block;
    height: 200px;
    background: #f3eee8;
}

.enago-news .news-card__image img {
      position: absolute;
    inset: 0;
    width: auto !important;
    height: 100% !important;
    max-width: 100%;
    object-fit: cover;
    display: block;
    margin: 0 auto;
}

.enago-news .news-card__body {
    display: flex;
    flex: 1 1;
    flex-direction: column;
    padding: 20px 22px 32px;
}

.enago-news .news-card__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: #5f6670;
    font-size: 12px !important;
    line-height: 1.4;
    margin-bottom: 14px;
}

.enago-news .news-card__meta span {
    font-size: 12px !important;
    color: #5f6670;
}

.enago-news .news-card__title,
.enago-news .news-card__title:focus {
       color: #283341 !important;
    font-size: 20px !important;
    font-style: normal;
    font-weight: 400 !important;
    line-height: 150% !important;
    text-decoration: none !important;
}

.enago-news .news-card__title:hover {
    color: #00f !important;
    text-decoration: none !important;
}

.enago-news .news-card__link,
.enago-news .news-card__link:focus {
    display: inline-flex;
    align-items: center;
    align-self: flex-end;
    gap: 8px;
    color: #00f !important;
    font-size: 12px !important;
    font-weight: 500;
    line-height: 1;
    margin-top: auto;
    text-decoration: none !important;
    text-underline-offset: 2px;
    position: absolute;
    bottom: 20px;
}

.enago-news .news-card__link span {
    display: inline-block;
    font-size: 18px !important;
    line-height: 0;
    text-decoration: none;
    transition: transform .2s ease;
}

.enago-news .news-card__link:hover {
    color: #db2f28 !important;
    text-decoration: none !important;
}

.enago-news .news-card__link:hover span {
    transform: translateX(3px);
}


/* ==========================================================================
   3. Breadcrumb (source: section.breadcrumb-main.section-breadcrumb-bg-color)
   ========================================================================== */
.enago-news.section-breadcrumb-bg-color,
.enago-news .section-breadcrumb-bg-color {
    background-color: #fcf1ff;
    padding: 7px 0;
}

.enago-news .breadcrumb {
    display: flex;
    flex-wrap: wrap;
    padding: 0;
    margin: 0 !important;
    list-style: none;
    background: none;
    border-radius: 0;
}

.enago-news .breadcrumb > li {
    display: list-item;
    font-size: 16px;
    line-height: 1.7;
}

.enago-news .breadcrumb-item + .breadcrumb-item {
    padding-inline-start: 8px;
}

/* Bootstrap 3 also draws a "/" via `.breadcrumb>li+li:before`; replace it with the BS5 one */
.enago-news .breadcrumb > li + li::before {
    content: none;
    padding: 0;
}

.enago-news .breadcrumb-item + .breadcrumb-item::before {
    content: "/";
    float: inline-start;
    padding-inline-end: 8px;
    color: #6c757d;
}

.enago-news .breadcrumb-item.active,
.enago-news .breadcrumb-item.active span {
    color: #6c757d;
}


/* ==========================================================================
   4. Detail page (source: main.newspost.page-content)
   ========================================================================== */
.enago-news.newspost {
    padding: 50px 0;
}

.enago-news .detail-section {
    text-align: start;
}

.enago-news .detail-section.pb5 {
    padding-bottom: 5px;
}

.enago-news .detail-section .detailsection {
    width: 90%;
    margin: 0 auto;
    padding-inline: 15px;
}

.enago-news .detail-section h1 {
    color: #283341 !important;
    font-size: 48px !important;
    font-style: normal;
    font-weight: 500 !important;
    line-height: 110% !important;
    margin: 0 0 8px !important;
    padding: 0;
}

.enago-news .detail-section hr {
    margin: 16px 0;
    color: inherit;
    background-color: currentColor;
    border: 0;
    opacity: .25;
    height: 1px;
}

.enago-news .detail-section .flex-box {
    display: flex;
    justify-content: space-between;
    text-align: start;
    flex-direction: row;
}

.enago-news .detail-section .authors {
    display: flex;
    align-items: center;
}

.enago-news .detail-section .authors img {
    height: 44px;
    width: 44px;
    border-radius: 50%;
    margin-inline-end: 10px;
}

.enago-news .detail-section .authors .authorname,
.enago-news .detail-section .news-date {
    color: rgba(40, 51, 65, .5);
    font-size: 14px !important;
    font-style: normal;
    font-weight: 400;
    line-height: 150%;
}

.enago-news .detail-section .authors .authorname b {
    color: #283341;
    display: block;
    font-size: 14px !important;
}

.enago-news .detail-section .detailsection.bannerimage {
    margin: 30px auto;
}

.enago-news .detail-section .detailsection.bannerimage img {
    width: 100%;
    max-width: 100%;
    height: 300px;
    object-fit: contain;
    background: #fff;
    border: 1px solid #ededed;
    border-radius: 10px;
}

@media screen and (max-width: 768px) {
    .enago-news .detail-section .flex-box {
        flex-direction: column !important;
    }
}


/* ==========================================================================
   5. Arabic (RTL) adjustments
   ========================================================================== */
/* mirror only the banner artwork so the people sit opposite the heading */
html[dir="rtl"] .enago-news .home_banner_component::before {
    transform: scaleX(-1);
}

/* Arabic needs more leading (diacritics clip) */
html[dir="rtl"] .enago-news .cwg_heading1,
html[dir="rtl"] .enago-news .banner_subtitle,
html[dir="rtl"] .enago-news .news-card__title,
html[dir="rtl"] .enago-news .detail-section h1 {
    line-height: 1.4 !important;
}

/* Arabic has no italic form - keep the subtitle upright */
html[dir="rtl"] .enago-news .banner_subtitle {
    font-style: normal;
    margin-top: 0 !important;
}

html[dir="rtl"] .enago-news .cwg_heading1 {
    font-size: 56px !important;
}

html[dir="rtl"] .enago-news .news-card__title {
    font-size: 20px !important;
}

html[dir="rtl"] .enago-news .detail-section h1 {
    font-size: 35px !important;
}

html[dir="rtl"] .enago-news .news-card__link:hover span {
    transform: translateX(-3px);
}

@media screen and (max-width: 767px) {
    html[dir="rtl"] .enago-news .cwg_heading1 {
        font-size: 36px !important;
        line-height: 1.4 !important;
    }
}
