/*
Theme Name:   Chesapeake Financial Planners
Theme URI:    https://chesapeakefp.com
Description:  Standalone theme for chesapeakefp.com. No parent theme: it prints its own header, footer and call-to-action
              band, ships the 41 ACF/PHP page templates, the Pillar Page and Perspectives Index templates, single post,
              category archive, search and 404 layouts, and the blog-image CSS. Requires ACF (free) for the page
              fields; AIOSEO, TablePress and the FAQ plugin stay active as before. Themeco Pro and Cornerstone are not
              required.
Author:       Chesapeake Financial Planners
Version: 2.1.5
Requires at least: 6.0
Requires PHP: 7.4
Text Domain:  chesapeake-fp
*/

/* Global rules for the front end live in assets/css/ (cfp-chrome.css for header/footer, cfp-blog.css for posts,
   archives, search and 404, cfp-pages.css for the 41 ACF page templates). This file keeps the blog-image rules
   that were already in production. */



/* -----------------------------------------------------------------------
 * Blog post body images -- cap width, float, and wrap text around them.
 * Applies to every image inside the post content area (.entry-content),
 * which covers standard Gutenberg image blocks (<figure class="wp-block-image">)
 * as used in Perspectives/blog articles. Max 640px wide, floated left with
 * text wrapping on the right; scales down responsively on narrow screens.
 * ----------------------------------------------------------------------- */
.entry-content img,
.entry-content .wp-block-image {
  max-width: 640px;
  width: 100%;
  height: auto;
}
.entry-content .wp-block-image {
  display: block;
  float: left;
  margin: 6px 28px 20px 0;
}
.entry-content .wp-block-image.alignright {
  float: right;
  margin: 6px 0 20px 28px;
}
.entry-content .wp-block-image.aligncenter,
.entry-content .wp-block-image.alignfull,
.entry-content .wp-block-image.alignwide {
  display: block;
  float: none;
  margin: 20px auto;
}
.entry-content .wp-block-image img { width: 100%; height: auto; }
.entry-content::after { content: ""; display: block; clear: both; }
@media (max-width: 640px) {
  .entry-content .wp-block-image {
    float: none;
    width: 100%;
    max-width: 100%;
    margin: 20px 0;
  }
}

/* -----------------------------------------------------------------------
 * Related Reading cards -- injected via page-cards-injector.php on the
 * 24 Cornerstone pages mapped in CFP-Page-Cards-Mapping-v3.xlsx. Scoped
 * and self-contained since Cornerstone pages don't share page-pillar.php's
 * CSS custom properties.
 * --------------------------------------------------------------------- */
.cfp-related-cards {
  max-width: 1100px;
  margin: 48px auto 0;
  padding: 40px 20px 0;
  border-top: 1px solid #e2e2e2;
  clear: both;
}
.cfp-related-cards-heading {
  font-size: 24px;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0 0 24px;
}
.cfp-related-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.cfp-related-card {
  display: flex;
  flex-direction: column;
  border: 1px solid #e2e2e2;
  border-radius: 8px;
  padding: 24px;
  background: #fff;
}
.cfp-related-card-title {
  font-size: 17px;
  font-weight: bold;
  line-height: 1.35;
  color: #1a1a1a;
  margin: 0 0 10px;
}
.cfp-related-card-excerpt {
  font-size: 14px;
  line-height: 1.5;
  color: #5a5a5a;
  margin: 0 0 14px;
}
.cfp-related-card-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid #eee;
}
.cfp-related-card-readmore {
  display: inline-block;
  font-size: 14px;
  font-weight: bold;
  color: #0171bb;
  text-decoration: none;
  padding: 8px 16px;
  border: 1px solid #0171bb;
  border-radius: 4px;
  transition: background 0.2s ease, color 0.2s ease;
}
.cfp-related-card-readmore:hover {
  background: #0171bb;
  color: #fff !important;
}
@media (max-width: 900px) {
  .cfp-related-cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 640px) {
  .cfp-related-cards-grid {
    grid-template-columns: 1fr;
  }
}
