/**
 * FAO readability system — loaded last to override theme/plugin conflicts.
 * Rule: white/light panels = dark text; dark site shell = light text.
 */

:root {
  --fao-ink: #1a1a1a;
  --fao-ink-muted: #444444;
  --fao-paper: #ffffff;
  --fao-paper-soft: #f5f5f5;
}

/* "You may have missed" — title sits in white .container-wrapper from parent theme */
.af-main-banner-latest-posts .container-wrapper,
.above-footer-widget-section .container-wrapper {
  background-color: transparent !important;
}

.af-main-banner-latest-posts .widget-title-section,
.af-main-banner-latest-posts .af-title-subtitle-wrap,
body.home .af-main-banner-latest-posts .widget-title-section,
body.single .af-main-banner-latest-posts .widget-title-section,
body.page .af-main-banner-latest-posts .widget-title-section,
body.category .af-main-banner-latest-posts .widget-title-section,
body.archive .af-main-banner-latest-posts .widget-title-section {
  background-color: var(--fao-bg) !important;
  color: #fffdfc !important;
  padding-top: 1rem !important;
  padding-bottom: 0.75rem !important;
}

.af-main-banner-latest-posts .widget-title-section .widget-title,
.af-main-banner-latest-posts .widget-title-section h2.widget-title,
.af-main-banner-latest-posts .widget-title-section .heading-line,
.af-main-banner-latest-posts .widget-title-section .heading-line-before,
.af-main-banner-latest-posts .widget-title-section .heading-line-after,
.af-main-banner-latest-posts .widget-title-section .header-after1,
body.aft-default-mode .af-main-banner-latest-posts .widget-title-section .widget-title,
body.aft-default-mode .af-main-banner-latest-posts .widget-title-section .heading-line {
  color: #fffdfc !important;
}

body.aft-default-mode .af-main-banner-latest-posts .widget-title-section .heading-line::before {
  background-color: var(--fao-accent) !important;
}

/* --- Sticky / floating nav (fixes white-on-white when scrolling) --- */
#main-navigation-bar.aft-sticky-navigation,
body.aft-sticky-header #main-navigation-bar.aft-sticky-navigation,
#masthead.morenews-header #main-navigation-bar.af-bottom-header.aft-sticky-navigation,
body.aft-sticky-header #masthead.morenews-header #main-navigation-bar.aft-sticky-navigation,
#main-navigation-bar.aft-sticky-navigation .container-wrapper,
#main-navigation-bar.aft-sticky-navigation .bottom-bar-flex,
#main-navigation-bar.aft-sticky-navigation .compress-bar-flex {
  background-color: #141414 !important;
  background: #141414 !important;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.45) !important;
}

body.aft-sticky-header #masthead.morenews-header.aft-sticky-navigation,
body.aft-sticky-header #masthead.morenews-header.header-layout-compressed {
  background-color: #141414 !important;
  background: #141414 !important;
}

/* Sticky bar: light text on dark bar — desktop only (#primary-menu becomes .menu-mobile when open) */
#main-navigation-bar.aft-sticky-navigation .menu-desktop > ul#primary-menu:not(.menu-mobile) a,
#main-navigation-bar.aft-sticky-navigation .menu-desktop > ul.menu:not(.menu-mobile) a,
#main-navigation-bar.aft-sticky-navigation .menu-desktop > ul:not(.menu-mobile) > li > a,
#main-navigation-bar.aft-sticky-navigation .main-navigation .menu-desktop > ul#primary-menu:not(.menu-mobile) > li > a,
#masthead.morenews-header #main-navigation-bar.aft-sticky-navigation .main-navigation .menu-desktop > ul#primary-menu:not(.menu-mobile) > li > a,
body.aft-default-mode #main-navigation-bar.aft-sticky-navigation .main-navigation .menu-desktop > ul#primary-menu:not(.menu-mobile) > li > a,
#main-navigation-bar.aft-sticky-navigation .af-bottom-head-nav a,
#main-navigation-bar.aft-sticky-navigation .search-icon,
#main-navigation-bar.aft-sticky-navigation .search-icon:visited,
#main-navigation-bar.aft-sticky-navigation .custom-menu-link a,
#main-navigation-bar.aft-sticky-navigation .toggle-menu,
#main-navigation-bar.aft-sticky-navigation .ham,
#main-navigation-bar.aft-sticky-navigation .menu-desktop > ul#primary-menu:not(.menu-mobile) .menu-item a,
#main-navigation-bar.aft-sticky-navigation .menu-desktop > ul#primary-menu:not(.menu-mobile) svg {
  color: #fffdfc !important;
  fill: currentColor !important;
}

