/* SIA LIFE v1.2.1 — centered full-width single news article; RTL/LTR safe. */
body.sia-news-layout-active { overflow-x: clip; }
body.sia-news-layout-active #content,
body.sia-news-layout-active .site-content {
  max-width: none !important;
  width: 100% !important;
  overflow: visible !important;
}
/* BuddyBoss commonly constrains content with an outer .container or grid. Release that
   constraint ONLY on the standalone news layout; other pages remain unchanged. */
body.sia-news-layout-active #content > .container,
body.sia-news-layout-active .site-content > .container,
body.sia-news-layout-active #content > .bb-grid,
body.sia-news-layout-active .site-content > .bb-grid,
body.sia-news-layout-active #content > .site-content-grid,
body.sia-news-layout-active .site-content > .site-content-grid {
  width: 100% !important;
  max-width: none !important;
  flex-basis: 100% !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  overflow: visible !important;
}
body.sia-news-layout-active #primary,
body.sia-news-layout-active .content-area {
  float: none !important;
  max-width: none !important;
  width: 100% !important;
  flex: 0 0 100% !important;
}
/* Optional theme sidebars never appear in our custom news template. */
body.sia-news-layout-active #secondary { display:none !important; }
body.sia-news-layout-active #sia-news-main,
body.sia-news-layout-active #sia-news-main * { box-sizing: border-box; }
body.sia-news-layout-active #sia-news-main {
  --sia-news-max-width: 1360px;
  --sia-news-navy: #172238;
  --sia-news-gold: #e6c78e;
  --sia-news-surface: #172238;
  display: block;
  position: relative;
  /* Safe symmetric full-bleed breakout. The former left:50% + translateX(-50%)
     shifted RTL pages toward the left and clipped the article. Both margins
     are symmetric to keep the page centered in RTL and LTR. */
  left: auto !important;
  right: auto !important;
  transform: none !important;
  width: 100vw !important;
  max-width: 100vw !important;
  margin-left: calc(50% - 50vw) !important;
  margin-right: calc(50% - 50vw) !important;
  padding: clamp(26px, 4.2vw, 58px) 20px clamp(52px, 6vw, 85px) !important;
  min-height: 50vh;
  isolation: isolate;
  background: #cfd9e6;
  color: #fff;
  font-family: 'Tajawal','Cairo',Tahoma,Arial,sans-serif;
  clear: both;
}
body.sia-news-layout-active #sia-news-main .sia-news-shell {
  width: 100% !important;
  max-width: var(--sia-news-max-width) !important;
  margin-left: auto !important;
  margin-right: auto !important;
}
body.sia-news-layout-active #sia-news-main .sia-news-article {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0;
  float: none;
  background: transparent;
}
body.sia-news-layout-active #sia-news-main .sia-news-heading {
  padding: 0 0 clamp(22px, 3vw, 38px);
  text-align: center;
}
body.sia-news-layout-active #sia-news-main .sia-news-heading__badge {
  display: inline-block;
  padding: 9px 18px;
  max-width: 100%;
  border: 1px solid #c6a05d;
  border-radius: 999px;
  color: #7d591d;
  font-size: 14px;
  font-weight: 700;
  background: rgba(255,255,255,.45);
  margin: 0 0 18px;
}
body.sia-news-layout-active #sia-news-main .sia-news-heading__title {
  font-family: inherit;
  color: #172238 !important;
  font-size: clamp(28px, 3.3vw, 49px) !important;
  font-weight: 800 !important;
  line-height: 1.5 !important;
  letter-spacing: 0;
  margin: 0 auto 19px !important;
  max-width: 1200px;
  text-align: center;
  overflow-wrap: anywhere;
}
body.sia-news-layout-active #sia-news-main .sia-news-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px 27px;
  flex-wrap: wrap;
  font-size: 15px;
  color: #526279;
  line-height: 1.7;
}
body.sia-news-layout-active #sia-news-main .sia-news-meta > span { display:inline-flex;align-items:center;gap:7px; }
body.sia-news-layout-active #sia-news-main .sia-news-meta svg {
  width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.8;
  stroke-linecap:round;stroke-linejoin:round;flex:none;
}
/* Navy background is also the spacing between image and content and both side edges. */
body.sia-news-layout-active #sia-news-main .sia-news-paper {
  background: var(--sia-news-surface) !important;
  color: #f7f9fc;
  border: 1px solid rgba(230,199,142,.32);
  border-radius: 20px;
  box-shadow: 0 18px 46px rgba(15,31,53,.16);
  padding: clamp(14px, 2.2vw, 28px);
  width: 100% !important;
  max-width: none !important;
  overflow: hidden;
}
body.sia-news-layout-active #sia-news-main .sia-news-featured {
  display:block;margin:0 0 clamp(22px,3vw,40px)!important;padding:0;
  width:100%!important;max-width:none!important;height:auto!important;border:0;overflow:visible!important;
}
body.sia-news-layout-active #sia-news-main .sia-news-featured img,
body.sia-news-layout-active #sia-news-main .sia-news-featured img.wp-post-image {
  display:block;width:100%!important;max-width:100%!important;
  height:auto!important;max-height:none!important;object-fit:contain!important;
  object-position:center;float:none;border-radius:12px!important;
  margin:0 auto!important;box-shadow:none;
}
body.sia-news-layout-active #sia-news-main .sia-news-body {
  font-family:inherit;font-size:clamp(16px,1.35vw,19px);
  line-height:2.03;color:#f7f9fc !important;
  max-width:none!important;width:100%!important;margin:0!important;padding:0!important;
  min-height:100px;overflow-wrap:anywhere;
}
body.sia-news-layout-active #sia-news-main .sia-news-body > :first-child {margin-top:0;}
body.sia-news-layout-active #sia-news-main .sia-news-body > :last-child {margin-bottom:0;}
body.sia-news-layout-active #sia-news-main .sia-news-body p {
  font-family:inherit;font-size:inherit;line-height:inherit;
  margin-bottom:1.2em;color:inherit;
}
body.sia-news-layout-active #sia-news-main .sia-news-body h2,
body.sia-news-layout-active #sia-news-main .sia-news-body h3,
body.sia-news-layout-active #sia-news-main .sia-news-body h4 {
  color:#fff !important;line-height:1.55;margin:1.25em 0 .5em;
  font-family:inherit;font-weight:800;
}
body.sia-news-layout-active #sia-news-main .sia-news-body img { max-width:100%;height:auto; }
body.sia-news-layout-active #sia-news-main .sia-news-body figure {max-width:100%;}
body.sia-news-layout-active #sia-news-main .sia-news-body img.aligncenter {display:block;margin-left:auto;margin-right:auto;}
body.sia-news-layout-active #sia-news-main .sia-news-body iframe,
body.sia-news-layout-active #sia-news-main .sia-news-body .wp-block-embed__wrapper {max-width:100%;}
body.sia-news-layout-active #sia-news-main .sia-news-body .e-con.e-con-boxed > .e-con-inner,
body.sia-news-layout-active #sia-news-main .sia-news-body .elementor-section.elementor-section-boxed > .elementor-container {
  width: 100% !important;
  max-width: 100% !important;
}
body.sia-news-layout-active #sia-news-main .sia-news-body blockquote {
  padding:14px 22px;border-inline-start:4px solid var(--sia-news-gold);
  background:#243550;border-radius:8px;color:#fff;
}
body.sia-news-layout-active #sia-news-main .sia-news-body a {color:#f4d191;}
body.sia-news-layout-active #sia-news-main .sia-news-pages {display:flex;justify-content:center;gap:10px;flex-wrap:wrap;margin:25px 0 0;}
/* The template deliberately has no share bar, category footer, comments, or sidebar. */
@media (max-width:767px) {
  body.sia-news-layout-active #sia-news-main {padding:23px 12px 45px!important;}
  body.sia-news-layout-active #sia-news-main .sia-news-shell {width:100%!important;max-width:100%!important;}
  body.sia-news-layout-active #sia-news-main .sia-news-heading__badge {font-size:12px;padding:7px 12px;margin-bottom:12px;}
  body.sia-news-layout-active #sia-news-main .sia-news-heading__title {font-size:clamp(23px,6.5vw,32px)!important;line-height:1.55!important;margin-bottom:12px!important;}
  body.sia-news-layout-active #sia-news-main .sia-news-paper {padding:12px;border-radius:13px;}
  body.sia-news-layout-active #sia-news-main .sia-news-featured img {border-radius:9px!important;}
  body.sia-news-layout-active #sia-news-main .sia-news-body {font-size:16px;line-height:1.95;}
  body.sia-news-layout-active #sia-news-main .sia-news-meta {font-size:13px;gap:10px 16px;}
}

