/* =====================================================================
   blogs.afdb.org : corrective and usability stylesheet
   ---------------------------------------------------------------------
   Load LAST, after new-css.css and the css_injector files
   (for example as a new CSS Injector rule, "All pages", weight highest).
   It overrides the existing theme layer; it does not replace Bootstrap.

   Page types covered (audit of 6 and 7 Nov 2026, at 1892px, 1030px
   and 400px):
     - Home (EN, FR, PT, AR)
     - Article (blog post node, with share bar, comments, Related Sections)
     - Blog landing pages (book nodes: /climate-change-in-africa, etc.)
     - Our blogs, Authors
     - Author pages (taxonomy term: /blog-author/...)
     - Search results, empty search
     - 404 / 403, user login and generic forms
     - Arabic (dir="rtl") versions of all of the above

   Issues addressed:
    1. Six different greens in use (#009455, #009653, #00a241, #169f1b,
       #3f8654, #4a9d35, plus #50a468 inline in the book menu);
       white text on #4a9d35 = 3.4:1 (fails WCAG AA)
    2. Links, menu, language switcher, "View all" below 4.5:1
    3. Publication dates grey #8c8c8c = 3.4:1 and 12px; on blog landing
       pages, grey date on a #01884c badge is unreadable (1.1:1)
    4. Article lines ~150 characters long at desktop
    5. Tagline pasted with an inline serif font (Times)
    6. Floating social bar covers the left sidebar at 992 to 1300px
    7. Back-to-top button 70px, covers article text on mobile
    8. Mobile header takes ~220px before any content (header region
       squeezed to 197px, "Main menu" toggle at 30px)
    9. Uneven card heights / ragged Bootstrap float grids
   10. No visible keyboard focus indicator
   11. Empty footer band, low-contrast footer links
   12. Leftover red template colours (#f73f52, #af0719) on the pager,
       primary button hover and comment links
   13. Blog landing page post table: wasted date column on mobile
   14. Arabic: Bootstrap has no RTL layer; borders, radii, carousel and
       letter-spacing all assume left-to-right
   ===================================================================== */


/* ---------------------------------------------------------------------
   0. Design tokens
   --------------------------------------------------------------------- */
:root {
  --afdb-green: #009455;        /* brand: borders, accents, large text */
  --afdb-green-700: #007a45;    /* links, buttons (5.4:1 on white)    */
  --afdb-green-800: #006b3c;    /* bands, footer (6.6:1 with white)   */
  --afdb-green-900: #005c33;    /* hover / pressed                    */
  --afdb-green-50: #eef7f2;     /* tints                              */
  --afdb-text: #1a1f1c;
  --afdb-text-muted: #5f6b66;   /* 5.5:1 on white                     */
  --afdb-border: #dfe5e2;
  --afdb-border-strong: #b9c4bf;
  --afdb-surface: #f6f8f7;
  --afdb-white: #ffffff;
  --afdb-danger: #b42318;       /* errors only (6.0:1 on white)       */
  --afdb-radius: 6px;
  --afdb-shadow: 0 1px 3px rgba(16, 24, 20, .08), 0 4px 12px rgba(16, 24, 20, .05);
  --afdb-focus: 0 0 0 3px #ffffff, 0 0 0 5px #005c33;
  --afdb-font: "Helvetica Neue", Helvetica, Arial, "Segoe UI", Roboto, sans-serif;
  --afdb-font-ar: Tahoma, "Segoe UI", "Noto Sans Arabic", "Geeza Pro", Arial, sans-serif;
  --afdb-measure: 72ch;
}


/* ---------------------------------------------------------------------
   1. Base typography and links
   --------------------------------------------------------------------- */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--afdb-font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--afdb-text);
  background: var(--afdb-white);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
  font-family: var(--afdb-font);
  color: var(--afdb-text);
  line-height: 1.25;
  font-weight: 700;
}

a {
  color: var(--afdb-green-700);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

a:hover,
a:focus {
  color: var(--afdb-green-900);
}

img {
  max-width: 100%;
  height: auto;
}

::selection {
  background: var(--afdb-green-50);
  color: var(--afdb-text);
}


/* ---------------------------------------------------------------------
   2. Keyboard focus and skip link (issue 10)
   --------------------------------------------------------------------- */
a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus,
[tabindex]:focus {
  outline: none;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible,
.sf-accordion-toggle a:focus-visible {
  outline: none;
  box-shadow: var(--afdb-focus);
  border-radius: 2px;
}

#skip-link a.element-focusable:focus {
  position: fixed !important;
  top: 8px;
  left: 8px;
  z-index: 10000;
  width: auto;
  height: auto;
  clip: auto;
  padding: 10px 16px;
  background: var(--afdb-green-800);
  color: var(--afdb-white);
  font-weight: 700;
  border-radius: var(--afdb-radius);
  text-decoration: none;
}


/* ---------------------------------------------------------------------
   3. Header: logo, languages, search
   --------------------------------------------------------------------- */
#page-header {
  background: var(--afdb-white);
  border-bottom: 1px solid var(--afdb-border);
}

#page-header .header-top {
  padding-top: 10px;
  padding-bottom: 10px;
}

#page-header .logo img {
  max-height: 60px;
  width: auto;
}

/* Language switcher: readable contrast, clear current language.
   The theme uppercases links but not the <span> used for languages
   with no translation, so the four labels had mixed case. */
#block-locale-language ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

#block-locale-language li {
  display: inline-block;
  margin: 0 0 0 4px;
  font-size: 14px;
}

#block-locale-language a,
#block-locale-language .language-link {
  display: inline-block;
  padding: 6px 10px;
  color: var(--afdb-green-700);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .02em;
  text-transform: none;
  border-radius: var(--afdb-radius);
  text-decoration: none;
}

#block-locale-language a:hover {
  background: var(--afdb-green-50);
  color: var(--afdb-green-900);
}

#block-locale-language a.active,
#block-locale-language li.active a {
  color: var(--afdb-text);
  background: var(--afdb-surface);
}

/* No translation of the current page: shown, but not as a link */
#block-locale-language span.locale-untranslated {
  color: var(--afdb-text-muted);
  font-weight: 400;
  cursor: default;
}

/* Search box */
#block-search-form .form-control,
#block-search-form input[type="text"],
#block-search-form input[type="search"] {
  height: 40px;
  font-size: 15px;
  border: 1px solid var(--afdb-border-strong);
  border-right: 0;
  border-radius: var(--afdb-radius) 0 0 var(--afdb-radius);
  box-shadow: none;
}

