/* =========================================================
   Mosadad brand pattern on the older-layout pages
   (blog, how-it-work EN/AR, privacy-policy, thank-you).
   Added 2026-11-09 after "Pattern application.pdf": the light
   pattern (white -> #EAF0FF, 6px squares) drawn 1:1, never
   stretched. Redesigned pages get it from mosadad.css instead.
   Only backgrounds change here; the old layouts are untouched.
========================================================= */

/* How it works: hero (replaces the old blue gradient) */
section.howitwork-hero {
  background: #FFFFFF url("/images/mosadad-pattern-light.png?v=20261111c") center top / cover no-repeat;
}

/* Blog index: header block = the same hero as the redesigned pages
   (user, 2026-11-11): edge to edge, plain brand blue, white text, and the
   blue brand pattern fading out softly from the top-right corner. */
.mosadad-cstm-blog-wrapper > .myborder:has(> .mosadad-cstm-blog-header) {
  margin: 0 !important;
}

.mosadad-cstm-blog-wrapper:has(> .myborder > .mosadad-cstm-blog-header) {
  padding-top: 0 !important;
}

.mosadad-cstm-blog-wrapper .mosadad-cstm-blog-header {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: #1072FA;
  padding-left: 6.2em;
  padding-right: 6.2em;
}

.mosadad-cstm-blog-wrapper .mosadad-cstm-blog-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: url("/images/mosadad-pattern-blue.png?v=20261111c") center top / cover no-repeat;
  -webkit-mask-image: none;
  mask-image: none;
  image-rendering: auto;
}

.mosadad-cstm-blog-wrapper .mosadad-cstm-blog-header .mosadad-cstm-blog-title,
.mosadad-cstm-blog-wrapper .mosadad-cstm-blog-header .mosadad-cstm-blog-desc {
  color: #FFFFFF;
}

@media (max-width: 1024px) {
  .mosadad-cstm-blog-wrapper .mosadad-cstm-blog-header {
    padding-left: 1.5em !important;
    padding-right: 1.5em !important;
  }
}

/* Blog pages: "Talk to us" panel (replaces the old corner dots) */
section.mos-talk__panel {
  background: #FFFFFF url("/images/mosadad-pattern-light.png?v=20261111c") center top / cover no-repeat;
}

section.mos-talk__panel::before {
  display: none;
}

/* Privacy policy and thank-you: behind the white card */
html body.pattern-page {
  background: #FFFFFF url("/images/mosadad-pattern-light.png?v=20261111c") center top / cover no-repeat fixed;
}

/* No thin grey side lines down the older pages (user, 2026-11-09) */
.myborder,
.mos-footer {
  border-left: 0 !important;
  border-right: 0 !important;
}

/* Sharp pattern squares on scaled screens */
section.howitwork-hero,
.mosadad-cstm-blog-wrapper .mosadad-cstm-blog-header,
section.mos-talk__panel,
html body.pattern-page {
  image-rendering: auto;
}

section.howitwork-hero *,
.mosadad-cstm-blog-wrapper .mosadad-cstm-blog-header *,
section.mos-talk__panel *,
html body.pattern-page * {
  image-rendering: auto;
}

/* Blog articles: the same blue hero as the blog index (user, 2026-11-11).
   Holds "Back to list of blogs" and the article title. */
.post-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: #1072FA;
}

#main .post-hero {
  padding: 72px 6.2em 72px !important;
}

.post-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: url("/images/mosadad-pattern-blue.png?v=20261111c") center top / cover no-repeat;
  -webkit-mask-image: none;
  mask-image: none;
  image-rendering: auto;
}

.post-hero__inner {
  max-width: 980px;
}

#main .post-hero__back {
  display: inline-block;
  margin: 0 0 28px;
  color: rgba(255, 255, 255, 0.85);
  font-size: 17px;
  text-decoration: none;
}

#main .post-hero__back:hover {
  color: #FFFFFF;
  text-decoration: underline;
}

.post-hero__title {
  margin: 0;
  color: #FFFFFF;
  font-size: clamp(32px, 4.2vw, 56px);
  font-weight: 600;
  line-height: 1.15;
}

.post-hero__title i {
  font-style: normal;
}

@media (max-width: 1024px) {
  #main .post-hero {
    padding: 48px 1.5em 52px !important;
  }
}

/* Privacy policy: small EN / عربي link at the top of the card (2026-11-11) */
.privacy-card .lang-link {
  margin: 0 0 8px;
  text-align: end;
  font-size: 15px;
}

.privacy-card .lang-link a {
  color: #1072FA;
  text-decoration: none;
  font-weight: 600;
}

.privacy-card .lang-link a:hover {
  text-decoration: underline;
}

/* Arabic blog pages: the same pattern mirrored, dense side at the top-left */
[dir="rtl"] .mosadad-cstm-blog-wrapper .mosadad-cstm-blog-header::before,
[dir="rtl"] .post-hero::before {
  background-image: url("/images/mosadad-pattern-blue-rtl.png?v=20261111c");
  background-position: center top;
}

/* Blog articles laid out like the news story template (user, 2026-11-12):
   no "Other blogs" sidebar, the article in one centred column, and the
   hero text centred. */
.mos-blog-single .mos-blog-sidebar {
  display: none !important;
}

.mos-blog-single .mos-blog-container {
  display: block !important;
}

.mos-blog-single .mybordersinglb,
.mos-blog-single .myborder {
  border: 0 !important;
}

