/* Blog archive / category / tag listing — image-card grid with a soft
   blurred "glow" shadow cast from a duplicate of the same image. */

/* !important needed: WordPress auto-enqueues the child theme's own style.css
   (body background: #f4f2ec) after this stylesheet, so it would otherwise
   win the cascade despite equal selector specificity. */
body { background-color: #fff !important; }

/* Full-bleed breakout. The site's default right-sidebar layout (reserving
   column space for a sidebar this page never renders) was the main cause
   of the content being constrained — fixed at the source via the
   generate_sidebar_layout filter in functions.php. !important stays here
   as a safety net since something on this install still won the width
   property over this rule without it. */
.mm-blog-wrapper {
  width: 100vw !important;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
}

.mm-blog-inner {
  /* Fixed gutter instead of a vw-based max-width, so the side margin is
     the same physical size on every device rather than shrinking the
     available row on small screens or ballooning it on huge ones. */
  margin: 0 auto;
  padding: 48px 24px;
}

.mm-blog-cards {
  display: grid;
  /* Capped MAX (505px, 380px + 33%) instead of 1fr means a column stops
     growing once it hits that size — extra row space invites another
     column in instead of stretching existing ones wider. min(280px, 100%)
     still lets a card shrink below that on very narrow screens instead of
     overflowing. justify-content centers however many columns fit, so
     leftover space becomes even margin on both sides. */
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 505px));
  justify-content: center;
  gap: 40px 32px;
}

.mm-blog-card {
  position: relative;
  display: block;
  height: 250px;
  padding: 28px 24px;
  color: #fff;
  text-decoration: none;
  transition: transform .3s cubic-bezier(.25, .45, .45, .95);
}
.mm-blog-card:hover { transform: scale(1.02); }
/* GP core's global a:hover{color:...} rule loads after this stylesheet and
   ties on specificity, so it wins on hover and turns the card (and every
   child text node, via inheritance) near-black. Force it back to white. */
.mm-blog-card:hover { color: #fff !important; }

.mm-blog-card-content {
  position: relative;
  z-index: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.mm-blog-card-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}
.mm-blog-card-name { margin: 0; font-size: 15px; font-weight: 700; }
.mm-blog-card-date { font-size: 13px; font-weight: 700; opacity: .85; white-space: nowrap; }

.mm-blog-card-title {
  margin: 0;
  font-size: 22px;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

.mm-blog-card-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(150deg, #1c1d16 0%, #14150F 55%, #23260f 100%);
}
.mm-blog-card-bg img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Dark overlay on hover instead of a text-color change — keeps the title
   readable against the image without touching the zoom (card scale) or the
   text color, which now stays fixed at white. */
.mm-blog-card-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0);
  transition: background-color .3s ease;
}
.mm-blog-card:hover .mm-blog-card-bg::after { background-color: rgba(0, 0, 0, .35); }

.mm-blog-card-shadow {
  position: absolute;
  left: 50%;
  bottom: -14px;
  transform: translateX(-50%);
  width: 90%;
  height: 100%;
  z-index: -2;
  overflow: hidden;
  border-radius: 16px;
  filter: blur(16px);
  opacity: .85;
}
.mm-blog-card-shadow img { width: 100%; height: 100%; object-fit: cover; display: block; margin-top: 26px; }

/* Promo banner injected every 6 cards — spans every column in the row
   regardless of how many the grid is currently showing. */
.mm-blog-banner {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 28px 32px;
  border-radius: 16px;
  background: #14150F;
  text-decoration: none;
  transition: background-color .2s ease;
}
.mm-blog-banner:hover { background: #23260f; }
.mm-blog-banner-text { color: #F5F4EE; font-weight: 700; font-size: 20px; }
.mm-blog-banner-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  background: var(--mm-accent);
  color: var(--mm-accent-text);
  font-weight: 700;
  font-size: 14px;
  white-space: nowrap;
  padding: 12px 20px;
  border-radius: 999px;
}
.mm-blog-banner-arrow { font-size: 14px; line-height: 1; transition: transform .15s ease; }
.mm-blog-banner:hover .mm-blog-banner-arrow { transform: translateX(2px); }

@media screen and (max-width: 560px) {
  .mm-blog-banner-text { font-size: 17px; }
}

.mm-blog-pagination {
  margin-top: 50px;
  text-align: center;
}
/* paginate_links() wraps every prev/number/next link in its own
   .nav-links div — that div, not .mm-blog-pagination, is the real parent
   of the pill links, so the flex/centering has to live here for it to
   actually govern their layout. Previously .mm-blog-pagination was flexed
   but had only that one wrapper as a child, so the pills inside were just
   sitting in normal inline flow and following inline baseline alignment
   instead of being centered as a row — that's what was making Previous
   sit lower than the number pills next to it. */
.mm-blog-pagination .nav-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.mm-blog-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  border-radius: 8px;
  background: #F5F4F0;
  color: #14150F;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
}
.mm-blog-pagination .page-numbers.current { background: #14150F; color: #F5F4EE; }
.mm-blog-pagination .page-numbers:hover:not(.current) { background: #E9E7DE; }

.mm-blog-empty { color: #6B6960; font-size: 16px; }

@media screen and (max-width: 560px) {
  .mm-blog-card { height: 220px; }
}