#block-search-form .form-control:focus {
  border-color: var(--afdb-green-700);
}

#block-search-form .btn,
#block-search-form button,
#block-search-form input[type="submit"] {
  height: 40px;
  min-width: 44px;
  background: var(--afdb-green-700);
  border-color: var(--afdb-green-700);
  color: var(--afdb-white);
  border-radius: 0 var(--afdb-radius) var(--afdb-radius) 0;
}

#block-search-form .btn:hover,
#block-search-form button:hover {
  background: var(--afdb-green-900);
  border-color: var(--afdb-green-900);
}


/* ---------------------------------------------------------------------
   4. Main menu (Superfish)
   --------------------------------------------------------------------- */
#page-header .header-bottom {
  border-top: 1px solid var(--afdb-border);
}

#superfish-1.sf-menu > li > a.sf-depth-1,
#superfish-1.sf-menu > li > span.sf-depth-1 {
  padding: 14px 18px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--afdb-green-800);
  border: 0;
  background: transparent;
  transition: background-color .15s ease, color .15s ease;
}

#superfish-1.sf-menu > li > a.sf-depth-1:hover,
#superfish-1.sf-menu > li > a.sf-depth-1:focus-visible,
#superfish-1.sf-menu > li.sfHover > a.sf-depth-1 {
  background: var(--afdb-green-50);
  color: var(--afdb-green-900);
}

/* Current page */
#superfish-1.sf-menu > li > a.sf-depth-1.active,
#superfish-1.sf-menu > li.active-trail > a.sf-depth-1 {
  color: var(--afdb-text);
  box-shadow: inset 0 -3px 0 var(--afdb-green);
}

/* External "AfDB.org" item: keep the highlight, fix contrast (was 3.9:1) */
#superfish-1.sf-menu > li > a.sf-depth-1[href*="afdb.org/en"],
#superfish-1.sf-menu > li.last > a.sf-depth-1 {
  background: var(--afdb-green-700);
  color: var(--afdb-white);
}

#superfish-1.sf-menu > li > a.sf-depth-1[href*="afdb.org/en"]:hover,
#superfish-1.sf-menu > li.last > a.sf-depth-1:hover {
  background: var(--afdb-green-900);
  color: var(--afdb-white);
}

/* Mobile accordion toggle. Font Awesome replaces the "Main menu" text
   with an SVG bars icon after load; both states are sized here (the
   theme renders either at 30px). */
.sf-accordion-toggle a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 44px;
  min-height: 44px;
  padding: 0 8px !important;
  font-size: 24px !important;
  line-height: 1;
  color: var(--afdb-green-700) !important;
  text-decoration: none;
}

.sf-accordion-toggle a span {
  font-size: 16px;
  font-weight: 700;
}

.sf-accordion-toggle a svg {
  width: 22px;
  height: 22px;
}


/* ---------------------------------------------------------------------
   5. Front page: featured band and slider (issue 1)
   --------------------------------------------------------------------- */
#front-page-row-1 {
  background: var(--afdb-green-800);
  padding-top: 24px;
  padding-bottom: 24px;
}

#front-page-row-1 a,
#front-page-row-1 .field-content,
#front-page-row-1 .field-content a,
#front-page-row-1 .views-field-title a {
  color: var(--afdb-white);
}

#front-page-row-1 a:hover .field-content,
#front-page-row-1 .field-content a:hover,
#front-page-row-1 .views-field-title a:hover {
  color: var(--afdb-white);
  text-decoration: underline;
}

#front-page-row-1 img {
  border-radius: var(--afdb-radius);
  width: 100%;
  object-fit: cover;
}

/* Side feature only: the Owl slider computes its own height from the
   original image, so its images are left at their native ratio. */
#front-page-row-1 .col-md-4 img {
  aspect-ratio: 4 / 3;
}

#front-page-row-1 .views-field-title,
#front-page-row-1 .views-field-title a {
  font-size: 20px;
  font-weight: 600;
  line-height: 1.35;
}

/* The slider dots sit at the right edge, level with the first caption
   line: keep long captions clear of them */
#block-views-front-page-slider-block .views-field-title {
  padding-right: 96px;
}

/* Clip the carousel track so it never causes horizontal scrolling */
#block-views-front-page-slider-block,
.afdb-owl-carousel-section {
  overflow: hidden;
}

/* Carousel dots: larger hit area, visible on dark band */
#block-views-front-page-slider-block .owl-theme .owl-controls .owl-page span {
  width: 12px;
  height: 12px;
  margin: 6px;
  background: var(--afdb-white);
  opacity: .5;
}

#block-views-front-page-slider-block .owl-theme .owl-controls .owl-page.active span,
#block-views-front-page-slider-block .owl-theme .owl-controls .owl-page:hover span {
  opacity: 1;
}


/* ---------------------------------------------------------------------
   6. Front page: four category columns (issue 9)
   --------------------------------------------------------------------- */
/* Row 1 (featured band) is excluded: equal heights there would leave an
   empty green area under the slider caption. */
.front-page-content-section > div:not(#front-page-row-1) .row {
  display: flex;
  flex-wrap: wrap;
}

.front-page-content-section > div:not(#front-page-row-1) .row > [class*="col-"] {
  display: flex;
  flex-direction: column;
  float: none;
}

.front-page-content-section > div:not(#front-page-row-1) .row > [class*="col-"] > .region {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
}

.front-page-content-section .region > section.block-views {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  margin-bottom: 30px;
}

.front-page-content-section h2.block-title {
  position: relative;
  margin: 28px 0 0;
  padding-bottom: 10px;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: var(--afdb-text);
  border-bottom: 3px solid var(--afdb-green);
}

/* The theme draws a second 2px rule 10px under the title */
.front-page-content-section h2.block-title::after {
  display: none;
}

.view-news-crousel-block {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  background: var(--afdb-surface);
  border-radius: 0 0 var(--afdb-radius) var(--afdb-radius);
  padding: 8px 16px 14px !important;
}

.view-news-crousel-block .view-content {
  flex: 1 1 auto;
}

.view-news-crousel-block .views-row {
  margin: 0;
  padding: 12px 0;
  border-bottom: 1px solid var(--afdb-border);
}

.view-news-crousel-block .views-row:last-child {
  border-bottom: 0;
}