.mos-blog-single .mos-blog-main {
  max-width: 760px !important;
  margin: 0 auto !important;
  padding: 56px 24px 0 !important;
}

.mos-blog-single .mos-blog-main img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 16px;
}

.post-hero {
  text-align: center;
}

.post-hero__inner {
  margin: 0 auto;
}

/* "All news" link at the end of each article, above the footer - same
   look and motion as the "All news" link on the news stories (user,
   2026-11-12): Noto Sans 600 blue, arrow first with the gentle arrow pulse,
   no underline at rest; on hover a soft glow and a line that grows under the
   whole text (anchored to the text end: right in English, left in Arabic). */
#main .post-back {
  max-width: 760px;
  margin: 0 auto;
  padding: 48px 24px 72px;
}

#main .post-back__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
  color: #1072FA;
  text-decoration: none;
  background: linear-gradient(currentColor, currentColor) 100% 100% / 0 1.5px no-repeat;
  transition: background-size 0.4s var(--ease-out, ease), text-shadow 0.3s ease;
}

#main .post-back__link:hover {
  color: #0B55BD;   /* --blue-dark, as on the news stories */
  text-decoration: none;
  background-size: calc(100% - 26px) 1.5px;
  text-shadow: 0 0 14px rgba(16, 114, 250, 0.45);
}

html[dir="rtl"] #main .post-back__link {
  background-position: 0 100%;
}

#main .post-back__link svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

html.motion #main .post-back__link svg {
  animation: mo-arrow 2.4s ease-in-out infinite;
}

html.motion[dir="rtl"] #main .post-back__link svg {
  animation-name: rtl-arrow;
}

/* Blog list hero: title centred, the short description centred below it
   (user, 2026-11-12). */
#main .mosadad-cstm-blog-wrapper .mosadad-cstm-blog-header {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  text-align: center;
}

#main .mosadad-cstm-blog-wrapper .mosadad-cstm-blog-title {
  margin: 0;
  max-width: 900px;
}

#main .mosadad-cstm-blog-wrapper .mosadad-cstm-blog-desc {
  margin: 0 auto;
  max-width: 620px;
  font-size: 18px;
  line-height: 1.6;
}

/* Blog list: text cover for the featured EIF story (2026-11-12), same look
   as the News page card - brand blue + pattern, white logo top-left, serif
   headline. */
#main .blog-text-cover {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 340px;
  padding: 72px 44px 44px;
  border-radius: 20px;
  background: #1072FA url("/images/mosadad-pattern-blue.png?v=20261111c") center top / cover no-repeat;
  color: #FFFFFF;
  overflow: hidden;
}

#main .blog-text-cover .blog-text-cover__logo {
  position: absolute;
  top: 18px;
  inset-inline-start: 20px;
  width: 90px;
  height: auto;
  border-radius: 0;
  object-fit: contain;
}

#main .blog-text-cover__title {
  font-family: var(--serif);
  font-size: clamp(26px, 2.6vw, 38px);
  font-weight: 400;
  line-height: 1.2;
  text-align: start;
}

#main .blog-text-cover__title em {
  font-style: italic;
}

#main .blog-text-cover__title .nowrap {
  white-space: nowrap;
}

[dir="rtl"] #main .blog-text-cover__title em {
  font-style: normal;
}

/* "Latest Blogs" heading now sits above the featured story (2026-11-12):
   space below the hero, lined up with the featured text. */
#main .mosadad-cstm-blog-wrapper .myborder > .mosadad-cstm-latest-head {
  padding: 56px 2em 0;
  margin-bottom: 0;
}

@media (max-width: 768px) {
  #main .mosadad-cstm-blog-wrapper .myborder > .mosadad-cstm-latest-head {
    padding: 36px 1em 0;
  }
}

/* Blog "Talk to us" panel edge to edge with square corners, like Home's
   (user, 2026-11-12: no white corner spaces). */
#main .mos-talk {
  padding: 0;
}

#main .mos-talk__panel {
  border-radius: 0;
}

/* "Latest Blogs" intro on one line on desktop (user, 2026-11-12) */
#main .mosadad-cstm-blog-wrapper .mosadad-cstm-latest-head p {
  max-width: none !important;
}

/* Article hero: "News · date" label above the title and a short summary
   below it, like the news story hero (user, 2026-11-12). */
#main .post-hero__eyebrow {
  margin: 0 0 20px;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--on-blue-label, #CFE0FF);
}

#main .post-hero__desc {
  max-width: 680px;
  margin: 24px auto 0;
  font-family: var(--sans);
  font-size: 20px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--on-blue-text, #EAF0FF);
}

[dir="rtl"] #main .post-hero__eyebrow {
  letter-spacing: 0;
}

@media (max-width: 760px) {
  #main .post-hero__desc {
    font-size: 17px;
  }
}

/* Privacy policy: lettered list (a, b, c) like the bullet lists
   (new policy text, 2026-11-16) */
.privacy-card ol {
  font-family: 'Manrope', sans-serif;
  font-size: 1rem;
  color: #555;
  line-height: 1.8;
  margin-bottom: 12px;
  padding-inline-start: 28px;
  list-style-type: lower-alpha;
}

.privacy-card ol li {
  margin-bottom: 10px;
  padding-inline-start: 6px;
}

[dir="rtl"] .privacy-card ol {
  list-style-type: arabic-indic;
}

[dir="rtl"] .privacy-card ul {
  padding-left: 0;
  padding-right: 28px;
}
