/**
 * Dark-theme normalization for WP-era builder pages.
 * Themify exports shipped light-theme defaults: black headings, WP-red links
 * (#ed1e24), white accordion bars, white pill buttons.
 *
 * Scope: every builder page EXCEPT the homepage (content-22, has its own
 * generated CSS) and case studies (#pagewrap.n92-case-study, styled by
 * case-study-ux.css). Footer lives outside #content, so it's untouched.
 * Blog posts render raw WP markup (no themify wrapper) — covered by the
 * direct-child rules at the bottom.
 */

/* ── Headings ── */
#pagewrap:not(.n92-case-study) #content .themify_builder_content:not(.themify_builder_content-22) h1,
#pagewrap:not(.n92-case-study) #content .themify_builder_content:not(.themify_builder_content-22) h2,
#pagewrap:not(.n92-case-study) #content .themify_builder_content:not(.themify_builder_content-22) h3,
#pagewrap:not(.n92-case-study) #content .themify_builder_content:not(.themify_builder_content-22) h4,
#pagewrap:not(.n92-case-study) #content .themify_builder_content:not(.themify_builder_content-22) h5 {
  color: #efece8 !important;
}

/* ── Body text ── */
#pagewrap:not(.n92-case-study) #content .themify_builder_content:not(.themify_builder_content-22) p,
#pagewrap:not(.n92-case-study) #content .themify_builder_content:not(.themify_builder_content-22) li,
#pagewrap:not(.n92-case-study) #content .themify_builder_content:not(.themify_builder_content-22) .tb_text_wrap {
  color: rgba(239, 236, 232, 0.78);
}

/* ── Links: WP-red → brand pink ── */
#pagewrap:not(.n92-case-study) #content .themify_builder_content:not(.themify_builder_content-22) .tb_text_wrap a,
#pagewrap:not(.n92-case-study) #content .themify_builder_content:not(.themify_builder_content-22) a[href^="mailto:"],
#pagewrap:not(.n92-case-study) #content .themify_builder_content:not(.themify_builder_content-22) a[href^="tel:"],
#pagewrap:not(.n92-case-study) #content .themify_builder_content:not(.themify_builder_content-22) .themify-icon-label {
  color: #ff3377 !important;
  text-decoration: none;
}

#pagewrap:not(.n92-case-study) #content .themify_builder_content:not(.themify_builder_content-22) .tb_text_wrap a:hover {
  color: #efece8 !important;
}

/* inline black WP icon colors */
#pagewrap:not(.n92-case-study) #content .themify_builder_content:not(.themify_builder_content-22) .themify-icon-icon,
#pagewrap:not(.n92-case-study) #content .themify_builder_content:not(.themify_builder_content-22) .themify-icon-icon svg {
  color: #ff3377 !important;
  fill: #ff3377 !important;
}

/* headings stay cream when linked */
#pagewrap:not(.n92-case-study) #content .themify_builder_content:not(.themify_builder_content-22) :is(h1, h2, h3) a {
  color: #efece8 !important;
}

#pagewrap:not(.n92-case-study) #content .themify_builder_content:not(.themify_builder_content-22) :is(h1, h2, h3) a:hover {
  color: #ff3377 !important;
}

/* ── FAQ accordions: white WP bars → dark bordered panels ── */
/* the white surface lives on the ul/li, not just the title bar */
#pagewrap:not(.n92-case-study) #content .themify_builder_content:not(.themify_builder_content-22) ul.module-accordion,
#pagewrap:not(.n92-case-study) #content .themify_builder_content:not(.themify_builder_content-22) .module-accordion li,
#pagewrap:not(.n92-case-study) #content .themify_builder_content:not(.themify_builder_content-22) .module-accordion .accordion-content {
  background: transparent !important;
  background-color: transparent !important;
}

#pagewrap:not(.n92-case-study) #content .themify_builder_content:not(.themify_builder_content-22) .module-accordion li {
  border: 0 !important;
}

#pagewrap:not(.n92-case-study) #content .themify_builder_content:not(.themify_builder_content-22) .module-accordion .accordion-title {
  background: transparent !important;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 0;
  margin-bottom: 0.6rem;
}

#pagewrap:not(.n92-case-study) #content .themify_builder_content:not(.themify_builder_content-22) .module-accordion .accordion-title a {
  color: #efece8 !important;
  display: block;
  padding: 0.9em 1.1em;
  font-weight: 700;
}

#pagewrap:not(.n92-case-study) #content .themify_builder_content:not(.themify_builder_content-22) .module-accordion .accordion-title a:hover {
  color: #ff3377 !important;
}

#pagewrap:not(.n92-case-study) #content .themify_builder_content:not(.themify_builder_content-22) .module-accordion .accordion-content {
  padding: 0.25em 1.1em 1em;
}