.view-news-crousel-block .views-field-title a {
  display: block;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--afdb-text);
  text-decoration: none;
}

.view-news-crousel-block .views-field-title a:hover {
  color: var(--afdb-green-700);
  text-decoration: underline;
}

/* "View all": real button-sized target with AA contrast */
.view-news-crousel-block .view-footer {
  margin-top: auto;
  padding-top: 8px;
}

.view-all-btn .secondary-link-btn,
a.secondary-link-btn {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--afdb-green-700);
  border: 1px solid currentColor;
  border-radius: var(--afdb-radius);
  background: var(--afdb-white);
  text-decoration: none;
}

.view-all-btn .secondary-link-btn:hover,
a.secondary-link-btn:hover {
  background: var(--afdb-green-700);
  color: var(--afdb-white);
}


/* ---------------------------------------------------------------------
   7. Dates and meta (issue 3)
   --------------------------------------------------------------------- */
.date-display-single,
.field-name-field-date-of-publication,
.views-field-field-date-of-publication {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .02em;
  color: var(--afdb-text-muted);
}

.view-news-crousel-block .date-display-single {
  display: block;
  margin-top: 4px;
}


/* ---------------------------------------------------------------------
   8. Inner pages: layout, sidebar menu, breadcrumb
   --------------------------------------------------------------------- */
.inner-page-row {
  padding-top: 24px;
  padding-bottom: 40px;
}

/* Replace the full-height 2px green rule with spacing */
.page-main-content {
  border-left: 0;
  padding-left: 15px;
}

@media (min-width: 992px) {
  .page-main-content {
    padding-left: 32px;
    border-left: 1px solid var(--afdb-border);
  }

  /* The theme's flex row aligns columns to the top, so the sidebar
     column is only as tall as the menu and "sticky" had no room. */
  .row.inner-page-row {
    align-items: stretch;
  }
}

.breadcrumb {
  margin-bottom: 12px;
  padding: 0;
  background: transparent;
  font-size: 13px;
  color: var(--afdb-text-muted);
}

.breadcrumb a {
  color: var(--afdb-green-700);
}

h1.page-header {
  margin: 0 0 12px;
  padding: 0;
  border: 0;
  font-size: 32px;
  line-height: 1.2;
  color: var(--afdb-text);
}

/* Sidebar blog menu.
   afdb_book_menu writes style="border-left-color:#50a468" on every item
   (a seventh green), so the colours below need !important. The current
   blog is rendered as <span class="menu-text">, not as a link. */
.region-sidebar-left .afdb-book-menu,
.block-afdb-book-menu ul.afdb-book-menu.afdb-book-menu-depth-1 {
  margin: 0;
  padding: 0;
  list-style: none;
  background: var(--afdb-white);
  border: 1px solid var(--afdb-border);
  border-radius: var(--afdb-radius);
  box-shadow: none;
  overflow: hidden;
}

.region-sidebar-left .afdb-book-menu li {
  margin: 0;
  border-bottom: 1px solid var(--afdb-border);
}

.region-sidebar-left .afdb-book-menu li:last-child {
  border-bottom: 0;
}

.region-sidebar-left .afdb-book-menu a,
.region-sidebar-left .afdb-book-menu .menu-text {
  display: block;
  padding: 11px 14px 11px 16px;
  font-size: 15px;
  line-height: 1.35;
  color: var(--afdb-text);
  border-bottom: 0;
  border-left: 3px solid transparent;
  text-decoration: none;
}

/* Low specificity on purpose: beats the inline colour, loses to the
   hover and current-item rules below */
.afdb-book-menu .menu-text {
  border-left-color: transparent !important;
}

.region-sidebar-left .afdb-book-menu a:hover {
  background: var(--afdb-green-50);
  border-left-color: var(--afdb-green) !important;
  color: var(--afdb-green-900);
}

.region-sidebar-left .afdb-book-menu span.menu-text,
.region-sidebar-left .afdb-book-menu a.active,
.region-sidebar-left .afdb-book-menu li.active-trail > a {
  background: var(--afdb-green-50);
  border-left-color: var(--afdb-green-700) !important;
  color: var(--afdb-green-900);
  font-weight: 700;
}

/* Nested levels, if a blog has sub-sections */
.region-sidebar-left .afdb-book-menu .afdb-book-menu {
  border: 0;
  border-top: 1px solid var(--afdb-border);
  border-radius: 0;
}

.region-sidebar-left .afdb-book-menu .afdb-book-menu a,
.region-sidebar-left .afdb-book-menu .afdb-book-menu .menu-text {
  padding-left: 28px;
  font-size: 14px;
}

@media (min-width: 992px) {
  .region-sidebar-left {
    position: sticky;
    top: 16px;
  }
}


/* ---------------------------------------------------------------------
   9. Article page (issues 4 and 5)
   --------------------------------------------------------------------- */
.node .field-name-field-tagline,
.node .field-name-field-tagline * {
  font-family: var(--afdb-font) !important;   /* overrides pasted inline fonts */
}

.node .field-name-field-tagline {
  max-width: var(--afdb-measure);
  margin: 4px 0 10px;
  font-size: 21px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--afdb-green-700);
}

.node .field-name-field-date-of-publication {
  margin-bottom: 16px;
}

/* Readable line length and size for long-form text */
.node .field-name-body {
  max-width: var(--afdb-measure);
  font-size: 18px;
  line-height: 1.7;
  color: var(--afdb-text);
}

.node .field-name-body p,
.node .field-name-body li {
  font-size: inherit;
  line-height: inherit;
  color: inherit;
}

.node .field-name-body p {
  margin: 0 0 1.1em;
}

.node .field-name-body h2 {
  margin: 1.8em 0 .5em;
  font-size: 26px;
}

.node .field-name-body h3 {
  margin: 1.6em 0 .5em;
  font-size: 21px;
}

.node .field-name-body ul,
.node .field-name-body ol {
  margin: 0 0 1.1em;
  padding-left: 1.4em;
}

.node .field-name-body li {
  margin-bottom: .4em;
}

.node .field-name-body a {
  text-decoration: underline;
}

.node .field-name-body blockquote {
  margin: 1.5em 0;
  padding: 4px 0 4px 20px;
  font-size: 20px;
  font-style: italic;
  color: var(--afdb-text);
  border-left: 4px solid var(--afdb-green);
}