/* v1.2.0 stability: override leftover theme flex rules only inside news template. */
body.sia-news-layout-active #sia-news-main .sia-news-shell,
body.sia-news-layout-active #sia-news-main .sia-news-article,
body.sia-news-layout-active #sia-news-main .sia-news-paper,
body.sia-news-layout-active #sia-news-main .sia-news-featured {
  float: none !important;
  flex: none !important;
  inset-inline-start: auto !important;
  inset-inline-end: auto !important;
  transform: none !important;
}
body.sia-news-layout-active #sia-news-main .sia-news-heading__title,
body.sia-news-layout-active #sia-news-main .sia-news-body {
  overflow-wrap: break-word;
}

/* v1.2.1: Only the featured image frame is reduced to 50% by default. */
body.sia-news-layout-active #sia-news-main .sia-news-featured {
  width: var(--sia-news-featured-width, 50%) !important;
  max-width: 100% !important;
  margin: 0 auto clamp(22px,3vw,40px) !important;
}
@media (max-width: 767px) {
  body.sia-news-layout-active #sia-news-main .sia-news-featured {
    width: 100% !important;
  }
}

/* v1.3.2 — Responsive, centered, non-clipping news headlines. */
body.sia-news-layout-active #sia-news-main .sia-news-shell,
body.sia-news-layout-active #sia-news-main .sia-news-article,
body.sia-news-layout-active #sia-news-main .sia-news-heading {
  min-width: 0 !important;
  max-width: 100% !important;
}
body.sia-news-layout-active #sia-news-main .sia-news-heading {
  width: 100% !important;
  margin-inline: auto !important;
  padding-inline: clamp(6px, 2vw, 24px) !important;
}
body.sia-news-layout-active #sia-news-main h1.sia-news-heading__title {
  display: block !important;
  box-sizing: border-box !important;
  width: 100% !important;
  max-width: 1040px !important;
  margin-inline: auto !important;
  padding-inline: 0 !important;
  text-align: center !important;
  white-space: normal !important;
  word-break: normal !important;
  overflow-wrap: anywhere !important;
  text-wrap: balance;
  font-size: var(--sia-news-title-size, 38px) !important;
  line-height: 1.5 !important;
}
@media (min-width: 768px) and (max-width: 1100px) {
  body.sia-news-layout-active #sia-news-main h1.sia-news-heading__title {
    font-size: min(var(--sia-news-title-size, 38px), 34px) !important;
  }
}
@media (max-width: 767px) {
  body.sia-news-layout-active #sia-news-main .sia-news-heading {
    padding-inline: 4px !important;
  }
  body.sia-news-layout-active #sia-news-main h1.sia-news-heading__title {
    font-size: clamp(23px, 5.3vw, 29px) !important;
    line-height: 1.55 !important;
    max-width: 100% !important;
  }
}

