/* Real Sciences — site customizations (migrated from mu-plugins 20260617-083408). Edit here, not in mu-plugins. */

/* ===== footer widget blue-bar fix (was rs-footer-widget-fix) ===== */
#footer-widgets .footer-widget li:before{display:none !important;}

/* ===================== from rs-menu-style ===================== */
/* ===== Scientific-American-style top menu — AR (RTL) + EN (LTR) ===== */

/* clean header: white, thin hairline under it, drop Divi's heavy shadow */
#main-header{ box-shadow:0 1px 0 rgba(0,0,0,.09) !important; }

/* ----- shorter header (both AR + EN). Divi pads the nav ~33px top/bottom and sizes the
   logo to a % of header height; trim both so the bar is slimmer. ----- */
@media (min-width:981px){
  #main-header #et-top-navigation{ padding-top:25px !important; }
  #main-header #top-menu > li > a,
  #main-header #et-top-navigation nav > ul > li > a{ padding-bottom:25px !important; }
  #main-header #logo{ max-height:44px !important; }
}

@media (min-width:981px){
  /* even, controlled spacing: kill Divi's per-item right padding, pad the link instead
     (inline only — leave Divi's vertical padding that centres the text in the header) */
  #top-menu.nav > li{ padding-inline:0 !important; margin:0 !important; position:relative; }
  #top-menu.nav > li > a{
    padding-inline:16px !important;
    color:#333 !important;
    opacity:1 !important;
    font-weight:600 !important;
    font-size:13px !important;
    letter-spacing:0 !important;
    text-transform:none !important;
    transition:color .15s ease;
  }
  #top-menu.nav > li > a:hover{ color:#000 !important; }
  #top-menu.nav > li.current-menu-item > a{ color:#000 !important; }

  /* thin vertical divider before every item except the first (logical: works in RTL too).
     Divi puts the link's padding on the BOTTOM (text sits at the top of a tall li), so the
     divider is top-aligned to the text line, not centred on the (tall) li box. */
  #top-menu.nav > li + li::before{
    content:""; position:absolute; inset-inline-start:0; top:1px;
    height:16px; width:1px; background:#cfcfcf;
  }

  /* thin down-chevron on dropdown parents (SciAm style — two strokes, not the heavy ⌄ glyph) */
  #top-menu.nav > li.menu-item-has-children > a::after{
    content:""; display:inline-block; width:6px; height:6px;
    border:solid #9a9a9a; border-width:0 1.5px 1.5px 0; transform:rotate(45deg);
    margin-inline-start:8px; position:relative; top:-2px;
  }
}

/* clean, minimal dropdown panels to match the flat aesthetic */
#top-menu li ul.sub-menu{
  border:1px solid #e6e6e6 !important; box-shadow:0 6px 18px rgba(0,0,0,.08) !important;
  border-top:2px solid #1b91cc !important; padding:6px 0 !important;
}
#top-menu li ul.sub-menu a{
  color:#333 !important; font-weight:500 !important; font-size:13px !important;
}
#top-menu li ul.sub-menu a:hover{ color:#1b91cc !important; background:#f7f7f7 !important; }

/* ===== Same look for the Divi Theme Builder header (Menu MODULE .et_pb_menu) =====
   Used on article/single pages (centered-logo style). Classic #top-menu above is the homepage. */