/* Mobile slide-down menu + sidr drawer: always dark text on white (even when header is sticky) */
.main-navigation .menu .menu-mobile,
body.aft-sticky-header .main-navigation .menu .menu-mobile,
#main-navigation-bar.aft-sticky-navigation .main-navigation .menu .menu-mobile,
#sidr,
body.sidr-open #sidr,
body.aft-default-mode #sidr,
body.aft-sticky-header #sidr {
  background-color: #ffffff !important;
  color: #1a1a1a !important;
}

.main-navigation .menu .menu-mobile li a,
.main-navigation .menu .menu-mobile li a:visited,
body.aft-sticky-header .main-navigation .menu .menu-mobile li a,
#main-navigation-bar.aft-sticky-navigation .main-navigation .menu .menu-mobile li a,
body.aft-default-mode .main-navigation .menu .menu-mobile li a,
#sidr a,
#sidr .sidr-class-menu a,
#sidr li a,
body.aft-default-mode #sidr a {
  color: #1a1a1a !important;
}

.main-navigation .menu .menu-mobile li a:hover,
#sidr a:hover {
  color: var(--fao-accent) !important;
}

.main-navigation .menu .menu-mobile svg {
  fill: currentColor !important;
  color: #1a1a1a !important;
}

/* --- White archive / breadcrumb band (category intro + single post crumbs) --- */
body.archive .aft-main-breadcrumb-wrapper,
body.category .aft-main-breadcrumb-wrapper,
body.single .aft-main-breadcrumb-wrapper {
  background-color: var(--fao-paper) !important;
  color: var(--fao-ink) !important;
  padding-top: 0.75rem !important;
  padding-bottom: 0.75rem !important;
}

body.archive .aft-main-breadcrumb-wrapper .af-breadcrumbs,
body.category .aft-main-breadcrumb-wrapper .af-breadcrumbs,
body.single .aft-main-breadcrumb-wrapper .af-breadcrumbs,
body.archive .af-breadcrumbs.color-pad,
body.category .af-breadcrumbs.color-pad,
body.single .af-breadcrumbs.color-pad,
body.archive .aft-main-breadcrumb-wrapper .color-pad,
body.category .aft-main-breadcrumb-wrapper .color-pad,
body.single .aft-main-breadcrumb-wrapper .color-pad {
  background-color: var(--fao-paper) !important;
  color: var(--fao-ink) !important;
}

body.archive .af-breadcrumbs.color-pad a,
body.archive .af-breadcrumbs.color-pad span,
body.category .af-breadcrumbs.color-pad a,
body.category .af-breadcrumbs.color-pad span,
body.single .af-breadcrumbs.color-pad a,
body.single .af-breadcrumbs.color-pad span,
body.archive .af-breadcrumbs.color-pad .trail-items li,
body.category .af-breadcrumbs.color-pad .trail-items li,
body.single .af-breadcrumbs.color-pad .trail-items li {
  color: var(--fao-ink) !important;
}

body.archive .aft-main-breadcrumb-wrapper h1.page-title,
body.category .aft-main-breadcrumb-wrapper h1.page-title,
body.archive .archive-description,
body.archive .archive-description p,
body.category .archive-description,
body.category .archive-description p,
body.archive .aft-main-breadcrumb-wrapper .trail-items,
body.archive .aft-main-breadcrumb-wrapper .trail-items a,
body.archive .aft-main-breadcrumb-wrapper .trail-items span,
body.category .aft-main-breadcrumb-wrapper .trail-items,
body.category .aft-main-breadcrumb-wrapper .trail-items a,
body.category .aft-main-breadcrumb-wrapper .trail-items span,
body.single .aft-main-breadcrumb-wrapper .trail-items,
body.single .aft-main-breadcrumb-wrapper .trail-items a,
body.single .aft-main-breadcrumb-wrapper .trail-items span {
  color: var(--fao-ink) !important;
}