#pagewrap:not(.n92-case-study) #content .themify_builder_content:not(.themify_builder_content-22) .module-accordion .accordion-content p {
  color: rgba(239, 236, 232, 0.78) !important;
}

/* ── Buttons: WP pills → brand pink ── */
#pagewrap:not(.n92-case-study) #content .themify_builder_content:not(.themify_builder_content-22) .module-buttons .module-buttons-item a {
  background: #ff3377 !important;
  color: #fff !important;
  border-color: #ff3377 !important;
  font-weight: 800;
  letter-spacing: 0.075em;
}

#pagewrap:not(.n92-case-study) #content .themify_builder_content:not(.themify_builder_content-22) .module-buttons .module-buttons-item a:hover {
  background: #ff0062 !important;
  border-color: #ff0062 !important;
  color: #fff !important;
}

/* light WP boxes → raised dark surface */
#pagewrap:not(.n92-case-study) #content .themify_builder_content:not(.themify_builder_content-22) .module-box {
  background-color: #171717 !important;
  color: rgba(239, 236, 232, 0.78);
}

/* ── Blog posts: raw WP markup with no themify wrapper ── */
#pagewrap:not(.n92-case-study) #content .themify-builder-output > h1,
#pagewrap:not(.n92-case-study) #content .themify-builder-output > h2,
#pagewrap:not(.n92-case-study) #content .themify-builder-output > h3,
#pagewrap:not(.n92-case-study) #content .themify-builder-output > h4 {
  color: #efece8 !important;
}

#pagewrap:not(.n92-case-study) #content .themify-builder-output > p,
#pagewrap:not(.n92-case-study) #content .themify-builder-output > ul,
#pagewrap:not(.n92-case-study) #content .themify-builder-output > ol,
#pagewrap:not(.n92-case-study) #content .themify-builder-output > p span {
  color: rgba(239, 236, 232, 0.78) !important;
}

#pagewrap:not(.n92-case-study) #content .themify-builder-output > p a,
#pagewrap:not(.n92-case-study) #content .themify-builder-output > ul a {
  color: #ff3377 !important;
}

/* ── Mobile: stack builder columns (WP per-page generated CSS not ported) ── */
@media (max-width: 680px) {
  /* Themify rows are CSS grid driven by --area/--col custom props — collapse
     the named areas so columns auto-flow into a single track */
  #pagewrap:not(.n92-case-study) #content .themify_builder_content:not(.themify_builder_content-22) [class*="tb_col_count_"] {
    grid-template-areas: none !important;
    grid-template-columns: 1fr !important;
    grid-auto-flow: row;
  }

  #pagewrap:not(.n92-case-study) #content .themify_builder_content:not(.themify_builder_content-22) .module_column,
  #pagewrap:not(.n92-case-study) #content .themify_builder_content:not(.themify_builder_content-22) .sub_column {
    grid-area: auto !important;
    grid-column: 1 / -1 !important;
    width: 100% !important;
    max-width: 100% !important;
  }
}

/* raw posts: constrain width + breathing room */
#pagewrap:not(.n92-case-study) #content .themify-builder-output > h1:first-child,
#pagewrap:not(.n92-case-study) #content .themify-builder-output > p:first-child {
  padding-top: clamp(90px, 14vh, 150px);
}

/* ── WordPress blog index + article (headless layer) ── */
.n92-blog-index,
.n92-wp-article {
  max-width: 720px;
  margin: 0 auto;
  padding: clamp(90px, 14vh, 150px) clamp(20px, 5vw, 48px) clamp(48px, 8vh, 96px);
  color: #efece8;
}

.n92-blog-index__title,
.n92-wp-article__title {
  font-family: "Gilroy", system-ui, sans-serif;
  font-weight: 900;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  line-height: 1.1;
  margin: 0 0 0.75rem;
  text-transform: lowercase;
}

.n92-blog-index__lead {
  margin: 0 0 2.5rem;
  opacity: 0.85;
  line-height: 1.6;
}

.n92-blog-index__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.n92-blog-index__date,
.n92-wp-article__date {
  display: block;
  font-size: 0.85rem;
  opacity: 0.65;
  margin-bottom: 0.35rem;
}

.n92-blog-index__post-title {
  margin: 0 0 0.5rem;
  font-size: 1.25rem;
  font-weight: 600;
}

.n92-blog-index__post-title a {
  color: #ff3377;
  text-decoration: none;
}

.n92-blog-index__post-title a:hover {
  color: #ff0062;
}

.n92-blog-index__excerpt {
  opacity: 0.8;
  line-height: 1.55;
  font-size: 0.95rem;
}

.n92-wp-article__categories {
  margin: 0 0 1.5rem;
  font-size: 0.9rem;
  opacity: 0.7;
}

.n92-wp-article__content img {
  max-width: 100%;
  height: auto;
}