.node .field-name-body img {
  border-radius: var(--afdb-radius);
}

/* Tables: scroll inside their own box instead of breaking the page */
.node .field-name-body table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
  font-size: 15px;
}

.node .field-name-body th,
.node .field-name-body td {
  padding: 8px 12px;
  border: 1px solid var(--afdb-border);
}

.node .field-name-body th {
  background: var(--afdb-surface);
}

/* Cover image and caption */
.field-name-field-blog-cover-image {
  margin-bottom: 24px;
}

.field-name-field-blog-cover-image img {
  display: block;
  width: 100%;
  border-radius: var(--afdb-radius) var(--afdb-radius) 0 0;
}

.afdb_image-field-caption {
  padding: 10px 14px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--afdb-white);
  background: var(--afdb-green-800);
  border-radius: 0 0 var(--afdb-radius) var(--afdb-radius);
}

/* ShareThis bar */
.sharethis-inline-share-buttons {
  margin: 8px 0 16px !important;
}

.sharethis-inline-share-buttons .st-btn {
  min-height: 36px;
}

/* "Related Sections" (keywords block under the article): same heading
   style as the home page columns instead of a grey bar */
#block-views-keywords-block {
  max-width: var(--afdb-measure);
  margin-top: 32px;
}

#block-views-keywords-block h2.block-title {
  margin: 0 0 12px;
  padding: 0 0 10px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: var(--afdb-text);
  background: transparent;
  border-bottom: 3px solid var(--afdb-green);
}

.view-keywords ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.view-keywords ul li {
  margin: 0;
}

.view-keywords ul li a {
  display: inline-block;
  padding: 6px 14px;
  font-size: 14px;
  font-weight: 600;
  border: 1px solid;
  border-radius: 999px;
  text-decoration: none;
}


/* ---------------------------------------------------------------------
   10. Listing grids: Our blogs, Authors (issue 9) and pager
   --------------------------------------------------------------------- */
.views-bootstrap-grid-plugin-style > .row {
  display: flex;
  flex-wrap: wrap;
}

.views-bootstrap-grid-plugin-style > .row > [class*="col-"] {
  float: none;
  margin-bottom: 24px;
}

/* Our blogs cards */
.views-bootstrap-grid-plugin-style img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: var(--afdb-radius) var(--afdb-radius) 0 0;
  transition: opacity .2s ease;
}

.views-bootstrap-grid-plugin-style a:hover img {
  opacity: .9;
}

.views-bootstrap-grid-plugin-style .views-field-title {
  padding: 10px 0 0;
}

.views-bootstrap-grid-plugin-style .views-field-title a {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--afdb-text);
  text-decoration: none;
}

.views-bootstrap-grid-plugin-style .views-field-title a:hover {
  color: var(--afdb-green-700);
  text-decoration: underline;
}

/* Authors list: comfortable tap targets, without the theme's 20px
   padding that left ~110px between rows */
.view-authors .views-bootstrap-grid-plugin-style > .row > [class*="col-"] {
  margin-bottom: 0;
}

.views-bootstrap-grid-plugin-style .views-field-name {
  margin: 0;
  padding: 0;
  border-bottom: 1px solid var(--afdb-border);
}

.views-bootstrap-grid-plugin-style .views-field-name a {
  display: block;
  padding: 10px 0;
  font-size: 16px;
  color: var(--afdb-green-700);
  text-decoration: none;
}

.views-bootstrap-grid-plugin-style .views-field-name a:hover {
  color: var(--afdb-green-900);
  text-decoration: underline;
}

/* Keywords / tags pills (custom_afdb.css used #00a241, 3.2:1) */
.view-keywords ul li a {
  border-color: var(--afdb-green-700);
  color: var(--afdb-green-700);
}

.view-keywords ul li a:hover {
  background: var(--afdb-green-700);
  color: var(--afdb-white);
}

.greenbartitle h2,
.greenHiBox,
div.greenHiBox h1, div.greenHiBox h2, div.greenHiBox h3,
div.greenHiBox h4, div.greenHiBox h5, div.greenHiBox h6,
div.greenHiBox p, div.greenHiBox a {
  background-color: var(--afdb-green-800);
}

/* Pager. new-css.css styles ".pagination li a" in grey and the active
   page in red (#f73f52) with a scale transform; neutralised here. */
.pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin: 32px 0 16px;
}

.pagination > li {
  display: block;
}

.pagination > li > a,
.pagination > li > span,
.pagination li a {
  float: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-width: 40px;
  height: auto;
  min-height: 40px;
  margin: 0;
  padding: 6px 12px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  color: var(--afdb-green-700);
  text-align: center;
  background: var(--afdb-white);
  border: 1px solid var(--afdb-border);
  border-radius: var(--afdb-radius) !important;
  transform: none;
}

.pagination > li > a:hover,
.pagination li a:hover {
  color: var(--afdb-green-900);
  background: var(--afdb-green-50);
  border-color: var(--afdb-green);
}

.pagination > .active > a,
.pagination > .active > span,
.pagination > .active > a:hover,
.pagination li.active a,
.pagination li.active span,
.pagination li.active a:hover,
.pagination li.active a:focus {
  color: var(--afdb-white);
  background: var(--afdb-green-700);
  border-color: var(--afdb-green-700);
  transform: none;
}

.pagination > .disabled > span,
.pagination li.pager-ellipsis span {
  color: var(--afdb-text-muted);
  background: transparent;
  border-color: transparent;
}


/* ---------------------------------------------------------------------
   11. Blog landing pages (book nodes: /climate-change-in-africa, etc.)
       Banner image, introduction, then a two-column post table
       (date | title + summary) and pager.
   --------------------------------------------------------------------- */
.node-book .field-name-field-image {
  margin-bottom: 24px;
}

.node-book .field-name-field-image img {
  display: block;
  width: 100%;
  max-height: 320px;
  object-fit: cover;
  border-radius: var(--afdb-radius);
}

/* Introduction: the first line is an italic strapline ("A race against
   time") */
.node-book > .field-name-body,
.node-book > .content > .field-name-body {
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--afdb-border);
}

/* Post table */
.node-book .views-table,
.field-name-field-add-views .views-table {
  width: 100%;
  margin: 0;
  border: 0;
  border-collapse: collapse;
  background: transparent;
}

.field-name-field-add-views .views-table > tbody > tr > td {
  padding: 20px 0;
  vertical-align: top;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--afdb-border);
}