body.archive .aft-main-breadcrumb-wrapper a:hover,
body.category .aft-main-breadcrumb-wrapper a:hover,
body.single .aft-main-breadcrumb-wrapper a:hover {
  color: var(--fao-accent) !important;
}

/* Page title + description sit in white band on archives */
body.archive #content h1.page-title,
body.category #content h1.page-title,
body.archive #content .archive-description,
body.category #content .archive-description,
body.archive #content .archive-description p,
body.category #content .archive-description p {
  color: var(--fao-ink) !important;
  background-color: transparent !important;
}

/* --- Single post: white article panel — all text dark --- */
body.single .af-single-article .entry-content-wrap,
body.single .af-single-article .entry-content-wrap.read-single,
body.single .af-single-article .entry-content {
  background-color: var(--fao-paper) !important;
  color: var(--fao-ink) !important;
}

body.single .af-single-article .entry-content,
body.single .af-single-article .entry-content p,
body.single .af-single-article .entry-content li,
body.single .af-single-article .entry-content td,
body.single .af-single-article .entry-content th,
body.single .af-single-article .entry-content blockquote,
body.single .af-single-article .entry-content h1,
body.single .af-single-article .entry-content h2,
body.single .af-single-article .entry-content h3,
body.single .af-single-article .entry-content h4,
body.single .af-single-article .entry-content h5,
body.single .af-single-article .entry-content h6,
body.single .af-single-article .entry-content strong,
body.single .af-single-article .entry-content em,
body.single .af-single-article .entry-content span,
body.single .af-single-article .entry-content div,
body.single .af-single-article .entry-content label,
body.single .af-single-article .entry-content .sc_fs_faq,
body.single .af-single-article .entry-content .sc_fs_faq.sc_card,
body.single .af-single-article .entry-content .sc_fs_faq h3,
body.single .af-single-article .entry-content .sc_fs_faq p,
body.single .af-single-article .entry-content .sc_fs_faq div,
body.single .af-single-article .entry-content table,
body.single .af-single-article .entry-header .entry-title,
body.single .af-single-article h1.entry-title {
  color: var(--fao-ink) !important;
}

body.single .af-single-article .entry-content a {
  color: var(--fao-accent) !important;
}

body.single .af-single-article .entry-content .sc_fs_faq.sc_card {
  background-color: var(--fao-paper-soft) !important;
  border: 1px solid rgba(0, 0, 0, 0.08) !important;
  padding: 0.75rem 1rem !important;
  margin-bottom: 1rem !important;
}

/* Prev / Next post navigation (below article, outside .entry-content) */
body.single .navigation.post-navigation,
body.single nav.post-navigation {
  background-color: var(--fao-paper-soft) !important;
  padding: 1rem 1.25rem !important;
  margin: 1.5rem 0 !important;
  border: 1px solid rgba(0, 0, 0, 0.1) !important;
}

body.single .navigation.post-navigation .nav-links,
body.single .navigation.post-navigation .nav-links a,
body.single .navigation.post-navigation .nav-previous,
body.single .navigation.post-navigation .nav-next,
body.single .navigation.post-navigation .nav-title,
body.single .navigation.post-navigation .em-post-navigation {
  color: var(--fao-ink) !important;
}

body.single .navigation.post-navigation .nav-links a:hover {
  color: var(--fao-accent) !important;
}

/* --- Below-article blocks: dark band + light text on cards --- */
body.single .af-reated-posts,
body.single .above-footer-widget-section,
body.single .af-main-banner-latest-posts,
body.single #jp-relatedposts {
  background-color: var(--fao-bg) !important;
  color: var(--fao-text) !important;
  padding-top: 1.5rem !important;
  padding-bottom: 1.5rem !important;
}

