/* Firegang Blog Layout — normalize posts to rows of 3 (fix broken flex grids), sidebar-drop fix, single-post featured image */

/* corrective grid: force wrap + top-aligned equal-height cells so posts land 3-across and images line up (overrides child .flex/nowrap/center) */
body.fg-bl .posts-list {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: stretch !important;
}

/* flat grids (bare .post children, e.g. parent-template sites): size cells to thirds + fluid gap */
body.fg-bl-flatgrid .posts-list {
  --fg-bl-gap: clamp(16px, 2vw, 32px);
  gap: var(--fg-bl-gap);
}

body.fg-bl-flatgrid .posts-list > .post {
  flex: 0 0 calc((100% - 2 * var(--fg-bl-gap)) / 3);
  max-width: calc((100% - 2 * var(--fg-bl-gap)) / 3);
}

/* review block, pagination, etc. span the full row */
body.fg-bl-flatgrid .posts-list > :not(.post) {
  flex: 0 0 100%;
  max-width: 100%;
}

/* single post: featured image hidden here, kept on the listing */
body.single.fg-bl .post-feat-img {
  display: none;
}

/* nav legibility: blog/post pages use the solid interior header, but often leak the home banner's near-white nav color onto it (white-on-white). Force the desktop nav + contact bar dark like interior pages. Override --fg-bl-navcolor per site to match brand. */
@media (min-width: 992px) {
  body.fg-bl header #nav a,
  body.fg-bl header .headAdd,
  body.fg-bl header .headAdd a,
  body.fg-bl header .phoneBlock,
  body.fg-bl header .phoneBlock a {
    color: var(--fg-bl-navcolor, #13284b) !important;
  }
}

/* sidebar layouts: content sits beside the sidebar at the lg breakpoint, where the sidebar floats */
@media (min-width: 1200px) {
  body.fg-bl-sidebar #content {
    float: left;
    width: 66.6667%;
  }

  body.fg-bl-sidebar .main-frame .container::after {
    content: "";
    display: table;
    clear: both;
  }
}

/* mobile: stack flat-grid posts one per row (col-grid sites use their own col-sm-12) */
@media (max-width: 767px) {
  body.fg-bl-flatgrid .posts-list > .post {
    flex: 0 0 100%;
    max-width: 100%;
  }
}
