/* Microblog slider — lives inside a .card on the home page.
 *
 * Structure:
 *   .mb-slider         — outer wrapper
 *     .mb-slides       — position: relative, overflow: hidden (clips slides)
 *       .mb-slide      — absolutely positioned, opacity crossfade
 *         .mb-slide-img
 *         .mb-caption  — overlay at the bottom of the image
 *     .mb-dots         — navigation dots row (in normal flow, below image)
 *       .mb-dot
 *   .mb-single         — single post (no carousel), position: relative
 *     .mb-caption      — same overlay
 */

/* ── Single post wrapper ── */
.mb-single {
  position: relative;
  border-radius: 20px;
  margin-bottom: 25px;  /* same as .card-image margin-bottom */
}

/* Override card-image margin inside mb-single so caption
   sits flush on the image, not below the margin gap */
.mb-single > .card-image {
  display: block;
  margin-bottom: 0;
}

/* Disable image zoom on hover inside microblog —
   the card itself lifts instead (see below) */
.mb-single > .card-image:hover,
.mb-slide-img:hover {
  transform: none;
  box-shadow: none;
}

/* ── Slider outer wrapper ── */
.mb-slider {
  margin-bottom: 25px;  /* same as .card-image margin-bottom */
}

/* ── Slides viewport (overflow: hidden here, not on .mb-slider) ── */
.mb-slides {
  position: relative;
  overflow: hidden;
  border-radius: 20px;  /* same as .card-image */
}

/* ── Slides ── */
.mb-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  z-index: 0;
  transition: opacity 0.6s ease;
  pointer-events: none;  /* prevent clicks on hidden slides */
}

.mb-slide.mb-slide-active {
  opacity: 1;
  z-index: 1;
  pointer-events: auto;
}

/* ── Slide images ── */
.mb-slide-img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 20px;
}

/* ── Card hover: deeper shadow on microblog card,
   no image zoom since there's no link ── */
.card:has(.mb-slider):hover,
.card:has(.mb-single):hover {
  box-shadow: 6px 8px 5px rgba(250, 50, 50, 0.6);
  transition: box-shadow 0.3s ease;
}

/* ── Caption overlay ── */
.mb-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 8px 14px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.65));
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8), 0 0 8px rgba(0, 0, 0, 0.4);
  font-size: 13px;
  line-height: 1.4;
  border-radius: 0 0 20px 20px;
  pointer-events: none;  /* let clicks pass through */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Navigation dots ── */
.mb-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 10px 0 4px;
}

.mb-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
  transition: background 0.25s ease, transform 0.25s ease;
}

.mb-dot:hover {
  transform: scale(1.3);
}

.mb-dot-active {
  background: rgba(250, 50, 50, 0.8);  /* accent: matches card box-shadow */
  transform: scale(1.2);
}

/* ── Responsive ── */
@media (max-width: 520px) {
  .mb-caption {
    font-size: 12px;
    padding: 6px 10px;
  }

  .mb-dots {
    gap: 6px;
    padding: 8px 0 2px;
  }

  .mb-dot {
    width: 8px;
    height: 8px;
  }
}
