/**
 * Solution / industry / department landing page tweaks that sit ON TOP of the
 * imported prod stylesheets (wp_theme/css/solutions/*, ai-agents-dynamic-tabs).
 * Keep this file small - prefer fixing content / templates over piling on CSS.
 */

/* Drupal wraps node content in <div class="writercom-main-content"> + nested
 * <div>s; the imported <main class="finServ_page ..."> needs to render flush
 * without extra container padding from the bare variant. */
.writercom-main-content--bare {
  padding: 0;
  margin: 0;
}
.writercom-main-content--bare > main#main-content {
  display: block;
}
.writercom-main-content--bare #block-writercom-content,
.writercom-main-content--bare article,
.writercom-main-content--bare article > div {
  margin: 0;
  padding: 0;
}

/* Resources: force a vertical list of horizontal cards, not a multi-column
 * grid. wp-block-columns / wp-block-column default layout can split content
 * across two columns without the Gutenberg editor CSS; lock to one column. */
.finServ_page .hsc-resources .wp-block-columns,
.vertical-category-showcase .hsc-resources .wp-block-columns {
  display: block !important;
}
.finServ_page .hsc-resources .wp-block-column,
.vertical-category-showcase .hsc-resources .wp-block-column {
  width: 100% !important;
  flex: none !important;
  max-width: 100% !important;
}
.finServ_page .sf_more_resources_blocks,
.vertical-category-showcase .sf_more_resources_blocks {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* AI Agents tabs: only the `.active` wrap should be visible. solutions-init.js
 * adds `.active` to the first `.ap_tabs_wrap` on DOMContentLoaded; until then,
 * the first wrap is shown via `:has()` so there is no FOUC. This avoids the
 * previous bug where tab 1 stayed visible (via `:first-of-type`) on top of
 * tab 2/3/4 content, producing a large blank region above the tab image. */
.finServ_agents_content .ap_tabs_wrap {
  display: none;
}
.finServ_agents_content .ap_tabs_wrap.active {
  display: block;
}
.finServ_agents_content:not(:has(.ap_tabs_wrap.active))
  .ap_tabs_wrap:first-of-type {
  display: block;
}

/* Trim the bottom CTA band - prod version runs a bit tall for a demo page. */
.finServ_page .sf_bottom_cta_block .sf_bottom_cta_wrapper,
.vertical-category-showcase .sf_bottom_cta_block .sf_bottom_cta_wrapper {
  padding-top: 64px !important;
  padding-bottom: 64px !important;
}
@media (min-width: 992px) {
  .finServ_page .sf_bottom_cta_block .sf_bottom_cta_wrapper,
  .vertical-category-showcase .sf_bottom_cta_block .sf_bottom_cta_wrapper {
    padding-top: 80px !important;
    padding-bottom: 80px !important;
  }
}