body.single .af-reated-posts .widget-title,
body.single .af-reated-posts .heading-line,
body.single .af-reated-posts .heading-line-before,
body.single .af-reated-posts .heading-line-after,
body.single .af-main-banner-latest-posts .widget-title,
body.single .af-main-banner-latest-posts .heading-line,
body.single #jp-relatedposts h3.jp-relatedposts-headline {
  color: var(--fao-text) !important;
}

/* Cards in related / you-may-have-missed */
body.single .af-reated-posts .read-single.color-pad,
body.single .af-reated-posts .color-pad,
body.single .af-main-banner-latest-posts .read-single.color-pad,
body.single .af-main-banner-latest-posts .color-pad,
body.single .af-main-banner-latest-posts .latest-posts-grid .read-single,
body.single .latest-posts-grid .color-pad,
body.single .af-reated-posts .af-cat-widget-carousel,
body.archive .aft-archive-wrapper .read-single.color-pad,
body.category .aft-archive-wrapper .read-single.color-pad,
body.archive .archive-list-post .read-single.color-pad,
body.category .archive-list-post .read-single.color-pad {
  background-color: var(--fao-surface) !important;
  color: var(--fao-text) !important;
}

body.single .af-reated-posts .read-title h3,
body.single .af-reated-posts .read-title h3 a,
body.single .af-reated-posts .read-title h4 a,
body.single .af-reated-posts .read-details,
body.single .af-reated-posts .read-details a,
body.single .af-reated-posts .read-details p,
body.single .af-reated-posts .post-excerpt,
body.single .af-reated-posts .entry-meta,
body.single .af-reated-posts .entry-meta a,
body.single .af-reated-posts .post-date,
body.single .af-main-banner-latest-posts .read-title h3,
body.single .af-main-banner-latest-posts .read-title h3 a,
body.single .af-main-banner-latest-posts .read-details,
body.single .af-main-banner-latest-posts .read-details a,
body.single .af-main-banner-latest-posts .read-details p,
body.single .af-main-banner-latest-posts .entry-meta,
body.single .af-main-banner-latest-posts .post-date,
body.archive .aft-archive-wrapper .read-title h3 a,
body.archive .aft-archive-wrapper .read-details,
body.archive .aft-archive-wrapper .read-details p,
body.category .aft-archive-wrapper .read-title h3 a,
body.category .aft-archive-wrapper .read-details,
body.category .aft-archive-wrapper .read-details p,
body.archive .archive-list-post .read-title h3 a,
body.category .archive-list-post .read-title h3 a {
  color: var(--fao-text) !important;
}

body.single .af-reated-posts .post-date,
body.single .af-main-banner-latest-posts .post-date,
body.archive .aft-archive-wrapper .post-date,
body.category .aft-archive-wrapper .post-date {
  color: var(--fao-muted) !important;
}

body.single #jp-relatedposts .jp-relatedposts-items a,
body.single #jp-relatedposts .jp-relatedposts-post-title {
  color: var(--fao-text) !important;
}

/* List layout archive rows (not in white header band) */
body.archive .archive-list-post .read-title h3 a,
body.category .archive-list-post .read-title h3 a,
body.archive .archive-list-post .read-details,
body.category .archive-list-post .read-details,
body.archive .archive-list-post .read-details p,
body.category .archive-list-post .read-details p {
  color: var(--fao-text) !important;
}

/* Mobile menu panel — #primary-menu gets class .menu-mobile when hamburger opens */
ul.menu-mobile a,
ul#primary-menu.menu-mobile a,
ul#primary-menu.menu-mobile li a,
ul.menu-mobile li a,
.menu-desktop ul.menu-mobile li a,
#main-navigation-bar.aft-sticky-navigation .menu-desktop > ul#primary-menu.menu-mobile a,
#main-navigation-bar.aft-sticky-navigation .menu-desktop > ul#primary-menu.menu-mobile li a,
#main-navigation-bar.aft-sticky-navigation .menu-desktop ul.menu-mobile li a,
body.aft-sticky-header .menu-desktop > ul#primary-menu.menu-mobile li a {
  color: #1a1a1a !important;
}
