/**
 * Theme Name: Blocksy Child
 * Description: Blocksy Child theme
 * Author: Creative Themes
 * Template: blocksy
 * Text Domain: blocksy
 */

/* ---- XPT homepage sections (Latest Posts / Popular Posts) ----------
   Layout and hierarchy only; Blocksy still supplies colours and fonts.
   Safe to delete when the homepage is redesigned. */

/* Blocksy sets the vertical rhythm on .entry-content children, which beats a
   bare .xpt-home-section rule, so match its specificity rather than reach for
   !important. */
.entry-content > .xpt-home-section{
  margin-top: 64px;
  margin-bottom: 64px;
}

.xpt-home-section .xpt-section-title{
  margin-bottom: 6px;
}

.xpt-home-section .xpt-section-sub{
  margin-top: 0;
  margin-bottom: 28px;
  max-width: 60ch;
  opacity: .72;
}

/* A card title sits below the section heading in the hierarchy, so it must
   not compete with it. Blocksy renders h3 at ~30px, far too large inside a
   three-up grid card. */
.xpt-home-section .wp-block-post-title{
  font-size: 1.125rem;
  line-height: 1.35;
  margin: 14px 0 6px;
}

.xpt-home-section .wp-block-post-date{
  margin: 0;
  font-size: .8125rem;
  opacity: .65;
}

/* Featured images must never be cropped: the library ranges from 1.5 to 1.91
   so any fixed ratio would cut people out of frame. Let each image keep its
   own proportions and neutralise the wrapper height/object-fit that themes
   and the block editor otherwise impose. */
.xpt-home-section .wp-block-post-featured-image,
.xpt-home-section .wp-block-post-featured-image a{
  display: block;
  aspect-ratio: auto;
  height: auto;
  min-height: 0;
  overflow: visible;
}

.xpt-home-section .wp-block-post-featured-image img{
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: auto;
  object-fit: fill;
  max-width: 100%;

}

@media (max-width: 767px){
  .entry-content > .xpt-home-section{ margin-top: 44px; margin-bottom: 44px; }
  .xpt-home-section .wp-block-post-title{ font-size: 1.0625rem; }
}