.field-name-field-add-views .views-table > tbody > tr:first-child > td {
  padding-top: 4px;
}

.field-name-field-add-views .views-table > tbody > tr:last-child > td {
  border-bottom: 0;
}

/* Date column: the theme paints it #01884c while the date text is grey
   (1.1:1). Replaced by a tinted label. */
.field-name-field-add-views .views-table td.views-field-field-date-of-publication {
  width: 120px;
  padding-right: 20px;
  text-align: start;
  white-space: nowrap;
  background: transparent !important;
}

.field-name-field-add-views .views-table td.views-field-field-date-of-publication .date-display-single {
  display: inline-block;
  padding: 4px 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--afdb-green-800);
  background: var(--afdb-green-50);
  border-radius: 4px;
}

.field-name-field-add-views .views-table td.views-field-nothing {
  max-width: var(--afdb-measure);
  font-size: 16px;
  line-height: 1.6;
  color: var(--afdb-text);
}

.field-name-field-add-views .views-table td.views-field-nothing h3 {
  margin: 0 0 8px;
  font-size: 20px;
  line-height: 1.3;
}

.field-name-field-add-views .views-table td.views-field-nothing h3 a {
  color: var(--afdb-text);
  text-decoration: none;
}

.field-name-field-add-views .views-table td.views-field-nothing h3 a:hover {
  color: var(--afdb-green-700);
  text-decoration: underline;
}

/* Book links under the page ("Printer-friendly version", and for
   editors "Add child page") */
.node-book ul.links,
.node footer ul.links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
  font-size: 14px;
}

.node-book ul.links > li,
.node footer ul.links > li {
  padding: 0;
}


/* ---------------------------------------------------------------------
   12. Author pages (taxonomy term: /blog-author/...)
       H1 = author name, then teasers with "Read more".
   --------------------------------------------------------------------- */
.term-listing-heading .taxonomy-term .content:empty,
.term-listing-heading:has(.content:empty) {
  display: none;
}

.page-taxonomy-term .node-teaser {
  max-width: var(--afdb-measure);
  margin: 0;
  padding: 20px 0;
  border-bottom: 1px solid var(--afdb-border);
}

.page-taxonomy-term .node-teaser:last-of-type {
  border-bottom: 0;
}

.node-teaser > header h2 {
  margin: 0 0 8px;
  font-size: 22px;
  line-height: 1.3;
}

.node-teaser > header h2 a {
  color: var(--afdb-text);
  text-decoration: none;
}

.node-teaser > header h2 a:hover {
  color: var(--afdb-green-700);
  text-decoration: underline;
}

.node-teaser .field-name-body {
  font-size: 16px;
  line-height: 1.6;
}

.node-teaser .field-name-body p:last-child {
  margin-bottom: 0;
}

.node-teaser footer ul.links {
  margin-top: 10px;
}

.node-teaser footer .node-readmore a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  font-weight: 700;
  color: var(--afdb-green-700);
  text-decoration: none;
}

.node-teaser footer .node-readmore a::after {
  content: "\2192";
  margin-left: 6px;
}

.node-teaser footer .node-readmore a:hover {
  text-decoration: underline;
}

/* Leftover template button style (red outline, #f73f52) */
article footer .btn-primary {
  color: var(--afdb-green-700);
  border-color: var(--afdb-green-700);
  background: transparent;
}

article footer .btn-primary::after {
  display: none;
}

article footer .btn-primary:hover {
  color: var(--afdb-white);
  background: var(--afdb-green-700);
}


/* ---------------------------------------------------------------------
   13. Search results (/search/node/...)
   --------------------------------------------------------------------- */
.view-display-search-results-using-views .view-header {
  margin-bottom: 8px;
  font-size: 14px;
  color: var(--afdb-text-muted);
}

.view-display-search-results-using-views .view-header h3 {
  margin: 0 0 4px;
  font-size: 20px;
  color: var(--afdb-text);
}

.view-display-search-results-using-views .views-row {
  max-width: var(--afdb-measure);
  padding: 18px 0;
  border-bottom: 1px solid var(--afdb-border);
}

.view-display-search-results-using-views .views-row-last {
  border-bottom: 0;
}

/* The title is an <h3> inside the link */
.view-display-search-results-using-views .views-field-title a {
  text-decoration: none;
}

.view-display-search-results-using-views .views-field-title h3 {
  margin: 0 0 4px;
  font-size: 20px;
  line-height: 1.3;
  color: var(--afdb-green-700);
}

.view-display-search-results-using-views .views-field-title a:hover h3 {
  color: var(--afdb-green-900);
  text-decoration: underline;
}

/* Long encoded URLs: one line, cut with an ellipsis */
.view-display-search-results-using-views .views-field-path {
  margin-bottom: 6px;
  overflow: hidden;
  font-size: 13px;
  color: var(--afdb-text-muted);
  white-space: nowrap;
  text-overflow: ellipsis;
}

.view-display-search-results-using-views .views-field-body {
  font-size: 15px;
  line-height: 1.6;
  color: var(--afdb-text);
}

/* No results */
.view-display-search-results-using-views .view-empty {
  max-width: var(--afdb-measure);
  padding: 20px 24px;
  background: var(--afdb-surface);
  border: 1px solid var(--afdb-border);
  border-radius: var(--afdb-radius);
}

.view-display-search-results-using-views .view-empty ul {
  margin: 8px 0 0;
  padding-left: 1.2em;
}


/* ---------------------------------------------------------------------
   14. Forms, buttons and comments
       (comment form, user login, any Drupal form)
   --------------------------------------------------------------------- */
.form-control {
  height: 40px;
  font-size: 15px;
  color: var(--afdb-text);
  border: 1px solid var(--afdb-border-strong);
  border-radius: var(--afdb-radius);
  box-shadow: none;
}

textarea.form-control {
  height: auto;
  min-height: 120px;
}

.form-control:focus {
  border-color: var(--afdb-green-700);
  box-shadow: 0 0 0 3px rgba(0, 122, 69, .15);
}

.control-label,
.form-item label {
  font-size: 14px;
  font-weight: 700;
  color: var(--afdb-text);
}

.form-required {
  color: var(--afdb-danger);
}

.help-block,
.description {
  font-size: 13px;
  color: var(--afdb-text-muted);
}

.has-error .form-control,
.form-control.error {
  border-color: var(--afdb-danger);
}