@media (min-width:981px){
  .et_pb_menu .et-menu.nav > li{ position:relative; padding-inline:0 !important; margin:0 !important; }
  .et_pb_menu .et-menu.nav > li > a{
    padding-inline:16px !important;
    color:#333 !important; opacity:1 !important;
    font-weight:600 !important; font-size:13px !important;
    letter-spacing:0 !important; text-transform:none !important;
    transition:color .15s ease;
  }
  .et_pb_menu .et-menu.nav > li > a:hover{ color:#000 !important; }
  .et_pb_menu .et-menu.nav > li.current-menu-item > a{ color:#000 !important; }

  /* vertical | divider — module items are vertically centred, so centre the divider too */
  .et_pb_menu .et-menu.nav > li + li::before{
    content:""; position:absolute; inset-inline-start:0; top:50%; transform:translateY(-50%);
    height:15px; width:1px; background:#cfcfcf;
  }
  /* down-chevron on dropdown parents */
  .et_pb_menu .et-menu.nav > li.menu-item-has-children > a::after{
    content:""; display:inline-block; width:6px; height:6px;
    border:solid #9a9a9a; border-width:0 1.5px 1.5px 0; transform:rotate(45deg);
    margin-inline-start:8px; position:relative; top:-2px;
  }
}
.et_pb_menu .et-menu li ul.sub-menu{
  border:1px solid #e6e6e6 !important; border-top:2px solid #1b91cc !important;
  box-shadow:0 6px 18px rgba(0,0,0,.08) !important; padding:6px 0 !important;
}
.et_pb_menu .et-menu li ul.sub-menu a{ color:#333 !important; font-weight:500 !important; font-size:13px !important; }
.et_pb_menu .et-menu li ul.sub-menu a:hover{ color:#1b91cc !important; background:#f7f7f7 !important; }

/* ===== Rounded corners + thin borders on content images SITE-WIDE (AR + EN) ===== */
#main-content .et_pb_post img,
#main-content .et_pb_image_container img,
#main-content .entry-featured-image-url img,
#main-content .et_pb_post_content img,
#main-content #left-area .et_pb_post img{
  border:1px solid #e2e2e2 !important; border-radius:6px !important;
}

/* ===== Category archive pages → Scientific-American "Latest"-style grid (AR + EN) =====
   Layout only (no font-family) so each language keeps its own typography. */
@media (min-width:981px){
  /* English theme archive (sidebar restored on the right): main column = 2-col card grid */
  body.archive #left-area{
    display:grid !important; grid-template-columns:repeat(2,1fr); gap:38px 24px;}
  body.archive #left-area > *:not(.et_pb_post){ grid-column:1 / -1;}
  /* remove Divi's stray content/sidebar vertical divider line */
  body.archive #main-content .container:before,
  body.archive #main-content .container:after{ display:none !important;}
}
/* category/author name heading on archive pages (injected by rs-archive-headers.php) */
body.archive .rs-arch-head{ grid-column:1 / -1; margin:2px 0 30px !important; padding-bottom:13px !important; border-bottom:2px solid #111 !important;}
body.archive .rs-arch-head h1{ font-size:32px !important; font-weight:800 !important; color:#111 !important; margin:0 !important; line-height:1.12 !important; letter-spacing:-.01em !important;}

/* card style — applies to EN (#left-area) and AR (salvattore grid) posts alike.
   NB: Divi's archive emits the excerpt as a BARE TEXT NODE inside the <article>, so flexbox+order
   can't reorder it (anonymous flex item). Keep natural flow: image, headline, meta, dek. */
body.archive .et_pb_post{
  border:0 !important; background:transparent !important; text-align:start !important;
  padding:0 13px !important; margin:0 0 30px !important; box-sizing:border-box;}
body.archive .et_pb_post:hover{ background:transparent !important;}
/* identical card alignment in both AR templates (author template was centred) */
body.archive .et_pb_post .entry-title,
body.archive .et_pb_post .post-meta,
body.archive .et_pb_post .post-content{ text-align:start !important;}
body.archive .et_pb_post .et_pb_image_container,
body.archive .et_pb_post .entry-featured-image-url{ display:block !important; float:none !important; width:100% !important; margin:0 0 13px !important; text-align:start !important;}
body.archive .et_pb_post .et_pb_image_container img,
body.archive .et_pb_post .entry-featured-image-url img{ width:100% !important; display:block !important; margin:0 !important;}
body.archive .et_pb_post .entry-title{ font-size:19px !important; line-height:1.2 !important; font-weight:800 !important; margin:.1em 0 .3em !important;}
body.archive .et_pb_post .entry-title a{ color:#111 !important;}
body.archive .et_pb_post .entry-title a:hover{ color:#1b91cc !important;}
body.archive .et_pb_post .post-meta{ margin:0 0 8px !important; font-size:11px !important; text-transform:uppercase !important; letter-spacing:.05em !important; color:#9a9a9a !important;}
body.archive .et_pb_post .post-meta a{ color:#1a1a1a !important; font-weight:700 !important;}
body.archive .et_pb_post .post-content,
body.archive .et_pb_post > p{ font-size:15px !important; line-height:1.5 !important; color:#555 !important;}
body.archive .et_pb_post .more-link{ display:none !important;}

/* ===================== from rs-en-style ===================== */
/* ---- sans (Libre Franklin) for chrome + headings ---- */
body.rs-en, body.rs-en input, body.rs-en select, body.rs-en textarea, body.rs-en button,
body.rs-en .et_pb_text, body.rs-en #main-header, body.rs-en #et-top-navigation, body.rs-en .nav li a,
body.rs-en .et_pb_widget, body.rs-en #footer-widgets, body.rs-en .et_pb_button, body.rs-en .post-meta,
body.rs-en .rs-meta-row, body.rs-en .rs-share, body.rs-en .rs-toc, body.rs-en .rs-newsletter{
  font-family:"Libre Franklin",Arial,Helvetica,sans-serif !important;}
body.rs-en h1, body.rs-en h2, body.rs-en h3, body.rs-en h4, body.rs-en h5, body.rs-en h6,
body.rs-en .entry-title, body.rs-en .et_pb_post_title h1, body.rs-en .et_pb_post_title .et_pb_title_container h1,
body.rs-en .et_pb_post_content h1, body.rs-en .et_pb_post_content h2, body.rs-en .et_pb_post_content h3, body.rs-en .et_pb_post_content h4{
  font-family:"Libre Franklin",Arial,Helvetica,sans-serif !important; color:#333 !important; letter-spacing:-0.012em;}
body.rs-en h1, body.rs-en .entry-title, body.rs-en .et_pb_post_title h1{font-weight:800 !important;}

/* ---- serif (Crimson Text) for the article reading column ---- */
body.rs-en .et_pb_post_content, body.rs-en .et_pb_post_content p, body.rs-en .et_pb_post_content li,
body.rs-en .et_pb_post_content blockquote, body.rs-en .et_pb_post_content td,
body.rs-en .entry-content > p, body.rs-en .et_pb_post_content .et_pb_text p{
  font-family:"Crimson Text",Georgia,"Times New Roman",serif !important;}
body.rs-en .et_pb_post_content{font-size:20px !important; line-height:1.65 !important; color:#333 !important;}
body.rs-en .et_pb_post_content p, body.rs-en .et_pb_post_content li{
  font-size:20px !important; line-height:1.65 !important; color:#333 !important;}
body.rs-en .et_pb_post_content p{margin-bottom:1.1em !important;}

/* ---- article headline like SciAm ---- */
body.rs-en.single-post .et_pb_post_title h1, body.rs-en.single-post .entry-title,
body.rs-en.single-post h1.entry-title{font-size:40px !important; line-height:1.14 !important; font-weight:800 !important; color:#333 !important;}

/* English article headline = Divi title text module (first text module in TB body) -> SciAm bold */
body.rs-en .et_pb_text_0_tb_body, body.rs-en .et_pb_text_0_tb_body h1, body.rs-en .et_pb_text_0_tb_body h2,
body.rs-en .et_pb_text_0_tb_body span, body.rs-en .et_pb_text_0_tb_body p{
  font-family:"Libre Franklin",Arial,Helvetica,sans-serif !important; font-weight:700 !important;
  color:#333 !important; letter-spacing:-0.015em !important;}

/* keep my extras + UI sans even though inside content */
body.rs-en .rs-newsletter p{font-family:"Libre Franklin",Arial,sans-serif !important;}

/* ---- header + menu items (Divi Menu module uses a custom "semi" font) -> SciAm sans ---- */
body.rs-en .et_pb_menu__menu li a, body.rs-en .et_pb_menu li a, body.rs-en .et_pb_fullwidth_menu li a,
body.rs-en .et_pb_menu__menu li li a, body.rs-en .et-menu li a, body.rs-en .et_mobile_menu li a,
body.rs-en .et_pb_menu .et-menu-nav li a, body.rs-en #et-top-navigation li a, body.rs-en #top-menu li a,
body.rs-en .et_pb_header_content_wrapper, body.rs-en header .et_pb_text,
body.rs-en .et_pb_menu__search-input{
  font-family:"Libre Franklin",Arial,Helvetica,sans-serif !important;}
body.rs-en .et_pb_section_0_tb_body{padding-top:16px !important}
body.rs-en .et_pb_row_0_tb_body{padding-top:0 !important}

/* ===== English homepage — Scientific American-style sections ===== */
/* section header: small uppercase label with a black rule across the column (like SciAm) */
body.rs-en.home .rs-cat-head h2{
  font-family:"Libre Franklin",Arial,sans-serif !important;
  font-size:14px !important; font-weight:800 !important; letter-spacing:.09em !important;
  text-transform:uppercase !important; color:#111 !important;
  border-bottom:2px solid #111 !important; padding-bottom:8px !important; margin:0 0 32px !important;}
/* titles-only "Latest" list (2 columns of headlines) */
body.rs-en.home .rs-latest-list{ list-style:none !important; margin:0 !important; padding:0 !important; column-count:2; column-gap:48px;}
body.rs-en.home .rs-latest-list li{ -webkit-column-break-inside:avoid; break-inside:avoid; padding:11px 0 !important; border-bottom:1px solid #e6e6e6 !important;}
body.rs-en.home .rs-latest-list a{ display:block; font-family:"Libre Franklin",Arial,sans-serif !important; font-weight:700 !important; font-size:17px !important; line-height:1.25 !important; color:#1a1a1a !important;}
body.rs-en.home .rs-latest-list a:hover{ color:#1b91cc !important;}
body.rs-en.home .rs-latest-date{ display:block; font-size:11px !important; color:#999 !important; text-transform:uppercase !important; letter-spacing:.04em !important; margin-top:4px;}
@media (max-width:780px){ body.rs-en.home .rs-latest-list{ column-count:1;}}
/* lead story */
body.rs-en.home .rs-lead .et_pb_post{ border:0 !important; background:transparent !important; padding:0 !important; margin-bottom:6px !important;}
body.rs-en.home .rs-lead .entry-title{ font-size:34px !important; line-height:1.14 !important; font-weight:800 !important; margin:.3em 0 .15em !important;}
body.rs-en.home .rs-lead .entry-title a{ color:#111 !important;}
body.rs-en.home .rs-lead .post-content, body.rs-en.home .rs-lead .post-content p{
  font-family:"Crimson Text",Georgia,serif !important; font-size:18px !important; line-height:1.5 !important; color:#444 !important;}
/* top "latest" feature: most-recent article medium-sized (2/3) + small headline list (1/3) */
body.rs-en.home .rs-feat-main .et_pb_post{ border:0 !important; background:transparent !important; padding:0 !important; margin:0 0 18px !important;}
body.rs-en.home .rs-feat-main .entry-title{ font-size:26px !important; line-height:1.18 !important; font-weight:800 !important; margin:.35em 0 .2em !important;}
body.rs-en.home .rs-feat-main .entry-title a{ color:#111 !important;}
body.rs-en.home .rs-feat-main .et_pb_image_container{ margin-bottom:12px !important;}
body.rs-en.home .rs-feat-main .post-content{ font-family:"Crimson Text",Georgia,serif !important; font-size:16px !important; line-height:1.5 !important; color:#555 !important;}
body.rs-en.home .rs-feat-main .post-meta, body.rs-en.home .rs-feat-side .post-meta{
  color:#8a8a8a !important; font-size:12px !important; letter-spacing:.04em !important; text-transform:uppercase !important;}
body.rs-en.home .rs-feat-side .et_pb_post{ border:0 !important; border-bottom:1px solid #e6e6e6 !important; background:transparent !important; padding:0 0 12px !important; margin:0 0 12px !important;}
body.rs-en.home .rs-feat-side .et_pb_post:last-child{ border-bottom:0 !important;}
body.rs-en.home .rs-feat-side .entry-title{ font-size:15px !important; line-height:1.25 !important; font-weight:700 !important; margin:.3em 0 .15em !important;}
body.rs-en.home .rs-feat-side .entry-title a{ color:#1a1a1a !important;}
body.rs-en.home .rs-feat-side .et_pb_image_container{ margin-bottom:6px !important;}
body.rs-en.home .rs-feat-side .post-content{ display:none !important;}
/* category grid cards */
body.rs-en.home .rs-cat-grid .et_pb_post{ border:0 !important; background:transparent !important; padding:0 14px !important; box-sizing:border-box !important; margin-bottom:38px !important;}
body.rs-en.home .rs-cat-grid .et_pb_post:hover{ background:transparent !important;}
body.rs-en.home .rs-cat-grid .entry-title{ font-size:19px !important; line-height:1.25 !important; font-weight:700 !important; margin:.4em 0 .25em !important;}
body.rs-en.home .et_pb_blog_grid .entry-title a, body.rs-en.home .rs-cat-grid .entry-title a{ color:#1a1a1a !important;}
body.rs-en.home .et_pb_blog_grid .entry-title a:hover, body.rs-en.home .rs-lead .entry-title a:hover{ color:#1b91cc !important;}
body.rs-en.home .rs-cat-grid .post-meta, body.rs-en.home .rs-lead .post-meta{
  color:#8a8a8a !important; font-size:12px !important; letter-spacing:.04em !important; text-transform:uppercase !important;}
body.rs-en.home .rs-cat-grid .post-content{ font-family:"Crimson Text",Georgia,serif !important; font-size:15px !important; color:#555 !important; line-height:1.5 !important;}
/* podcast mini-grid (in the feature column): compact, no excerpt */
body.rs-en.home .rs-pod-grid .post-content{ display:none !important;}
body.rs-en.home .rs-pod-grid .entry-title{ font-size:16px !important; line-height:1.22 !important;}
body.rs-en.home .rs-pod-grid .et_pb_post{ margin-bottom:18px !important;}
body.rs-en.home .rs-cat-grid .et_pb_image_container,
body.rs-en.home .rs-lead .et_pb_image_container{ margin-bottom:10px !important;}
/* thin border + slightly rounded corners on all homepage card images */
body.rs-en.home .et_pb_post img,
body.rs-en.home .et_pb_image_container img{ border:1px solid #e2e2e2 !important; border-radius:6px !important;}
body.rs-en.home .et_pb_blog_grid .et_pb_post .more-link, body.rs-en.home .rs-cat-grid .more-link{ display:none !important;}
body.rs-en.home #main-content .et_pb_section{ padding-top:6px !important; padding-bottom:6px !important;}
/* "Browse all articles" button under Latest (rs-allbtn class is ON the <a.et_pb_button>) */
body.rs-en.home .et_pb_button.rs-allbtn{
  font-family:"Libre Franklin",Arial,sans-serif !important; font-weight:700 !important;
  text-transform:uppercase !important; letter-spacing:.06em !important; font-size:13px !important;
  color:#1a1a1a !important; background:transparent !important;
  border:1px solid #1a1a1a !important; border-radius:3px !important; padding:13px 30px !important;
  transition:background .15s ease,color .15s ease;}
body.rs-en.home .et_pb_button.rs-allbtn:hover{ background:#1a1a1a !important; color:#fff !important; padding:13px 30px !important; border-color:#1a1a1a !important;}
body.rs-en.home .et_pb_button.rs-allbtn:after,body.rs-en.home .et_pb_button.rs-allbtn:before{ display:none !important; content:"" !important;}

/* ===== /en/latest/ page — Scientific American "Latest Stories" GRID (rs-allposts) =====
   3-col grid, image-on-top cards: [category · date] kicker, bold headline, grey dek. Sharp
   images, no border (SciAm). Meta moved above the title via flex order. */
body.rs-en .rs-latest-title{ text-align:center !important; margin:4px 0 36px !important;}
body.rs-en .rs-latest-title h1{ font-family:"Libre Franklin",Arial,sans-serif !important; font-size:36px !important; font-weight:800 !important; color:#111 !important; letter-spacing:-.015em !important; line-height:1.1 !important;}
body.rs-en .rs-allposts .et_pb_post{
  display:flex !important; flex-direction:column; border:0 !important; background:transparent !important;
  padding:0 13px !important; box-sizing:border-box !important; margin-bottom:42px !important;}
body.rs-en .rs-allposts .et_pb_post:hover{ background:transparent !important;}
body.rs-en .rs-allposts .et_pb_image_container{ order:0; margin:0 0 13px !important;}
body.rs-en .rs-allposts .et_pb_image_container img{ width:100% !important;}
body.rs-en .rs-allposts .post-meta{ order:1; margin:0 0 7px !important; font-family:"Libre Franklin",Arial,sans-serif !important; font-size:11px !important; text-transform:uppercase !important; letter-spacing:.05em !important; color:#9a9a9a !important; font-weight:600 !important;}
body.rs-en .rs-allposts .post-meta a{ color:#111 !important; font-weight:700 !important;}
body.rs-en .rs-allposts .post-meta a:hover{ color:#1b91cc !important;}
body.rs-en .rs-allposts .entry-title{ order:2; font-family:"Libre Franklin",Arial,sans-serif !important; font-size:20px !important; line-height:1.2 !important; font-weight:800 !important; margin:0 0 .4em !important;}
body.rs-en .rs-allposts .entry-title a{ color:#111 !important;}
body.rs-en .rs-allposts .entry-title a:hover{ color:#1b91cc !important;}
body.rs-en .rs-allposts .post-content{ order:3; font-family:"Crimson Text",Georgia,serif !important; font-size:15px !important; color:#555 !important; line-height:1.5 !important;}
body.rs-en .rs-allposts .post-content .more-link{ display:none !important;}
body.rs-en .rs-allposts .pagination{ clear:both; display:flex !important; justify-content:space-between; align-items:center; padding:26px 0 4px; border-top:1px solid #cfcfcf; margin-top:6px;}
body.rs-en .rs-allposts .pagination a{ font-family:"Libre Franklin",Arial,sans-serif !important; font-weight:700 !important; text-transform:uppercase !important; letter-spacing:.05em !important; font-size:13px !important; color:#1a1a1a !important;}
body.rs-en .rs-allposts .pagination a:hover{ color:#1b91cc !important;}

/* ===== English archive right sidebar — "Latest Articles" widget ===== */
@media (min-width:981px){
  /* force the sidebar to the RIGHT on English archives (Divi keeps re-adding et_left_sidebar) */
  body.rs-en.archive #left-area{ float:left !important; padding-left:0 !important; padding-right:5.5% !important;}
  body.rs-en.archive #sidebar{ float:right !important;}
}
body.rs-en #sidebar{ padding-top:2px !important;}
body.rs-en #sidebar .et_pb_widget{ float:none !important; width:100% !important; margin-bottom:26px !important;}
body.rs-en #sidebar .widgettitle, body.rs-en #sidebar .widget-title, body.rs-en #sidebar h4.widgettitle{
  font-family:"Libre Franklin",Arial,sans-serif !important; font-size:14px !important; font-weight:800 !important;
  text-transform:uppercase !important; letter-spacing:.06em !important; color:#111 !important;
  border-bottom:2px solid #111 !important; padding-bottom:9px !important; margin:0 0 4px !important;}
body.rs-en #sidebar ul{ list-style:none !important; margin:0 !important; padding:0 !important;}
body.rs-en #sidebar li{ list-style:none !important; border-bottom:1px solid #e6e6e6 !important; padding:11px 0 !important; margin:0 !important;}
body.rs-en #sidebar li:before{ display:none !important;}
body.rs-en #sidebar a{ font-family:"Libre Franklin",Arial,sans-serif !important; color:#1a1a1a !important; font-weight:700 !important; font-size:15px !important; line-height:1.3 !important;}
body.rs-en #sidebar a:hover{ color:#1b91cc !important;}

/* ===================== from rs-ar-home ===================== */
/* ===== Arabic homepage — Scientific American layout (RTL). Layout only; Arabic fonts kept. ===== */
body.rs-ar.home .et_pb_row{ width:86% !important; max-width:1140px !important; }
/* ===== Card-overlap fix (root-caused via live in-browser inspection) =====
   The .et_pb_post box intermittently gets a FIXED pixel height (salvattore + lazy-image timing); with
   the box overflow-visible, a long excerpt spilled BELOW its box onto the NEXT card's featured image
   (worst on mobile where text wraps to more lines). Fix: (1) force the box + its layout ancestors to
   size to content; (2) give each post its own block-formatting context; (3) clamp the *visible*
   excerpts (feature-lead + category grids) to 3 lines so they can never spill, whatever the box height
   does. Clamp is intentionally NOT applied globally so the side/magazine/books/podcast excerpts stay
   hidden (display:none). Scoped to body.rs-ar.home. */
body.rs-ar.home .et_pb_post,
body.rs-ar.home .et_pb_ajax_pagination_container,
body.rs-ar.home .et_pb_blog,
body.rs-ar.home .et_pb_salvattore_content,
body.rs-ar.home .et_pb_salvattore_content .column{ height:auto !important; min-height:0 !important; max-height:none !important; }
body.rs-ar.home .et_pb_post{ display:flow-root !important; }
body.rs-ar.home .et_pb_post .entry-featured-image-url{ display:block !important; margin-bottom:18px !important; }
/* (4) Neutralise Divi's default -20px image-container TOP margin
   (".et_pb_blog_grid .et_pb_image_container{margin:-20px -20px 29px}"): with the home cards' zeroed
   padding it pulled each post's image UP into the previous post's excerpt (~10px overlap). Zero only
   the top margin (leave bottom spacing as Divi intends). Home-scoped so other Divi grids stay flush. */
body.rs-ar.home .et_pb_post .et_pb_image_container,
body.rs-ar.home .et_pb_post .entry-featured-image-url{ margin-top:0 !important; }
/* clamp the lead-story excerpt (category-grid excerpts are clamped further down) */
body.rs-ar.home .rs-feat-main .post-content{ display:-webkit-box !important; -webkit-line-clamp:3 !important; -webkit-box-orient:vertical !important; overflow:hidden !important; }

/* section heading: bold title with a rule across the column (SciAm) — RTL right-aligned */
body.rs-ar.home .rs-cat-head h2{
  font-size:17px !important; font-weight:700 !important; color:#111 !important; text-align:right !important;
  border-bottom:2px solid #111 !important; padding-bottom:8px !important; margin:0 0 36px !important; }

/* ---- feature row: main story on the RIGHT (opposite English), side list on the left ---- */
body.rs-ar.home .rs-feat-sec .et_pb_row{ display:flex !important; flex-direction:row; direction:rtl; align-items:flex-start; gap:4%; }
body.rs-ar.home .rs-feat-sec .et_pb_column{ float:none !important; margin:0 !important; }
body.rs-ar.home .rs-feat-sec .et_pb_column_2_3{ width:62% !important; }
body.rs-ar.home .rs-feat-sec .et_pb_column_1_3{ width:34% !important; }
@media (max-width:980px){
  body.rs-ar.home .rs-feat-sec .et_pb_row{ display:block !important; }
  body.rs-ar.home .rs-feat-sec .et_pb_column{ width:100% !important; margin-bottom:24px !important; }
}

/* ---- lead feature (most-recent, large) ---- */
body.rs-ar.home .rs-feat-main .et_pb_post{ border:0 !important; background:transparent !important; padding:0 !important; margin:0 0 14px !important; }
body.rs-ar.home .rs-feat-main .entry-title{ font-size:22px !important; line-height:1.35 !important; font-weight:700 !important; margin:.3em 0 .08em !important; text-align:right !important; }
body.rs-ar.home .rs-feat-main .entry-title a{ color:#111 !important; }
body.rs-ar.home .rs-feat-main .et_pb_image_container{ margin-bottom:12px !important; }
body.rs-ar.home .rs-feat-main .post-content,
body.rs-ar.home .rs-feat-main .post-content p{ font-size:14px !important; line-height:1.85 !important; color:#555 !important; text-align:right !important; }

/* ---- side headline list: 2 items stacked naturally at the TOP (no stretch — stretching to the
   main story's height left a big empty gap between the two headlines) ---- */
body.rs-ar.home .rs-feat-side{ height:auto !important; }
body.rs-ar.home .rs-feat-side .et_pb_ajax_pagination_container{ display:block !important; }
body.rs-ar.home .rs-feat-side .et_pb_post{ border:0 !important; border-bottom:1px solid #e6e6e6 !important; background:transparent !important; padding:0 0 14px !important; margin:0 0 14px !important; }
body.rs-ar.home .rs-feat-side .et_pb_post:last-child{ border-bottom:0 !important; margin-bottom:0 !important; padding-bottom:0 !important; }
body.rs-ar.home .rs-feat-side .entry-title{ font-size:15px !important; line-height:1.5 !important; font-weight:600 !important; margin:.25em 0 .08em !important; text-align:right !important; }
body.rs-ar.home .rs-feat-side .entry-title a{ color:#1a1a1a !important; }
body.rs-ar.home .rs-feat-side .et_pb_image_container{ margin-bottom:8px !important; }
body.rs-ar.home .rs-feat-side .post-content{ display:none !important; }

/* ---- meta (date/category) ---- */
body.rs-ar.home .rs-feat-main .post-meta, body.rs-ar.home .rs-feat-side .post-meta,
body.rs-ar.home .rs-cat-grid .post-meta{ color:#8a8a8a !important; font-size:12px !important; text-align:right !important; margin:1px 0 8px !important; }

/* ---- category grid cards (3-up) ---- */
body.rs-ar.home .rs-cat-grid .et_pb_post{ border:0 !important; background:transparent !important; padding:0 14px !important; box-sizing:border-box !important; margin-bottom:10px !important; }
body.rs-ar.home .rs-cat-grid .et_pb_post:hover{ background:transparent !important; }
body.rs-ar.home .rs-cat-grid .entry-title{ font-size:15px !important; line-height:1.5 !important; font-weight:600 !important; margin:.3em 0 .08em !important; text-align:right !important; }
body.rs-ar.home .rs-cat-grid .entry-title a{ color:#1a1a1a !important; }
body.rs-ar.home .rs-cat-grid .entry-title a:hover,
body.rs-ar.home .rs-feat-main .entry-title a:hover,
body.rs-ar.home .rs-feat-side .entry-title a:hover,
body.rs-ar.home .rs-latest-list a:hover{ color:#1b91cc !important; }
/* reduce the amount of body text in the top-3 category sections (clamp to 3 lines) */
body.rs-ar.home .rs-cat-grid .post-content{ font-size:13px !important; color:#666 !important; line-height:1.8 !important; text-align:right !important;
  display:-webkit-box !important; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden; }
body.rs-ar.home .rs-cat-grid .et_pb_image_container,
body.rs-ar.home .rs-feat-main .et_pb_image_container{ margin-bottom:10px !important; }
body.rs-ar.home .rs-cat-grid .more-link, body.rs-ar.home .rs-feat-main .more-link{ display:none !important; }

/* thin border + rounded corners on all homepage card images */
body.rs-ar.home .et_pb_post img, body.rs-ar.home .et_pb_image_container img{ border:1px solid #e2e2e2 !important; border-radius:6px !important; }

/* ---- "Latest" titles-only list (2 columns) ---- */
body.rs-ar.home .rs-latest-list{ list-style:none !important; margin:0 !important; padding:0 !important; column-count:2; column-gap:48px; }
body.rs-ar.home .rs-latest-list li{ -webkit-column-break-inside:avoid; break-inside:avoid; padding:11px 0 !important; border-bottom:1px solid #e6e6e6 !important; list-style:none !important; }
body.rs-ar.home .rs-latest-list li:before{ display:none !important; }
body.rs-ar.home .rs-latest-list a{ display:block; font-weight:600 !important; font-size:15px !important; line-height:1.55 !important; color:#1a1a1a !important; text-align:right; }
body.rs-ar.home .rs-latest-date{ display:block; font-size:12px !important; color:#999 !important; margin-top:4px; text-align:right; }
@media (max-width:780px){ body.rs-ar.home .rs-latest-list{ column-count:1; } }

/* ---- "browse all" button (rs-allbtn is on the <a>) ---- */
body.rs-ar.home .et_pb_button.rs-allbtn{
  font-weight:700 !important; font-size:14px !important; color:#1a1a1a !important; background:transparent !important;
  border:1px solid #1a1a1a !important; border-radius:3px !important; padding:13px 30px !important;
  transition:background .15s ease,color .15s ease; }
body.rs-ar.home .et_pb_button.rs-allbtn:hover{ background:#1a1a1a !important; color:#fff !important; padding:13px 30px !important; border-color:#1a1a1a !important; }
body.rs-ar.home .et_pb_button.rs-allbtn:after, body.rs-ar.home .et_pb_button.rs-allbtn:before{ display:none !important; content:"" !important; }

/* ===== Highlight accent bands (Magazine / Books / Podcast) ===== */
body.rs-ar.home .rs-hl{ margin:0 !important; }
/* Magazine + Books headings now use the SAME full-width #111 underline as every other section
   (the default .rs-cat-head h2 rule) — no more short coloured inline rule. */
/* small "see all" link at the end of a highlight band */
body.rs-ar.home .rs-hl-more, body.rs-ar.home .rs-hl-more p{ text-align:left !important; margin:4px 0 0 !important; }
body.rs-ar.home .rs-hl-more a{ font-weight:700 !important; font-size:14px !important; color:#1b91cc !important; }
body.rs-ar.home .rs-mag .rs-hl-more a{ color:#b8930a !important; }

/* ---- Magazine + Books: titles only (no excerpt) + FULL vertical cover images ---- */
body.rs-ar.home .rs-mag .rs-cat-grid .post-content,
body.rs-ar.home .rs-books .rs-cat-grid .post-content{ display:none !important; }
body.rs-ar.home .rs-mag .rs-cat-grid .entry-title,
body.rs-ar.home .rs-books .rs-cat-grid .entry-title{ text-align:center !important; font-size:16px !important; line-height:1.5 !important; }
body.rs-ar.home .rs-mag .rs-cat-grid .post-meta,
body.rs-ar.home .rs-books .rs-cat-grid .post-meta{ text-align:center !important; }
body.rs-ar.home .rs-mag .et_pb_post .entry-featured-image-url,
body.rs-ar.home .rs-books .et_pb_post .entry-featured-image-url{ display:block !important; text-align:center !important; background:transparent !important; overflow:visible !important; }
body.rs-ar.home .rs-mag .et_pb_post img,
body.rs-ar.home .rs-books .et_pb_post img{
  width:auto !important; max-width:88% !important; height:auto !important; max-height:420px !important;
  object-fit:contain !important; display:inline-block !important; box-shadow:0 4px 14px rgba(0,0,0,.16) !important;
  border:0 !important; border-radius:3px !important; }

/* ===== Podcast highlight: dark band — episodes (right) + platform icons (left) ===== */
body.rs-ar.home .rs-pod .rs-cat-head h2{ border-bottom:3px solid #e2b900 !important; color:#fff !important; }
/* episodes column on the RIGHT, platform-icon column on the LEFT (row-reverse like the feature) */
body.rs-ar.home .rs-pod .et_pb_row{ display:flex !important; flex-direction:row; direction:rtl; align-items:flex-start; gap:4%; }
body.rs-ar.home .rs-pod .et_pb_column{ float:none !important; margin:0 !important; }
body.rs-ar.home .rs-pod .et_pb_column_2_3{ width:66% !important; }
body.rs-ar.home .rs-pod .et_pb_column_1_3{ width:30% !important; }
@media (max-width:980px){
  body.rs-ar.home .rs-pod .et_pb_row{ display:block !important; }
  body.rs-ar.home .rs-pod .et_pb_column{ width:100% !important; margin-bottom:22px !important; }
}
/* episode preview cards (cover thumb + title + 10s play button) */
body.rs-ar.home .rs-pod-eps-list{ margin-top:2px; }
body.rs-ar.home .rs-pod-ep{ display:flex; align-items:center; gap:14px; padding:13px 0; border-bottom:1px solid #444; }
body.rs-ar.home .rs-pod-ep:last-child{ border-bottom:0; }
body.rs-ar.home .rs-pod-ep-thumb{ flex:0 0 auto; line-height:0; }
body.rs-ar.home .rs-pod-ep-thumb img{ width:66px !important; height:66px !important; object-fit:cover; border-radius:6px !important; border:0 !important; display:block; box-shadow:none !important; }
body.rs-ar.home .rs-pod-ep-body{ flex:1 1 auto; min-width:0; }
body.rs-ar.home .rs-pod-ep-title{ display:block; color:#fff !important; font-weight:600 !important; font-size:15px !important; line-height:1.55 !important; margin-bottom:9px; }
body.rs-ar.home .rs-pod-ep-title:hover{ color:#e2b900 !important; }
body.rs-ar.home .rs-pod-play{ display:inline-flex; align-items:center; gap:8px; background:transparent; color:#e2b900; border:1px solid #e2b900; border-radius:20px; padding:4px 15px; font-size:13px; font-weight:700; cursor:pointer; font-family:inherit; }
body.rs-ar.home .rs-pod-play:hover{ background:rgba(226,185,0,.14); }
body.rs-ar.home .rs-pod-ico{ width:0; height:0; border-style:solid; border-width:5px 0 5px 8px; border-color:transparent transparent transparent #e2b900; display:inline-block; }
body.rs-ar.home .rs-pod-ep.rs-playing .rs-pod-play{ background:#e2b900; color:#1a1a1a; }
body.rs-ar.home .rs-pod-ep.rs-playing .rs-pod-ico{ width:8px; height:10px; border:0; border-inline-start:2.5px solid #1a1a1a; border-inline-end:2.5px solid #1a1a1a; }
body.rs-ar.home .rs-pod audio{ display:none !important; }
/* platform icon links (Divi social-follow restyled to light/white symbols, no circles) */
body.rs-ar.home .rs-pod-links{ padding-top:4px; }
body.rs-ar.home .rs-pod-links .rs-pod-links-lbl, body.rs-ar.home .rs-pod-links .rs-pod-links-lbl p{ color:#9a9a9a !important; font-size:13px !important; margin:0 0 14px !important; text-align:right; }
body.rs-ar.home .rs-pod-links .et_pb_social_media_follow{ display:flex !important; gap:20px; justify-content:flex-start; }
body.rs-ar.home .rs-pod-links li.et_pb_social_media_follow_network{ margin:0 !important; background:transparent !important; }
body.rs-ar.home .rs-pod-links li.et_pb_social_media_follow_network a.icon{ background:transparent !important; width:auto !important; height:auto !important; padding:0 !important; }
body.rs-ar.home .rs-pod-links li.et_pb_social_media_follow_network a.icon:before{ color:#d8d8d8 !important; font-size:32px !important; transition:color .15s ease; }
body.rs-ar.home .rs-pod-links li.et_pb_social_media_follow_network a.icon:hover:before{ color:#fff !important; }
body.rs-ar.home .rs-pod-links li.et_pb_social_media_follow_network a.icon:after{ display:none !important; }

/* ===== Mobile submenu toggle (RTL, ALL Arabic pages) =====
   The Molti/real-sciences theme draws the mobile submenu toggle as a semi-transparent orange circle
   (#page-container span.menu-closed:before, bg rgba(255,128,87,.39), border-radius:100px) pinned to
   the RIGHT (right:0) — in RTL it lands ON the Arabic link text and covers words. Make it a flat grey
   desktop-style ETmodules chevron with no circle, moved to the LEFT so it clears the text. Expanded
   state = .menu-open (verified: style.css `span.menu-closed.menu-open:before` + functions.php
   `toggleClass('menu-open')`). SELECTOR ORDER MATTERS: `body.rs-ar` must come FIRST (it's the ancestor),
   then `#page-container` as the descendant qualifier — a `#page-container body.rs-ar …` order NEVER
   matches because <body> is NOT inside #page-container. Specificity (1 ID + 4 classes) still beats the
   theme's `#page-container span.menu-closed:before` (1 ID + 1 class). Scoped to body.rs-ar → EN/LTR untouched. */
body.rs-ar #page-container .et_mobile_menu .menu-item-has-children > span.menu-closed,
body.rs-ar #page-container .et_mobile_menu .menu-item-has-children > span.menu-open{
  right:auto !important; left:0 !important; width:40px !important; text-align:center !important; border-left:0 !important; }
body.rs-ar #page-container .et_mobile_menu .menu-item-has-children > span.menu-closed::before,
body.rs-ar #page-container .et_mobile_menu .menu-item-has-children > span.menu-open::before{
  background:none !important; background-color:transparent !important; border-radius:0 !important;
  width:auto !important; height:auto !important; color:#383838 !important; font-family:"ETmodules" !important;
  content:"3" !important; font-size:16px !important; line-height:inherit !important; transform:none !important; }
body.rs-ar #page-container .et_mobile_menu .menu-item-has-children > span.menu-open::before{ content:"2" !important; }
body.rs-ar #page-container .et_mobile_menu .menu-item-has-children > a{ padding-left:44px !important; padding-right:0 !important; }

/* ===================== from rs-article-extras ===================== */
body.single-post .addtoany_share_save_container,body.single-post .a2a_kit{display:none!important}
.rs-meta-row{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px;margin:0 0 22px;padding:0 0 12px;border-bottom:1px solid #ececec}
.rs-readtime{font-size:14px;color:#777;font-weight:600;white-space:nowrap}
.rs-share{display:flex;gap:7px;flex-wrap:wrap}
.rs-share a,.rs-share button{display:inline-flex;align-items:center;gap:5px;padding:6px 13px;border-radius:18px;border:0;cursor:pointer;color:#fff;text-decoration:none;font-size:13px;font-weight:700;line-height:1;font-family:inherit}
.rs-share .rs-tg{background:#229ED9}.rs-share .rs-wa{background:#25D366}.rs-share .rs-x{background:#111}.rs-share .rs-fb{background:#1877F2}.rs-share .rs-cp{background:#777}
.rs-share a:hover,.rs-share button:hover{opacity:.88}
.rs-share-bottom{display:flex;align-items:center;flex-wrap:wrap;gap:12px;margin:34px 0 10px;padding:18px 0 0;border-top:1px solid #ececec}
.rs-share-label{font-size:15px;font-weight:700;color:#1a1a1a}
.rs-toc{background:#f7f9fb;border:1px solid #e6eaee;border-inline-start:4px solid #1b91cc;border-radius:6px;padding:14px 22px;margin:0 0 26px}
.rs-toc>strong{display:block;font-size:15px;color:#1a1a1a;margin-bottom:8px}
.rs-toc ol{margin:0;padding-inline-start:20px;list-style:decimal}
.rs-toc li{margin:5px 0;font-size:14.5px}
.rs-toc li.lvl-3{padding-inline-start:18px;font-size:13.5px;list-style:circle}
.rs-toc a{color:#1b91cc;text-decoration:none}
.rs-toc a:hover{text-decoration:underline}
.rs-newsletter{background:#f0f8fc;border:1px solid #cfe9f5;border-radius:8px;padding:22px 24px;margin:34px 0}
.rs-newsletter h3{margin:0 0 6px;font-size:20px;color:#1a1a1a}
.rs-newsletter p{margin:0 0 14px;color:#555;font-size:15px}

/* ===================== from rs-archive-headers ===================== */
body.rs-ar.archive .rs-arch-head{ text-align:center !important; border-bottom:0 !important; padding:0 !important; margin:8px auto 22px !important; }
body.rs-ar.archive .rs-arch-head h1{ font-size:30px !important; font-weight:800 !important; }
body.rs-ar.category .et_pb_text_0_tb_body,
body.rs-ar.tag .et_pb_text_0_tb_body{ display:none !important; }

/* ===================== top grey header search box (AR + EN, was added 2026-06-17) ===================== */
#et-secondary-nav li.rs-top-search-li{float:none !important;display:inline-flex !important;align-items:center;vertical-align:middle;margin:0 14px 0 0;padding:0 !important;}
#et-secondary-nav li.rs-top-search-li:before{display:none !important;content:none !important;}
.rs-top-search{display:flex;align-items:center;background:#fff;border:1px solid #bdbdbd;border-radius:14px;overflow:hidden;height:24px;}
.rs-top-search input[type="search"]{border:0;outline:0;background:transparent;font-size:12px;line-height:22px;padding:0 10px;width:118px;height:22px;color:#222;font-family:inherit;font-weight:normal;-webkit-appearance:none;}
.rs-top-search input[type="search"]::placeholder{color:#8a8a8a;}
.rs-top-search input[type="search"]::-webkit-search-cancel-button{-webkit-appearance:none;}
.rs-top-search-btn{border:0;background:transparent;cursor:pointer;color:#555;display:flex;align-items:center;justify-content:center;padding:0 8px;height:22px;}
.rs-top-search-btn:hover{color:#1b91cc;}
.rtl #et-secondary-nav li.rs-top-search-li{margin:0 0 0 14px;}
@media (max-width:980px){#et-secondary-nav li.rs-top-search-li{display:none !important;}}

/* ===================== CLS: reserve a portrait box for AR magazine/book covers =====================
   The cover-fix JS swaps the cropped -400x250 thumbnail to the full portrait cover AFTER load, which
   grew the box and shifted the section on scroll (field CLS). Reserve a portrait box up-front so the
   swap/lazy-load can't move anything. (2026-06-17) */
body.rs-ar.home .rs-mag .et_pb_post .entry-featured-image-url,
body.rs-ar.home .rs-books .et_pb_post .entry-featured-image-url{
  display:flex !important; align-items:flex-start; justify-content:center;
  aspect-ratio:3 / 4; overflow:hidden;
}
body.rs-ar.home .rs-mag .et_pb_post .entry-featured-image-url img,
body.rs-ar.home .rs-books .et_pb_post .entry-featured-image-url img{
  max-height:100% !important; width:auto !important; height:auto !important;
}

/* ===== RTL fix: nested sub-menu down-arrow caret was right-aligned (overlapping the Arabic text).
   Divi only RTL-flips the TOP-LEVEL caret, not nested sub-menu parents — move those to the left.
   (2026-06-17) ===== */
.rtl #top-menu li .menu-item-has-children > a:first-child:after,
.rtl .et-menu li li.menu-item-has-children > a:first-child:after{
  right:auto !important; left:20px !important;
}
.rtl #top-menu li .menu-item-has-children > a:first-child,
.rtl .et-menu li li.menu-item-has-children > a:first-child{
  padding-left:40px !important; padding-right:20px !important;
}
