/* ---------------------------------------------
   Component: Blog Card (global)
   These rules mirror the card used on blogs index and single page
   --------------------------------------------- */
.blog-card {
  display: block;
  position: relative;
  text-decoration: none;
  background: #fff;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.06);
  width: 100%;
}

.blog-card__image {
  overflow: hidden;
}

.blog-card__image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Compact bottom band that is always visible (two-line title) */
.blog-card__title-compact {
  background: rgba(0, 43, 39, 0.80);
  height: 118px;
  padding: 18px 18px;
  display: flex;
  align-items: center;
  background-repeat: no-repeat;
  background-position: right bottom;
  background-size: 166px 95px;
  z-index: 1;
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
}

.blog-card__title-compact .blog-card__title {
  margin: 0;
}

.blog-card__title-wrap {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  /* use translateY to reveal only the bottom band initially */
  background: #002b27;
  padding: 18px;
  min-height: 84px;
  display: flex;
  align-items: end;
  background-repeat: no-repeat;
  background-position: right bottom;
  background-size: 166px 95px;
  height: 100%;
  transform: translateY(100%);
  transition: transform 0.22s ease;
  will-change: transform;
  z-index: 2;
}

@media (min-width: 992px) {
  .blog-card {
    width: 320px;
  }

  .blog-card__title-wrap {
    background-size: 214px 123px;
  }
}

.blog-card__title {
  margin: 0;
  color: #fff;
  font-family: Inter;
  font-weight: 700;
  font-size: 20px;
  line-height: 140%;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  /* max-width: 266px; */
}

/* Reserve height for about two lines in collapsed state */
.blog-card__title {
  max-height: 3.2em;
}

.blog-card__title {
  font-size: 20px;
  -ms-word-wrap: break-word;
  word-wrap: break-word;
}

/* Meta shown on expand */
.blog-card__meta {
  margin-top: 16px;
  display: grid;
  gap: 16px;
  overflow: hidden;
}

.blog-card__author {
  font-family: Inter;
  font-weight: 500;
  font-size: 12px;
  line-height: 1;
  letter-spacing: -0.02em;
  color: #fff;
}

.blog-card__date {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: Inter;
  font-weight: 500;
  font-size: 12px;
  line-height: 1;
  letter-spacing: -0.02em;
  color: #b4dac3;
}

.blog-card__date .icon-calendar {
  font-size: 16px;
  line-height: 0;
}

.blog-card__title-wrap > div {
  width: 100%;
}

/* Interactions: expand band to full height; show meta */
.blog-card:hover .blog-card__title-wrap,
.blog-card:focus-within .blog-card__title-wrap,
.blog-card:active .blog-card__title-wrap {
  transform: translateY(0);
}

.blog-card:hover .blog-card__meta,
.blog-card:focus-within .blog-card__meta,
.blog-card:active .blog-card__meta {
  opacity: 1;
  max-height: 200px;
}

/* Expanded state: allow up to 4 lines for title inside the overlay band */
.blog-card:hover .blog-card__title-wrap .blog-card__title,
.blog-card:focus-within .blog-card__title-wrap .blog-card__title,
.blog-card:active .blog-card__title-wrap .blog-card__title {
  -webkit-line-clamp: 4;
  line-clamp: 4;
  max-height: 5.6em;
  /* 4 * line-height 1.4 */
}

/* mobile styles */
@media (max-width: 768px) { 
  .blog-card__title-compact {
    min-height: 92px;
    padding: 24px;
  }

  .blog-card__title {
    font-size: 16px;
  }
}

/* No-image state: permanently expanded overlay */
.blog-card--no-image .blog-card__title-compact {
  display: none;
}

.blog-card--no-image .blog-card__title-wrap {
  transform: translateY(0);
}

.blog-card--no-image .blog-card__meta {
  opacity: 1;
  transform: translateY(0);
  max-height: 200px;
}

.blog-card--no-image .blog-card__title-wrap .blog-card__title {
  -webkit-line-clamp: 4;
  line-clamp: 4;
  max-height: 5.6em;
}

/* Optional: add a subtle background pattern/gradient for no-image cards */
.blog-card--no-image .blog-card__image {
  background: linear-gradient(135deg, #f5f7fa 0%, #e5e7eb 100%);
}