/* Buttons: new-css.css turns primary hover / active red (#af0719) */
.btn {
  min-height: 40px;
  padding: 8px 18px;
  font-size: 15px;
  font-weight: 700;
  border-radius: var(--afdb-radius);
}

.btn-primary,
.btn-success {
  color: var(--afdb-white);
  background-color: var(--afdb-green-700);
  border-color: var(--afdb-green-700);
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-primary.active,
.btn-primary:active:hover,
.btn-primary:active:focus,
.btn-success:hover,
.btn-success:focus,
.btn-success:active {
  color: var(--afdb-white);
  background-color: var(--afdb-green-900);
  border-color: var(--afdb-green-900);
}

.btn-primary.disabled,
.btn-primary:disabled {
  background-color: var(--afdb-green-700);
  border-color: var(--afdb-green-700);
  opacity: .55;
}

.btn-default {
  color: var(--afdb-green-800);
  background: var(--afdb-white);
  border-color: var(--afdb-border-strong);
}

.btn-default:hover,
.btn-default:focus {
  color: var(--afdb-green-900);
  background: var(--afdb-green-50);
  border-color: var(--afdb-green);
}

/* Login and other stand-alone forms: keep them narrow */
.page-user #block-system-main form,
.page-user-login #block-system-main form,
.page-user-password #block-system-main form {
  max-width: 420px;
}

/* Comments */
#comments,
.comment-wrapper {
  max-width: var(--afdb-measure);
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--afdb-border);
}

#comments h2.title,
.comment-wrapper h2.title {
  margin: 0 0 16px;
  font-size: 20px;
}

.comment {
  margin-bottom: 16px;
  padding: 16px;
  background: var(--afdb-surface);
  border: 1px solid var(--afdb-border);
  border-radius: var(--afdb-radius);
}

.comment .submitted,
.comments .detail .time {
  font-size: 13px;
  color: var(--afdb-text-muted);
}

.comments .detail .link a,
.comment ul.links a {
  color: var(--afdb-green-700);
}

.comment-form .filter-wrapper {
  font-size: 13px;
  border-color: var(--afdb-border);
  box-shadow: none;
}


/* ---------------------------------------------------------------------
   15. Status messages, editor tabs, 404 / 403
   --------------------------------------------------------------------- */
.alert,
.messages {
  max-width: var(--afdb-measure);
  padding: 12px 16px;
  font-size: 15px;
  border-width: 0 0 0 4px;
  border-style: solid;
  border-radius: var(--afdb-radius);
}

.alert-success,
.messages.status {
  color: var(--afdb-green-900);
  background: var(--afdb-green-50);
  border-color: var(--afdb-green);
}

.alert-info {
  color: #1d3d52;
  background: #eef5fa;
  border-color: #3a7ca5;
}

.alert-warning,
.messages.warning {
  color: #5c3c00;
  background: #fff7e6;
  border-color: #d98e04;
}

.alert-danger,
.messages.error {
  color: #7a1a12;
  background: #fdf0ef;
  border-color: var(--afdb-danger);
}

.alert a {
  color: inherit;
  font-weight: 700;
  text-decoration: underline;
}

/* View / Edit / Translate tabs (editors only) */
.tabs--primary.nav-tabs {
  margin-bottom: 20px;
  border-bottom-color: var(--afdb-border);
}

.tabs--primary.nav-tabs > li > a {
  padding: 8px 14px;
  font-size: 14px;
  color: var(--afdb-green-700);
  border-radius: var(--afdb-radius) var(--afdb-radius) 0 0;
}

.tabs--primary.nav-tabs > li.active > a,
.tabs--primary.nav-tabs > li.active > a:hover {
  color: var(--afdb-text);
  font-weight: 700;
  border-color: var(--afdb-border) var(--afdb-border) transparent;
}

/* "Page not found" / "Access denied": the message is bare text in the
   system block */
body:not(.page-node):not(.front):not(.page-taxonomy-term):not(.page-search):not(.page-authors):not(.page-our-blogs) #block-system-main {
  max-width: var(--afdb-measure);
  font-size: 17px;
}


/* ---------------------------------------------------------------------
   16. Floating social bar (issue 6)
   --------------------------------------------------------------------- */
.icon-bar {
  left: 0;
  border-radius: 0 var(--afdb-radius) var(--afdb-radius) 0;
  overflow: hidden;
  box-shadow: var(--afdb-shadow);
}

.icon-bar a {
  width: 40px;
  padding: 9px 0;
  font-size: 16px;
}

/* The same links already sit in the footer: hide the floating copy
   wherever it would cover the sidebar or text. */
@media (max-width: 1299px) {
  .icon-bar {
    display: none !important;
  }
}


/* ---------------------------------------------------------------------
   17. Back-to-top button (issue 7)
   --------------------------------------------------------------------- */
/* The module's 70px grey sprite is replaced by a CSS chevron */
#backtotop {
  width: 44px !important;
  height: 44px !important;
  right: 16px !important;
  bottom: 16px !important;
  background: var(--afdb-green-700) none !important;
  border-radius: 50% !important;
  box-shadow: var(--afdb-shadow);
  opacity: .9;
  overflow: hidden;
  text-indent: -9999px;
}

#backtotop::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 58%;
  width: 12px;
  height: 12px;
  border-left: 3px solid var(--afdb-white);
  border-top: 3px solid var(--afdb-white);
  transform: translate(-50%, -50%) rotate(45deg);
}

#backtotop:hover {
  background-color: var(--afdb-green-900) !important;
  opacity: 1;
}


/* ---------------------------------------------------------------------
   18. Footer (issue 11)
   --------------------------------------------------------------------- */
.footer-main {
  background: var(--afdb-green-800);
  color: var(--afdb-white);
  padding: 24px 0 16px;
}

.footer-main a {
  color: var(--afdb-white);
}

.footer-main a:hover {
  color: var(--afdb-white);
  text-decoration: underline;
}

.footer-main .afdb-social-media-icon {
  opacity: 1;
  border-radius: 4px;
}

.footer-main .afdb-social-media-icon:hover {
  transform: translateY(-1px);
}

/* Footer top: three empty columns and ~95px of padding around the social
   icons. Collapse it to one centred row. */
#footer-top {
  padding: 20px 0 !important;
  min-height: 0 !important;
}

