/* ============================================================
   equal-cards.css — uniform card sizing across the site.

   Opt in per grid by adding `eq-cards` to the grid row:
       <div class="row eq-cards"> ... </div>

   Cards stay equal because:
     - the column and the card stretch to the grid line's height
     - thumbnails are locked to one aspect ratio (object-fit: cover)
     - titles reserve a fixed number of lines
     - any CTA is pinned to the bottom with margin-top: auto
   ============================================================ */

/* --- grid plumbing: static grids --- */
.eq-cards > [class*="col-"] {
    display: flex;
}

/* --- grid plumbing: slick sliders.
       slick puts .slick-slide on the column element itself and
       sets display:block, so this has to out-specify slick.css --- */
.eq-cards .slick-track {
    display: flex;
    align-items: stretch;
}
.eq-cards.slick-initialized .slick-slide {
    display: flex;
    height: auto;
    /* slick sets each slide's width inline; without this the slides
       become flexible and redistribute across the track instead */
    flex: 0 0 auto;
}

/* --- the card fills its column --- */
.eq-cards .featured-imagebox,
.eq-cards .featured-icon-box {
    display: flex;
    flex-direction: column;
    width: 100%;
}

/* the gallery wraps the whole card body in a link */
.eq-cards .featured-imagebox > a {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
}

/* --- thumbnails: one ratio per grid, so image height stops driving
       card height. The ratio is per-grid on purpose: source art runs
       from square product renders (1:1) to wide service shots (2.06:1),
       and forcing a single box crops the extremes badly. Each grid
       carries the modifier matching its own images. --- */
.eq-cards .featured-thumbnail {
    position: relative;
    width: 100%;
    padding-top: var(--eq-ratio, 70%);   /* default suits ~1.43:1 */
}
.eq-cards.eq-r-square { --eq-ratio: 100%; }    /* 1:1    */
.eq-cards.eq-r-4x3    { --eq-ratio: 75%; }     /* 1.33:1 */
.eq-cards.eq-r-3x2    { --eq-ratio: 66.67%; }  /* 1.5:1  */
.eq-cards.eq-r-16x9   { --eq-ratio: 58%; }     /* 1.72:1 */
.eq-cards.eq-r-wide   { --eq-ratio: 48.5%; }   /* 2.06:1 */
.eq-cards .featured-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* --- content stretches; CTAs land on a common baseline --- */
.eq-cards .featured-content,
.eq-cards .featured-title {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
}
/* deliberately as deep as the theme's own
   .featured-imagebox .featured-content .featured-title h3,
   which sets line-height: 32px -- two lines is 64px */
.eq-cards .featured-imagebox .featured-content .featured-title h3 {
    min-height: 64px;
}
.eq-cards .featured-title .ttm-btn {
    margin-top: auto;
    align-self: flex-start;
}
