/* ZooMag R95.2 — blog media contain-fit refinement (article hero + blog cards)
   Isolated overrides. Existing R41/R21 layout remains the base. */

/* --------------------------------------------------------------------------
   ARTICLE DETAIL — attractive hero without hard crop
   -------------------------------------------------------------------------- */
#cms-blog-r41 .zm-blog-r41-page__cover {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  margin: 2px 0 0;
  padding: clamp(10px, 1.7vw, 18px);
  border: 1px solid rgba(35, 116, 85, .13);
  border-bottom: 0;
  border-radius: 24px 24px 0 0;
  background:
    radial-gradient(circle at 12% 15%, rgba(59, 166, 119, .19), transparent 33%),
    radial-gradient(circle at 90% 14%, rgba(242, 138, 50, .20), transparent 34%),
    linear-gradient(135deg, #edf8f3 0%, #f7fbf9 44%, #fff5e9 100%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.85),
    0 16px 36px rgba(34, 59, 82, .08);
}

#cms-blog-r41 .zm-blog-r41-page__cover::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.23)),
    radial-gradient(circle at 50% 110%, rgba(255,255,255,.75), transparent 54%);
  pointer-events: none;
}

#cms-blog-r41 .zm-blog-r41-page__cover-ambient {
  position: absolute;
  inset: -42px;
  z-index: -2;
  overflow: hidden;
  opacity: .36;
  filter: blur(30px) saturate(1.18) contrast(.96);
  transform: scale(1.12);
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  pointer-events: none;
}

#cms-blog-r41 .zm-blog-r41-page__cover-stage {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  overflow: hidden;
  width: 100%;
  height: clamp(340px, 40vw, 520px);
  padding: clamp(8px, 1.2vw, 14px);
  box-sizing: border-box;
  border: 1px solid rgba(255,255,255,.84);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.32), rgba(255,255,255,.18)),
    rgba(255,255,255,.18);
  box-shadow:
    0 14px 36px rgba(29, 48, 70, .10),
    inset 0 0 0 1px rgba(31, 95, 71, .04);
}

#cms-blog-r41 .zm-blog-r41-page__cover-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  transform: none;
  filter: saturate(1.04) contrast(1.02) drop-shadow(0 10px 24px rgba(31, 46, 65, .10));
}

@media (min-width: 1180px) {
  #cms-blog-r41 .zm-blog-r41-page__cover-stage {
    height: 500px;
  }
}

/* --------------------------------------------------------------------------
   BLOG INDEX — media under frame without harsh crop
   -------------------------------------------------------------------------- */
#zm-blog-r21 .zm-blog-card {
  border-color: rgba(35, 68, 55, .11);
  box-shadow: 0 12px 30px rgba(37,50,68,.07);
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}

#zm-blog-r21 .zm-blog-card:hover {
  transform: translateY(-4px);
  border-color: rgba(29,114,73,.20);
  box-shadow: 0 18px 42px rgba(37,50,68,.11);
}

#zm-blog-r21 .zm-blog-card__media {
  position: relative;
  isolation: isolate;
  height: auto;
  aspect-ratio: 16 / 9;
  padding: 6px;
  background:
    radial-gradient(circle at 8% 10%, rgba(45,140,92,.14), transparent 35%),
    radial-gradient(circle at 92% 8%, rgba(242,138,50,.17), transparent 34%),
    linear-gradient(145deg,#f3faf6,#fff5e9);
}

#zm-blog-r21 .zm-blog-card__media-ambient {
  position: absolute;
  inset: -22px;
  z-index: -2;
  opacity: .28;
  filter: blur(22px) saturate(1.12);
  transform: scale(1.10);
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  pointer-events: none;
}

#zm-blog-r21 .zm-blog-card__media-frame {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  overflow: hidden;
  padding: 8px;
  box-sizing: border-box;
  border: 1px solid rgba(255,255,255,.84);
  border-radius: 15px;
  background: rgba(255,255,255,.18);
  box-shadow: 0 8px 20px rgba(27, 46, 64, .08);
}

#zm-blog-r21 .zm-blog-card__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  transform: none;
  transition: transform .28s ease, filter .28s ease;
  filter: saturate(1.03) contrast(1.01) drop-shadow(0 8px 18px rgba(31, 46, 65, .08));
}

#zm-blog-r21 .zm-blog-card:hover .zm-blog-card__image {
  transform: scale(1.02);
  filter: saturate(1.045) contrast(1.015) drop-shadow(0 10px 22px rgba(31, 46, 65, .10));
}

#zm-blog-r21 .zm-blog-card p {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 5;
  overflow: hidden;
}

#zm-blog-r21 .zm-blog-card h2 a:hover {
  color: var(--zm21-green);
}

@media (prefers-reduced-motion: reduce) {
  #zm-blog-r21 .zm-blog-card,
  #zm-blog-r21 .zm-blog-card__image {
    transition: none;
  }
}

@media (max-width: 760px) {
  #cms-blog-r41 .zm-blog-r41-page__cover {
    padding: 8px;
    border-radius: 18px 18px 0 0;
  }

  #cms-blog-r41 .zm-blog-r41-page__cover-stage {
    height: 300px;
    padding: 8px;
    border-radius: 13px;
  }

  #zm-blog-r21 .zm-blog-card__media {
    aspect-ratio: 16 / 9;
    padding: 4px;
  }

  #zm-blog-r21 .zm-blog-card__media-frame {
    padding: 6px;
    border-radius: 13px;
  }
}

@media (max-width: 430px) {
  #cms-blog-r41 .zm-blog-r41-page__cover-stage {
    height: 250px;
    padding: 6px;
  }
}