#footer-top .footer-top-row,
#footer-top .container-fluid {
  padding-top: 0;
  padding-bottom: 0;
  min-height: 0;
}

#footer-top .row {
  display: flex;
  justify-content: center;
}

#footer-top .row > .col-md-3 {
  float: none;
  width: auto;
}

#footer-top .row > .col-md-3:not(:has(*)) {
  display: none;
}

#footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, .25);
}

.footer-main ul.menu,
.footer-main .menu {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-main ul.menu li a {
  display: inline-block;
  padding: 6px 14px;
  font-size: 14px;
}


/* ---------------------------------------------------------------------
   19. Tablet (768 to 991px)
   --------------------------------------------------------------------- */
@media (max-width: 991px) {
  .front-page-content-section .row > .col-md-3 {
    width: 50%;
  }

  #front-page-row-1 .col-md-4 {
    margin-top: 20px;
  }

  .region-sidebar-left {
    margin-top: 32px;
  }

  /* Sidebar comes after the article on narrow screens */
  /* The theme sets column-reverse here, which pushes the article
     below a 9-item menu on phones. */
  .row.inner-page-row {
    display: flex;
    flex-direction: column !important;
  }

  .inner-page-row > .col-md-9 {
    order: 1;
  }

  .inner-page-row > .col-md-3 {
    order: 2;
  }
}


/* ---------------------------------------------------------------------
   20. Mobile (up to 767px) (issues 8 and 13)
   --------------------------------------------------------------------- */
@media (max-width: 767px) {
  body {
    font-size: 16px;
  }

  /* Compact header: logo left, languages right, search full width */
  #page-header .header-top {
    padding-top: 8px;
    padding-bottom: 8px;
  }

  #page-header .logo img {
    max-height: 44px;
  }

  #page-header .header-top .col-xs-12 {
    float: none;
  }

  /* The theme leaves this region at ~197px wide, so the languages
     wrapped onto four lines and the search box stayed narrow. */
  #page-header .region-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100% !important;
    max-width: none;
    float: none !important;
    margin-top: 8px;
  }

  #page-header .region-header > .block {
    float: none !important;
  }

  #block-locale-language {
    order: 1;
    width: 100%;
    margin: 0;
    text-align: center;
  }

  #block-locale-language ul {
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
  }

  #block-locale-language li {
    margin: 0;
  }

  #block-locale-language a,
  #block-locale-language .language-link {
    padding: 8px 7px;
    font-size: 13px;
  }

  #block-search-form {
    order: 2;
    width: 100%;
    margin: 0;
  }

  #block-search-form .input-group {
    width: 100%;
  }

  #page-header .header-bottom {
    border-top: 0;
  }

  .sf-accordion-toggle {
    padding: 4px 0;
  }

  /* Accordion menu items: full-width, 48px targets */
  #superfish-1-accordion a,
  .sf-accordion a {
    display: block;
    min-height: 48px;
    padding: 13px 16px !important;
    font-size: 16px;
    border-bottom: 1px solid var(--afdb-border);
  }

  /* Front page */
  #front-page-row-1 {
    padding-top: 16px;
    padding-bottom: 16px;
  }

  #front-page-row-1 .block {
    margin-bottom: 0;
  }

  #front-page-row-1 .views-field-title,
  #front-page-row-1 .views-field-title a {
    font-size: 18px;
  }

  .front-page-content-section .row > .col-md-3 {
    width: 100%;
  }

  .front-page-content-section h2.block-title {
    margin-top: 20px;
  }

  .view-news-crousel-block {
    padding: 4px 12px 12px !important;
  }

  /* Article */
  h1.page-header {
    font-size: 26px;
  }

  .node .field-name-field-tagline {
    font-size: 19px;
  }

  .node .field-name-body {
    font-size: 17px;
  }

  .node .field-name-body h2 {
    font-size: 22px;
  }

  .node .field-name-body h3 {
    font-size: 19px;
  }

  .inner-page-row {
    padding-top: 16px;
  }

  .page-main-content {
    padding-left: 15px;
    padding-right: 15px;
  }

  /* Blog landing pages: stack date above title instead of keeping a
     100px date column beside 40-character lines */
  .node-book .field-name-field-image img {
    max-height: 180px;
  }

  .field-name-field-add-views .views-table,
  .field-name-field-add-views .views-table > tbody,
  .field-name-field-add-views .views-table > tbody > tr,
  .field-name-field-add-views .views-table > tbody > tr > td {
    display: block;
    width: 100%;
  }

  .field-name-field-add-views .views-table > tbody > tr {
    padding: 16px 0;
    border-bottom: 1px solid var(--afdb-border);
  }

  .field-name-field-add-views .views-table > tbody > tr:last-child {
    border-bottom: 0;
  }

  .field-name-field-add-views .views-table > tbody > tr > td,
  .field-name-field-add-views .views-table > tbody > tr:first-child > td {
    padding: 0;
    border: 0;
  }

  /* The theme floats this cell left at a fixed 93px */
  .field-name-field-add-views .views-table td.views-field-field-date-of-publication {
    float: none !important;
    width: auto !important;
    margin-bottom: 6px;
  }

  .field-name-field-add-views .views-table td.views-field-nothing {
    font-size: 15px;
  }

  .field-name-field-add-views .views-table td.views-field-nothing h3 {
    font-size: 18px;
  }

  /* Author pages and search */
  .node-teaser > header h2 {
    font-size: 19px;
  }

  .view-display-search-results-using-views .views-field-title h3 {
    font-size: 18px;
  }

  /* Pager: drop numbered pages beyond the neighbours */
  .pagination > li > a,
  .pagination > li > span,
  .pagination li a {
    min-width: 40px;
    padding: 6px 10px;
  }

  .pagination > li.pager-last,
  .pagination > li.pager-first {
    display: none;
  }

  /* Footer */
  .footer-main {
    text-align: center;
  }

  .footer-main ul.menu li a {
    padding: 8px 10px;
  }
}


/* ---------------------------------------------------------------------
   21. Arabic / right-to-left (issue 14)
       The theme loads Drupal's *-rtl.css files but no Bootstrap RTL
       layer, so everything directional above is mirrored here.
   --------------------------------------------------------------------- */
html[dir="rtl"] body,
html[dir="rtl"] h1, html[dir="rtl"] h2, html[dir="rtl"] h3,
html[dir="rtl"] h4, html[dir="rtl"] h5, html[dir="rtl"] h6 {
  font-family: var(--afdb-font-ar);
}