/* v1.3.3 — Only SIA single-news posts. Reduce the theme gap between the
   fixed header and our article title, without changing the header itself.
   The offset is bounded and adjustable in Design > Article Layout. */
body.sia-news-layout-active,
body.sia-news-layout-active #content,
body.sia-news-layout-active .site-content {
    background-color: #cfd9e6 !important;
}
@media (min-width: 1025px) {
    body.sia-news-layout-active #sia-news-main {
        margin-top: calc(0px - var(--sia-news-single-lift, 60px)) !important;
        padding-top: 24px !important;
    }
}
/* Do not pull the mobile article behind the taller, multirow header. */
@media (min-width: 768px) and (max-width: 1024px) {
    body.sia-news-layout-active #sia-news-main {
        margin-top: 0 !important;
        padding-top: 25px !important;
    }
}
@media (max-width: 767px) {
    body.sia-news-layout-active #sia-news-main {
        margin-top: 0 !important;
        padding-top: 20px !important;
    }
}

/* v1.3.4 — Header protection for every SIA news single post.
   Smart Header may add .sia-has-hero when an article body contains a
   .sia-hero block; it otherwise skips its normal 88px header spacer.
   That caused SOME posts to slip behind the fixed header. Restore the
   spacer here, only for the news template, including on hero-marked pages. */
body.sia-news-layout-active.sia-life-header-active,
body.sia-news-layout-active.sia-life-header-active.sia-has-hero {
  padding-top: var(--sia-header-height, 88px) !important;
}
/* A news article is not the home page hero: always use the solid SIA navbar. */
body.sia-news-layout-active.sia-life-header-active.sia-has-hero #sia-life-header {
  background: var(--sia-header-navy, #162238) !important;
  box-shadow: 0 3px 16px rgba(4, 9, 19, .12) !important;
}
