/**
 * Afriborder — modern layer (variables, motion, reports UI, insights loading)
 */
:root {
  --ab-accent: #3b83bd;
  --ab-accent-soft: rgba(59, 131, 189, 0.12);
  --ab-warm: #ffdb58;
  --ab-radius: 12px;
  --ab-radius-sm: 8px;
  --ab-shadow: 0 8px 32px rgba(21, 21, 21, 0.08);
  --ab-shadow-hover: 0 14px 40px rgba(21, 21, 21, 0.12);
  --ab-transition: 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
  scroll-behavior: smooth;
}

body {
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

/* Sitewide typography & surfaces */
a:not(.button):not(.brand):not(.rd-nav-link) {
  transition: color 0.2s ease, opacity 0.2s ease;
}

.bg-default {
  background-color: #fafbfc !important;
}

.section.section-sm.bg-default {
  background-image: linear-gradient(
    180deg,
    rgba(250, 251, 252, 0.65) 0%,
    rgba(255, 255, 255, 0) 100%
  );
}

h2,
h3,
.saka {
  letter-spacing: -0.02em;
}

.saka,
.section h2.heading-2,
.section h3 {
  color: #141820;
}

.post-modern {
  background: #fff;
  border: 1px solid rgba(21, 21, 21, 0.06);
  border-radius: var(--ab-radius-sm);
  padding: 1.15rem 1.25rem 1.35rem;
  height: 100%;
  box-shadow: 0 1px 0 rgba(21, 21, 21, 0.04);
}

.post-modern-title {
  margin-bottom: 0.65rem !important;
}

.post-modern-title a {
  color: #141820;
}

.post-modern-title a:hover {
  color: var(--ab-accent);
}

/* Insights list — extra rhythm on small screens (title / image / excerpt) */
@media (max-width: 767.98px) {
  .post-modern .post-modern-title {
    margin-bottom: 1rem !important;
    padding-bottom: 0.15rem;
  }

  .post-modern .post-image {
    margin-top: 0.35rem;
    margin-bottom: 1rem;
  }

  .post-modern .post-modern-text {
    margin-top: 0.85rem !important;
  }

  .post-modern .post-modern-title + .post-modern-text {
    margin-top: 1rem !important;
  }
}

.footer-corporate .list-marked a,
.footer-corporate .post-minimal-2-title a {
  transition: color 0.2s ease, opacity 0.2s ease;
}

.footer-corporate .list-marked a:hover,
.footer-corporate .post-minimal-2-title a:hover {
  color: #fff;
  opacity: 0.95;
}

/* Hero / slider readability */
.swiper-slide-caption h2,
.swiper-slide-caption h6 {
  text-shadow: 0 1px 24px rgba(0, 0, 0, 0.35);
}

/* Top bar: align compact reports with email row */
.rd-navbar-aside-right.rd-navbar-collapse {
  align-items: center;
  gap: 10px 14px;
}

.rd-navbar-corporate-contacts {
  margin-bottom: 0;
}

.page {
  animation: ab-page-in 0.55s var(--ab-transition) both;
}

@keyframes ab-page-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* Global preloader — calmer backdrop */
.preloader {
  background: linear-gradient(145deg, #f8fafc 0%, #eef2f7 45%, #ffffff 100%) !important;
}

.preloader-body p {
  color: #4a5568;
  letter-spacing: 0.04em;
  font-size: 12px;
  text-transform: uppercase;
}

/* Cards & service tiles */
.post-modern,
.box-icon-classic,
.post-minimal-2 {
  transition: transform var(--ab-transition), box-shadow var(--ab-transition);
  border-radius: var(--ab-radius-sm);
}

.post-modern:hover,
.box-icon-classic:hover {
  transform: translateY(-3px);
  box-shadow: var(--ab-shadow-hover);
}

.section .button,
.button {
  border-radius: var(--ab-radius-sm);
  transition: transform var(--ab-transition), box-shadow var(--ab-transition),
    background-color var(--ab-transition), color var(--ab-transition);
}

.section .button:hover,
.button:hover {
  transform: translateY(-1px);
}

/* Index service strip */
.cardx {
  transition: transform var(--ab-transition), box-shadow var(--ab-transition),
    filter var(--ab-transition);
}

.cardx:hover {
  transform: scale(1.02);
  filter: brightness(1.03);
}

/* Insights list loading (below .preloader z-index 10000 until it fades) */
.insights-loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  /* Short fade-out only; show is mostly instant to avoid a blank gap after the theme preloader */
  transition: opacity 0.2s ease, visibility 0s linear 0.2s;
  background: linear-gradient(
    135deg,
    rgba(248, 250, 252, 0.94) 0%,
    rgba(238, 242, 247, 0.97) 50%,
    rgba(255, 255, 255, 0.95) 100%
  );
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.insights-loading-overlay.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 0.15s ease, visibility 0s linear 0s;
}

.insights-loading-panel {
  text-align: center;
  padding: 32px 40px;
  border-radius: var(--ab-radius);
  background: rgba(255, 255, 255, 0.85);
  box-shadow: var(--ab-shadow);
  border: 1px solid rgba(21, 21, 21, 0.06);
  max-width: 320px;
}

.insights-loading-panel p {
  margin-top: 16px;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #64748b;
}

.insights-loading-spinner {
  width: 44px;
  height: 44px;
  margin: 0 auto;
  border: 3px solid var(--ab-warm);
  border-radius: 50%;
  border-left-color: transparent;
  border-bottom-color: transparent;
  animation: ab-spin 0.85s linear infinite;
}

@keyframes ab-spin {
  to {
    transform: rotate(360deg);
  }
}

/* Inline article loading (insight-single) */
.insight-article-wrap {
  position: relative;
  min-height: 200px;
}

/* Insight single — honor WordPress / Gutenberg alignment from rendered HTML */
@media (max-width: 767.98px) {
  .insight-article-wrap .post-title {
    margin-bottom: 1.15rem !important;
    padding-bottom: 0.35rem;
  }

  .insight-article-wrap .post-image:not([hidden]) {
    margin-bottom: 1.1rem;
  }

  .insight-article-wrap .post-content {
    margin-top: 0.5rem;
  }

  .insight-article-wrap .post-content > *:first-child {
    margin-top: 0;
  }
}

/*
 * Trunk (style.css) zeroes all ul/ol globally; restore normal lists inside the article.
 * Exclude WP layout lists so block-library gallery/navigation/social styles still win.
 */
.insight-article-wrap
  .post-content
  :where(ul, ol):not(
    .wp-block-gallery,
    .blocks-gallery-grid,
    .wp-block-navigation,
    .wp-block-navigation__container,
    .wp-block-navigation__submenu-container,
    .wp-block-page-list,
    .wp-block-social-links,
    .wp-block-latest-posts__list
  ) {
  list-style: revert;
  padding-left: revert;
  margin-block: revert;
}

/* Trunk sets ul li / ol li { display: block }; restore list items only for real lists */
.insight-article-wrap
  .post-content
  :where(ul, ol):not(
    .wp-block-gallery,
    .blocks-gallery-grid,
    .wp-block-navigation,
    .wp-block-navigation__container,
    .wp-block-navigation__submenu-container,
    .wp-block-page-list,
    .wp-block-social-links,
    .wp-block-latest-posts__list
  )
  > li {
  display: list-item;
}

.insight-article-wrap .post-content img {
  max-width: 100%;
  height: auto;
}

.insight-article-wrap .insights-loading-overlay {
  position: absolute;
  border-radius: var(--ab-radius-sm);
}

.insights-card-col {
  animation: ab-fade-up 0.5s ease both;
}

@keyframes ab-fade-up {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* RD Navbar subtle polish */
.rd-navbar-corporate.rd-navbar-static .rd-navbar-aside,
.rd-navbar-fixed .rd-navbar-aside {
  box-shadow: 0 1px 0 rgba(21, 21, 21, 0.06);
}

.footer-corporate {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* Homepage — About tabs + photo */
.home-about-section .home-about-image-col {
  align-self: stretch;
}

.home-about-section .home-about-photo {
  width: 100%;
  max-width: 640px;
  height: auto;
  display: block;
  margin-left: auto;
  margin-right: auto;
  border-radius: var(--ab-radius-sm);
  box-shadow: var(--ab-shadow);
}

@media (min-width: 992px) {
  .home-about-section .home-about-photo {
    max-width: 100%;
    width: 100%;
  }

  .home-about-section .home-about-image-col {
    padding-right: 1.25rem;
  }
}

.home-about-tabs {
  margin-bottom: 0;
}

.home-about-tab-panes {
  margin-top: 0.85rem;
}

.home-about-tab-panes .tab-pane > p:first-of-type {
  margin-top: 0;
}

/* Homepage — Our reports block */
.home-our-reports {
  padding-top: 3.5rem;
  padding-bottom: 3.5rem;
}

.home-our-reports-title {
  margin-bottom: 1rem;
  color: #141820;
}

.home-our-reports-lead {
  font-size: 1.05rem;
  line-height: 1.65;
  color: #4a5568;
  max-width: 36rem;
  margin: 0;
}

.home-reports-links {
  list-style: none;
  padding: 0;
  margin: 0 0 1.25rem;
}

.home-reports-links li {
  border-bottom: 1px solid rgba(21, 21, 21, 0.08);
}

.home-reports-links li:last-child {
  border-bottom: none;
}

.home-reports-links a {
  display: block;
  padding: 0.85rem 0;
  font-weight: 500;
  font-size: 14px;
  color: #1e293b;
  text-decoration: none;
  transition: color 0.2s ease, padding-left 0.2s ease;
}

.home-reports-links a:hover {
  color: var(--ab-accent);
  padding-left: 4px;
}

.home-reports-more {
  margin: 0;
}

/* Homepage footer — Lagos address line breaks */
.footer-corporate .home-footer-address {
  display: inline-block;
  line-height: 1.55;
  text-align: left;
}