/* Letter-spacing breaks Arabic letter joining */
html[dir="rtl"] .front-page-content-section h2.block-title,
html[dir="rtl"] #block-views-keywords-block h2.block-title,
html[dir="rtl"] .view-all-btn .secondary-link-btn,
html[dir="rtl"] a.secondary-link-btn,
html[dir="rtl"] #block-locale-language a,
html[dir="rtl"] #block-locale-language .language-link,
html[dir="rtl"] .date-display-single,
html[dir="rtl"] .field-name-field-date-of-publication,
html[dir="rtl"] .views-field-field-date-of-publication {
  letter-spacing: 0;
}

/* Layout: sidebar on the right */
html[dir="rtl"] .row.inner-page-row {
  direction: rtl;
}

html[dir="rtl"] .row > [class*="col-"] {
  float: right;
}

html[dir="rtl"] #page-header .logo.pull-left {
  float: right !important;
}

/* Header */
html[dir="rtl"] #block-locale-language li {
  margin: 0 4px 0 0;
}

html[dir="rtl"] #block-search-form .form-control,
html[dir="rtl"] #block-search-form input[type="text"],
html[dir="rtl"] #block-search-form input[type="search"] {
  border-right: 1px solid var(--afdb-border-strong);
  border-left: 0;
  border-radius: 0 var(--afdb-radius) var(--afdb-radius) 0;
}

html[dir="rtl"] #block-search-form .btn,
html[dir="rtl"] #block-search-form button,
html[dir="rtl"] #block-search-form input[type="submit"] {
  border-radius: var(--afdb-radius) 0 0 var(--afdb-radius);
}

/* Owl Carousel 1 has no RTL mode: with dir="rtl" the slides float to
   the right of the track and the visible slide is empty. Run the track
   left-to-right and the captions right-to-left. */
html[dir="rtl"] #block-views-front-page-slider-block .owl-carousel,
html[dir="rtl"] .afdb-owl-carousel .owl-carousel {
  direction: ltr;
}

html[dir="rtl"] #block-views-front-page-slider-block .owl-item,
html[dir="rtl"] .afdb-owl-carousel .owl-item {
  direction: rtl;
  text-align: right;
}

html[dir="rtl"] #block-views-front-page-slider-block .views-field-title {
  padding-right: 0;
  padding-left: 96px;
}

/* Inner pages */
@media (min-width: 992px) {
  html[dir="rtl"] .page-main-content {
    padding-left: 15px;
    padding-right: 32px;
    border-left: 0;
    border-right: 1px solid var(--afdb-border);
  }
}

html[dir="rtl"] .region-sidebar-left .afdb-book-menu a,
html[dir="rtl"] .region-sidebar-left .afdb-book-menu .menu-text {
  padding: 11px 16px 11px 14px;
  border-left: 0;
  border-right: 3px solid transparent;
}

html[dir="rtl"] .region-sidebar-left .afdb-book-menu a:hover {
  border-right-color: var(--afdb-green);
}

html[dir="rtl"] .region-sidebar-left .afdb-book-menu span.menu-text,
html[dir="rtl"] .region-sidebar-left .afdb-book-menu a.active,
html[dir="rtl"] .region-sidebar-left .afdb-book-menu li.active-trail > a {
  border-right-color: var(--afdb-green-700);
}

html[dir="rtl"] .region-sidebar-left .afdb-book-menu .afdb-book-menu a,
html[dir="rtl"] .region-sidebar-left .afdb-book-menu .afdb-book-menu .menu-text {
  padding-left: 14px;
  padding-right: 28px;
}

/* Article */
html[dir="rtl"] .node .field-name-body ul,
html[dir="rtl"] .node .field-name-body ol,
html[dir="rtl"] .view-display-search-results-using-views .view-empty ul {
  padding-left: 0;
  padding-right: 1.4em;
}

html[dir="rtl"] .node .field-name-body blockquote {
  padding: 4px 20px 4px 0;
  border-left: 0;
  border-right: 4px solid var(--afdb-green);
}

/* Blog landing pages */
html[dir="rtl"] .field-name-field-add-views .views-table td.views-field-field-date-of-publication {
  padding-right: 0;
  padding-left: 20px;
}

html[dir="rtl"] .node-teaser footer .node-readmore a::after {
  content: "\2190";
  margin-left: 0;
  margin-right: 6px;
}

/* Messages and tabs */
html[dir="rtl"] .alert,
html[dir="rtl"] .messages {
  border-width: 0 4px 0 0;
}

/* Floating social bar */
html[dir="rtl"] .icon-bar {
  left: auto;
  right: 0;
  border-radius: var(--afdb-radius) 0 0 var(--afdb-radius);
}

/* Back-to-top: opposite corner from the reading start */
html[dir="rtl"] #backtotop {
  right: auto !important;
  left: 16px !important;
}

@media (max-width: 767px) {
  html[dir="rtl"] .row > [class*="col-xs-12"] {
    float: none;
  }
}


/* ---------------------------------------------------------------------
   22. Accessibility preferences
   --------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

@media (forced-colors: active) {
  a:focus-visible,
  button:focus-visible {
    outline: 2px solid CanvasText;
  }

  .field-name-field-add-views .views-table td.views-field-field-date-of-publication .date-display-single {
    border: 1px solid CanvasText;
  }
}


/* ---------------------------------------------------------------------
   23. Print: content only, no chrome
   --------------------------------------------------------------------- */
@media print {
  .icon-bar,
  #backtotop,
  #page-header .header-bottom,
  #block-search-form,
  #block-locale-language,
  .region-sidebar-left,
  .sharethis-inline-share-buttons,
  #block-block-4,
  .tabs--primary,
  .breadcrumb,
  #comments,
  .comment-wrapper,
  .pagination,
  ul.links,
  .footer-main {
    display: none !important;
  }

  .inner-page-row > .col-md-9 {
    width: 100%;
  }

  .page-main-content {
    border: 0;
    padding: 0;
  }

  .node .field-name-body,
  .field-name-field-add-views .views-table td.views-field-nothing {
    max-width: none;
    font-size: 12pt;
    color: #000;
  }

  .field-name-field-add-views .views-table td.views-field-field-date-of-publication .date-display-single {
    padding: 0;
    color: #000;
    background: none;
  }

  .node .field-name-body a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 9pt;
    color: #444;
  }
}