/* ============================================================================
   Aurelia Luxe — v3.37
   Loads last, after v336.

   BUG — Blog page (mobile): the last "Popular Articles" row card looked as
   if a container overlapped it, and its thumbnail was cut off flat at the
   bottom (only the top corners stayed rounded).

   Root cause (measured): `.hl-blog-popular__list` is a flex column with
   `justify-content: space-between` and each `.hl-blog-card--pop-row` set to
   `flex: 1`, while the row's media is `height: 100%` on top of
   `aspect-ratio: 4 / 3`. Once the list stacks to one column on phones, the
   flex algorithm gives every row the same (shorter) height, but the media
   box still resolves to the taller aspect-ratio height. Since
   `.hl-blog-card` carries `overflow: hidden`, that extra height — plus the
   category pill below it — gets clipped by the card box itself. Result: a
   hard, square cut across the bottom of the image and content that appears
   to disappear under an invisible container.

   Fix: on touch/stacked layouts the row cards size to their own content —
   no flex stretch, no percentage media height, no clipping — so the
   thumbnail keeps its full rounded rectangle and nothing is cut off.
============================================================================ */

@media (max-width: 900px) {
  .hl-blog-popular__list {
    justify-content: flex-start !important;
    gap: 1.4rem !important;
  }

  .hl-blog-popular__list .hl-blog-card--pop-row {
    flex: 0 0 auto !important;
    height: auto !important;
    min-height: 0 !important;
    align-items: start !important;
    overflow: visible !important;
  }

  /* Let the 4:3 ratio decide the thumbnail height instead of a percentage
     that resolves against a shorter flex row. */
  .hl-blog-popular__list .hl-blog-card--pop-row .hl-blog-card__media {
    height: auto !important;
    min-height: 0 !important;
    align-self: start !important;
    border-radius: 18px !important;
    overflow: hidden !important;
  }

  .hl-blog-popular__list .hl-blog-card--pop-row .hl-blog-card__img {
    width: 100% !important;
    height: 100% !important;
    aspect-ratio: 4 / 3 !important;
    object-fit: cover !important;
    border-radius: 18px !important;   /* guards against composited children
                                         escaping the parent's rounding */
    backface-visibility: visible !important;
  }

  .hl-blog-popular__list .hl-blog-card--pop-row .hl-blog-card__body {
    min-width: 0 !important;
  }
}

/* ============================================================================
   Featured (popular) card — restore the excerpt overlay on mobile.
   v3.31 hid it under 900px; keep it visible but clamped so it never crowds
   the title/tag inside the image.
   ========================================================================== */

@media (max-width: 900px) {
  .hl-blog-card--pop-feature .hl-blog-card__overlay-excerpt {
    display: -webkit-box !important;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: .88rem !important;
    line-height: 1.55 !important;
    color: rgba(255, 255, 255, .88) !important;
    max-width: 40ch;
  }

  /* Slightly stronger scrim so the extra text stays readable. */
  .hl-blog-card--pop-feature .hl-blog-card__scrim {
    background: linear-gradient(to top,
      rgba(0, 0, 0, .78) 0%,
      rgba(0, 0, 0, .55) 38%,
      rgba(0, 0, 0, .12) 68%,
      rgba(0, 0, 0, 0) 100%) !important;
  }
}

@media (max-width: 480px) {
  .hl-blog-card--pop-feature .hl-blog-card__overlay-excerpt {
    -webkit-line-clamp: 2;
    line-clamp: 2;
    font-size: .85rem !important;
  }
}

/* ── Footer bottom bar: client copyright left · agency credit right ─── */
.hl-footer__bottom .hl-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.hl-footer__bottom .hl-footer__copy { margin-right: auto; }
.hl-footer__credit {
  margin: 0;
  margin-left: auto;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.4);
  letter-spacing: 0.01em;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}
.hl-footer__credit a {
  color: rgba(255,255,255,0.5);
  text-decoration: none;
  transition: color 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}
.hl-footer__credit a:hover { color: var(--hl-gold, #c9a227); }
.hl-footer__credit-heart {
  color: #f0417c;
  flex-shrink: 0;
  vertical-align: middle;
}
.hl-footer__credit a:hover .hl-footer__credit-heart { color: #f0417c; }

@media (max-width: 640px) {
  .hl-footer__bottom .hl-container {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.6rem;
  }
  .hl-footer__credit { font-size: 0.74rem; margin-left: 0; }
  .hl-footer__bottom .hl-footer__copy { margin-right: 0; }
}

/* ── Inline icon/emoji tokens in footer text ─────────────────────────── */
.hl-icon-token {
  flex-shrink: 0;
  vertical-align: -1px;
  display: inline-block;
}
.hl-icon-token--heart    { color: #f0417c; }
.hl-icon-token--star     { color: var(--hl-gold, #c9a227); }
.hl-icon-token--sparkles { color: var(--hl-gold, #c9a227); }
.hl-icon-token--coffee   { color: #c98a5b; }
.hl-icon-token--flame    { color: #f07a35; }
.hl-icon-token--zap      { color: #f5c542; }
.hl-footer__copy,
.hl-footer__credit,
.hl-footer__credit a {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  flex-wrap: wrap;
}
